PageSourceSearch

https://www.rmpbs.org/_next/static/chunks/410.869f42099016bccd.js

js rmpbs.org collected 2026-10-02 03:38:44 UTC 47,321 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[410],{30410:function(e,t,l){"use strict";l.r(t),l.d(t,{Schedule:function(){return eA}});var n=l(81673),a=l(86401),i=l(99435),r=l(60617),o=l(63372),s=l(37046);function d(e,t){let l=(0,a.useRef)(null),n=(0,a.useRef)(t);return n.current=t,(0,a.useEffect)(()=>{var t;if(!e)return;let a=l.current;if(!a)return;let i=document.activeElement,r=()=>Array.from(a.querySelectorAll('a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])')).filter(e=>null!==e.offsetParent||e===document.activeElement);(null!==(t=r()[0])&&void 0!==t?t:a).focus();let o=e=>{if("Escape"===e.key){var t;null===(t=n.current)||void 0===t||t.call(n)}else"Tab"===e.key&&function(e,t){var l;if(0===t.length){e.preventDefault();return}let n=t[0],a=null!==(l=t.at(-1))&&void 0!==l?l:n,i=document.activeElement;e.shiftKey&&i===n?(e.preventDefault(),a.focus()):e.shiftKey||i!==a||(e.preventDefault(),n.focus())}(e,r())};return a.addEventListener("keydown",o),()=>{var e;a.removeEventListener("keydown",o),null==i||null===(e=i.focus)||void 0===e||e.call(i)}},[e]),l}let c=0;function u(e){let t=(0,a.useRef)(null);(0,a.useEffect)(()=>{if(e)return 0===c&&(t.current={scrollY:window.scrollY,bodyOverflow:document.body.style.overflow,bodyPosition:document.body.style.position,bodyTop:document.body.style.top,bodyWidth:document.body.style.width,documentOverflow:document.documentElement.style.overflow},document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top="-".concat(t.current.scrollY,"px"),document.body.style.width="100%",document.documentElement.style.overflow="hidden"),c+=1,()=>{if((c-=1)>0)return;let e=t.current;e&&(document.body.style.overflow=e.bodyOverflow,document.body.style.position=e.bodyPosition,document.body.style.top=e.bodyTop,document.body.style.width=e.bodyWidth,document.documentElement.style.overflow=e.documentOverflow,window.scrollTo(0,e.scrollY),t.current=null)}},[e])}let m=[{id:"now",label:"Now",hour:null},{id:"early",label:"Early morning",hour:0},{id:"morning",label:"Morning",hour:6},{id:"afternoon",label:"Afternoon",hour:12},{id:"evening",label:"Evening",hour:18}],p=m.map(e=>e.id),h=e=>null!=e&&p.includes(e);l(48131);var _=l(47130),g=l.n(_);let b=e=>e.toLocaleDateString("en-US",{weekday:"short",month:"short",day:"numeric",year:"numeric"}),v=m.filter(e=>"now"!==e.id),x=e=>e.toLocaleDateString("en-US",{weekday:"short"}).toUpperCase(),f=e=>e.toLocaleDateString("en-US",{month:"long",year:"numeric"}),w=(e,t)=>new Date(e.getFullYear(),e.getMonth()+t,1),j=(0,a.memo)(function(e){let{selected:t,onSelect:l,activeStage:i,onConfirm:r,onStageChange:c,triggerLabel:m}=e,[p,h]=(0,a.useState)(!1),[_,j]=(0,a.useState)(t),[N,k]=(0,a.useState)(i&&"now"!==i?i:null),[y,T]=(0,a.useState)(t),[C,S]=(0,a.useState)(null),[L,B]=(0,a.useState)(!1),E=(0,a.useRef)(null),M=(0,a.useRef)(null),I=d(p&&L,()=>h(!1));(0,a.useEffect)(()=>{S(document.body)},[]),(0,a.useEffect)(()=>{let e=window.matchMedia("(width <= 768px)"),t=()=>B(e.matches);return t(),e.addEventListener("change",t),()=>e.removeEventListener("change",t)},[]),u(p&&L),(0,a.useEffect)(()=>{p&&(j(t),T(t),k(i&&"now"!==i?i:null))},[p,t,i]),(0,a.useEffect)(()=>{if(!p)return;let e=e=>{var t,l;let n=e.target;(null===(t=E.current)||void 0===t?void 0:t.contains(n))||(null===(l=M.current)||void 0===l?void 0:l.contains(n))||h(!1)},t=setTimeout(()=>document.addEventListener("mousedown",e),0);return()=>{clearTimeout(t),document.removeEventListener("mousedown",e)}},[p]),(0,a.useEffect)(()=>{if(!p)return;let e=e=>{"Escape"===e.key&&h(!1)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[p]);let D=()=>{if(r){r(_,N),h(!1);return}l(_),N&&c&&c(N),h(!1)},R=(0,n.jsxs)("div",{role:"dialog","aria-label":"Choose date and time",className:g().popover,children:[(0,n.jsxs)("div",{className:g().desktopCalendarHeader,children:[(0,n.jsx)("button",{type:"button","aria-label":"Previous month",className:g().desktopMonthButton,onClick:()=>T(e=>w(e,-1)),children:(0,n.jsx)("svg",{"aria-hidden":"true",width:"30",height:"30",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",children:(0,n.jsx)("polyline",{points:"15 18 9 12 15 6"})})}),(0,n.jsx)("span",{className:g().desktopMonthLabel,children:f(y)}),(0,n.jsx)("button",{type:"button","aria-label":"Next month",className:g().desktopMonthButton,onClick:()=>T(e=>w(e,1)),children:(0,n.jsx)("svg",{"aria-hidden":"true",width:"30",height:"30",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",children:(0,n.jsx)("polyline",{points:"9 18 15 12 9 6"})})})]}),(0,n.jsx)("div",{className:g().desktopStageGroup,role:"radiogroup","aria-label":"Day stage",children:v.map(e=>{let t=e.id===N;return(0,n.jsx)("button",{type:"button",role:"radio","aria-checked":t,onClick:()=>k(e.id),className:[g().desktopStageButton,t?g().desktopStageButtonActive:""].filter(
1Boolean).join(" "),children:e.label},e.id)})}),(0,n.jsx)(o._,{mode:"single",month:y,onMonthChange:T,selected:_,onSelect:e=>{e&&j(e)},disabled:{before:new Date},formatters:{formatWeekdayName:x},hideNavigation:!0,showOutsideDays:!0,className:g().calendar}),(0,n.jsxs)("button",{type:"button",className:g().desktopContinueBtn,onClick:D,children:["Continue",(0,n.jsx)("svg",{"aria-hidden":"true",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:(0,n.jsx)("polyline",{points:"9 18 15 12 9 6"})})]})]}),W=(0,n.jsx)("div",{ref:I,role:"dialog","aria-label":"Select time","aria-modal":"true",className:g().mobileModal,children:(0,n.jsxs)("div",{ref:M,className:g().mobileModalInner,children:[(0,n.jsxs)("div",{className:g().mobileModalHeader,children:[(0,n.jsx)("span",{className:g().mobileModalTitle,children:"Select time"}),(0,n.jsx)("button",{type:"button","aria-label":"Close",className:g().mobileModalClose,onClick:()=>h(!1),children:(0,n.jsxs)("svg",{"aria-hidden":"true",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[(0,n.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,n.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),(0,n.jsx)("div",{className:g().mobileCalendar,children:(0,n.jsx)(o._,{mode:"single",selected:_,onSelect:e=>{e&&j(e)},formatters:{formatWeekdayName:x},navLayout:"around",className:g().mobileDayPicker,showOutsideDays:!0,disabled:{before:new Date}})}),(0,n.jsx)("div",{className:g().stageGrid,children:v.map(e=>{let t=e.id===N;return(0,n.jsxs)("button",{type:"button",onClick:()=>k(e.id),className:[g().stageTile,t?g().stageTileActive:""].filter(Boolean).join(" "),children:[e.label,t&&(0,n.jsx)("svg",{"aria-hidden":"true",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:(0,n.jsx)("polyline",{points:"20 6 9 17 4 12"})})]},e.id)})}),(0,n.jsxs)("button",{type:"button",className:g().continueBtn,onClick:D,children:["Continue",(0,n.jsx)("svg",{"aria-hidden":"true",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:(0,n.jsx)("polyline",{points:"9 18 15 12 9 6"})})]})]})});return(0,n.jsxs)("div",{ref:E,className:g().container,children:[(0,n.jsxs)("button",{type:"button",onClick:()=>h(e=>!e),"aria-expanded":p,"aria-haspopup":"dialog",className:g().trigger,children:[(0,n.jsx)("span",{children:p?"Close Calendar":null!=m?m:b(t)}),(0,n.jsx)("svg",{"aria-hidden":"true",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:[g().chevron,p?g().open:""].filter(Boolean).join(" "),children:(0,n.jsx)("polyline",{points:"6 9 12 15 18 9"})})]}),p&&!L&&R,p&&L&&(C?(0,s.createPortal)(W,C):W)]})});var N=l(67818),k=l(84397);let y={PX_PER_MINUTE:12,SLOT_MINUTES:30,CHANNEL_COL_WIDTH:137,ROW_HEIGHT:160,ROW_GAP:4,RULER_HEIGHT:48,RULER_MARGIN_Y:12};y.SLOT_MINUTES,y.PX_PER_MINUTE;let T=(e,t)=>(t.getTime()-e.getTime())/6e4,C=(e,t)=>T(t,e)*y.PX_PER_MINUTE,S=e=>C(e.end,e.start),L=(e,t)=>{let l=new Date(e);return l.setSeconds(0,0),l.setMinutes(Math.floor(l.getMinutes()/t)*t),l},B=(e,t)=>{let l=[],n=new Date(L(e.start,t));for(n<e.start&&n.setMinutes(n.getMinutes()+t);n<=e.end;)l.push(new Date(n)),n.setMinutes(n.getMinutes()+t);return l},E=(e,t)=>{if(e.end<=t.start||e.start>=t.end)return null;let l=e.start<t.start,n=e.end>t.end,a=l?t.start:e.start,i=n?t.end:e.end,r=C(a,t.start),o=T(a,i)*y.PX_PER_MINUTE,s="none";return l&&n?s="both":l?s="start":n&&(s="end"),{...e,left:r,width:o,clipped:s}},M=(e,t)=>{let l=new Map;for(let a of e){var n;let e=E(a,t);
1if(!e)continue;let i=null!==(n=l.get(a.channelId))&&void 0!==n?n:[];i.push(e),l.set(a.channelId,i)}for(let e of l.values())e.sort((e,t)=>e.start.getTime()-t.start.getTime());return l},I=e=>e.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0,timeZone:N.G}),D=(e,t)=>{let l=Math.max(0,Math.round(T(e,t))),n=Math.floor(l/60),a=l%60;return 0===n?"".concat(a,"m"):0===a?"".concat(n,"h"):"".concat(n,"h ").concat(a,"m")},R=e=>{let t=new Date(e),l=(0,k.Z)(t,N.G);return{start:t,end:new Date((0,i.Z)(new Date(l.getFullYear(),l.getMonth(),l.getDate()+1,0,0,0,0),N.G).getTime()-1)}};var W=l(94296),P=l.n(W);let A={weekday:"long",month:"long",day:"numeric",year:"numeric",timeZone:N.G},H=(0,a.memo)(function(e){let{channels:t,programsByChannel:l,date:a}=e;return(0,n.jsxs)("div",{className:P().printView,"aria-hidden":"true",children:[(0,n.jsxs)("header",{className:P().header,children:[(0,n.jsx)("h2",{className:P().title,children:"RMPBS TV Schedule"}),(0,n.jsx)("p",{className:P().date,children:a.toLocaleDateString("en-US",A)}),(0,n.jsx)("p",{className:P().timezone,children:"All times Mountain Time (MT)"})]}),t.map(e=>{var t;let a=null!==(t=l.get(e.id))&&void 0!==t?t:[];return 0===a.length?null:(0,n.jsxs)("section",{className:P().channelSection,children:[(0,n.jsx)("h3",{className:P().channelName,children:e.name}),(0,n.jsxs)("table",{className:P().table,children:[(0,n.jsx)("thead",{children:(0,n.jsxs)("tr",{children:[(0,n.jsx)("th",{scope:"col",children:"Time"}),(0,n.jsx)("th",{scope:"col",children:"Program"})]})}),(0,n.jsx)("tbody",{children:a.map(e=>{let t=function(e){var t,l;let n=[];return(null===(t=e.metadata)||void 0===t?void 0:t.hd)&&n.push("HD"),(null===(l=e.metadata)||void 0===l?void 0:l.cc)&&n.push("CC"),n.join(" ")}(e),l=function(e){let{metadata:t}=e;return(null==t?void 0:t.seasonNumber)&&t.episodeNumber?"Season ".concat(t.seasonNumber,", Episode ").concat(t.episodeNumber):(null==t?void 0:t.episodeTitle)?t.episodeTitle:(null==t?void 0:t.type)?t.type.charAt(0).toUpperCase()+t.type.slice(1):""}(e);return(0,n.jsxs)("tr",{children:[(0,n.jsxs)("td",{className:P().timeCell,children:[I(e.start)," – ",I(e.end),(0,n.jsx)("span",{className:P().duration,children:D(e.start,e.end)})]}),(0,n.jsxs)("td",{className:P().programCell,children:[(0,n.jsxs)("span",{className:P().programTitle,children:[e.title,t?(0,n.jsxs)("span",{className:P().badges,children:[" ",t]}):null]}),l?(0,n.jsx)("span",{className:P().series,children:l}):null,e.description?(0,n.jsx)("span",{className:P().description,children:e.description}):null]})]},e.id)})})]})]},e.id)})]})});var O=l(81404),U=l.n(O);let G=(0,a.memo)(function(e){var t,l;let{activeStage:i,onStageChange:r}=e,o=m.find(e=>"now"===e.id),s=m.filter(e=>"now"!==e.id),[d,c]=(0,a.useState)(!1),u=(0,a.useRef)(null),p=null!==(l=null===(t=m.find(e=>e.id===i))||void 0===t?void 0:t.label)&&void 0!==l?l:"Now";(0,a.useEffect)(()=>{if(!d)return;let e=e=>{u.current&&!u.current.contains(e.target)&&c(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[d]);let h=(0,a.useCallback)(e=>{r(e),c(!1)},[r]);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{role:"group","aria-label":"Jump to time of day",className:U().pillList,children:[o&&(0,n.jsxs)("button",{type:"button","aria-pressed":"now"===i,onClick:()=>r("now"),className:[U().pill,"now"===i?U().pillActive:""].filter(Boolean).join(" "),children:[(0,n.jsx)("span",{"aria-hidden":"true",className:U().nowDot}),o.label]}),(0,n.jsx)("div",{className:U().group,children:s.map((e,t)=>{let l=e.id===i;return(0,n.jsxs)("div",{className:U().groupItem,children:[t>0&&(0,n.jsx)("span",{"aria-hidden":"true",className:U().divider}),(0,n.jsx)("button",{type:"button","aria-pressed":l,onClick:()=>r(e.id),className:[U().groupPill,l?U().pillActive:""].filter(Boolean).join(" "),children:e.label})]},e.id)})})]}),(0,n.jsxs)("div",{className:U().mobileWrapper,ref:u,children:[(0,n.jsxs)("div",{className:U().mobileDropdownContainer,children:[(0,n.jsxs)("button",{type:"button","aria-haspopup":"menu","aria-expanded":d,className:[U().mobileTrigger,"now"===i?U().mobileTriggerNow:""].filter(
1Boolean).join(" "),onClick:()=>c(e=>!e),children:["now"===i&&(0,n.jsx)("span",{"aria-hidden":"true",className:U().nowDot}),p,(0,n.jsx)("svg",{"aria-hidden":"true",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:d?U().chevronOpen:"",children:(0,n.jsx)("polyline",{points:"6 9 12 15 18 9"})})]}),d&&(0,n.jsx)("ul",{role:"menu","aria-label":"Jump to time of day",className:U().dropdown,children:m.map(e=>(0,n.jsx)("li",{role:"none",children:(0,n.jsxs)("button",{type:"button",role:"menuitemradio","aria-checked":e.id===i,onClick:()=>h(e.id),className:[U().dropdownItem,e.id===i?U().dropdownItemActive:""].filter(Boolean).join(" "),children:["now"===e.id&&(0,n.jsx)("span",{"aria-hidden":"true",className:U().nowDot}),e.label]})},e.id))})]}),"now"!==i&&(0,n.jsxs)("button",{type:"button",className:U().backToNow,onClick:()=>r("now"),children:[(0,n.jsx)("span",{"aria-hidden":"true",className:U().nowDot}),"Back to Now"]})]})]})});var Y=l(88786),Z=l(71063),F=l(68917);let z=["Apple","Google","iCal","Microsoft365","Outlook.com","Yahoo"],V=e=>{let t=e.getFullYear(),l=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0");return"".concat(t,"-").concat(l,"-").concat(n)},X=e=>{let t=String(e.getHours()).padStart(2,"0"),l=String(e.getMinutes()).padStart(2,"0");return"".concat(t,":").concat(l)},J=e=>e.replaceAll(/[^\dA-Za-z-]+/g,"-").replaceAll(/(^-|-$)/g,"");function K(e,t){(0,F.x)({name:e.title,description:e.description,startDate:V(e.start),startTime:X(e.start),endDate:V(e.end),endTime:X(e.end),timeZone:"America/Denver",options:z,optionsMobile:z,iCalFileName:J(e.title),listStyle:"modal",hideIconList:!0,hideBranding:!0,hideCheckmark:!0,styleLight:"--base-font-size-l:14px;--base-font-size-m:14px;--base-font-size-s:14px;--font:inherit;--accent-color:#0a145a;--list-background:#fff;--list-hover-background:#f0f2fa;--list-text:#0a145a;--list-hover-text:#0a145a;--list-close-background:#f7f7f4;--list-close-text:#0a145a;--list-border-radius:12px;--list-padding:12px 16px;--list-font-weight:600;--list-shadow:0 12px 32px rgb(11 17 59 / 18%);--list-modal-shadow:0 12px 32px rgb(11 17 59 / 18%);--overlay-background:rgb(11 17 59 / 18%);--modal-background:#fff;--modal-text:#0a145a;--modal-border-radius:12px;--modal-shadow:drop-shadow(0 12px 32px rgb(11 17 59 / 18%))"},t)}var q=l(11736),Q=l.n(q);let $=(0,a.memo)(function(e){var t;let{program:l,channelName:a,isSelected:i,now:r,onSelect:o}=e,{left:s,width:d,title:c,clipped:u}=l,m=function(e){let{metadata:t,start:l,end:n}=e,a=[];(null==t?void 0:t.seasonNumber)&&t.episodeNumber?a.push("Season ".concat(t.seasonNumber," Episode ").concat(t.episodeNumber)):(null==t?void 0:t.type)&&a.push(t.type.charAt(0).toUpperCase()+t.type.slice(1)),a.push(D(l,n));let i=[];return(null==t?void 0:t.hd)&&i.push("HD"),(null==t?void 0:t.cc)&&i.push("CC"),i.length>0&&a.push(i.join(" ")),a.join(" | ")}(l),p=null!==r&&r<l.start,h=null!==r&&!p&&r<l.end;return(0,n.jsxs)("div",{role:"gridcell",className:Q().blockWrapper,style:{left:s,width:Math.max(d-4,24),borderLeftStyle:"start"===u||"both"===u?"dashed":"solid",borderRightStyle:"end"===u||"both"===u?"dashed":"solid"},children:[(0,n.jsxs)("button",{type:"button",onClick:()=>o(l.id),"aria-pressed":i,className:[Q().block,h?Q().blockLive:"",i?Q().blockSelected:""].filter(Boolean).join(" "),children:[(0,n.jsxs)("span",{className:Q().srOnly,children:[a,": "]}),(0,n.jsxs)("div",{className:Q().time,children:[I(l.start)," – ",I(l.end)]}),(0,n.jsxs)("div",{className:Q().bottom,children:[(0,n.jsx)("div",{className:Q().title,children:c}),(null===(t=l.metadata)||void 0===t?void 0:t.episodeTitle)&&(0,n.jsx)("div",{className:Q().episodeTitle,children:l.metadata.episodeTitle}),(0,n.jsx)("div",{className:Q().meta,children:m})]}),h&&(0,n.jsx)("span",{className:Q().srOnly,children:", now airing"})]}),p&&(0,n.jsx)("button",{type:"button",className:Q().calendarBtn,"data-drag-scroll-ignore":"true","aria-label":"Add ".concat(c," to calendar"),onClick:e=>{e.stopPropagation(),K(l,e.currentTarget)},children:(0,n.jsxs)("svg",{"aria-hidden":"true",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,n.jsx)("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",ry:"2"}),(0,n.jsx)("line",{x1:"16",y1:"2",x2:"16",y2:"6"}),(0,n.jsx)("line",{x1:"8",y1:"2",x2:"8",y2:"6"}),(0,n.jsx)("line",{x1:"3",y1:"10",x2:"21",y2:"10"})]})})]})});var ee=l(18226),et=l.n(ee);let el={DT:"rmpbs",DT2:"pbs-kids",DT3:"create-tv",DT4:"world-channel"},en=(0,a.memo)(function(e){var t;let{channel:l,rowIndex:a,programs:i,width:r,selectedId:o,now:s,onSelect:d}=e,c=null!==(t=l.slug)&&void 0!==t?t:el[l.id],u=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:et().channelLogoWrapper,children:l.logo?(0,n.jsx)(Y.default,{src:l.logo,alt:"",width:80,height:48,className:et().channelLogo}):(0,n.jsx)("span",{className:et().channelName,children:l.name})}),(0,n.jsx)("span",{className:et().channelBanner,children:l.name})]});return(0,n.jsxs)("div",{role:"row","aria-rowindex":a,className:et().row,style:{height:y.ROW_HEIGHT},children:[(0,n.jsx)("div",{role:"rowheader","aria-colindex":1,className:et().channelLabelWrapper,children:c?(0,n.jsx)(Z.default,{href:"/live/".concat(c),className:et().channelLabel,"aria-label":"".concat(l.name,", live"),children:u}):(0,n.jsx)("div",{className:et().channelLabel,children:u})}),(0,n.jsx)("div",{role:"presentation",className:et().programTrack,style:{width:r},children:i.map(e=>(0,n.jsx)($,{program:e,channelName:l.name,isSelected:o===e.id,now:s,onSelect:d},e.id))})]})});var ea=l(51974),ei=l(62165),er=l(32162),eo=l(56663),es=l(30760),ed=l(61548);let ec=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:6e4,[t,l]=(0,a.useState)(null);return(0,a.useEffect)(()=>{let t;l(new Date);let n=setTimeout(()=>{l(new Date),t=setInterval(()=>l(new Date),e)},6e4-Date.now()%6e4);return()=>{clearTimeout(n),t&&clearInterval(t)}},[e]),t};var eu=l(39319),em=l.n(eu);let ep={DT:"rmpbs",DT2:"pbs-kids",DT3:"create-tv",DT4:"world-channel"};function eh(e){let{url:t,title:l}=e,{copy:i}=(0,ed.m)(),[r,o]=(0,a.useState)(!1),s=async()=>{await i(t)&&(o(!0),window.setTimeout(()=>
1o(!1),2e3))};return(0,n.jsxs)("div",{className:em().shareRow,children:[(0,n.jsx)("span",{className:em().shareLabel,children:"SHARE ON:"}),(0,n.jsxs)("div",{className:em().shareIcons,children:[(0,n.jsx)(ea.Z,{url:t,"aria-label":"Share on Facebook",className:em().shareIcon,children:(0,n.jsx)(es.J,{icon:"linkFacebook"})}),(0,n.jsx)(ei.Z,{url:t,title:l,"aria-label":"Share on X",className:em().shareIcon,children:(0,n.jsx)(es.J,{icon:"linkX"})}),(0,n.jsx)(er.Z,{url:t,"aria-label":"Share on LinkedIn",className:em().shareIcon,children:(0,n.jsx)(es.J,{icon:"linkLinkedin"})}),(0,n.jsx)(eo.Z,{url:t,subject:l,"aria-label":"Share via email",className:em().shareIcon,children:(0,n.jsx)(es.J,{icon:"mail"})}),(0,n.jsx)("button",{type:"button",onClick:s,"aria-label":r?"Link copied":"Copy link",title:r?"Link copied":"Copy link",className:em().shareIcon,children:(0,n.jsx)(es.J,{icon:r?"check":"link"})})]})]})}function e_(e){let{showWatchNow:t,isLive:l,liveUrl:a,watchOnDemandUrl:i}=e;return t||i?(0,n.jsxs)("div",{className:em().actions,children:[t&&(l?(0,n.jsx)("a",{href:a,className:em().btnPrimary,children:"Watch Now"}):(0,n.jsx)("button",{type:"button",disabled:!0,"aria-label":"Watch Now, unavailable — this program has ended",className:[em().btnPrimary,em().btnDisabled].filter(Boolean).join(" "),children:"Watch Now"})),i&&(0,n.jsx)("a",{href:i,className:em().btnSecondary,target:"_blank",rel:"noopener noreferrer",children:"Watch On Demand"})]}):null}function eg(e){var t,l,i,r,o,c,m,p;let{program:h,channel:_,onClose:g}=e,b=ec(),{isMobile:v,portalRoot:x}=function(){let[e,t]=(0,a.useState)(null),[l,n]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{let e=window.matchMedia("(width <= 768px)"),l=()=>n(e.matches);return t(document.body),l(),e.addEventListener("change",l),()=>e.removeEventListener("change",l)},[]),{isMobile:l,portalRoot:e}}(),f=d(!!h,g);if(u(!!h),!h)return null;let{isEnded:w,isFuture:j,isLive:N,percent:k,statusLabel:y}=function(e,t){if(null===t)return{isEnded:!1,isFuture:!1,isLive:!1,percent:0,statusLabel:""};let l=t>=e.end,n=!l&&t>=e.start,a=t<e.start;return l?{isEnded:l,isFuture:a,isLive:n,percent:100,statusLabel:"This program has ended"}:n?{isEnded:l,isFuture:a,isLive:n,percent:Math.min(100,(t.getTime()-e.start.getTime())/(e.end.getTime()-e.start.getTime())*100),statusLabel:"Time left: ".concat(D(t,e.end))}:{isEnded:l,isFuture:a,isLive:n,percent:0,statusLabel:"Starts in ".concat(D(t,e.start))}}(h,b),T=window.location.href,C="/live/".concat(null!==(p=null!==(m=null==_?void 0:_.slug)&&void 0!==m?m:ep[h.channelId])&&void 0!==p?p:h.channelId),{primary:S,primaryLabel:L,series:B}=function(e){var t,l,n;let a=(null===(l=e.metadata)||void 0===l?void 0:null===(t=l.episodeDescription)||void 0===t?void 0:t.trim())||void 0,i=(null===(n=e.description)||void 0===n?void 0:n.trim())||void 0;return a?{primary:a,primaryLabel:"This episode",series:i&&i!==a?i:void 0}:{primary:i,primaryLabel:"Description",series:void 0}}(h),E=(0,n.jsxs)("div",{ref:f,id:"program-details-panel",role:"dialog","aria-modal":!0,"aria-label":"Program details: ".concat(h.title),tabIndex:-1,className:[em().panel,(null===(t=h.metadata)||void 0===t?void 0:t.image)?em().panelWithImage:""].filter(Boolean).join(" "),children:[(0,n.jsx)("button",{type:"button",onClick:g,"aria-label":"Close details",className:[em().desktopCloseBtn,em().desktopOnly].filter(Boolean).join(" "),children:(0,n.jsxs)("svg",{"aria-hidden":"true",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[(0,n.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,n.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}),(null===(l=h.metadata)||void 0===l?void 0:l.image)&&(0,n.jsxs)("div",{className:em().mobileHero,children:[(0,n.jsx)(Y.default,{src:h.metadata.image,alt:"Cover of ".concat(h.title),fill:!0,className:em().mobileHeroImage,sizes:"100vw"}),(0,n.jsxs)("div",{className:em().mobileTopBar,children:[(0,n.jsx)("span",{className:em().mobileStatusLabel,children:y}),(0,n.jsx)("button",{type:"button",onClick:g,"aria-label":"Close details",className:em().mobileCloseBtn,children:(0,n.jsxs)("svg",{"aria-hidden":"true",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[(0,n.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,n.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]})]}),!(null===(i=h.metadata)||void 0===i?void 0:i.image)&&(0,n.jsxs)("div",{className:em().mobileTopBarNoImage,children:[(0,n.jsx)("span",{className:em().mobileStatusLabel,children:y}),(0,n.jsx)("button",{type:"button",onClick:g,"aria-label":"Close details",className:em().mobileCloseBtn,children:(0,n.jsxs)("svg",{"aria-hidden":"true",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[(0,n.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,n.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),(0,n.jsxs)("div",{className:em().body,children:[(0,n.jsxs)("div",{className:em().content,children:[(0,n.jsxs)("div",{className:em().topBar,children:[(0,n.jsx)("div",{className:em().logoWrapper,children:(null==_?void 0:_.logo)?(0,n.jsx)(Y.default,{src:_.logo,alt:_.name,width:80,height:40,className:em().channelLogo}):(0,n.jsx)("span",{className:em().channelName,children:null==_?void 0:_.name})}),j&&(0,n.jsxs)("button",{type:"button",className:em().calendarBtn,"aria-label":"Add ".concat(h.title," to calendar"),onClick:e=>K(h,e.currentTarget),children:[(0,n.jsxs)("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,n.jsx)("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",ry:"2"}),(0,n.jsx)("line",{x1:"16",y1:"2",x2:"16",y2:"6"}),(0,n.jsx)("line",{x1:"8",y1:"2",x2:"8",y2:"6"}),(0,n.jsx)("line",{x1:"3",y1:"10",x2:"21",y2:"10"})]}),(0,n.jsx)("span",{className:em().calendarBtnText,children:"Add to Calendar"})]})]}),(0,n.jsx)("h2",{className:em().title,children:h.title}),(null===(r=h.metadata)||void 0===r?void 0:r.episodeTitle)&&(0,n.jsx)("p",{className:em().episodeTitle,children:h.metadata.episodeTitle}),(0,n.jsx)("div",{className:em().meta,children:function(e){let{metadata:t,start:l,end:n}=e,a=[];(null==t?void 0:t.seasonNumber)&&t.episodeNumber?a.push("Season ".concat(t.seasonNumber," Episode ").concat(t.episodeNumber)):(null==t?void 0:t.type)&&a.push(t.type.charAt(0).toUpperCase()+t.type.slice(1)),a.push("".concat(I(l)," – ").concat(I(n)," \xb7 ").concat(D(l,n)));let i=[];return(null==t?void 0:t.hd)&&i.push("HD"),(null==t?void 0:t.cc)&&i.push("CC"),i.length>0&&a.push(i.join(" ")),a.join(" | ")}(h)}),S&&(0,n.jsxs)("div",{className:em().descriptionBlock,children:[(0,n.jsx)("p",{className:em().descriptionLabel,children:L}),(0,n.jsx)("p",{className:em().description,children:S})]}
1),B&&(0,n.jsxs)("details",{className:em().descriptionDetails,children:[(0,n.jsxs)("summary",{className:em().descriptionToggle,children:["About the series",(0,n.jsx)("svg",{"aria-hidden":"true",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:em().descriptionChevron,children:(0,n.jsx)("polyline",{points:"18 15 12 9 6 15"})})]}),(0,n.jsx)("p",{className:em().description,children:B})]}),(0,n.jsxs)("div",{className:[em().statusRow,em().desktopOnly].filter(Boolean).join(" "),children:[(0,n.jsx)("span",{className:[em().statusLabel,w?em().statusLabelEnded:""].filter(Boolean).join(" "),children:y}),(0,n.jsx)("div",{className:em().progressTrack,style:{backgroundColor:N||w?void 0:"#c4dfff"},children:(0,n.jsx)("div",{className:em().progressFill,style:{width:"".concat(k,"%"),backgroundColor:w?"#116edb":"#fff"}})})]}),(0,n.jsx)(e_,{showWatchNow:N||w,isLive:N,liveUrl:C,watchOnDemandUrl:null===(o=h.metadata)||void 0===o?void 0:o.watchOnDemandUrl})]}),(null===(c=h.metadata)||void 0===c?void 0:c.image)&&(0,n.jsxs)("div",{className:em().imageAndShare,children:[(0,n.jsx)("figure",{className:em().image,children:(0,n.jsx)(Y.default,{sizes:"(max-width: 1024px) 1vw, 20vw",fill:!0,src:h.metadata.image,alt:"Cover of ".concat(h.title)})}),(0,n.jsx)(eh,{url:T,title:h.title})]})]}),(0,n.jsx)("button",{type:"button",onClick:g,"aria-label":"Close details",className:em().closeBtn,children:"Close"})]});return x?(0,s.createPortal)((0,n.jsx)("div",{className:[em().backdrop,v?em().backdropMobile:""].filter(Boolean).join(" "),onPointerDown:e=>{e.target===e.currentTarget&&g()},children:E}),x):null}var eb=l(72890),ev=l.n(eb);let ex=(0,a.memo)(function(e){var t;let{channel:l,programs:i,now:r,selectedId:o,onSelect:s}=e,[d,c]=(0,a.useState)(!1),u=(0,a.useRef)(null),m=(0,a.useRef)(null),p="agenda-channel-".concat(l.id),h=null===r?null:null!==(t=i.find(e=>r>=e.start&&r<e.end))&&void 0!==t?t:null;return(0,a.useEffect)(()=>{d&&m.current&&m.current.scrollIntoView({block:"nearest"})},[d]),(0,n.jsxs)("section",{className:ev().section,children:[(0,n.jsx)("h3",{className:ev().heading,children:(0,n.jsxs)("button",{type:"button",className:ev().headerButton,"aria-expanded":d,"aria-controls":p,onClick:()=>c(e=>!e),children:[(0,n.jsx)("span",{className:ev().logoWrapper,children:l.logo?(0,n.jsx)(Y.default,{src:l.logo,alt:"",width:64,height:36,className:ev().logo}):(0,n.jsx)("span",{className:ev().channelName,children:l.name})}),(0,n.jsx)("span",{className:ev().headerName,children:l.name}),h&&(0,n.jsx)("span",{className:ev().liveBadge,children:"On now"}),(0,n.jsx)("svg",{"aria-hidden":"true",className:[ev().chevron,d?ev().chevronOpen:""].filter(Boolean).join(" "),width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:(0,n.jsx)("polyline",{points:"6 9 12 15 18 9"})})]})}),d&&(0,n.jsx)("ul",{id:p,ref:u,className:ev().list,children:i.map(e=>{let t=(null==h?void 0:h.id)===e.id,a=null!==r&&r>=e.end;return(0,n.jsx)("li",{ref:t?m:void 0,children:(0,n.jsxs)("button",{type:"button","aria-pressed":o===e.id,"aria-label":"".concat(l.name,": ").concat(e.title,", ").concat(I(e.start)," to ").concat(I(e.end)).concat(t?", now airing":""),className:[ev().item,t?ev().itemLive:"",a?ev().itemEnded:"",o===e.id?ev().itemSelected:""].filter(Boolean).join(" "),onClick:()=>s(e.id),children:[(0,n.jsxs)("span",{className:ev().itemTime,children:[I(e.start),t&&(0,n.jsx)("span",{className:ev().nowDot,"aria-hidden":"true"})]}),(0,n.jsxs)("span",{className:ev().itemBody,children:[(0,n.jsx)("span",{className:ev().itemTitle,children:e.title}),(0,n.jsx)("span",{className:ev().itemMeta,children:function(e){let{metadata:t,start:l,end:n}=e,a=[];(null==t?void 0:t.seasonNumber)&&t.episodeNumber?a.push("S".concat(t.seasonNumber," E").concat(t.episodeNumber)):(null==t?void 0:t.type)&&a.push(t.type.charAt(0).toUpperCase()+t.type.slice(1)),a.push(D(l,n));let i=[];return(null==t?void 0:t.hd)&&i.push("HD"),(null==t?void 0:t.cc)&&i.push("CC"),i.length>0&&a.push(i.join(" ")),a.join(" \xb7 ")}(e)})]})]})},e.id)})})]})}),ef=(0,a.memo)(function(e){let{channels:t,programsByChannel:l,now:a,selectedId:i,onSelect:r}=e;return(0,n.jsx)("div",{className:ev().agenda,children:t.map(e=>{var t;return(0,n.jsx)(ex,{channel:e,programs:null!==(t=l.get(e.id))&&void 0!==t?t:[],now:a,selectedId:i,onSelect:r},e.id)})})});var ew=l(9186),ej=l.n(ew);let eN=(e,t)=>e>=t.start&&e<=t.end,ek=(0,a.memo)(function(e){let{now:t,bounds:l}=e;if(!t||!eN(t,l))return null;let a=C(t,l.start);return(0,n.jsx)("div",{"aria-hidden":"true",className:ej().header,style:{left:a,height:y.RULER_HEIGHT},children:(0,n.jsxs)("div",{className:ej().pill,children:[(0,n.jsx)("div",{className:ej().dot}),I(t),(0,n.jsx)("span",{className:ej().caret,"aria-hidden":"true"})]})})});var ey=l(58240),eT=l.n(ey);let eC=(0,a.memo)(function(e){let{bounds:t,slots:l,width:a}=e;return(0,n.jsx)("div",{role:"presentation",className:eT().ruler,style:{width:a,height:y.RULER_HEIGHT},children:l.map(e=>{let l=C(e,t.start);return(0,n.jsx)("div",{className:eT().slot,style:{left:l},children:I(e)},e.getTime())})})}),eS=()=>{let e=(0,a.useRef)(null),t=(0,a.useRef)(!1),l=(0,a.useRef)(0),n=(0,a.useRef)(0),i=(0,a.useRef)(0),r=(0,a.useRef)(0),o=(0,a.useRef)(null),s=(0,a.useRef)(!1),d=(0,a.useCallback)(a=>{let d=e.current;if(!d||o.current!==a.pointerId)return;let c=a.clientX-l.current,u=a.clientY-n.current;!t.current&&5>Math.hypot(c,u)||(t.current||(t.current=!0,s.current=!0,d.setPointerCapture(a.pointerId),d.style.cursor="grabbing",d.style.userSelect="none"),d.scrollLeft=i.current-c,d.scrollTop=r.current-u)},[]),c=(0,a.useCallback)(l=>{let n=e.current;n&&o.current===l.pointerId&&(n.hasPointerCapture(l.pointerId)&&n.releasePointerCapture(l.pointerId),t.current=!1,o.current=null,n.style.cursor="",n.style.userSelect="")},[]),u=(0,a.useCallback)(t=>{let a=e.current;if(!a||0!==t.button&&"mouse"===t.pointerType)return;let d=t.target;null!=d&&d.closest('a, input, select, textarea, [data-drag-scroll-ignore="true"]')||(s.current=!1,o.current=t.pointerId,l.current=t.clientX,n.current=t.clientY,i.current=a.scrollLeft,r.current=a.scrollTop)},[]);return(0,a.useEffect)(()=>{let t=e.current;if(!t)return;let l=e=>{s.current&&(s.current=!1,e.preventDefault(),e.stopPropagation())};return t.addEventListener("pointerdown",u),t.addEventListener("pointermove",d),t.addEventListener("pointerup",c),t.addEventListener("pointercancel",c),t.addEventListener("click",l,!0),()=>{t.removeEventListener("pointerdown",u),t.removeEventListener("pointermove",d),t.removeEventListener("pointerup",c),t.removeEventListener("pointercancel",c),t.removeEventListener("click",l,!0)}},[u,d,c]),e};var eL=l(22176),eB=l.n(eL);let eE=(0,a.forwardRef)(function(e,t){var l;let{channels:i,programs:r,bounds:o,timingControls:s}=e,d=ec(),c=function(){let[e,t]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{let e=window.matchMedia("(width <= 768px)"),l=()=>t(e.matches);return l(),e.addEventListener("change",l),()=>e.removeEventListener("change",l)},[]),e}(),[u,m]=(0,a.useState)(null),p=eS(),h=(0,a.useMemo)(()=>M(r,o),[r,o]),_=(0,a.useMemo)(()=>B(o,y.SLOT_MINUTES),[o]),g=(0,a.useMemo)(()=>S(o),[o]),b=i.length*y.ROW_HEIGHT+Math.max(0,i.length-1)*y.ROW_GAP,v=y.RULER_HEIGHT+y.RULER_MARGIN_Y,x=(0,a.useRef)(null),f=(0,a.useCallback)(e=>{x.current=document.activeElement,m(t=>t===e?null:e)},[]),w=(0,a.useCallback)(()=>{var e,t;m(null),null===(t=x.current)||void 0===t||null===(e=t.focus)||void 0===e||e.call(t)},[]),j=(0,a.useMemo)(()=>{var e;return null!==(e=r.find(e=>e.id===u))&&void 0!==e?e:null},[r,u]);return(0,a.useImperativeHandle)(t,()=>({scrollToTime:function(e){let{behavior:t="smooth",align:l="center"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=p.current;if(!n)return;let a=window.matchMedia("(prefers-reduced-motion: reduce)").matches,i=e;e<o.start?i=o.start:e>o.end&&(i=o.end);let r=C(i,o.start),s=n.clientWidth-y.CHANNEL_COL_WIDTH;n.scrollTo({left:Math.max(0,r-("third"===l?s/3:s/2)),behavior:a?"auto":t})}}),[o,p]),(0,n.jsxs)("div",{className:eB().root,children:[(0,n.jsx)(eg,{program:j,channel:j&&null!==(l=i.find(e=>e.id===j.channelId))&&void 0!==l?l:null,onClose:w}),s,c?(0,n.jsx)(ef,{channels:i,programsByChannel:h,now:d,selectedId:u,onSelect:f}):(0,n.jsx)("div",{ref:p,className:eB().scrollArea,style:{scrollSnapType:"x proximity"},children:(0,n.jsxs)("div",{role:"grid","aria-label":"TV schedule","aria-rowcount":i.length,className:eB().innerGrid,style:{width:y.CHANNEL_COL_WIDTH+g,height:v+b},children:[(0,n.jsxs)("div",{role:"presentation",className:eB().rulerRow,children:[(0,n.jsx)("div",{className:eB().timeCellWrapper,children:(0,n.jsxs)("div",{className:eB().timeCell,style:{height:y.RULER_HEIGHT},children:["Time ",(0,n.jsx)("span",{className:eB().timeZoneAbbr,children:"(MT)"})]})}),(0,n.jsxs)("div",{role:"presentation",className:eB().rulerTrack,style:{width:g,height:y.RULER_HEIGHT},children:[(0,n.jsx)(eC,{bounds:o,slots:_,width:g}),(0,n.jsx)(ek,{now:d,bounds:o})]})]}),(0,n.jsx)("div",{role:"presentation",className:eB().rowsContainer,children:i.map((e,t)=>{var l;return(0,n.jsx)(en,{channel:e,rowIndex:t+1,programs:null!==(l=h.get(e.id))&&void 0!==l?l:[],width:g,selectedId:u,now:d,onSelect:f},e.id)})})]})})]})});var eM=l(72071),eI=l.n(eM);let eD="America/Denver";function eR(){let e=new Date;return(0,i.Z)(new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0,0),eD)}let eW=e=>{if(!e)return eR();let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);if(!t)return eR();let[,l,n,a]=t,r=new Date(Number(l),Number(n)-1,Number(a),0,0,0,0);return Number.isNaN(r.getTime())?eR():(0,i.Z)(r,eD)},eP=e=>{let t=e.getFullYear(),l=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0");return"".concat(t,"-").concat(l,"-").concat(n)},eA=e=>{let{schedules:t=[],legacyScheduleUrl:l}=e,o=(0,r.useRouter)(),s=(0,r.useSearchParams)(),d=(0,a.useRef)(null),[c,u]=(0,a.useState)(!1);(0,a.useEffect)(()=>{let e=()=>{u("#legacy"===window.location.hash.toLowerCase())};return e(),window.addEventListener("hashchange",e),()=>window.removeEventListener("hashchange",e)},[]);let p=(0,a.useCallback)(()=>{let e=!c,t=e?"#legacy":window.location.pathname+window.location.search;window.history.replaceState(null,"",t),u(e)},[c]),_=s.get("date"),g=s.get("stage"),b=(0,a.useMemo)(()=>eW(_),[_]),v=h(g)?g:null,x=(0,a.useMemo)(()=>R(b),[b]),f=(0,a.useMemo)(()=>t.map(e=>({id:e.channelId,name:e.label,logo:e.logo,slug:e.slug})),[t]),w=(0,a.useMemo)(()=>t.flatMap(e=>(function(e,t,l){let n=[],a=l.getFullYear(),r=l.getMonth(),o=l.getDate();for(let[l,s]of e.entries()){let e=Number.parseInt(s.startTime.slice(0,2),10),d=Number.parseInt(s.startTime.slice(2,4),10);if(Number.isNaN(e)||Number.isNaN(d))continue;let c=(0,i.Z)(new Date(a,r,o,e,d,0,0),"America/Denver"),u=new Date(c.getTime()+6e4*s.duration);n.push({id:"".concat(t,"-").concat(s.startTime,"-").concat(l),channelId:t,title:s.title,start:c,end:u,description:s.description||void 0,metadata:{...s}})}return n})(e.items,e.channelId,b)),[t,b]),N=(0,a.useMemo)(()=>{let e=new Map;for(let l of w){var t;let n=null!==(t=e.get(l.channelId))&&void 0!==t?t:[];n.push(l),e.set(l.channelId,n)}return e},[w]),k=(0,a.useCallback)(e=>{let t=m.find(t=>
1t.id===e);return t?null==t.hour?new Date:new Date(x.start.getTime()+36e5*t.hour):x.start},[x.start]),y=(0,a.useCallback)(e=>{var t;let l=new URLSearchParams(s.toString());l.set("stage",e);let n=eR(),a=b.getTime()===n.getTime();if("now"===e&&!a){l.set("date",eP(n)),o.push("?".concat(l.toString()),{scroll:!1});return}o.replace("?".concat(l.toString()),{scroll:!1}),null===(t=d.current)||void 0===t||t.scrollToTime(k(e))},[o,s,k,b]),T=(0,a.useCallback)(e=>{let t=new URLSearchParams(s.toString());t.set("date",eP(e)),t.delete("stage"),o.push("?".concat(t.toString()),{scroll:!1})},[o,s]),C=(0,a.useCallback)((e,t)=>{let l=new URLSearchParams(s.toString());l.set("date",eP(e)),t?l.set("stage",t):l.delete("stage"),o.push("?".concat(l.toString()),{scroll:!1})},[o,s]),S=(0,a.useCallback)(()=>{window.print()},[]);return(0,a.useEffect)(()=>{var e;let t=null!=v?v:"now",l=k(t),n="now"===t?"third":"center";null===(e=d.current)||void 0===e||e.scrollToTime(l,{behavior:"auto",align:n})},[x.start.getTime()]),(0,n.jsxs)("div",{className:eI().wrapper,children:[(0,n.jsxs)("div",{className:eI().screenView,children:[c&&l?(0,n.jsx)("iframe",{id:"legacy-schedule",src:l,title:"Legacy TV schedule",className:eI().legacyFrame,loading:"lazy"}):(0,n.jsx)(eE,{ref:d,channels:f,programs:w,bounds:x,timingControls:(0,n.jsxs)("div",{className:eI().header,children:[(0,n.jsx)("div",{className:eI().mobileTitleRow,children:(0,n.jsx)(j,{selected:b,onSelect:T,activeStage:null!=v?v:"now",onConfirm:C,onStageChange:y,triggerLabel:"Select date"})}),(0,n.jsx)("div",{className:eI().stagePillsWrapper,children:(0,n.jsx)(G,{activeStage:null!=v?v:"now",onStageChange:y})}),(0,n.jsxs)("div",{className:eI().desktopDatePicker,children:[(0,n.jsx)(j,{selected:b,onSelect:T,activeStage:null!=v?v:"now",onConfirm:C,onStageChange:y}),(0,n.jsx)("button",{type:"button",className:eI().printButton,onClick:S,"aria-label":"Print schedule",children:(0,n.jsxs)("svg",{"aria-hidden":"true",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("polyline",{points:"6 9 6 2 18 2 18 9"}),(0,n.jsx)("path",{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2"}),(0,n.jsx)("rect",{x:"6",y:"14",width:"12",height:"8"})]})})]})]})}),l?(0,n.jsx)("div",{className:eI().legacy,children:(0,n.jsx)("button",{type:"button",className:eI().legacyToggle,onClick:p,"aria-pressed":c,"aria-controls":c?"legacy-schedule":void 0,children:c?"Back to timeline view":"Switch to legacy view"})}):null]}),(0,n.jsx)(H,{channels:f,programsByChannel:N,date:b})]})}},72071:function(e){e.exports={wrapper:"schedule_wrapper__wmR7Y",mobileTitleRow:"schedule_mobileTitleRow__QSOSZ",stagePillsWrapper:"schedule_stagePillsWrapper__MtlF8",desktopDatePicker:"schedule_desktopDatePicker__9Mcy7",printButton:"schedule_printButton__f9dV0",header:"schedule_header__t3zn_",legacy:"schedule_legacy__ZFC6w",legacyToggle:"schedule_legacyToggle__Ihgfg",legacyFrame:"schedule_legacyFrame__BpOhS",screenView:"schedule_screenView__Q9TVv"}},18226:function(e){e.exports={row:"channel-row_row__Gqmms",channelLabelWrapper:"channel-row_channelLabelWrapper__YOKMR",channelLabel:"channel-row_channelLabel__Y7NL2",channelLogoWrapper:"channel-row_channelLogoWrapper__2qtsN",channelLogo:"channel-row_channelLogo__3X0TK",channelName:"channel-row_channelName__KU5mO",channelBanner:"channel-row_channelBanner__q_CUY",programTrack:"channel-row_programTrack__QwAtB"}},47130:function(e){e.exports={container:"date-picker_container___nuJF",trigger:"date-picker_trigger__gLtKC",chevron:"date-picker_chevron__BhuPT",open:"date-picker_open__u5Pfj",popover:"date-picker_popover__37lVi",desktopCalendarHeader:"date-picker_desktopCalendarHeader__3Ijzr",desktopMonthButton:"date-picker_desktopMonthButton__oj340",desktopMonthLabel:"date-picker_desktopMonthLabel__2WEmG",desktopStageGroup:"date-picker_desktopStageGroup__uiUsO",desktopStageButton:"date-picker_desktopStageButton__2ln7S",desktopStageButtonActive:"date-picker_desktopStageButtonActive__YWsHU",calendar:"date-picker_calendar__1LfEF",desktopContinueBtn:"date-picker_desktopContinueBtn__moiBv",mobileModal:"date-picker_mobileModal__P_fdm",mobileModalInner:"date-picker_mobileModalInner__XgmVo",mobileModalHeader:"date-picker_mobileModalHeader__fxtKX",mobileModalTitle:"date-picker_mobileModalTitle__whaAM",mobileModalClose:"date-picker_mobileModalClose__3ZR5B",mobileCalendar:"date-picker_mobileCalendar__9dVqk",mobileDayPicker:"date-picker_mobileDayPicker__y7hRP",stageGrid:"date-picker_stageGrid__1PQpj",stageTile:"date-picker_stageTile__Rxhrc",stageTileActive:"date-picker_stageTileActive__H4ADs",continueBtn:"date-picker_continueBtn__JsJPA"}},39319:function(e){e.exports={backdrop:"details-panel_backdrop__YiffY","backdrop-fade":"details-panel_backdrop-fade__W6kKK",panel:"details-panel_panel__oWdZ6","panel-expand":"details-panel_panel-expand__4Lqx3",desktopOnly:"details-panel_desktopOnly__jh9ez",desktopCloseBtn:"details-panel_desktopCloseBtn__cTbVZ",topBar:"details-panel_topBar__BMP5o",logoWrapper:"details-panel_logoWrapper___ooO7",channelLogo:"details-panel_channelLogo__Dyhj0",channelName:"details-panel_channelName__KjrIa",calendarBtn:"details-panel_calendarBtn__0SeVv",body:"details-panel_body__xzbTZ",content:"details-panel_content__zb3Bl",title:"details-panel_title__unoLv",episodeTitle:"details-panel_episodeTitle__hHz7S",meta:"details-panel_meta__hq14l",descriptionBlock:"details-panel_descriptionBlock__eYcze",descriptionLabel:"details-panel_descriptionLabel__SFtmS",descriptionDetail
1s:"details-panel_descriptionDetails__xtkH5",descriptionToggle:"details-panel_descriptionToggle__7UThp",descriptionChevron:"details-panel_descriptionChevron__KxwqU",description:"details-panel_description__CIB0k",statusRow:"details-panel_statusRow__PWxDM",statusLabel:"details-panel_statusLabel__lOBVM",statusLabelEnded:"details-panel_statusLabelEnded__MiWeQ",progressTrack:"details-panel_progressTrack__BxrjG",progressFill:"details-panel_progressFill__kI_jb",actions:"details-panel_actions__0WB15",btnPrimary:"details-panel_btnPrimary__Lw4FB",btnDisabled:"details-panel_btnDisabled__WZPi2",btnSecondary:"details-panel_btnSecondary__KfwJm",imageAndShare:"details-panel_imageAndShare__IGVKp",image:"details-panel_image__6I3gZ",shareRow:"details-panel_shareRow__vvaKR",shareLabel:"details-panel_shareLabel__fpMzP",shareIcons:"details-panel_shareIcons__HKuuz",shareIcon:"details-panel_shareIcon__s2YLu",closeBtn:"details-panel_closeBtn___2hIk",mobileHero:"details-panel_mobileHero__hGWRm",mobileTopBar:"details-panel_mobileTopBar__PtYz8",mobileTopBarNoImage:"details-panel_mobileTopBarNoImage__ueBEN",backdropMobile:"details-panel_backdropMobile__ZHheG",mobileHeroImage:"details-panel_mobileHeroImage__nIStE",mobileStatusLabel:"details-panel_mobileStatusLabel__7OAa4",mobileCloseBtn:"details-panel_mobileCloseBtn__QDelB",panelWithImage:"details-panel_panelWithImage__eJy15",calendarBtnText:"details-panel_calendarBtnText__4XNfB"}},72890:function(e){e.exports={agenda:"mobile-agenda_agenda__ANm7I",section:"mobile-agenda_section__I5NIJ",heading:"mobile-agenda_heading__SzXQv",headerButton:"mobile-agenda_headerButton__roid7",logoWrapper:"mobile-agenda_logoWrapper__jPAiJ",logo:"mobile-agenda_logo__m1BHo",channelName:"mobile-agenda_channelName__77GsV",headerName:"mobile-agenda_headerName__szE9C",liveBadge:"mobile-agenda_liveBadge__zuZng",chevron:"mobile-agenda_chevron__EXsiz",chevronOpen:"mobile-agenda_chevronOpen__nBg8D",list:"mobile-agenda_list__MZlVo",item:"mobile-agenda_item__TObch",itemLive:"mobile-agenda_itemLive__rUeGO",itemSelected:"mobile-agenda_itemSelected__dpyh5",itemTime:"mobile-agenda_itemTime__pAF4R",nowDot:"mobile-agenda_nowDot__1aQeS",itemBody:"mobile-agenda_itemBody__zvPdL",itemTitle:"mobile-agenda_itemTitle__xt669",itemMeta:"mobile-agenda_itemMeta__kr2n0",itemEnded:"mobile-agenda_itemEnded__OSXvs"}},9186:function(e){e.exports={header:"now-indicator_header__4rr8m",pill:"now-indicator_pill__4UFsK",dot:"now-indicator_dot__7YgV3",caret:"now-indicator_caret__EzYoe"}},94296:function(e){e.exports={printView:"print-view_printView__p6bXj",header:"print-view_header__dWVGj",title:"print-view_title__JfqvZ",date:"print-view_date__Mh47E",timezone:"print-view_timezone__REWJp",channelSection:"print-view_channelSection__IP0Ve",channelName:"print-view_channelName__MJy2e",table:"print-view_table__Zdpf3",timeCell:"print-view_timeCell__89_Vy",duration:"print-view_duration__7oYOi",programCell:"print-view_programCell__nO1ab",programTitle:"print-view_programTitle__VdkMU",badges:"print-view_badges__epfi_",series:"print-view_series__urC3X",description:"print-view_description__kpaYk"}},11736:function(e){e.exports={blockWrapper:"program-block_blockWrapper__RQBQv",srOnly:"program-block_srOnly___XRfu",block:"program-block_block__Uj1Y7",blockSelected:"program-block_blockSelected__tSX4H",blockLive:"program-block_blockLive__VzSaW",time:"program-block_time__iOe_c",bottom:"program-block_bottom__fyWbq",title:"program-block_title__0eOUs",episodeTitle:"program-block_episodeTitle__m2bGZ",meta:"program-block_meta__KcJWT",calendarBtn:"program-block_calendarBtn__qDMnc"}},81404:function(e){e.exports={pillList:"stage-pills_pillList__yf9_f",pill:"stage-pills_pill__HAnC7",pillActive:"stage-pills_pillActive__JiIQG",nowDot:"stage-pills_nowDot__pb4SB",group:"stage-pills_group__szxHd",groupItem:"stage-pills_groupItem__vUitF",divider:"stage-pills_divider__Y8EHm",groupPill:"stage-pills_groupPill__z2d_Z",mobileWrapper:"stage-pills_mobileWrapper__fnAEA",mobileDropdownContainer:"stage-pills_mobileDropdownContainer__9D_pP",mobileTrigger:"stage-pills_mobileTrigger__H7f72",chevronOpen:"stage-pills_chevronOpen__qcmmB",dropdown:"stage-pills_dropdown__RfOMj",dropdownItem:"stage-pills_dropdownItem__icFGP",dropdownItemActive:"stage-pills_dropdownItemActive__qOLcC",backToNow:"stage-pills_backToNow__61H_s"}},58240:function(e){e.exports={ruler:"time-ruler_ruler__Htfip",slot:"time-ruler_slot__NrJht"}},22176:function(e){e.exports={root:"timeline_root__hSYOd",scrollArea:"timeline_scrollArea__jCt8n",innerGrid:"timeline_innerGrid__9mTRV",rulerRow:"timeline_rulerRow__aCLTS",timeCellWrapper:"timeline_timeCellWrapper__6O0FF",timeCell:"timeline_timeCell__2m1h_",timeZoneAbbr:"timeline_timeZoneAbbr__o4ifX",rulerTrack:"timeline_rulerTrack__NXurs",rowsContainer:"timeline_rowsContainer__5__Zt"}}}]);

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.