PageSourceSearch

https://explore.org/_next/static/chunks/06hzu81x1-rzg.js?dpl=8f7616c

js explore.org collected 2026-10-01 07:32:33 UTC 43,418 bytes, 28 lines download raw bytes

1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="e963c177-a4a0-c6f5-6289-ce0b3f4ecaa9")}catch(e){}}();
2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,946383,663870,e=>{"use strict";var t=e.i(843476),r=e.i(500932),i=e.i(271645),s=e.i(657688),l=e.i(5771);function n(e,t){let s,l=(0,r.c)(2),[n,a]=(0,i.useState)(t),[o,u]=(0,i.useState)(e);return o!==e&&(u(e),a(t)),l[0]!==n?(s=[n,a],l[0]=n,l[1]=s):s=l[1],s}e.s(["useResettableState",0,n],663870);var a=e.i(647163);let o=new Set(["www.youtube.com","youtube.com","m.youtube.com"]),u=()=>{};function c(e){let s,n,a,o,u,c=(0,r.c)(10),{videoId:d,title:h,refreshKey:m,onShown:f}=e,p=(0,i.useRef)(null);c[0]!==f?(s={onShown:f},c[0]=f,c[1]=s):s=c[1];let w=(0,i.useRef)(s);c[2]!==f?(n=()=>{w.current={onShown:f}},c[2]=f,c[3]=n):n=c[3],(0,i.useEffect)(n),c[4]===Symbol.for("react.memo_cache_sentinel")?(a=()=>{w.current.onShown()},c[4]=a):a=c[4];let v=a,g=`${d}:${m}`,b=`https://www.youtube.com/embed/${d}`;return c[5]===Symbol.for("react.memo_cache_sentinel")?(o={enablejsapi:1,iv_load_policy:3,rel:0,origin:window.location.origin,referrerpolicy:"strict-origin-when-cross-origin"},c[5]=o):o=c[5],c[6]!==g||c[7]!==b||c[8]!==h?(u=(0,t.jsx)(l.default,{ref:p,controls:!0,className:"tw:absolute tw:inset-0 tw:w-full tw:h-full tw:border-0",src:b,autoplay:!0,playsInline:!0,config:o,onLoadedMetadata:v,crossOrigin:"anonymous",title:h},g),c[6]=g,c[7]=b,c[8]=h,c[9]=u):u=c[9],u}function d(e){let i,s=(0,r.c)(5),{url:l,title:n,refreshKey:a,onShown:o}=e;return s[0]!==o||s[1]!==a||s[2]!==n||s[3]!==l?(i=(0,t.jsx)("iframe",{src:l,title:n,onLoad:o,className:"tw:absolute tw:inset-0 tw:w-full tw:h-full tw:border-0",allowFullScreen:!0,allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",referrerPolicy:"strict-origin-when-cross-origin"},a),s[0]=o,s[1]=a,s[2]=n,s[3]=l,s[4]=i):i=s[4],i}function h({url:r,title:s,refreshKey:l,onShown:n,onFailed:a}){let o=(0,i.useRef)(null),u=(0,i.useRef)(a);return(0,i.useEffect)(()=>{u.current=a},[a]),(0,i.useEffect)(()=>
2{let t=o.current;if(!t)return;if(t.canPlayType("application/vnd.apple.mpegurl")){t.src=r;return}let i=!1,s=null;return e.A(270308).then(({default:e})=>{if(i||!o.current||!e.isSupported())return;let t=new e;t.on(e.Events.ERROR,(e,t)=>{t.fatal&&u.current()}),t.loadSource(r),t.attachMedia(o.current),s=t}),()=>{i=!0,s&&s.destroy()}},[r,l]),(0,t.jsx)("video",{ref:o,title:s,autoPlay:!0,muted:!0,playsInline:!0,controls:!0,onPlaying:n,onError:a,className:"tw:absolute tw:inset-0 tw:w-full tw:h-full tw:bg-black"})}function m(e){let s,l,n,a,o=(0,r.c)(10),{html:u,refreshKey:c,onShown:d}=e;return o[0]!==d?(s=()=>{d()},o[0]=d,o[1]=s):s=o[1],o[2]!==d||o[3]!==c?(l=[c,d],o[2]=d,o[3]=c,o[4]=l):l=o[4],(0,i.useEffect)(s,l),o[5]!==u?(n={__html:u},o[5]=u,o[6]=n):n=o[6],o[7]!==c||o[8]!==n?(a=(0,t.jsx)("div",{className:"tw:absolute tw:inset-0 tw:w-full tw:h-full [&_iframe]:tw:w-full [&_iframe]:tw:h-full [&_iframe]:tw:border-0",dangerouslySetInnerHTML:n},c),o[7]=c,o[8]=n,o[9]=a):a=o[9],a}function f(e){let l,n,o,u,c,d,h=(0,r.c)(11),{feed:m,onShown:f}=e;return h[0]!==f?(l=()=>{f()},n=[f],h[0]=f,h[1]=l,h[2]=n):(l=h[1],n=h[2]),(0,i.useEffect)(l,n),h[3]!==m.thumbnail_large_url?(o=m.thumbnail_large_url&&(0,t.jsx)(s.default,{src:(0,a.toHttps)(m.thumbnail_large_url),alt:"",fill:!0,unoptimized:!0,className:"tw:object-cover tw:opacity-25",sizes:"(max-width: 768px) 100vw, 60vw"}),h[3]=m.thumbnail_large_url,h[4]=o):o=h[4],h[5]===Symbol.for("react.memo_cache_sentinel")?(u=(0,t.jsx)("p",{className:"tw:text-white tw:text-2xl tw:font-semibold tw:mb-2",children:"Stream is offline"}),h[5]=u):u=h[5],h[6]!==m.title?(c=(0,t.jsxs)("div",{className:"tw:relative tw:z-10 tw:text-center tw:px-6",children:[u,(0,t.jsxs)("p",{className:"tw:text-white/60 tw:text-sm",children:[m.title," isn't broadcasting right now"]})]}),h[6]=m.title,h[7]=c):c=h[7],h[8]!==o||h[9]!==c?(d=(0,t.jsxs)("div",{className:"tw:absolute tw:inset-0 tw:flex tw:flex-col tw:items-center tw:justify-center tw:bg-neutral-900",children:[o,c]}),h[8]=o,h[9]=c,h[10]=d):d=h[10],d}e.s(["FeedScreen",0,function(e){let i,s,l,a=(0,r.c)(30),{feed:p,refreshKey:w,onShown:v}=e,g=void 0===v?u:v,[b,y]=n(`${p.id}:${w}`,!1);a[0]!==y?(i=()=>y(!0),a[0]=y,a[1]=i):i=a[1];let S=i;a[2]!==p.large_feed_html?(s=function(e){if(!e)return{type:"none"};let t=e.trim();if(t.startsWith("<"))return{type:"html",value:t};try{let e=new URL(t);if(e.pathname.endsWith(".m3u8")||e.pathname.endsWith(".m3u8/"))return{type:"hls",value:t};if(o.has(e.hostname)){if("/watch"===e.pathname){let t=e.searchParams.get("v");if(t)return{type:"youtube",value:t}}if(e.pathname.startsWith("/embed/")){let t=e.pathname.slice(7).split("/")[0];if(t)return{type:"youtube",value:t}}}if("youtu.be"===e.hostname){let t=e.pathname.slice(1);if(t)return{type:"youtube",value:t}}return{type:"url",value:t}}catch{return{type:"url",value:t}}}(p.large_feed_html),a[2]=p.large_feed_html,a[3]=s):s=a[3];let x=s;if(b||p.force_offline){let e;return a[4]!==p||a[5]!==g?(e=(0,t.jsx)(f,{feed:p,onShown:g}),a[4]=p,a[5]=g,a[6]=e):e=a[6],e}if("youtube"===x.type){let e;return a[7]!==p.title||a[8]!==x.value||a[9]!==g||a[10]!==w?(e=(0,t.jsx)(c,{videoId:x.value,title:p.title,refreshKey:w,onShown:g}),a[7]=p.title,a[8]=x.value,a[9]=g,a[10]=w,a[11]=e):e=a[11],e}if("html"===x.type){let e;return a[12]!==x.value||a[13]!==g||a[14]!==w?(e=(0,t.jsx)(m,{html:x.value,refreshKey:w,onShown:g}),a[12]=x.value,a[13]=g,a[14]=w,a[15]=e):e=a[15],e}if("hls"===x.type){let e;return a[16]!==p.title||a[17]!==S||a[18]!==x.value||a[19]!==g||a[20]!==w?(e=(0,t.jsx)(h,{url:x.value,title:p.title,refreshKey:w,onShown:g,onFailed:S}),a[16]=p.title,a[17]=S,a[18]=x.value,a[19]=g,a[20]=w,a[21]=e):e=a[21],e}if("url"===x.type){let e;return a[22]!==p.title||a[23]!==x.value||a[24]!==g||a[25]!==w?(e=(0,t.jsx)(d,{url:x.value,title:p.title,refreshKey:w,onShown:g}),a[22]=p.title,a[23]=x.value,a[24]=g,a[25]=w,a[26]=e):e=a[26],e}return a[27]!==p||a[28]!==g?(l=(0,t.jsx)(f,{feed:p,onShown:g}),a[27]=p,a[28]=g,a[29]=l):l=a[29],l}],946383)},806357,331817,e=>{"use strict";var t=e.i(843476),r=e.i(271645),i=e.i(671428),s=e.i(765988);async function l(e,t){let r=(await fetch(e,{cache:"no-store"}).then(e=>e.text())).split("\n").filter(e=>e.trim()&&!e.startsWith("#"));if(0===r.length)return[];let i=e.substring(0,e.lastIndexOf("/")+1);return r.flatMap(e=>{try{let r=e.trim().startsWith("http")?e.trim():i+e.trim(),s=new URL(r);s.hostname=t;let l=s.href.match(/(\d{8}T\d{6})/gm);if(!l?.[0])return[];let n=l[0],a=`${n.slice(0,4)}-${n.slice(4,6)}-${n.slice(6,8)}T${n.slice(9,11)}:${n.slice(11,13)}:${n.slice(13,15)}Z`,o=Math.floor(new Date(a).getTime()/1e3);return[{url:`${s.href}.thumbnail.jpg`,fullUrl:`${s.href}.jpg`,utcTimestamp:o}]}catch{return[]}})}
2e.s(["fetchM3u8Fragments",0,l],331817);var n=e.i(647163);e.s(["LiveThumbnail",0,function({streamId:e,fallbackSrc:a,alt:o,onStreamState:u}){let c=(0,s.useStreamStatesContext)(),d=c?.streams.get(e),h=c?.tick??0,[m,f]=(0,r.useState)(null),[p,w]=(0,r.useState)(!1),[v,g]=(0,r.useState)(!1),b=(0,r.useRef)(null),y=(0,r.useRef)(u);(0,r.useEffect)(()=>{y.current=u},[u]),(0,r.useEffect)(()=>{let e=b.current;if(!e)return;let t=new IntersectionObserver(([e])=>g(e.isIntersecting),{rootMargin:"100px"});return t.observe(e),()=>t.disconnect()},[]),(0,r.useEffect)(()=>{let t=!1;return(async()=>{if(!c){t||w(!0);return}let r=d?.state??"unavailable";if((y.current?.(r),v)&&(!e||0!==h)){if(d?.stillUrl){if("on_demand"===d.state){t||(f(null),w(!0));return}if(!t){let e=d.stillUrl.replace(/\/latest\.jpg$/,"/latest.thumbnail.jpg");f(`${e}?t=${Math.floor(Date.now()/1e4)}`),w(!0)}return}if(d?.playlistUrl&&d?.snapshotHost){try{let e=await l(d.playlistUrl,d.snapshotHost);!t&&e[0]?.url&&f(e[0].url)}catch{}t||w(!0);return}t||w(!0)}})(),()=>{t=!0}},[c,d,h,e,v]);let S=m?(0,n.toHttps)(m):null,x=a?(0,n.toHttps)(a):null,_=S??(p?x:null);return(0,t.jsx)("div",{ref:b,className:"tw:absolute tw:inset-0",children:_?(0,t.jsx)("img",{src:_,alt:o,className:"tw:absolute tw:inset-0 tw:w-full tw:h-full tw:object-cover tw:group-hover:opacity-80 tw:transition-opacity"}):p?(0,t.jsx)("div",{className:"tw:absolute tw:inset-0 tw:bg-neutral-800"}):(0,t.jsx)(i.Skeleton,{className:"tw:absolute tw:inset-0"})})}],806357)},508903,391384,89315,835764,e=>{"use strict";var t=e.i(843476),r=e.i(500932),i=e.i(271645),s=e.i(770703),l=e.i(618566),n=e.i(741120),a=e.i(167881),o=e.i(62870),u=e.i(369738),c=e.i(912598),d=e.i(381384),h=e.i(673664),m=e.i(427001),f=e.i(254440),p=e.i(619273),w=e.i(915823),v=e.i(540143),g=e.i(869230);function b(e,t){let r=new Set(t);return e.filter(e=>!r.has(e))}var y=class extends w.Subscribable{#e;#t;#r;#i;#s;#l;#n;#a;#o;#u=[];constructor(e,t,r){super(),this.#e=e,this.#i=r,this.#r=[],this.#s=[],this.#t=[],this.setQueries(t)}onSubscribe(){1===this.listeners.size&&this.#s.forEach(e=>{e.subscribe(t=>{this.#c(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#s.forEach(e=>{e.destroy()})}setQueries(e,t){this.#r=e,this.#i=t,v.notifyManager.batch(()=>{let e=this.#s,t=this.#d(this.#r);t.forEach(e=>e.observer.setOptions(e.defaultedQueryOptions));let r=t.map(e=>e.observer),i=r.map(e=>e.getCurrentResult()),s=e.length!==r.length,l=r.some((t,r)=>t!==e[r]),n=s||l,a=!!n||i.some((e,t)=>{let r=this.#t[t];return!r||!(0,p.shallowEqualObjects)(e,r)});(n||a)&&(n&&(this.#u=t,this.#s=r),this.#t=i,this.hasListeners()&&(n&&(b(e,r).forEach(e=>{e.destroy()}),b(r,e).forEach(e=>{e.subscribe(t=>{this.#c(e,t)})})),this.#h()))})}getCurrentResult(){return this.#t}getQueries(){return this.#s.map(e=>e.getCurrentQuery())}getObservers(){return this.#s}getOptimisticResult(e,t){let r=this.#d(e),i=r.map(e=>e.observer.getOptimisticResult(e.defaultedQueryOptions)),s=r.map(e=>e.defaultedQueryOptions.queryHash);return[i,e=>this.#m(e??i,t,s),()=>this.#f(i,r)]}#f(e,t){let r=new Set;return t.map((i,s)=>{let l=e[s];return i.defaultedQueryOptions.notifyOnChangeProps?l:i.observer.trackResult(l,e=>{r.has(e)||(r.add(e),t.forEach(t=>{t.observer.trackProp(e)}))})})}#m(e,t,r){if(t){let i=this.#o,s=void 0!==r&&void 0!==i&&(i.length!==r.length||r.some((e,t)=>e!==i[t]));return(this.#t!==this.#a||s||t!==this.#n)&&(this.#n=t,this.#a=this.#t,void 0!==r&&(this.#o=r),this.#l=(0,p.replaceEqualDeep)(this.#l,t(e))),this.#l}return e}#p(){return!this.#i?.combine||this.#s.some((e,t)=>e.options.suspense&&this.#t[t]?.data===void 0)}#d(e){let t=new Map;this.#s.forEach(e=>{let r=e.options.queryHash;if(!r)return;let i=t.get(r);i?i.push(e):t.set(r,[e])});let r=[];return e.forEach(e=>{let i=this.#e.defaultQueryOptions(e),s=t.get(i.queryHash)?.shift()??new g.QueryObserver(this.#e,i);r.push({defaultedQueryOptions:i,observer:s})}),r}#c(e,t){let r=this.#s.indexOf(e);if(-1!==r){var i;let e;this.#t=(i=this.#t,(e=i.slice(0))[r]=t,e),this.#h()}}#h(){if(this.hasListeners()){let e=this.#p(),t=this.#l,r=e?t:this.#m(this.#f(this.#t,this.#u),this.#i?.combine);(e||t!==r)&&v.notifyManager.batch(()=>
2{this.listeners.forEach(e=>{e(this.#t)})})}}},S=e.i(266027),x=e.i(758173);let _=`
3  query BoardsForLivecams($ids: [String!]!) {
4    boardsForLivecams(input: { livecam_legacy_ids: $ids }) {
5      board_id
6      livecam_canonical_uri
7      livecam_legacy_id
8    }
9  }
10`;var E=e.i(296006);function R(e,t,r){return"titles"===e?1===r.length?r[0].title:r[0]?.cam_group?.title??r.map(e=>e.title).join(" · "):4===t.length?"Board Comments":`Board ${t.join("·")}`}function k(e){let t,s,l=(0,r.c)(4);return l[0]!==e?(t=e.map(L),l[0]=e,l[1]=t):t=l[1],l[2]!==t?(s={queries:t,combine(e){let t=new Map;return e.forEach(e=>{e.data?.data&&t.set(e.data.data.id,e.data.data)}),{detailedById:t,isLoading:e.some(C)}}},l[2]=t,l[3]=s):s=l[3],function({queries:e,...t}){let r=(0,c.useQueryClient)(void 0),s=(0,d.useIsRestoring)(),l=(0,h.useQueryErrorResetBoundary)(),n=!1!==t.subscribed,a=i.useMemo(()=>e.map(e=>{let t=r.defaultQueryOptions(e);return t._optimisticResults=s?"isRestoring":n?"optimistic":void 0,t}),[e,r,s,n]);a.forEach(e=>{(0,f.ensureSuspenseTimers)(e);let t=r.getQueryCache().get(e.queryHash);(0,m.ensurePreventErrorBoundaryRetry)(e,l,t)}),(0,m.useClearResetErrorBoundary)(l);let[o]=i.useState(()=>new y(r,a,t)),[u,w,b]=o.getOptimisticResult(a,t.combine),S=!s&&n;i.useSyncExternalStore(i.useCallback(e=>S?o.subscribe(v.notifyManager.batchCalls(e)):p.noop,[o,S]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),i.useEffect(()=>{o.setQueries(a,t)},[a,t,o]);let x=u.some((e,t)=>(0,f.shouldSuspend)(a[t],e))?u.flatMap((e,t)=>{let i=a[t];if(i&&(0,f.shouldSuspend)(i,e)){let e=new g.QueryObserver(r,i);return(0,f.fetchOptimistic)(i,e,l)}return[]}):[];if(x.length>0)throw Promise.all(x);let _=u.find((e,t)=>{let i=a[t];return i&&(0,m.getHasError)({result:e,errorResetBoundary:l,throwOnError:i.throwOnError,query:r.getQueryCache().get(i.queryHash),suspense:i.suspense})});if(_?.error)throw _.error;return w(b())}(s)}function C(e){return e.isLoading}function L(e){return{queryKey:["livecam-info",e],queryFn:()=>u.Result.unwrap((0,E.getLivecamInfo)(e)),staleTime:3e4}}function P(e){let t,i,s,l=(0,r.c)(11);l[0]!==e?(t=e.map(j),l[0]=e,l[1]=t):t=l[1];let{detailedById:n,isLoading:a}=k(t);if(a){let e,t;return l[2]===Symbol.for("react.memo_cache_sentinel")?(e=[],l[2]=e):e=l[2],l[3]===Symbol.for("react.memo_cache_sentinel")?(t={feeds:e,isLoading:!0},l[3]=t):t=l[3],t}if(l[4]!==n||l[5]!==e){let t;l[7]!==n?(t=e=>n.get(e.id)??e,l[7]=n,l[8]=t):t=l[8],i=e.map(t).filter(T),l[4]=n,l[5]=e,l[6]=i}else i=l[6];return l[9]!==i?(s={feeds:i,isLoading:!1},l[9]=i,l[10]=s):s=l[10],s}function T(e){return!!e}function j(e){return e.id}function M(e){return P(e.feeds)}function N(e){return!!e}function I(e,t){let i,s,l,n,a,o,c=(0,r.c)(22),d=void 0===t?"indexes":t;c[0]!==e?(i=e.map($).sort(),c[0]=e,c[1]=i):i=c[1];let h=i;c[2]!==h?(s=["boards-for-livecams",h],l=()=>u.Result.unwrap(u.Result.pipe((0,x.gqlRequest)(_,{ids:h}),u.Result.map(e=>e.boardsForLivecams))),c[2]=h,c[3]=s,c[4]=l):(s=c[3],l=c[4]);let m=h.length>0;c[5]!==s||c[6]!==l||c[7]!==m?(n={queryKey:s,queryFn:l,enabled:m,staleTime:3e5},c[5]=s,c[6]=l,c[7]=m,c[8]=n):n=c[8];let{data:f,isLoading:p}=(0,S.useQuery)(n);e:{let t;if(!f||0===f.length){let t;if(c[9]!==e||c[10]!==d){let r;c[12]!==d?(r=(e,t)=>({livecamId:e.id,label:R(d,[t+1],[e])}),c[12]=d,c[13]=r):r=c[13],t=e.map(r),c[9]=e,c[10]=d,c[11]=t}else t=c[11];a=t;break e}if(c[14]!==f||c[15]!==e||c[16]!==d){let r=new Map(f.map(O)),i=new Map;e.forEach((e,t)=>{let s=r.get(String(e.id));if(!s)return;i.has(s)||i.set(s,{livecamId:0,livecamIndexes:[],boardFeeds:[]});let l=i.get(s);l.livecamId=e.id,l.livecamIndexes.push(t+1),l.boardFeeds.push(e)}),t=Array.from(i.values()).map(e=>{let{livecamId:t,livecamIndexes:r,boardFeeds:i}=e;return{livecamId:t,label:R(d,r,i)}}),c[14]=f,c[15]=e,c[16]=d,c[17]=t}else t=c[17];a=t}let w=a,v=w.length>0?w[0].livecamId:null;return c[18]!==w||c[19]!==v||c[20]!==p?(o={buttons:w,defaultLivecamId:v,isLoading:p},c[18]=w,c[19]=v,c[20]=p,c[21]=o):o=c[21],o}function O(e){return[e.livecam_legacy_id,e.board_id]}function $(e){return String(e.id)}e.s(["useFeedDetails",0,P,"useFeedsByIds",0,function(e){let t,i,s=(0,r.c)(9),{detailedById:l,isLoading:n}=k(e);if(n){let e,t;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=[],s[0]=e):e=s[0],s[1]===Symbol.for("react.memo_cache_sentinel")?(t={feeds:e,isLoading:!0},s[1]=t):t=s[1],t}if(s[2]!==l||s[3]!==e){let r;s[5]!==l?(r=e=>l.get(e),s[5]=l,s[6]=r):r=s[6],t=e.map(r).filter(N),s[2]=l,s[3]=e,s[4]=t}else t=s[4];return s[7]!==t?(i={feeds:t,isLoading:!1},s[7]=t,s[8]=i):i=s[8],i},"useMultiviewBoards",0,I,"useMultiviewFeeds",0,M],391384);let A=(0,s.default)(()=>
10e.A(387172),{loadableGenerated:{modules:[156929]},ssr:!1}),F=(0,i.createContext)({feeds:[],buttons:[],currentLivecamId:null,setCurrentLivecamId:()=>{},isLoading:!0,commentsRef:{current:null}});function q(e){let s,n,a,o,u=(0,r.c)(11),{feeds:c,isFeedsLoading:d,labelStyle:h,children:m}=e,f=(0,l.useSearchParams)(),p=(0,i.useRef)(null),[w,v]=(0,i.useState)(null),{buttons:g,defaultLivecamId:b,isLoading:y}=I(c,void 0===h?"indexes":h);u[0]!==f?(s=f.get("livecam"),u[0]=f,u[1]=s):s=u[1];let S=s,x=S?Number(S):null,_=b;x&&g.some(e=>e.livecamId===x)?_=x:w&&g.some(e=>e.livecamId===w)&&(_=w),u[2]===Symbol.for("react.memo_cache_sentinel")?(n=e=>{v(e);let t=new URLSearchParams(window.location.search);t.set("livecam",String(e)),window.history.replaceState(null,"",`?${t.toString()}`)},u[2]=n):n=u[2];let E=n,R=void 0!==d&&d||y;u[3]!==g||u[4]!==_||u[5]!==c||u[6]!==R?(a={feeds:c,buttons:g,currentLivecamId:_,setCurrentLivecamId:E,isLoading:R,commentsRef:p},u[3]=g,u[4]=_,u[5]=c,u[6]=R,u[7]=a):a=u[7];let k=a;return u[8]!==m||u[9]!==k?(o=(0,t.jsx)(F.Provider,{value:k,children:m}),u[8]=m,u[9]=k,u[10]=o):o=u[10],o}function H(){return(0,i.useContext)(F)}function V(e){let i,s,l,n,a,u,c=(0,r.c)(20),{scrollToComments:d}=e,h=void 0!==d&&d,{buttons:m,currentLivecamId:f,setCurrentLivecamId:p,commentsRef:w}=H();if(0===m.length)return null;if(c[0]!==m||c[1]!==f){let e;c[3]!==f?(e=e=>e.livecamId===f,c[3]=f,c[4]=e):e=c[4],i=m.find(e),c[0]=m,c[1]=f,c[2]=i}else i=c[2];let v=i,g=v?v.label:"Select board",b=f?String(f):void 0;return c[5]!==w||c[6]!==h||c[7]!==p?(s=e=>{p(Number(e)),h&&w.current?.scrollIntoView({behavior:"smooth",block:"start"})},c[5]=w,c[6]=h,c[7]=p,c[8]=s):s=c[8],c[9]!==g?(l=(0,t.jsx)(o.SelectTrigger,{"aria-label":"Comment board",className:"tw:max-w-56 tw:uppercase tw:tracking-wider tw:text-sm tw:font-medium tw:border-neutral-400 tw:bg-neutral-50",children:(0,t.jsx)("span",{className:"tw:min-w-0 tw:truncate",children:g})}),c[9]=g,c[10]=l):l=c[10],c[11]!==m?(n=m.map(B),c[11]=m,c[12]=n):n=c[12],c[13]!==n?(a=(0,t.jsx)(o.SelectContent,{side:"bottom",alignItemWithTrigger:!1,className:"tw:w-auto! tw:min-w-(--anchor-width) tw:max-w-(--available-width)",children:n}),c[13]=n,c[14]=a):a=c[14],c[15]!==b||c[16]!==s||c[17]!==l||c[18]!==a?(u=(0,t.jsxs)(o.Select,{value:b,onValueChange:s,children:[l,a]}),c[15]=b,c[16]=s,c[17]=l,c[18]=a,c[19]=u):u=c[19],u}function B(e){let{livecamId:r,label:i}=e;return(0,t.jsx)(o.SelectItem,{value:String(r),children:(0,t.jsx)("span",{className:"tw:block tw:max-w-[calc(var(--available-width)-4rem)] tw:truncate",children:i})},r)}function U(e){return e+1}e.s(["CamGroupBoardProvider",0,function(e){let i,s=(0,r.c)(4),{camGroup:l,children:n}=e,{feeds:a,isLoading:o}=M(l);return s[0]!==n||s[1]!==a||s[2]!==o?(i=(0,t.jsx)(q,{feeds:a,isFeedsLoading:o,children:n}),s[0]=n,s[1]=a,s[2]=o,s[3]=i):i=s[3],i},"MultiviewBoardButtons",0,function(){let e,i=(0,r.c)(1);return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)(V,{scrollToComments:!0}),i[0]=e):e=i[0],e},"MultiviewBoardComments",0,function(e){let s,o,u,c,d,h,m,f,p,w,v,g,b,y,S=(0,r.c)(38),{camGroupSlug:x}=e,{currentLivecamId:_,feeds:E,isLoading:R,commentsRef:k}=H(),[C,L]=(0,i.useState)(0),P=(0,l.usePathname)(),T=(0,l.useRouter)(),j=(0,l.useSearchParams)();S[0]!==j?(s=j.get("commentId")??void 0,S[0]=j,S[1]=s):s=S[1];let M=s;if(S[2]!==_||S[3]!==E){let e;S[5]!==_?(e=e=>e.id===_,S[5]=_,S[6]=e):e=S[6],o=E.find(e),S[2]=_,S[3]=E,S[4]=o}else o=S[4];let N=o,I=x??N?.cam_group?.slug,O=N&&I?`/livecams/${I}/${N.slug}`:void 0;S[7]===Symbol.for("react.memo_cache_sentinel")?(u=()=>L(U),S[7]=u):u=S[7];let $=u;S[8]!==P||S[9]!==T||S[10]!==j?(c=()=>{let e=new URLSearchParams(j.toString());e.delete("commentId");let t=e.toString();T.replace(t?`${P}?${t}`:P,{scroll:!1})},S[8]=P,S[9]=T,S[10]=j,S[11]=c):c=S[11];let F=c;if(S[12]!==M||S[13]!==k||S[14]!==_||S[15]!==R?(d=()=>{if(!M||R||!_)return;let e=setTimeout(()=>{let e=document.getElementById(`comment-${M}`);e?e.scrollIntoView({behavior:"smooth",block:"center"}):k.current?.scrollIntoView({behavior:"smooth",block:"start"})},400);return()=>clearTimeout(e)},h=[M,R,_,k],S[12]=M,S[13]=k,S[14]=_,S[15]=R,S[16]=d,S[17]=h):(d=S[16],h=S[17]),(0,i.useEffect)(d,h),R||!_){let e;return S[18]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("div",{className:"tw:flex tw:items-center tw:justify-center tw:py-12",children:(0,t.jsx)(n.RefreshCw,{className:"tw:size-5 tw:animate-spin tw:text-neutral-400"})}),S[18]=e):e=S[18],e}S[19]===Symbol.for("react.memo_cache_sentinel")?(m=(0,t.jsx)("div",{className:"tw:flex tw:items-center tw:justify-between tw:p-3 tw:border-b tw:border-neutral-200",children:(0,t.jsx)(V,{})}),S[19]=m):m=S[19],S[20]===Symbol.for("react.memo_cache_sentinel")?(f=(0,t.jsx)(a.Button,{variant:"outline",size:"sm",className:"tw:text-[11px] tw:uppercase tw:tracking-wider tw:font-medium tw:w-full tw:border-black/20 tw:bg-white/50 hover:tw:bg-black hover:tw:text-white tw:transition-all",children:"Community Guidelines"}),S[20]=f):f=S[20],S[21]!==N?.partner?.has_email?(p=N?.partner?.has_email&&(0,t.jsx)(a.Button,{variant:"outline",size:"sm",className:"tw:text-[11px] tw:uppercase tw:tracking-wider tw:font-medium tw:w-full tw:border-black/20 tw:bg-white/50 hover:tw:bg-black hover:tw:text-white tw:transition-all",children:"Message Partner"}),S[21]=N?.partner?.has_email,S[22]=p):p=S[22],S[23]!==p?(w=(0,t.jsxs)("div",{className:"tw:grid tw:grid-cols-2 tw:gap-2 tw:mb-3",children:[f,p]}),S[23]=p,S[24]=w):w=S[24],S[25]===Symbol.for("react.memo_cache_sentinel")?(v=(0,t.jsx)("div",{className:"tw:flex tw:justify-end tw:mb-2",children:(0,t.jsxs)(a.Button,{variant:"ghost",size:"sm",onClick:$,className:"tw:text-xs tw:text-neutral-500 hover:tw:text-neutral-700 tw:gap-1.5 tw:px-2",children:[(0,t.jsx)(n.RefreshCw,{className:"tw:size-3.5"}),"Refresh comments"]})}),S[25]=v):v=S[25];let q=String(_);return S[26]!==M||S[27]!==C||S[28]!==O||S[29]!==F||S[30]!==q?(g=(0,t.jsx)(A,{livecamId:q,pageUrl:O,commentId:M,onRemoveCommentId:F},C),S[26]=M,S[27]=C,S[28]=O,S[29]=F,S[30]=q,S[31]=g):g=S[31],S[32]!==w||S[33]!==g?(b=(0,t.jsxs)("div",{className:"tw:px-4 tw:py-3",children:[w,v,g]}),S[32]=w,S[33]=g,S[34]=b):b=S[34],S[35]!==k||S[36]!==b?(y=(0,t.jsxs)("div",{ref:k,className:"tw:bg-white tw:rounded-lg tw:overflow-hidden tw:shadow-md tw:scroll-mt-26",children:[m,b]}),S[35]=k,S[36]=b,S[37]=y):y=S[37],y},"MultiviewBoardProvider",0,q,"useMultiviewBoardContext",0,H],508903);let Q=(0,e.i(456420).default)("maximize",[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]]);e.s(["MultiviewFullscreenButton",0,function(e){let i,s,l=(0,r.c)(3),{onClick:n}=e;return l[0]===Symbol.for("react.memo_cache_sentinel")?(i=(0,t.jsx)(Q,{className:"tw:size-4"}),l[0]=i):i=l[0],l[1]!==n?(s=(0,t.jsxs)(a.Button,{type:"button",variant:"outline",size:"default",onClick:n,className:"tw:cursor-pointer tw:rounded-[10px]",children:[i,"Fullscreen"]}),l[1]=n,l[2]=s):s=l[2],s}],89315),e.s(["colsGridClass",0,function(e){switch(e){case 1:return"tw:grid-cols-1";case 2:return"tw:grid-cols-2";case 3:return"tw:grid-cols-3";case 4:return"tw:grid-cols-4";default:return"tw:grid-cols-1 tw:md:grid-cols-2"}}
10,"computeFitTileWidth",0,function(e){let{containerWidth:t,containerHeight:r,padding:i,gap:s,videoCount:l}=e,n=Math.max(1,e.cols),a=t-2*i,o=r-2*i;if(a<=0||o<=0)return 0;let u=(a-(n-1)*s)/n,c=Math.max(1,Math.ceil(l/n)),d=u;for(let e=1;e<=c;e++){let t=(o-(e-1)*s)/e;if(t<=0)break;let r=16*t/9;if(r<=u+.5){d=r;break}}return Math.max(0,Math.floor(d))},"parseColsParam",0,function(e){if(!e)return null;let t=Number(e);return 1===t||2===t||3===t||4===t?t:null},"parseFeedsParam",0,function(e){if(!e)return[];let t=[],r=new Set;for(let i of e.split(",")){let e=Number(i.trim());Number.isInteger(e)&&e>0&&!r.has(e)&&(r.add(e),t.push(e))}return t},"parseFocusParam",0,function(e,t){if(!e)return null;let r=Number(e);return Number.isInteger(r)&&t.includes(r)?r:null},"serializeFeedsParam",0,function(e){return e.join(",")},"withColsParam",0,function(e,t){let r=new URLSearchParams(e);null===t?r.delete("cols"):r.set("cols",String(t));let i=r.toString();return i?`?${i}`:""}],835764)},595259,e=>{"use strict";var t=e.i(843476),r=e.i(500932),i=e.i(271645),s=e.i(835764),l=e.i(647163);e.s(["MultiviewGridShell",0,function(e){let n,a,o,u,c,d=(0,r.c)(18),{cols:h,isFullscreen:m,videoCount:f,gridRef:p,children:w}=e,v=(0,i.useRef)(null),g=p??v,[b,y]=(0,i.useState)(null);return d[0]!==h||d[1]!==m||d[2]!==g||d[3]!==f?(n=()=>{if(!m)return void y(null);let e=g.current?.parentElement;if(!e)return;let t=()=>{let t=(0,s.computeFitTileWidth)({containerWidth:e.clientWidth,containerHeight:e.clientHeight,padding:10,gap:10,cols:h??2,videoCount:f});y(t>0?t:null)};t();let r=new ResizeObserver(t);return r.observe(e),()=>r.disconnect()},a=[m,h,f,g],d[0]=h,d[1]=m,d[2]=g,d[3]=f,d[4]=n,d[5]=a):(n=d[4],a=d[5]),(0,i.useEffect)(n,a),d[6]!==h||d[7]!==b||d[8]!==m?(o=(0,l.cn)("tw:relative tw:grid tw:gap-2.5",null===b&&(0,s.colsGridClass)(h),null===b&&null===h&&!m&&"tw:md:mx-auto tw:md:max-w-[calc((100vh-114px)*16/9)]",null!==b&&"tw:min-h-full tw:content-center tw:justify-center"),d[6]=h,d[7]=b,d[8]=m,d[9]=o):o=d[9],d[10]!==h||d[11]!==b?(u=null!==b?{gridTemplateColumns:`repeat(${Math.max(1,h??2)}, ${b}px)`}:void 0,d[10]=h,d[11]=b,d[12]=u):u=d[12],d[13]!==w||d[14]!==g||d[15]!==o||d[16]!==u?(c=(0,t.jsx)("div",{ref:g,className:o,style:u,children:w}),d[13]=w,d[14]=g,d[15]=o,d[16]=u,d[17]=c):c=d[17],c}])},764199,765988,e=>{"use strict";var t=e.i(843476),r=e.i(500932),i=e.i(62870),s=e.i(835764);let l="auto",n=[{label:"Auto",value:l},{label:"1",value:"1"},{label:"2",value:"2"},{label:"3",value:"3"},{label:"4",value:"4"}];function a(e){return(0,t.jsx)(i.SelectItem,{value:e.value,children:e.label},e.value)}e.s(["MultiviewRowSizeSelector",0,function(e){let o,u,c,d,h,m=(0,r.c)(10),{value:f,onChange:p}=e,w=null===f?l:String(f),v=null===f?"Auto":String(f);return m[0]===Symbol.for("react.memo_cache_sentinel")?(o=(0,t.jsx)("span",{className:"tw:text-sm tw:font-medium tw:text-neutral-500",children:"Videos per row"}),m[0]=o):o=m[0],m[1]!==p?(u=e=>p((0,s.parseColsParam)(e)),m[1]=p,m[2]=u):u=m[2],m[3]!==v?(c=(0,t.jsx)(i.SelectTrigger,{"aria-label":"Videos per row",className:"tw:min-w-24 tw:border-neutral-400 tw:bg-neutral-50 tw:text-sm tw:font-medium tw:uppercase tw:tracking-wider",children:(0,t.jsx)("span",{children:v})}),m[3]=v,m[4]=c):c=m[4],m[5]===Symbol.for("react.memo_cache_sentinel")?(d=(0,t.jsx)(i.SelectContent,{side:"bottom",alignItemWithTrigger:!1,children:n.map(a)}),m[5]=d):d=m[5],m[6]!==w||m[7]!==u||m[8]!==c?(h=(0,t.jsxs)("div",{className:"tw:flex tw:items-center tw:gap-2",children:[o,(0,t.jsxs)(i.Select,{value:w,onValueChange:u,children:[c,d]})]}),m[6]=w,m[7]=u,m[8]=c,m[9]=h):h=m[9],h}],764199);var o=e.i(271645);let u=(0,o.createContext)(null),c=u.Provider;e.s(["StreamStatesProvider",0,c,"useStreamStatesContext",0,function(){return(0,o.useContext)(u)}],765988)},894153,e=>{"use strict";var t=e.i(271645);e.s(["useBatchedStreamStates",0,function(e){let r=(0,t.useMemo)(()=>Array.from(new Set(e)).sort().join(","),[e]),[i,s]=(0,t.useState)(new Map),[l,n]=(0,t.useState)(0),a=(0,t.useRef)(3e3);return(0,t.useEffect)(()=>{let e=r?r.split(","):[];if(0===e.length)return void s(new Map);let t=!1,i=null,l=new URLSearchParams;for(let t of e)l.append("q[id_in][]",t);
10let o=`https://d11gsgd2hj8qxd.cloudfront.net/streams.json?${l.toString()}`,u=async()=>{try{let e=await fetch(o);if(!e.ok)throw Error(`streams.json ${e.status}`);let r=await e.json();if(t)return;let i=new Map,l=!1;for(let e of r.streams??[])i.set(String(e.id),e),e.stillUrl&&(l=!0);s(i),a.current=l?1e4:3e3}catch{}finally{t||(n(e=>e+1),i=setTimeout(u,a.current))}};return u(),()=>{t=!0,null!==i&&clearTimeout(i)}},[r]),(0,t.useMemo)(()=>({streams:i,tick:l}),[i,l])}])},546957,e=>{"use strict";var t=e.i(500932),r=e.i(271645),i=e.i(466827);e.s(["FULLSCREEN_BODY_CLASS",0,"tw:flex-1 tw:overflow-auto","FULLSCREEN_CONTAINER_CLASS",0,"tw:flex tw:h-full tw:flex-col tw:bg-white","useMultiviewFullscreen",0,function(){let e,s,l,n,a=(0,t.c)(6),o=(0,r.useRef)(null),[u,c]=(0,r.useState)(!1),[d,h]=(0,r.useState)(!1),m=(0,i.default)("(min-width: 1024px)");a[0]===Symbol.for("react.memo_cache_sentinel")?(e=()=>{h(document.fullscreenEnabled);let e=()=>c(document.fullscreenElement===o.current);return document.addEventListener("fullscreenchange",e),()=>document.removeEventListener("fullscreenchange",e)},s=[],a[0]=e,a[1]=s):(e=a[0],s=a[1]),(0,r.useEffect)(e,s),a[2]===Symbol.for("react.memo_cache_sentinel")?(l=()=>{o.current?.requestFullscreen()},a[2]=l):l=a[2];let f=l,p=d&&m;return a[3]!==u||a[4]!==p?(n={containerRef:o,isFullscreen:u,isSupported:p,enterFullscreen:f},a[3]=u,a[4]=p,a[5]=n):n=a[5],n}])},819405,e=>{"use strict";e.s(["deriveStreamBadge",0,function(e,t){if(e.force_offline)return{live:!1,label:e.offline_label||"Offline",status:"offline"};let r=!!e.is_offline||!!e.is_inactive;if(t&&"unavailable"!==t&&e.stream_id&&(r="live"!==t),!r)return{live:!0,label:"Live",status:"live"};let i=!!e.is_meditation||"Meditation"===e.offline_label;return{live:!1,label:e.offline_label||"Highlights",status:i?"meditation":"highlights"}}])},741120,e=>{"use strict";let t=(0,e.i(456420).default)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",0,t],741120)},5771,e=>{"use strict";var t=e.i(271645);function r(e){return class extends e{_playedRanges=[];_currentPlayedRange=null;_RANGE_EPSILON=.5;_seeking=!1;connectedCallback(){super.connectedCallback&&super.connectedCallback(),this.addEventListener("play",()=>this.onPlaybackStart({time:this.currentTime})),this.addEventListener("pause",()=>this.onPlaybackStop({time:this.currentTime})),this.addEventListener("ended",()=>this.onPlaybackStop({time:this.currentTime})),this.addEventListener("seeking",()=>this.onSeeking()),this.addEventListener("seeked",()=>this.onSeeked({time:this.currentTime}))}onPlaybackStart(e={}){this._seeking=!1;let{time:t}=e,r="number"==typeof t?t:this.currentTime;this._currentPlayedRange||(this._currentPlayedRange={start:r,end:r})}onSeeking(){this._seeking=!0,this._commitCurrentRange()}onSeeked(e={}){this._seeking=!1;let{time:t}=e,r="number"==typeof t?t:this.currentTime;this._currentPlayedRange={start:r,end:r}}onPlaybackStop(e={}){let{time:t}=e,r="number"==typeof t?t:this.currentTime;this._commitCurrentRange(r)}_commitCurrentRange(e){if(!this._currentPlayedRange)return;"number"==typeof e&&(this._currentPlayedRange.end=e);let{start:t,end:r}=this._currentPlayedRange;this._currentPlayedRange=null,this.addPlayedRange(t,r)}addPlayedRange(e,t){if(e>=t)return;let r=this._RANGE_EPSILON,i=[...this._playedRanges,{start:e,end:t}];i.sort((e,t)=>e.start-t.start);let s=[];for(let e of i){if(!s.length){s.push({...e});continue}let t=s[s.length-1];e.start<=t.end+r?(t.start=Math.min(t.start,e.start),t.end=Math.max(t.end,e.end)):s.push({...e})}this._playedRanges=s}get played(){let e=this.currentTime;return(this.paused||this._currentPlayedRange||"number"!=typeof e||(this._currentPlayedRange={start:e,end:e}),this._currentPlayedRange&&"number"==typeof e&&(e>this._currentPlayedRange.end&&(this._currentPlayedRange.end=e),this.addPlayedRange(this._currentPlayedRange.start,this._currentPlayedRange.end)),this._playedRanges.length)?i(this._playedRanges.map(e=>[e.start,e.end])):i([[0,0]])}}}function i(e){return Object.defineProperties(e,{start:{value:t=>e[t][0]},end:{value:t=>e[t][1]}}),e}let s=/(?:youtu\.be\/|youtube(?:-nocookie)?\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=|shorts\/|live\/))((\w|-){11}
10)/,l=/(?:youtu\.be\/|youtube(?:-nocookie)?\.com\/.*?[?&]list=)([\w_-]+)/;function n(e,t={}){var r;let i={src:a(e,t),frameborder:0,width:"100%",height:"100%",allow:"accelerometer; fullscreen; autoplay; encrypted-media; gyroscope; picture-in-picture"};return(null==(r=t.config)?void 0:r.referrerpolicy)&&(i.referrerpolicy=t.config.referrerpolicy),t.config&&(i["data-config"]=JSON.stringify(t.config)),`
11    <style>
12      :host {
13        display: inline-block;
14        line-height: 0;
15        position: relative;
16        min-width: 300px;
17        min-height: 150px;
18      }
19      iframe {
20        position: absolute;
21        top: 0;
22        left: 0;
23      }
24    </style>
25    <iframe${function(e){let t="";for(let r in e){let i=e[r];""===i?t+=` ${u(r)}`:t+=` ${u(r)}="${u(`${i}`)}"`}return t}(i)}></iframe>
26  `}function a(e,t){if(!e.src)return;let r=e.src.includes("-nocookie")?"https://www.youtube-nocookie.com/embed":"https://www.youtube.com/embed",i={controls:""===e.controls?null:0,autoplay:e.autoplay,loop:e.loop,mute:e.muted,playsinline:e.playsinline,preload:e.preload??"metadata",enablejsapi:1,cc_load_policy:1,showinfo:0,rel:0,iv_load_policy:3,modestbranding:1,start:function(e){if(!e)return;let t=e.match(/[?&]t=([\dms]+)/i);if(!t)return;let r=t[1].toLowerCase(),i=0,s=!1,l=r.match(/(\d+)m/);l&&(i+=60*parseInt(l[1],10),s=!0);let n=r.match(/(\d+)s?$/);return n&&(i+=parseInt(n[1],10),s=!0),s?i:void 0}(e.src),...t.config};if(s.test(e.src)){let t=e.src.match(s),l=t&&t[1];return`${r}/${l}?${c(i)}`}let n=e.src.match(l),a={listType:"playlist",list:n&&n[1],...i};return`${r}?${c(a)}`}class o extends r(globalThis.HTMLElement??class{}){static getTemplateHTML=n;static shadowRootOptions={mode:"open"};static observedAttributes=["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src"];loadComplete=new f;#w;#v;#g=0;#b=!1;#y;isLoaded=!1;#S=null;#x=null;#_=null;#E=1;constructor(){super(),this.#R("config")}get config(){return this.#x}set config(e){this.#x=e}async load(){let e;if(this.#w)return;this.shadowRoot||this.attachShadow({mode:"open"});let t=!this.#v;this.#v&&(this.loadComplete=new f,this.isLoaded=!1),this.#v=!0,await (this.#w=Promise.resolve()),this.#w=null,this.#g=0,this.dispatchEvent(new Event("emptied"));let r=this.api;if(this.api=null,!this.src){null==r||r.destroy();return}this.#_=document.createElement("video"),this.textTracks=this.#_.textTracks,this.textTracks.addEventListener("change",()=>{var e;let t=Array.from(this.textTracks).find(e=>"showing"===e.mode);null==(e=this.api)||e.setOption("captions","track",t?{languageCode:t.language}:{})}),this.dispatchEvent(new Event("loadstart"));let i=this.shadowRoot.querySelector("iframe"),s=function(e){let t={};for(let r of e)t[r.name]=r.value;return t}(this.attributes);t&&i&&(this.#x=JSON.parse(i.getAttribute("data-config")||"{}")),(null==i?void 0:i.src)&&i.src===a(s,this)||(this.shadowRoot.innerHTML=n(s,this),i=this.shadowRoot.querySelector("iframe"));let l=await h("https://www.youtube.com/iframe_api","YT","onYouTubeIframeAPIReady");this.api=new l.Player(i,{events:{onReady:()=>{var e;this.#g=1,this.dispatchEvent(new Event("loadedmetadata")),this.dispatchEvent(new Event("durationchange")),1!==this.#E&&(null==(e=this.api)||e.setVolume(100*this.#E)),this.dispatchEvent(new Event("volumechange")),this.dispatchEvent(new Event("loadcomplete")),this.isLoaded=!0,this.loadComplete.resolve()},onError:e=>{console.error(e),this.#S={code:e.data,message:`YouTube iframe player error #${e.data}; visit https://developers.google.com/youtube/iframe_api_reference#onError for the full error message.`},this.dispatchEvent(new Event("error"))}}});let o=!1;this.api.addEventListener("onStateChange",e=>{var t;let r=e.data;if((r===l.PlayerState.PLAYING||r===l.PlayerState.BUFFERING)&&(o||(o=!0,this.dispatchEvent(new Event("play"))),(this.api.getOption("captions","tracklist")||[]).forEach(e=>{[...this.textTracks].some(t=>t.language===e.languageCode)||this.#_.addTextTrack("subtitles",e.displayName,e.languageCode),this.textTracks=this.#_.textTracks}),this.dispatchEvent(new Event("loadstart"))),r===l.PlayerState.PLAYING)this.seeking&&(this.#b=!1,null==(t=this.#y)||t.resolve(),this.dispatchEvent(new Event("seeked"))),this.#g=3,this.dispatchEvent(new Event("playing"));else if(r===l.PlayerState.PAUSED){let e=Math.abs(this.currentTime-u);!this.seeking&&e>.1&&(this.#b=!0,this.dispatchEvent(new Event("seeking"))),o=!1,this.dispatchEvent(new Event("pause"))}r===l.PlayerState.ENDED&&(o=!1,this.dispatchEvent(new Event("pause")),this.dispatchEvent(new Event("ended")),this.loop&&this.play())}),this.api.addEventListener("onPlaybackRateChange",()=>{this.dispatchEvent(new Event("ratechange"))}),this.api.addEventListener("onVolumeChange",()=>{var e;let t=(null==(e=this.api)?void 0:e.getVolume())/100;
26this.#E=t,this.dispatchEvent(new Event("volumechange"))}),this.api.addEventListener("onVideoProgress",()=>{this.dispatchEvent(new Event("timeupdate"))}),await this.loadComplete;let u=0;setInterval(()=>{var e;let t=Math.abs(this.currentTime-u),r=this.buffered.end(this.buffered.length-1);this.seeking&&r>.1?(this.#b=!1,null==(e=this.#y)||e.resolve(),this.dispatchEvent(new Event("seeked"))):!this.seeking&&t>.1&&(this.#b=!0,this.dispatchEvent(new Event("seeking"))),u=this.currentTime},50);let c=setInterval(()=>{let t=this.buffered.end(this.buffered.length-1);t>=this.duration&&(clearInterval(c),this.#g=4),e!=t&&(e=t,this.dispatchEvent(new Event("progress")))},100)}async attributeChangedCallback(e,t,r){if(t!==r)switch(e){case"src":case"autoplay":case"controls":case"loop":case"playsinline":this.load()}}async play(){var e,t,r;return this.#y=null,await this.loadComplete,null==(e=this.api)||e.playVideo(),t=this,(r=(e,r)=>{let i;t.addEventListener(e,i=()=>{t.removeEventListener(e,i),r()})},(...e)=>new Promise(t=>{r(...e,(...e)=>{e.length>1?t(e):t(e[0])})}))("playing")}async pause(){var e;return await this.loadComplete,null==(e=this.api)?void 0:e.pauseVideo()}get seeking(){return this.#b}get readyState(){return this.#g}get src(){return this.getAttribute("src")}set src(e){this.src!=e&&this.setAttribute("src",e)}get error(){return this.#S}get paused(){var e,t;return this.isLoaded?[-1,0,2,5].includes(null==(t=null==(e=this.api)?void 0:e.getPlayerState)?void 0:t.call(e)):!this.autoplay}get duration(){var e,t;return(null==(t=null==(e=this.api)?void 0:e.getDuration)?void 0:t.call(e))??NaN}get autoplay(){return this.hasAttribute("autoplay")}set autoplay(e){this.autoplay!=e&&this.toggleAttribute("autoplay",!!e)}get buffered(){var e,t;if(!this.isLoaded)return p();let r=(null==(e=this.api)?void 0:e.getVideoLoadedFraction())*(null==(t=this.api)?void 0:t.getDuration());return r>0?p(0,r):p()}get controls(){return this.hasAttribute("controls")}set controls(e){this.controls!=e&&this.toggleAttribute("controls",!!e)}get currentTime(){var e,t;return(null==(t=null==(e=this.api)?void 0:e.getCurrentTime)?void 0:t.call(e))??0}set currentTime(e){this.currentTime!=e&&(this.#y=new f,this.loadComplete.then(()=>{var t,r;null==(t=this.api)||t.seekTo(e,!0),this.paused&&(null==(r=this.#y)||r.then(()=>{var e;this.#y&&(null==(e=this.api)||e.pauseVideo())}))}))}set defaultMuted(e){this.defaultMuted!=e&&this.toggleAttribute("muted",!!e)}get defaultMuted(){return this.hasAttribute("muted")}get loop(){return this.hasAttribute("loop")}set loop(e){this.loop!=e&&this.toggleAttribute("loop",!!e)}set muted(e){this.muted!=e&&this.loadComplete.then(()=>{var t,r;e?null==(t=this.api)||t.mute():null==(r=this.api)||r.unMute()})}get muted(){var e,t;return this.isLoaded?null==(t=null==(e=this.api)?void 0:e.isMuted)?void 0:t.call(e):this.defaultMuted}get playbackRate(){var e,t;return(null==(t=null==(e=this.api)?void 0:e.getPlaybackRate)?void 0:t.call(e))??1}set playbackRate(e){this.playbackRate!=e&&this.loadComplete.then(()=>{var t;null==(t=this.api)||t.setPlaybackRate(e)})}get playsInline(){return this.hasAttribute("playsinline")}set playsInline(e){this.playsInline!=e&&this.toggleAttribute("playsinline",!!e)}get poster(){return this.getAttribute("poster")}set poster(e){this.poster!=e&&this.setAttribute("poster",`${e}`)}set volume(e){this.volume!=e&&(this.#E=e,this.loadComplete.then(()=>{var t;null==(t=this.api)||t.setVolume(100*e)}))}get volume(){var e;return this.isLoaded?(null==(e=this.api)?void 0:e.getVolume())/100:this.#E}#R(e){if(Object.prototype.hasOwnProperty.call(this,e)){let t=this[e];delete this[e],this[e]=t}}}function u(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/`/g,"&#x60;")}function c(e){return String(new URLSearchParams(function(e){let t={};for(let r in e){let i=e[r];!0===i||""===i?t[r]=1:!1===i?t[r]=0:null!=i&&(t[r]=i)}return t}(e)))}let d={};async function h(e,t,r){return d[e]?d[e]:t&&self[t]?(await m(0),self[t]):d[e]=new Promise(function(i,s){let l=document.createElement("script");l.src=e;let n=()=>i(self[t]);r&&(self[r]=n),l.onload=()=>!r&&n(),l.onerror=s,document.head.append(l)})}let m=e=>new Promise(t=>setTimeout(t,e));class f extends Promise{constructor(e=()=>{}){let t,r;super((i,s)=>{e(i,s),t=i,r=s}
26),this.resolve=t,this.reject=r}}function p(e,t){return Array.isArray(e)?w(e):null==e||null==t||0===e&&0===t?w([[0,0]]):w([[e,t]])}function w(e){return Object.defineProperties(e,{start:{value:t=>e[t][0]},end:{value:t=>e[t][1]}}),e}globalThis.customElements&&!globalThis.customElements.get("youtube-video")&&globalThis.customElements.define("youtube-video",o);var v=new Set(["style","children","ref","key","suppressContentEditableWarning","suppressHydrationWarning","dangerouslySetInnerHTML"]),g={className:"class",htmlFor:"for"};function b(e){return e.toLowerCase()}function y(e){return"boolean"==typeof e?e?"":void 0:"function"==typeof e?void 0:"object"!=typeof e||null===e?e:void 0}function S(e,t,r){var i;e[t]=r,null==r&&t in((null==(i=globalThis.HTMLElement)?void 0:i.prototype)??{})&&e.removeAttribute(t)}var x=function({react:e,tagName:t,elementClass:r,events:i,displayName:s,defaultProps:l,toAttributeName:n=b,toAttributeValue:a=y}){let o=Number.parseInt(e.version)>=19,u=e.forwardRef((s,u)=>{var c,d;let h=e.useRef(null),m=e.useRef(new Map),f={},p={},w={},b={};for(let[e,t]of Object.entries(s)){if(v.has(e)){w[e]=t;continue}let i=n(g[e]??e);if(r.prototype&&e in r.prototype&&!(e in((null==(c=globalThis.HTMLElement)?void 0:c.prototype)??{}))&&!(null==(d=r.observedAttributes)?void 0:d.some(e=>e===i))){b[e]=t;continue}if(e.startsWith("on")){f[e]=t;continue}let s=a(t);i&&null!=s&&(p[i]=String(s),o||(w[i]=s)),i&&o&&(s!==y(t)?w[i]=s:w[i]=t)}if("u">typeof window){for(let t in f){let r=f[t],s=t.endsWith("Capture"),l=((null==i?void 0:i[t])??t.slice(2).toLowerCase()).slice(0,s?-7:void 0);e.useLayoutEffect(()=>{let e=null==h?void 0:h.current;if(e&&"function"==typeof r)return e.addEventListener(l,r,s),()=>{e.removeEventListener(l,r,s)}},[null==h?void 0:h.current,r])}e.useLayoutEffect(()=>{if(null===h.current)return;let e=new Map;for(let t in b)S(h.current,t,b[t]),m.current.delete(t),e.set(t,b[t]);for(let[e,t]of m.current)S(h.current,e,void 0);m.current=e})}if("u"<typeof window&&(null==r?void 0:r.getTemplateHTML)&&(null==r?void 0:r.shadowRootOptions)){let{mode:t,delegatesFocus:i}=r.shadowRootOptions;w.children=[e.createElement("template",{shadowrootmode:t,shadowrootdelegatesfocus:i,dangerouslySetInnerHTML:{__html:r.getTemplateHTML(p,s)},key:"ce-la-react-ssr-template-shadow-root"}),w.children]}return e.createElement(t,{...l,...w,ref:e.useCallback(e=>{h.current=e,"function"==typeof u?u(e):null!==u&&(u.current=e)},[u])},w.children)});return u.displayName=s??r.name,u}({react:t.default,tagName:"youtube-video",elementClass:o,toAttributeName:e=>"muted"===e?"":"defaultMuted"===e?"muted":b(e)});e.s(["default",0,x],5771)}]);
27
28//# debugId=e963c177-a4a0-c6f5-6289-ce0b3f4ecaa9

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.