@banou/stub 0.0.33 → 0.0.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1296,7 +1296,7 @@ ${Ey}
|
|
|
1296
1296
|
height: 100%;
|
|
1297
1297
|
width: 100%;
|
|
1298
1298
|
overflow: hidden;
|
|
1299
|
-
`,pb=e=>P(`div`,{css:fb,children:P(pv.Provider,{children:P(db,{options:e,children:e.children})})}),mb=({menu:e,section:t,option:n,sectionIndex:r})=>[...[...document.querySelectorAll(e)].flatMap(e=>[...e.querySelectorAll(t)])[r]?.querySelectorAll(n)??[]].map(e=>({label:e.getAttribute(`aria-label`)??``,selected:e.getAttribute(`aria-checked`)===`true`,disabled:e.getAttribute(`aria-disabled`)===`true`})),hb=async({button:e,timeout:t})=>{let n=Date.now()+t,r=document.querySelector(e);for(;!r&&Date.now()<n;)await new Promise(e=>setTimeout(e,100)),r=document.querySelector(e);if(!r)throw Object.assign(Error(`Crunchyroll track button is not on the page`),{name:`CrunchyrollControlMissingError`});let i=r.getBoundingClientRect(),a={bubbles:!0,cancelable:!0,composed:!0,clientX:i.left+i.width/2,clientY:i.top+i.height/2,button:0},o={...a,pointerType:`mouse`,pointerId:1,isPrimary:!0};r.dispatchEvent(new PointerEvent(`pointerdown`,{...o,buttons:1})),r.dispatchEvent(new MouseEvent(`mousedown`,{...a,buttons:1})),r.dispatchEvent(new PointerEvent(`pointerup`,{...o,buttons:0})),r.dispatchEvent(new MouseEvent(`mouseup`,{...a,buttons:0})),r.dispatchEvent(new MouseEvent(`click`,{...a,buttons:0}))},gb=({menu:e,section:t,option:n,sectionIndex:r,optionIndex:i})=>{let a=[...document.querySelectorAll(e)].flatMap(e=>[...e.querySelectorAll(t)])[r]?.querySelectorAll(n)[i];if(!a)throw Object.assign(Error(`Crunchyroll track option ${i} is not in the menu`),{name:`CrunchyrollControlMissingError`});let o=a.getBoundingClientRect(),s={bubbles:!0,cancelable:!0,composed:!0,clientX:o.left+o.width/2,clientY:o.top+o.height/2,button:0},c={...s,pointerType:`mouse`,pointerId:1,isPrimary:!0};a.dispatchEvent(new PointerEvent(`pointerdown`,{...c,buttons:1})),a.dispatchEvent(new MouseEvent(`mousedown`,{...s,buttons:1})),a.dispatchEvent(new PointerEvent(`pointerup`,{...c,buttons:0})),a.dispatchEvent(new MouseEvent(`mouseup`,{...s,buttons:0})),a.dispatchEvent(new MouseEvent(`click`,{...s,buttons:0}))},_b=async({timeline:e,time:t,timeout:n})=>{let r=Date.now()+n,i=document.querySelector(e);for(;!i&&Date.now()<r;)await new Promise(e=>setTimeout(e,100)),i=document.querySelector(e);if(i?.tagName!==`INPUT`)throw Object.assign(Error(`Crunchyroll timeline is not on the page`),{name:`CrunchyrollControlMissingError`});let a=i,o=Number(a.min||0),s=Number(a.max||100),c=a.getBoundingClientRect(),l=Math.max(0,Math.min(1,(t-o)/(s-o))),u={bubbles:!0,cancelable:!0,composed:!0,clientX:c.left+c.width*l,clientY:c.top+c.height/2,button:0},d={...u,pointerType:`mouse`,pointerId:1,isPrimary:!0},f=a.type===`range`&&Number.isFinite(o)&&Number.isFinite(s)&&s>o;f&&(a.dispatchEvent(new PointerEvent(`pointerdown`,{...d,buttons:1})),a.dispatchEvent(new MouseEvent(`mousedown`,{...u,buttons:1}))),a._valueTracker?.setValue(``),Object.getOwnPropertyDescriptor(Object.getPrototypeOf(a),`value`).set.call(a,String(t)),a.dispatchEvent(new Event(`input`,{bubbles:!0})),f&&(a.dispatchEvent(new PointerEvent(`pointerup`,{...d,buttons:0})),a.dispatchEvent(new MouseEvent(`mouseup`,{...u,buttons:0}))),a.dispatchEvent(new Event(`change`,{bubbles:!0}))},vb=`[data-testid="track-selection-button"]`,yb=`[data-testid="audio-text-track-menu"]`,bb=`.timeline-slider`,xb=`[role="menu"]`,Sb=`[role="menuitemradio"]`,Cb=1e4,wb=2e4,Tb=5e3,Eb=100,Db={menu:yb,section:xb,option:Sb},Ob=/^(off|none|disabled)$/i,kb=e=>new Promise(t=>setTimeout(t,e)),Ab=()=>!1,jb=e=>{if(e())throw Error(`Crunchyroll track operation cancelled`)},Mb=e=>e===`audio`?0:1,Nb=e=>e.replace(/\s+/g,` `).trim(),Pb=(e,t)=>{let n=[...new Map(t.map(e=>({...e,label:Nb(e.label)})).filter(e=>e.label).map(e=>[e.id,e])).values()],r=n.find(e=>e.selected);if(!r)return;let i=e===`subtitles`?n.find(e=>Ob.test(e.label)):void 0,a=n.filter(e=>e!==i).map(e=>({id:e.id,label:e.label,disabled:e.disabled||void 0}));if(!(a.length<2&&!i)&&a.length)return{options:a,selectedId:r===i?null:r.id,...i?{offLabel:i.label}:{}}},Fb=async(e,t)=>{jb(t);let n=e.locator(yb);if(await n.exists({timeout:1e3})){jb(t);return}jb(t),await e.evaluate(hb,{button:vb,timeout:Cb});let r=Date.now()+Cb;for(;Date.now()<r;){if(jb(t),await n.exists({timeout:1e3}))return;await kb(Eb)}throw Error(`Crunchyroll track menu did not open`)},Ib=async(e,t,n)=>{jb(n);let r=await e.evaluate(mb,{...Db,sectionIndex:Mb(t)});jb(n);let i=r.map((e,t)=>({...e,label:Nb(e.label),index:t})),a=new Map;for(let e of i)a.set(e.label,(a.get(e.label)??0)+1);let o=new Map;return i.map(e=>{let t=(o.get(e.label)??0)+1;return o.set(e.label,t),{...e,id:a.get(e.label)===1?e.label:`${e.label}#${t}`}})},Lb=async(e,t)=>{let[n,r]=await Promise.all([Ib(e,`audio`,t),Ib(e,`subtitles`,t)]);return{audio:Pb(`audio`,n),subtitles:Pb(`subtitles`,r)}},Rb=async(e,t=Ab)=>(await Fb(e,t),Lb(e,t)),zb=async(e,t,n,r)=>(await Ib(e,t,r)).find(e=>n===null?Ob.test(e.label):e.id===n)?.index??-1,Bb=async(e,t,n,r)=>{let i=Date.now()+wb;for(;Date.now()<i;){jb(r),await Fb(e,r);let i=(await Ib(e,t,r)).find(e=>e.selected);if(i&&(n===null?Ob.test(i.label):i.id===n))return;await kb(Eb)}throw Error(`Crunchyroll did not apply the ${t} option`)},Vb=(e,t)=>{let n=Number.isFinite(e)?Math.max(0,e):0;return!Number.isFinite(t)||t<=0?n:Math.min(n,Math.max(0,t-.1))},Hb=e=>({currentTime:e.currentTime,paused:e.paused,volume:e.volume,muted:e.muted,playbackRate:e.playbackRate}),Ub=(e,t)=>e.evaluate(_b,{timeline:bb,time:t,timeout:wb}),Wb=async(e,t,n)=>{let r=Date.now()+5e3;for(;Date.now()<r&&(jb(n),!(e.currentSrc!==t||e.readyState<2));)await kb(Eb);if(e.currentSrc===t&&e.readyState>=2)return!1;let i=Date.now()+wb;for(;Date.now()<i;){if(jb(n),e.readyState>=2)return!0;await kb(Eb)}throw Error(`Crunchyroll playback did not become ready after changing tracks`)},Gb=async(e,t,n,r)=>{jb(r),t.volume=n.volume,t.muted=n.muted,t.playbackRate=n.playbackRate;let i=Vb(n.currentTime,t.duration);Math.abs(t.currentTime-i)>2&&await Ub(e,i);let a=Date.now()+wb;for(;Date.now()<a&&(Math.abs(t.currentTime-i)>2||t.seeking||t.readyState<2);)jb(r),await kb(Eb);if(Math.abs(t.currentTime-i)>2||t.seeking||t.readyState<2)throw Error(`Crunchyroll playback position was not restored after changing tracks`);jb(r),n.paused?t.pause():await t.play();let o=Date.now()+Tb;for(;Date.now()<o&&t.paused!==n.paused;)jb(r),await kb(Eb);if(t.paused!==n.paused)throw Error(`Crunchyroll playback state was not restored after changing tracks`)},Kb=async(e,t,n,r,i=Ab)=>{await Fb(e,i);let a=await zb(e,n,r,i);if(a<0)throw Error(`Crunchyroll ${n} option is no longer available`);jb(i);let o=t.currentSrc,s=Hb(t);return await e.evaluate(gb,{...Db,sectionIndex:Mb(n),optionIndex:a}),await Bb(e,n,r,i),await Wb(t,o,i)&&await Gb(e,t,s,i),Rb(e,i)},qb=(e,t)=>{Ub(e,t).catch(e=>console.warn(`[cr] timeline seek failed:`,e))},Jb=(e,t)=>new Proxy(e,{set(e,n,r,i){return n===`currentTime`&&typeof r==`number`&&Number.isFinite(r)&&qb(t,r),Reflect.set(e,n,r,i)}}),Yb=({remote:e,frame:t,subtitles:n,audioTracks:r,thumbnails:i,chapters:a,children:o})=>{let s=b(()=>e&&t?Jb(e,t):null,[e,t]);return P(pb,{expose:!0,media:s,subtitles:n,audioTracks:r,thumbnails:i,chapters:a,children:o})},Xb=class extends Error{name=`BifParseError`},Zb=[137,66,73,70,13,10,26,10],Qb=64,$b=8,ex=4294967295,tx=36e3,nx=e=>{if(e.byteLength<Qb)throw new Xb(`truncated header: ${e.byteLength} bytes`);let t=new DataView(e);if(Zb.some((e,n)=>t.getUint8(n)!==e))throw new Xb(`bad magic`);let n=t.getUint32(12,!0),r=t.getUint32(16,!0)||1e3;if(n>tx)throw new Xb(`implausible frame count ${n}`);let i=Qb+(n+1)*$b;if(i>e.byteLength)throw new Xb(`truncated index: ${n} frames need ${i} bytes, have ${e.byteLength}`);let a=e=>t.getUint32(Qb+e*$b,!0),o=e=>t.getUint32(Qb+e*$b+4,!0);if(a(n)!==ex)throw new Xb(`the index does not end on the 0xffffffff entry`);let s=[];for(let t=0;t<n;t+=1){let c=o(t),l=o(t+1);if(c<i||l<=c||l>e.byteLength)throw new Xb(`image ${t} spans ${c}..${l}, outside ${i}..${e.byteLength}`);let u=a(t),d=t+1===n;if(!d&&a(t+1)<=u)throw new Xb(`timestamps do not increase at image ${t}`);s.push({start:u*r,end:d?1/0:a(t+1)*r,bytes:new Uint8Array(e,c,l-c)})}return s},rx=(e,t)=>{if(!e.length||!Number.isFinite(t))return;let n=0,r=e.length-1;for(;n<r;){let i=Math.ceil((n+r)/2);e[i].start<=t?n=i:r=i-1}return e[n]},ix=async({waitMs:e,fetchMs:t,maxBytes:n})=>{let r=/^(?:https?:\/\/|\/)\S*\.bif(?:[?#]\S*)?$/i,i=e=>typeof e==`string`&&e.length<8192&&e.includes(`.bif`)&&r.test(e),a=(e,t)=>{try{return e?.[t]}catch{return}},o=e=>{let t=Object.keys(e).find(e=>e.startsWith(`__reactFiber$`)||e.startsWith(`__reactInternalInstance$`));return t?a(e,t):void 0},s=e=>{let t=[],n=new Set,r=[e,...Array.from(e.querySelectorAll(`*`)).slice(0,3e3)];for(let e of r){let r=o(e);for(let e=0;r&&e<40&&!n.has(r);e+=1){n.add(r);let e=a(a(r,`memoizedProps`),`value`);e&&typeof e==`object`&&t.push(e),r=a(r,`return`)}}return t},c=e=>{let t=new Set,n=e,r=0;for(let e=0;e<=8&&n.length;e+=1){let e=[];for(let o of n){if(t.has(o))continue;if(t.add(o),r+=1,r>2e4)return;let n;try{n=Object.keys(o).slice(0,500)}catch{continue}for(let t of n){let n=a(o,t);if(i(n))return n;n&&typeof n==`object`&&(n===window||typeof a(n,`nodeType`)==`number`||ArrayBuffer.isView(n)||n instanceof ArrayBuffer||e.push(n))}}n=e}},l=e=>{let t=[];for(let n of e){let e=a(a(n,`volumeVM`),`_player`);if(!e||typeof e!=`object`)continue;let r=a(a(a(e,`playerOrchestrator`),`thumbnailOrchestrator`),`_currentBifUrl`);if(i(r))return{url:r,via:`named`};t.push(e)}let n=c(t.length?t:e);return n?{url:n,via:`search`}:void 0},u=async(e,r)=>{let i=new AbortController,a=setTimeout(()=>i.abort(),t);try{let t=await fetch(e,{signal:i.signal});if(!t.ok)return{none:`fetch-failed`,detail:`HTTP ${t.status}`};let a=Number(t.headers.get(`content-length`));if(a>n)return{none:`too-large`,detail:`${a} bytes`};let o=await t.arrayBuffer();return o.byteLength>n?{none:`too-large`,detail:`${o.byteLength} bytes`}:{bytes:o,via:r}}catch(e){return{none:`fetch-failed`,detail:String(e)}}finally{clearTimeout(a)}};try{let t=Date.now()+e,n=!1;for(;;){let e=document.querySelector(`.video-player-wrapper`);if(e?.querySelector(`video`)){n=!0;let t=l(s(e));if(t)return await u(t.url,t.via)}if(Date.now()>=t)return{none:n?`no-bif`:`no-player`};await new Promise(e=>setTimeout(e,500))}}catch(e){return{none:`failed`,detail:String(e)}}},ax={waitMs:1e4,fetchMs:15e3,maxBytes:31457280},ox=e=>{let t=new Map,n=!1;return{at:r=>{if(n)return;let i=rx(e,r*1e3);if(!i)return;let a=t.get(i);return a||(a={url:URL.createObjectURL(new Blob([i.bytes],{type:`image/jpeg`})),startTime:i.start/1e3,endTime:i.end/1e3},t.set(i,a)),a},dispose:()=>{n=!0;for(let{url:e}of t.values())URL.revokeObjectURL(e);t.clear()}}},sx=async e=>{let t=await e.evaluate(ix,ax);if(`none`in t)throw Error(`no BIF: ${t.none}${t.detail?` (${t.detail})`:``}`);let n=nx(t.bytes);if(!n.length)throw Error(`no BIF: the file has no images`);return ox(n)};l();var cx=e=>`https://static.crunchyroll.com/skip-events/production/${e}.json`,lx=e=>{try{return new URL(e).pathname.match(/\/watch\/([A-Z0-9]+)(?:\/|$)/)?.[1]}catch{return}},ux=[[`intro`,`Opening`],[`recap`,`Recap`],[`credits`,`Ending`],[`preview`,`Preview`]],dx=`Episode`,fx=e=>typeof e==`object`&&!!e&&!Array.isArray(e),px=(e,t)=>{if(!fx(e))return[];let n=t!==void 0&&Number.isFinite(t)&&t>0?t:1/0,r=ux.flatMap(([t,r])=>{let i=e[t];if(!fx(i))return[];let{start:a,end:o}=i;if(typeof a!=`number`||typeof o!=`number`||!Number.isFinite(a)||!Number.isFinite(o))return[];let s={start:Math.max(0,a),end:Math.min(o,n),title:r};return s.end>s.start?[s]:[]}).sort((e,t)=>e.start-t.start),i=[],a=0;for(let e of r){let t=Math.max(e.start,a);e.end<=t||(t>a&&i.push({start:a,end:t,title:dx}),i.push({start:t,end:e.end,title:e.title}),a=e.end)}return i.length&&n!==1/0&&a<n&&i.push({start:a,end:n,title:dx}),i},mx=new Set([403,404]),hx=async(e,t=ie)=>{let n=await t(cx(e));if(!n.ok){if(await n.body?.cancel().catch(()=>{}),mx.has(n.status))return{};throw Error(`${cx(e)} answered ${n.status}`)}return n.json()},gx=e=>{let[t,n]=h();return m(()=>{if(n(e?.duration),!e)return;let t=()=>n(e.duration);return e.addEventListener(`durationchange`,t),e.addEventListener(`loadedmetadata`,t),()=>{e.removeEventListener(`durationchange`,t),e.removeEventListener(`loadedmetadata`,t)}},[e]),t},_x=[],vx=(e,t)=>{let n=lx(e),[r,i]=h(),a=gx(t);return m(()=>{if(!n)return;let e=!1;return hx(n).then(t=>{e||i({episodeId:n,events:t})},t=>{e||console.warn(`[cr] skip events unavailable:`,t)}),()=>{e=!0}},[n]),b(()=>{if(!r||r.episodeId!==n)return _x;let e=px(r.events,a);return e.length?e:_x},[r,n,a])};l();var yx=[`www.crunchyroll.com`,`crunchyroll.com`,`sso.crunchyroll.com`,`static.crunchyroll.com`],bx=`
|
|
1299
|
+
`,pb=e=>P(`div`,{css:fb,children:P(pv.Provider,{children:P(db,{options:e,children:e.children})})}),mb=({menu:e,section:t,option:n,sectionIndex:r})=>[...[...document.querySelectorAll(e)].flatMap(e=>[...e.querySelectorAll(t)])[r]?.querySelectorAll(n)??[]].map(e=>({label:e.getAttribute(`aria-label`)??``,selected:e.getAttribute(`aria-checked`)===`true`,disabled:e.getAttribute(`aria-disabled`)===`true`})),hb=async({button:e,timeout:t})=>{let n=Date.now()+t,r=document.querySelector(e);for(;!r&&Date.now()<n;)await new Promise(e=>setTimeout(e,100)),r=document.querySelector(e);if(!r)throw Object.assign(Error(`Crunchyroll track button is not on the page`),{name:`CrunchyrollControlMissingError`});let i=r.getBoundingClientRect(),a={bubbles:!0,cancelable:!0,composed:!0,clientX:i.left+i.width/2,clientY:i.top+i.height/2,button:0},o={...a,pointerType:`mouse`,pointerId:1,isPrimary:!0};r.dispatchEvent(new PointerEvent(`pointerdown`,{...o,buttons:1})),r.dispatchEvent(new MouseEvent(`mousedown`,{...a,buttons:1})),r.dispatchEvent(new PointerEvent(`pointerup`,{...o,buttons:0})),r.dispatchEvent(new MouseEvent(`mouseup`,{...a,buttons:0})),r.dispatchEvent(new MouseEvent(`click`,{...a,buttons:0}))},gb=({menu:e,section:t,option:n,sectionIndex:r,optionIndex:i})=>{let a=[...document.querySelectorAll(e)].flatMap(e=>[...e.querySelectorAll(t)])[r]?.querySelectorAll(n)[i];if(!a)throw Object.assign(Error(`Crunchyroll track option ${i} is not in the menu`),{name:`CrunchyrollControlMissingError`});let o=a.getBoundingClientRect(),s={bubbles:!0,cancelable:!0,composed:!0,clientX:o.left+o.width/2,clientY:o.top+o.height/2,button:0},c={...s,pointerType:`mouse`,pointerId:1,isPrimary:!0};a.dispatchEvent(new PointerEvent(`pointerdown`,{...c,buttons:1})),a.dispatchEvent(new MouseEvent(`mousedown`,{...s,buttons:1})),a.dispatchEvent(new PointerEvent(`pointerup`,{...c,buttons:0})),a.dispatchEvent(new MouseEvent(`mouseup`,{...s,buttons:0})),a.dispatchEvent(new MouseEvent(`click`,{...s,buttons:0}))},_b=async({timeline:e,time:t,timeout:n})=>{let r=Date.now()+n,i=document.querySelector(e);for(;!i&&Date.now()<r;)await new Promise(e=>setTimeout(e,100)),i=document.querySelector(e);if(i?.tagName!==`INPUT`)throw Object.assign(Error(`Crunchyroll timeline is not on the page`),{name:`CrunchyrollControlMissingError`});let a=i,o=Number(a.min||0),s=Number(a.max||100),c=a.getBoundingClientRect(),l=Math.max(0,Math.min(1,(t-o)/(s-o))),u={bubbles:!0,cancelable:!0,composed:!0,clientX:c.left+c.width*l,clientY:c.top+c.height/2,button:0},d={...u,pointerType:`mouse`,pointerId:1,isPrimary:!0},f=a.type===`range`&&Number.isFinite(o)&&Number.isFinite(s)&&s>o;f&&(a.dispatchEvent(new PointerEvent(`pointerdown`,{...d,buttons:1})),a.dispatchEvent(new MouseEvent(`mousedown`,{...u,buttons:1}))),a._valueTracker?.setValue(``),Object.getOwnPropertyDescriptor(Object.getPrototypeOf(a),`value`).set.call(a,String(t)),a.dispatchEvent(new Event(`input`,{bubbles:!0})),f&&(a.dispatchEvent(new PointerEvent(`pointerup`,{...d,buttons:0})),a.dispatchEvent(new MouseEvent(`mouseup`,{...u,buttons:0}))),a.dispatchEvent(new Event(`change`,{bubbles:!0}))},vb=`[data-testid="track-selection-button"]`,yb=`[data-testid="audio-text-track-menu"]`,bb=`.timeline-slider`,xb=`[role="menu"]`,Sb=`[role="menuitemradio"]`,Cb=1e4,wb=2e4,Tb=5e3,Eb=100,Db={menu:yb,section:xb,option:Sb},Ob=/^(off|none|disabled)$/i,kb=e=>new Promise(t=>setTimeout(t,e)),Ab=()=>!1,jb=e=>{if(e())throw Error(`Crunchyroll track operation cancelled`)},Mb=e=>e===`audio`?0:1,Nb=e=>e.replace(/\s+/g,` `).trim(),Pb=(e,t)=>{let n=[...new Map(t.map(e=>({...e,label:Nb(e.label)})).filter(e=>e.label).map(e=>[e.id,e])).values()],r=n.find(e=>e.selected);if(!r)return;let i=e===`subtitles`?n.find(e=>Ob.test(e.label)):void 0,a=n.filter(e=>e!==i).map(e=>({id:e.id,label:e.label,disabled:e.disabled||void 0}));if(!(a.length<2&&!i)&&a.length)return{options:a,selectedId:r===i?null:r.id,...i?{offLabel:i.label}:{}}},Fb=async(e,t)=>{jb(t);let n=e.locator(yb);if(await n.exists({timeout:1e3})){jb(t);return}jb(t),await e.evaluate(hb,{button:vb,timeout:Cb});let r=Date.now()+Cb;for(;Date.now()<r;){if(jb(t),await n.exists({timeout:1e3}))return;await kb(Eb)}throw Error(`Crunchyroll track menu did not open`)},Ib=async(e,t,n)=>{jb(n);let r=await e.evaluate(mb,{...Db,sectionIndex:Mb(t)});jb(n);let i=r.map((e,t)=>({...e,label:Nb(e.label),index:t})),a=new Map;for(let e of i)a.set(e.label,(a.get(e.label)??0)+1);let o=new Map;return i.map(e=>{let t=(o.get(e.label)??0)+1;return o.set(e.label,t),{...e,id:a.get(e.label)===1?e.label:`${e.label}#${t}`}})},Lb=async(e,t)=>{let[n,r]=await Promise.all([Ib(e,`audio`,t),Ib(e,`subtitles`,t)]);return{audio:Pb(`audio`,n),subtitles:Pb(`subtitles`,r)}},Rb=async(e,t=Ab)=>(await Fb(e,t),Lb(e,t)),zb=async(e,t,n,r)=>(await Ib(e,t,r)).find(e=>n===null?Ob.test(e.label):e.id===n)?.index??-1,Bb=async(e,t,n,r)=>{let i=Date.now()+wb;for(;Date.now()<i;){jb(r),await Fb(e,r);let i=(await Ib(e,t,r)).find(e=>e.selected);if(i&&(n===null?Ob.test(i.label):i.id===n))return;await kb(Eb)}throw Error(`Crunchyroll did not apply the ${t} option`)},Vb=(e,t)=>{let n=Number.isFinite(e)?Math.max(0,e):0;return!Number.isFinite(t)||t<=0?n:Math.min(n,Math.max(0,t-.1))},Hb=e=>({currentTime:e.currentTime,paused:e.paused,volume:e.volume,muted:e.muted,playbackRate:e.playbackRate}),Ub=(e,t)=>e.evaluate(_b,{timeline:bb,time:t,timeout:wb}),Wb=async(e,t,n)=>{let r=Date.now()+5e3;for(;Date.now()<r&&(jb(n),!(e.currentSrc!==t||e.readyState<2));)await kb(Eb);if(e.currentSrc===t&&e.readyState>=2)return!1;let i=Date.now()+wb;for(;Date.now()<i;){if(jb(n),e.readyState>=2)return!0;await kb(Eb)}throw Error(`Crunchyroll playback did not become ready after changing tracks`)},Gb=async(e,t,n,r)=>{jb(r),t.volume=n.volume,t.muted=n.muted,t.playbackRate=n.playbackRate;let i=Vb(n.currentTime,t.duration);Math.abs(t.currentTime-i)>2&&await Ub(e,i);let a=Date.now()+wb;for(;Date.now()<a&&(Math.abs(t.currentTime-i)>2||t.seeking||t.readyState<2);)jb(r),await kb(Eb);if(Math.abs(t.currentTime-i)>2||t.seeking||t.readyState<2)throw Error(`Crunchyroll playback position was not restored after changing tracks`);jb(r),n.paused?t.pause():await t.play();let o=Date.now()+Tb;for(;Date.now()<o&&t.paused!==n.paused;)jb(r),await kb(Eb);if(t.paused!==n.paused)throw Error(`Crunchyroll playback state was not restored after changing tracks`)},Kb=async(e,t,n,r,i=Ab)=>{await Fb(e,i);let a=await zb(e,n,r,i);if(a<0)throw Error(`Crunchyroll ${n} option is no longer available`);jb(i);let o=t.currentSrc,s=Hb(t);return await e.evaluate(gb,{...Db,sectionIndex:Mb(n),optionIndex:a}),await Bb(e,n,r,i),await Wb(t,o,i)&&await Gb(e,t,s,i),Rb(e,i)},qb=(e,t)=>{Ub(e,t).catch(e=>console.warn(`[cr] timeline seek failed:`,e))},Jb=(e,t)=>new Proxy(e,{set(e,n,r,i){return n===`currentTime`&&typeof r==`number`&&Number.isFinite(r)&&qb(t,r),Reflect.set(e,n,r,i)}}),Yb=({remote:e,frame:t,subtitles:n,audioTracks:r,thumbnails:i,chapters:a,children:o})=>{let s=b(()=>e&&t?Jb(e,t):null,[e,t]);return P(pb,{expose:!0,media:s,subtitles:n,audioTracks:r,thumbnails:i,chapters:a,children:o})},Xb=3e4,Zb=async(e,t)=>{let n=Date.now()+Xb,r=!1;for(;!t();){let i=await e.locator(`.shell-header`).exists();r||=i;let[a,o]=await Promise.all([e.locator(`#user-menu-anonymous`).exists(),e.locator(`#user-menu-authenticated`).exists()]);if(t())break;if(o)return{isLoggedIn:o,isLoggedOut:!1};let s=Date.now()>=n;if(a&&!i&&(r||s))return{isLoggedIn:o,isLoggedOut:a};if(s)break;await new Promise(e=>setTimeout(e,100))}throw Error(`Login state check timed out`)},Qb=class extends Error{name=`BifParseError`},$b=[137,66,73,70,13,10,26,10],ex=64,tx=8,nx=4294967295,rx=36e3,ix=e=>{if(e.byteLength<ex)throw new Qb(`truncated header: ${e.byteLength} bytes`);let t=new DataView(e);if($b.some((e,n)=>t.getUint8(n)!==e))throw new Qb(`bad magic`);let n=t.getUint32(12,!0),r=t.getUint32(16,!0)||1e3;if(n>rx)throw new Qb(`implausible frame count ${n}`);let i=ex+(n+1)*tx;if(i>e.byteLength)throw new Qb(`truncated index: ${n} frames need ${i} bytes, have ${e.byteLength}`);let a=e=>t.getUint32(ex+e*tx,!0),o=e=>t.getUint32(ex+e*tx+4,!0);if(a(n)!==nx)throw new Qb(`the index does not end on the 0xffffffff entry`);let s=[];for(let t=0;t<n;t+=1){let c=o(t),l=o(t+1);if(c<i||l<=c||l>e.byteLength)throw new Qb(`image ${t} spans ${c}..${l}, outside ${i}..${e.byteLength}`);let u=a(t),d=t+1===n;if(!d&&a(t+1)<=u)throw new Qb(`timestamps do not increase at image ${t}`);s.push({start:u*r,end:d?1/0:a(t+1)*r,bytes:new Uint8Array(e,c,l-c)})}return s},ax=(e,t)=>{if(!e.length||!Number.isFinite(t))return;let n=0,r=e.length-1;for(;n<r;){let i=Math.ceil((n+r)/2);e[i].start<=t?n=i:r=i-1}return e[n]},ox=async({waitMs:e,fetchMs:t,maxBytes:n})=>{let r=/^(?:https?:\/\/|\/)\S*\.bif(?:[?#]\S*)?$/i,i=e=>typeof e==`string`&&e.length<8192&&e.includes(`.bif`)&&r.test(e),a=(e,t)=>{try{return e?.[t]}catch{return}},o=e=>{let t=Object.keys(e).find(e=>e.startsWith(`__reactFiber$`)||e.startsWith(`__reactInternalInstance$`));return t?a(e,t):void 0},s=e=>{let t=[],n=new Set,r=[e,...Array.from(e.querySelectorAll(`*`)).slice(0,3e3)];for(let e of r){let r=o(e);for(let e=0;r&&e<40&&!n.has(r);e+=1){n.add(r);let e=a(a(r,`memoizedProps`),`value`);e&&typeof e==`object`&&t.push(e),r=a(r,`return`)}}return t},c=e=>{let t=new Set,n=e,r=0;for(let e=0;e<=8&&n.length;e+=1){let e=[];for(let o of n){if(t.has(o))continue;if(t.add(o),r+=1,r>2e4)return;let n;try{n=Object.keys(o).slice(0,500)}catch{continue}for(let t of n){let n=a(o,t);if(i(n))return n;n&&typeof n==`object`&&(n===window||typeof a(n,`nodeType`)==`number`||ArrayBuffer.isView(n)||n instanceof ArrayBuffer||e.push(n))}}n=e}},l=e=>{let t=[];for(let n of e){let e=a(a(n,`volumeVM`),`_player`);if(!e||typeof e!=`object`)continue;let r=a(a(a(e,`playerOrchestrator`),`thumbnailOrchestrator`),`_currentBifUrl`);if(i(r))return{url:r,via:`named`};t.push(e)}let n=c(t.length?t:e);return n?{url:n,via:`search`}:void 0},u=async(e,r)=>{let i=new AbortController,a=setTimeout(()=>i.abort(),t);try{let t=await fetch(e,{signal:i.signal});if(!t.ok)return{none:`fetch-failed`,detail:`HTTP ${t.status}`};let a=Number(t.headers.get(`content-length`));if(a>n)return{none:`too-large`,detail:`${a} bytes`};let o=await t.arrayBuffer();return o.byteLength>n?{none:`too-large`,detail:`${o.byteLength} bytes`}:{bytes:o,via:r}}catch(e){return{none:`fetch-failed`,detail:String(e)}}finally{clearTimeout(a)}};try{let t=Date.now()+e,n=!1;for(;;){let e=document.querySelector(`.video-player-wrapper`);if(e?.querySelector(`video`)){n=!0;let t=l(s(e));if(t)return await u(t.url,t.via)}if(Date.now()>=t)return{none:n?`no-bif`:`no-player`};await new Promise(e=>setTimeout(e,500))}}catch(e){return{none:`failed`,detail:String(e)}}},sx={waitMs:1e4,fetchMs:15e3,maxBytes:31457280},cx=e=>{let t=new Map,n=!1;return{at:r=>{if(n)return;let i=ax(e,r*1e3);if(!i)return;let a=t.get(i);return a||(a={url:URL.createObjectURL(new Blob([i.bytes],{type:`image/jpeg`})),startTime:i.start/1e3,endTime:i.end/1e3},t.set(i,a)),a},dispose:()=>{n=!0;for(let{url:e}of t.values())URL.revokeObjectURL(e);t.clear()}}},lx=async e=>{let t=await e.evaluate(ox,sx);if(`none`in t)throw Error(`no BIF: ${t.none}${t.detail?` (${t.detail})`:``}`);let n=ix(t.bytes);if(!n.length)throw Error(`no BIF: the file has no images`);return cx(n)};l();var ux=e=>`https://static.crunchyroll.com/skip-events/production/${e}.json`,dx=e=>{try{return new URL(e).pathname.match(/\/watch\/([A-Z0-9]+)(?:\/|$)/)?.[1]}catch{return}},fx=[[`intro`,`Opening`],[`recap`,`Recap`],[`credits`,`Ending`],[`preview`,`Preview`]],px=`Episode`,mx=e=>typeof e==`object`&&!!e&&!Array.isArray(e),hx=(e,t)=>{if(!mx(e))return[];let n=t!==void 0&&Number.isFinite(t)&&t>0?t:1/0,r=fx.flatMap(([t,r])=>{let i=e[t];if(!mx(i))return[];let{start:a,end:o}=i;if(typeof a!=`number`||typeof o!=`number`||!Number.isFinite(a)||!Number.isFinite(o))return[];let s={start:Math.max(0,a),end:Math.min(o,n),title:r};return s.end>s.start?[s]:[]}).sort((e,t)=>e.start-t.start),i=[],a=0;for(let e of r){let t=Math.max(e.start,a);e.end<=t||(t>a&&i.push({start:a,end:t,title:px}),i.push({start:t,end:e.end,title:e.title}),a=e.end)}return i.length&&n!==1/0&&a<n&&i.push({start:a,end:n,title:px}),i},gx=new Set([403,404]),_x=async(e,t=ie)=>{let n=await t(ux(e));if(!n.ok){if(await n.body?.cancel().catch(()=>{}),gx.has(n.status))return{};throw Error(`${ux(e)} answered ${n.status}`)}return n.json()},vx=e=>{let[t,n]=h();return m(()=>{if(n(e?.duration),!e)return;let t=()=>n(e.duration);return e.addEventListener(`durationchange`,t),e.addEventListener(`loadedmetadata`,t),()=>{e.removeEventListener(`durationchange`,t),e.removeEventListener(`loadedmetadata`,t)}},[e]),t},yx=[],bx=(e,t)=>{let n=dx(e),[r,i]=h(),a=vx(t);return m(()=>{if(!n)return;let e=!1;return _x(n).then(t=>{e||i({episodeId:n,events:t})},t=>{e||console.warn(`[cr] skip events unavailable:`,t)}),()=>{e=!0}},[n]),b(()=>{if(!r||r.episodeId!==n)return yx;let e=hx(r.events,a);return e.length?e:yx},[r,n,a])};l();var xx=[`www.crunchyroll.com`,`crunchyroll.com`,`sso.crunchyroll.com`,`static.crunchyroll.com`],Sx=`
|
|
1300
1300
|
html, body {
|
|
1301
1301
|
margin: 0 !important;
|
|
1302
1302
|
padding: 0 !important;
|
|
@@ -1338,7 +1338,7 @@ ${Ey}
|
|
|
1338
1338
|
opacity: 0 !important;
|
|
1339
1339
|
pointer-events: none !important;
|
|
1340
1340
|
}
|
|
1341
|
-
`,
|
|
1341
|
+
`,Cx=`https://sso.crunchyroll.com/authorize?${new URLSearchParams({client_id:`noaihdevm_6iyg0a8l0q`,redirect_uri:`https://www.crunchyroll.com/callback`,response_type:`cookie`,state:`/`})}`,wx=async e=>{let[t,n]=await Promise.all([e.locator(`.cx-app`).exists(),e.locator(`#recaptcha-container`).exists()]);return t||n},Tx=async()=>R()?`extension`:(document.readyState!==`complete`&&await new Promise(e=>{let t=()=>{clearTimeout(n),e()},n=setTimeout(()=>{window.removeEventListener(`load`,t),e()},1e4);window.addEventListener(`load`,t,{once:!0})}),await new Promise(e=>setTimeout(e,300)),R()?`extension`:`cloud`),Ex=3e4,Dx=async(e,t)=>{let n=Date.now()+Ex;for(;!t()&&Date.now()<n;){try{if(await e.locator(`video`).exists())return t()?null:await e.locator(`video`).videoElement()}catch(e){if(e?.name===`LocatorUnsupportedError`)throw e}await new Promise(e=>setTimeout(e,100))}return null},Ox=s`
|
|
1342
1342
|
to { transform: rotate(360deg); }
|
|
1343
1343
|
`,kx=D`
|
|
1344
1344
|
position: relative;
|
|
@@ -1417,7 +1417,7 @@ ${Ey}
|
|
|
1417
1417
|
border-top-color: #fff;
|
|
1418
1418
|
animation: ${Ox} 0.8s linear infinite;
|
|
1419
1419
|
}
|
|
1420
|
-
`,Ax=({url:e})=>{let[t,n]=h(`detecting`),[r,i]=h(null),[a,s]=h(null),[c,l]=h(!0),[u,d]=h(!1),[f,g]=h(),[_,v]=h(null),[x,S]=h(0),[C,w]=h(0),[T,E]=h(!1),[D,k]=h(!1),A=o(null),j=o(null),[ee,te]=h(!1),M=o(!1),[N,F]=h(),[I,L]=h(),ne=vx(e,_),re=o(0),ie=o({generation:0,tail:Promise.resolve()}),B=o(!0),ae=p(()=>{let e=re.current+1;return re.current=e,ie.current={generation:e,tail:Promise.resolve()},F(void 0),e},[]),oe=p((e,t)=>{if(ie.current.generation!==e)return Promise.reject(Error(`Crunchyroll track operation cancelled`));let n=ie.current,r=n.tail.then(t);return n.tail=r.then(()=>{},()=>{}),r},[]);m(()=>()=>{B.current=!1,re.current+=1},[]),m(()=>{let e=!1;return wx().then(t=>{e||n(t)}),()=>{e=!0}},[]),m(()=>{if(!r||t===`detecting`)return;let e=!1;return z({iframe:r,domains:yx,permissions:[{category:`evaluation`,reason:`Switch Crunchyroll audio and subtitles, seek the video, and show the seek preview thumbnails`}]}).then(r=>{if(e)return;let i=R()?`extension`:`cloud`;if(i!==t){n(i);return}s(r)}).catch(t=>{e||(console.error(`Failed to attach Crunchyroll frame`,t),g(t?.message||`Failed to load player`),l(!1))}),()=>{e=!0}},[r,t]),m(()=>{if(!a)return;let n=!1,r=()=>n;return l(!0),g(void 0),d(!1),v(null),ae(),(async()=>{if(t===`cloud`){if(await a.goto(e,{waitUntil:`load`}),n)return;let{isLoggedIn:t}=await Tx(a,r);if(n)return;if(!t){l(!1),d(!0);return}if(await a.addStyleTag({content:bx}),n)return;let i=await Dx(a,r);if(n)return;if(l(!1),!i)throw Error(`The episode did not load a player. It may be unavailable or require a different plan.`);v(i);return}if(await a.goto(e,{waitUntil:`documentstart`}),n||(await a.addStyleTag({content:bx}),n))return;let{isLoggedIn:i}=await Tx(a,r);if(n)return;if(!i){l(!1),d(!0);return}let o=await Dx(a,r);if(!n){if(l(!1),!o)throw Error(`The episode did not load a player. It may be unavailable or require a different plan.`);v(o)}})().catch(e=>{n||(console.error(`Failed to load Crunchyroll player`,e),g(e?.message||`Failed to load player`),l(!1))}),()=>{n=!0}},[a,e,x,t,ae]),m(()=>{if(!a||!_)return;let e=ae(),t=!1,n=()=>t||!B.current||e!==re.current;return(async()=>{let t,r;for(let i=0;i<5&&!n();i+=1){try{if(r=await oe(e,()=>Rb(a,n)),t=void 0,n()||(F(r),r.audio&&r.subtitles))return}catch(e){t=e}await new Promise(e=>setTimeout(e,500))}if(!r&&t)throw t})().then(()=>{},e=>{n()||console.warn(`[cr] track discovery failed:`,e)}),()=>{t=!0}},[a,_,ae,oe]),m(()=>{if(!a||!_)return;let e=!1,t;return sx(a).then(n=>{if(e)return n.dispose();t=n,L(n)},t=>{e||console.warn(`[cr] seek thumbnails unavailable:`,t)}),()=>{e=!0,t?.dispose(),L(void 0)}},[a,_]);let se=re.current,ce=p((e,t)=>{if(!a||!_)return Promise.reject(Error(`Crunchyroll player is not ready`));let n=()=>!B.current||se!==re.current;return oe(se,async()=>{try{let r=await Kb(a,_,e,t,n);if(n())throw Error(`Crunchyroll track operation cancelled`);F(r)}catch(e){if(!n())try{let e=await Rb(a,n);n()||F(e)}catch{}throw e}})},[a,_,oe,se]),ue=b(()=>N?.subtitles&&{selection:{...N.subtitles,select:e=>ce(`subtitles`,e)}},[N?.subtitles,ce]),de=b(()=>N?.audio&&{selection:{...N.audio,select:e=>ce(`audio`,e)}},[N?.audio,ce]),fe=p(()=>{if(A.current!==null)return;let e=globalThis.open(xx,`_blank`,`width=500,height=700`);if(!e){k(!0),l(!1);return}k(!1),E(!0),j.current=e;let t=setInterval(()=>{e.closed&&(clearInterval(t),A.current===t&&(A.current=null),j.current===e&&(j.current=null),E(!1),S(e=>e+1))},500);A.current=t},[]),pe=p(()=>{s(null),g(void 0),v(null),ae(),d(!1),l(!0),w(e=>e+1)},[ae]),me=p(()=>{if(M.current)return;M.current=!0;let e=le({url:xx,domains:yx,isSignedIn:e=>e.locator(`#user-menu-authenticated`).exists(),onSignInPage:Sx});k(!1),te(!0),e.then(e=>{if(B.current){if(e===`blocked`){k(!0);return}if(e===`unsupported`){g(`The Crunchyroll sign-in window could not be opened here.`);return}if(e===`authed`){pe();return}d(!1),l(!0),S(e=>e+1)}},e=>{B.current&&(console.error(`Crunchyroll sign-in window failed`,e),g(e?.message||`The sign-in window failed`))}).finally(()=>{M.current=!1,B.current&&te(!1)})},[pe]);m(()=>()=>{A.current!==null&&(clearInterval(A.current),A.current=null)},[]),m(()=>{A.current!==null&&(clearInterval(A.current),A.current=null,E(!1)),k(!1)},[e]);let he=p(()=>{j.current!==null&&(j.current.close(),j.current=null),A.current!==null&&(clearInterval(A.current),A.current=null),k(!1),E(!1),pe()},[pe]),ge=(c||f||D||u)&&y(`div`,{className:`overlay`,children:[u&&!f&&!D&&y(O,{children:[`You need to be logged in to Crunchyroll to watch this content.`,t===`extension`?P(`button`,{className:`login-button`,onClick:fe,disabled:T,children:T?`Finish signing in the popup...`:`Open Crunchyroll Login Page`}):y(O,{children:[P(`button`,{className:`login-button`,onClick:me,disabled:ee,children:ee?`Finish signing in the window...`:`Sign in to Crunchyroll`}),P(`span`,{className:`login-note`,children:`Sign-in happens in a window served through FKN, so your browser will not autofill saved passwords or offer passkeys there.`})]})]}),D&&!f&&y(O,{children:[`The login popup was blocked. Allow popups for this page and try again.`,P(`button`,{className:`login-button`,onClick:t===`extension`?fe:me,children:`Open Crunchyroll Login Page`})]}),f&&y(O,{children:[f,P(`button`,{className:`login-button`,onClick:he,children:`Retry`})]}),c&&!f&&!u&&P(`div`,{className:`loading-spinner`,role:`status`,"aria-label":`Loading`})]});return y(`div`,{css:kx,children:[t!==`detecting`&&P(Yb,{remote:_,frame:a,subtitles:ue,audioTracks:de,thumbnails:I,chapters:ne,children:P(`iframe`,{ref:i,className:`cr-frame`,referrerPolicy:`no-referrer`,allow:`encrypted-media; autoplay; fullscreen;`},`${t}-${C}`)}),ge]})},jx=e=>e,Mx=jx(({className:e,children:t})=>P(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:18,height:18,fill:`none`,"aria-hidden":`true`,className:e,children:t})),Nx=jx(({className:e})=>P(Mx,{className:e,children:P(`path`,{fill:`currentColor`,d:`m14.051 10.723-7.985 4.964a1.98 1.98 0 0 1-2.758-.638A2.06 2.06 0 0 1 3 13.964V4.036C3 2.91 3.895 2 5 2c.377 0 .747.109 1.066.313l7.985 4.964a2.057 2.057 0 0 1 .627 2.808c-.16.257-.373.475-.627.637`})})),Px=jx(({className:e})=>y(Mx,{className:e,children:[P(`rect`,{width:5,height:14,x:2,y:2,fill:`currentColor`,rx:1.75}),P(`rect`,{width:5,height:14,x:11,y:2,fill:`currentColor`,rx:1.75})]})),Fx=jx(({className:e})=>y(Mx,{className:e,children:[P(`path`,{fill:`currentColor`,d:`M9 17a8 8 0 0 1-8-8h2a6 6 0 1 0 1.287-3.713l1.286 1.286A.25.25 0 0 1 5.396 7H1.25A.25.25 0 0 1 1 6.75V2.604a.25.25 0 0 1 .427-.177l1.438 1.438A8 8 0 1 1 9 17`}),P(`path`,{fill:`currentColor`,d:`m11.61 9.639-3.331 2.07a.826.826 0 0 1-1.15-.266.86.86 0 0 1-.129-.452V6.849C7 6.38 7.374 6 7.834 6c.158 0 .312.045.445.13l3.331 2.071a.858.858 0 0 1 0 1.438`})]})),Ix=jx(({className:e})=>P(Mx,{className:e,children:P(`path`,{fill:`currentColor`,d:`M1 9c0 2.21.895 4.21 2.343 5.657l1.414-1.414a6 6 0 1 1 8.956-7.956l-1.286 1.286a.25.25 0 0 0 .177.427h4.146a.25.25 0 0 0 .25-.25V2.604a.25.25 0 0 0-.427-.177l-1.438 1.438A8 8 0 0 0 1 9`})})),Lx=jx(({className:e})=>P(Mx,{className:e,children:P(`path`,{fill:`currentColor`,d:`M.714 6.008h3.072l4.071-3.857c.5-.376 1.143 0 1.143.601V15.28c0 .602-.643.903-1.143.602l-4.071-3.858H.714c-.428 0-.714-.3-.714-.752V6.76c0-.451.286-.752.714-.752M14.5 7.586l-1.768-1.768a1 1 0 1 0-1.414 1.414L13.085 9l-1.767 1.768a1 1 0 0 0 1.414 1.414l1.768-1.768 1.768 1.768a1 1 0 0 0 1.414-1.414L15.914 9l1.768-1.768a1 1 0 0 0-1.414-1.414z`})})),Rx=jx(({className:e})=>P(Mx,{className:e,children:P(`path`,{fill:`currentColor`,d:`M.714 6.008h3.072l4.071-3.857c.5-.376 1.143 0 1.143.601V15.28c0 .602-.643.903-1.143.602l-4.071-3.858H.714c-.428 0-.714-.3-.714-.752V6.76c0-.451.286-.752.714-.752m10.568.59a.91.91 0 0 1 0-1.316.91.91 0 0 1 1.316 0c1.203 1.203 1.47 2.216 1.522 3.208q.012.255.011.51c0 1.16-.358 2.733-1.533 3.803a.7.7 0 0 1-.298.156c-.382.106-.873-.011-1.018-.156a.91.91 0 0 1 0-1.316c.57-.57.995-1.551.995-2.487 0-.944-.26-1.667-.995-2.402`})})),zx=jx(({className:e})=>y(Mx,{className:e,children:[P(`path`,{fill:`currentColor`,d:`M15.6 3.3c-.4-.4-1-.4-1.4 0s-.4 1 0 1.4C15.4 5.9 16 7.4 16 9s-.6 3.1-1.8 4.3c-.4.4-.4 1 0 1.4.2.2.5.3.7.3.3 0 .5-.1.7-.3C17.1 13.2 18 11.2 18 9s-.9-4.2-2.4-5.7`}),P(`path`,{fill:`currentColor`,d:`M.714 6.008h3.072l4.071-3.857c.5-.376 1.143 0 1.143.601V15.28c0 .602-.643.903-1.143.602l-4.071-3.858H.714c-.428 0-.714-.3-.714-.752V6.76c0-.451.286-.752.714-.752m10.568.59a.91.91 0 0 1 0-1.316.91.91 0 0 1 1.316 0c1.203 1.203 1.47 2.216 1.522 3.208q.012.255.011.51c0 1.16-.358 2.733-1.533 3.803a.7.7 0 0 1-.298.156c-.382.106-.873-.011-1.018-.156a.91.91 0 0 1 0-1.316c.57-.57.995-1.551.995-2.487 0-.944-.26-1.667-.995-2.402`})]})),Bx=jx(({className:e})=>P(Mx,{className:e,children:P(`path`,{fill:`currentColor`,d:`M9.57 3.617A1 1 0 0 0 8.646 3H4c-.552 0-1 .449-1 1v4.646a.996.996 0 0 0 1.001 1 1 1 0 0 0 .706-.293l4.647-4.647a1 1 0 0 0 .216-1.089m4.812 4.812a1 1 0 0 0-1.089.217l-4.647 4.647a.998.998 0 0 0 .708 1.706H14c.552 0 1-.449 1-1V9.353a1 1 0 0 0-.618-.924`})})),Vx=jx(({className:e})=>P(Mx,{className:e,children:P(`path`,{fill:`currentColor`,d:`M7.883 1.93a.99.99 0 0 0-1.09.217L2.146 6.793A.998.998 0 0 0 2.853 8.5H7.5c.551 0 1-.449 1-1V2.854a1 1 0 0 0-.617-.924m7.263 7.57H10.5c-.551 0-1 .449-1 1v4.646a.996.996 0 0 0 1.001 1.001 1 1 0 0 0 .706-.293l4.646-4.646a.998.998 0 0 0-.707-1.707z`})})),Hx=jx(({className:e})=>y(Mx,{className:e,children:[P(`path`,{fill:`currentColor`,d:`M13 2a4 4 0 0 1 4 4v2.035A3.5 3.5 0 0 0 16.5 8H15V6.273C15 5.018 13.96 4 12.679 4H4.32C3.04 4 2 5.018 2 6.273v5.454C2 12.982 3.04 14 4.321 14H6v1.5q0 .255.035.5H4a4 4 0 0 1-4-4V6a4 4 0 0 1 4-4z`}),P(`rect`,{width:10,height:7,x:8,y:10,fill:`currentColor`,rx:2}),P(`path`,{fill:`currentColor`,d:`M7.129 5.547a.6.6 0 0 0-.656.13L3.677 8.473A.6.6 0 0 0 4.102 9.5h2.796c.332 0 .602-.27.602-.602V6.103a.6.6 0 0 0-.371-.556`})]})),Ux=jx(({className:e})=>y(Mx,{className:e,children:[P(`path`,{fill:`currentColor`,d:`M13 2a4 4 0 0 1 4 4v2.036A3.5 3.5 0 0 0 16.5 8H15V6.273C15 5.018 13.96 4 12.679 4H4.32C3.04 4 2 5.018 2 6.273v5.454C2 12.982 3.04 14 4.321 14H6v1.5q0 .255.036.5H4a4 4 0 0 1-4-4V6a4 4 0 0 1 4-4z`}),P(`rect`,{width:10,height:7,x:8,y:10,fill:`currentColor`,rx:2}),P(`path`,{fill:`currentColor`,d:`M4.871 10.454a.6.6 0 0 0 .656-.131l2.796-2.796A.6.6 0 0 0 7.898 6.5H5.102a.603.603 0 0 0-.602.602v2.795a.6.6 0 0 0 .371.556`})]})),Wx=jx(({className:e})=>P(Mx,{className:e,children:P(`path`,{fill:`currentColor`,d:`M15 2a3 3 0 0 1 3 3v8a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3V5a3 3 0 0 1 3-3zM4 11a1 1 0 1 0 0 2h5a1 1 0 1 0 0-2zm8 0a1 1 0 1 0 0 2h2a1 1 0 1 0 0-2zM4 8a1 1 0 0 0 0 2h1a1 1 0 0 0 0-2zm4 0a1 1 0 0 0 0 2h3a1 1 0 1 0 0-2zm6 0a1 1 0 1 0 0 2 1 1 0 0 0 0-2`})})),Gx=jx(({className:e})=>y(Mx,{className:e,children:[P(`rect`,{width:16,height:12,x:1,y:3,stroke:`currentColor`,strokeWidth:2,rx:3}),P(`rect`,{width:3,height:2,x:3,y:8,fill:`currentColor`,rx:1}),P(`rect`,{width:2,height:2,x:13,y:8,fill:`currentColor`,rx:1}),P(`rect`,{width:4,height:2,x:11,y:11,fill:`currentColor`,rx:1}),P(`rect`,{width:5,height:2,x:7,y:8,fill:`currentColor`,rx:1}),P(`rect`,{width:7,height:2,x:3,y:11,fill:`currentColor`,rx:1})]})),Kx=jx(({className:e})=>P(Mx,{className:e,children:y(`g`,{fill:`currentColor`,children:[P(`rect`,{width:2,height:5,x:8,y:.5,opacity:.5,rx:1,children:P(`animate`,{attributeName:`opacity`,begin:`0s`,calcMode:`linear`,dur:`1s`,repeatCount:`indefinite`,values:`1;0`})}),P(`rect`,{width:2,height:5,x:12.243,y:2.257,opacity:.45,rx:1,transform:`rotate(45 13.243 4.757)`,children:P(`animate`,{attributeName:`opacity`,begin:`0.125s`,calcMode:`linear`,dur:`1s`,repeatCount:`indefinite`,values:`1;0`})}),P(`rect`,{width:5,height:2,x:12.5,y:8,opacity:.4,rx:1,children:P(`animate`,{attributeName:`opacity`,begin:`0.25s`,calcMode:`linear`,dur:`1s`,repeatCount:`indefinite`,values:`1;0`})}),P(`rect`,{width:5,height:2,x:10.743,y:12.243,opacity:.35,rx:1,transform:`rotate(45 13.243 13.243)`,children:P(`animate`,{attributeName:`opacity`,begin:`0.375s`,calcMode:`linear`,dur:`1s`,repeatCount:`indefinite`,values:`1;0`})}),P(`rect`,{width:2,height:5,x:8,y:12.5,opacity:.3,rx:1,children:P(`animate`,{attributeName:`opacity`,begin:`0.5s`,calcMode:`linear`,dur:`1s`,repeatCount:`indefinite`,values:`1;0`})}),P(`rect`,{width:2,height:5,x:3.757,y:10.743,opacity:.25,rx:1,transform:`rotate(45 4.757 13.243)`,children:P(`animate`,{attributeName:`opacity`,begin:`0.625s`,calcMode:`linear`,dur:`1s`,repeatCount:`indefinite`,values:`1;0`})}),P(`rect`,{width:5,height:2,x:.5,y:8,opacity:.15,rx:1,children:P(`animate`,{attributeName:`opacity`,begin:`0.75s`,calcMode:`linear`,dur:`1s`,repeatCount:`indefinite`,values:`1;0`})}),P(`rect`,{width:5,height:2,x:2.257,y:3.757,opacity:.1,rx:1,transform:`rotate(45 4.757 4.757)`,children:P(`animate`,{attributeName:`opacity`,begin:`0.875s`,calcMode:`linear`,dur:`1s`,repeatCount:`indefinite`,values:`1;0`})})]})})),qx=jx(({className:e})=>P(Mx,{className:e,children:P(`path`,{fill:`currentColor`,d:`M9 2a1 1 0 0 1 1 1v12a1 1 0 1 1-2 0V3a1 1 0 0 1 1-1zm4 3a1 1 0 0 1 1 1v6a1 1 0 1 1-2 0V6a1 1 0 0 1 1-1zM5 5a1 1 0 0 1 1 1v6a1 1 0 1 1-2 0V6a1 1 0 0 1 1-1zm8 4a1 1 0 0 1 1 1v1a1 1 0 1 1-2 0v-1a1 1 0 0 1 1-1zM5 9a1 1 0 0 1 1 1v1a1 1 0 1 1-2 0v-1a1 1 0 0 1 1-1z`})})),Jx=jx(({className:e})=>P(Mx,{className:e,children:P(`path`,{fill:`currentColor`,d:`M3 5a1 1 0 0 1 1-1h10a1 1 0 1 1 0 2H4a1 1 0 0 1-1-1zm0 4a1 1 0 0 1 1-1h10a1 1 0 1 1 0 2H4a1 1 0 0 1-1-1zm1 3a1 1 0 1 0 0 2h6a1 1 0 1 0 0-2H4z`})})),Yx=jx(({className:e})=>P(Mx,{className:e,children:P(`path`,{fill:`currentColor`,d:`M14.53 4.53a.75.75 0 0 0-1.06-1.06L7 9.94 4.53 7.47a.75.75 0 0 0-1.06 1.06l3 3a.75.75 0 0 0 1.06 0l7-7z`})}));l();var Xx=10,$=e=>e,Zx=$(wh.Root),Qx=$(_h),$x=$(Mh.Root),eS=$(gh.Popup),tS=$(gh.Title),nS=$(gh.Close),rS=$(Mh.Description),iS=$(Mg.Provider),aS=$(Mg.Root),oS=$(Mg.Trigger),sS=$(Mg.Popup),cS=$($h.Root),lS=$($h.Trigger),uS=$($h.Popup),dS=$(Uh),fS=$(eg),pS=$(Vh),mS=$(Hh),hS=$(Nh),gS=$(Wh),_S=$(_g.Value),vS=$(bg.Root),yS=$(pg.Track),bS=$(pg.Fill),xS=$(pg.Buffer),SS=$(pg.Thumb),CS=$(pg.Value),wS=$(Fg.Root),TS=$(zh),ES=$(Fh),DS=$(Vf),OS=({className:e,...t})=>P(`button`,{type:`button`,className:`media-button media-button--subtle media-button--icon${e?` ${e}`:``}`,...t}),kS=({selection:e,icon:t})=>{let[n,r]=h(!1),[i,a]=h(!1),[o,s]=h(!1);m(()=>s(!1),[e.selectedId]);let c=[...e.offLabel?[{id:null,label:e.offLabel}]:[],...e.options],l=t=>{if(t===e.selectedId){r(!1);return}s(!1),a(!0),Promise.resolve().then(()=>e.onSelect(t)).then(()=>r(!1)).catch(t=>{console.warn(`[player] ${e.label} selection failed:`,t),s(!0)}).finally(()=>a(!1))};return y(cS,{open:n,onOpenChange:e=>r(e),children:[P(lS,{render:P(OS,{className:`media-button--menu${o?` media-button--error`:``}`,"aria-label":e.label}),children:t}),P(uS,{className:`media-surface media-popover media-popover--menu`,children:y(`div`,{className:`stub-menu`,role:`menu`,"aria-label":e.label,children:[P(`div`,{className:`stub-menu__heading`,children:e.label}),c.map(t=>{let n=t.id===e.selectedId;return y(`button`,{type:`button`,role:`menuitemradio`,"aria-checked":n,className:`stub-menu__item${n?` stub-menu__item--active`:``}`,disabled:i||`disabled`in t&&t.disabled,onClick:()=>l(t.id),children:[P(`span`,{className:`stub-menu__check`,children:n?P(Yx,{className:`media-icon`}):null}),P(`span`,{className:`stub-menu__label`,children:t.label}),`description`in t&&t.description?P(`span`,{className:`stub-menu__description`,children:t.description}):null]},t.id??`__off__`)})]})})]})},AS=()=>y(cS,{openOnHover:!0,delay:200,closeDelay:100,side:`top`,children:[P(lS,{render:y(pS,{className:`media-button--mute`,render:P(OS,{}),children:[P(Lx,{className:`media-icon media-icon--volume-off`}),P(Rx,{className:`media-icon media-icon--volume-low`}),P(zx,{className:`media-icon media-icon--volume-high`})]})}),P(uS,{className:`media-surface media-popover media-popover--volume`,children:y(wS,{className:`media-slider`,orientation:`vertical`,thumbAlignment:`edge`,children:[P(yS,{className:`media-slider__track`,children:P(bS,{className:`media-slider__fill`})}),P(SS,{className:`media-slider__thumb media-slider__thumb--persistent`})]})})]}),jS=({capabilities:e,children:t,className:n,...r})=>y(DS,{className:`media-default-skin media-default-skin--video${n?` ${n}`:``}`,...r,children:[t,P(Qx,{render:e=>P(`div`,{...e,className:`media-buffering-indicator`,children:P(`div`,{className:`media-surface`,children:P(Kx,{className:`media-icon`})})})}),P($x,{children:P(eS,{className:`media-error`,children:y(`div`,{className:`media-error__dialog media-surface`,children:[y(`div`,{className:`media-error__content`,children:[P(tS,{className:`media-error__title`,children:`Something went wrong.`}),P(rS,{className:`media-error__description`})]}),P(`div`,{className:`media-error__actions`,children:P(nS,{className:`media-button media-button--primary`,children:`OK`})})]})})}),P(Zx,{className:`media-surface media-controls`,children:y(iS,{children:[y(`div`,{className:`media-button-group`,children:[y(aS,{side:`top`,children:[P(oS,{render:y(dS,{className:`media-button--play`,render:P(OS,{}),children:[P(Fx,{className:`media-icon media-icon--restart`}),P(Nx,{className:`media-icon media-icon--play`}),P(Px,{className:`media-icon media-icon--pause`})]})}),P(sS,{className:`media-surface media-tooltip`})]}),y(aS,{side:`top`,children:[P(oS,{render:P(fS,{seconds:-10,className:`media-button--seek`,render:P(OS,{}),children:y(`span`,{className:`media-icon__container`,children:[P(Ix,{className:`media-icon media-icon--seek media-icon--flipped`}),P(`span`,{className:`media-icon__label`,children:Xx})]})})}),y(sS,{className:`media-surface media-tooltip`,children:[`Seek backward `,Xx,` seconds`]})]}),y(aS,{side:`top`,children:[P(oS,{render:P(fS,{seconds:Xx,className:`media-button--seek`,render:P(OS,{}),children:y(`span`,{className:`media-icon__container`,children:[P(Ix,{className:`media-icon media-icon--seek`}),P(`span`,{className:`media-icon__label`,children:Xx})]})})}),y(sS,{className:`media-surface media-tooltip`,children:[`Seek forward `,Xx,` seconds`]})]})]}),y(`div`,{className:`media-time-controls`,children:[P(_S,{type:`current`,className:`media-time`}),y(vS,{className:`media-slider`,children:[y(yS,{className:`media-slider__track`,children:[P(bS,{className:`media-slider__fill`}),P(xS,{className:`media-slider__buffer`})]}),P(SS,{className:`media-slider__thumb`}),P(`div`,{className:`media-surface media-thumbnail media-slider__preview`,children:P(CS,{type:`pointer`,className:`media-time media-thumbnail__time`})})]}),P(_S,{type:`duration`,className:`media-time`})]}),y(`div`,{className:`media-button-group`,children:[y(aS,{side:`top`,children:[P(oS,{render:P(gS,{className:`media-button--playback-rate`,render:P(OS,{})})}),P(sS,{className:`media-surface media-tooltip`,children:`Toggle playback rate`})]}),P(AS,{}),e?.subtitles&&P(kS,{selection:e.subtitles,icon:e.subtitles.selectedId?P(Wx,{className:`media-icon`}):P(Gx,{className:`media-icon`})},`subtitles`),e?.audioTracks&&P(kS,{selection:e.audioTracks,icon:P(qx,{className:`media-icon`})},`audio`),e?.qualityLevels&&P(kS,{selection:e.qualityLevels,icon:P(Jx,{className:`media-icon`})},`quality`),y(aS,{side:`top`,children:[P(oS,{render:y(mS,{className:`media-button--pip`,render:P(OS,{}),children:[P(Hx,{className:`media-icon media-icon--pip-enter`}),P(Ux,{className:`media-icon media-icon--pip-exit`})]})}),P(sS,{className:`media-surface media-tooltip`})]}),y(aS,{side:`top`,children:[P(oS,{render:y(hS,{className:`media-button--fullscreen`,render:P(OS,{}),children:[P(Bx,{className:`media-icon media-icon--fullscreen-enter`}),P(Vx,{className:`media-icon media-icon--fullscreen-exit`})]})}),P(sS,{className:`media-surface media-tooltip`})]})]})]})}),P(`div`,{className:`media-overlay`}),P(TS,{keys:`Space`,action:`togglePaused`}),P(TS,{keys:`k`,action:`togglePaused`}),P(TS,{keys:`m`,action:`toggleMuted`}),P(TS,{keys:`f`,action:`toggleFullscreen`}),P(TS,{keys:`i`,action:`togglePictureInPicture`}),P(TS,{keys:`ArrowRight`,action:`seekStep`,value:5}),P(TS,{keys:`ArrowLeft`,action:`seekStep`,value:-5}),P(TS,{keys:`l`,action:`seekStep`,value:10}),P(TS,{keys:`j`,action:`seekStep`,value:-10}),P(TS,{keys:`ArrowUp`,action:`volumeStep`,value:.05}),P(TS,{keys:`ArrowDown`,action:`volumeStep`,value:-.05}),P(TS,{keys:`0-9`,action:`seekToPercent`}),P(TS,{keys:`Home`,action:`seekToPercent`,value:0}),P(TS,{keys:`End`,action:`seekToPercent`,value:100}),P(TS,{keys:`>`,action:`speedUp`}),P(TS,{keys:`<`,action:`speedDown`}),P(ES,{type:`tap`,action:`togglePaused`,pointer:`mouse`,region:`center`}),P(ES,{type:`tap`,action:`toggleControls`,pointer:`touch`}),P(ES,{type:`doubletap`,action:`seekStep`,value:-10,region:`left`}),P(ES,{type:`doubletap`,action:`toggleFullscreen`,region:`center`}),P(ES,{type:`doubletap`,action:`seekStep`,value:10,region:`right`})]});l();var{Provider:MS}=Uf({features:qd}),NS=e=>`media`in e?e:{media:e},PS=({remote:e,frame:t,adapter:n})=>{let r=wl();return m(()=>{if(!r||!e||!t)return;let i=n?n(e,t):e;if(!i)return;let a=NS(i);r(a.media);let o=B(a.media);return()=>{o(),r(null),a.dispose?.()}},[e,t,n,r]),null},FS=D`
|
|
1420
|
+
`,Ax=({url:e})=>{let[t,n]=h(`detecting`),[r,i]=h(null),[a,s]=h(null),[c,l]=h(!0),[u,d]=h(!1),[f,g]=h(),[_,v]=h(null),[x,S]=h(0),[C,w]=h(0),[T,E]=h(!1),[D,k]=h(!1),A=o(null),j=o(null),[ee,te]=h(!1),M=o(!1),[N,F]=h(),[I,L]=h(),ne=bx(e,_),re=o(0),ie=o({generation:0,tail:Promise.resolve()}),B=o(!0),ae=p(()=>{let e=re.current+1;return re.current=e,ie.current={generation:e,tail:Promise.resolve()},F(void 0),e},[]),oe=p((e,t)=>{if(ie.current.generation!==e)return Promise.reject(Error(`Crunchyroll track operation cancelled`));let n=ie.current,r=n.tail.then(t);return n.tail=r.then(()=>{},()=>{}),r},[]);m(()=>()=>{B.current=!1,re.current+=1},[]),m(()=>{let e=!1;return Tx().then(t=>{e||n(t)}),()=>{e=!0}},[]),m(()=>{if(!r||t===`detecting`)return;let e=!1;return z({iframe:r,domains:xx,permissions:[{category:`evaluation`,reason:`Switch Crunchyroll audio and subtitles, seek the video, and show the seek preview thumbnails`}]}).then(r=>{if(e)return;let i=R()?`extension`:`cloud`;if(i!==t){n(i);return}s(r)}).catch(t=>{e||(console.error(`Failed to attach Crunchyroll frame`,t),g(t?.message||`Failed to load player`),l(!1))}),()=>{e=!0}},[r,t]),m(()=>{if(!a)return;let n=!1,r=()=>n;return l(!0),g(void 0),d(!1),v(null),ae(),(async()=>{if(t===`cloud`){if(await a.goto(e,{waitUntil:`documentstart`}),n)return;let{isLoggedIn:t}=await Zb(a,r);if(n)return;if(!t){l(!1),d(!0);return}if(await a.addStyleTag({content:Sx}),n)return;let i=await Dx(a,r);if(n)return;if(l(!1),!i)throw Error(`The episode did not load a player. It may be unavailable or require a different plan.`);v(i);return}if(await a.goto(e,{waitUntil:`documentstart`}),n||(await a.addStyleTag({content:Sx}),n))return;let{isLoggedIn:i}=await Zb(a,r);if(n)return;if(!i){l(!1),d(!0);return}let o=await Dx(a,r);if(!n){if(l(!1),!o)throw Error(`The episode did not load a player. It may be unavailable or require a different plan.`);v(o)}})().catch(e=>{n||(console.error(`Failed to load Crunchyroll player`,e),g(e?.message||`Failed to load player`),l(!1))}),()=>{n=!0}},[a,e,x,t,ae]),m(()=>{if(!a||!_)return;let e=ae(),t=!1,n=()=>t||!B.current||e!==re.current;return(async()=>{let t,r;for(let i=0;i<5&&!n();i+=1){try{if(r=await oe(e,()=>Rb(a,n)),t=void 0,n()||(F(r),r.audio&&r.subtitles))return}catch(e){t=e}await new Promise(e=>setTimeout(e,500))}if(!r&&t)throw t})().then(()=>{},e=>{n()||console.warn(`[cr] track discovery failed:`,e)}),()=>{t=!0}},[a,_,ae,oe]),m(()=>{if(!a||!_)return;let e=!1,t;return lx(a).then(n=>{if(e)return n.dispose();t=n,L(n)},t=>{e||console.warn(`[cr] seek thumbnails unavailable:`,t)}),()=>{e=!0,t?.dispose(),L(void 0)}},[a,_]);let se=re.current,ce=p((e,t)=>{if(!a||!_)return Promise.reject(Error(`Crunchyroll player is not ready`));let n=()=>!B.current||se!==re.current;return oe(se,async()=>{try{let r=await Kb(a,_,e,t,n);if(n())throw Error(`Crunchyroll track operation cancelled`);F(r)}catch(e){if(!n())try{let e=await Rb(a,n);n()||F(e)}catch{}throw e}})},[a,_,oe,se]),ue=b(()=>N?.subtitles&&{selection:{...N.subtitles,select:e=>ce(`subtitles`,e)}},[N?.subtitles,ce]),de=b(()=>N?.audio&&{selection:{...N.audio,select:e=>ce(`audio`,e)}},[N?.audio,ce]),fe=p(()=>{if(A.current!==null)return;let e=globalThis.open(Cx,`_blank`,`width=500,height=700`);if(!e){k(!0),l(!1);return}k(!1),E(!0),j.current=e;let t=setInterval(()=>{e.closed&&(clearInterval(t),A.current===t&&(A.current=null),j.current===e&&(j.current=null),E(!1),S(e=>e+1))},500);A.current=t},[]),pe=p(()=>{s(null),g(void 0),v(null),ae(),d(!1),l(!0),w(e=>e+1)},[ae]),me=p(()=>{if(M.current)return;M.current=!0;let e=le({url:Cx,domains:xx,isSignedIn:e=>e.locator(`#user-menu-authenticated`).exists(),onSignInPage:wx});k(!1),te(!0),e.then(e=>{if(B.current){if(e===`blocked`){k(!0);return}if(e===`unsupported`){g(`The Crunchyroll sign-in window could not be opened here.`);return}if(e===`authed`){pe();return}d(!1),l(!0),S(e=>e+1)}},e=>{B.current&&(console.error(`Crunchyroll sign-in window failed`,e),g(e?.message||`The sign-in window failed`))}).finally(()=>{M.current=!1,B.current&&te(!1)})},[pe]);m(()=>()=>{A.current!==null&&(clearInterval(A.current),A.current=null)},[]),m(()=>{A.current!==null&&(clearInterval(A.current),A.current=null,E(!1)),k(!1)},[e]);let he=p(()=>{j.current!==null&&(j.current.close(),j.current=null),A.current!==null&&(clearInterval(A.current),A.current=null),k(!1),E(!1),pe()},[pe]),ge=(c||f||D||u)&&y(`div`,{className:`overlay`,children:[u&&!f&&!D&&y(O,{children:[`You need to be logged in to Crunchyroll to watch this content.`,t===`extension`?P(`button`,{className:`login-button`,onClick:fe,disabled:T,children:T?`Finish signing in the popup...`:`Open Crunchyroll Login Page`}):y(O,{children:[P(`button`,{className:`login-button`,onClick:me,disabled:ee,children:ee?`Finish signing in the window...`:`Sign in to Crunchyroll`}),P(`span`,{className:`login-note`,children:`Sign-in happens in a window served through FKN, so your browser will not autofill saved passwords or offer passkeys there.`})]})]}),D&&!f&&y(O,{children:[`The login popup was blocked. Allow popups for this page and try again.`,P(`button`,{className:`login-button`,onClick:t===`extension`?fe:me,children:`Open Crunchyroll Login Page`})]}),f&&y(O,{children:[f,P(`button`,{className:`login-button`,onClick:he,children:`Retry`})]}),c&&!f&&!u&&P(`div`,{className:`loading-spinner`,role:`status`,"aria-label":`Loading`})]});return y(`div`,{css:kx,children:[t!==`detecting`&&P(Yb,{remote:_,frame:a,subtitles:ue,audioTracks:de,thumbnails:I,chapters:ne,children:P(`iframe`,{ref:i,className:`cr-frame`,referrerPolicy:`no-referrer`,allow:`encrypted-media; autoplay; fullscreen;`},`${t}-${C}`)}),ge]})},jx=e=>e,Mx=jx(({className:e,children:t})=>P(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:18,height:18,fill:`none`,"aria-hidden":`true`,className:e,children:t})),Nx=jx(({className:e})=>P(Mx,{className:e,children:P(`path`,{fill:`currentColor`,d:`m14.051 10.723-7.985 4.964a1.98 1.98 0 0 1-2.758-.638A2.06 2.06 0 0 1 3 13.964V4.036C3 2.91 3.895 2 5 2c.377 0 .747.109 1.066.313l7.985 4.964a2.057 2.057 0 0 1 .627 2.808c-.16.257-.373.475-.627.637`})})),Px=jx(({className:e})=>y(Mx,{className:e,children:[P(`rect`,{width:5,height:14,x:2,y:2,fill:`currentColor`,rx:1.75}),P(`rect`,{width:5,height:14,x:11,y:2,fill:`currentColor`,rx:1.75})]})),Fx=jx(({className:e})=>y(Mx,{className:e,children:[P(`path`,{fill:`currentColor`,d:`M9 17a8 8 0 0 1-8-8h2a6 6 0 1 0 1.287-3.713l1.286 1.286A.25.25 0 0 1 5.396 7H1.25A.25.25 0 0 1 1 6.75V2.604a.25.25 0 0 1 .427-.177l1.438 1.438A8 8 0 1 1 9 17`}),P(`path`,{fill:`currentColor`,d:`m11.61 9.639-3.331 2.07a.826.826 0 0 1-1.15-.266.86.86 0 0 1-.129-.452V6.849C7 6.38 7.374 6 7.834 6c.158 0 .312.045.445.13l3.331 2.071a.858.858 0 0 1 0 1.438`})]})),Ix=jx(({className:e})=>P(Mx,{className:e,children:P(`path`,{fill:`currentColor`,d:`M1 9c0 2.21.895 4.21 2.343 5.657l1.414-1.414a6 6 0 1 1 8.956-7.956l-1.286 1.286a.25.25 0 0 0 .177.427h4.146a.25.25 0 0 0 .25-.25V2.604a.25.25 0 0 0-.427-.177l-1.438 1.438A8 8 0 0 0 1 9`})})),Lx=jx(({className:e})=>P(Mx,{className:e,children:P(`path`,{fill:`currentColor`,d:`M.714 6.008h3.072l4.071-3.857c.5-.376 1.143 0 1.143.601V15.28c0 .602-.643.903-1.143.602l-4.071-3.858H.714c-.428 0-.714-.3-.714-.752V6.76c0-.451.286-.752.714-.752M14.5 7.586l-1.768-1.768a1 1 0 1 0-1.414 1.414L13.085 9l-1.767 1.768a1 1 0 0 0 1.414 1.414l1.768-1.768 1.768 1.768a1 1 0 0 0 1.414-1.414L15.914 9l1.768-1.768a1 1 0 0 0-1.414-1.414z`})})),Rx=jx(({className:e})=>P(Mx,{className:e,children:P(`path`,{fill:`currentColor`,d:`M.714 6.008h3.072l4.071-3.857c.5-.376 1.143 0 1.143.601V15.28c0 .602-.643.903-1.143.602l-4.071-3.858H.714c-.428 0-.714-.3-.714-.752V6.76c0-.451.286-.752.714-.752m10.568.59a.91.91 0 0 1 0-1.316.91.91 0 0 1 1.316 0c1.203 1.203 1.47 2.216 1.522 3.208q.012.255.011.51c0 1.16-.358 2.733-1.533 3.803a.7.7 0 0 1-.298.156c-.382.106-.873-.011-1.018-.156a.91.91 0 0 1 0-1.316c.57-.57.995-1.551.995-2.487 0-.944-.26-1.667-.995-2.402`})})),zx=jx(({className:e})=>y(Mx,{className:e,children:[P(`path`,{fill:`currentColor`,d:`M15.6 3.3c-.4-.4-1-.4-1.4 0s-.4 1 0 1.4C15.4 5.9 16 7.4 16 9s-.6 3.1-1.8 4.3c-.4.4-.4 1 0 1.4.2.2.5.3.7.3.3 0 .5-.1.7-.3C17.1 13.2 18 11.2 18 9s-.9-4.2-2.4-5.7`}),P(`path`,{fill:`currentColor`,d:`M.714 6.008h3.072l4.071-3.857c.5-.376 1.143 0 1.143.601V15.28c0 .602-.643.903-1.143.602l-4.071-3.858H.714c-.428 0-.714-.3-.714-.752V6.76c0-.451.286-.752.714-.752m10.568.59a.91.91 0 0 1 0-1.316.91.91 0 0 1 1.316 0c1.203 1.203 1.47 2.216 1.522 3.208q.012.255.011.51c0 1.16-.358 2.733-1.533 3.803a.7.7 0 0 1-.298.156c-.382.106-.873-.011-1.018-.156a.91.91 0 0 1 0-1.316c.57-.57.995-1.551.995-2.487 0-.944-.26-1.667-.995-2.402`})]})),Bx=jx(({className:e})=>P(Mx,{className:e,children:P(`path`,{fill:`currentColor`,d:`M9.57 3.617A1 1 0 0 0 8.646 3H4c-.552 0-1 .449-1 1v4.646a.996.996 0 0 0 1.001 1 1 1 0 0 0 .706-.293l4.647-4.647a1 1 0 0 0 .216-1.089m4.812 4.812a1 1 0 0 0-1.089.217l-4.647 4.647a.998.998 0 0 0 .708 1.706H14c.552 0 1-.449 1-1V9.353a1 1 0 0 0-.618-.924`})})),Vx=jx(({className:e})=>P(Mx,{className:e,children:P(`path`,{fill:`currentColor`,d:`M7.883 1.93a.99.99 0 0 0-1.09.217L2.146 6.793A.998.998 0 0 0 2.853 8.5H7.5c.551 0 1-.449 1-1V2.854a1 1 0 0 0-.617-.924m7.263 7.57H10.5c-.551 0-1 .449-1 1v4.646a.996.996 0 0 0 1.001 1.001 1 1 0 0 0 .706-.293l4.646-4.646a.998.998 0 0 0-.707-1.707z`})})),Hx=jx(({className:e})=>y(Mx,{className:e,children:[P(`path`,{fill:`currentColor`,d:`M13 2a4 4 0 0 1 4 4v2.035A3.5 3.5 0 0 0 16.5 8H15V6.273C15 5.018 13.96 4 12.679 4H4.32C3.04 4 2 5.018 2 6.273v5.454C2 12.982 3.04 14 4.321 14H6v1.5q0 .255.035.5H4a4 4 0 0 1-4-4V6a4 4 0 0 1 4-4z`}),P(`rect`,{width:10,height:7,x:8,y:10,fill:`currentColor`,rx:2}),P(`path`,{fill:`currentColor`,d:`M7.129 5.547a.6.6 0 0 0-.656.13L3.677 8.473A.6.6 0 0 0 4.102 9.5h2.796c.332 0 .602-.27.602-.602V6.103a.6.6 0 0 0-.371-.556`})]})),Ux=jx(({className:e})=>y(Mx,{className:e,children:[P(`path`,{fill:`currentColor`,d:`M13 2a4 4 0 0 1 4 4v2.036A3.5 3.5 0 0 0 16.5 8H15V6.273C15 5.018 13.96 4 12.679 4H4.32C3.04 4 2 5.018 2 6.273v5.454C2 12.982 3.04 14 4.321 14H6v1.5q0 .255.036.5H4a4 4 0 0 1-4-4V6a4 4 0 0 1 4-4z`}),P(`rect`,{width:10,height:7,x:8,y:10,fill:`currentColor`,rx:2}),P(`path`,{fill:`currentColor`,d:`M4.871 10.454a.6.6 0 0 0 .656-.131l2.796-2.796A.6.6 0 0 0 7.898 6.5H5.102a.603.603 0 0 0-.602.602v2.795a.6.6 0 0 0 .371.556`})]})),Wx=jx(({className:e})=>P(Mx,{className:e,children:P(`path`,{fill:`currentColor`,d:`M15 2a3 3 0 0 1 3 3v8a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3V5a3 3 0 0 1 3-3zM4 11a1 1 0 1 0 0 2h5a1 1 0 1 0 0-2zm8 0a1 1 0 1 0 0 2h2a1 1 0 1 0 0-2zM4 8a1 1 0 0 0 0 2h1a1 1 0 0 0 0-2zm4 0a1 1 0 0 0 0 2h3a1 1 0 1 0 0-2zm6 0a1 1 0 1 0 0 2 1 1 0 0 0 0-2`})})),Gx=jx(({className:e})=>y(Mx,{className:e,children:[P(`rect`,{width:16,height:12,x:1,y:3,stroke:`currentColor`,strokeWidth:2,rx:3}),P(`rect`,{width:3,height:2,x:3,y:8,fill:`currentColor`,rx:1}),P(`rect`,{width:2,height:2,x:13,y:8,fill:`currentColor`,rx:1}),P(`rect`,{width:4,height:2,x:11,y:11,fill:`currentColor`,rx:1}),P(`rect`,{width:5,height:2,x:7,y:8,fill:`currentColor`,rx:1}),P(`rect`,{width:7,height:2,x:3,y:11,fill:`currentColor`,rx:1})]})),Kx=jx(({className:e})=>P(Mx,{className:e,children:y(`g`,{fill:`currentColor`,children:[P(`rect`,{width:2,height:5,x:8,y:.5,opacity:.5,rx:1,children:P(`animate`,{attributeName:`opacity`,begin:`0s`,calcMode:`linear`,dur:`1s`,repeatCount:`indefinite`,values:`1;0`})}),P(`rect`,{width:2,height:5,x:12.243,y:2.257,opacity:.45,rx:1,transform:`rotate(45 13.243 4.757)`,children:P(`animate`,{attributeName:`opacity`,begin:`0.125s`,calcMode:`linear`,dur:`1s`,repeatCount:`indefinite`,values:`1;0`})}),P(`rect`,{width:5,height:2,x:12.5,y:8,opacity:.4,rx:1,children:P(`animate`,{attributeName:`opacity`,begin:`0.25s`,calcMode:`linear`,dur:`1s`,repeatCount:`indefinite`,values:`1;0`})}),P(`rect`,{width:5,height:2,x:10.743,y:12.243,opacity:.35,rx:1,transform:`rotate(45 13.243 13.243)`,children:P(`animate`,{attributeName:`opacity`,begin:`0.375s`,calcMode:`linear`,dur:`1s`,repeatCount:`indefinite`,values:`1;0`})}),P(`rect`,{width:2,height:5,x:8,y:12.5,opacity:.3,rx:1,children:P(`animate`,{attributeName:`opacity`,begin:`0.5s`,calcMode:`linear`,dur:`1s`,repeatCount:`indefinite`,values:`1;0`})}),P(`rect`,{width:2,height:5,x:3.757,y:10.743,opacity:.25,rx:1,transform:`rotate(45 4.757 13.243)`,children:P(`animate`,{attributeName:`opacity`,begin:`0.625s`,calcMode:`linear`,dur:`1s`,repeatCount:`indefinite`,values:`1;0`})}),P(`rect`,{width:5,height:2,x:.5,y:8,opacity:.15,rx:1,children:P(`animate`,{attributeName:`opacity`,begin:`0.75s`,calcMode:`linear`,dur:`1s`,repeatCount:`indefinite`,values:`1;0`})}),P(`rect`,{width:5,height:2,x:2.257,y:3.757,opacity:.1,rx:1,transform:`rotate(45 4.757 4.757)`,children:P(`animate`,{attributeName:`opacity`,begin:`0.875s`,calcMode:`linear`,dur:`1s`,repeatCount:`indefinite`,values:`1;0`})})]})})),qx=jx(({className:e})=>P(Mx,{className:e,children:P(`path`,{fill:`currentColor`,d:`M9 2a1 1 0 0 1 1 1v12a1 1 0 1 1-2 0V3a1 1 0 0 1 1-1zm4 3a1 1 0 0 1 1 1v6a1 1 0 1 1-2 0V6a1 1 0 0 1 1-1zM5 5a1 1 0 0 1 1 1v6a1 1 0 1 1-2 0V6a1 1 0 0 1 1-1zm8 4a1 1 0 0 1 1 1v1a1 1 0 1 1-2 0v-1a1 1 0 0 1 1-1zM5 9a1 1 0 0 1 1 1v1a1 1 0 1 1-2 0v-1a1 1 0 0 1 1-1z`})})),Jx=jx(({className:e})=>P(Mx,{className:e,children:P(`path`,{fill:`currentColor`,d:`M3 5a1 1 0 0 1 1-1h10a1 1 0 1 1 0 2H4a1 1 0 0 1-1-1zm0 4a1 1 0 0 1 1-1h10a1 1 0 1 1 0 2H4a1 1 0 0 1-1-1zm1 3a1 1 0 1 0 0 2h6a1 1 0 1 0 0-2H4z`})})),Yx=jx(({className:e})=>P(Mx,{className:e,children:P(`path`,{fill:`currentColor`,d:`M14.53 4.53a.75.75 0 0 0-1.06-1.06L7 9.94 4.53 7.47a.75.75 0 0 0-1.06 1.06l3 3a.75.75 0 0 0 1.06 0l7-7z`})}));l();var Xx=10,$=e=>e,Zx=$(wh.Root),Qx=$(_h),$x=$(Mh.Root),eS=$(gh.Popup),tS=$(gh.Title),nS=$(gh.Close),rS=$(Mh.Description),iS=$(Mg.Provider),aS=$(Mg.Root),oS=$(Mg.Trigger),sS=$(Mg.Popup),cS=$($h.Root),lS=$($h.Trigger),uS=$($h.Popup),dS=$(Uh),fS=$(eg),pS=$(Vh),mS=$(Hh),hS=$(Nh),gS=$(Wh),_S=$(_g.Value),vS=$(bg.Root),yS=$(pg.Track),bS=$(pg.Fill),xS=$(pg.Buffer),SS=$(pg.Thumb),CS=$(pg.Value),wS=$(Fg.Root),TS=$(zh),ES=$(Fh),DS=$(Vf),OS=({className:e,...t})=>P(`button`,{type:`button`,className:`media-button media-button--subtle media-button--icon${e?` ${e}`:``}`,...t}),kS=({selection:e,icon:t})=>{let[n,r]=h(!1),[i,a]=h(!1),[o,s]=h(!1);m(()=>s(!1),[e.selectedId]);let c=[...e.offLabel?[{id:null,label:e.offLabel}]:[],...e.options],l=t=>{if(t===e.selectedId){r(!1);return}s(!1),a(!0),Promise.resolve().then(()=>e.onSelect(t)).then(()=>r(!1)).catch(t=>{console.warn(`[player] ${e.label} selection failed:`,t),s(!0)}).finally(()=>a(!1))};return y(cS,{open:n,onOpenChange:e=>r(e),children:[P(lS,{render:P(OS,{className:`media-button--menu${o?` media-button--error`:``}`,"aria-label":e.label}),children:t}),P(uS,{className:`media-surface media-popover media-popover--menu`,children:y(`div`,{className:`stub-menu`,role:`menu`,"aria-label":e.label,children:[P(`div`,{className:`stub-menu__heading`,children:e.label}),c.map(t=>{let n=t.id===e.selectedId;return y(`button`,{type:`button`,role:`menuitemradio`,"aria-checked":n,className:`stub-menu__item${n?` stub-menu__item--active`:``}`,disabled:i||`disabled`in t&&t.disabled,onClick:()=>l(t.id),children:[P(`span`,{className:`stub-menu__check`,children:n?P(Yx,{className:`media-icon`}):null}),P(`span`,{className:`stub-menu__label`,children:t.label}),`description`in t&&t.description?P(`span`,{className:`stub-menu__description`,children:t.description}):null]},t.id??`__off__`)})]})})]})},AS=()=>y(cS,{openOnHover:!0,delay:200,closeDelay:100,side:`top`,children:[P(lS,{render:y(pS,{className:`media-button--mute`,render:P(OS,{}),children:[P(Lx,{className:`media-icon media-icon--volume-off`}),P(Rx,{className:`media-icon media-icon--volume-low`}),P(zx,{className:`media-icon media-icon--volume-high`})]})}),P(uS,{className:`media-surface media-popover media-popover--volume`,children:y(wS,{className:`media-slider`,orientation:`vertical`,thumbAlignment:`edge`,children:[P(yS,{className:`media-slider__track`,children:P(bS,{className:`media-slider__fill`})}),P(SS,{className:`media-slider__thumb media-slider__thumb--persistent`})]})})]}),jS=({capabilities:e,children:t,className:n,...r})=>y(DS,{className:`media-default-skin media-default-skin--video${n?` ${n}`:``}`,...r,children:[t,P(Qx,{render:e=>P(`div`,{...e,className:`media-buffering-indicator`,children:P(`div`,{className:`media-surface`,children:P(Kx,{className:`media-icon`})})})}),P($x,{children:P(eS,{className:`media-error`,children:y(`div`,{className:`media-error__dialog media-surface`,children:[y(`div`,{className:`media-error__content`,children:[P(tS,{className:`media-error__title`,children:`Something went wrong.`}),P(rS,{className:`media-error__description`})]}),P(`div`,{className:`media-error__actions`,children:P(nS,{className:`media-button media-button--primary`,children:`OK`})})]})})}),P(Zx,{className:`media-surface media-controls`,children:y(iS,{children:[y(`div`,{className:`media-button-group`,children:[y(aS,{side:`top`,children:[P(oS,{render:y(dS,{className:`media-button--play`,render:P(OS,{}),children:[P(Fx,{className:`media-icon media-icon--restart`}),P(Nx,{className:`media-icon media-icon--play`}),P(Px,{className:`media-icon media-icon--pause`})]})}),P(sS,{className:`media-surface media-tooltip`})]}),y(aS,{side:`top`,children:[P(oS,{render:P(fS,{seconds:-10,className:`media-button--seek`,render:P(OS,{}),children:y(`span`,{className:`media-icon__container`,children:[P(Ix,{className:`media-icon media-icon--seek media-icon--flipped`}),P(`span`,{className:`media-icon__label`,children:Xx})]})})}),y(sS,{className:`media-surface media-tooltip`,children:[`Seek backward `,Xx,` seconds`]})]}),y(aS,{side:`top`,children:[P(oS,{render:P(fS,{seconds:Xx,className:`media-button--seek`,render:P(OS,{}),children:y(`span`,{className:`media-icon__container`,children:[P(Ix,{className:`media-icon media-icon--seek`}),P(`span`,{className:`media-icon__label`,children:Xx})]})})}),y(sS,{className:`media-surface media-tooltip`,children:[`Seek forward `,Xx,` seconds`]})]})]}),y(`div`,{className:`media-time-controls`,children:[P(_S,{type:`current`,className:`media-time`}),y(vS,{className:`media-slider`,children:[y(yS,{className:`media-slider__track`,children:[P(bS,{className:`media-slider__fill`}),P(xS,{className:`media-slider__buffer`})]}),P(SS,{className:`media-slider__thumb`}),P(`div`,{className:`media-surface media-thumbnail media-slider__preview`,children:P(CS,{type:`pointer`,className:`media-time media-thumbnail__time`})})]}),P(_S,{type:`duration`,className:`media-time`})]}),y(`div`,{className:`media-button-group`,children:[y(aS,{side:`top`,children:[P(oS,{render:P(gS,{className:`media-button--playback-rate`,render:P(OS,{})})}),P(sS,{className:`media-surface media-tooltip`,children:`Toggle playback rate`})]}),P(AS,{}),e?.subtitles&&P(kS,{selection:e.subtitles,icon:e.subtitles.selectedId?P(Wx,{className:`media-icon`}):P(Gx,{className:`media-icon`})},`subtitles`),e?.audioTracks&&P(kS,{selection:e.audioTracks,icon:P(qx,{className:`media-icon`})},`audio`),e?.qualityLevels&&P(kS,{selection:e.qualityLevels,icon:P(Jx,{className:`media-icon`})},`quality`),y(aS,{side:`top`,children:[P(oS,{render:y(mS,{className:`media-button--pip`,render:P(OS,{}),children:[P(Hx,{className:`media-icon media-icon--pip-enter`}),P(Ux,{className:`media-icon media-icon--pip-exit`})]})}),P(sS,{className:`media-surface media-tooltip`})]}),y(aS,{side:`top`,children:[P(oS,{render:y(hS,{className:`media-button--fullscreen`,render:P(OS,{}),children:[P(Bx,{className:`media-icon media-icon--fullscreen-enter`}),P(Vx,{className:`media-icon media-icon--fullscreen-exit`})]})}),P(sS,{className:`media-surface media-tooltip`})]})]})]})}),P(`div`,{className:`media-overlay`}),P(TS,{keys:`Space`,action:`togglePaused`}),P(TS,{keys:`k`,action:`togglePaused`}),P(TS,{keys:`m`,action:`toggleMuted`}),P(TS,{keys:`f`,action:`toggleFullscreen`}),P(TS,{keys:`i`,action:`togglePictureInPicture`}),P(TS,{keys:`ArrowRight`,action:`seekStep`,value:5}),P(TS,{keys:`ArrowLeft`,action:`seekStep`,value:-5}),P(TS,{keys:`l`,action:`seekStep`,value:10}),P(TS,{keys:`j`,action:`seekStep`,value:-10}),P(TS,{keys:`ArrowUp`,action:`volumeStep`,value:.05}),P(TS,{keys:`ArrowDown`,action:`volumeStep`,value:-.05}),P(TS,{keys:`0-9`,action:`seekToPercent`}),P(TS,{keys:`Home`,action:`seekToPercent`,value:0}),P(TS,{keys:`End`,action:`seekToPercent`,value:100}),P(TS,{keys:`>`,action:`speedUp`}),P(TS,{keys:`<`,action:`speedDown`}),P(ES,{type:`tap`,action:`togglePaused`,pointer:`mouse`,region:`center`}),P(ES,{type:`tap`,action:`toggleControls`,pointer:`touch`}),P(ES,{type:`doubletap`,action:`seekStep`,value:-10,region:`left`}),P(ES,{type:`doubletap`,action:`toggleFullscreen`,region:`center`}),P(ES,{type:`doubletap`,action:`seekStep`,value:10,region:`right`})]});l();var{Provider:MS}=Uf({features:qd}),NS=e=>`media`in e?e:{media:e},PS=({remote:e,frame:t,adapter:n})=>{let r=wl();return m(()=>{if(!r||!e||!t)return;let i=n?n(e,t):e;if(!i)return;let a=NS(i);r(a.media);let o=B(a.media);return()=>{o(),r(null),a.dispose?.()}},[e,t,n,r]),null},FS=D`
|
|
1421
1421
|
position: absolute;
|
|
1422
1422
|
inset: 0;
|
|
1423
1423
|
border-radius: 0.8rem;
|
|
@@ -424,7 +424,7 @@ https://bit.ly/2XbVrpR#`;function Rr(e,t,n){if(!e){var r=t||`Minfied Error #`+n+
|
|
|
424
424
|
gap: 1.2rem;
|
|
425
425
|
padding: 2rem 1.5rem;
|
|
426
426
|
}
|
|
427
|
-
`,Nf=()=>{let[e]=so(yo(J.WATCH)),[t]=so(yo(J.LOGIN_CALLBACK));return e||t?null:A(`footer`,{css:Mf,children:[H(po,{to:Y(J.HOME),className:`wordmark`,onClick:Ec,children:`stub`}),H(po,{to:Y(J.LEGAL),className:`nav-link`,children:`Legal`}),H(po,{to:Y(J.PRIVACY),className:`nav-link`,children:`Privacy`}),A(`span`,{className:`version`,title:`stub v0.0.
|
|
427
|
+
`,Nf=()=>{let[e]=so(yo(J.WATCH)),[t]=so(yo(J.LOGIN_CALLBACK));return e||t?null:A(`footer`,{css:Mf,children:[H(po,{to:Y(J.HOME),className:`wordmark`,onClick:Ec,children:`stub`}),H(po,{to:Y(J.LEGAL),className:`nav-link`,children:`Legal`}),H(po,{to:Y(J.PRIVACY),className:`nav-link`,children:`Privacy`}),A(`span`,{className:`version`,title:`stub v0.0.35, commit 5d2dcd2`,children:[`v`,`0.0.35`,` `,H(`span`,{className:`commit`,children:`5d2dcd2`})]})]})};m();var Pf=R`
|
|
428
428
|
position: fixed;
|
|
429
429
|
inset: 0;
|
|
430
430
|
/* a sibling of the modal's portal rather than a child of it, so it competes at the root and 200
|
package/build/embed.html
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>Stub - Embed</title>
|
|
7
7
|
<style>*{box-sizing:border-box;-webkit-user-select:none;user-select:none;margin:0;padding:0}::selection{background:0 0}::selection{background:0 0}html,body{-webkit-tap-highlight-color:transparent;background:#000;width:100%;height:100%;overflow:hidden}#app,#app>div{width:100%;height:100%}#app>div>iframe{width:100%!important;height:100%!important;aspect-ratio:unset!important;border-radius:0!important}</style>
|
|
8
|
-
<script type="module" crossorigin src="./assets/embed-
|
|
8
|
+
<script type="module" crossorigin src="./assets/embed-BsA-ql7r.js"></script>
|
|
9
9
|
<link rel="modulepreload" crossorigin href="./assets/uri-DvH8-88e.js">
|
|
10
10
|
<link rel="modulepreload" crossorigin href="./assets/build-CQLpK1BK.js">
|
|
11
11
|
<link rel="modulepreload" crossorigin href="./assets/api-CtiKFcK3-DDpRQueA.js">
|
package/build/index.html
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>Stub</title>
|
|
7
|
-
<script type="module" crossorigin src="/assets/main-
|
|
7
|
+
<script type="module" crossorigin src="/assets/main-I4bdYTcl.js"></script>
|
|
8
8
|
<link rel="modulepreload" crossorigin href="/assets/uri-DvH8-88e.js">
|
|
9
9
|
<link rel="modulepreload" crossorigin href="/assets/build-CQLpK1BK.js">
|
|
10
10
|
<link rel="modulepreload" crossorigin href="/assets/api-CtiKFcK3-DDpRQueA.js">
|
package/build/index.js
CHANGED
|
@@ -12330,14 +12330,14 @@ var Q_ = H`
|
|
|
12330
12330
|
}),
|
|
12331
12331
|
/* @__PURE__ */ Z("span", {
|
|
12332
12332
|
className: "version",
|
|
12333
|
-
title: "stub v0.0.
|
|
12333
|
+
title: "stub v0.0.35, commit 5d2dcd2",
|
|
12334
12334
|
children: [
|
|
12335
12335
|
"v",
|
|
12336
|
-
"0.0.
|
|
12336
|
+
"0.0.35",
|
|
12337
12337
|
" ",
|
|
12338
12338
|
/* @__PURE__ */ X("span", {
|
|
12339
12339
|
className: "commit",
|
|
12340
|
-
children: "
|
|
12340
|
+
children: "5d2dcd2"
|
|
12341
12341
|
})
|
|
12342
12342
|
]
|
|
12343
12343
|
})
|
package/fkn.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"v":0,"app":"fkn:app:173elff365hgaijng4mufbd4zo6lypfskb3zdd5jkpgd4hj4ovjjq","name":"Stub","version":"0.0.
|
|
1
|
+
{"v":0,"app":"fkn:app:173elff365hgaijng4mufbd4zo6lypfskb3zdd5jkpgd4hj4ovjjq","name":"Stub","version":"0.0.35","key":"iScXi3QXmf9WXSFKHIRV6kxihm7Tmy4YRZe9wCdovuQ=","issuedAt":1790414224,"perSource":["npm:@banou/stub"],"contentsDigest":"9zdh6eA3WdHEBuQXWPeuC+NGqM0cpWCwXz50wJqwSuA=","sig":"Bwhbf2Hb8+BymyogMO+wAjt8OMlhtLFJnWCyWnMAaKarFZB2zBhIqJimPPAchQ2m8vx/BJonfnmDwwgkoB4KAw==","contents":{"name":"@banou/stub","version":"0.0.35","alg":"sha256","files":{"README.md":"UlRX2sBn1TfnBWbCmOoAbyYQ7jYz5xwO1YmpGLIarsY=","build/assets/account-BgpTCUUd.js":"+QWNm7+ZCCcOi6jWCjpSg0c+MFZkYj2GEvfO1EjY7k8=","build/assets/account-wP7U-PeH.js":"qfdpmvf5AHarGirPEwGEF3A0M7c/lXO0mTrsdywdnrE=","build/assets/anime-index-Jbe1K3rX.js":"GX18NEu4KqVsycGt40uiW2kcHF1A9hXPt/pVKrzdSSk=","build/assets/anime-seasons-CVM0BQGM.js":"L6fZ6Qpvlqr/dhdK1nl3Pa51iq4tVu8U6xchCJ/pO84=","build/assets/api-Bh_MpFDA.js":"nndNR3+QpRKpXNOJmtyR2xpXiyzwgeVFTKzPmSyNb7c=","build/assets/api-CtiKFcK3-DDpRQueA.js":"oIlZAVejdms4fpZ0CrORoXSP6d5YHpKB89LHFrYZEbU=","build/assets/build-CQLpK1BK.js":"hKYmEy2EbTZSyHofyGuayYsSf8C1sUd9qWOpP7t6Izs=","build/assets/default-jVcJgvWm.woff2":"iGkpkDcHxbsosHzS7taZIbPV71xJxzoN0eGH6/ZUakw=","build/assets/embed-3a7RYKgR.css":"EuPdgWlK6mGFtnOnlqri0xmDiB/N98ZkSuFJJYccMsY=","build/assets/embed-BsA-ql7r.js":"g+DYayG5cfND7v0ZrIWAfhuurDn+EB0RCRdX6lzw48A=","build/assets/fetch-Cr-sZisy.js":"4cGRiIHTcG/F/jPapD9/Cg0j7H5Hq9uoGxQOGrRy2M8=","build/assets/fonts-pE_hQFbP.js":"JFrcfQn7ONAEVBPA8HdbKDW9YM3BYoIKvVpwHPdwMhw=","build/assets/frizbee_wasm_bg-FO8dlm9E.wasm":"EbPVSEfqpLjbbYlJez4oFXWj1pxftV//IJXVMjMkxWY=","build/assets/index-D_Wk5pTR.js":"TRHYgKCPQQQjdOVHdRCdw7HlGq+9OPpfT37uCzotFF4=","build/assets/jassub-worker-CLcXAXXL.wasm":"IEZIYFRcqKpiSk7Fbv9FqzgDd89yR8MfQDY0IHeDbtE=","build/assets/jassub-worker-CmZGEPuv.js":"R1sglfiA2oqQFAZ55o4yToUnIZVpo+SX4dowwCV2TxY=","build/assets/jassub-worker-modern-C7bYVPj4.wasm":"2ryQh6ZZOS3g/IbRZ8h6CF/HUA8xRabX9L8kMsxlDAM=","build/assets/lib-account-CF0gclnF.js":"pxFxTy74A0YwsEwS0N8nry0jqEMSuIVZBQuQPhLYfVE=","build/assets/lib-account-CnUKCNw7.js":"+UkffvBqGmuWkgzBdMIOlxzMraAE559MUH63AJs7Ogo=","build/assets/lib-api-BdPC6S5P.js":"iTbTCU024Gg3DWkf4RbxB1oSHneH8LXTIC68qw1abzw=","build/assets/lib-api-CtiKFcK3-lXOtBAbs.js":"RhvViopigPTf9IUMcFL5ndsW2EGhCCWi7C+52jqAwlY=","build/assets/lib-rolldown-runtime-Cb76FRpK.js":"rbkB5HPusB8/kdOGAO86YoXaWoUoORGeUbc7DQ1plYk=","build/assets/lib-worker-1bjGH68T.js":"XmJFtkPyona0t03nEmhOe6Rf7dtPteiJ1CaXpQWmA70=","build/assets/lib-worker-CiCWGdxI.js":"MX8w2bsztAaWO4K1vAigeNAySLvrRBFpvVTm2DPEE98=","build/assets/lib-worker-anime-index-Jbe1K3rX.js":"GX18NEu4KqVsycGt40uiW2kcHF1A9hXPt/pVKrzdSSk=","build/assets/lib-worker-anime-seasons-CVM0BQGM.js":"L6fZ6Qpvlqr/dhdK1nl3Pa51iq4tVu8U6xchCJ/pO84=","build/assets/lib-worker-index-Bs3gK32M.js":"7OsJ+O+C9PLRMBbx+U4+d4xv9SvJyhP/QSvyOXIa1+0=","build/assets/main-CSyC6ryz.css":"u8JE9MBZl8EydceHpj+DhPVqHNH466jU+G+FCb3EJhI=","build/assets/main-I4bdYTcl.js":"891x/JgIdVqae92dEGjqGqg+b9wxPucGcqWoSRvLPfA=","build/assets/remote-CVVOdyaq.js":"XobfVI+OoMFOw2RnQ+vlkeAv+36pUTcM537KkpoRhig=","build/assets/remote-VQoP8ehb.js":"uaBaVvfl6FtbnoGAwgjtkSQnhj+KoZ+Ks2DxmxSn1Z8=","build/assets/sacha_bg-CNH7LeJ_.wasm":"smWtrIBF7AJr+ZplWM15OF/LhD/8/qI1IA2fVj6hCHM=","build/assets/uri-DvH8-88e.js":"JjOiTM8eMVvzaC8nsLEDbkQt8l1ImaoiUrVdwYzzU5M=","build/assets/worker-dPoC1jvm.js":"9jvwccoVP/+9n37BYgb4w3y1fQqPJMkMWaq1ZeGuC7Y=","build/assets/worker-pJU4VTT8.js":"wiRMfqLHP7wxUWoC/0VAfUsWPvAmc8CJ4qpNsEm6elI=","build/assets/worker-zEXyhDeO.js":"9/Bnj2SNtmpvB8l+2G0+E1hXM/kVIJDnoBqsl7gktn8=","build/embed.html":"tdMnQEhDReUoei8EKkd76BFlr/oSTK+7ecpx8UAK07c=","build/index.html":"SKadXk7h+qWfh9rzq8eJx16aTqm4eFXO9eF9X6wLLp8=","build/index.js":"hfWRiIHF/6RKE98aiKLaM0KUifm+8C9OUlpZH/lsxa4=","package.json":"GGlHLnhf5Z9fmF2hiDtWWGMcK1stIxv+MVkf+d5rRok="},"types":{"README.md":"text/markdown","build/assets/account-BgpTCUUd.js":"text/javascript","build/assets/account-wP7U-PeH.js":"text/javascript","build/assets/anime-index-Jbe1K3rX.js":"text/javascript","build/assets/anime-seasons-CVM0BQGM.js":"text/javascript","build/assets/api-Bh_MpFDA.js":"text/javascript","build/assets/api-CtiKFcK3-DDpRQueA.js":"text/javascript","build/assets/build-CQLpK1BK.js":"text/javascript","build/assets/default-jVcJgvWm.woff2":"font/woff2","build/assets/embed-3a7RYKgR.css":"text/css","build/assets/embed-BsA-ql7r.js":"text/javascript","build/assets/fetch-Cr-sZisy.js":"text/javascript","build/assets/fonts-pE_hQFbP.js":"text/javascript","build/assets/frizbee_wasm_bg-FO8dlm9E.wasm":"application/wasm","build/assets/index-D_Wk5pTR.js":"text/javascript","build/assets/jassub-worker-CLcXAXXL.wasm":"application/wasm","build/assets/jassub-worker-CmZGEPuv.js":"text/javascript","build/assets/jassub-worker-modern-C7bYVPj4.wasm":"application/wasm","build/assets/lib-account-CF0gclnF.js":"text/javascript","build/assets/lib-account-CnUKCNw7.js":"text/javascript","build/assets/lib-api-BdPC6S5P.js":"text/javascript","build/assets/lib-api-CtiKFcK3-lXOtBAbs.js":"text/javascript","build/assets/lib-rolldown-runtime-Cb76FRpK.js":"text/javascript","build/assets/lib-worker-1bjGH68T.js":"text/javascript","build/assets/lib-worker-CiCWGdxI.js":"text/javascript","build/assets/lib-worker-anime-index-Jbe1K3rX.js":"text/javascript","build/assets/lib-worker-anime-seasons-CVM0BQGM.js":"text/javascript","build/assets/lib-worker-index-Bs3gK32M.js":"text/javascript","build/assets/main-CSyC6ryz.css":"text/css","build/assets/main-I4bdYTcl.js":"text/javascript","build/assets/remote-CVVOdyaq.js":"text/javascript","build/assets/remote-VQoP8ehb.js":"text/javascript","build/assets/sacha_bg-CNH7LeJ_.wasm":"application/wasm","build/assets/uri-DvH8-88e.js":"text/javascript","build/assets/worker-dPoC1jvm.js":"text/javascript","build/assets/worker-pJU4VTT8.js":"text/javascript","build/assets/worker-zEXyhDeO.js":"text/javascript","build/embed.html":"text/html","build/index.html":"text/html","build/index.js":"text/javascript","package.json":"application/json"}},"keys":{"app":"fkn:app:173elff365hgaijng4mufbd4zo6lypfskb3zdd5jkpgd4hj4ovjjq","serial":1790278160679,"issuedAt":1790278160,"founder":{"kind":"fkn","seed":"f2qit1bapv9x9cvvve101bl0w3"},"signer":"fkn-1","name":"Stub","members":[{"key":"iScXi3QXmf9WXSFKHIRV6kxihm7Tmy4YRZe9wCdovuQ=","since":1790278160}],"sig":"+0lWhiIjTUH2utYkxtt2kQqTdrrG6rMLW4K21SDNAMyDi5RDdIZR+HtJ2S87hYatNUksZA3gQVHLYjJGgSdWAg=="}}
|