1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2771],{6687:(t,e,i)=>{i.r(e),i.d(e,{default:()=>x});var s,n,r,a,o,l,h,u,d,p,c,f,m=i(6540),v=Object.defineProperty,w=t=>{throw TypeError(t)},g=(t,e,i)=>e in t?v(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,y=(t,e,i)=>g(t,"symbol"!=typeof e?e+"":e,i),E=(t,e,i)=>e.has(t)||w("Cannot "+i),b=(t,e,i)=>(E(t,e,"read from private field"),i?i.call(t):e.get(t)),k=(t,e,i)=>e.has(t)?w("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),C=(t,e,i,s)=>(E(t,e,"write to private field"),s?s.call(t,i):e.set(t,i),i),M=(t,e,i)=>(E(t,e,"access private method"),i);let T=/open\.spotify\.com\/(\w+)\/(\w+)/i;function W(t,e={}){let i={src:L(t,e),scrolling:"no",frameborder:0,width:"100%",height:"100%",allow:"accelerometer; fullscreen; autoplay; encrypted-media; gyroscope; picture-in-picture"};return` 2 <style> 3 :host { 4 display: inline-block; 5 min-width: 160px; 6 min-height: 80px; 7 position: relative; 8 } 9 iframe { 10 position: absolute; 11 top: 0; 12 left: 0; 13 width: 100%; 14 height: 100%; 15 overflow: hidden; 16 } 17 :host(:not([controls])) { 18 display: none !important; 19 } 20 </style> 21 <iframe${function(t){let e="";for(let i in t){let s=t[i];""===s?e+=` ${i}`:e+=` ${i}="${s}"`}return e}(i)}></iframe> 22 `}function L(t,e){var i,s,n;if(!t.src)return;let r=t.src.match(T),a=r&&r[1],o=r&&r[2],l={t:null==(i=e.config)?void 0:i.startAt,theme:(null==(s=e.config)?void 0:s.theme)==="dark"?"0":null},h=null!=(n=e.config)&&n.preferVideo?"/video":"";return`https://open.spotify.com/embed/${a}/${o}${h}?${String(new URLSearchParams(function(t){let e={};for(let i in t){let s=t[i];!0===s||""===s?e[i]=1:!1===s?e[i]=0:null!=s&&(e[i]=s)}return e}(l)))}`}class A extends(globalThis.HTMLElement??class{}){constructor(){super(),k(this,c),y(this,"loadComplete",new R),k(this,s),k(this,n),k(this,r),k(this,a,!1),k(this,o,!1),k(this,l,!0),k(this,h,0),k(this,u,NaN),k(this,d,!1),k(this,p,null),M(this,c,f).call(this,"config")}async load(){var t,e,i;if(b(this,s))return;b(this,n)&&(this.loadComplete=new R),C(this,n,!0),await C(this,s,Promise.resolve()),C(this,s,null),C(this,a,!1),C(this,o,!1),C(this,h,0),C(this,u,NaN),C(this,d,!1),this.dispatchEvent(new Event("emptied"));let p=this.api;if(this.api=null,!this.src)return;this.dispatchEvent(new Event("loadstart"));let c={t:null==(t=this.config)?void 0:t.startAt,theme:(null==(e=this.config)?void 0:e.theme)==="dark"?"0":null,preferVideo:null==(i=this.config)?void 0:i.preferVideo};if(b(this,r))this.api=p,this.api.iframeElement.src=L(N(this.attributes),this);else{C(this,r,!0),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=W(N(this.attributes),this));let t=this.shadowRoot.querySelector("iframe"),e=await S("https://open.spotify.com/embed-podcast/iframe-api/v1","SpotifyIframeApi","onSpotifyIframeApiReady");this.api=await new Promise(i=>e.createController(t,c,i)),this.api.iframeElement=t,this.api.addListener("ready",()=>{this.dispatchEvent(new Event("loadedmetadata")),this.dispatchEvent(new Event("durationchange")),this.dispatchEvent(new Event("volumechange"))}),this.api.addListener("playback_update",t=>{if(b(this,o)&&b(this,l)&&(t.data.isBuffering||!t.data.isPaused)){C(this,o,!1),this.currentTime=1;return}if(t.data.duration/1e3!==b(this,u)&&(C(this,o,!1),C(this,u,t.data.duration/1e3),this.dispatchEvent(new Event("durationchange"))),t.data.position/1e3!==b(this,h)&&(C(this,d,!1),C(this,o,!1),C(this,h,t.data.position/1e3),this.dispatchEvent(new Event("timeupdate"))),!b(this,a)&&!b(this,l)&&t.data.isPaused){C(this,l,!0),this.dispatchEvent(new Event("pause"));return}if(b(this,l)&&(t.data.isBuffering||!t.data.isPaused)){C(this,l,!1),this.dispatchEvent(new Event("play")),C(this,a,t.data.isBuffering),b(this,a)?this.dispatchEvent(new Event("waiting")):this.dispatchEvent(new Event("playing"));return}if(b(this,a)&&!t.data.isPaused){C(this,a,!1),this.dispatchEvent(new Event("playing"));return}if(!this.paused&&!this.seeking&&!b(this,o)&&Math.ceil(this.currentTime)>=this.duration){if(C(this,o,!0),this.loop){this.currentTime=1;return}this.continuous||(this.pause(),this.dispatchEvent(new Event("ended")));return}})}this.loadComplete.resolve(),await this.loadComplete}async attributeChangedCallback(t,e,i){if(e!==i&&"src"===t){this.load();return}}async play(){var t;return C(this,l,!1),C(this,a,!0),this.dispatchEvent(new Event("play")),await this.loadComplete,null==(t=this.api)?void 0:t.resume()}async pause(){var t;return await this.loadComplete,null==(t=this.api)?void 0:t.pause()}get config(){return b(this,p)}set config(t){C(this,p,t)}get paused(){return b(this,l)??!0}get muted(){return!1}set muted(t){}get volume(){return 1}set volume(t){}get ended(){return Math.ceil(this.currentTime)>=this.duration}get seeking(){return b(this,d)}get loop(){return this.hasAttribute("loop")}set loop(t){this.loop!=t&&this.toggleAttribute("loop",!!t)}get currentTime(){return b(this,h)}set currentTime(t){if(this.currentTime==t)return;C(this,d,!0);let e=b(this,h);C(this,h,t),this.dispatchEvent(new Event("timeupdate")),C(this,h,e),this.loadComplete.then(()=>{var e;null==(e=this.api)||e.seek(t)})}get duration(){return b(this,u)}get src(){return this.getAttribute("src")}set src(t){this.setAttribute("src",`${t}`)}}function N(t){let e={};for(let i of t)e[i.name]=i.value;return e}s=new WeakMap,n=new WeakMap,r=new WeakMap,a=new WeakMap,o=new WeakMap,l=new WeakMap,h=new WeakMap,u=new WeakMap,d=new WeakMap,p=new WeakMap,c=new WeakSet,f=function(t){if(Object.prototype.hasOwnProperty.call(this,t)){let e=this[t];delete this[t],this[t]=e}},y(A,"getTemplateHTML",W),y(A,"shadowRootOptions",{mode:"open"}),y(A,"observedAttributes",["controls","loop","src"]);let P={};async function S(t,e,i){return P[t]?P[t]:self[e]?Promise.resolve(self[e]):P[t]=new Promise(function(e,s){let n=document.createElement("script");n.src=t,self[i]=t=>e(t),n.onload=()=>!i,n.onerror=s,document.head.append(n)})}class R extends Promise{constructor(t=()=>{}){let e,i;super((s,n)=>{t(s,n),e=s,i=n}),this.resolve=e,this.reject=i}}globalThis.customElements&&!globalThis.customElements.get("spotify-audio")&&globalThis.customElements.define("spotify-audio",A);var $=new Set(["style","children","ref","key","suppressContentEditableWarning","suppressHydrationWarning","dangerouslySetInnerHTML"]),H={className:"class",htmlFor:"for"};function j(t){return t.toLowerCase()}function O(t){return"boolean"==typeof t?t?"":void 0:"function"==typeof t||"object"==typeof t&&null!==t?void 0:t}function _(t,e,i){var s;t[e]=i,null==i&&e in((null==(s=globalThis.HTMLElement)?void 0:s.prototype)??{})&&t.removeAttribute(e)}var x=function({react:t,tagName:e,elementClass:i,events:s,displayName:n,defaultProps:r,toAttributeName:a=j,toAttributeValue:o=O}){let l=Number.parseInt(t.version)>=19,h=t.forwardRef((n,h)=>{var u,d;let p=t.useRef(null),c=t.useRef(new Map),f={},m={},v={},w={};for(let[t,e]of Object.entries(n)){if($.has(t)){v[t]=e;continue}let s=a(H[t]??t);if(i.prototype&&t in i.prototype&&!(t in((null==(u=globalThis.HTMLElement)?void 0:u.prototype)??{}))&&!(null!=(d=i.observedAttributes)&&d.some(t=>t===s))){w[t]=e;continue}if(t.startsWith("on")){f[t]=e;continue}let n=o(e);s&&null!=n&&(m[s]=String(n),l||(v[s]=n)),s&&l&&(n!==O(e)?v[s]=n:v[s]=e)}for(let e in f){let i=f[e],n=e.endsWith("Capture"),r=((null==s?void 0:s[e])??e.slice(2).toLowerCase()).slice(0,n?-7:void 0);t.useLayoutEffect(()=>{let t=null==p?void 0:p.current;if(!(!t||"function"!=typeof i))return t.addEventListener(r,i,n),()=>{t.removeEventListener(r,i,n)}},[null==p?void 0:p.current,i])}return t.useLayoutEffect(()=>{if(null===p.current)return;let t=new Map;for(let e in w)_(p.current,e,w[e]),c.current.delete(e),t.set(e,w[e]);for(let[t,e]of c.current)_(p.current,t,void 0);c.current=t}),t.createElement(e,{...r,...v,ref:t.useCallback(t=>{p.current=t,"function"==typeof h?h(t):null!==h&&(h.current=t)},[h])})});return h.displayName=n??i.name,h}({react:m,tagName:"spotify-audio",elementClass:A,toAttributeName:t=>"muted"===t?"":"defaultMuted"===t?"muted":j(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.