1/*! For license information please see reactPlayerYouTube.904a259c912a3b082d90.js.LICENSE.txt */ 2"use strict";(self.webpackChunkseafood=self.webpackChunkseafood||[]).push([[446],{28610(e,t,n){function s(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;const{time:t}=e,n="number"==typeof t?t:this.currentTime;this._currentPlayedRange||(this._currentPlayedRange={start:n,end:n})}onSeeking(){this._seeking=!0,this._commitCurrentRange()}onSeeked(e={}){this._seeking=!1;const{time:t}=e,n="number"==typeof t?t:this.currentTime;this._currentPlayedRange={start:n,end:n}}onPlaybackStop(e={}){const{time:t}=e,n="number"==typeof t?t:this.currentTime;this._commitCurrentRange(n)}_commitCurrentRange(e){if(!this._currentPlayedRange)return;"number"==typeof e&&(this._currentPlayedRange.end=e);const{start:t,end:n}=this._currentPlayedRange;this._currentPlayedRange=null,this.addPlayedRange(t,n)}addPlayedRange(e,t){if(e>=t)return;const n=this._RANGE_EPSILON,s=[...this._playedRanges,{start:e,end:t}];s.sort((e,t)=>e.start-t.start);const i=[];for(const e of s){if(!i.length){i.push({...e});continue}const t=i[i.length-1];e.start<=t.end+n?(t.start=Math.min(t.start,e.start),t.end=Math.max(t.end,e.end)):i.push({...e})}this._playedRanges=i}get played(){const 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}n.d(t,{j:()=>s})},84808(e,t,n){n.r(t),n.d(t,{default:()=>P});var s=n(96540),i=n(28610);const a=/(?:youtu\.be\/|youtube(?:-nocookie)?\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=|shorts\/|live\/))((\w|-){11})/,r=/(?:youtu\.be\/|youtube(?:-nocookie)?\.com\/.*?[?&]list=)([\w_-]+)/;function o(e){if(!e)return;const t=e.match(/[?&]t=([\dms]+)/i);if(!t)return;const n=t[1].toLowerCase();let s=0,i=!1;const a=n.match(/(\d+)m/);a&&(s+=60*parseInt(a[1],10),i=!0);const r=n.match(/(\d+)s?$/);return r&&(s+=parseInt(r[1],10),i=!0),i?s:void 0}function l(e,t={}){var n;const s={src:u(e,t),frameborder:0,width:"100%",height:"100%",allow:"accelerometer; fullscreen; autoplay; encrypted-media; gyroscope; picture-in-picture"};return(null==(n=t.config)?void 0:n.referrerpolicy)&&(s.referrerpolicy=t.config.referrerpolicy),t.config&&(s["data-config"]=JSON.stringify(t.config)),`\n <style>\n :host {\n display: inline-block;\n line-height: 0;\n position: relative;\n min-width: 300px;\n min-height: 150px;\n }\n iframe {\n position: absolute;\n top: 0;\n left: 0;\n }\n </style>\n <iframe${function(e){let t="";for(const n in e){const s=e[n];t+=""===s?` ${c(n)}`:` ${c(n)}="${c(`${s}`)}"`}return t}(s)}></iframe>\n `}function u(e,t){if(!e.src)return;const n=e.src.includes("-nocookie")?"https://www.youtube-nocookie.com/embed":"https://www.youtube.com/embed",s={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:o(e.src),...t.config};if(a.test(e.src)){const t=e.src.match(a);return`${n}/${t&&t[1]}?${h(s)}`}const i=e.src.match(r);return`${n}?${h({listType:"playlist",list:i&&i[1],...s})}`}class d extends((0,i.j)(globalThis.HTMLElement??class{})){static getTemplateHTML=l;static shadowRootOptions={mode:"open"};static observedAttributes=["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src"];loadComplete=new g;#e;#t;#n=0;#s=!1;#i;isLoaded=!1;#a=null;#r=null;#o=null;#l=1;constructor(){super(),this.#u("config")}get config(){return this.#r}set config(e){this.#r=e}async load(){if(this.#e)return;this.shadowRoot||this.attachShadow({mode:"open"});const e=!this.#t;this.#t&&(this.loadComplete=new g,this.isLoaded=!1),this.#t=!0,await(this.#e=Promise.resolve()),this.#e=null,this.#n=0,this.dispatchEvent(new Event("emptied"));let t=this.api;if(this.api=null,!this.src)return void(null==t||t.destroy());this.#o=document.createElement("video"),this.textTracks=this.#o.textTracks,this.textTracks.addEventListener("change",()=>{var e;const 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 n=this.shadowRoot.querySelector("iframe"),s=function(e){let t={};for(let n of e)t[n.name]=n.value;return t}(this.attributes);e&&n&&(this.#r=JSON.parse(n.getAttribute("data-config")||"{}")),(null==n?void 0:n.src)&&n.src===u(s,this)||(this.shadowRoot.innerHTML=l(s,this),n=this.shadowRoot.querySelector("iframe"));const i=await async function(e,t,n){return p[e]?p[e]:t&&self[t]?(await m(0),self[t]):p[e]=new Promise(function(s,i){const a=document.createElement("script");a.src=e;const r=()=>s(self[t]);n&&(self[n]=r),a.onload=()=>!1,a.onerror=i,document.head.append(a)})}("https://www.youtube.com/iframe_api","YT","onYouTubeIframeAPIReady");this.api=new i.Player(n,{events:{onReady:()=>{var e;this.#n=1,this.dispatchEvent(new Event("loadedmetadata")),this.dispatchEvent(new Event("durationchange")),1!==this.#l&&(null==(e=this.api)||e.setVolume(100*this.#l)),this.dispatchEvent(new Event("volumechange")),this.dispatchEvent(new Event("loadcomplete")),this.isLoaded=!0,this.loadComplete.resolve()},onError:e=>{console.error(e),this.#a={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 a=!1;this.api.addEventListener("onStateChange",e=>{var t;const n=e.data;if(n!==i.PlayerState.PLAYING&&n!==i.PlayerState.BUFFERING||(a||(a=!0,this.dispatchEvent(new Event("play"))),(this.api.getOption("captions","tracklist")||[]).forEac
2h(e=>{[...this.textTracks].some(t=>t.language===e.languageCode)||this.#o.addTextTrack("subtitles",e.displayName,e.languageCode),this.textTracks=this.#o.textTracks}),this.dispatchEvent(new Event("loadstart"))),n===i.PlayerState.PLAYING)this.seeking&&(this.#s=!1,null==(t=this.#i)||t.resolve(),this.dispatchEvent(new Event("seeked"))),this.#n=3,this.dispatchEvent(new Event("playing"));else if(n===i.PlayerState.PAUSED){const e=Math.abs(this.currentTime-o);!this.seeking&&e>.1&&(this.#s=!0,this.dispatchEvent(new Event("seeking"))),a=!1,this.dispatchEvent(new Event("pause"))}n===i.PlayerState.ENDED&&(a=!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;const t=(null==(e=this.api)?void 0:e.getVolume())/100;this.#l=t,this.dispatchEvent(new Event("volumechange"))}),this.api.addEventListener("onVideoProgress",()=>{this.dispatchEvent(new Event("timeupdate"))}),await this.loadComplete;let r,o=0;setInterval(()=>{var e;const t=Math.abs(this.currentTime-o),n=this.buffered.end(this.buffered.length-1);this.seeking&&n>.1?(this.#s=!1,null==(e=this.#i)||e.resolve(),this.dispatchEvent(new Event("seeked"))):!this.seeking&&t>.1&&(this.#s=!0,this.dispatchEvent(new Event("seeking"))),o=this.currentTime},50);const d=setInterval(()=>{const e=this.buffered.end(this.buffered.length-1);e>=this.duration&&(clearInterval(d),this.#n=4),r!=e&&(r=e,this.dispatchEvent(new Event("progress")))},100)}async attributeChangedCallback(e,t,n){if(t!==n)switch(e){case"src":case"autoplay":case"controls":case"loop":case"playsinline":this.load()}}async play(){var e,t,n;return this.#i=null,await this.loadComplete,null==(e=this.api)||e.playVideo(),t=this,(n=(e,n)=>{let s;t.addEventListener(e,s=()=>{t.removeEventListener(e,s),n()})},(...e)=>new Promise(t=>{n(...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.#s}get readyState(){return this.#n}get src(){return this.getAttribute("src")}set src(e){this.src!=e&&this.setAttribute("src",e)}get error(){return this.#a}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",Boolean(e))}get buffered(){var e,t;if(!this.isLoaded)return v();const n=(null==(e=this.api)?void 0:e.getVideoLoadedFraction())*(null==(t=this.api)?void 0:t.getDuration());return n>0?v(0,n):v()}get controls(){return this.hasAttribute("controls")}set controls(e){this.controls!=e&&this.toggleAttribute("controls",Boolean(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.#i=new g,this.loadComplete.then(()=>{var t,n;null==(t=this.api)||t.seekTo(e,!0),this.paused&&(null==(n=this.#i)||n.then(()=>{var e;this.#i&&(null==(e=this.api)||e.pauseVideo())}))}))}set defaultMuted(e){this.defaultMuted!=e&&this.toggleAttribute("muted",Boolean(e))}get defaultMuted(){return this.hasAttribute("muted")}get loop(){return this.hasAttribute("loop")}set loop(e){this.loop!=e&&this.toggleAttribute("loop",Boolean(e))}set muted(e){this.muted!=e&&this.loadComplete.then(()=>{var t,n;e?null==(t=this.api)||t.mute():null==(n=this.api)||n.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")}
2set playsInline(e){this.playsInline!=e&&this.toggleAttribute("playsinline",Boolean(e))}get poster(){return this.getAttribute("poster")}set poster(e){this.poster!=e&&this.setAttribute("poster",`${e}`)}set volume(e){this.volume!=e&&(this.#l=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.#l}#u(e){if(Object.prototype.hasOwnProperty.call(this,e)){const t=this[e];delete this[e],this[e]=t}}}function c(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/`/g,"`")}function h(e){return String(new URLSearchParams(function(e){let t={};for(let n in e){let s=e[n];!0===s||""===s?t[n]=1:!1===s?t[n]=0:null!=s&&(t[n]=s)}return t}(e)))}const p={},m=e=>new Promise(t=>setTimeout(t,e));class g extends Promise{constructor(e=()=>{}){let t,n;super((s,i)=>{e(s,i),t=s,n=i}),this.resolve=t,this.reject=n}}function v(e,t){return Array.isArray(e)?f(e):f(null==e||null==t||0===e&&0===t?[[0,0]]:[[e,t]])}function f(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",d);var y=d,b=new Set(["style","children","ref","key","suppressContentEditableWarning","suppressHydrationWarning","dangerouslySetInnerHTML"]),E={className:"class",htmlFor:"for"};function w(e){return e.toLowerCase()}function k(e){return"boolean"==typeof e?e?"":void 0:"function"==typeof e||"object"==typeof e&&null!==e?void 0:e}function T(e,t,n){var s;e[t]=n,null==n&&t in((null==(s=globalThis.HTMLElement)?void 0:s.prototype)??{})&&e.removeAttribute(t)}var P=function({react:e,tagName:t,elementClass:n,events:s,displayName:i,defaultProps:a,toAttributeName:r=w,toAttributeValue:o=k}){const l=Number.parseInt(e.version)>=19,u=e.forwardRef((i,u)=>{var d,c;const h=e.useRef(null),p=e.useRef(new Map),m={},g={},v={},f={};for(const[e,t]of Object.entries(i)){if(b.has(e)){v[e]=t;continue}const s=r(E[e]??e);if(n.prototype&&e in n.prototype&&!(e in((null==(d=globalThis.HTMLElement)?void 0:d.prototype)??{}))&&!(null==(c=n.observedAttributes)?void 0:c.some(e=>e===s))){f[e]=t;continue}if(e.startsWith("on")){m[e]=t;continue}const i=o(t);if(s&&null!=i&&(g[s]=String(i),l||(v[s]=i)),s&&l){const e=k(t);v[s]=i!==e?i:t}}if("undefined"!=typeof window){for(const t in m){const n=m[t],i=t.endsWith("Capture"),a=((null==s?void 0:s[t])??t.slice(2).toLowerCase()).slice(0,i?-7:void 0);e.useLayoutEffect(()=>{const e=null==h?void 0:h.current;if(e&&"function"==typeof n)return e.addEventListener(a,n,i),()=>{e.removeEventListener(a,n,i)}},[null==h?void 0:h.current,n])}e.useLayoutEffect(()=>{if(null===h.current)return;const e=new Map;for(const t in f)T(h.current,t,f[t]),p.current.delete(t),e.set(t,f[t]);for(const[e,t]of p.current)T(h.current,e,void 0);p.current=e})}if("undefined"==typeof window&&(null==n?void 0:n.getTemplateHTML)&&(null==n?void 0:n.shadowRootOptions)){const{mode:t,delegatesFocus:s}=n.shadowRootOptions,a=e.createElement("template",{shadowrootmode:t,shadowrootdelegatesfocus:s,dangerouslySetInnerHTML:{__html:n.getTemplateHTML(g,i)},key:"ce-la-react-ssr-template-shadow-root"});v.children=[a,v.children]}return e.createElement(t,{...a,...v,ref:e.useCallback(e=>{h.current=e,"function"==typeof u?u(e):null!==u&&(u.current=e)},[u])},v.children)});return u.displayName=i??n.name,u}({react:s,tagName:"youtube-video",elementClass:y,toAttributeName:e=>"muted"===e?"":"defaultMuted"===e?"muted":w(e)})}}]); 3//# sourceMappingURL=reactPlayerYouTube.904a259c912a3b082d90.js.map
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.