PageSourceSearch

https://assets.services.prod.kratos.zappos.com/kratos-assets/_next…/reactPlayerSpotify.e682d7848f542d7e.js

js zappos.com collected 2026-09-24 08:25:02 UTC 7,768 bytes, 22 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2771],{58551:(e,t,i)=>{i.r(t),i.d(t,{default:()=>g});var n=i(7620);let s=/open\.spotify\.com\/(\w+)\/(\w+)/i;function r(e,t={}){let i={src:o(e,t),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(e){let t="";for(let i in e){let n=e[i];""===n?t+=` ${i}`:t+=` ${i}="${n}"`}return t}(i)}></iframe>
22  `}function o(e,t){var i,n,r;if(!e.src)return;let o=e.src.match(s),a=o&&o[1],l=o&&o[2],u={t:null==(i=t.config)?void 0:i.startAt,theme:(null==(n=t.config)?void 0:n.theme)==="dark"?"0":null},d=(null==(r=t.config)?void 0:r.preferVideo)?"/video":"";return`https://open.spotify.com/embed/${a}/${l}${d}?${String(new URLSearchParams(function(e){let t={};for(let i in e){let n=e[i];!0===n||""===n?t[i]=1:!1===n?t[i]=0:null!=n&&(t[i]=n)}return t}(u)))}`}class a extends(globalThis.HTMLElement??class{}){static getTemplateHTML=r;static shadowRootOptions={mode:"open"};static observedAttributes=["controls","loop","src"];loadComplete=new h;#e;#t;#i;#n=!1;#s=!1;#r=!0;#o=0;#a=NaN;#l=!1;#u=null;constructor(){super(),this.#d("config")}async load(){var e,t,i;if(this.#e)return;this.#t&&(this.loadComplete=new h),this.#t=!0,await (this.#e=Promise.resolve()),this.#e=null,this.#n=!1,this.#s=!1,this.#o=0,this.#a=NaN,this.#l=!1,this.dispatchEvent(new Event("emptied"));let n=this.api;if(this.api=null,!this.src)return;this.dispatchEvent(new Event("loadstart"));let s={t:null==(e=this.config)?void 0:e.startAt,theme:(null==(t=this.config)?void 0:t.theme)==="dark"?"0":null,preferVideo:null==(i=this.config)?void 0:i.preferVideo};if(this.#i)this.api=n,this.api.iframeElement.src=o(l(this.attributes),this);else{this.#i=!0,this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=r(l(this.attributes),this));let e=this.shadowRoot.querySelector("iframe"),t=await d("https://open.spotify.com/embed-podcast/iframe-api/v1","SpotifyIframeApi","onSpotifyIframeApiReady");this.api=await new Promise(i=>t.createController(e,s,i)),this.api.iframeElement=e,this.api.addListener("ready",()=>{this.dispatchEvent(new Event("loadedmetadata")),this.dispatchEvent(new Event("durationchange")),this.dispatchEvent(new Event("volumechange"))}),this.api.addListener("playback_update",e=>{if(this.#s&&this.#r&&(e.data.isBuffering||!e.data.isPaused)){this.#s=!1,this.currentTime=1;return}if(e.data.duration/1e3!==this.#a&&(this.#s=!1,this.#a=e.data.duration/1e3,this.dispatchEvent(new Event("durationchange"))),e.data.position/1e3!==this.#o&&(this.#l=!1,this.#s=!1,this.#o=e.data.position/1e3,this.dispatchEvent(new Event("timeupdate"))),!this.#n&&!this.#r&&e.data.isPaused){this.#r=!0,this.dispatchEvent(new Event("pause"));return}if(this.#r&&(e.data.isBuffering||!e.data.isPaused)){this.#r=!1,this.dispatchEvent(new Event("play")),this.#n=e.data.isBuffering,this.#n?this.dispatchEvent(new Event("waiting")):this.dispatchEvent(new Event("playing"));return}if(this.#n&&!e.data.isPaused){this.#n=!1,this.dispatchEvent(new Event("playing"));return}if(!this.paused&&!this.seeking&&!this.#s&&Math.ceil(this.currentTime)>=this.duration){if(this.#s=!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(e,t,i){if(t!==i&&"src"===e)return void this.load()}async play(){var e;return this.#r=!1,this.#n=!0,this.dispatchEvent(new Event("play")),await this.loadComplete,null==(e=this.api)?void 0:e.resume()}async pause(){var e;return await this.loadComplete,null==(e=this.api)?void 0:e.pause()}get config(){return this.#u}set config(e){this.#u=e}get paused(){return this.#r??!0}get muted(){return!1}set muted(e){}get volume(){return 1}set volume(e){}get ended(){return Math.ceil(this.currentTime)>=this.duration}get seeking(){return this.#l}get loop(){return this.hasAttribute("loop")}set loop(e){this.loop!=e&&this.toggleAttribute("loop",!!e)}get currentTime(){return this.#o}set currentTime(e){if(this.currentTime==e)return;this.#l=!0;let t=this.#o;this.#o=e,this.dispatchEvent(new Event("timeupdate")),this.#o=t,this.loadComplete.then(()=>{var t;null==(t=this.api)||t.seek(e)})}get duration(){return this.#a}get src(){return this.getAttribute("src")}set src(e){this.setAttribute("src",`${e}`)}#d(e){if(Object.prototype.hasOwnProperty.call(this,e)){let t=this[e];delete this[e],this[e]=t}}}function l(e){let t={};for(let i of e)t[i.name]=i.value;return t}let u={};async function d(e,t,i){return u[e]?u[e]:t&&self[t]?Promise.resolve(self[t]):u[e]=new Promise(function(t,n){let s=document.createElement("script");s.src=e;let r=e=>t(e);
22i&&(self[i]=r),s.onload=()=>!i&&r(),s.onerror=n,document.head.append(s)})}class h extends Promise{constructor(e=()=>{}){let t,i;super((n,s)=>{e(n,s),t=n,i=s}),this.resolve=t,this.reject=i}}globalThis.customElements&&!globalThis.customElements.get("spotify-audio")&&globalThis.customElements.define("spotify-audio",a);var c=new Set(["style","children","ref","key","suppressContentEditableWarning","suppressHydrationWarning","dangerouslySetInnerHTML"]),p={className:"class",htmlFor:"for"};function f(e){return e.toLowerCase()}function m(e){return"boolean"==typeof e?e?"":void 0:"function"==typeof e?void 0:"object"!=typeof e||null===e?e:void 0}function v(e,t,i){var n,s;e[t]=i,null==i&&t in(null!=(s=null==(n=globalThis.HTMLElement)?void 0:n.prototype)?s:{})&&e.removeAttribute(t)}var g=function(e){let{react:t,tagName:i,elementClass:n,events:s,displayName:r,defaultProps:o,toAttributeName:a=f,toAttributeValue:l=m}=e,u=Number.parseInt(t.version)>=19,d=t.forwardRef((e,r)=>{var d,h,f,g,w;let E=t.useRef(null),y=t.useRef(new Map),T={},b={},L={},k={};for(let[t,i]of Object.entries(e)){if(c.has(t)){L[t]=i;continue}let e=a(null!=(f=p[t])?f:t);if(n.prototype&&t in n.prototype&&!(t in(null!=(g=null==(d=globalThis.HTMLElement)?void 0:d.prototype)?g:{}))&&!(null==(h=n.observedAttributes)?void 0:h.some(t=>t===e))){k[t]=i;continue}if(t.startsWith("on")){T[t]=i;continue}let s=l(i);e&&null!=s&&(b[e]=String(s),u||(L[e]=s)),e&&u&&(s!==m(i)?L[e]=s:L[e]=i)}if("undefined"!=typeof window){for(let e in T){let i=T[e],n=e.endsWith("Capture"),r=(null!=(w=null==s?void 0:s[e])?w:e.slice(2).toLowerCase()).slice(0,n?-7:void 0);t.useLayoutEffect(()=>{let e=null==E?void 0:E.current;if(e&&"function"==typeof i)return e.addEventListener(r,i,n),()=>{e.removeEventListener(r,i,n)}},[null==E?void 0:E.current,i])}t.useLayoutEffect(()=>{if(null===E.current)return;let e=new Map;for(let t in k)v(E.current,t,k[t]),y.current.delete(t),e.set(t,k[t]);for(let[e,t]of y.current)v(E.current,e,void 0);y.current=e})}if("undefined"==typeof window&&(null==n?void 0:n.getTemplateHTML)&&(null==n?void 0:n.shadowRootOptions)){let{mode:i,delegatesFocus:s}=n.shadowRootOptions;L.children=[t.createElement("template",{shadowrootmode:i,shadowrootdelegatesfocus:s,dangerouslySetInnerHTML:{__html:n.getTemplateHTML(b,e)},key:"ce-la-react-ssr-template-shadow-root"}),L.children]}return t.createElement(i,{...o,...L,ref:t.useCallback(e=>{E.current=e,"function"==typeof r?r(e):null!==r&&(r.current=e)},[r])},L.children)});return d.displayName=null!=r?r:n.name,d}({react:n,tagName:"spotify-audio",elementClass:a,toAttributeName:e=>"muted"===e?"":"defaultMuted"===e?"muted":f(e)})}}]);

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.