PageSourceSearch

https://watch.plex.tv/_next/static/chunks/2to3k362e25xh.js

js plex.tv collected 2026-10-01 08:40:27 UTC 57,882 bytes, 5 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,997294,e=>{"use strict";var t=e.i(161605),n=e.i(459873),r=e.i(843356),i=e.i(66443),a=e.i(560819),o=e.i(630242),s=e.i(606786);e.s(["LocaleSwitcher",0,function(){let e=(0,a.useTranslations)("watch.footer"),l=(0,i.useLocale)(),c=(0,n.usePathname)(),u=(0,n.useRouter)(),d=(0,o.useCallback)(e=>{e.target.value!==l&&u.replace(c,{locale:e.target.value})},[l,c,u]);return(0,t.jsx)("div",{children:(0,t.jsx)(s.FormSelectBox,{accessibilityLabel:e("locale-switcher-accessibility-label"),id:"locale-select",label:"",name:"locale",options:Object.keys(r.LOCALE_FLAG_MAP).map(e=>({displayText:r.LOCALE_FLAG_MAP[e],value:`${e}`})),value:l,onChange:d})})}])},292700,e=>{"use strict";e.i(354370);var t,n=e.i(921144),r=e.i(464227),i=e.i(92561),a=e.i(464652),o=e.i(542931),s=((t=s||{}).Accepted="1",t.Viewed="2",t);let l={consentShown:!1,analyticsAllowed:!0,thirdPartyAllowed:!0},c=(0,r.create)()((0,i.persist)(()=>l,{name:"privacy",storage:{async getItem(){let[e,t,r]=await Promise.all([(0,o.getCookie)(a.GTMMetricsCookie.ConsentShown,n.string()),(0,o.getCookie)(a.GTMMetricsCookie.Analytics,n.string()),(0,o.getCookie)(a.GTMMetricsCookie.ThirdParty,n.string())]);return"2"!==e?{state:l}:{state:{consentShown:!0,analyticsAllowed:"1"===t,thirdPartyAllowed:"1"===r}}},async setItem(e,t){t.state.consentShown&&await Promise.all([(0,o.setCookie)(a.GTMMetricsCookie.ConsentShown,"2",a.GTM_COOKIE_OPTIONS),t.state.analyticsAllowed?(0,o.setCookie)(a.GTMMetricsCookie.Analytics,"1",a.GTM_COOKIE_OPTIONS):(0,o.deleteCookie)(a.GTMMetricsCookie.Analytics),t.state.thirdPartyAllowed?(0,o.setCookie)(a.GTMMetricsCookie.ThirdParty,"1",a.GTM_COOKIE_OPTIONS):(0,o.deleteCookie)(a.GTMMetricsCookie.ThirdParty)])},async removeItem(){await Promise.all([(0,o.deleteCookie)(a.GTMMetricsCookie.ConsentShown),(0,o.deleteCookie)(a.GTMMetricsCookie.Analytics),(0,o.deleteCookie)(a.GTMMetricsCookie.ThirdParty)])}}})),{setState:u}=c;e.s(["updateCookieConsent",0,function({analyticsAllowed:e,thirdPartyAllowed:t}){u(()=>({consentShown:!0,analyticsAllowed:e,thirdPartyAllowed:t}))},"usePrivacyAnalyticsAllowed",0,function(){return c(e=>e.analyticsAllowed)},"usePrivacyConsentShown",0,function(){return c(e=>e.consentShown)},"usePrivacyThirdPartyAllowed",0,function(){return c(e=>e.thirdPartyAllowed&&!window.navigator.globalPrivacyControl)}])},682089,e=>{"use strict";var t=e.i(161605);e.i(459873);var n=e.i(560819),r=e.i(630242),i=e.i(665846),a=e.i(242304),o=e.i(397906),s=e.i(539369),l=e.i(548378),c=e.i(292700);e.s(["default",0,function({children:e}){let u=(0,n.useTranslations)("core.cookies"),d=(0,l.useDisclosureState)(),h=(0,c.usePrivacyAnalyticsAllowed)(),f=(0,c.usePrivacyThirdPartyAllowed)(),m=(0,r.useCallback)(e=>{e.preventDefault();let t=e.currentTarget;(0,c.updateCookieConsent)({analyticsAllowed:t.analyticsAllowed.checked,thirdPartyAllowed:t.thirdPartyAllowed.checked}),d.onClose()},[d]);return(0,t.jsxs)(o.Modal,{open:d.isOpen,onOpenChange:d.onOpenChange,children:[(0,t.jsx)(o.ModalTrigger,{children:e}),(0,t.jsxs)(o.ModalContent,{as:"form",closeAccessibilityLabel:u("close-accessibility-label"),"data-testid":"cookieModal",title:u("title",{plex:"Plex"}),onSubmit:m,children:[(0,t.jsx)(o.ModalBody,{children:(0,t.jsxs)(a.Stack,{gap:"l",children:[(0,t.jsxs)(a.Stack,{gap:"s",children:[(0,t.jsx)(s.Text,{color:"primary",children:u("intro-paragraph-1")}),(0,t.jsx)(s.Text,{color:"primary",children:u("intro-paragraph-2")})]}),(0,t.jsxs)(a.Stack,{children:[(0,t.jsx)(s.Text,{color:"primary",font:"heading-3",children:u("necessary-heading")}),(0,t.jsx)(s.Text,{color:"primary",children:u("necessary-description")})]}),(0,t.jsxs)(a.Stack,{children:[(0,t.jsx)(s.Text,{color:"primary",font:"heading-3",children:u("analytics-heading")}),(0,t.jsx)(s.Text,{color:"primary",children:u("analytics-description",{google:"Google Analytics"})}),(0,t.jsx)(a.Stack,{align:"right",orientation:"horizontal",children:(0,t.jsxs)("label",{children:[(0,t.jsx)("input",{"data-testid":"cookieModalAnalyticsCheckbox",defaultChecked:h,name:"analyticsAllowed",type:"checkbox"}),(0,t.jsx)(s.Text,{color:"primary",children:u("allow-label")})]})})]}),(0,t.jsxs)(a.Stack,{children:[(0,t.jsx)(s.Text,{color:"primary",font:"heading-3",children:u("third-party-heading")}),(0,t.jsx)(s.Text,{color:"primary",children:u("third-party-description",{commissionJunction:"Commission Junction",facebook:"Facebook"})}),(0,t.jsx)(a.Stack,{align:"right",orientation:"horizontal",children:(0,t.jsxs)("label",{children:[(0,t.jsx)("input",{"data-testid":"cookieModalThirdPartyCheckbox",defaultChecked:f,name:"thirdPartyAllowed",type:"checkbox"}),(0,t.jsx)(s.Text,{color:"primary",children:u("allow-label")})]})})]})]})}),(0,t.jsx)(o.ModalFooter,{children:(0,t.jsx)(o.ModalButtonGroup,{children:(0,t.jsx)(i.Button,{color:"accent","data-testid":"cookieModalSaveButton",label:u("submit-label"),type:"submit"})})})]})]})}])},375773,e=>{"use strict";var t=e.i(161605),n=e.i(459873),r=e.i(919435),i=e.i(630242),a=e.i(473656),o=e.i(988632),s=e.i(851192),l=e.i(79907),c=e.i(809711),u=e.i(441044);e.s(["DisplayAdScripts",0,function(){let e=function(){let{country:e}=(0,s.default)(),t=(0,o.useTcfString)();return!(0,l.isDevEnv)()&&!!e&&(!e.isPrivacyRestricted||!!t)}(),d=(0,n.usePathname)(),h=(0,c.default)((0,a.useDisplayAdProvider)()),f=(0,i.useRef)(null);return((0,i.useEffect)(()=>{h?.initialize?.()},[h]),(0,i.useEffect)(()=>
1{if(f.current===d)return;let e=null===f.current;!e&&(0,u.default)(d)||(f.current=d,(!e||h?.navigateOnMount)&&h?.onNavigate?.(d))},[h,d]),h&&e)?(0,t.jsx)(t.Fragment,{children:h.scripts.map(e=>(0,t.jsx)(r.default,{async:!0,crossOrigin:e.crossOrigin,src:e.src,strategy:"lazyOnload"},e.src))}):null}],375773)},417083,e=>{"use strict";var t=e.i(161605),n=e.i(919435),r=e.i(630242),i=e.i(208058),a=e.i(464652),o=e.i(292700),s=e.i(851192),l=e.i(79907);e.s(["default",0,function(){let[e,c]=(0,r.useState)(!1),{country:u}=(0,s.default)(),d=(0,o.usePrivacyConsentShown)(),h=(0,o.usePrivacyAnalyticsAllowed)(),f=(0,o.usePrivacyThirdPartyAllowed)();return((0,r.useEffect)(()=>{if(!u||u.isPrivacyRestricted&&!d)return;let t=h||f;t&&((0,a.updateGTM)(h,f),e||c(!0)),!t&&e&&window.location.reload()},[u,d,h,f,e]),(0,l.isTestEnv)()||!e)?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.default,{dangerouslySetInnerHTML:{__html:`(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
2      new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
3      j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
4      'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
5      })(window,document,'script','dataLayer','${i.GTM_ID}');`},id:"google-tag-manager",strategy:"afterInteractive"}),(0,t.jsx)("noscript",{children:(0,t.jsx)("iframe",{height:"0",src:`https://www.googletagmanager.com/ns.html?id=${i.GTM_ID}`,style:{display:"none",visibility:"hidden"},title:"Google Tag Manager",width:"0"})})]})}])},129041,e=>{e.v({container:"CookieBar-module__VmAISG__container",innerContainer:"CookieBar-module__VmAISG__innerContainer"})},949365,e=>{"use strict";var t=e.i(161605);e.i(459873);var n=e.i(560819),r=e.i(630242),i=e.i(665846),a=e.i(242304),o=e.i(389162),s=e.i(539369),l=e.i(682089),c=e.i(292700),u=e.i(988632),d=e.i(851192),h=e.i(129041);e.s(["default",0,function(){let e=(0,n.useTranslations)("core.cookies"),{country:f}=(0,d.default)(),m=(0,c.usePrivacyConsentShown)(),p=(0,u.useTcfString)(),v=(0,u.useTcfConsentDenied)(),g=(0,r.useCallback)(()=>{(0,c.updateCookieConsent)({analyticsAllowed:!0,thirdPartyAllowed:!0})},[]),b=(0,r.useCallback)(()=>{(0,c.updateCookieConsent)({analyticsAllowed:!1,thirdPartyAllowed:!1})},[]);return f?.isPrivacyRestricted&&(p||v)&&!m?(0,t.jsx)("section",{className:h.default.container,"data-testid":"cookieBar",children:(0,t.jsx)(o.Panel,{borderRadius:"none",children:(0,t.jsx)("div",{className:h.default.innerContainer,children:(0,t.jsxs)(a.Stack,{align:"space-between",gap:["l","l","xxl"],orientation:["vertical","vertical","horizontal"],children:[(0,t.jsxs)(a.Stack,{gap:"s",children:[(0,t.jsx)(s.Text,{children:e("bar-heading")}),(0,t.jsx)(s.Text,{font:"body-3",children:e("bar-paragraph-1",{plex:"Plex"})}),(0,t.jsx)(s.Text,{font:"body-3",children:e("bar-paragraph-2",{facebook:"Facebook",google:"Google"})})]}),(0,t.jsxs)(a.Stack,{align:"center",gap:"m",shrink:!1,verticalAlign:"center",children:[(0,t.jsxs)(a.Stack,{align:"center",gap:"m",orientation:["vertical","vertical","horizontal"],shrink:!1,verticalAlign:"center",children:[(0,t.jsx)(i.Button,{color:"accent","data-testid":"cookieBarAcceptButton",label:e("accept-label"),size:"s",onPress:g}),(0,t.jsx)(i.Button,{color:"accent","data-testid":"cookieBarRejectButton",label:e("reject-label"),size:"s",onPress:b})]}),(0,t.jsx)(a.Stack,{children:(0,t.jsx)(l.default,{children:(0,t.jsx)(i.TextButton,{color:"accent","data-testid":"cookieBarOptionsButton",font:"body-2",children:e("more-options-label")})})})]})]})})})}):null}])},970116,e=>{"use strict";e.i(39693);var t=e.i(161605),n=e.i(630242),r=e.i(956736),i=e.i(52798),a=e.i(259608),o=e.i(208058);let s=o.SECOND_IN_MILLISECONDS,l=30*o.SECOND_IN_MILLISECONDS,c=new Set([1008,4401,4403]);function u(e){let t={};for(let n of Array.from(e.attributes))"command"!==n.name&&(t[n.name]=n.value);return t}let d=(0,n.createContext)(void 0),h=(0,a.default)("pubsub");e.s(["PubSubContext",0,d,"default",0,function({children:e}){let a=(0,r.default)(),o=(0,i.default)(),f=(0,n.useRef)(new Map),m=(0,n.useCallback)((e,t)=>{let n=f.current,r=n.get(e)??new Set;return r.add(t),n.set(e,r),()=>{r.delete(t),0===r.size&&n.delete(e)}},[]),p=(0,n.useMemo)(()=>({subscribe:m}),[m]),v=void 0!==a&&!0!==a.anonymous,g=a?.token,b=a?.id,x=o.clientID;return(0,n.useEffect)(()=>{let e;if(!v||!g||!b||!x)return;let t=f.current,n={baseUrl:"wss://pubsub.plex.tv",clientID:x,token:g,userID:String(b)},r=new AbortController,i=null,a=null,o=0;function d(){if(r.signal.aborted)return;let e=Math.min(s*2**o,l)*(.5+.5*Math.random());o+=1,a=setTimeout(m,e)}function m(){if(r.signal.aborted)return;let a=function({baseUrl:e,clientID:t,resumeCursor:n,token:r,userID:i}){let a=new URL(`/sub/websockets/${i}/${t}`,e);return a.searchParams.set("X-Plex-Token",r),n&&(a.searchParams.set("time",n.time),a.searchParams.set("tag",n.tag)),a.toString()}({...n,resumeCursor:e});try{i=new WebSocket(a)}catch(e){h.error("Failed to construct WebSocket",String(e)),d();return}let{signal:s}=r;i.addEventListener("open",()=>{o=0},{signal:s}),i.addEventListener("message",n=>{if("string"!=typeof n.data)return;let r=function(e){let t=e.trim();if(!t)return null;let n=new DOMParser().parseFromString(t,"application/xml");if(n.querySelector("parsererror"))return null;let r=n.documentElement;
5if(!r||"Message"!==r.tagName)return null;let i=r.getAttribute("command");return i?{attributes:u(r),children:function e(t){return Array.from(t.children).map(t=>({attributes:u(t),children:e(t),tag:t.tagName}))}(r),command:i}:null}(n.data);if(!r)return;let{tag:i,time:a}=r.attributes;a&&i&&(e={tag:i,time:a}),t.get(r.command)?.forEach(e=>{Promise.resolve().then(()=>e(r)).catch(e=>{h.error(`Handler for "${r.command}" threw`,String(e))})})},{signal:s}),i.addEventListener("close",e=>{c.has(e.code)?h.warn(`PubSub closed with auth-failed code ${e.code}`):d()},{signal:s})}return m(),()=>{r.abort(),a&&clearTimeout(a),i?.close()}},[x,v,g,b]),(0,t.jsx)(d.Provider,{value:p,children:e})}],970116)},492482,e=>{"use strict";let t=(0,e.i(464227).create)(()=>({})),{setState:n}=t;e.s(["attachBanner",0,function(e){n(()=>({bannerRef:e}))},"attachNavMenuContent",0,function(e){n(()=>({navMenuVisibleContentRef:e}))},"detachBanner",0,function(){n(()=>({bannerRef:void 0}))},"hideNavMenuContent",0,function(){n(()=>({navMenuVisibleContent:void 0,navMenuVisibleContentRef:void 0}))},"showNavMenuContent",0,function(e){n(()=>({navMenuVisibleContent:e,navMenuVisibleContentRef:void 0}))},"useBannerRef",0,function(){return t(e=>e.bannerRef)},"useNavMenuVisibleContent",0,function(){return t(e=>e.navMenuVisibleContent)},"useNavMenuVisibleContentRef",0,function(){return t(e=>e.navMenuVisibleContentRef)}])},205453,e=>{e.v({container:"GoogleIdentity-module__yKq_dW__container"})},377840,e=>{"use strict";var t=e.i(161605),n=e.i(919435),r=e.i(630242),i=e.i(654023),a=e.i(600401),o=e.i(747745),s=e.i(348506),l=e.i(953253),c=e.i(956736),u=e.i(492482),d=e.i(205453);let h="google-identity-prompt";e.s(["default",0,function(){let e=(0,c.default)(),f=(0,i.default)(),[m,p]=(0,r.useState)(!1),[v,g]=(0,r.useState)(),b=function(){let[e,t]=(0,r.useState)(0),n=(0,u.useBannerRef)(),i=function(){let[e,t]=(0,r.useState)(!1),n=(0,u.useBannerRef)(),i=n?.current;return(0,r.useEffect)(()=>{if(!i)return void t(!1);let e=new IntersectionObserver(([e])=>{t(e.isIntersecting)});return e.observe(i),()=>{i||e.disconnect()}},[i]),e}(),a=n?.current;return(0,r.useEffect)(()=>{if(!a||!i)return void t(0);let e=new ResizeObserver(([e])=>{t(e.target.getBoundingClientRect().height)});return e.observe(a),()=>{e.disconnect()}},[a,i]),e}(),x=(0,r.useCallback)(e=>{let t=(0,s.getAuthErrors)(e.statusBody);if((0,s.findAdditionalAuthNeededError)(t)){window.location.href=f;return}},[f]);(0,a.default)({provider:"google",providerToken:v,overrideUtmParams:{utm_content:"googleOneTap"},onAuthSuccess:l.default,onError:x});let y=(0,r.useCallback)(e=>{g(e.credential)},[]),C=(0,r.useCallback)(()=>{window.google&&(window.google.accounts.id.initialize({client_id:o.GOOGLE_CLIENT_ID,auto_
5select:!0,cancel_on_tap_outside:!0,prompt_parent_id:h,callback:y}),p(!0))},[y]);return(0,r.useEffect)(()=>{m&&!e&&window.google.accounts.id.prompt()},[e,m]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.default,{src:"//accounts.google.com/gsi/client",strategy:"afterInteractive",onLoad:C}),(0,t.jsx)("div",{className:d.default.container,id:h,style:{transform:`translateY(calc(var(--navbar-height) + var(--size-s) + ${b}px ))`}})]})}],377840)},636568,e=>{e.v({bannerContainer:"BannerContent-module__28w4jG__bannerContainer",bannerCopy:"BannerContent-module__28w4jG__bannerCopy"})},830294,e=>{"use strict";var t=e.i(161605),n=e.i(7284),r=e.i(630242),i=e.i(665846),a=e.i(583676),o=e.i(242304),s=e.i(806420),l=e.i(539369),c=e.i(940512),u=e.i(208058),d=e.i(542931),h=e.i(492482),f=e.i(636568);e.s(["default",0,function({id:e,title:m,link:p,copy:v,ctaLabel:g="Learn more"}){let b=(0,r.useRef)(null),[x,y]=(0,r.useState)(!1);(0,r.useEffect)(()=>{x?(0,h.detachBanner)():(0,h.attachBanner)(b)},[x]);let C=(0,r.useCallback)(async()=>{y(!0),await (0,d.setCookie)(u.COOKIES.BANNER,e)},[e]);return x?null:(0,t.jsx)("div",{ref:b,"aria-live":"polite",className:(0,n.clsx)(c.className,f.default.bannerContainer),children:(0,t.jsxs)(o.Stack,{gap:"xl",orientation:"horizontal",width:"100%",children:[(0,t.jsx)("div",{className:f.default.bannerCopy,children:(0,t.jsx)(s.OptionalLink,{accessibilityLabel:m||"",href:p,target:"_blank",children:(0,t.jsxs)(o.Stack,{as:"span",verticalAlign:"center",children:[m?(0,t.jsx)(l.Text,{font:"heading-3",children:m}):null,(0,t.jsxs)(o.Stack,{as:"span",gap:"s",orientation:["vertical","vertical","horizontal"],children:[(0,t.jsx)(l.Text,{font:"body-1",children:v}),p&&g?(0,t.jsx)(l.Text,{font:"heading-3",children:g}):null]})]})})}),(0,t.jsx)(o.Stack,{align:"right",grow:!0,verticalAlign:"center",children:(0,t.jsx)(i.Button,{accessibilityLabel:"Dismiss",color:"always-transparent",icon:a.IconXCircledFilled,size:"m",onPress:C})})]})})}])},356833,e=>{e.v({active:"MobileNav-module__k3xK7G__active",mobileNav:"MobileNav-module__k3xK7G__mobileNav",mobileNavLabel:"MobileNav-module__k3xK7G__mobileNavLabel",mobileNavLink:"MobileNav-module__k3xK7G__mobileNavLink",navItem:"MobileNav-module__k3xK7G__navItem","slide-up":"MobileNav-module__k3xK7G__slide-up"})},280180,e=>{"use strict";var t=e.i(161605),n=e.i(7284),r=e.i(459873),i=e.i(560819),a=e.i(583676),o=e.i(242304),s=e.i(745401),l=e.i(356833);function c({icon:e,href:r,label:i,active:u}){return(0,t.jsx)("li",{className:l.default.navItem,children:(0,t.jsx)(s.PrimitiveLink,{accessibilityLabel:i,className:(0,n.clsx)(l.default.mobileNavLink,u&&l.default.active),href:r,children:(0,t.jsxs)(o.Stack,{align:"center",as:"span",gap:"xxs",children:[(0,t.jsx)(a.Icon,{color:u?"accent":"muted",name:e,size:"l"}),(0,t.jsx)("span",{className:l.default.mobileNavLabel,children:i})]})})})}e.s(["MobileNav",0,function({vodLabelKey:e}){let n=(0,r.usePathname)(),a=(0,i.useTranslations)("watch.navigation");return(0,t.jsx)(o.Hidden,{at:["l","xl"],children:(0,t.jsx)("nav",{"data-testid":"mobileNav",children:(0,t.jsxs)("ul",{className:l.default.mobileNav,children:[(0,t.jsx)(c,{active:"/"===n||"/me"===n,href:"/",icon:"home",label:a("home")}),(0,t.jsx)(c,{active:n.startsWith("/live-tv"),href:"/live-tv",icon:"live-tv",label:a("live-tv")}),(0,t.jsx)(c,{active:n.startsWith("/movies-and-shows")||n.startsWith("/on-demand"),href:"/on-demand",icon:"on-demand",label:a(e)}),(0,t.jsx)(c,{active:n.startsWith("/discover")||n.startsWith("/me/discover"),href:"/discover/trending",icon:"explore",label:a("discover")})]})})})}])},637494,e=>{e.v({headerImage:"UserMenu-module__5l_k9G__headerImage",triggerIndicator:"UserMenu-module__5l_k9G__triggerIndicator",triggerWrapper:"UserMenu-module__5l_k9G__triggerWrapper"})},538426,e=>{e.v({navActions:"NavActions-module__kAf4Zq__navActions"})},737722,e=>{e.v({focusProxy:"NavSearchButton-module__YL0C4G__focusProxy"})},796049,e=>{"use strict";var t=e.i(161605),n=e.i(459873),r=e.i(560819),i=e.i(630242),a=e.i(665846),o=e.i(737722);e.s(["default",0,function({color:e="default",iconOnly:s=!1,iconSize:l,onFocus:c,onMouseEnter:u}){let d=(0,n.usePathname)(),h=(0,n.useRouter)(),f=(0,r.useTranslations)("watch.navigation"),m=(0,i.useRef)(null),p=(0,i.useCallback)(e=>{"/search"!==d&&window.matchMedia("(pointer: coarse)").matches&&(e.preventDefault(),m.current?.focus(),h.push("/search",{scroll:!1}))},[d,h]);return(0,t.jsxs)(t.Fragment,{children:[s?(0,t.jsx)(a.ButtonLink,{accessibilityLabel:f("search"),color:e,href:"/search",icon:"search",iconSize:l,prefetch:"auto",onFocus:c,onMouseEnter:u,onPress:p}):(0,t.jsx)(a.ButtonLink,{color:e,href:"/search",icon:"search",iconSize:l,label:f("search"),prefetch:"auto",onFocus:c,onMouseEnter:u,onPress:p}
5),(0,t.jsx)("input",{ref:m,"aria-hidden":!0,className:o.default.focusProxy,"data-search-focus-proxy":!0,tabIndex:-1,type:"search"})]})}])},799879,e=>{"use strict";var t=e.i(161605),n=e.i(459873),r=e.i(560819),i=e.i(665846),a=e.i(246607),o=e.i(242304),s=e.i(630242),l=e.i(641524),c=e.i(363847),u=e.i(230862),d=e.i(539369),h=e.i(548378),f=e.i(800445),m=e.i(471677),p=e.i(436910),v=e.i(730295),g=e.i(956736),b=e.i(854913),x=e.i(987821),y=e.i(8138),C=e.i(637494);let w={src:e.i(402843).default,width:618,height:304,blurWidth:8,blurHeight:4,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAECAYAAACzzX7wAAAAj0lEQVR42gGEAHv/ABgZGTQvLi3qQyUo/y8oJ/9ESUj/REhH/zQ3NvMPDw9sABYVFTRPPDnqdC80/zstKv8xNDH/MDIv/x8hHvUJCQl1ACUiIDN9Y1vlYDU2+TYsKPg1Mi75Kick+RkZF+8ICAhyAFdIPS6CZliGMhcXiBIODYMaGhiAEhAPgAkIB3sFBQU51qMm4eYTn2gAAAAASUVORK5CYII="};function N({hasInAppNotifications:e=!1,hasPinnedLibraryLinks:n=!1}){let a=(0,r.useTranslations)("core.navigation"),T=(0,g.default)(),k=(0,p.default)(),_=(0,x.default)({utmParams:{utm_internal:"user-menu"}}),S=(0,h.useDisclosureState)(),j=(0,v.useNavigationNotification)("account"),E=(0,v.useNavigationNotification)("friends"),M=(0,v.useNavigationNotification)("notifications"),A=(0,s.useCallback)(()=>{(0,b.default)()},[]),P=M?.count??0,R=(0,s.useCallback)(()=>{(0,m.default)({event:"client:click",properties:{action:"openNotificationDrawer",badgeCount:P}}),S.onClose()},[S,P]),L={label:a("notifications"),href:"/account/notifications?source=bell",icon:"notification",indicator:M?(0,t.jsx)(u.NotificationIndicator,{accessibilityLabel:M.accessibilityLabel,label:M.label}):void 0,onPress:R},I=T?[{heading:a("manage-heading"),items:[{label:a("profile"),href:(0,y.watchUrl)("/account/profile"),icon:"user-filled",onPress:S.onClose},...e?[L]:[],{label:a("friends"),href:(0,y.watchUrl)("/account/all-friends"),icon:"friends",indicator:E?(0,t.jsx)(u.NotificationIndicator,{accessibilityLabel:E.accessibilityLabel,label:E.label}):void 0,onPress:S.onClose},{label:a("services"),href:"/account/my-services",icon:"grid",onPress:S.onClose},...n?[]:[{label:a("my-watchlist"),href:(0,y.watchUrl)("/watchlist"),icon:"bookmark",onPress:S.onClose},{label:a("my-media"),href:(0,y.wwwUrl)("/your-media"),icon:"library",onPress:S.onClose}],{label:a("support"),href:(0,y.supportUrl)("/"),icon:"question-circled",target:"_blank",onPress:S.onClose},{label:a("settings"),href:(0,y.watchUrl)("/settings"),icon:"settings-gear",onPress:S.onClose},{label:a("sign-out"),onPress:A,icon:"lock-unlocked"}]}]:[{heading:a("links-heading"),items:[{label:a("my-media"),href:(0,y.wwwUrl)("/your-media"),icon:"library",onPress:S.onClose},{label:a("support"),href:(0,y.supportUrl)("/"),icon:"question-circled",target:"_blank",onPress:S.onClose}]}];return(0,t.jsx)(c.UserMenu,{closeButtonLabel:a("close"),header:T?void 0:(0,t.jsxs)(o.Stack,{gap:"m",paddingX:"m",paddingY:"xl",children:[(0,t.jsx)("div",{className:C.default.headerImage,children:(0,t.jsx)(f.default,{alt:"",fill:!0,sizes:"(max-width: 600px) 280px, (min-width: 601px) 224px",src:w})}),(0,t.jsxs)(o.Stack,{children:[(0,t.jsx)(d.Text,{align:"center",color:"primary",font:"heading-2",children:a("anonymous-header-title")}),(0,t.jsx)(d.Text,{align:"center",font:"body-2",children:a("anonymous-header-description")})]}),(0,t.jsxs)(o.Stack,{gap:"s",children:[(0,t.jsx)(i.ButtonLink,{color:"primary",href:_,label:a("download-app")}),(0,t.jsx)(d.Text,{align:"center",font:"caption",children:a("or")}),(0,t.jsx)(i.ButtonLink,{grow:!0,href:(0,y.watchUrl)(`/account/sign-in?${k}`),label:a("sign-in"),onPress:S.onClose})]})]}),menuAccessibilityDescription:a("user-menu-accessibility-description",{plex:"Plex"}),menuAccessibilityLabel:a("user-menu-accessibility-label"),menuItems:I,menuState:S,menuTrigger:T?(0,t.jsx)(i.DisclosureButton,{accessibilityLabel:a("user-menu-open-accessibility-label"),isOpen:S.isOpen,showChevron:!1,children:(0,t.jsxs)("div",{className:C.default.triggerWrapper,children:[(0,t.jsx)(l.Avatar,{image:T.thumb?(0,t.jsx)(f.default,{alt:T.username??a("user-menu-avatar-accessibility-label"),height:"32",src:T.thumb,width:"32"}):null,width:32}),j?(0,t.jsx)("span",{className:C.default.triggerIndicator,children:(0,t.jsx)(u.NotificationIndicator,{accessibilityLabel:j.accessibilityLabel})}):null]})}):(0,t.jsx)(i.Button,{accessibilityLabel:a("user-menu-open-accessibility-label"),color:"transparent",icon:"user",iconSize:["xl","xl","l"]}),user:T?{thumbnail:T.thumb?(0,t.jsx)(f.default,{alt:T.username??a("user-menu-avatar-accessibility-label"),fill:!0,sizes:"(max-width: 600px) 96px, (min-width: 601px) 128px",src:T.thumb}):null,username:T.username??"unknown",displayName:T.title??""}:void 0})}var T=e.i(538426),k=e.i(796049);e.s(["NavActions",0,function({hasInAppNotifications:e,hasSearchButton:s}){let l=(0,n.usePathname)(),c=(0,g.default)(),u=(0,p.default)(),d=(0,r.useTranslations)("watch.navigation"),h=(0,r.useTranslations)("core.navigation");return(0,t.jsx)("div",{className:T.default.navActions,children:(0,t.jsxs)(o.Stack,{gap:"xs",orientation:"horizontal",verticalAlign:"center",children:[(0,t.jsx)(o.Hidden,{at:["s"],children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.ButtonLink,{color:"transparent",href:(0,y.wwwUrl)("/your-media"),icon:"library",label:h("my-media")}),(0,t.jsx)(a.Divider,{height:16,orientation:"vertical",size:"s"})]})}),(0,t.jsx)(o.Hidden,{at:["s","m","l"],children:(0,t.jsx)(i.ButtonLink,{active:l.startsWith("/watchlist"),color:"transparent",href:"/watchlist/all",icon:"bookmark-collection",iconSize:["l","l","m"],label:d("my-lists")}
5)}),(0,t.jsx)(o.Hidden,{at:["xl"],children:(0,t.jsxs)(o.Stack,{orientation:"horizontal",verticalAlign:"center",children:[s?(0,t.jsx)(o.Hidden,{at:["m","l","xl"],children:(0,t.jsx)(k.default,{color:"transparent",iconOnly:!0,iconSize:"l"})}):null,(0,t.jsx)(i.ButtonLink,{accessibilityLabel:d("my-lists"),active:l.startsWith("/watchlist"),color:"transparent",href:"/watchlist/all",icon:"bookmark-collection",iconSize:["l","l","m"]})]})}),c?(0,t.jsx)(N,{hasInAppNotifications:e,hasPinnedLibraryLinks:!0}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.Hidden,{at:["s","m","l"],children:(0,t.jsx)(i.ButtonLink,{color:"primary","data-id":"navBarSignInButton",href:`/account/sign-in?${u}`,label:d("sign-in")})}),(0,t.jsx)(o.Hidden,{at:"xl",children:(0,t.jsx)(N,{hasInAppNotifications:e,hasPinnedLibraryLinks:!0})})]})]})})}],799879)},161539,232909,e=>{"use strict";var t=e.i(859234),n=e.i(896838);class r{constructor(e,t,n,r){this._walkerStack=[],this._currentSetFor=new Set,this._acceptNode=e=>{if(e.nodeType===Node.ELEMENT_NODE){let t=e.shadowRoot;if(t){let e=this._doc.createTreeWalker(t,this.whatToShow,{acceptNode:this._acceptNode});return this._walkerStack.unshift(e),NodeFilter.FILTER_ACCEPT}if("function"==typeof this.filter)return this.filter(e);if(this.filter?.acceptNode)return this.filter.acceptNode(e);else if(null===this.filter)return NodeFilter.FILTER_ACCEPT}return NodeFilter.FILTER_SKIP},this._doc=e,this.root=t,this.filter=r??null,this.whatToShow=n??NodeFilter.SHOW_ALL,this._currentNode=t,this._walkerStack.unshift(e.createTreeWalker(t,n,this._acceptNode));const i=t.shadowRoot;if(i){const e=this._doc.createTreeWalker(i,this.whatToShow,{acceptNode:this._acceptNode});this._walkerStack.unshift(e)}}get currentNode(){return this._currentNode}set currentNode(e){if(!(0,t.nodeContains)(this.root,e))throw Error("Cannot set currentNode to a node that is not contained by the root node.");let n=[],r=e,i=e;for(this._currentNode=e;r&&r!==this.root;)if(r.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let e=r,t=this._doc.createTreeWalker(e,this.whatToShow,{acceptNode:this._acceptNode});n.push(t),t.currentNode=i,this._currentSetFor.add(t),r=i=e.host}else r=r.parentNode;let a=this._doc.createTreeWalker(this.root,this.whatToShow,{acceptNode:this._acceptNode});n.push(a),a.currentNode=i,this._currentSetFor.add(a),this._walkerStack=n}get doc(){return this._doc}firstChild(){let e=this.currentNode,n=this.nextNode();return(0,t.nodeContains)(e,n)?(n&&(this.currentNode=n),n):(this.currentNode=e,null)}lastChild(){let e=this._walkerStack[0].lastChild();return e&&(this.currentNode=e),e}nextNode(){let e=this._walkerStack[0].nextNode();if(e){if(e.shadowRoot){let t;if("function"==typeof this.filter?t=this.filter(e):this.filter?.acceptNode&&(t=this.filter.acceptNode(e)),t===NodeFilter.FILTER_ACCEPT)return this.currentNode=e,e;let n=this.nextNode();return n&&(this.currentNode=n),n}return e&&(this.currentNode=e),e}if(!(this._walkerStack.length>1))return null;{this._walkerStack.shift();let e=this.nextNode();return e&&(this.currentNode=e),e}}previousNode(){let e=this._walkerStack[0];if(e.currentNode===e.root){if(this._currentSetFor.has(e)&&(this._currentSetFor.delete(e),this._walkerStack.length>1)){this._walkerStack.shift();let e=this.previousNode();return e&&(this.currentNode=e),e}return null}let t=e.previousNode();if(t){if(t.shadowRoot){let e;if("function"==typeof this.filter?e=this.filter(t):this.filter?.acceptNode&&(e=this.filter.acceptNode(t)),e===NodeFilter.FILTER_ACCEPT)return t&&(this.currentNode=t),t;let n=this.lastChild();return n&&(this.currentNode=n),n}return t&&(this.currentNode=t),t}if(!(this._walkerStack.length>1))return null;{this._walkerStack.shift();let e=this.previousNode();return e&&(this.currentNode=e),e}}nextSibling(){return null}previousSibling(){return null}parentNode(){return null}}var i=e.i(713504),a=e.i(696376),o=e.i(915863),s=e.i(819312);function l(e){if(!e.isConnected)return;let n=(0,o.getOwnerDocument)(e);if("virtual"===(0,a.getInteractionModality)()){let r=(0,t.getActiveElement)(n);(0,s.runAfterTransition)(()=>{let a=(0,t.getActiveElement)(n);(a===r||a===n.body)&&e.isConnected&&(0,i.focusWithoutScrolling)(e)})}else(0,i.focusWithoutScrolling)(e)}e.s(["focusSafely",0,l],232909);var c=e.i(874293),u=e.i(108094),d=e.i(572293),h=e.i(630242);let f=h.default.createContext(null),m="react-aria-focus-scope-restore",p=null;function v(e){return e[0].parentElement}function g(e){let t=E.getTreeNode(p);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function b(e,n){return!!e&&!!n&&n.some(n=>(0,t.nodeContains)(n,e))}function x(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of E.traverse(E.getTreeNode(t)))if(n&&b(e,n.current))return!0;return!1}function y(e,t){let n=E.getTreeNode(t)?.parent;for(;n;){if(n.scopeRef===e)return!0;n=n.parent}return!1}function C(e,t=!1){if(null==e||t){if(null!=e)try{e.focus()}catch{}}else try{l(e)}catch{}}function w(e,t=!0){let n=e[0].previousElementSibling,r=v(e),i=_(r,{tabbable:t},e);i.currentNode=n;let a=i.nextNode();return t&&!a&&((i=_(r=v(e),{tabbable:!1},e)).currentNode=n,a=i.nextNode()),a}function N(e,t=!0){C(w(e,t))}function T(e){let t=E.getTreeNode(p);for(;t&&t.scopeRef!==e;
5){if(t.nodeToRestore)return!1;t=t.parent}return t?.scopeRef===e}function k(e){e.dispatchEvent(new CustomEvent(m,{bubbles:!0,cancelable:!0}))&&C(e)}function _(e,i,a){var s,l,c;let d=i?.tabbable?u.isTabbable:u.isFocusable,h=e?.nodeType===Node.ELEMENT_NODE?e:null,f=(0,o.getOwnerDocument)(h),m=(s=e||f,l=NodeFilter.SHOW_ELEMENT,c={acceptNode:e=>(0,t.nodeContains)(i?.from,e)||i?.tabbable&&"INPUT"===e.tagName&&"radio"===e.getAttribute("type")&&(!function(e){if(e.checked)return!0;let t=function(e){if(!e.form)return Array.from((0,o.getOwnerDocument)(e).querySelectorAll(`input[type="radio"][name="${CSS.escape(e.name)}"]`)).filter(e=>!e.form);let t=e.form.elements.namedItem(e.name),n=(0,o.getOwnerWindow)(e);return t instanceof n.RadioNodeList?Array.from(t).filter(e=>e instanceof n.HTMLInputElement):t instanceof n.HTMLInputElement?[t]:[]}(e);return t.length>0&&!t.some(e=>e.checked)}(e)||"INPUT"===m.currentNode.tagName&&"radio"===m.currentNode.type&&m.currentNode.name===e.name)?NodeFilter.FILTER_REJECT:d(e)&&(!a||b(e,a))&&(!i?.accept||i.accept(e))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},(0,n.shadowDOM)()?new r(f,s,l,c):f.createTreeWalker(s,l,c));return i?.from&&(m.currentNode=i.from),m}class S{constructor(){this.fastMap=new Map,this.root=new j({scopeRef:null}),this.fastMap.set(null,this.root)}get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,t,n){let r=this.fastMap.get(t??null);if(!r)return;let i=new j({scopeRef:e});r.addChild(i),i.parent=r,this.fastMap.set(e,i),n&&(i.nodeToRestore=n)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(null===e)return;let t=this.fastMap.get(e);if(!t)return;let n=t.parent;for(let e of this.traverse())e!==t&&t.nodeToRestore&&e.nodeToRestore&&t.scopeRef&&t.scopeRef.current&&b(e.nodeToRestore,t.scopeRef.current)&&(e.nodeToRestore=t.nodeToRestore);let r=t.children;n&&(n.removeChild(t),r.size>0&&r.forEach(e=>n&&n.addChild(e))),this.fastMap.delete(t.scopeRef)}*traverse(e=this.root){if(null!=e.scopeRef&&(yield e),e.children.size>0)for(let t of e.children)yield*this.traverse(t)}clone(){let e=new S;for(let t of this.traverse())e.addTreeNode(t.scopeRef,t.parent?.scopeRef??null,t.nodeToRestore);return e}}class j{constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}}let E=new S;e.s(["FocusScope",0,function(e){var n,r,i,s,l,u,S,M,A,P;let R,L,I,O,{children:D,contain:F,restoreFocus:B,autoFocus:G}=e,z=(0,h.useRef)(null),$=(0,h.useRef)(null),U=(0,h.useRef)([]),{parentNode:W}=(0,h.useContext)(f)||{},V=(0,h.useMemo)(()=>new j({scopeRef:U}),[U]);(0,d.useLayoutEffect)(()=>{let e=W||E.root;if(E.getTreeNode(e.scopeRef)&&p&&!y(p,e.scopeRef)){let t=E.getTreeNode(p);t&&(e=t)}e.addChild(V),E.addNode(V)},[V,W]),(0,d.useLayoutEffect)(()=>{let e=E.getTreeNode(U);e&&(e.contain=!!F)},[F]),(0,d.useLayoutEffect)(()=>{let e=z.current?.nextSibling,t=[],n=e=>e.stopPropagation();for(;e&&e!==$.current;)t.push(e),e.addEventListener(m,n),e=e.nextSibling;return U.current=t,()=>{for(let e of t)e.removeEventListener(m,n)}},[D]),n=U,r=B,i=F,(0,d.useLayoutEffect)(()=>{if(r||i)return;let e=n.current,a=(0,o.getOwnerDocument)(e?e[0]:void 0),s=e=>{let r=(0,t.getEventTarget)(e);b(r,n.current)?p=n:x(r)||(p=null)};return a.addEventListener("focusin",s,!1),e?.forEach(e=>e.addEventListener("focusin",s,!1)),()=>{a.removeEventListener("focusin",s,!1),e?.forEach(e=>e.removeEventListener("focusin",s,!1))}},[n,r,i]),s=U,l=F,R=(0,h.useRef)(void 0),L=(0,h.useRef)(void 0),(0,d.useLayoutEffect)(()=>{let e=s.current;if(!l){L.current&&(cancelAnimationFrame(L.current),L.current=void 0);return}let n=(0,o.getOwnerDocument)(e?e[0]:void 0),r=e=>{if("Tab"!==e.key||e.altKey||e.ctrlKey||e.metaKey||!g(s)||e.isComposing)return;let r=(0,t.getActiveElement)(n),i=s.current;if(!i||!b(r,i))return;let a=_(v(i),{tabbable:!0},i);if(!r)return;a.currentNode=r;let l=e.shiftKey?a.previousNode():a.nextNode();l||(a.currentNode=e.shiftKey?i[i.length-1].nextElementSibling:i[0].previousElementSibling,l=e.shiftKey?a.previousNode():a.nextNode()),e.preventDefault(),l&&(C(l,!0),l instanceof(0,o.getOwnerWindow)(l).HTMLInputElement&&l.select())},i=e=>{(!p||y(p,s))&&b((0,t.getEventTarget)(e),s.current)?(p=s,R.current=(0,t.getEventTarget)(e)):g(s)&&!x((0,t.getEventTarget)(e),s)?R.current?R.current.focus():p&&p.current&&N(p.current):g(s)&&(R.current=(0,t.getEventTarget)(e))},u=e=>{L.current&&cancelAnimationFrame(L.current),L.current=requestAnimationFrame(()=>{let r=(0,a.getInteractionModality)(),i=("virtual"===r||null===r)&&(0,c.isA
5ndroid)()&&(0,c.isChrome)(),o=(0,t.getActiveElement)(n);if(!i&&o&&g(s)&&!x(o,s)){p=s;let n=(0,t.getEventTarget)(e);n&&n.isConnected?(R.current=n,R.current?.focus()):p.current&&N(p.current)}})};return n.addEventListener("keydown",r,!1),n.addEventListener("focusin",i,!1),e?.forEach(e=>e.addEventListener("focusin",i,!1)),e?.forEach(e=>e.addEventListener("focusout",u,!1)),()=>{n.removeEventListener("keydown",r,!1),n.removeEventListener("focusin",i,!1),e?.forEach(e=>e.removeEventListener("focusin",i,!1)),e?.forEach(e=>e.removeEventListener("focusout",u,!1))}},[s,l]),(0,d.useLayoutEffect)(()=>()=>{L.current&&cancelAnimationFrame(L.current)},[L]),u=U,S=B,M=F,I=(0,h.useRef)("u">typeof document?(0,t.getActiveElement)((0,o.getOwnerDocument)(u.current?u.current[0]:void 0)):null),(0,d.useLayoutEffect)(()=>{let e=u.current,n=(0,o.getOwnerDocument)(e?e[0]:void 0);if(!S||M)return;let r=()=>{(!p||y(p,u))&&b((0,t.getActiveElement)(n),u.current)&&(p=u)};return n.addEventListener("focusin",r,!1),e?.forEach(e=>e.addEventListener("focusin",r,!1)),()=>{n.removeEventListener("focusin",r,!1),e?.forEach(e=>e.removeEventListener("focusin",r,!1))}},[u,M]),(0,d.useLayoutEffect)(()=>{let e=(0,o.getOwnerDocument)(u.current?u.current[0]:void 0);if(!S)return;let t=t=>{if("Tab"!==t.key||t.altKey||t.ctrlKey||t.metaKey||!g(u)||t.isComposing)return;let n=e.activeElement;if(!x(n,u)||!T(u))return;let r=E.getTreeNode(u);if(!r)return;let i=r.nodeToRestore,a=_(e.body,{tabbable:!0});a.currentNode=n;let o=t.shiftKey?a.previousNode():a.nextNode();if(i&&i.isConnected&&i!==e.body||(i=void 0,r.nodeToRestore=void 0),(!o||!x(o,u))&&i){a.currentNode=i;do o=t.shiftKey?a.previousNode():a.nextNode();while(x(o,u))(t.preventDefault(),t.stopPropagation(),o)?C(o,!0):x(i)?C(i,!0):n.blur()}};return M||e.addEventListener("keydown",t,!0),()=>{M||e.removeEventListener("keydown",t,!0)}},[u,S,M]),(0,d.useLayoutEffect)(()=>{let e=(0,o.getOwnerDocument)(u.current?u.current[0]:void 0);if(!S)return;let n=E.getTreeNode(u);if(n)return n.nodeToRestore=I.current??void 0,()=>{let n=E.getTreeNode(u);if(!n)return;let r=n.nodeToRestore,i=(0,t.getActiveElement)(e);if(S&&r&&(i&&x(i,u)||i===e.body&&T(u))){let t=E.clone();requestAnimationFrame(()=>{if(e.activeElement===e.body){let e=t.getTreeNode(u);for(;e;){if(e.nodeToRestore&&e.nodeToRestore.isConnected)return void k(e.nodeToRestore);e=e.parent}for(e=t.getTreeNode(u);e;){if(e.scopeRef&&e.scopeRef.current&&E.getTreeNode(e.scopeRef))return void k(w(e.scopeRef.current,!0));e=e.parent}}})}}},[u,S]),A=U,P=G,O=h.default.useRef(P),(0,h.useEffect)(()=>{if(O.current){p=A;let e=(0,o.getOwnerDocument)(A.current?A.current[0]:void 0);!b((0,t.getActiveElement)(e),p.current)&&A.current&&N(A.current)}O.current=!1},[A]),(0,h.useEffect)(()=>{let e=(0,t.getActiveElement)((0,o.getOwnerDocument)(U.current?U.current[0]:void 0)),n=null;if(b(e,U.current)){for(let t of E.traverse())t.scopeRef&&b(e,t.scopeRef.current)&&(n=t);n===E.getTreeNode(U)&&(p=n.scopeRef)}},[U]),(0,d.useLayoutEffect)(()=>()=>{let e=E.getTreeNode(U)?.parent?.scopeRef??null;(U===p||y(U,p))&&(!e||E.getTreeNode(e))&&(p=e),E.removeTreeNode(U)},[U]);let H=(0,h.useMemo)(()=>{var e;return e=U,{focusNext(n={}){let r=e.current,{from:i,tabbable:a,wrap:s,accept:l}=n,c=i||(0,t.getActiveElement)((0,o.getOwnerDocument)(r[0]??void 0)),u=r[0].previousElementSibling,d=_(v(r),{tabbable:a,accept:l},r);d.currentNode=b(c,r)?c:u;let h=d.nextNode();return!h&&s&&(d.currentNode=u,h=d.nextNode()),h&&C(h,!0),h},focusPrevious(n={}){let r=e.current,{from:i,tabbable:a,wrap:s,accept:l}=n,c=i||(0,t.getActiveElement)((0,o.getOwnerDocument)(r[0]??void 0)),u=r[r.length-1].nextElementSibling,d=_(v(r),{tabbable:a,accept:l},r);d.currentNode=b(c,r)?c:u;let h=d.previousNode();return!h&&s&&(d.currentNode=u,h=d.previousNode()),h&&C(h,!0),h},focusFirst(t={}){let n=e.current,{tabbable:r,accept:i}=t,a=_(v(n),{tabbable:r,accept:i},n);a.currentNode=n[0].previousElementSibling;let o=a.nextNode();return o&&C(o,!0),o},focusLast(t={}){let n=e.current,{tabbable:r,accept:i}=t,a=_(v(n),{tabbable:r,accept:i},n);a.currentNode=n[n.length-1].nextElementSibling;let o=a.previousNode();return o&&C(o,!0),o}}},[]),K=(0,h.useMemo)(()=>({focusManager:H,parentNode:V}),[V,H]);return h.default.createElement(f.Provider,{value:K},h.default.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:z}),D,h.default.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:$}))},"getFocusableTreeWalker",0,_,"useFocusManager",0,function(){return(0,h.useContext)(f)?.focusManager}],161539)},6604,e=>{"use strict";var t,n=((t={}).OnDemand="navMenuOnDemand",t.LiveTV="navMenuLiveTV",t.Discover="navMenuDiscover",t);e.s(["NavMenuContentID",()=>n])},896136,e=>{e.v({arrow:"NavMenu-module__Uil70W__arrow",container:"NavMenu-module__Uil70W__container",isOpen:"NavMenu-module__Uil70W__isOpen",menu:"NavMenu-module__Uil70W__menu"})},413220,e=>{"use strict";var t=e.i(161605),n=e.i(232909),r=e.i(161539),i=e.i(7284),a=e.i(630242),o=e.i(940512),s=e.i(994196),l=e.i(492482),c=e.i(6604),u=e.i(896136);let d={transitionProperty:"none"},h={transitionProperty:"transform, width, height"};e.s(["default",0,function({children:e}){let f=(0,a.useRef)(null),m=(0,a.useRef)(null),p=(0,l.useNavMenuVisibleContent)(),v=(0,l.useNavMenuVisibleContentRef)(),[g,b]=(0,s.useBoundingRectSize)(v),[x,y]=(0,a.useState)(),C=(0,a.useRef)(void 0),w=p&&C.current&&C.current!==p[
50]?h:d,N=(0,a.useCallback)(e=>{if(!p)return;let t=document.getElementById(p[0]),i=(0,r.getFocusableTreeWalker)(document.documentElement,{tabbable:!0});t&&(i.currentNode=t);let a=e?i.previousNode():i.nextNode();a&&((0,n.focusSafely)(a),Object.values(c.NavMenuContentID).includes(a.id)||(0,l.hideNavMenuContent)())},[p]);(0,a.useEffect)(()=>{if(!p||!g||!b||!f.current||!m.current)return;let{x:e,width:t}=f.current?.getBoundingClientRect(),n=p[1]-e,r=Math.max(50,n-g/2);r+g>t-50&&(r=t-g-50),y({arrowStyle:{transform:`translateX(${n-Math.floor(m.current.offsetWidth/2)}px)`},menuStyle:{width:g,height:b,transform:`translateX(${r}px)`}})},[p,b,g]),(0,a.useEffect)(()=>(p||(C.current=void 0),()=>{p&&(C.current=p[0])}),[p]),(0,a.useEffect)(()=>{if(p)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){if(!p)return;let t=document.getElementById(p[0]);switch(e.key){case"Escape":e.preventDefault(),t&&(0,n.focusSafely)(t),(0,l.hideNavMenuContent)();break;case"Tab":e.preventDefault(),N(e.shiftKey)}}},[p,N]);let T=(0,a.useCallback)(()=>{(0,l.hideNavMenuContent)()},[]);return(0,t.jsxs)("div",{ref:f,className:(0,i.clsx)(o.className,u.default.container,!!p&&u.default.isOpen),onMouseLeave:T,children:[(0,t.jsx)("div",{ref:m,className:u.default.arrow,style:{...x?.arrowStyle,...w}}),(0,t.jsx)("div",{className:u.default.menu,style:{...x?.menuStyle,...w},children:e})]})}])},518709,e=>{e.v({isVisible:"NavMenuContent-module__nHytaa__isVisible",section:"NavMenuContent-module__nHytaa__section"})},926709,e=>{"use strict";var t=e.i(161605),n=e.i(161539),r=e.i(232909),i=e.i(7284),a=e.i(630242),o=e.i(492482),s=e.i(518709);function l({children:e,isVisible:r}){let i=(0,n.useFocusManager)(),o=(0,a.useCallback)(e=>{switch(e.key){case"ArrowDown":e.preventDefault(),i?.focusNext({wrap:!0,tabbable:!1});break;case"ArrowUp":e.preventDefault(),i?.focusPrevious({wrap:!0,tabbable:!1})}},[i]);return(0,a.useEffect)(()=>{if(r)return document.addEventListener("keydown",o),()=>{document.removeEventListener("keydown",o)}},[r,o]),(0,t.jsx)(t.Fragment,{children:e})}let c=(0,a.forwardRef)(function({children:e,sectionID:c},u){let d=(0,a.useRef)(null),h=(0,o.useNavMenuVisibleContent)(),f=h?.[0]===c,m=f&&h[2];return(0,a.useEffect)(()=>{f&&(0,o.attachNavMenuContent)(d)},[f]),(0,a.useEffect)(()=>{if(m&&d.current){let e=(0,n.getFocusableTreeWalker)(d.current,{tabbable:!1}).nextNode();e&&(0,r.focusSafely)(e)}},[u,m]),(0,t.jsx)("div",{ref:d,"aria-hidden":!f,"aria-labelledby":c,className:(0,i.clsx)(s.default.section,f&&s.default.isVisible),"data-testid":`navMenuSection-${c}`,role:"dialog",children:(0,t.jsx)(n.FocusScope,{children:(0,t.jsx)(l,{isVisible:f,children:e})})})});e.s(["default",0,c])},458455,e=>{e.v({link:"NavMenuContentListItem-module__l1axXa__link",s:"NavMenuContentListItem-module__l1axXa__s"})},839520,e=>{"use strict";var t=e.i(161605),n=e.i(7284),r=e.i(583676),i=e.i(242304),a=e.i(745401),o=e.i(590027),s=e.i(539369),l=e.i(630242),c=e.i(458455);e.s(["default",0,function({description:e,href:u,icon:d,label:h,size:f="m"}){let[m,p,v]=function(){let[e,t]=(0,l.useState)(!1);return[e,(0,l.useCallback)(e=>{t(!0)},[void 0]),(0,l.useCallback)(e=>{t(!1)},[void 0])]}();return(0,t.jsx)(i.Stack,{as:"li",children:(0,t.jsx)(a.PrimitiveLink,{className:(0,n.clsx)(c.default.link,c.default[f],m&&o.focusRingInsetClassName),href:u,tabIndex:-1,onBlur:v,onFocus:p,children:(0,t.jsxs)(i.Stack,{as:"span",gap:"m",orientation:"horizontal",verticalAlign:"center",children:[d?(0,t.jsx)(r.Icon,{color:"accent",name:d,size:"xl"}):null,(0,t.jsxs)(i.Stack,{as:"span",children:[(0,t.jsx)(s.Text,{color:"primary",font:"inherit",children:(0,t.jsx)(i.Stack,{gap:"xxs",orientation:"horizontal",verticalAlign:"center",children:h})}),e?(0,t.jsx)(s.Text,{color:"muted",font:"inherit",numberOfLines:2,children:e}):null]})]})})})}],839520)},202430,e=>{e.v({searchContainer:"Search-module__31h-Vq__searchContainer"})},117882,e=>{e.v({emptyContainer:"SearchPopover-module__GG3I9a__emptyContainer",listItem:"SearchPopover-module__GG3I9a__listItem",listItemHighlighted:"SearchPopover-module__GG3I9a__listItemHighlighted SearchPopover-module__GG3I9a__listItem"})},292668,e=>{"use strict";var t,n=e.i(161605),r=e.i(459873),i=e.i(560819),a=e.i(630242),o=e.i(665846),s=e.i(583676),l=e.i(242304);e.i(39693);
5var c=e.i(620),u=e.i(393534),d=e.i(539369),h=e.i(955578),f=e.i(919976),m=e.i(406956),p=e.i(471677),v=e.i(719181),g=e.i(956736),b=e.i(382697),x=e.i(384766),y=e.i(202430),C=e.i(467007),w=e.i(640161),N=e.i(467643),T=e.i(994196),k=e.i(719808);function _(e,t,n,r){switch(t){case"movie":return`movie:${e}`;case"show":return`show:${e}`;case"season":return`season:${e}-season-${n}`;case"episode":return`episode:${e}-season-${n}-episode-${r}`;default:return}}var S=e.i(481794),j=e.i(351691),E=e.i(117882),M=e.i(386121),A=e.i(51497);e.i(745401),e.i(13076);var P=e.i(590027),R=(0,A.createRuntimeFn)({defaultClassName:"_1br561r2 _1br561r1",variantClassNames:{isCircle:{true:"_1br561r3",false:"_1br561r4"},isShimmer:{true:"_1br561r5"}},defaultVariants:{},compoundVariants:[]});function L({children:e,posterStyle:t="portrait",width:r,...i}){let a=function(e){switch(e){case"portrait":return 2/3;case"landscape":return 16/9;case"circle":case"square":return 1}}(t),o=`calc(${"number"==typeof r?`${r}px`:r} / ${a})`;return(0,n.jsx)("div",{className:R({isCircle:"circle"===t,isShimmer:!e}),style:{width:r,height:o,minWidth:r,animationDelay:"shimmerOffset"in i?`${i.shimmerOffset%12*100}ms`:void 0},children:e})}function I({name:e,width:t}){let r=e.toUpperCase().trim().split(" "),i=`${r[0].charAt(0)}${r.length>1?r[r.length-1].charAt(0):""}`,a="number"==typeof t?`${t}px`:t;return(0,n.jsx)("div",{className:"_5jkurp0",style:{fontSize:`max(${P.vars.size.s}, min(calc(${a} / 3.75), ${P.vars.size.xxl}))`,lineHeight:a},children:i})}(0,A.createRuntimeFn)({defaultClassName:"vtc3vp1 vtc3vp0 _1vijmy91",variantClassNames:{isCircle:{true:"vtc3vp2",false:"vtc3vp3"}},defaultVariants:{},compoundVariants:[]});var O=e.i(743628),D=e.i(363847),F=e.i(753587),B=e.i(548378),G=e.i(7121),z=e.i(839091),$=e.i(479728),U=e.i(831713),W=e.i(974720);let V=["addToWatchlist","goToAddToList","markAsUnwatched","markAsWatched","removeFromWatchlist","watch","watchChannel","watchTrailer"];function H({title:e,slug:t}){let r=(0,i.useTranslations)("core.search"),[s,l]=(0,a.useState)(r("actions-menu-accessibility-label",{title:e})),[c,u]=(0,a.useState)(),d=(0,B.useDisclosureState)(),[h,f]=(0,a.useTransition)(),m=(0,$.default)(c,V),p=(0,a.useCallback)(e=>{u(t=>(0,U.default)(t??[],e))},[]),v=(0,a.useCallback)(e=>{e.nativeEvent.preventDownshiftDefault=!0,c||f(async()=>{try{let e=await (0,G.fetchLumaOnClient)(`/api/action/get-actions-for-metadata-item?slug=${encodeURIComponent(t)}&detailsSource=vod&metrics.page=search&metrics.pageLoadID=${crypto.randomUUID()}&screen.type=Custom`,{lumaCache:"always-dynamic"});u(e.actions),l(e.ui.accessibilityLabel)}catch{F.toastManager.add({description:r("actions-error")})}})},[c,t,r]),g=(0,a.useCallback)(e=>{e.nativeEvent.preventDownshiftDefault=!0},[]);return(0,n.jsxs)(D.Menu,{open:d.isOpen,onOpenChange:d.onOpenChange,children:[(0,n.jsx)(D.MenuTrigger,{children:(0,n.jsx)(o.Button,{accessibilityLabel:s,color:"transparent",icon:"overflow-vertical",iconSize:"l",size:"s",waiting:h,onPress:v})}),m.length?(0,n.jsx)(D.MenuContent,{children:m.map(e=>(0,n.jsx)(z.default,{action:e,onActionOptimisticUpdate:p,onCloseMenu:d.onClose,onPress:g},(0,W.default)(e)))}):null]})}let K=(0,a.forwardRef)(function({isHighlighted:e,isPlayable:t,label:r,monogramName:a,posterSrc:o,posterStyle:s,secondaryLabels:c,slug:u,...h},f){let m=(0,g.default)(),p=(0,i.useTranslations)("core.search");return(0,n.jsx)("div",{ref:f,className:e?E.default.listItemHighlighted:E.default.listItem,...h,children:(0,n.jsxs)(l.Stack,{align:"space-between",gap:"s",orientation:"horizontal",verticalAlign:"center",children:[(0,n.jsxs)(l.Stack,{gap:"s",orientation:"horizontal",verticalAlign:"center",children:[(0,n.jsxs)(L,{posterStyle:s,width:40,children:[a?(0,n.jsx)(I,{name:a,width:40}):null,o?(0,n.jsx)(O.default,{alt:"",layout:"fill",objectFit:"cover",sizes:"40px",src:o}):null]}),(0,n.jsxs)(l.Stack,{children:[(0,n.jsx)(d.Text,{color:"primary",font:"body-2",numberOfLines:1,children:r}),c?.length?(0,n.jsx)(d.Text,{color:"muted",font:"body-2",numberOfLines:1,children:c.join(" • ")}):null]})]}),(0,n.jsxs)(l.Stack,{gap:"xxs",orientation:"horizontal",shrink:!1,verticalAlign:"center",children:[(0,n.jsx)(l.Stack,{shrink:!1,children:t?(0,n.jsx)(M.Badge,{label:p("watch-free")}):null}),u&&m?(0,n.jsx)(H,{slug:u,title:r}):null]})]})})}),q=(0,a.forwardRef)(function({isHighlighted:e,metadataItem:t,...r},i){let a=[function(e,t){if(!t?.includes(e))switch(e){case S.MetadataType.Album:return"Album";
5case S.MetadataType.Artist:return"Artist";case S.MetadataType.Channel:return"Channel";case S.MetadataType.Clip:return"Clip";case S.MetadataType.Collection:return"Collection";case S.MetadataType.Directory:return"Directory";case S.MetadataType.Episode:return"Episode";case S.MetadataType.Game:return"Game";case S.MetadataType.Movie:return"Movie";case S.MetadataType.Person:return"Person";case S.MetadataType.Photo:return"Photo";case S.MetadataType.PhotoAlbum:return"Photo Album";case S.MetadataType.Playlist:return"Playlist";case S.MetadataType.Season:return"Season";case S.MetadataType.Show:return"TV Show";case S.MetadataType.Track:return"Track"}}(t.type,[S.MetadataType.Person])??"",t.year?String(t.year):""].filter(Boolean);return(0,n.jsx)(K,{ref:i,"data-testid":`searchResult-metadata-${t.slug}`,isHighlighted:e,isPlayable:t.type!==S.MetadataType.Person&&(t.source===(0,j.default)("tv.plex.provider.vod")||!!t.playableKey),label:t.title,monogramName:t.type===S.MetadataType.Person?t.title:void 0,posterSrc:t.thumb,posterStyle:function(e){switch(e){case S.MetadataType.Channel:case S.MetadataType.Clip:case S.MetadataType.Directory:case S.MetadataType.Episode:return"landscape";default:return"portrait"}}(t.type),secondaryLabels:a,slug:function(e){let t=e.slug??e.parentSlug??e.grandparentSlug;if(t)switch(e.type){case"movie":return _(t,"movie");case"show":return _(t,"show");case"season":if(null==e.index)return;return _(t,"season",e.index);case"episode":if(null==e.parentIndex||null==e.index)return;return _(t,"episode",e.parentIndex,e.index);default:return}}(t),...r})}),X=(0,a.forwardRef)(function({isHighlighted:e,channel:t,...r},i){let a=["Channel",t.categories?.[0]??""].filter(Boolean);return(0,n.jsx)(K,{ref:i,"data-testid":`searchResult-channel-${t.slug}`,isHighlighted:e,isPlayable:!0,label:t.title,posterSrc:t.coverPoster,posterStyle:"portrait",secondaryLabels:a,...r})}),Y=(0,a.forwardRef)(function({anchorRef:e,isOpen:t,isPlaceholder:r,isPending:i,isError:o,highlightedIndex:s,searchResults:c,getItemProps:u,onOpenChange:h,...f},m){let[p,v]=(0,T.useBoundingRectSize)(e),[g,b]=(0,k.useVisualViewportSize)(),x=b&&v?Math.max(200,b-v-100):void 0,y=(0,a.useMemo)(()=>p&&p>400?p:g&&g<600?"90vw":400,[p,g]);return(0,n.jsx)(C.Popover,{open:t,onOpenChange:h,children:(0,n.jsx)(C.PopoverContent,{anchor:e,finalFocus:!1,initialFocus:!1,width:y,children:(0,n.jsxs)(l.Stack,{ref:m,grow:!0,maxHeight:x,...f,children:[r||i?(0,n.jsx)("div",{className:E.default.emptyContainer,children:(0,n.jsx)(N.Spinner,{})}):null,o&&!i?(0,n.jsx)("div",{className:E.default.emptyContainer,children:(0,n.jsx)(d.Text,{color:"muted",font:"body-2",children:"An error occurred. Please try again later."})}):null,r||i||o?null:(0,n.jsxs)(w.Scroller,{"data-testid":"searchResults",overScroll:!1,children:[c.length?null:(0,n.jsx)("div",{className:E.default.emptyContainer,children:(0,n.jsx)(d.Text,{color:"muted",font:"body-2",children:"No results"})}),c.map((e,t)=>{let n=s===t;if("Channel"in e){let r=e.Channel,i=`result-channel-${r.slug}`;return(0,a.createElement)(X,{...u({key:i,index:t,item:r}),key:i,channel:r,isHighlighted:n})}{let r="Directory"in e?e.Directory:e.Metadata,i=`result-${r.type}-${r.slug}`;return(0,a.createElement)(q,{...u({key:i,index:t,item:r}),key:i,isHighlighted:n,metadataItem:r})}})]})]})})})}),Q=(0,a.memo)(Y),J="universalSearch",Z=`${J}-label`,ee=`${J}-menu`,et=`${J}-container`,en="search",er="searchResults";var ei=((t=ei||{}).All="livetv,movies,people,tv",t.LiveTV="livetv",t.Movies="movies",t.People="people",t.TV="tv",t);function ea(e,t){return e.find(e=>e.id===t)?.SearchResult??[]}let eo=(0,f.withErrorBoundary)(function({maxWidth:e}){let t=(0,r.useRouter)(),i=(0,g.default)(),o=(0,a.useRef)(null),s=(0,a.useRef)(null),l=(0,a.useRef)(null),[d,f]=(0,a.useState)(""),[C,w]=(0,a.useState)(""),[N,T]=(0,a.useState)(),k=function(e){switch(e){case"livetv,movies,people,tv":return"discover,plexAVOD,plexFAST";case"livetv":return"plexFAST";case"movies":case"tv":return"discover,plexAVOD";case"people":return"discover"}}("livetv,movies,people,tv"),{data:_,error:S}=(0,b.default)(C?`https://discover.provider.plex.tv/library/search?searchTypes=livetv,movies,people,tv&searchProviders=${k}&includeMetadata=1&filterPeople=1&limit=10&query=${encodeURIComponent(C)}`:null,{skipAuth:!0,config:{loadingTimeout:1e3,onLoadingSlow:()=>T(void 0)}}),j=!C,E=!!(C&&!N),M=!!(C&&S),A=(0,a.useMemo)(()=>{let e=N?.MediaContainer?.SearchResults;if(!e)return[];let t=ea(e,"plex"),n=ea(e,"external"),r=ea(e,"people"),i=ea(e,"liveTv").filter(e=>"Channel"in e);
5return t.concat(n,i,r).filter((e,t,n)=>!("Metadata"in e)||n.findIndex(t=>"Metadata"in t&&e.Metadata.guid===t.Metadata.guid)===t).sort((e,t)=>t.score-e.score).slice(0,10)},[10,N?.MediaContainer?.SearchResults]),{isOpen:P,getLabelProps:R,getMenuProps:L,getInputProps:I,highlightedIndex:O,getItemProps:D,closeMenu:F,openMenu:B,reset:G}=(0,c.useCombobox)({id:J,labelId:Z,menuId:ee,items:A,itemToString:e=>e?"Channel"in e?e.Channel.title:"Directory"in e?e.Directory.title:e.Metadata.title:"",stateReducer:(e,t)=>{let{type:n,changes:r}=t;switch(n){case c.useCombobox.stateChangeTypes.ItemClick:case c.useCombobox.stateChangeTypes.InputKeyDownEnter:return{...r,isOpen:n===c.useCombobox.stateChangeTypes.InputKeyDownEnter||r.isOpen,inputValue:e.inputValue};case c.useCombobox.stateChangeTypes.InputChange:return{...r,isOpen:!!r.inputValue};case c.useCombobox.stateChangeTypes.InputClick:return{...r,isOpen:!!e.inputValue};case c.useCombobox.stateChangeTypes.InputBlur:{let e=document.querySelector('[role="dialog"]:not([aria-hidden="true"])'),t=document.querySelector('[role="menu"]:not([aria-hidden="true"])');if(e&&!e.contains(s.current)||t&&!t.contains(s.current))return{...r,isOpen:!0};return r}default:return r}},onSelectedItemChange(e){let n,r=e.selectedItem;if(r){if(n="Channel"in r?(0,x.getChannelRoute)(r.Channel.slug):(0,x.getRouteForMetadataItem)("Directory"in r?r.Directory:r.Metadata)){var a,o;let e,r=i?(a=n,o=O,e=new URLSearchParams({[v.CONTEXT_SEARCH_PARAM_GROUP_ID]:er,[v.CONTEXT_SEARCH_PARAM_GROUP_INDEX]:"0",[v.CONTEXT_SEARCH_PARAM_ITEM_INDEX]:String(o),[v.CONTEXT_SEARCH_PARAM_PAGE]:en}),`${a}${a.includes("?")?"&":"?"}${e}`):n;(0,m.startProgress)(r),t.push(r),l.current?.blur()}(0,p.default)({event:"client:click",properties:{action:"searchResultSelect",context:`${en}:${er}`,contextGroupId:er,contextGroupIndex:0,contextItemIndex:O,contextPage:en,index:O,page:en,value:d}})}},onInputValueChange({inputValue:e}){f(e??"")}}),z=(0,a.useCallback)(e=>{if("Home"===e.key||"End"===e.key){e.nativeEvent.preventDownshiftDefault=!0,e.preventDefault();let t=e.currentTarget,n="Home"===e.key?0:t.value.length;t.setSelectionRange(n,n)}},[]),$=(0,a.useCallback)(()=>{d&&B()},[B,d]),U=(0,a.useCallback)(e=>{(e.relatedTarget?.closest('[role="dialog"]')||e.relatedTarget?.closest('[role="menu"]'))&&(e.nativeEvent.preventDownshiftDefault=!0)},[]),W=(0,a.useCallback)(()=>{G()},[G]),V=(0,a.useCallback)(e=>{e?B():document.activeElement!==l.current&&F()},[F,B]);return(0,a.useEffect)(()=>{let e;return d!==C?e=window.setTimeout(()=>{w(d)},200):d||(w(""),T(void 0)),()=>{e&&window.clearTimeout(e)}},[C,d]),(0,a.useEffect)(()=>{_&&T(_)},[_]),(0,n.jsxs)("div",{className:y.default.searchContainer,id:et,children:[(0,n.jsx)(h.VisuallyHidden,{children:(0,n.jsx)("label",{...R(),children:"Find Movies & TV"})}),(0,n.jsx)(u.SearchInput,{ref:o,iconSize:["l","l","m"],inputProps:I({ref:l,autoComplete:"off",autoCapitalize:"none",autoCorrect:"off",onKeyDown:z,onFocus:$,onBlur:U}),maxWidth:e,onClearPress:W}),(0,n.jsx)(Q,{...L({ref:s},{suppressRefError:!0}),anchorRef:o,getItemProps:D,highlightedIndex:O,isError:M,isOpen:P,isPending:E,isPlaceholder:j,searchResults:A,onOpenChange:V})]})},(0,n.jsx)(function(){return(0,n.jsxs)(l.Stack,{gap:"xs",orientation:"horizontal",verticalAlign:"center",children:[(0,n.jsx)(s.IconWarningBadge,{}),(0,n.jsx)(d.Text,{numberOfLines:1,children:"Search is unavailable"})]})},{}));var es=e.i(492482),el=e.i(6604);function ec({id:e,...t}){let r=(0,a.useCallback)(t=>{let n;(0,es.showNavMenuContent)([e,Math.floor((n=t.currentTarget.getBoundingClientRect()).x+n.width/2),!0])},[e]);return(0,n.jsx)("li",{children:(0,n.jsx)(l.Hidden,{at:["s","m"],children:(0,n.jsx)(o.ButtonLink,{...t,id:e,onFocus:r,onMouseEnter:r,onPress:r})})})}var eu=e.i(796049);e.s(["default",0,function({hasSearchButton:e,vodLabelKey:t}){let c=(0,r.usePathname)(),u=(0,i.useTranslations)("watch.navigation"),d=(0,a.useCallback)(()=>{(0,es.hideNavMenuContent)()},[]);return(0,n.jsx)(l.Stack,{as:"nav",grow:!0,children:(0,n.jsxs)(l.Stack,{as:"ul",gap:["none","xs"],grow:!0,orientation:"horizontal",verticalAlign:"center",children:[(0,n.jsx)(l.Stack,{as:"li",paddingRight:["m","xs"],children:(0,n.jsx)(o.ButtonLink,{accessibilityLabel:u("home"),color:"always-transparent",href:"/",icon:s.IconPlexLogo,iconSize:"xl",onFocus:d,onMouseEnter:d})}),e?(0,n.jsx)("li",{children:(0,n.jsx)(l.Hidden,{at:"s",children:(0,n.jsx)(eu.default,{iconSize:"m",onFocus:d,onMouseEnter:d})})}):(0,n.jsx)(l.Stack,{as:"li",grow:!0,maxWidth:400,children:(0,n.jsx)(eo,{maxWidth:"100%"})}),(0,n.jsx)(ec,{active:c.startsWith("/live-tv"),color:"transparent",href:"/live-tv",id:el.NavMenuContentID.LiveTV,label:u("live-tv")}),(0,n.jsx)(ec,{active:c.startsWith("/on-demand"),color:"transparent",href:"/on-demand",id:el.NavMenuContentID.OnDemand,label:u(t)}),(0,n.jsx)("li",{children:(0,n.jsx)(l.Hidden,{at:["s","m"],children:(0,n.jsx)(o.ButtonLink,{active:c.startsWith("/discover")||c.startsWith("/me/discover"),color:"transparent",href:"/discover/trending",label:u("discover"),onFocus:d,onMouseEnter:d})})})]})})}],292668)},701775,e=>{"use strict";var t=e.i(730295),n=e.i(630242),r=e.i(970116),i=e.i(706286);e.s(["default",0,function(){var e,a;let o,s,l=(0,t.useInvalidateNavigationNotifications)();return e="notifyInAppNotification",a=()=>Promise.all([(0,i.revalidatePagePath)("/[locale]/account/notifications"),l(
5)]),o=(0,n.useContext)(r.PubSubContext),s=(0,n.useRef)(a),(0,n.useEffect)(()=>{s.current=a}),(0,n.useEffect)(()=>{if(o)return o.subscribe(e,e=>s.current(e))},[e,o]),null}],701775)}]);

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.