deemix-webui/public/index.c845e12b.js

2 lines
408 KiB
JavaScript
Raw Normal View History

var e=Object.defineProperty,t=Object.defineProperties,a=Object.getOwnPropertyDescriptors,i=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable,r=(t,a,i)=>a in t?e(t,a,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[a]=i,o=(e,t)=>{for(var a in t||(t={}))s.call(t,a)&&r(e,a,t[a]);if(i)for(var a of i(t))n.call(t,a)&&r(e,a,t[a]);return e},l=(e,i)=>t(e,a(i));import{V as c,P as u,m as d,r as p,w as m,d as g,a as b,c as h,t as v,T as y,b as k,e as f,o as w,u as A,f as _,i as C,g as S,h as T,j as z,k as x,l as P,n as D,p as N,q as L,s as I,v as R,x as $,y as F,z as j,A as E,B as U,C as B,D as q,E as M,F as O,G}from"./vendor.70b63c9f.js";c.use(u);const V={credentials:"include"};function W(e,t={},a="GET"){const i=new URL(`http://localhost:6595/api/${e}`);return Object.keys(t).forEach((e=>{i.searchParams.append(e,t[e])})),fetch(i.href,l(o({},V),{method:a})).then((e=>e.json())).catch((e=>(console.error("There has been a problem with your fetch operation:",e),Promise.reject(e))))}const K=(e,t)=>{const a=new URL(`http://localhost:6595/api/${e}`);return fetch(a,l(o({},V),{body:JSON.stringify(t),headers:{"Content-Type":"application/json"},method:"POST"})).then((e=>{if(!e.ok)throw new Error("Network response was not ok");return e.json()})).catch((e=>{console.error("There has been a problem with your fetch operation:",e)}))};class Q extends WebSocket{constructor(e){super(e),this.listeners={}}emit(e,t){if(this.readyState!==WebSocket.OPEN)return!1;this.send(JSON.stringify({key:e,data:t}))}on(e,t){Object.keys(this.listeners).includes(e)||(this.listeners[e]=t,this.addEventListener("message",(a=>{const i=JSON.parse(a.data);i.key===e&&t(i.data)})))}off(e){Object.keys(this.listeners).includes(e)&&(this.removeEventListener("message",this.listeners[e]),delete this.listeners[e])}}const H=new Q("ws://localhost:6595/");function Y(e,t,a,i,s,n,r,o){var l,c="function"==typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=a,c._compiled=!0),i&&(c.functional=!0),n&&(c._scopeId="data-v-"+n),r?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),s&&s.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(r)},c._ssrRegister=l):s&&(l=o?function(){s.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:s),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(e,t){return l.call(t),u(e,t)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,l):[l]}return{exports:e,options:c}}const J={};var Z=Y({},(function(e,t){var a=t._c;return a("div",{directives:[{name:"show",rawName:"v-show",value:!t.props.hidden,expression:"!props.hidden"}],staticClass:"flex justify-center items-center flex-col flex-1 h-full",class:t.props.additionalClasses},[a("span",{staticClass:"mb-5"},[t._v(t._s(t.props.text||"Loading..."))]),t._m(0)])}),[function(e,t){var a=t._c;return a("div",{staticClass:"lds-ring"},[a("div"),a("div"),a("div"),a("div")])}],!0,X,"3e02789c",null,null);function X(e){for(let t in J)this[t]=J[t]}var ee=function(){return Z.exports}();function te(e,t=null){if(!e)throw new Error("No URL given to sendAddToQueue function!");W("addToQueue",{url:e,bitrate:t},"POST")}function ae(e){const t=e.toLowerCase();if(t.startsWith("http")){if(t.includes("deezer.com")||t.includes("deezer.page.link")||t.includes("open.spotify.com")||t.includes("link.tospotify.com"))return!0}else if(t.startsWith("spotify:"))return!0;return!1}function ie(e){const t=Math.floor(e/60);let a=e-60*t;return a<10&&(a="0"+a),t+":"+a}const se=e=>e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,".");function ne(e,t,a){let i;return function(){const s=this,n=arguments,r=function(){i=null,a||e.apply(s,n)},o=a&&!i;clearTimeout(i),i=setTimeout(r,t),o&&e.apply(s,n)}}function re(e){const t=document.createElement("input");document.body.appendChild(t),t.setAttribute("type","text"),t.setAttribute("value",e),t.select(),t.setSelectionRange(0,99999),document.execCommand("copy"),t.remove()}functio