1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[861,7243],{30861:function(t,e,i){i.r(e),i.d(e,{YouTubeProvider:function(){return l}});var s=i(41240),o=i(13711),r=i(89665),n=i(47243);i(67294);const a=0,c=1,u=2,d=3,h=5;class l extends r.w{$$PROVIDER_TYPE="YOUTUBE";scope=(0,s.createScope)();#t;#e=(0,s.signal)("");#i=-1;#s=null;#o=-1;#r=!1;#n=new Map;constructor(t,e){super(t),this.#t=e}language="en";color="red";cookies=!1;get currentSrc(){return this.#s}get type(){return"youtube"}get videoId(){return this.#e()}preconnect(){(0,o.$P)(this.getOrigin())}setup(){super.setup(),(0,s.effect)(this.#a.bind(this)),this.#t.notify("provider-setup",this)}destroy(){this.#c();for(const t of this.#n.values())for(const{reject:e}of t)e("provider destroyed");this.#n.clear()}async play(){return this.#u("playVideo")}#d(t){this.#h("playVideo")?.reject(t)}async pause(){return this.#u("pauseVideo")}#l(t){this.#h("pauseVideo")?.reject(t)}setMuted(t){t?this.#u("mute"):this.#u("unMute")}setCurrentTime(t){this.#u("seekTo",t),this.#t.notify("seeking",t)}setVolume(t){this.#u("setVolume",100*t)}setPlaybackRate(t){this.#u("setPlaybackRate",t)}async loadSource(t){if(!(0,s.isString)(t.src))return this.#s=null,void this.#e.set("");const e=(0,n.resolveYouTubeVideoId)(t.src);this.#e.set(e??""),this.#s=t}getOrigin(){return this.cookies?"https://www.youtube.com":"https://www.youtube-nocookie.com"}#a(){this.#c();const t=this.#e();t?(this.src.set(`${this.getOrigin()}/embed/${t}`),this.#t.notify("load-start")):this.src.set("")}buildParams(){const{keyDisabled:t}=this.#t.$props,{muted:e,playsInline:i,nativeControls:s}=this.#t.$state,o=s();return{rel:0,autoplay:0,cc_lang_pref:this.language,cc_load_policy:o?1:void 0,color:this.color,controls:o?1:0,disablekb:!o||t()?1:0,enablejsapi:1,fs:1,hl:this.language,iv_load_policy:o?1:3,mute:e()?1:0,playsinline:i()?1:0}}#u(t,e){let i=(0,s.deferredPromise)(),o=this.#n.get(t);return o||this.#n.set(t,o=[]),o.push(i),this.postMessage({event:"command",func:t,args:e?[e]:void 0}),i.promise}onLoad(){window.setTimeout((()=>this.postMessage({event:"listening"})),100)}#f(t){this.#t.notify("loaded-metadata"),this.#t.notify("loaded-data"),this.#t.delegate.ready(void 0,t)}#m(t){this.#h("pauseVideo")?.resolve(),this.#t.notify("pause",void 0,t)}#p(t,e){const{duration:i,realCurrentTime:s}=this.#t.$state,o=this.#i===a,r=o?i():t;this.#t.notify("time-change",r,e),!o&&Math.abs(r-s())>1&&this.#t.notify("seeking",r,e)}#g(t,e,i){const s={buffered:new o.tn(0,t),seekable:e};this.#t.notify("progress",s,i);const{seeking:r,realCurrentTime:n}=this.#t.$state;r()&&t>n()&&this.#y(i)}#y(t){const{paused:e,realCurrentTime:i}=this.#t.$state;window.clearTimeout(this.#o),this.#o=window.setTimeout((()=>{this.#t.notify("seeked",i(),t),this.#o=-1}),e()?100:0)}#v(t){const{seeking:e}=this.#t.$state;e()&&this.#y(t),this.#t.notify("pause",void 0,t),this.#t.notify("end",void 0,t)}#b(t,e){const{paused:i,seeking:s}=this.#t.$state,o=t===c,r=t===d,n=this.#w("playVideo"),l=i()&&(r||o);if(r&&this.#t.notify("waiting",void 0,e),s()&&o&&this.#y(e),this.#r&&o)return this.pause(),this.#r=!1,void this.setMuted(this.#t.$state.muted());if(!n&&l)return this.#r=!0,void this.setMuted(!0);switch(l&&(this.#h("playVideo")?.resolve(),this.#t.notify("play",void 0,e)),t){case h:this.#f(e);break;case c:this.#t.notify("playing",void 0,e);break;case u:this.#m(e);break;case a:this.#v(e)}this.#i=t}onMessage({info:t},e){if(!t)return;const{title:i,intrinsicDuration:r,playbackRate:n}=this.#t.$state;if((0,s.isObject)(t.videoData)&&t.videoData.title!==i()&&this.#t.notify("title-change",t.videoData.title,e),(0,s.isNumber)(t.duration)&&t.duration!==r()){if((0,s.isNumber)(t.videoLoadedFraction)){const i=t.progressState?.loaded??t.videoLoadedFraction*t.duration,s=new o.tn(0,t.duration);this.#g(i,s,e)}this.#t.notify("duration-change",t.duration,e)}if((0,s.isNumber)(t.playbackRate)&&t.playbackRate!==n()&&this.#t.notify("rate-change",t.playbackRate,e),t.progressState){const{current:i,seekableStart:s,seekableEnd:n,loaded:a,duration:c}=t.progressState;this.#p(i,e),this.#g(a,new o.tn(s,n),e),c!==r()&&this.#t.notify("duration-change",c,e)}if((0,s.isNumber)(t.volume)&&(0,s.isBoolean)(t.muted)&&!this.#r){const i={muted:t.muted,volume:t.volume/100};this.#t.notify("volume-change",i,e)}(0,s.isNumber)(t.playerState)&&t.playerState!==this.#i&&this.#b(t.playerState,e)}#c(){this.#i=-1,this.#o=-1,this.#r=!1}#h(t){return this.#n.get(t)?.shift()}#w(t){return Boolean(this.#n.get(t)?.length)}}}
1,47243:function(t,e,i){i.r(e),i.d(e,{findYouTubePoster:function(){return a},resolveYouTubeVideoId:function(){return n}});const s=/(?:youtu\.be|youtube|youtube\.com|youtube-nocookie\.com)(?:\/shorts)?\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=|)((?:\w|-){11})/,o=new Map,r=new Map;function n(t){return t.match(s)?.[1]}async function a(t,e){if(o.has(t))return o.get(t);if(r.has(t))return r.get(t);const i=new Promise((async i=>{const s=["maxresdefault","sddefault","hqdefault"];for(const r of s)for(const s of[!0,!1]){const n=c(t,r,s);if((await fetch(n,{mode:"no-cors",signal:e.signal})).status<400)return o.set(t,n),void i(n)}})).catch((()=>"")).finally((()=>r.delete(t)));return r.set(t,i),i}function c(t,e,i){return`https://i.ytimg.com/${i?"vi_webp":"vi"}/${t}/${e}.${i?"webp":"jpg"}`}},89665:function(t,e,i){i.d(e,{w:function(){return r}});var s=i(13711),o=i(41240);class r{#k;src=(0,o.signal)("");referrerPolicy=null;get iframe(){return this.#k}constructor(t){this.#k=t,t.setAttribute("frameBorder","0"),t.setAttribute("aria-hidden","true"),t.setAttribute("allow","autoplay; fullscreen; encrypted-media; picture-in-picture; accelerometer; gyroscope"),null!==this.referrerPolicy&&t.setAttribute("referrerpolicy",this.referrerPolicy)}setup(){(0,o.listenEvent)(window,"message",this.#x.bind(this)),(0,o.listenEvent)(this.#k,"load",this.onLoad.bind(this)),(0,o.effect)(this.#P.bind(this))}#P(){const t=this.src();if(!t.length)return void this.#k.setAttribute("src","");const e=(0,o.peek)((()=>this.buildParams()));this.#k.setAttribute("src",(0,s.nQ)(t,e))}postMessage(t,e){s.W6||this.#k.contentWindow?.postMessage(JSON.stringify(t),e??"*")}#x(t){const e=this.getOrigin();if((null===t.source||t.source===this.#k?.contentWindow)&&(!(0,o.isString)(e)||e===t.origin)){try{const e=JSON.parse(t.data);return void(e&&this.onMessage(e,t))}catch(i){}t.data&&this.onMessage(t.data,t)}}}}}]);
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.