(globalThis["TURBOPACK_remote_chunk_loading_global_wx-next-web"]||(globalThis["TURBOPACK_remote_chunk_loading_global_wx-next-web"]=[])).push(["object"==typeof document?document.currentScript:void 0,268056,e=>{"use strict";var t=e.i(902875),l=e.i(247865),a=e.i(546446),i=e.i(806262),n=e.i(457492),r=e.i(632137),s=e.i(973855),d=e.i(514514);let o=(0,d.default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),c=(0,d.default)("ellipsis-vertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);var u=e.i(482317),m=e.i(777430),h=e.i(484758),p=e.i(617843),f=e.i(531166),x=e.i(528600),b=e.i(877957),g=e.i(809058),y=e.i(368847),v=e.i(550385),j=e.i(186624),w=l;let k={horizontalrule:(0,t.jsx)("hr",{})},N={linebreak:(0,t.jsx)("br",{})};var S=e.i(990033);let T="֑-߿יִ-﷽ﹰ-ﻼ",_="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-";RegExp("^[^"+_+"]*["+T+"]"),RegExp("^[^"+T+"]*["+_+"]");let A={paragraph:({node:e,nodesToJSX:l})=>{let a=l({nodes:e.children});return a?.length?(0,t.jsx)("p",{children:a}):(0,t.jsx)("p",{children:(0,t.jsx)("br",{})})},text:({node:e})=>{let l=e.text;return 1&e.format&&(l=(0,t.jsx)("strong",{children:l})),2&e.format&&(l=(0,t.jsx)("em",{children:l})),4&e.format&&(l=(0,t.jsx)("span",{style:{textDecoration:"line-through"},children:l})),8&e.format&&(l=(0,t.jsx)("span",{style:{textDecoration:"underline"},children:l})),16&e.format&&(l=(0,t.jsx)("code",{children:l})),32&e.format&&(l=(0,t.jsx)("sub",{children:l})),64&e.format&&(l=(0,t.jsx)("sup",{children:l})),l},...N,quote:({node:e,nodesToJSX:l})=>{let a=l({nodes:e.children});return(0,t.jsx)("blockquote",{children:a})},table:({node:e,nodesToJSX:l})=>{let a=l({nodes:e.children});return(0,t.jsx)("div",{className:"lexical-table-container",children:(0,t.jsx)("table",{className:"lexical-table",style:{borderCollapse:"collapse"},children:(0,t.jsx)("tbody",{children:a})})})},tablecell:({node:e,nodesToJSX:l})=>{let a=l({nodes:e.children}),i=e.headerState>0?"th":"td",n=`lexical-table-cell-header-${e.headerState}`,r={backgroundColor:e.backgroundColor||void 0,border:"1px solid #ccc",padding:"8px"},s=e.colSpan&&e.colSpan>1?e.colSpan:void 0,d=e.rowSpan&&e.rowSpan>1?e.rowSpan:void 0;return(0,t.jsx)(i,{className:`lexical-table-cell ${n}`,colSpan:s,rowSpan:d,style:r,children:a})},tablerow:({node:e,nodesToJSX:l})=>{let a=l({nodes:e.children});return(0,t.jsx)("tr",{className:"lexical-table-row",children:a})},heading:({node:e,nodesToJSX:l})=>{let a=l({nodes:e.children}),i=e.tag;return(0,t.jsx)(i,{children:a})},...k,list:({node:e,nodesToJSX:l})=>{let a=l({nodes:e.children}),i=e.tag;return(0,t.jsx)(i,{className:`list-${e?.listType}`,children:a})},listitem:({node:e,nodesToJSX:l,parent:a})=>{let i=e.children.some(e=>"list"===e.type),n=l({nodes:e.children});if(!("listType"in a)||a?.listType!=="check")return(0,t.jsx)("li",{className:`${i?"nestedListItem":""}`,style:i?{listStyleType:"none"}:void 0,value:e?.value,children:n});{let l=(0,S.v4)();return(0,t.jsx)("li",{"aria-checked":e.checked?"true":"false",className:`list-item-checkbox${e.checked?" list-item-checkbox-checked":" list-item-checkbox-unchecked"}${i?" nestedListItem":""}`,role:"checkbox",style:{listStyleType:"none"},tabIndex:-1,value:e?.value,children:i?n:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("input",{checked:e.checked,id:l,readOnly:!0,type:"checkbox"}),(0,t.jsx)("label",{htmlFor:l,children:n}),(0,t.jsx)("br",{})]})})}},...(({internalDocToHref:e})=>({autolink:({node:e,nodesToJSX:l})=>{let a=l({nodes:e.children}),i=e.fields.newTab?"noopener noreferrer":void 0,n=e.fields.newTab?"_blank":void 0;return(0,t.jsx)("a",{href:e.fields.url,rel:i,target:n,children:a})},link:({node:l,nodesToJSX:a})=>{let i=a({nodes:l.children}),n=l.fields.newTab?"noopener noreferrer":void 0,r=l.fields.newTab?"_blank":void 0,s=l.fields.url??"";return"internal"===l.fields.linkType&&(e?s=e({linkNode:l}):(console.error("Lexical => JSX converter: Link converter: found internal link, but internalDocToHref is not provided"),s="#")),(0,t.jsx)("a",{href:s,rel:n,target:r,children:i})}}))({}),upload:({node:e})=>{if("object"!=typeof e.value)return null;let l=e.value,a=e.fields?.alt||l?.alt||"",i=l.url;if(!l.mimeType.startsWith("image"))return(0,t.jsx)("a",{href:i,rel:"noopener noreferrer",children:l.filename});if(!l.sizes||!Object.keys(l.sizes).length)return(0,t.jsx)("img",{alt:a,height:l.height,src:i,width:l.width});let n=[];for(let e in l.sizes){let a=l.sizes[e];if(!a||!a.width||!a.height||!a.mimeType||!a.filesize||!a.filename||!a.url)continue;let i=a?.url;n.push((0,t.jsx)("source",{media:`(max-width: ${a.width}px)`,srcSet:i,type:a.mimeType},e))}return n.push((0,t.jsx)("img",{alt:a,height:l?.height,src:i,width:l?.width},"image")),(0,t.jsx)("picture",{children:n})},tab:" "};function C(e){return a=>{if(e.Component){let t={...a,isEditor:!1,isJSXConverter:!0};return e.Component(t)}if(e.Block){let t=a.node,i={childIndex:a.childIndex,converters:a.converters,formData:t.fields??{},isEditor:!1,isJSXConverter:!0,node:t,nodesToJSX:a.nodesToJSX,parent:a.parent};return l.default.createElement(e.Block,i)}if(e.html){let l={...a,isEditor:!1,isJSXConverter:!0},i="function"==typeof e.html?e.html(l):e.html;return(0,t.jsx)("span",{dangerouslySetInnerHTML:{__html:i}})}return null}}function I({className:e,converters:a,data:i,disableContainer:n,disableIndent:r,disableTextAlign:s,nodeMap:d}){if(!i)return null;let o={};o=a?"function"==typeof a?a({defaultConverters:A}):a:A;let c=i&&!Array.isArray(i)&&"object"==typeof i&&"root"in i&&function({converters:e,data:a,disableIndent:i,disableTextAlign:n,nodeMap:r}){if(function(e){if(!e?.root?.children?.length)return!1;let t=!1;if(e?.root?.children?.length===1&&e?.root?.children[0]?.type==="paragraph"){let l=e?.root?.children[0];if(l?.children&&l?.children?.length!==0){if(l?.children?.length===1){let e=l?.children[0];e?.type!=="text"||e?.text?.length||(t=!0)}}else t=!0}return!t}(a)){let s=r?function(e){let l={};for(let[a,i]of Object.entries(e))if(i&&"object"==typeof i){if("blocks"===a){for(let[e,t]of(l.blocks={},Object.entries(i)))(t.Component||t.Block||t.html)&&(l.blocks[e]=C(t));continue}if("inlineBlocks"===a){for(let[e,t]of(l.inlineBlocks={},Object.entries(i)))(t.Component||t.Block||t.html)&&(l.inlineBlocks[e]=C(t));continue}(i.Component||i.html)&&(l[a]=function(e){return l=>{let a={...l,isEditor:!1,isJSXConverter:!0};if(e.Component)return e.Component(a);if(e.html){let l="function"==typeof e.html?e.html(a):e.html;return(0,t.jsx)("span",{dangerouslySetInnerHTML:{__html:l}})}return null}}(i))}return l}(r):void 0;return function e({converters:a,disableIndent:i,disableTextAlign:n,nodes:r,parent:s}){let d=a.unknown;return r.map((r,o)=>{let c;"block"===r.type?(c=a?.blocks?.[r?.fields?.blockType])||d||console.error(`Lexical => JSX converter: Blocks converter: found ${r?.fields?.blockType} block, but no converter is provided`):"inlineBlock"===r.type?(c=a?.inlineBlocks?.[r?.fields?.blockType])||d||console.error(`Lexical => JSX converter: Inline Blocks converter: found ${r?.fields?.blockType} inline block, but no converter is provided`):c=a[r.type];try{let u;!c&&d&&(c=d),u=c?"function"==typeof c?c({childIndex:o,converters:a,node:r,nodesToJSX:t=>e({converters:t.converters??a,disableIndent:t.disableIndent??i,disableTextAlign:t.disableTextAlign??n,nodes:t.nodes,parent:t.parent??{...r,parent:s}}),parent:s}):c:(0,t.jsx)("span",{children:"unknown node"},o);let m={};if(!n&&(!Array.isArray(n)||!n?.includes(r.type))&&"format"in r&&r.format)switch(r.format){case"center":m.textAlign="center";break;case"end":case"right":m.textAlign="right";break;case"justify":m.textAlign="justify";break;case"left":break;case"start":m.textAlign="left"}if(!i&&(!Array.isArray(i)||!i?.includes(r.type))&&"indent"in r&&r.indent&&"listitem"!==r.type&&(m.paddingInlineStart=`${40*Number(r.indent)}px`),l.default.isValidElement(u)){if(m.textAlign||m.paddingInlineStart){let e={...m,...u?.props?.style??{}};return l.default.cloneElement(u,{key:o,style:e})}return l.default.cloneElement(u,{key:o})}return u}catch(e){return console.error("Error converting lexical node to JSX:",e,"node:",r),null}}).filter(Boolean)}({converters:s?{...e,...s,blocks:{...e.blocks,...s.blocks},inlineBlocks:{...e.inlineBlocks,...s.inlineBlocks}}:e,disableIndent:i,disableTextAlign:n,nodes:a.root.children,parent:a.root})}return(0,t.jsx)(t.Fragment,{})}({converters:o,data:i,disableIndent:r,disableTextAlign:s,nodeMap:d});return n?(0,t.jsx)(t.Fragment,{children:c}):(0,t.jsx)("div",{className:e??"payload-richtext",children:c})}var P=e.i(695881);let B=["weather.com"];function $(e){if(!function(e){try{let{protocol:t}=new URL(e);return"https:"===t||"http:"===t}catch{return!1}}(e))return!1;let t=new URL(e);return!B.some(e=>t.hostname===e||t.hostname.endsWith(`.${e}`))}let D=({linkNode:e})=>(e=>{if("object"!=typeof e||null===e)return"/";let{assetName:t,slug:l}=e;return"string"==typeof t&&t.length>0?t:"string"==typeof l&&l.length>0?`/${l}`:"/"})(e.fields.doc?.value),M=(0,P.createLogger)("VideosWithPlaylists:HeroDescription"),L=({defaultConverters:e})=>({...e,...function({internalDocToHref:e,isMobileApp:l}){return{link:({node:a,nodesToJSX:i})=>{let n=a.fields,r="";if("internal"===n.linkType&&n.doc?.value){let t=l&&"videos"===n.doc.relationTo?n.doc.value:null,i=t&&"object"==typeof t?t:null;if(i?.id&&i.assetName){let e;e=new URLSearchParams({videoId:i.id,"video-url":i.assetName}),r=`twcthor://show?pageKey=Video%20Page&${e.toString()}`}else r=e({linkNode:a})}else n.url&&(r=n.url);let s=new Set(n.rel&&Array.isArray(n.rel)?n.rel:[]),d=r&&$(r);d&&(s.add("external"),s.add("nofollow"));let o=s.size>0?[...s].join(" "):void 0,c=n.newTab||d?"_blank":void 0;return(0,t.jsx)("a",{href:r,...o&&{rel:o},...c&&{target:c},children:i({nodes:a.children})})},autolink:({node:e,nodesToJSX:l})=>{let a=e.fields.url||"";return $(a)?(0,t.jsx)("a",{href:a,rel:"noopener noreferrer external nofollow",target:"_blank",children:l({nodes:e.children})}):(0,t.jsx)("a",{href:a,rel:"noopener noreferrer",children:l({nodes:e.children})})}}}({internalDocToHref:D})});class F extends w.Component{state={failed:!1};static getDerivedStateFromError(){return{failed:!0}}componentDidCatch(e,t){M.error("Hero description failed to render",e,{componentStack:t.componentStack})}render(){return this.state.failed?null:this.props.children}}function E({data:e}){return(0,t.jsx)(F,{children:(0,t.jsx)("div",{className:"[&_h1]:text-2xl [&_h2]:text-xl [&_h3]:text-lg [&_h4]:text-base [&_h1]:font-bold [&_h2]:font-bold [&_h3]:font-semibold [&_h4]:font-semibold [&_h1]:my-2 [&_h2]:my-2 [&_h3]:my-2 [&_h4]:my-2 [&_ol]:list-decimal [&_ul]:list-disc [&_ol]:pl-6 [&_ul]:pl-6 [&_ol]:my-2 [&_ul]:my-2 [&_li]:my-1 [&_a]:text-blue-600 [&_a]:underline",children:(0,t.jsx)(I,{converters:L,data:e})})})}var V=e.i(909232),R=e.i(849177),U=e.i(240058),z=e.i(155879),H=e.i(436028),O=e.i(37429),X=e.i(873598);let J={timeAgo:!0,daysFromNow:5,showFullTime:!1,locale:"en-US",timeZone:"America/New_York"},W=(e,t=J)=>{if(!e)return null;let{timeAgo:l,daysFromNow:a,showFullTime:i,locale:n,timeZone:r}={...J,...t},s=new Date(e),d=new Date;if(l){let e=d.getTime()-s.getTime(),t=Math.ceil(e/36e5),l=Math.ceil(e/864e5);if(t{if(!(0,H.hasLength)(e)&&!a&&!i&&!n)return null;let o=W(i),c=W(i,{timeAgo:!1,showFullTime:!0}),u=W(n,{timeAgo:!1,showFullTime:!0}),m=(0,H.hasLength)(e)?e.filter(e=>"object"==typeof e&&null!==e&&`${e.firstName||""} ${e.lastName||""}`.trim().length>0):[],h=m.length>0,p=m.flatMap(e=>(0,z.isImageObject)(e.profilePicture)?[{author:e,profilePicture:e.profilePicture}]:[]),f=d/2,x=d+(p.length-1)*f,b=p.length>0&&"noAuthorImages"!==s,g=48===d?"h-12 w-12":"h-8 w-8",v=48===d?"-space-x-6":"-space-x-4";return(0,t.jsxs)("div",{className:"flex items-center pt-2 pb-4","data-testid":"authors-container",children:[b&&(0,t.jsx)("div",{className:(0,r.cn)("mr-2 flex",v),style:{minWidth:`${x}px`},"data-testid":"author-images-container",children:p.map(({author:e,profilePicture:l},a)=>l?.url?(0,t.jsx)(O.default,{width:d,height:d,src:l.url,alt:`${e.firstName||""} ${e.lastName||""}`.trim(),className:(0,r.cn)("flatplan_authorImage my-0 rounded-full border-2 border-white object-cover",g),style:{zIndex:p.length-a},"data-flatplan-id":"flatplan_authorImage","data-testid":`author-image-${a}`,objectFit:"cover"},e.id):null)}),(0,t.jsxs)("div",{className:"inline","data-testid":"author-text-container",children:[(h||a)&&(0,t.jsx)(y.default,{variant:"Body.S",className:"mr-1 inline leading-[1rem]","data-testid":"by-text",elementType:"span",children:"By"}),m.map((e,a)=>{let i=`${e.firstName||""} ${e.lastName||""}`.trim(),n=e?e.bioUrl?e.bioUrl:e.slug?`/bios/${e.slug}`:null:null,r=a===m.length-1,s=a===m.length-2;return(0,t.jsxs)(l.default.Fragment,{children:[n?(0,t.jsx)(U.default,{href:n,"data-testid":`author-link-${a}`,children:(0,t.jsx)(y.default,{className:"flatplan_authorName inline leading-[1rem] underline",variant:"Body.S",elementType:"span","data-flatplan-id":"flatplan_authorName","data-testid":`author-name-linked-${a}`,children:i})}):(0,t.jsx)(y.default,{className:"flatplan_authorName inline leading-[1rem]",variant:"Body.S",elementType:"span","data-flatplan-id":"flatplan_authorName","data-testid":`author-name-${a}`,children:i}),!r&&(0,t.jsx)(y.default,{variant:"Body.S",elementType:"span",className:`inline leading-[1rem] ${s?"mx-1":"mr-1"}`,"data-testid":`author-separator-${a}`,children:s?"and":","})]},e.id)}),a&&(0,t.jsx)(y.default,{variant:"Body.S",elementType:"span",className:`inline leading-[1rem] ${h?"ml-1":""}`,"data-testid":"external-authors",children:h?`, ${a}`:a}),o&&(0,t.jsxs)(t.Fragment,{children:[(h||a)&&(0,t.jsx)(y.default,{variant:"Body.S",elementType:"span",color:"secondary",className:"mx-1 inline leading-[1rem]","data-testid":"date-separator",children:"•"}),(0,t.jsxs)("details",{className:"inline","data-testid":"update-date-details",children:[(0,t.jsx)("summary",{className:"inline cursor-pointer list-none","data-testid":"update-date-toggle",children:(0,t.jsx)(y.default,{variant:"Body.S",elementType:"span",color:"secondary",className:"inline leading-[1rem] whitespace-nowrap","data-testid":"update-date",children:o})}),(0,t.jsxs)("span",{className:"block","data-testid":"date-expanded",children:[c&&(0,t.jsxs)(y.default,{variant:"Body.S",elementType:"span",color:"secondary",className:"block leading-[1rem]","data-testid":"update-date-full",children:["Updated: ",c]}),u&&(0,t.jsxs)(y.default,{variant:"Body.S",elementType:"span",color:"secondary",className:"block leading-[1rem]","data-testid":"publish-date-full",children:["Published: ",u]})]})]})]})]})]})};var K=e.i(143911),Z=e.i(190228);let Q=({videos:e,className:i,autoplay:n=!0,showControls:d=!0,showTitle:w=!0,showDescription:k=!0,aspectRatio:N="16:9",playerId:S="QidSYgAw",placeHolder:T,posterPriority:_,isSamsung:A,limitedAccess:C=!1,shareCloseLabel:I})=>{let[P,B]=(0,a.useAtom)(j.selectedVideoAtom),$=(0,a.useAtomValue)(j.selectedPlaylistIdAtom),D=(0,V.useClientMobileMedia)(),M=`video-player-${(0,l.useId)()}`,L=(0,l.useRef)(!0),F=(0,x.useUser)()?.user||{},U=(0,a.useAtomValue)(R.adsDisabledAtom),z=F.isUserPremium||U,H=(0,f.useTrackVideoEvent)(),[O,X]=(0,l.useState)(!1),[J,W]=(0,l.useState)(!1),Q=(0,l.useRef)(P?.mediaid);(0,l.useEffect)(()=>{Q.current=P?.mediaid},[P]);let Y=(0,l.useCallback)(({event:e,player:t})=>{let l=e.item;Q.current!==l?.mediaid&&(B(l),window.history.pushState({playlistId:$,videoId:l.mediaid},"",l.link||""))},[$,B]),G=(0,l.useCallback)(({player:e})=>{let t=window?.ns_?.StreamingAnalytics?.JWPlayer;t&&t(e,{publisherId:"9576127"})},[]);if(!P)return null;let ee=[...h.adEvents,...p.metricEvents,{eventName:"playlistItem",callback:Y},{eventName:"ready",callback:G}].map(({eventName:e,callback:t})=>({eventName:e,callback:({event:e,player:l})=>t({event:e,player:l,isFirstPlayRef:L,user:F,trackVideoEvent:H,isMobile:D})}));return(0,t.jsxs)("div",{className:i,children:[(0,t.jsxs)("div",{className:(0,r.cn)("flatplan_mainMedia mb-4 overflow-hidden md:rounded-2xl",C&&"premium-gated relative"),"data-flatplan-id":"flatplan_mainMedia",children:[(0,t.jsx)(m.JWPlayer,{playlist:e,events:ee,options:{aspectratio:N,autostart:!C&&n,controls:!C&&d,displaytitle:!1,displaydescription:!1,width:"100%"},setupParams:{playerId:S,ads:!z},placeHolder:T,placeHolderImage:P?.image,posterPriority:_},M),C&&(0,t.jsx)(v.LimitedAccessOverlay,{variant:"cover"})]}),(0,t.jsxs)("div",{className:"flatplan_body @container mx-4 my-4 md:mx-0","data-flatplan-id":"flatplan_body",children:[P?.custom?.category&&(0,t.jsx)(y.default,{variant:"Body.S",elementType:"span",className:"flatplan_category mb-1 inline-block font-bold","data-flatplan-id":"flatplan_category","data-testid":"video-category",children:P.custom.category}),w&&P?.title&&(A?(0,t.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)(y.default,{variant:"Title.XL",elementType:"h1",className:"flatplan_header mb-2","data-flatplan-id":"flatplan_header","data-testid":"video-headline",children:P?.title}),(0,t.jsx)("span",{"aria-hidden":"true",className:"flatplan_mediaTitle sr-only","data-flatplan-id":"flatplan_mediaTitle",children:P?.title})]}),(D||P?.custom?.transcript)&&(0,t.jsxs)(g.Popover,{children:[(0,t.jsx)(g.PopoverTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button","aria-label":"Video options",className:"shrink-0 p-1 text-gray-700 focus-visible:outline focus-visible:outline-2 focus-visible:outline-blue-500",children:(0,t.jsx)(c,{className:"h-5 w-5","aria-hidden":"true"})})}),(0,t.jsxs)(g.PopoverContent,{align:"end",className:"w-40 p-1",children:[D&&(0,t.jsx)("button",{type:"button",onClick:()=>W(e=>!e),className:"block w-full rounded px-3 py-2 text-left text-sm hover:bg-gray-100",children:"Details"}),P?.custom?.transcript&&(0,t.jsx)("button",{type:"button",onClick:()=>X(e=>!e),className:"block w-full rounded px-3 py-2 text-left text-sm hover:bg-gray-100",children:"Transcript"})]})]})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(y.default,{variant:"Title.XL",elementType:"h1",className:"flatplan_header mb-2","data-flatplan-id":"flatplan_header","data-testid":"video-headline",children:P?.title}),(0,t.jsx)("span",{"aria-hidden":"true",className:"flatplan_mediaTitle sr-only","data-flatplan-id":"flatplan_mediaTitle",children:P?.title})]})),P?.custom?.publishDate&&(0,t.jsx)(q,{authors:P?.custom?.authors,externalAuthors:P?.custom?.externalAuthors,updateDate:P?.custom?.updateDate,publishedDate:P?.custom?.publishDate}),(A?!D||J:k)&&(P?.descriptionRichText||P?.description)&&(P?.descriptionRichText?(0,t.jsx)(y.default,{variant:"Body.M",elementType:"div",className:"flatplan_intro mb-4","data-flatplan-id":"flatplan_intro","data-testid":"video-description",children:(0,t.jsx)(E,{data:P.descriptionRichText})}):(0,t.jsx)(y.default,{variant:"Body.M",className:"flatplan_intro mb-4","data-flatplan-id":"flatplan_intro","data-testid":"video-description",children:(0,t.jsx)("span",{dangerouslySetInnerHTML:{__html:P?.description??""}})})),!A&&(0,t.jsxs)("div",{className:"flex flex-col gap-2 @md:flex-row",children:[P?.custom?.transcript&&(0,t.jsxs)(b.Button,{className:"flex items-center text-sm font-medium",variant:"outline",onClick:()=>X(!O),children:["Transcript"," ",O?(0,t.jsx)(o,{className:"ml-1 h-4 w-4"}):(0,t.jsx)(s.ChevronDown,{className:"ml-1 h-4 w-4"})]}),(0,t.jsx)(K.ViewCommentsButton,{articleId:P?.mediaid||"",isMobile:D}),(0,t.jsx)(Z.Share,{type:"video",title:P.title||"",closeLabel:I,imageUrl:P.image})]}),O&&P?.custom?.transcript&&(0,t.jsxs)("div",{className:"mt-4 rounded-lg bg-[#F4F4F4] p-4",children:[A&&(0,t.jsxs)("div",{className:"mb-2 flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-base font-bold text-gray-900",children:"Video Transcript"}),(0,t.jsx)("button",{type:"button","aria-label":"Close transcript",onClick:()=>X(!1),className:"text-gray-700 focus-visible:outline focus-visible:outline-2 focus-visible:outline-blue-500",children:(0,t.jsx)(u.X,{className:"h-5 w-5","aria-hidden":"true"})})]}),(0,t.jsx)("p",{className:"text-sm text-gray-700",children:P?.custom.transcript})]})]})]})};var Y=e.i(864943),G=e.i(77859);let ee=({id:e,title:l,thumbnail:a,duration:i,onClick:n,className:s,isCurrent:d,isNext:o,isFetchPriority:c,isSamsung:u,publishDate:m,locale:h})=>{let p=(0,V.useClientMobileMedia)()?"column":"row",f=()=>{n&&!d&&n(e)};if(u){let e=function(e,t="en-US"){if(!e)return"";let l=new Date(e);return Number.isNaN(l.getTime())?"":l.toLocaleDateString(t,{month:"2-digit",day:"2-digit",year:"numeric"})}(m,h);return(0,t.jsxs)("button",{type:"button",onClick:f,className:(0,r.cn)("flex w-full cursor-pointer gap-3 text-left",s),children:[(0,t.jsxs)("div",{className:"relative w-2/5 max-w-40 shrink-0 self-start overflow-hidden rounded-lg",children:[(0,t.jsx)(O.default,{src:a,alt:l,aspectRatio:"3/2",isFetchPriority:c}),i&&(0,t.jsx)("span",{className:"absolute bottom-1 left-1 rounded bg-black/75 px-1.5 py-0.5 text-[11px] font-semibold text-white",children:(0,G.truncateDuration)(i)})]}),(0,t.jsxs)("div",{className:"flex flex-1 flex-col",children:[d&&(0,t.jsx)("span",{"data-state":"now-playing",className:"text-xs font-bold tracking-wide text-blue-600 uppercase",children:"Now Playing"}),o&&(0,t.jsx)("span",{"data-state":"next-up",className:"text-xs font-bold tracking-wide text-gray-900 uppercase",children:"Next Up"}),(0,t.jsx)("span",{className:"line-clamp-3 text-sm font-normal text-gray-900",children:l}),e&&(0,t.jsx)("span",{className:"mt-auto text-xs text-gray-500 md:mt-1",children:e})]})]})}return(0,t.jsxs)(Y.MediaObject,{layout:p,onClick:f,className:(0,r.cn)("w-full gap-2",s),children:[(0,t.jsx)(Y.MediaObject.Image,{src:a,alt:l,aspectRatio:"3/2",layout:p,isFetchPriority:c}),(0,t.jsxs)(Y.MediaObject.Content,{className:"flex-1",children:[d&&(0,t.jsx)(y.default,{variant:"Body.S.Bold",color:"brandLight","data-state":"now-playing",children:"Now Playing"}),o&&(0,t.jsx)(y.default,{variant:"Body.S.Bold",color:"brandLight","data-state":"next-up",children:"Next Up"}),(0,t.jsx)(Y.MediaObject.Title,{className:"mb-0",textSize:"sm",title:l,lineClamp:4,responsive:!0}),(0,t.jsx)(Y.MediaObject.Duration,{textSize:"sm",duration:i,responsive:!0})]})]})};e.i(349882);var et=e.i(495406),el=e.i(997793);let ea=({videos:e,className:i,isSamsung:n,locale:s})=>{let[d,o]=(0,a.useAtom)(j.selectedPlaylistIdAtom),c=(0,a.useAtomValue)(j.selectedVideoAtom),u=(0,a.useAtomValue)(j.jwPlayerPlaylistIdAtom),m=(()=>{let[e,t]=(0,a.useAtom)(j.jwPlayerPlaylistIdAtom),i=(0,a.useSetAtom)(j.selectedVideoAtom);return(0,l.useCallback)((l,a,n,r=!0)=>{if(e){let s=window?.jwplayer?.();a!==e&&l&&(t(a),s.load(l));let d=l.findIndex(e=>e.mediaid===n);if(d>=0){let e=l[d];r&&e?.link&&window.history.pushState({playlistId:a,videoId:n},"",e.link),i(e),s.playlistItem(d)}}},[e,t,i])})(),[h,p]=(0,l.useState)(),[f,x]=(0,l.useState)(e?.[0]?.mediaid||null),[b,g]=(0,l.useState)(e?.[1]?.mediaid||null);(0,l.useEffect)(()=>{if(!e.length)return;h&&d&&(m(e,d,h,!1),p(null));let t=t=>{let{playlistId:l,videoId:a}=t.state??{};d!==l?(o(l),p(a)):m(e,l,a,!1)};return window.addEventListener("popstate",t),()=>window.removeEventListener("popstate",t)},[e,m,h,d,o]),(0,l.useEffect)(()=>{if(!e.length||!c){x(null),g(null);return}let t=c.mediaid||"";if(x(t),u===d){let l=e.findIndex(e=>(e.mediaid||e.file||"")===t);if(-1!==l&&l+1{e.length&&d&&m(e,d,t)},v=(0,r.cn)("grid gap-2 w-full","grid-cols-1","max-sm:pb-6 max-h-full",i);return e.length?(0,t.jsx)("div",{className:v,children:e.map((e,l)=>{let a=e.mediaid||e.file||"",i=a===f,r=a===b,d=(e=>{switch(e){case 1:return"MW_Position_ContentFeedAd1";case 2:return"WX_ContentFeed1";case 3:return"MW_Position_ContentFeedAd11";default:return}})(l);return(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)(el.AssetAnalytics,{contentId:a,assetMediaType:"video",title:e.title||"",position:l+1,children:(0,t.jsx)(ee,{id:a,title:e.title||"",thumbnail:e.image||"",duration:e.custom?.duration||"",publishDate:e.custom?.publishDate,onClick:y,isCurrent:i,isNext:r,isFetchPriority:0===l,isSamsung:n,locale:s})}),d&&(0,t.jsx)(et.AdBlock,{adId:d})]},a)})}):(0,t.jsx)("div",{className:"flex items-center justify-center p-8 text-gray-500",children:"No videos available"})};var ei=e.i(341669);let en=({className:e,rows:l=4})=>(0,t.jsx)("div",{className:(0,r.cn)("grid w-full grid-cols-1 gap-2",e),children:Array.from({length:l},(e,l)=>(0,t.jsxs)("div",{className:"flex flex-row gap-3",children:[(0,t.jsx)(ei.default,{skeletonClassName:"h-16 w-28 shrink-0"}),(0,t.jsxs)("div",{className:"flex flex-1 flex-col gap-2 py-1",children:[(0,t.jsx)(ei.default,{skeletonClassName:"h-3 w-full"}),(0,t.jsx)(ei.default,{skeletonClassName:"h-3 w-2/3"})]})]},l))});var er=e.i(626923),es=e.i(747961);let ed=(0,l.forwardRef)(({title:e,titleId:l,desc:a,descId:i,...n},r)=>(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",ref:r,"aria-labelledby":l,"aria-describedby":i,...n,children:[a?(0,t.jsx)("desc",{id:i,children:a}):null,void 0===e?(0,t.jsx)("title",{id:l,children:"Settings Adjust"}):e?(0,t.jsx)("title",{id:l,children:e}):null,(0,t.jsx)("g",{fill:"currentColor",children:(0,t.jsx)("path",{d:"M15 4h-2.05c-.25-1.15-1.25-2-2.45-2s-2.2.85-2.45 2H1v1h7.05C8.3 6.15 9.3 7 10.5 7s2.2-.85 2.45-2H15zm-4.5 2C9.65 6 9 5.35 9 4.5S9.65 3 10.5 3s1.5.65 1.5 1.5S11.35 6 10.5 6M1 12h2.05c.25 1.15 1.25 2 2.45 2s2.2-.85 2.45-2H15v-1H7.95C7.7 9.85 6.7 9 5.5 9s-2.2.85-2.45 2H1zm4.5-2c.85 0 1.5.65 1.5 1.5S6.35 13 5.5 13 4 12.35 4 11.5 4.65 10 5.5 10"})})]})),eo=l.default.forwardRef((e,l)=>(0,t.jsx)(es.BaseIcon,{ref:l,icon:ed,...e}));eo.displayName="SettingsAdjust";let ec=({tabs:e,defaultActiveTab:a,onTabChange:i,size:n="small",showFilterIcon:s,className:d,innerTabsClass:o})=>{let[c,u]=(0,l.useState)(a||e?.[0]?.id||""),m=e=>{u(e),i&&i(e)},h={"h-10":"small"===n,"h-12":"large"===n};return(0,t.jsxs)(er.Tabs,{value:c,onValueChange:m,className:(0,r.cn)("w-full",d),children:[(0,t.jsxs)("div",{className:(0,r.cn)("flex items-center gap-2","small"===n?"h-10":"h-14"),children:[s&&(0,t.jsx)("div",{className:(0,r.cn)("flex aspect-square shrink-0 items-center justify-center rounded-lg bg-gray-100",h),children:(0,t.jsx)(eo,{className:(0,r.cn)("text-gray-600",{"h-4 w-4":"small"===n,"h-5 w-5":"large"===n})})}),(0,t.jsx)("div",{className:"scrollbar-hide overflow-x-scroll",children:(0,t.jsx)(er.TabsList,{className:(0,r.cn)("flex w-fit gap-2 bg-transparent p-0",h,o),children:e.map(e=>(0,t.jsx)(er.TabsTrigger,{value:e.id,tabIndex:0,onFocus:e=>e.preventDefault(),onKeyDown:t=>{var l;return l=e.id,void(("Enter"===t.key||" "===t.key)&&(t.preventDefault(),m(l)))},className:(0,r.cn)("flex-shrink-0 cursor-pointer rounded-lg py-3 whitespace-nowrap","data-[state=active]:bg-brand-400 data-[state=active]:text-white","data-[state=inactive]:bg-gray-100 data-[state=inactive]:text-gray-600",{"px-3 text-sm":"small"===n,"px-4 text-base":"large"===n}),children:e.label},e.id))})})]}),(0,t.jsx)("div",{children:e.map(e=>(0,t.jsx)(er.TabsContent,{value:e.id,children:e.content},e.id))})]})},eu=({tabs:e,className:l,innerTabsClass:i})=>{let[n,r]=(0,a.useAtom)(j.selectedPlaylistIdAtom),s=e.map(e=>({id:e.id,label:e.title}));return(0,t.jsx)(ec,{tabs:s,defaultActiveTab:n,onTabChange:r,className:l,innerTabsClass:i})};var em=e.i(381477),eh=e.i(97506);e.i(304158);var ep=e.i(485737);let ef=(0,P.createLogger)("useVideosPlaylistTab");e.s(["VideosWithPlaylistsClient",0,({tabs:e,playerId:s,isSamsung:d,locale:o,limitedAccess:c,channel:u,deviceClass:m,shareCloseLabel:h})=>{let p=e[0];(0,i.useHydrateAtoms)([[j.selectedVideoAtom,p?.videos[0]],[j.selectedPlaylistIdAtom,p?.id],[j.jwPlayerPlaylistIdAtom,p?.id]]);let[f,x]=(0,a.useAtom)(j.selectedPlaylistIdAtom),b=(0,l.useMemo)(()=>e.find(e=>e.id===f)??p,[e,f,p]),g=b?.videosResolved===!1,{videos:y}=function({contentQueryId:e,enabled:t,channel:i,language:n="en-US",deviceClass:r="desktop"}){let s=(0,a.useAtomValue)(ep.geoipCountry)||void 0,d=t&&e&&i?["videos-playlist-tab",e,i,s,n]:null,{data:o,isLoading:c,error:u}=(0,em.default)(d,()=>(0,eh.getContentQueryMedia)({queryId:e,channel:i,territory:s,language:n}),{dedupingInterval:3e5,revalidateOnFocus:!1,keepPreviousData:!0});return(0,l.useEffect)(()=>{u&&ef.error("videos playlist tab fetch failed",{id:e,error:u})},[u,e]),{videos:t&&e&&i&&!u?o?o.filter(e=>"video"===e.type).map(e=>(function(e,t="desktop"){let l,a=String(e.id??""),i=String(e.headline??e.title??""),n=e.overrideTitle||"",r=e.description||e.caption||"",s=e.overrideDescription||"",d=String(e.assetName??""),o=String(e.url??d),c=String(e.jwpmediaid??""),u=String(e.duration??""),m=e.adsmetrics?.adzone,h=e.webVideoData??{},p=h.web??"",f=h.mweb??p;return{file:"desktop"===t?p:f,sources:[{file:p},{file:f}],image:(l=e.overrideThumbnail||e.thumbnail||e.image||"")?`${l}?crop=16:9&format=pjpg&auto=webp&quality=60&width=640`:"",title:n||i,description:s||r,mediaid:c||a,link:d,custom:{url:o,duration:function(e){if(!e)return"00:00";let t=e.split(":");if(3===t.length){let[l,a,i]=t;return l&&+l?e:`${a}:${i}`}return e}(u),publishDate:e.publishdate||e.lastmodifieddate||void 0,ctx:{pcollid:String(e.pcollid??""),adzone:m??"",assetName:d,premium:!1,tagsGeo:[],tagsStorm:[],providername:String(e.providername??"no-provider-data"),publishdate:String(e.publishdate??""),createddate:String(e.createddate??"").slice(0,10),lastmodifieddate:String(e.lastmodifieddate??""),duration:u,id:a,cmsUrl:d,videoIndex:-1,videoId:a,aspectRatio:e.aspectRatio}}}})(e,r)):null:[],isLoading:c,error:u}}({contentQueryId:g?b.id:null,enabled:g,channel:u,deviceClass:m,language:o}),v=g?y??[]:b?.videos??[],w=g&&null===y,k=(0,l.useMemo)(()=>e.map(e=>({label:e.title,slug:e.id})),[e]),N=(0,l.useMemo)(()=>{let t=e.findIndex(e=>e.id===f);return -1!==t?t:0},[e,f]),S=(0,l.useCallback)(t=>{let l=e[t];l&&x(l.id)},[e,x]);return e.length?(0,t.jsxs)("div",{className:(0,r.cn)("-mt-1 bg-white"),children:[!d&&(0,t.jsx)("div",{className:"hidden md:block",children:(0,t.jsx)(n.SubnavigationUI,{links:k,activeIndex:N,onSelect:S,constrained:!1,className:"mb-4 inline-block"})}),(0,t.jsxs)("div",{className:"flex flex-col md:grid md:grid-cols-[1fr_300px] md:gap-4",children:[(0,t.jsx)("div",{className:(0,r.cn)("md:border-b-0",!d&&"border-b border-gray-200"),children:(0,t.jsx)(Q,{videos:v,className:"md:pr-4",showTitle:!0,showDescription:!0,playerId:s,placeHolder:!0,posterPriority:!0,isSamsung:d,limitedAccess:c,shareCloseLabel:h})}),(0,t.jsx)("div",{className:"md:hidden",children:(0,t.jsx)(eu,{tabs:e,className:"my-4",innerTabsClass:"mx-4"})}),(0,t.jsx)("div",{className:"w-full md:relative md:overflow-hidden md:border-l md:border-gray-100",children:d?(0,t.jsxs)("div",{className:"md:absolute md:inset-0 md:flex md:flex-col md:pl-[18px]",children:[(0,t.jsx)("div",{className:"mb-4 hidden md:block",children:(0,t.jsx)(eu,{tabs:e})}),w?(0,t.jsx)(en,{className:"px-4 md:px-0"}):(0,t.jsx)(ea,{videos:v,isSamsung:!0,locale:o,className:"px-4 md:min-h-0 md:flex-1 md:content-start md:overflow-auto md:px-0"})]}):w?(0,t.jsx)(en,{className:"px-4 md:px-0"}):(0,t.jsx)(ea,{videos:v,className:"px-4 md:absolute md:overflow-auto md:px-0"})})]})]}):null}],268056)},822342,function(e){e.n(e.i(268056))}]);