From 079fd8ad64eee481543a7b68e05853db44341a81 Mon Sep 17 00:00:00 2001 From: Roberto Tonino Date: Mon, 1 Mar 2021 22:32:35 +0100 Subject: [PATCH] feat: fetching home data with rest APIs; refactor: renamed fetch functions --- public/js/bundle.js | 14 +++++++------- src/app.js | 9 +++++---- src/data/home.js | 17 ++++++----------- src/use/main-search.js | 4 ++-- src/use/search.js | 4 ++-- src/utils/api.js | 12 +++++++++++- src/utils/downloads.js | 6 +++--- 7 files changed, 36 insertions(+), 30 deletions(-) diff --git a/public/js/bundle.js b/public/js/bundle.js index 8f2ec1e..16641e0 100644 --- a/public/js/bundle.js +++ b/public/js/bundle.js @@ -2,9 +2,9 @@ * Vue.js v2.6.12 * (c) 2014-2020 Evan You * Released under the MIT License. - */var emptyObject=Object.freeze({});function isUndef(e){return e==null}function isDef(e){return e!=null}function isTrue(e){return e===!0}function isFalse(e){return e===!1}function isPrimitive(e){return typeof e=="string"||typeof e=="number"||typeof e=="symbol"||typeof e=="boolean"}function isObject(e){return e!==null&&typeof e=="object"}var _toString=Object.prototype.toString;function toRawType(e){return _toString.call(e).slice(8,-1)}function isPlainObject(e){return _toString.call(e)==="[object Object]"}function isRegExp(e){return _toString.call(e)==="[object RegExp]"}function isValidArrayIndex(e){var a=parseFloat(String(e));return a>=0&&Math.floor(a)===a&&isFinite(e)}function isPromise(e){return isDef(e)&&typeof e.then=="function"&&typeof e.catch=="function"}function toString(e){return e==null?"":Array.isArray(e)||isPlainObject(e)&&e.toString===_toString?JSON.stringify(e,null,2):String(e)}function toNumber(e){var a=parseFloat(e);return isNaN(a)?e:a}function makeMap(e,a){for(var n=Object.create(null),r=e.split(","),i=0;i-1)return e.splice(n,1)}}var hasOwnProperty=Object.prototype.hasOwnProperty;function hasOwn(e,a){return hasOwnProperty.call(e,a)}function cached(e){var a=Object.create(null);return function(r){var i=a[r];return i||(a[r]=e(r))}}var camelizeRE=/-(\w)/g,camelize=cached(function(e){return e.replace(camelizeRE,function(a,n){return n?n.toUpperCase():""})}),capitalize=cached(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}),hyphenateRE=/\B([A-Z])/g,hyphenate=cached(function(e){return e.replace(hyphenateRE,"-$1").toLowerCase()});function polyfillBind(e,a){function n(r){var i=arguments.length;return i?i>1?e.apply(a,arguments):e.call(a,r):e.call(a)}return n._length=e.length,n}function nativeBind(e,a){return e.bind(a)}var bind=Function.prototype.bind?nativeBind:polyfillBind;function toArray(e,a){a=a||0;for(var n=e.length-a,r=new Array(n);n--;)r[n]=e[n+a];return r}function extend(e,a){for(var n in a)e[n]=a[n];return e}function toObject(e){for(var a={},n=0;n0,isEdge=UA&&UA.indexOf("edge/")>0,isAndroid=UA&&UA.indexOf("android")>0||weexPlatform==="android",isIOS=UA&&/iphone|ipad|ipod|ios/.test(UA)||weexPlatform==="ios",isChrome=UA&&/chrome\/\d+/.test(UA)&&!isEdge,isPhantomJS=UA&&/phantomjs/.test(UA),isFF=UA&&UA.match(/firefox\/(\d+)/),nativeWatch={}.watch,supportsPassive=!1;if(inBrowser)try{var opts={};Object.defineProperty(opts,"passive",{get:function(){supportsPassive=!0}}),window.addEventListener("test-passive",null,opts)}catch(e){}var _isServer,isServerRendering=function(){return _isServer===void 0&&(!inBrowser&&!inWeex&&typeof global!="undefined"?_isServer=global.process&&global.process.env.VUE_ENV==="server":_isServer=!1),_isServer},devtools=inBrowser&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function isNative(e){return typeof e=="function"&&/native code/.test(e.toString())}var hasSymbol=typeof Symbol!="undefined"&&isNative(Symbol)&&typeof Reflect!="undefined"&&isNative(Reflect.ownKeys),_Set;typeof Set!="undefined"&&isNative(Set)?_Set=Set:_Set=function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(n){return this.set[n]===!0},e.prototype.add=function(n){this.set[n]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var warn=noop,uid=0,Dep=function(){this.id=uid++,this.subs=[]};Dep.prototype.addSub=function(a){this.subs.push(a)},Dep.prototype.removeSub=function(a){remove(this.subs,a)},Dep.prototype.depend=function(){Dep.target&&Dep.target.addDep(this)},Dep.prototype.notify=function(){for(var a=this.subs.slice(),n=0,r=a.length;n-1){if(s&&!hasOwn(i,"default"))l=!1;else if(l===""||l===hyphenate(e)){var o=getTypeIndex(String,i.type);(o<0||c0&&(i=normalizeArrayChildren(i,(a||"")+"_"+r),isTextNode(i[0])&&isTextNode(l)&&(n[s]=createTextVNode(l.text+i[0].text),i.shift()),n.push.apply(n,i)):isPrimitive(i)?isTextNode(l)?n[s]=createTextVNode(l.text+i):i!==""&&n.push(createTextVNode(i)):isTextNode(i)&&isTextNode(l)?n[s]=createTextVNode(l.text+i.text):(isTrue(e._isVList)&&isDef(i.tag)&&isUndef(i.key)&&isDef(a)&&(i.key="__vlist"+a+"_"+r+"__"),n.push(i))}return n}function initProvide(e){var a=e.$options.provide;a&&(e._provided=typeof a=="function"?a.call(e):a)}function initInjections(e){var a=resolveInject(e.$options.inject,e);a&&(toggleObserving(!1),Object.keys(a).forEach(function(n){defineReactive$$1(e,n,a[n])}),toggleObserving(!0))}function resolveInject(e,a){if(e){for(var n=Object.create(null),r=hasSymbol?Reflect.ownKeys(e):Object.keys(e),i=0;i0,s=e?!!e.$stable:!i,l=e&&e.$key;if(!e)r={};else{if(e._normalized)return e._normalized;if(s&&n&&n!==emptyObject&&l===n.$key&&!i&&!n.$hasNormal)return n;r={};for(var c in e)e[c]&&c[0]!=="$"&&(r[c]=normalizeScopedSlot(a,c,e[c]))}for(var o in a)o in r||(r[o]=proxyNormalSlot(a,o));return e&&Object.isExtensible(e)&&(e._normalized=r),def(r,"$stable",s),def(r,"$key",l),def(r,"$hasNormal",i),r}function normalizeScopedSlot(e,a,n){var r=function(){var i=arguments.length?n.apply(null,arguments):n({});return i=i&&typeof i=="object"&&!Array.isArray(i)?[i]:normalizeChildren(i),i&&(i.length===0||i.length===1&&i[0].isComment)?void 0:i};return n.proxy&&Object.defineProperty(e,a,{get:r,enumerable:!0,configurable:!0}),r}function proxyNormalSlot(e,a){return function(){return e[a]}}function renderList(e,a){var n,r,i,s,l;if(Array.isArray(e)||typeof e=="string")for(n=new Array(e.length),r=0,i=e.length;r1?toArray(i):i;for(var s=toArray(arguments,1),l='event handler for "'+n+'"',c=0,o=i.length;cdocument.createEvent("Event").timeStamp&&(getNow=function(){return performance.now()})}function flushSchedulerQueue(){currentFlushTimestamp=getNow(),flushing=!0;var e,a;for(queue.sort(function(i,s){return i.id-s.id}),index=0;indexindex&&queue[n].id>e.id;)n--;queue.splice(n+1,0,e)}waiting||(waiting=!0,nextTick(flushSchedulerQueue))}}var uid$2=0,Watcher=function(a,n,r,i,s){this.vm=a,s&&(a._watcher=this),a._watchers.push(this),i?(this.deep=!!i.deep,this.user=!!i.user,this.lazy=!!i.lazy,this.sync=!!i.sync,this.before=i.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=r,this.id=++uid$2,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new _Set,this.newDepIds=new _Set,this.expression="",typeof n=="function"?this.getter=n:(this.getter=parsePath(n),this.getter||(this.getter=noop)),this.value=this.lazy?void 0:this.get()};Watcher.prototype.get=function(){pushTarget(this);var a,n=this.vm;try{a=this.getter.call(n,n)}catch(r){if(this.user)handleError(r,n,'getter for watcher "'+this.expression+'"');else throw r}finally{this.deep&&traverse(a),popTarget(),this.cleanupDeps()}return a},Watcher.prototype.addDep=function(a){var n=a.id;this.newDepIds.has(n)||(this.newDepIds.add(n),this.newDeps.push(a),this.depIds.has(n)||a.addSub(this))},Watcher.prototype.cleanupDeps=function(){for(var a=this.deps.length;a--;){var n=this.deps[a];this.newDepIds.has(n.id)||n.removeSub(this)}var r=this.depIds;this.depIds=this.newDepIds,this.newDepIds=r,this.newDepIds.clear(),r=this.deps,this.deps=this.newDeps,this.newDeps=r,this.newDeps.length=0},Watcher.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():queueWatcher(this)},Watcher.prototype.run=function(){if(this.active){var a=this.get();if(a!==this.value||isObject(a)||this.deep){var n=this.value;if(this.value=a,this.user)try{this.cb.call(this.vm,a,n)}catch(r){handleError(r,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,a,n)}}},Watcher.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},Watcher.prototype.depend=function(){for(var a=this.deps.length;a--;)this.deps[a].depend()},Watcher.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||remove(this.vm._watchers,this);for(var a=this.deps.length;a--;)this.deps[a].removeSub(this);this.active=!1}};var sharedPropertyDefinition={enumerable:!0,configurable:!0,get:noop,set:noop};function proxy(e,a,n){sharedPropertyDefinition.get=function(){return this[a][n]},sharedPropertyDefinition.set=function(i){this[a][n]=i},Object.defineProperty(e,n,sharedPropertyDefinition)}function initState(e){e._watchers=[];var a=e.$options;a.props&&initProps(e,a.props),a.methods&&initMethods(e,a.methods),a.data?initData(e):observe(e._data={},!0),a.computed&&initComputed(e,a.computed),a.watch&&a.watch!==nativeWatch&&initWatch(e,a.watch)}function initProps(e,a){var n=e.$options.propsData||{},r=e._props={},i=e.$options._propKeys=[],s=!e.$parent;s||toggleObserving(!1);var l=function(o){i.push(o);var d=validateProp(o,a,n,e);defineReactive$$1(r,o,d),o in e||proxy(e,"_props",o)};for(var c in a)l(c);toggleObserving(!0)}function initData(e){var a=e.$options.data;a=e._data=typeof a=="function"?getData(a,e):a||{},isPlainObject(a)||(a={});for(var n=Object.keys(a),r=e.$options.props,i=e.$options.methods,s=n.length;s--;){var l=n[s];r&&hasOwn(r,l)||(isReserved(l)||proxy(e,"_data",l))}observe(a,!0)}function getData(e,a){pushTarget();try{return e.call(a,a)}catch(n){return handleError(n,a,"data()"),{}}finally{popTarget()}}var computedWatcherOptions={lazy:!0};function initComputed(e,a){var n=e._computedWatchers=Object.create(null),r=isServerRendering();for(var i in a){var s=a[i],l=typeof s=="function"?s:s.get;r||(n[i]=new Watcher(e,l||noop,noop,computedWatcherOptions)),i in e||defineComputed(e,i,s)}}function defineComputed(e,a,n){var r=!isServerRendering();typeof n=="function"?(sharedPropertyDefinition.get=r?createComputedGetter(a):createGetterInvoker(n),sharedPropertyDefinition.set=noop):(sharedPropertyDefinition.get=n.get?r&&n.cache!==!1?createComputedGetter(a):createGetterInvoker(n.get):noop,sharedPropertyDefinition.set=n.set||noop),Object.defineProperty(e,a,sharedPropertyDefinition)}function createComputedGetter(e){return function(){var n=this._computedWatchers&&this._computedWatchers[e];if(n)return n.dirty&&n.evaluate(),Dep.target&&n.depend(),n.value}}function createGetterInvoker(e){return function(){return e.call(this,this)}}function initMethods(e,a){var n=e.$options.props;for(var r in a)e[r]=typeof a[r]!="function"?noop:bind(a[r],e)}function initWatch(e,a){for(var n in a){var r=a[n];if(Array.isArray(r))for(var i=0;i-1)return this;var r=toArray(arguments,1);return r.unshift(this),typeof a.install=="function"?a.install.apply(a,r):typeof a=="function"&&a.apply(null,r),n.push(a),this}}function initMixin$1(e){e.mixin=function(a){return this.options=mergeOptions(this.options,a),this}}function initExtend(e){e.cid=0;var a=1;e.extend=function(n){n=n||{};var r=this,i=r.cid,s=n._Ctor||(n._Ctor={});if(s[i])return s[i];var l=n.name||r.options.name,c=function(d){this._init(d)};return c.prototype=Object.create(r.prototype),c.prototype.constructor=c,c.cid=a++,c.options=mergeOptions(r.options,n),c.super=r,c.options.props&&initProps$1(c),c.options.computed&&initComputed$1(c),c.extend=r.extend,c.mixin=r.mixin,c.use=r.use,ASSET_TYPES.forEach(function(o){c[o]=r[o]}),l&&(c.options.components[l]=c),c.superOptions=r.options,c.extendOptions=n,c.sealedOptions=extend({},c.options),s[i]=c,c}}function initProps$1(e){var a=e.options.props;for(var n in a)proxy(e.prototype,"_props",n)}function initComputed$1(e){var a=e.options.computed;for(var n in a)defineComputed(e.prototype,n,a[n])}function initAssetRegisters(e){ASSET_TYPES.forEach(function(a){e[a]=function(n,r){return r?(a==="component"&&isPlainObject(r)&&(r.name=r.name||n,r=this.options._base.extend(r)),a==="directive"&&typeof r=="function"&&(r={bind:r,update:r}),this.options[a+"s"][n]=r,r):this.options[a+"s"][n]}})}function getComponentName(e){return e&&(e.Ctor.options.name||e.tag)}function matches(e,a){return Array.isArray(e)?e.indexOf(a)>-1:typeof e=="string"?e.split(",").indexOf(a)>-1:isRegExp(e)?e.test(a):!1}function pruneCache(e,a){var n=e.cache,r=e.keys,i=e._vnode;for(var s in n){var l=n[s];if(l){var c=getComponentName(l.componentOptions);c&&!a(c)&&pruneCacheEntry(n,s,r,i)}}}function pruneCacheEntry(e,a,n,r){var i=e[a];i&&(!r||i.tag!==r.tag)&&i.componentInstance.$destroy(),e[a]=null,remove(n,a)}var patternTypes=[String,RegExp,Array],KeepAlive={name:"keep-alive",abstract:!0,props:{include:patternTypes,exclude:patternTypes,max:[String,Number]},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var a in this.cache)pruneCacheEntry(this.cache,a,this.keys)},mounted:function(){var a=this;this.$watch("include",function(n){pruneCache(a,function(r){return matches(n,r)})}),this.$watch("exclude",function(n){pruneCache(a,function(r){return!matches(n,r)})})},render:function(){var a=this.$slots.default,n=getFirstComponentChild(a),r=n&&n.componentOptions;if(r){var i=getComponentName(r),s=this,l=s.include,c=s.exclude;if(l&&(!i||!matches(l,i))||c&&i&&matches(c,i))return n;var o=this,d=o.cache,u=o.keys,f=n.key==null?r.Ctor.cid+(r.tag?"::"+r.tag:""):n.key;d[f]?(n.componentInstance=d[f].componentInstance,remove(u,f),u.push(f)):(d[f]=n,u.push(f),this.max&&u.length>parseInt(this.max)&&pruneCacheEntry(d,u[0],u,this._vnode)),n.data.keepAlive=!0}return n||a&&a[0]}},builtInComponents={KeepAlive};function initGlobalAPI(e){var a={};a.get=function(){return config},Object.defineProperty(e,"config",a),e.util={warn,extend,mergeOptions,defineReactive:defineReactive$$1},e.set=set,e.delete=del,e.nextTick=nextTick,e.observable=function(n){return observe(n),n},e.options=Object.create(null),ASSET_TYPES.forEach(function(n){e.options[n+"s"]=Object.create(null)}),e.options._base=e,extend(e.options.components,builtInComponents),initUse(e),initMixin$1(e),initExtend(e),initAssetRegisters(e)}initGlobalAPI(Vue),Object.defineProperty(Vue.prototype,"$isServer",{get:isServerRendering}),Object.defineProperty(Vue.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Vue,"FunctionalRenderContext",{value:FunctionalRenderContext}),Vue.version="2.6.12";var isReservedAttr=makeMap("style,class"),acceptValue=makeMap("input,textarea,option,select,progress"),mustUseProp=function(e,a,n){return n==="value"&&acceptValue(e)&&a!=="button"||n==="selected"&&e==="option"||n==="checked"&&e==="input"||n==="muted"&&e==="video"},isEnumeratedAttr=makeMap("contenteditable,draggable,spellcheck"),isValidContentEditableValue=makeMap("events,caret,typing,plaintext-only"),convertEnumeratedValue=function(e,a){return isFalsyAttrValue(a)||a==="false"?"false":e==="contenteditable"&&isValidContentEditableValue(a)?a:"true"},isBooleanAttr=makeMap("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),xlinkNS="http://www.w3.org/1999/xlink",isXlink=function(e){return e.charAt(5)===":"&&e.slice(0,5)==="xlink"},getXlinkProp=function(e){return isXlink(e)?e.slice(6,e.length):""},isFalsyAttrValue=function(e){return e==null||e===!1};function genClassForVnode(e){for(var a=e.data,n=e,r=e;isDef(r.componentInstance);)r=r.componentInstance._vnode,r&&r.data&&(a=mergeClassData(r.data,a));for(;isDef(n=n.parent);)n&&n.data&&(a=mergeClassData(a,n.data));return renderClass(a.staticClass,a.class)}function mergeClassData(e,a){return{staticClass:concat(e.staticClass,a.staticClass),class:isDef(e.class)?[e.class,a.class]:a.class}}function renderClass(e,a){return isDef(e)||isDef(a)?concat(e,stringifyClass(a)):""}function concat(e,a){return e?a?e+" "+a:e:a||""}function stringifyClass(e){return Array.isArray(e)?stringifyArray(e):isObject(e)?stringifyObject(e):typeof e=="string"?e:""}function stringifyArray(e){for(var a="",n,r=0,i=e.length;r-1?unknownElementCache[e]=a.constructor===window.HTMLUnknownElement||a.constructor===window.HTMLElement:unknownElementCache[e]=/HTMLUnknownElement/.test(a.toString())}var isTextInputType=makeMap("text,number,password,search,email,tel,url");function query(e){if(typeof e=="string"){var a=document.querySelector(e);return a||document.createElement("div")}else return e}function createElement$1(e,a){var n=document.createElement(e);return e!=="select"||a.data&&a.data.attrs&&a.data.attrs.multiple!==void 0&&n.setAttribute("multiple","multiple"),n}function createElementNS(e,a){return document.createElementNS(namespaceMap[e],a)}function createTextNode(e){return document.createTextNode(e)}function createComment(e){return document.createComment(e)}function insertBefore(e,a,n){e.insertBefore(a,n)}function removeChild(e,a){e.removeChild(a)}function appendChild(e,a){e.appendChild(a)}function parentNode(e){return e.parentNode}function nextSibling(e){return e.nextSibling}function tagName(e){return e.tagName}function setTextContent(e,a){e.textContent=a}function setStyleScope(e,a){e.setAttribute(a,"")}var nodeOps=Object.freeze({createElement:createElement$1,createElementNS,createTextNode,createComment,insertBefore,removeChild,appendChild,parentNode,nextSibling,tagName,setTextContent,setStyleScope}),ref={create:function(a,n){registerRef(n)},update:function(a,n){a.data.ref!==n.data.ref&&(registerRef(a,!0),registerRef(n))},destroy:function(a){registerRef(a,!0)}};function registerRef(e,a){var n=e.data.ref;if(!isDef(n))return;var r=e.context,i=e.componentInstance||e.elm,s=r.$refs;a?Array.isArray(s[n])?remove(s[n],i):s[n]===i&&(s[n]=void 0):e.data.refInFor?Array.isArray(s[n])?s[n].indexOf(i)<0&&s[n].push(i):s[n]=[i]:s[n]=i}var emptyNode=new VNode("",{},[]),hooks=["create","activate","update","remove","destroy"];function sameVnode(e,a){return e.key===a.key&&(e.tag===a.tag&&e.isComment===a.isComment&&isDef(e.data)===isDef(a.data)&&sameInputType(e,a)||isTrue(e.isAsyncPlaceholder)&&e.asyncFactory===a.asyncFactory&&isUndef(a.asyncFactory.error))}function sameInputType(e,a){if(e.tag!=="input")return!0;var n,r=isDef(n=e.data)&&isDef(n=n.attrs)&&n.type,i=isDef(n=a.data)&&isDef(n=n.attrs)&&n.type;return r===i||isTextInputType(r)&&isTextInputType(i)}function createKeyToOldIdx(e,a,n){var r,i,s={};for(r=a;r<=n;++r)i=e[r].key,isDef(i)&&(s[i]=r);return s}function createPatchFunction(e){var a,n,r={},i=e.modules,s=e.nodeOps;for(a=0;a$?(W=isUndef(_[j+1])?null:_[j+1].elm,x(g,W,_,F,j,S)):F>j&&M(b,P,$)}function C(g,b,_,S){for(var z=_;z-1?baseSetAttr(e,a,n):isBooleanAttr(a)?isFalsyAttrValue(n)?e.removeAttribute(a):(n=a==="allowfullscreen"&&e.tagName==="EMBED"?"true":a,e.setAttribute(a,n)):isEnumeratedAttr(a)?e.setAttribute(a,convertEnumeratedValue(a,n)):isXlink(a)?isFalsyAttrValue(n)?e.removeAttributeNS(xlinkNS,getXlinkProp(a)):e.setAttributeNS(xlinkNS,a,n):baseSetAttr(e,a,n)}function baseSetAttr(e,a,n){if(isFalsyAttrValue(n))e.removeAttribute(a);else{if(isIE&&!isIE9&&e.tagName==="TEXTAREA"&&a==="placeholder"&&n!==""&&!e.__ieph){var r=function(i){i.stopImmediatePropagation(),e.removeEventListener("input",r)};e.addEventListener("input",r),e.__ieph=!0}e.setAttribute(a,n)}}var attrs={create:updateAttrs,update:updateAttrs};function updateClass(e,a){var n=a.elm,r=a.data,i=e.data;if(isUndef(r.staticClass)&&isUndef(r.class)&&(isUndef(i)||isUndef(i.staticClass)&&isUndef(i.class)))return;var s=genClassForVnode(a),l=n._transitionClasses;isDef(l)&&(s=concat(s,stringifyClass(l))),s!==n._prevClass&&(n.setAttribute("class",s),n._prevClass=s)}var klass={create:updateClass,update:updateClass},validDivisionCharRE=/[\w).+\-_$\]]/;function parseFilters(e){var a=!1,n=!1,r=!1,i=!1,s=0,l=0,c=0,o=0,d,u,f,h,m;for(f=0;f=0&&!(y=e.charAt(v),y!==" ");v--);(!y||!validDivisionCharRE.test(y))&&(i=!0)}}h===void 0?h=e.slice(0,f).trim():o!==0&&k();function k(){(m||(m=[])).push(e.slice(o,f).trim()),o=f+1}if(m)for(f=0;f-1?{exp:e.slice(0,index$1),key:'"'+e.slice(index$1+1)+'"'}:{exp:e,key:null};for(str=e,index$1=expressionPos=expressionEndPos=0;!eof();)chr=next(),isStringStart(chr)?parseString(chr):chr===91&&parseBracket(chr);return{exp:e.slice(0,expressionPos),key:e.slice(expressionPos+1,expressionEndPos)}}function next(){return str.charCodeAt(++index$1)}function eof(){return index$1>=len}function isStringStart(e){return e===34||e===39}function parseBracket(e){var a=1;for(expressionPos=index$1;!eof();){if(e=next(),isStringStart(e)){parseString(e);continue}if(e===91&&a++,e===93&&a--,a===0){expressionEndPos=index$1;break}}}function parseString(e){for(var a=e;!eof()&&!(e=next(),e===a););}var RANGE_TOKEN="__r",CHECKBOX_RADIO_TOKEN="__c";function model(e,a,n){var r=a.value,i=a.modifiers,s=e.tag,l=e.attrsMap.type;if(e.component)return genComponentModel(e,r,i),!1;if(s==="select")genSelect(e,r,i);else if(s==="input"&&l==="checkbox")genCheckboxModel(e,r,i);else if(s==="input"&&l==="radio")genRadioModel(e,r,i);else if(s==="input"||s==="textarea")genDefaultModel(e,r,i);else if(!config.isReservedTag(s))return genComponentModel(e,r,i),!1;return!0}function genCheckboxModel(e,a,n){var r=n&&n.number,i=getBindingAttr(e,"value")||"null",s=getBindingAttr(e,"true-value")||"true",l=getBindingAttr(e,"false-value")||"false";addProp(e,"checked","Array.isArray("+a+")?_i("+a+","+i+")>-1"+(s==="true"?":("+a+")":":_q("+a+","+s+")")),addHandler(e,"change","var $$a="+a+",$$el=$event.target,$$c=$$el.checked?("+s+"):("+l+");if(Array.isArray($$a)){var $$v="+(r?"_n("+i+")":i)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+genAssignmentCode(a,"$$a.concat([$$v])")+")}else{$$i>-1&&("+genAssignmentCode(a,"$$a.slice(0,$$i).concat($$a.slice($$i+1))")+")}}else{"+genAssignmentCode(a,"$$c")+"}",null,!0)}function genRadioModel(e,a,n){var r=n&&n.number,i=getBindingAttr(e,"value")||"null";i=r?"_n("+i+")":i,addProp(e,"checked","_q("+a+","+i+")"),addHandler(e,"change",genAssignmentCode(a,i),null,!0)}function genSelect(e,a,n){var r=n&&n.number,i='Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return '+(r?"_n(val)":"val")+"})",s="$event.target.multiple ? $$selectedVal : $$selectedVal[0]",l="var $$selectedVal = "+i+";";l=l+" "+genAssignmentCode(a,s),addHandler(e,"change",l,null,!0)}function genDefaultModel(e,a,n){var r=e.attrsMap.type,i=n||{},s=i.lazy,l=i.number,c=i.trim,o=!s&&r!=="range",d=s?"change":r==="range"?RANGE_TOKEN:"input",u="$event.target.value";c&&(u="$event.target.value.trim()"),l&&(u="_n("+u+")");var f=genAssignmentCode(a,u);o&&(f="if($event.target.composing)return;"+f),addProp(e,"value","("+a+")"),addHandler(e,d,f,null,!0),(c||l)&&addHandler(e,"blur","$forceUpdate()")}function normalizeEvents(e){if(isDef(e[RANGE_TOKEN])){var a=isIE?"change":"input";e[a]=[].concat(e[RANGE_TOKEN],e[a]||[]),delete e[RANGE_TOKEN]}isDef(e[CHECKBOX_RADIO_TOKEN])&&(e.change=[].concat(e[CHECKBOX_RADIO_TOKEN],e.change||[]),delete e[CHECKBOX_RADIO_TOKEN])}var target$1;function createOnceHandler$1(e,a,n){var r=target$1;return function i(){var s=a.apply(null,arguments);s!==null&&remove$2(e,i,n,r)}}var useMicrotaskFix=isUsingMicroTask&&!(isFF&&Number(isFF[1])<=53);function add$1(e,a,n,r){if(useMicrotaskFix){var i=currentFlushTimestamp,s=a;a=s._wrapper=function(l){if(l.target===l.currentTarget||l.timeStamp>=i||l.timeStamp<=0||l.target.ownerDocument!==document)return s.apply(this,arguments)}}target$1.addEventListener(e,a,supportsPassive?{capture:n,passive:r}:n)}function remove$2(e,a,n,r){(r||target$1).removeEventListener(e,a._wrapper||a,n)}function updateDOMListeners(e,a){if(isUndef(e.data.on)&&isUndef(a.data.on))return;var n=a.data.on||{},r=e.data.on||{};target$1=a.elm,normalizeEvents(n),updateListeners(n,r,add$1,remove$2,createOnceHandler$1,a.context),target$1=void 0}var events={create:updateDOMListeners,update:updateDOMListeners},svgContainer;function updateDOMProps(e,a){if(isUndef(e.data.domProps)&&isUndef(a.data.domProps))return;var n,r,i=a.elm,s=e.data.domProps||{},l=a.data.domProps||{};isDef(l.__ob__)&&(l=a.data.domProps=extend({},l));for(n in s)n in l||(i[n]="");for(n in l){if(r=l[n],n==="textContent"||n==="innerHTML"){if(a.children&&(a.children.length=0),r===s[n])continue;i.childNodes.length===1&&i.removeChild(i.childNodes[0])}if(n==="value"&&i.tagName!=="PROGRESS"){i._value=r;var c=isUndef(r)?"":String(r);shouldUpdateValue(i,c)&&(i.value=c)}else if(n==="innerHTML"&&isSVG(i.tagName)&&isUndef(i.innerHTML)){svgContainer=svgContainer||document.createElement("div"),svgContainer.innerHTML=""+r+"";for(var o=svgContainer.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;o.firstChild;)i.appendChild(o.firstChild)}else if(r!==s[n])try{i[n]=r}catch(d){}}}function shouldUpdateValue(e,a){return!e.composing&&(e.tagName==="OPTION"||isNotInFocusAndDirty(e,a)||isDirtyWithModifiers(e,a))}function isNotInFocusAndDirty(e,a){var n=!0;try{n=document.activeElement!==e}catch(r){}return n&&e.value!==a}function isDirtyWithModifiers(e,a){var n=e.value,r=e._vModifiers;if(isDef(r)){if(r.number)return toNumber(n)!==toNumber(a);if(r.trim)return n.trim()!==a.trim()}return n!==a}var domProps={create:updateDOMProps,update:updateDOMProps},parseStyleText=cached(function(e){var a={},n=/;(?![^(]*\))/g,r=/:(.+)/;return e.split(n).forEach(function(i){if(i){var s=i.split(r);s.length>1&&(a[s[0].trim()]=s[1].trim())}}),a});function normalizeStyleData(e){var a=normalizeStyleBinding(e.style);return e.staticStyle?extend(e.staticStyle,a):a}function normalizeStyleBinding(e){return Array.isArray(e)?toObject(e):typeof e=="string"?parseStyleText(e):e}function getStyle(e,a){var n={},r;if(a)for(var i=e;i.componentInstance;)i=i.componentInstance._vnode,i&&i.data&&(r=normalizeStyleData(i.data))&&extend(n,r);(r=normalizeStyleData(e.data))&&extend(n,r);for(var s=e;s=s.parent;)s.data&&(r=normalizeStyleData(s.data))&&extend(n,r);return n}var cssVarRE=/^--/,importantRE=/\s*!important$/,setProp=function(e,a,n){if(cssVarRE.test(a))e.style.setProperty(a,n);else if(importantRE.test(n))e.style.setProperty(hyphenate(a),n.replace(importantRE,""),"important");else{var r=normalize(a);if(Array.isArray(n))for(var i=0,s=n.length;i-1?a.split(whitespaceRE).forEach(function(r){return e.classList.add(r)}):e.classList.add(a);else{var n=" "+(e.getAttribute("class")||"")+" ";n.indexOf(" "+a+" ")<0&&e.setAttribute("class",(n+a).trim())}}function removeClass(e,a){if(!a||!(a=a.trim()))return;if(e.classList)a.indexOf(" ")>-1?a.split(whitespaceRE).forEach(function(i){return e.classList.remove(i)}):e.classList.remove(a),e.classList.length||e.removeAttribute("class");else{for(var n=" "+(e.getAttribute("class")||"")+" ",r=" "+a+" ";n.indexOf(r)>=0;)n=n.replace(r," ");n=n.trim(),n?e.setAttribute("class",n):e.removeAttribute("class")}}function resolveTransition(e){if(!e)return;if(typeof e=="object"){var a={};return e.css!==!1&&extend(a,autoCssTransition(e.name||"v")),extend(a,e),a}else if(typeof e=="string")return autoCssTransition(e)}var autoCssTransition=cached(function(e){return{enterClass:e+"-enter",enterToClass:e+"-enter-to",enterActiveClass:e+"-enter-active",leaveClass:e+"-leave",leaveToClass:e+"-leave-to",leaveActiveClass:e+"-leave-active"}}),hasTransition=inBrowser&&!isIE9,TRANSITION="transition",ANIMATION="animation",transitionProp="transition",transitionEndEvent="transitionend",animationProp="animation",animationEndEvent="animationend";hasTransition&&(window.ontransitionend===void 0&&window.onwebkittransitionend!==void 0&&(transitionProp="WebkitTransition",transitionEndEvent="webkitTransitionEnd"),window.onanimationend===void 0&&window.onwebkitanimationend!==void 0&&(animationProp="WebkitAnimation",animationEndEvent="webkitAnimationEnd"));var raf=inBrowser?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(e){return e()};function nextFrame(e){raf(function(){raf(e)})}function addTransitionClass(e,a){var n=e._transitionClasses||(e._transitionClasses=[]);n.indexOf(a)<0&&(n.push(a),addClass(e,a))}function removeTransitionClass(e,a){e._transitionClasses&&remove(e._transitionClasses,a),removeClass(e,a)}function whenTransitionEnds(e,a,n){var r=getTransitionInfo(e,a),i=r.type,s=r.timeout,l=r.propCount;if(!i)return n();var c=i===TRANSITION?transitionEndEvent:animationEndEvent,o=0,d=function(){e.removeEventListener(c,u),n()},u=function(f){f.target===e&&(++o>=l&&d())};setTimeout(function(){o0&&(d=TRANSITION,u=s,f=i.length):a===ANIMATION?o>0&&(d=ANIMATION,u=o,f=c.length):(u=Math.max(s,o),d=u>0?s>o?TRANSITION:ANIMATION:null,f=d?d===TRANSITION?i.length:c.length:0);var h=d===TRANSITION&&transformRE.test(n[transitionProp+"Property"]);return{type:d,timeout:u,propCount:f,hasTransform:h}}function getTimeout(e,a){for(;e.length1}function _enter(e,a){a.data.show!==!0&&enter(a)}var transition=inBrowser?{create:_enter,activate:_enter,remove:function(a,n){a.data.show!==!0?leave(a,n):n()}}:{},platformModules=[attrs,klass,events,domProps,style,transition],modules=platformModules.concat(baseModules),patch=createPatchFunction({nodeOps,modules});isIE9&&document.addEventListener("selectionchange",function(){var e=document.activeElement;e&&e.vmodel&&trigger(e,"input")});var directive={inserted:function(a,n,r,i){r.tag==="select"?(i.elm&&!i.elm._vOptions?mergeVNodeHook(r,"postpatch",function(){directive.componentUpdated(a,n,r)}):setSelected(a,n,r.context),a._vOptions=[].map.call(a.options,getValue)):(r.tag==="textarea"||isTextInputType(a.type))&&(a._vModifiers=n.modifiers,n.modifiers.lazy||(a.addEventListener("compositionstart",onCompositionStart),a.addEventListener("compositionend",onCompositionEnd),a.addEventListener("change",onCompositionEnd),isIE9&&(a.vmodel=!0)))},componentUpdated:function(a,n,r){if(r.tag==="select"){setSelected(a,n,r.context);var i=a._vOptions,s=a._vOptions=[].map.call(a.options,getValue);if(s.some(function(c,o){return!looseEqual(c,i[o])})){var l=a.multiple?n.value.some(function(c){return hasNoMatchingOption(c,s)}):n.value!==n.oldValue&&hasNoMatchingOption(n.value,s);l&&trigger(a,"change")}}}};function setSelected(e,a,n){actuallySetSelected(e,a),(isIE||isEdge)&&setTimeout(function(){actuallySetSelected(e,a)},0)}function actuallySetSelected(e,a,n){var r=a.value,i=e.multiple;if(i&&!Array.isArray(r))return;for(var s,l,c=0,o=e.options.length;c-1,l.selected!==s&&(l.selected=s);else if(looseEqual(getValue(l),r)){e.selectedIndex!==c&&(e.selectedIndex=c);return}i||(e.selectedIndex=-1)}function hasNoMatchingOption(e,a){return a.every(function(n){return!looseEqual(n,e)})}function getValue(e){return"_value"in e?e._value:e.value}function onCompositionStart(e){e.target.composing=!0}function onCompositionEnd(e){if(!e.target.composing)return;e.target.composing=!1,trigger(e.target,"input")}function trigger(e,a){var n=document.createEvent("HTMLEvents");n.initEvent(a,!0,!0),e.dispatchEvent(n)}function locateNode(e){return e.componentInstance&&(!e.data||!e.data.transition)?locateNode(e.componentInstance._vnode):e}var show={bind:function(a,n,r){var i=n.value;r=locateNode(r);var s=r.data&&r.data.transition,l=a.__vOriginalDisplay=a.style.display==="none"?"":a.style.display;i&&s?(r.data.show=!0,enter(r,function(){a.style.display=l})):a.style.display=i?l:"none"},update:function(a,n,r){var i=n.value,s=n.oldValue;if(!i===!s)return;r=locateNode(r);var l=r.data&&r.data.transition;l?(r.data.show=!0,i?enter(r,function(){a.style.display=a.__vOriginalDisplay}):leave(r,function(){a.style.display="none"})):a.style.display=i?a.__vOriginalDisplay:"none"},unbind:function(a,n,r,i,s){s||(a.style.display=a.__vOriginalDisplay)}},platformDirectives={model:directive,show},transitionProps={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function getRealChild(e){var a=e&&e.componentOptions;return a&&a.Ctor.options.abstract?getRealChild(getFirstComponentChild(a.children)):e}function extractTransitionData(e){var a={},n=e.$options;for(var r in n.propsData)a[r]=e[r];var i=n._parentListeners;for(var s in i)a[camelize(s)]=i[s];return a}function placeholder(e,a){if(/\d-keep-alive$/.test(a.tag))return e("keep-alive",{props:a.componentOptions.propsData})}function hasParentTransition(e){for(;e=e.parent;)if(e.data.transition)return!0}function isSameChild(e,a){return a.key===e.key&&a.tag===e.tag}var isNotTextNode=function(e){return e.tag||isAsyncPlaceholder(e)},isVShowDirective=function(e){return e.name==="show"},Transition={name:"transition",props:transitionProps,abstract:!0,render:function(a){var n=this,r=this.$slots.default;if(!r)return;if(r=r.filter(isNotTextNode),!r.length)return;var i=this.mode,s=r[0];if(hasParentTransition(this.$vnode))return s;var l=getRealChild(s);if(!l)return s;if(this._leaving)return placeholder(a,s);var c="__transition-"+this._uid+"-";l.key=l.key==null?l.isComment?c+"comment":c+l.tag:isPrimitive(l.key)?String(l.key).indexOf(c)===0?l.key:c+l.key:l.key;var o=(l.data||(l.data={})).transition=extractTransitionData(this),d=this._vnode,u=getRealChild(d);if(l.data.directives&&l.data.directives.some(isVShowDirective)&&(l.data.show=!0),u&&u.data&&!isSameChild(l,u)&&!isAsyncPlaceholder(u)&&!(u.componentInstance&&u.componentInstance._vnode.isComment)){var f=u.data.transition=extend({},o);if(i==="out-in")return this._leaving=!0,mergeVNodeHook(f,"afterLeave",function(){n._leaving=!1,n.$forceUpdate()}),placeholder(a,s);if(i==="in-out"){if(isAsyncPlaceholder(l))return d;var h,m=function(){h()};mergeVNodeHook(o,"afterEnter",m),mergeVNodeHook(o,"enterCancelled",m),mergeVNodeHook(f,"delayLeave",function(v){h=v})}}return s}},props=extend({tag:String,moveClass:String},transitionProps);delete props.mode;var TransitionGroup={props,beforeMount:function(){var a=this,n=this._update;this._update=function(r,i){var s=setActiveInstance(a);a.__patch__(a._vnode,a.kept,!1,!0),a._vnode=a.kept,s(),n.call(a,r,i)}},render:function(a){for(var n=this.tag||this.$vnode.data.tag||"span",r=Object.create(null),i=this.prevChildren=this.children,s=this.$slots.default||[],l=this.children=[],c=extractTransitionData(this),o=0;os&&(i.push(o=e.slice(s,c)),r.push(JSON.stringify(o)));var d=parseFilters(l[1].trim());r.push("_s("+d+")"),i.push({"@binding":d}),s=c+l[0].length}return s\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,dynamicArgAttribute=/^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,ncname="[a-zA-Z_][\\-\\.0-9_a-zA-Z"+unicodeRegExp.source+"]*",qnameCapture="((?:"+ncname+"\\:)?"+ncname+")",startTagOpen=new RegExp("^<"+qnameCapture),startTagClose=/^\s*(\/?)>/,endTag=new RegExp("^<\\/"+qnameCapture+"[^>]*>"),doctype=/^]+>/i,comment=/^",""":'"',"&":"&"," ":` + */var emptyObject=Object.freeze({});function isUndef(e){return e==null}function isDef(e){return e!=null}function isTrue(e){return e===!0}function isFalse(e){return e===!1}function isPrimitive(e){return typeof e=="string"||typeof e=="number"||typeof e=="symbol"||typeof e=="boolean"}function isObject(e){return e!==null&&typeof e=="object"}var _toString=Object.prototype.toString;function toRawType(e){return _toString.call(e).slice(8,-1)}function isPlainObject(e){return _toString.call(e)==="[object Object]"}function isRegExp(e){return _toString.call(e)==="[object RegExp]"}function isValidArrayIndex(e){var a=parseFloat(String(e));return a>=0&&Math.floor(a)===a&&isFinite(e)}function isPromise(e){return isDef(e)&&typeof e.then=="function"&&typeof e.catch=="function"}function toString(e){return e==null?"":Array.isArray(e)||isPlainObject(e)&&e.toString===_toString?JSON.stringify(e,null,2):String(e)}function toNumber(e){var a=parseFloat(e);return isNaN(a)?e:a}function makeMap(e,a){for(var n=Object.create(null),r=e.split(","),i=0;i-1)return e.splice(n,1)}}var hasOwnProperty=Object.prototype.hasOwnProperty;function hasOwn(e,a){return hasOwnProperty.call(e,a)}function cached(e){var a=Object.create(null);return function(r){var i=a[r];return i||(a[r]=e(r))}}var camelizeRE=/-(\w)/g,camelize=cached(function(e){return e.replace(camelizeRE,function(a,n){return n?n.toUpperCase():""})}),capitalize=cached(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}),hyphenateRE=/\B([A-Z])/g,hyphenate=cached(function(e){return e.replace(hyphenateRE,"-$1").toLowerCase()});function polyfillBind(e,a){function n(r){var i=arguments.length;return i?i>1?e.apply(a,arguments):e.call(a,r):e.call(a)}return n._length=e.length,n}function nativeBind(e,a){return e.bind(a)}var bind=Function.prototype.bind?nativeBind:polyfillBind;function toArray(e,a){a=a||0;for(var n=e.length-a,r=new Array(n);n--;)r[n]=e[n+a];return r}function extend(e,a){for(var n in a)e[n]=a[n];return e}function toObject(e){for(var a={},n=0;n0,isEdge=UA&&UA.indexOf("edge/")>0,isAndroid=UA&&UA.indexOf("android")>0||weexPlatform==="android",isIOS=UA&&/iphone|ipad|ipod|ios/.test(UA)||weexPlatform==="ios",isChrome=UA&&/chrome\/\d+/.test(UA)&&!isEdge,isPhantomJS=UA&&/phantomjs/.test(UA),isFF=UA&&UA.match(/firefox\/(\d+)/),nativeWatch={}.watch,supportsPassive=!1;if(inBrowser)try{var opts={};Object.defineProperty(opts,"passive",{get:function(){supportsPassive=!0}}),window.addEventListener("test-passive",null,opts)}catch(e){}var _isServer,isServerRendering=function(){return _isServer===void 0&&(!inBrowser&&!inWeex&&typeof global!="undefined"?_isServer=global.process&&global.process.env.VUE_ENV==="server":_isServer=!1),_isServer},devtools=inBrowser&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function isNative(e){return typeof e=="function"&&/native code/.test(e.toString())}var hasSymbol=typeof Symbol!="undefined"&&isNative(Symbol)&&typeof Reflect!="undefined"&&isNative(Reflect.ownKeys),_Set;typeof Set!="undefined"&&isNative(Set)?_Set=Set:_Set=function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(n){return this.set[n]===!0},e.prototype.add=function(n){this.set[n]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var warn=noop,uid=0,Dep=function(){this.id=uid++,this.subs=[]};Dep.prototype.addSub=function(a){this.subs.push(a)},Dep.prototype.removeSub=function(a){remove(this.subs,a)},Dep.prototype.depend=function(){Dep.target&&Dep.target.addDep(this)},Dep.prototype.notify=function(){for(var a=this.subs.slice(),n=0,r=a.length;n-1){if(s&&!hasOwn(i,"default"))l=!1;else if(l===""||l===hyphenate(e)){var o=getTypeIndex(String,i.type);(o<0||c0&&(i=normalizeArrayChildren(i,(a||"")+"_"+r),isTextNode(i[0])&&isTextNode(l)&&(n[s]=createTextVNode(l.text+i[0].text),i.shift()),n.push.apply(n,i)):isPrimitive(i)?isTextNode(l)?n[s]=createTextVNode(l.text+i):i!==""&&n.push(createTextVNode(i)):isTextNode(i)&&isTextNode(l)?n[s]=createTextVNode(l.text+i.text):(isTrue(e._isVList)&&isDef(i.tag)&&isUndef(i.key)&&isDef(a)&&(i.key="__vlist"+a+"_"+r+"__"),n.push(i))}return n}function initProvide(e){var a=e.$options.provide;a&&(e._provided=typeof a=="function"?a.call(e):a)}function initInjections(e){var a=resolveInject(e.$options.inject,e);a&&(toggleObserving(!1),Object.keys(a).forEach(function(n){defineReactive$$1(e,n,a[n])}),toggleObserving(!0))}function resolveInject(e,a){if(e){for(var n=Object.create(null),r=hasSymbol?Reflect.ownKeys(e):Object.keys(e),i=0;i0,s=e?!!e.$stable:!i,l=e&&e.$key;if(!e)r={};else{if(e._normalized)return e._normalized;if(s&&n&&n!==emptyObject&&l===n.$key&&!i&&!n.$hasNormal)return n;r={};for(var c in e)e[c]&&c[0]!=="$"&&(r[c]=normalizeScopedSlot(a,c,e[c]))}for(var o in a)o in r||(r[o]=proxyNormalSlot(a,o));return e&&Object.isExtensible(e)&&(e._normalized=r),def(r,"$stable",s),def(r,"$key",l),def(r,"$hasNormal",i),r}function normalizeScopedSlot(e,a,n){var r=function(){var i=arguments.length?n.apply(null,arguments):n({});return i=i&&typeof i=="object"&&!Array.isArray(i)?[i]:normalizeChildren(i),i&&(i.length===0||i.length===1&&i[0].isComment)?void 0:i};return n.proxy&&Object.defineProperty(e,a,{get:r,enumerable:!0,configurable:!0}),r}function proxyNormalSlot(e,a){return function(){return e[a]}}function renderList(e,a){var n,r,i,s,l;if(Array.isArray(e)||typeof e=="string")for(n=new Array(e.length),r=0,i=e.length;r1?toArray(i):i;for(var s=toArray(arguments,1),l='event handler for "'+n+'"',c=0,o=i.length;cdocument.createEvent("Event").timeStamp&&(getNow=function(){return performance.now()})}function flushSchedulerQueue(){currentFlushTimestamp=getNow(),flushing=!0;var e,a;for(queue.sort(function(i,s){return i.id-s.id}),index=0;indexindex&&queue[n].id>e.id;)n--;queue.splice(n+1,0,e)}waiting||(waiting=!0,nextTick(flushSchedulerQueue))}}var uid$2=0,Watcher=function(a,n,r,i,s){this.vm=a,s&&(a._watcher=this),a._watchers.push(this),i?(this.deep=!!i.deep,this.user=!!i.user,this.lazy=!!i.lazy,this.sync=!!i.sync,this.before=i.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=r,this.id=++uid$2,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new _Set,this.newDepIds=new _Set,this.expression="",typeof n=="function"?this.getter=n:(this.getter=parsePath(n),this.getter||(this.getter=noop)),this.value=this.lazy?void 0:this.get()};Watcher.prototype.get=function(){pushTarget(this);var a,n=this.vm;try{a=this.getter.call(n,n)}catch(r){if(this.user)handleError(r,n,'getter for watcher "'+this.expression+'"');else throw r}finally{this.deep&&traverse(a),popTarget(),this.cleanupDeps()}return a},Watcher.prototype.addDep=function(a){var n=a.id;this.newDepIds.has(n)||(this.newDepIds.add(n),this.newDeps.push(a),this.depIds.has(n)||a.addSub(this))},Watcher.prototype.cleanupDeps=function(){for(var a=this.deps.length;a--;){var n=this.deps[a];this.newDepIds.has(n.id)||n.removeSub(this)}var r=this.depIds;this.depIds=this.newDepIds,this.newDepIds=r,this.newDepIds.clear(),r=this.deps,this.deps=this.newDeps,this.newDeps=r,this.newDeps.length=0},Watcher.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():queueWatcher(this)},Watcher.prototype.run=function(){if(this.active){var a=this.get();if(a!==this.value||isObject(a)||this.deep){var n=this.value;if(this.value=a,this.user)try{this.cb.call(this.vm,a,n)}catch(r){handleError(r,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,a,n)}}},Watcher.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},Watcher.prototype.depend=function(){for(var a=this.deps.length;a--;)this.deps[a].depend()},Watcher.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||remove(this.vm._watchers,this);for(var a=this.deps.length;a--;)this.deps[a].removeSub(this);this.active=!1}};var sharedPropertyDefinition={enumerable:!0,configurable:!0,get:noop,set:noop};function proxy(e,a,n){sharedPropertyDefinition.get=function(){return this[a][n]},sharedPropertyDefinition.set=function(i){this[a][n]=i},Object.defineProperty(e,n,sharedPropertyDefinition)}function initState(e){e._watchers=[];var a=e.$options;a.props&&initProps(e,a.props),a.methods&&initMethods(e,a.methods),a.data?initData(e):observe(e._data={},!0),a.computed&&initComputed(e,a.computed),a.watch&&a.watch!==nativeWatch&&initWatch(e,a.watch)}function initProps(e,a){var n=e.$options.propsData||{},r=e._props={},i=e.$options._propKeys=[],s=!e.$parent;s||toggleObserving(!1);var l=function(o){i.push(o);var d=validateProp(o,a,n,e);defineReactive$$1(r,o,d),o in e||proxy(e,"_props",o)};for(var c in a)l(c);toggleObserving(!0)}function initData(e){var a=e.$options.data;a=e._data=typeof a=="function"?getData(a,e):a||{},isPlainObject(a)||(a={});for(var n=Object.keys(a),r=e.$options.props,i=e.$options.methods,s=n.length;s--;){var l=n[s];r&&hasOwn(r,l)||(isReserved(l)||proxy(e,"_data",l))}observe(a,!0)}function getData(e,a){pushTarget();try{return e.call(a,a)}catch(n){return handleError(n,a,"data()"),{}}finally{popTarget()}}var computedWatcherOptions={lazy:!0};function initComputed(e,a){var n=e._computedWatchers=Object.create(null),r=isServerRendering();for(var i in a){var s=a[i],l=typeof s=="function"?s:s.get;r||(n[i]=new Watcher(e,l||noop,noop,computedWatcherOptions)),i in e||defineComputed(e,i,s)}}function defineComputed(e,a,n){var r=!isServerRendering();typeof n=="function"?(sharedPropertyDefinition.get=r?createComputedGetter(a):createGetterInvoker(n),sharedPropertyDefinition.set=noop):(sharedPropertyDefinition.get=n.get?r&&n.cache!==!1?createComputedGetter(a):createGetterInvoker(n.get):noop,sharedPropertyDefinition.set=n.set||noop),Object.defineProperty(e,a,sharedPropertyDefinition)}function createComputedGetter(e){return function(){var n=this._computedWatchers&&this._computedWatchers[e];if(n)return n.dirty&&n.evaluate(),Dep.target&&n.depend(),n.value}}function createGetterInvoker(e){return function(){return e.call(this,this)}}function initMethods(e,a){var n=e.$options.props;for(var r in a)e[r]=typeof a[r]!="function"?noop:bind(a[r],e)}function initWatch(e,a){for(var n in a){var r=a[n];if(Array.isArray(r))for(var i=0;i-1)return this;var r=toArray(arguments,1);return r.unshift(this),typeof a.install=="function"?a.install.apply(a,r):typeof a=="function"&&a.apply(null,r),n.push(a),this}}function initMixin$1(e){e.mixin=function(a){return this.options=mergeOptions(this.options,a),this}}function initExtend(e){e.cid=0;var a=1;e.extend=function(n){n=n||{};var r=this,i=r.cid,s=n._Ctor||(n._Ctor={});if(s[i])return s[i];var l=n.name||r.options.name,c=function(d){this._init(d)};return c.prototype=Object.create(r.prototype),c.prototype.constructor=c,c.cid=a++,c.options=mergeOptions(r.options,n),c.super=r,c.options.props&&initProps$1(c),c.options.computed&&initComputed$1(c),c.extend=r.extend,c.mixin=r.mixin,c.use=r.use,ASSET_TYPES.forEach(function(o){c[o]=r[o]}),l&&(c.options.components[l]=c),c.superOptions=r.options,c.extendOptions=n,c.sealedOptions=extend({},c.options),s[i]=c,c}}function initProps$1(e){var a=e.options.props;for(var n in a)proxy(e.prototype,"_props",n)}function initComputed$1(e){var a=e.options.computed;for(var n in a)defineComputed(e.prototype,n,a[n])}function initAssetRegisters(e){ASSET_TYPES.forEach(function(a){e[a]=function(n,r){return r?(a==="component"&&isPlainObject(r)&&(r.name=r.name||n,r=this.options._base.extend(r)),a==="directive"&&typeof r=="function"&&(r={bind:r,update:r}),this.options[a+"s"][n]=r,r):this.options[a+"s"][n]}})}function getComponentName(e){return e&&(e.Ctor.options.name||e.tag)}function matches(e,a){return Array.isArray(e)?e.indexOf(a)>-1:typeof e=="string"?e.split(",").indexOf(a)>-1:isRegExp(e)?e.test(a):!1}function pruneCache(e,a){var n=e.cache,r=e.keys,i=e._vnode;for(var s in n){var l=n[s];if(l){var c=getComponentName(l.componentOptions);c&&!a(c)&&pruneCacheEntry(n,s,r,i)}}}function pruneCacheEntry(e,a,n,r){var i=e[a];i&&(!r||i.tag!==r.tag)&&i.componentInstance.$destroy(),e[a]=null,remove(n,a)}var patternTypes=[String,RegExp,Array],KeepAlive={name:"keep-alive",abstract:!0,props:{include:patternTypes,exclude:patternTypes,max:[String,Number]},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var a in this.cache)pruneCacheEntry(this.cache,a,this.keys)},mounted:function(){var a=this;this.$watch("include",function(n){pruneCache(a,function(r){return matches(n,r)})}),this.$watch("exclude",function(n){pruneCache(a,function(r){return!matches(n,r)})})},render:function(){var a=this.$slots.default,n=getFirstComponentChild(a),r=n&&n.componentOptions;if(r){var i=getComponentName(r),s=this,l=s.include,c=s.exclude;if(l&&(!i||!matches(l,i))||c&&i&&matches(c,i))return n;var o=this,d=o.cache,u=o.keys,f=n.key==null?r.Ctor.cid+(r.tag?"::"+r.tag:""):n.key;d[f]?(n.componentInstance=d[f].componentInstance,remove(u,f),u.push(f)):(d[f]=n,u.push(f),this.max&&u.length>parseInt(this.max)&&pruneCacheEntry(d,u[0],u,this._vnode)),n.data.keepAlive=!0}return n||a&&a[0]}},builtInComponents={KeepAlive};function initGlobalAPI(e){var a={};a.get=function(){return config},Object.defineProperty(e,"config",a),e.util={warn,extend,mergeOptions,defineReactive:defineReactive$$1},e.set=set,e.delete=del,e.nextTick=nextTick,e.observable=function(n){return observe(n),n},e.options=Object.create(null),ASSET_TYPES.forEach(function(n){e.options[n+"s"]=Object.create(null)}),e.options._base=e,extend(e.options.components,builtInComponents),initUse(e),initMixin$1(e),initExtend(e),initAssetRegisters(e)}initGlobalAPI(Vue),Object.defineProperty(Vue.prototype,"$isServer",{get:isServerRendering}),Object.defineProperty(Vue.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Vue,"FunctionalRenderContext",{value:FunctionalRenderContext}),Vue.version="2.6.12";var isReservedAttr=makeMap("style,class"),acceptValue=makeMap("input,textarea,option,select,progress"),mustUseProp=function(e,a,n){return n==="value"&&acceptValue(e)&&a!=="button"||n==="selected"&&e==="option"||n==="checked"&&e==="input"||n==="muted"&&e==="video"},isEnumeratedAttr=makeMap("contenteditable,draggable,spellcheck"),isValidContentEditableValue=makeMap("events,caret,typing,plaintext-only"),convertEnumeratedValue=function(e,a){return isFalsyAttrValue(a)||a==="false"?"false":e==="contenteditable"&&isValidContentEditableValue(a)?a:"true"},isBooleanAttr=makeMap("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),xlinkNS="http://www.w3.org/1999/xlink",isXlink=function(e){return e.charAt(5)===":"&&e.slice(0,5)==="xlink"},getXlinkProp=function(e){return isXlink(e)?e.slice(6,e.length):""},isFalsyAttrValue=function(e){return e==null||e===!1};function genClassForVnode(e){for(var a=e.data,n=e,r=e;isDef(r.componentInstance);)r=r.componentInstance._vnode,r&&r.data&&(a=mergeClassData(r.data,a));for(;isDef(n=n.parent);)n&&n.data&&(a=mergeClassData(a,n.data));return renderClass(a.staticClass,a.class)}function mergeClassData(e,a){return{staticClass:concat(e.staticClass,a.staticClass),class:isDef(e.class)?[e.class,a.class]:a.class}}function renderClass(e,a){return isDef(e)||isDef(a)?concat(e,stringifyClass(a)):""}function concat(e,a){return e?a?e+" "+a:e:a||""}function stringifyClass(e){return Array.isArray(e)?stringifyArray(e):isObject(e)?stringifyObject(e):typeof e=="string"?e:""}function stringifyArray(e){for(var a="",n,r=0,i=e.length;r-1?unknownElementCache[e]=a.constructor===window.HTMLUnknownElement||a.constructor===window.HTMLElement:unknownElementCache[e]=/HTMLUnknownElement/.test(a.toString())}var isTextInputType=makeMap("text,number,password,search,email,tel,url");function query(e){if(typeof e=="string"){var a=document.querySelector(e);return a||document.createElement("div")}else return e}function createElement$1(e,a){var n=document.createElement(e);return e!=="select"||a.data&&a.data.attrs&&a.data.attrs.multiple!==void 0&&n.setAttribute("multiple","multiple"),n}function createElementNS(e,a){return document.createElementNS(namespaceMap[e],a)}function createTextNode(e){return document.createTextNode(e)}function createComment(e){return document.createComment(e)}function insertBefore(e,a,n){e.insertBefore(a,n)}function removeChild(e,a){e.removeChild(a)}function appendChild(e,a){e.appendChild(a)}function parentNode(e){return e.parentNode}function nextSibling(e){return e.nextSibling}function tagName(e){return e.tagName}function setTextContent(e,a){e.textContent=a}function setStyleScope(e,a){e.setAttribute(a,"")}var nodeOps=Object.freeze({createElement:createElement$1,createElementNS,createTextNode,createComment,insertBefore,removeChild,appendChild,parentNode,nextSibling,tagName,setTextContent,setStyleScope}),ref={create:function(a,n){registerRef(n)},update:function(a,n){a.data.ref!==n.data.ref&&(registerRef(a,!0),registerRef(n))},destroy:function(a){registerRef(a,!0)}};function registerRef(e,a){var n=e.data.ref;if(!isDef(n))return;var r=e.context,i=e.componentInstance||e.elm,s=r.$refs;a?Array.isArray(s[n])?remove(s[n],i):s[n]===i&&(s[n]=void 0):e.data.refInFor?Array.isArray(s[n])?s[n].indexOf(i)<0&&s[n].push(i):s[n]=[i]:s[n]=i}var emptyNode=new VNode("",{},[]),hooks=["create","activate","update","remove","destroy"];function sameVnode(e,a){return e.key===a.key&&(e.tag===a.tag&&e.isComment===a.isComment&&isDef(e.data)===isDef(a.data)&&sameInputType(e,a)||isTrue(e.isAsyncPlaceholder)&&e.asyncFactory===a.asyncFactory&&isUndef(a.asyncFactory.error))}function sameInputType(e,a){if(e.tag!=="input")return!0;var n,r=isDef(n=e.data)&&isDef(n=n.attrs)&&n.type,i=isDef(n=a.data)&&isDef(n=n.attrs)&&n.type;return r===i||isTextInputType(r)&&isTextInputType(i)}function createKeyToOldIdx(e,a,n){var r,i,s={};for(r=a;r<=n;++r)i=e[r].key,isDef(i)&&(s[i]=r);return s}function createPatchFunction(e){var a,n,r={},i=e.modules,s=e.nodeOps;for(a=0;aF?(W=isUndef(_[j+1])?null:_[j+1].elm,x(g,W,_,$,j,S)):$>j&&M(b,P,F)}function C(g,b,_,S){for(var z=_;z-1?baseSetAttr(e,a,n):isBooleanAttr(a)?isFalsyAttrValue(n)?e.removeAttribute(a):(n=a==="allowfullscreen"&&e.tagName==="EMBED"?"true":a,e.setAttribute(a,n)):isEnumeratedAttr(a)?e.setAttribute(a,convertEnumeratedValue(a,n)):isXlink(a)?isFalsyAttrValue(n)?e.removeAttributeNS(xlinkNS,getXlinkProp(a)):e.setAttributeNS(xlinkNS,a,n):baseSetAttr(e,a,n)}function baseSetAttr(e,a,n){if(isFalsyAttrValue(n))e.removeAttribute(a);else{if(isIE&&!isIE9&&e.tagName==="TEXTAREA"&&a==="placeholder"&&n!==""&&!e.__ieph){var r=function(i){i.stopImmediatePropagation(),e.removeEventListener("input",r)};e.addEventListener("input",r),e.__ieph=!0}e.setAttribute(a,n)}}var attrs={create:updateAttrs,update:updateAttrs};function updateClass(e,a){var n=a.elm,r=a.data,i=e.data;if(isUndef(r.staticClass)&&isUndef(r.class)&&(isUndef(i)||isUndef(i.staticClass)&&isUndef(i.class)))return;var s=genClassForVnode(a),l=n._transitionClasses;isDef(l)&&(s=concat(s,stringifyClass(l))),s!==n._prevClass&&(n.setAttribute("class",s),n._prevClass=s)}var klass={create:updateClass,update:updateClass},validDivisionCharRE=/[\w).+\-_$\]]/;function parseFilters(e){var a=!1,n=!1,r=!1,i=!1,s=0,l=0,c=0,o=0,d,u,f,h,m;for(f=0;f=0&&!(y=e.charAt(v),y!==" ");v--);(!y||!validDivisionCharRE.test(y))&&(i=!0)}}h===void 0?h=e.slice(0,f).trim():o!==0&&k();function k(){(m||(m=[])).push(e.slice(o,f).trim()),o=f+1}if(m)for(f=0;f-1?{exp:e.slice(0,index$1),key:'"'+e.slice(index$1+1)+'"'}:{exp:e,key:null};for(str=e,index$1=expressionPos=expressionEndPos=0;!eof();)chr=next(),isStringStart(chr)?parseString(chr):chr===91&&parseBracket(chr);return{exp:e.slice(0,expressionPos),key:e.slice(expressionPos+1,expressionEndPos)}}function next(){return str.charCodeAt(++index$1)}function eof(){return index$1>=len}function isStringStart(e){return e===34||e===39}function parseBracket(e){var a=1;for(expressionPos=index$1;!eof();){if(e=next(),isStringStart(e)){parseString(e);continue}if(e===91&&a++,e===93&&a--,a===0){expressionEndPos=index$1;break}}}function parseString(e){for(var a=e;!eof()&&!(e=next(),e===a););}var RANGE_TOKEN="__r",CHECKBOX_RADIO_TOKEN="__c";function model(e,a,n){var r=a.value,i=a.modifiers,s=e.tag,l=e.attrsMap.type;if(e.component)return genComponentModel(e,r,i),!1;if(s==="select")genSelect(e,r,i);else if(s==="input"&&l==="checkbox")genCheckboxModel(e,r,i);else if(s==="input"&&l==="radio")genRadioModel(e,r,i);else if(s==="input"||s==="textarea")genDefaultModel(e,r,i);else if(!config.isReservedTag(s))return genComponentModel(e,r,i),!1;return!0}function genCheckboxModel(e,a,n){var r=n&&n.number,i=getBindingAttr(e,"value")||"null",s=getBindingAttr(e,"true-value")||"true",l=getBindingAttr(e,"false-value")||"false";addProp(e,"checked","Array.isArray("+a+")?_i("+a+","+i+")>-1"+(s==="true"?":("+a+")":":_q("+a+","+s+")")),addHandler(e,"change","var $$a="+a+",$$el=$event.target,$$c=$$el.checked?("+s+"):("+l+");if(Array.isArray($$a)){var $$v="+(r?"_n("+i+")":i)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+genAssignmentCode(a,"$$a.concat([$$v])")+")}else{$$i>-1&&("+genAssignmentCode(a,"$$a.slice(0,$$i).concat($$a.slice($$i+1))")+")}}else{"+genAssignmentCode(a,"$$c")+"}",null,!0)}function genRadioModel(e,a,n){var r=n&&n.number,i=getBindingAttr(e,"value")||"null";i=r?"_n("+i+")":i,addProp(e,"checked","_q("+a+","+i+")"),addHandler(e,"change",genAssignmentCode(a,i),null,!0)}function genSelect(e,a,n){var r=n&&n.number,i='Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return '+(r?"_n(val)":"val")+"})",s="$event.target.multiple ? $$selectedVal : $$selectedVal[0]",l="var $$selectedVal = "+i+";";l=l+" "+genAssignmentCode(a,s),addHandler(e,"change",l,null,!0)}function genDefaultModel(e,a,n){var r=e.attrsMap.type,i=n||{},s=i.lazy,l=i.number,c=i.trim,o=!s&&r!=="range",d=s?"change":r==="range"?RANGE_TOKEN:"input",u="$event.target.value";c&&(u="$event.target.value.trim()"),l&&(u="_n("+u+")");var f=genAssignmentCode(a,u);o&&(f="if($event.target.composing)return;"+f),addProp(e,"value","("+a+")"),addHandler(e,d,f,null,!0),(c||l)&&addHandler(e,"blur","$forceUpdate()")}function normalizeEvents(e){if(isDef(e[RANGE_TOKEN])){var a=isIE?"change":"input";e[a]=[].concat(e[RANGE_TOKEN],e[a]||[]),delete e[RANGE_TOKEN]}isDef(e[CHECKBOX_RADIO_TOKEN])&&(e.change=[].concat(e[CHECKBOX_RADIO_TOKEN],e.change||[]),delete e[CHECKBOX_RADIO_TOKEN])}var target$1;function createOnceHandler$1(e,a,n){var r=target$1;return function i(){var s=a.apply(null,arguments);s!==null&&remove$2(e,i,n,r)}}var useMicrotaskFix=isUsingMicroTask&&!(isFF&&Number(isFF[1])<=53);function add$1(e,a,n,r){if(useMicrotaskFix){var i=currentFlushTimestamp,s=a;a=s._wrapper=function(l){if(l.target===l.currentTarget||l.timeStamp>=i||l.timeStamp<=0||l.target.ownerDocument!==document)return s.apply(this,arguments)}}target$1.addEventListener(e,a,supportsPassive?{capture:n,passive:r}:n)}function remove$2(e,a,n,r){(r||target$1).removeEventListener(e,a._wrapper||a,n)}function updateDOMListeners(e,a){if(isUndef(e.data.on)&&isUndef(a.data.on))return;var n=a.data.on||{},r=e.data.on||{};target$1=a.elm,normalizeEvents(n),updateListeners(n,r,add$1,remove$2,createOnceHandler$1,a.context),target$1=void 0}var events={create:updateDOMListeners,update:updateDOMListeners},svgContainer;function updateDOMProps(e,a){if(isUndef(e.data.domProps)&&isUndef(a.data.domProps))return;var n,r,i=a.elm,s=e.data.domProps||{},l=a.data.domProps||{};isDef(l.__ob__)&&(l=a.data.domProps=extend({},l));for(n in s)n in l||(i[n]="");for(n in l){if(r=l[n],n==="textContent"||n==="innerHTML"){if(a.children&&(a.children.length=0),r===s[n])continue;i.childNodes.length===1&&i.removeChild(i.childNodes[0])}if(n==="value"&&i.tagName!=="PROGRESS"){i._value=r;var c=isUndef(r)?"":String(r);shouldUpdateValue(i,c)&&(i.value=c)}else if(n==="innerHTML"&&isSVG(i.tagName)&&isUndef(i.innerHTML)){svgContainer=svgContainer||document.createElement("div"),svgContainer.innerHTML=""+r+"";for(var o=svgContainer.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;o.firstChild;)i.appendChild(o.firstChild)}else if(r!==s[n])try{i[n]=r}catch(d){}}}function shouldUpdateValue(e,a){return!e.composing&&(e.tagName==="OPTION"||isNotInFocusAndDirty(e,a)||isDirtyWithModifiers(e,a))}function isNotInFocusAndDirty(e,a){var n=!0;try{n=document.activeElement!==e}catch(r){}return n&&e.value!==a}function isDirtyWithModifiers(e,a){var n=e.value,r=e._vModifiers;if(isDef(r)){if(r.number)return toNumber(n)!==toNumber(a);if(r.trim)return n.trim()!==a.trim()}return n!==a}var domProps={create:updateDOMProps,update:updateDOMProps},parseStyleText=cached(function(e){var a={},n=/;(?![^(]*\))/g,r=/:(.+)/;return e.split(n).forEach(function(i){if(i){var s=i.split(r);s.length>1&&(a[s[0].trim()]=s[1].trim())}}),a});function normalizeStyleData(e){var a=normalizeStyleBinding(e.style);return e.staticStyle?extend(e.staticStyle,a):a}function normalizeStyleBinding(e){return Array.isArray(e)?toObject(e):typeof e=="string"?parseStyleText(e):e}function getStyle(e,a){var n={},r;if(a)for(var i=e;i.componentInstance;)i=i.componentInstance._vnode,i&&i.data&&(r=normalizeStyleData(i.data))&&extend(n,r);(r=normalizeStyleData(e.data))&&extend(n,r);for(var s=e;s=s.parent;)s.data&&(r=normalizeStyleData(s.data))&&extend(n,r);return n}var cssVarRE=/^--/,importantRE=/\s*!important$/,setProp=function(e,a,n){if(cssVarRE.test(a))e.style.setProperty(a,n);else if(importantRE.test(n))e.style.setProperty(hyphenate(a),n.replace(importantRE,""),"important");else{var r=normalize(a);if(Array.isArray(n))for(var i=0,s=n.length;i-1?a.split(whitespaceRE).forEach(function(r){return e.classList.add(r)}):e.classList.add(a);else{var n=" "+(e.getAttribute("class")||"")+" ";n.indexOf(" "+a+" ")<0&&e.setAttribute("class",(n+a).trim())}}function removeClass(e,a){if(!a||!(a=a.trim()))return;if(e.classList)a.indexOf(" ")>-1?a.split(whitespaceRE).forEach(function(i){return e.classList.remove(i)}):e.classList.remove(a),e.classList.length||e.removeAttribute("class");else{for(var n=" "+(e.getAttribute("class")||"")+" ",r=" "+a+" ";n.indexOf(r)>=0;)n=n.replace(r," ");n=n.trim(),n?e.setAttribute("class",n):e.removeAttribute("class")}}function resolveTransition(e){if(!e)return;if(typeof e=="object"){var a={};return e.css!==!1&&extend(a,autoCssTransition(e.name||"v")),extend(a,e),a}else if(typeof e=="string")return autoCssTransition(e)}var autoCssTransition=cached(function(e){return{enterClass:e+"-enter",enterToClass:e+"-enter-to",enterActiveClass:e+"-enter-active",leaveClass:e+"-leave",leaveToClass:e+"-leave-to",leaveActiveClass:e+"-leave-active"}}),hasTransition=inBrowser&&!isIE9,TRANSITION="transition",ANIMATION="animation",transitionProp="transition",transitionEndEvent="transitionend",animationProp="animation",animationEndEvent="animationend";hasTransition&&(window.ontransitionend===void 0&&window.onwebkittransitionend!==void 0&&(transitionProp="WebkitTransition",transitionEndEvent="webkitTransitionEnd"),window.onanimationend===void 0&&window.onwebkitanimationend!==void 0&&(animationProp="WebkitAnimation",animationEndEvent="webkitAnimationEnd"));var raf=inBrowser?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(e){return e()};function nextFrame(e){raf(function(){raf(e)})}function addTransitionClass(e,a){var n=e._transitionClasses||(e._transitionClasses=[]);n.indexOf(a)<0&&(n.push(a),addClass(e,a))}function removeTransitionClass(e,a){e._transitionClasses&&remove(e._transitionClasses,a),removeClass(e,a)}function whenTransitionEnds(e,a,n){var r=getTransitionInfo(e,a),i=r.type,s=r.timeout,l=r.propCount;if(!i)return n();var c=i===TRANSITION?transitionEndEvent:animationEndEvent,o=0,d=function(){e.removeEventListener(c,u),n()},u=function(f){f.target===e&&(++o>=l&&d())};setTimeout(function(){o0&&(d=TRANSITION,u=s,f=i.length):a===ANIMATION?o>0&&(d=ANIMATION,u=o,f=c.length):(u=Math.max(s,o),d=u>0?s>o?TRANSITION:ANIMATION:null,f=d?d===TRANSITION?i.length:c.length:0);var h=d===TRANSITION&&transformRE.test(n[transitionProp+"Property"]);return{type:d,timeout:u,propCount:f,hasTransform:h}}function getTimeout(e,a){for(;e.length1}function _enter(e,a){a.data.show!==!0&&enter(a)}var transition=inBrowser?{create:_enter,activate:_enter,remove:function(a,n){a.data.show!==!0?leave(a,n):n()}}:{},platformModules=[attrs,klass,events,domProps,style,transition],modules=platformModules.concat(baseModules),patch=createPatchFunction({nodeOps,modules});isIE9&&document.addEventListener("selectionchange",function(){var e=document.activeElement;e&&e.vmodel&&trigger(e,"input")});var directive={inserted:function(a,n,r,i){r.tag==="select"?(i.elm&&!i.elm._vOptions?mergeVNodeHook(r,"postpatch",function(){directive.componentUpdated(a,n,r)}):setSelected(a,n,r.context),a._vOptions=[].map.call(a.options,getValue)):(r.tag==="textarea"||isTextInputType(a.type))&&(a._vModifiers=n.modifiers,n.modifiers.lazy||(a.addEventListener("compositionstart",onCompositionStart),a.addEventListener("compositionend",onCompositionEnd),a.addEventListener("change",onCompositionEnd),isIE9&&(a.vmodel=!0)))},componentUpdated:function(a,n,r){if(r.tag==="select"){setSelected(a,n,r.context);var i=a._vOptions,s=a._vOptions=[].map.call(a.options,getValue);if(s.some(function(c,o){return!looseEqual(c,i[o])})){var l=a.multiple?n.value.some(function(c){return hasNoMatchingOption(c,s)}):n.value!==n.oldValue&&hasNoMatchingOption(n.value,s);l&&trigger(a,"change")}}}};function setSelected(e,a,n){actuallySetSelected(e,a),(isIE||isEdge)&&setTimeout(function(){actuallySetSelected(e,a)},0)}function actuallySetSelected(e,a,n){var r=a.value,i=e.multiple;if(i&&!Array.isArray(r))return;for(var s,l,c=0,o=e.options.length;c-1,l.selected!==s&&(l.selected=s);else if(looseEqual(getValue(l),r)){e.selectedIndex!==c&&(e.selectedIndex=c);return}i||(e.selectedIndex=-1)}function hasNoMatchingOption(e,a){return a.every(function(n){return!looseEqual(n,e)})}function getValue(e){return"_value"in e?e._value:e.value}function onCompositionStart(e){e.target.composing=!0}function onCompositionEnd(e){if(!e.target.composing)return;e.target.composing=!1,trigger(e.target,"input")}function trigger(e,a){var n=document.createEvent("HTMLEvents");n.initEvent(a,!0,!0),e.dispatchEvent(n)}function locateNode(e){return e.componentInstance&&(!e.data||!e.data.transition)?locateNode(e.componentInstance._vnode):e}var show={bind:function(a,n,r){var i=n.value;r=locateNode(r);var s=r.data&&r.data.transition,l=a.__vOriginalDisplay=a.style.display==="none"?"":a.style.display;i&&s?(r.data.show=!0,enter(r,function(){a.style.display=l})):a.style.display=i?l:"none"},update:function(a,n,r){var i=n.value,s=n.oldValue;if(!i===!s)return;r=locateNode(r);var l=r.data&&r.data.transition;l?(r.data.show=!0,i?enter(r,function(){a.style.display=a.__vOriginalDisplay}):leave(r,function(){a.style.display="none"})):a.style.display=i?a.__vOriginalDisplay:"none"},unbind:function(a,n,r,i,s){s||(a.style.display=a.__vOriginalDisplay)}},platformDirectives={model:directive,show},transitionProps={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function getRealChild(e){var a=e&&e.componentOptions;return a&&a.Ctor.options.abstract?getRealChild(getFirstComponentChild(a.children)):e}function extractTransitionData(e){var a={},n=e.$options;for(var r in n.propsData)a[r]=e[r];var i=n._parentListeners;for(var s in i)a[camelize(s)]=i[s];return a}function placeholder(e,a){if(/\d-keep-alive$/.test(a.tag))return e("keep-alive",{props:a.componentOptions.propsData})}function hasParentTransition(e){for(;e=e.parent;)if(e.data.transition)return!0}function isSameChild(e,a){return a.key===e.key&&a.tag===e.tag}var isNotTextNode=function(e){return e.tag||isAsyncPlaceholder(e)},isVShowDirective=function(e){return e.name==="show"},Transition={name:"transition",props:transitionProps,abstract:!0,render:function(a){var n=this,r=this.$slots.default;if(!r)return;if(r=r.filter(isNotTextNode),!r.length)return;var i=this.mode,s=r[0];if(hasParentTransition(this.$vnode))return s;var l=getRealChild(s);if(!l)return s;if(this._leaving)return placeholder(a,s);var c="__transition-"+this._uid+"-";l.key=l.key==null?l.isComment?c+"comment":c+l.tag:isPrimitive(l.key)?String(l.key).indexOf(c)===0?l.key:c+l.key:l.key;var o=(l.data||(l.data={})).transition=extractTransitionData(this),d=this._vnode,u=getRealChild(d);if(l.data.directives&&l.data.directives.some(isVShowDirective)&&(l.data.show=!0),u&&u.data&&!isSameChild(l,u)&&!isAsyncPlaceholder(u)&&!(u.componentInstance&&u.componentInstance._vnode.isComment)){var f=u.data.transition=extend({},o);if(i==="out-in")return this._leaving=!0,mergeVNodeHook(f,"afterLeave",function(){n._leaving=!1,n.$forceUpdate()}),placeholder(a,s);if(i==="in-out"){if(isAsyncPlaceholder(l))return d;var h,m=function(){h()};mergeVNodeHook(o,"afterEnter",m),mergeVNodeHook(o,"enterCancelled",m),mergeVNodeHook(f,"delayLeave",function(v){h=v})}}return s}},props=extend({tag:String,moveClass:String},transitionProps);delete props.mode;var TransitionGroup={props,beforeMount:function(){var a=this,n=this._update;this._update=function(r,i){var s=setActiveInstance(a);a.__patch__(a._vnode,a.kept,!1,!0),a._vnode=a.kept,s(),n.call(a,r,i)}},render:function(a){for(var n=this.tag||this.$vnode.data.tag||"span",r=Object.create(null),i=this.prevChildren=this.children,s=this.$slots.default||[],l=this.children=[],c=extractTransitionData(this),o=0;os&&(i.push(o=e.slice(s,c)),r.push(JSON.stringify(o)));var d=parseFilters(l[1].trim());r.push("_s("+d+")"),i.push({"@binding":d}),s=c+l[0].length}return s\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,dynamicArgAttribute=/^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,ncname="[a-zA-Z_][\\-\\.0-9_a-zA-Z"+unicodeRegExp.source+"]*",qnameCapture="((?:"+ncname+"\\:)?"+ncname+")",startTagOpen=new RegExp("^<"+qnameCapture),startTagClose=/^\s*(\/?)>/,endTag=new RegExp("^<\\/"+qnameCapture+"[^>]*>"),doctype=/^]+>/i,comment=/^",""":'"',"&":"&"," ":` `," ":" ","'":"'"},encodedAttr=/&(?:lt|gt|quot|amp|#39);/g,encodedAttrWithNewLines=/&(?:lt|gt|quot|amp|#39|#10|#9);/g,isIgnoreNewlineTag=makeMap("pre,textarea",!0),shouldIgnoreFirstNewline=function(e,a){return e&&isIgnoreNewlineTag(e)&&a[0]===` -`};function decodeAttr(e,a){var n=a?encodedAttrWithNewLines:encodedAttr;return e.replace(n,function(r){return decodingMap[r]})}function parseHTML(e,a){for(var n=[],r=a.expectHTML,i=a.isUnaryTag||no,s=a.canBeLeftOpenTag||no,l=0,c,o;e;){if(c=e,!o||!isPlainTextElement(o)){var d=e.indexOf("<");if(d===0){if(comment.test(e)){var u=e.indexOf("-->");if(u>=0){a.shouldKeepComment&&a.comment(e.substring(4,u),l,l+u+3),C(u+3);continue}}if(conditionalComment.test(e)){var f=e.indexOf("]>");if(f>=0){C(f+2);continue}}var h=e.match(doctype);if(h){C(h[0].length);continue}var m=e.match(endTag);if(m){var v=l;C(m[0].length),E(m[1],v,l);continue}var y=R();if(y){U(y),shouldIgnoreFirstNewline(y.tagName,e)&&C(1);continue}}var k=void 0,w=void 0,x=void 0;if(d>=0){for(w=e.slice(d);!endTag.test(w)&&!startTagOpen.test(w)&&!comment.test(w)&&!conditionalComment.test(w)&&!(x=w.indexOf("<",1),x<0);)d+=x,w=e.slice(d);k=e.substring(0,d)}d<0&&(k=e),k&&C(k.length),a.chars&&k&&a.chars(k,l-k.length,l)}else{var A=0,M=o.toLowerCase(),D=reCache[M]||(reCache[M]=new RegExp("([\\s\\S]*?)(]*>)","i")),T=e.replace(D,function(I,g,b){return A=b.length,!isPlainTextElement(M)&&M!=="noscript"&&(g=g.replace(//g,"$1").replace(//g,"$1")),shouldIgnoreFirstNewline(M,g)&&(g=g.slice(1)),a.chars&&a.chars(g),""});l+=e.length-T.length,e=T,E(M,l-A,l)}if(e===c){a.chars&&a.chars(e);break}}E();function C(I){l+=I,e=e.substring(I)}function R(){var I=e.match(startTagOpen);if(I){var g={tagName:I[1],attrs:[],start:l};C(I[0].length);for(var b,_;!(b=e.match(startTagClose))&&(_=e.match(dynamicArgAttribute)||e.match(attribute));)_.start=l,C(_[0].length),_.end=l,g.attrs.push(_);if(b)return g.unarySlash=b[1],C(b[0].length),g.end=l,g}}function U(I){var g=I.tagName,b=I.unarySlash;r&&(o==="p"&&isNonPhrasingTag(g)&&E(o),s(g)&&o===g&&E(g));for(var _=i(g)||!!b,S=I.attrs.length,z=new Array(S),P=0;P=0&&!(n[_].lowerCasedTag===S);_--);else _=0;if(_>=0){for(var z=n.length-1;z>=_;z--)a.end&&a.end(n[z].tag,g,b);n.length=_,o=_&&n[_-1].tag}else S==="br"?a.start&&a.start(I,[],!0,g,b):S==="p"&&(a.start&&a.start(I,[],!1,g,b),a.end&&a.end(I,g,b))}}var onRE=/^@|^v-on:/,dirRE=/^v-|^@|^:|^#/,forAliasRE=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,forIteratorRE=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,stripParensRE=/^\(|\)$/g,dynamicArgRE=/^\[.*\]$/,argRE=/:(.*)$/,bindRE=/^:|^\.|^v-bind:/,modifierRE=/\.[^.\]]+(?=[^\]]*$)/g,slotRE=/^v-slot(:|$)|^#/,lineBreakRE=/[\r\n]/,whitespaceRE$1=/\s+/g,decodeHTMLCached=cached(he.decode),emptySlotScopeToken="_empty_",warn$2,delimiters,transforms,preTransforms,postTransforms,platformIsPreTag,platformMustUseProp,platformGetTagNamespace;function createASTElement(e,a,n){return{type:1,tag:e,attrsList:a,attrsMap:makeAttrsMap(a),rawAttrsMap:{},parent:n,children:[]}}function parse(e,a){warn$2=a.warn||baseWarn,platformIsPreTag=a.isPreTag||no,platformMustUseProp=a.mustUseProp||no,platformGetTagNamespace=a.getTagNamespace||no;var n=a.isReservedTag||no;transforms=pluckModuleFunction(a.modules,"transformNode"),preTransforms=pluckModuleFunction(a.modules,"preTransformNode"),postTransforms=pluckModuleFunction(a.modules,"postTransformNode"),delimiters=a.delimiters;var r=[],i=a.preserveWhitespace!==!1,s=a.whitespace,l,c,o=!1,d=!1;function u(h){if(f(h),!o&&!h.processed&&(h=processElement(h,a)),!r.length&&h!==l&&(l.if&&(h.elseif||h.else)&&addIfCondition(l,{exp:h.elseif,block:h})),c&&!h.forbidden)if(h.elseif||h.else)processIfConditions(h,c);else{if(h.slotScope){var m=h.slotTarget||'"default"';(c.scopedSlots||(c.scopedSlots={}))[m]=h}c.children.push(h),h.parent=c}h.children=h.children.filter(function(y){return!y.slotScope}),f(h),h.pre&&(o=!1),platformIsPreTag(h.tag)&&(d=!1);for(var v=0;v|^function(?:\s+[\w$]+)?\s*\(/,fnInvokeRE=/\([^)]*?\);*$/,simplePathRE=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,keyCodes={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},keyNames={esc:["Esc","Escape"],tab:"Tab",enter:"Enter",space:[" ","Spacebar"],up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete","Del"]},genGuard=function(e){return"if("+e+")return null;"},modifierCode={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:genGuard("$event.target !== $event.currentTarget"),ctrl:genGuard("!$event.ctrlKey"),shift:genGuard("!$event.shiftKey"),alt:genGuard("!$event.altKey"),meta:genGuard("!$event.metaKey"),left:genGuard("'button' in $event && $event.button !== 0"),middle:genGuard("'button' in $event && $event.button !== 1"),right:genGuard("'button' in $event && $event.button !== 2")};function genHandlers(e,a){var n=a?"nativeOn:":"on:",r="",i="";for(var s in e){var l=genHandler(e[s]);e[s]&&e[s].dynamic?i+=s+","+l+",":r+='"'+s+'":'+l+","}return r="{"+r.slice(0,-1)+"}",i?n+"_d("+r+",["+i.slice(0,-1)+"])":n+r}function genHandler(e){if(!e)return"function(){}";if(Array.isArray(e))return"["+e.map(function(u){return genHandler(u)}).join(",")+"]";var a=simplePathRE.test(e.value),n=fnExpRE.test(e.value),r=simplePathRE.test(e.value.replace(fnInvokeRE,""));if(e.modifiers){var i="",s="",l=[];for(var c in e.modifiers)if(modifierCode[c])s+=modifierCode[c],keyCodes[c]&&l.push(c);else if(c==="exact"){var o=e.modifiers;s+=genGuard(["ctrl","shift","alt","meta"].filter(function(u){return!o[u]}).map(function(u){return"$event."+u+"Key"}).join("||"))}else l.push(c);l.length&&(i+=genKeyFilter(l)),s&&(i+=s);var d=a?"return "+e.value+"($event)":n?"return ("+e.value+")($event)":r?"return "+e.value:e.value;return"function($event){"+i+d+"}"}else return a||n?e.value:"function($event){"+(r?"return "+e.value:e.value)+"}"}function genKeyFilter(e){return"if(!$event.type.indexOf('key')&&"+e.map(genFilterCode).join("&&")+")return null;"}function genFilterCode(e){var a=parseInt(e,10);if(a)return"$event.keyCode!=="+a;var n=keyCodes[e],r=keyNames[e];return"_k($event.keyCode,"+JSON.stringify(e)+","+JSON.stringify(n)+",$event.key,"+JSON.stringify(r)+")"}function on(e,a){e.wrapListeners=function(n){return"_g("+n+","+a.value+")"}}function bind$1(e,a){e.wrapData=function(n){return"_b("+n+",'"+e.tag+"',"+a.value+","+(a.modifiers&&a.modifiers.prop?"true":"false")+(a.modifiers&&a.modifiers.sync?",true":"")+")"}}var baseDirectives={on,bind:bind$1,cloak:noop},CodegenState=function(a){this.options=a,this.warn=a.warn||baseWarn,this.transforms=pluckModuleFunction(a.modules,"transformCode"),this.dataGenFns=pluckModuleFunction(a.modules,"genData"),this.directives=extend(extend({},baseDirectives),a.directives);var n=a.isReservedTag||no;this.maybeComponent=function(r){return!!r.component||!n(r.tag)},this.onceId=0,this.staticRenderFns=[],this.pre=!1};function generate(e,a){var n=new CodegenState(a),r=e?genElement(e,n):'_c("div")';return{render:"with(this){return "+r+"}",staticRenderFns:n.staticRenderFns}}function genElement(e,a){if(e.parent&&(e.pre=e.pre||e.parent.pre),e.staticRoot&&!e.staticProcessed)return genStatic(e,a);if(e.once&&!e.onceProcessed)return genOnce(e,a);if(e.for&&!e.forProcessed)return genFor(e,a);if(e.if&&!e.ifProcessed)return genIf(e,a);if(e.tag==="template"&&!e.slotTarget&&!a.pre)return genChildren(e,a)||"void 0";if(e.tag==="slot")return genSlot(e,a);var n;if(e.component)n=genComponent(e.component,e,a);else{var r;(!e.plain||e.pre&&a.maybeComponent(e))&&(r=genData$2(e,a));var i=e.inlineTemplate?null:genChildren(e,a,!0);n="_c('"+e.tag+"'"+(r?","+r:"")+(i?","+i:"")+")"}for(var s=0;s>>0}function containsSlotChild(e){return e.type===1?e.tag==="slot"?!0:e.children.some(containsSlotChild):!1}function genScopedSlot(e,a){var n=e.attrsMap["slot-scope"];if(e.if&&!e.ifProcessed&&!n)return genIf(e,a,genScopedSlot,"null");if(e.for&&!e.forProcessed)return genFor(e,a,genScopedSlot);var r=e.slotScope===emptySlotScopeToken?"":String(e.slotScope),i="function("+r+"){return "+(e.tag==="template"?e.if&&n?"("+e.if+")?"+(genChildren(e,a)||"undefined")+":undefined":genChildren(e,a)||"undefined":genElement(e,a))+"}",s=r?"":",proxy:true";return"{key:"+(e.slotTarget||'"default"')+",fn:"+i+s+"}"}function genChildren(e,a,n,r,i){var s=e.children;if(s.length){var l=s[0];if(s.length===1&&l.for&&l.tag!=="template"&&l.tag!=="slot"){var c=n?a.maybeComponent(l)?",1":",0":"";return""+(r||genElement)(l,a)+c}var o=n?getNormalizationType(s,a.maybeComponent):0,d=i||genNode;return"["+s.map(function(u){return d(u,a)}).join(",")+"]"+(o?","+o:"")}}function getNormalizationType(e,a){for(var n=0,r=0;r");if(u>=0){a.shouldKeepComment&&a.comment(e.substring(4,u),l,l+u+3),C(u+3);continue}}if(conditionalComment.test(e)){var f=e.indexOf("]>");if(f>=0){C(f+2);continue}}var h=e.match(doctype);if(h){C(h[0].length);continue}var m=e.match(endTag);if(m){var v=l;C(m[0].length),E(m[1],v,l);continue}var y=R();if(y){U(y),shouldIgnoreFirstNewline(y.tagName,e)&&C(1);continue}}var k=void 0,w=void 0,x=void 0;if(d>=0){for(w=e.slice(d);!endTag.test(w)&&!startTagOpen.test(w)&&!comment.test(w)&&!conditionalComment.test(w)&&!(x=w.indexOf("<",1),x<0);)d+=x,w=e.slice(d);k=e.substring(0,d)}d<0&&(k=e),k&&C(k.length),a.chars&&k&&a.chars(k,l-k.length,l)}else{var A=0,M=o.toLowerCase(),D=reCache[M]||(reCache[M]=new RegExp("([\\s\\S]*?)(]*>)","i")),T=e.replace(D,function(I,g,b){return A=b.length,!isPlainTextElement(M)&&M!=="noscript"&&(g=g.replace(//g,"$1").replace(//g,"$1")),shouldIgnoreFirstNewline(M,g)&&(g=g.slice(1)),a.chars&&a.chars(g),""});l+=e.length-T.length,e=T,E(M,l-A,l)}if(e===c){a.chars&&a.chars(e);break}}E();function C(I){l+=I,e=e.substring(I)}function R(){var I=e.match(startTagOpen);if(I){var g={tagName:I[1],attrs:[],start:l};C(I[0].length);for(var b,_;!(b=e.match(startTagClose))&&(_=e.match(dynamicArgAttribute)||e.match(attribute));)_.start=l,C(_[0].length),_.end=l,g.attrs.push(_);if(b)return g.unarySlash=b[1],C(b[0].length),g.end=l,g}}function U(I){var g=I.tagName,b=I.unarySlash;r&&(o==="p"&&isNonPhrasingTag(g)&&E(o),s(g)&&o===g&&E(g));for(var _=i(g)||!!b,S=I.attrs.length,z=new Array(S),P=0;P=0&&!(n[_].lowerCasedTag===S);_--);else _=0;if(_>=0){for(var z=n.length-1;z>=_;z--)a.end&&a.end(n[z].tag,g,b);n.length=_,o=_&&n[_-1].tag}else S==="br"?a.start&&a.start(I,[],!0,g,b):S==="p"&&(a.start&&a.start(I,[],!1,g,b),a.end&&a.end(I,g,b))}}var onRE=/^@|^v-on:/,dirRE=/^v-|^@|^:|^#/,forAliasRE=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,forIteratorRE=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,stripParensRE=/^\(|\)$/g,dynamicArgRE=/^\[.*\]$/,argRE=/:(.*)$/,bindRE=/^:|^\.|^v-bind:/,modifierRE=/\.[^.\]]+(?=[^\]]*$)/g,slotRE=/^v-slot(:|$)|^#/,lineBreakRE=/[\r\n]/,whitespaceRE$1=/\s+/g,decodeHTMLCached=cached(he.decode),emptySlotScopeToken="_empty_",warn$2,delimiters,transforms,preTransforms,postTransforms,platformIsPreTag,platformMustUseProp,platformGetTagNamespace;function createASTElement(e,a,n){return{type:1,tag:e,attrsList:a,attrsMap:makeAttrsMap(a),rawAttrsMap:{},parent:n,children:[]}}function parse(e,a){warn$2=a.warn||baseWarn,platformIsPreTag=a.isPreTag||no,platformMustUseProp=a.mustUseProp||no,platformGetTagNamespace=a.getTagNamespace||no;var n=a.isReservedTag||no;transforms=pluckModuleFunction(a.modules,"transformNode"),preTransforms=pluckModuleFunction(a.modules,"preTransformNode"),postTransforms=pluckModuleFunction(a.modules,"postTransformNode"),delimiters=a.delimiters;var r=[],i=a.preserveWhitespace!==!1,s=a.whitespace,l,c,o=!1,d=!1;function u(h){if(f(h),!o&&!h.processed&&(h=processElement(h,a)),!r.length&&h!==l&&(l.if&&(h.elseif||h.else)&&addIfCondition(l,{exp:h.elseif,block:h})),c&&!h.forbidden)if(h.elseif||h.else)processIfConditions(h,c);else{if(h.slotScope){var m=h.slotTarget||'"default"';(c.scopedSlots||(c.scopedSlots={}))[m]=h}c.children.push(h),h.parent=c}h.children=h.children.filter(function(y){return!y.slotScope}),f(h),h.pre&&(o=!1),platformIsPreTag(h.tag)&&(d=!1);for(var v=0;v|^function(?:\s+[\w$]+)?\s*\(/,fnInvokeRE=/\([^)]*?\);*$/,simplePathRE=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,keyCodes={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},keyNames={esc:["Esc","Escape"],tab:"Tab",enter:"Enter",space:[" ","Spacebar"],up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete","Del"]},genGuard=function(e){return"if("+e+")return null;"},modifierCode={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:genGuard("$event.target !== $event.currentTarget"),ctrl:genGuard("!$event.ctrlKey"),shift:genGuard("!$event.shiftKey"),alt:genGuard("!$event.altKey"),meta:genGuard("!$event.metaKey"),left:genGuard("'button' in $event && $event.button !== 0"),middle:genGuard("'button' in $event && $event.button !== 1"),right:genGuard("'button' in $event && $event.button !== 2")};function genHandlers(e,a){var n=a?"nativeOn:":"on:",r="",i="";for(var s in e){var l=genHandler(e[s]);e[s]&&e[s].dynamic?i+=s+","+l+",":r+='"'+s+'":'+l+","}return r="{"+r.slice(0,-1)+"}",i?n+"_d("+r+",["+i.slice(0,-1)+"])":n+r}function genHandler(e){if(!e)return"function(){}";if(Array.isArray(e))return"["+e.map(function(u){return genHandler(u)}).join(",")+"]";var a=simplePathRE.test(e.value),n=fnExpRE.test(e.value),r=simplePathRE.test(e.value.replace(fnInvokeRE,""));if(e.modifiers){var i="",s="",l=[];for(var c in e.modifiers)if(modifierCode[c])s+=modifierCode[c],keyCodes[c]&&l.push(c);else if(c==="exact"){var o=e.modifiers;s+=genGuard(["ctrl","shift","alt","meta"].filter(function(u){return!o[u]}).map(function(u){return"$event."+u+"Key"}).join("||"))}else l.push(c);l.length&&(i+=genKeyFilter(l)),s&&(i+=s);var d=a?"return "+e.value+"($event)":n?"return ("+e.value+")($event)":r?"return "+e.value:e.value;return"function($event){"+i+d+"}"}else return a||n?e.value:"function($event){"+(r?"return "+e.value:e.value)+"}"}function genKeyFilter(e){return"if(!$event.type.indexOf('key')&&"+e.map(genFilterCode).join("&&")+")return null;"}function genFilterCode(e){var a=parseInt(e,10);if(a)return"$event.keyCode!=="+a;var n=keyCodes[e],r=keyNames[e];return"_k($event.keyCode,"+JSON.stringify(e)+","+JSON.stringify(n)+",$event.key,"+JSON.stringify(r)+")"}function on(e,a){e.wrapListeners=function(n){return"_g("+n+","+a.value+")"}}function bind$1(e,a){e.wrapData=function(n){return"_b("+n+",'"+e.tag+"',"+a.value+","+(a.modifiers&&a.modifiers.prop?"true":"false")+(a.modifiers&&a.modifiers.sync?",true":"")+")"}}var baseDirectives={on,bind:bind$1,cloak:noop},CodegenState=function(a){this.options=a,this.warn=a.warn||baseWarn,this.transforms=pluckModuleFunction(a.modules,"transformCode"),this.dataGenFns=pluckModuleFunction(a.modules,"genData"),this.directives=extend(extend({},baseDirectives),a.directives);var n=a.isReservedTag||no;this.maybeComponent=function(r){return!!r.component||!n(r.tag)},this.onceId=0,this.staticRenderFns=[],this.pre=!1};function generate(e,a){var n=new CodegenState(a),r=e?genElement(e,n):'_c("div")';return{render:"with(this){return "+r+"}",staticRenderFns:n.staticRenderFns}}function genElement(e,a){if(e.parent&&(e.pre=e.pre||e.parent.pre),e.staticRoot&&!e.staticProcessed)return genStatic(e,a);if(e.once&&!e.onceProcessed)return genOnce(e,a);if(e.for&&!e.forProcessed)return genFor(e,a);if(e.if&&!e.ifProcessed)return genIf(e,a);if(e.tag==="template"&&!e.slotTarget&&!a.pre)return genChildren(e,a)||"void 0";if(e.tag==="slot")return genSlot(e,a);var n;if(e.component)n=genComponent(e.component,e,a);else{var r;(!e.plain||e.pre&&a.maybeComponent(e))&&(r=genData$2(e,a));var i=e.inlineTemplate?null:genChildren(e,a,!0);n="_c('"+e.tag+"'"+(r?","+r:"")+(i?","+i:"")+")"}for(var s=0;s>>0}function containsSlotChild(e){return e.type===1?e.tag==="slot"?!0:e.children.some(containsSlotChild):!1}function genScopedSlot(e,a){var n=e.attrsMap["slot-scope"];if(e.if&&!e.ifProcessed&&!n)return genIf(e,a,genScopedSlot,"null");if(e.for&&!e.forProcessed)return genFor(e,a,genScopedSlot);var r=e.slotScope===emptySlotScopeToken?"":String(e.slotScope),i="function("+r+"){return "+(e.tag==="template"?e.if&&n?"("+e.if+")?"+(genChildren(e,a)||"undefined")+":undefined":genChildren(e,a)||"undefined":genElement(e,a))+"}",s=r?"":",proxy:true";return"{key:"+(e.slotTarget||'"default"')+",fn:"+i+s+"}"}function genChildren(e,a,n,r,i){var s=e.children;if(s.length){var l=s[0];if(s.length===1&&l.for&&l.tag!=="template"&&l.tag!=="slot"){var c=n?a.maybeComponent(l)?",1":",0":"";return""+(r||genElement)(l,a)+c}var o=n?getNormalizationType(s,a.maybeComponent):0,d=i||genNode;return"["+s.map(function(u){return d(u,a)}).join(",")+"]"+(o?","+o:"")}}function getNormalizationType(e,a){for(var n=0,r=0;r`:`
`,div.innerHTML.indexOf(" ")>0}var shouldDecodeNewlines=inBrowser?getShouldDecode(!1):!1,shouldDecodeNewlinesForHref=inBrowser?getShouldDecode(!0):!1,idToTemplate=cached(function(e){var a=query(e);return a&&a.innerHTML}),mount=Vue.prototype.$mount;Vue.prototype.$mount=function(e,a){if(e=e&&query(e),e===document.body||e===document.documentElement)return this;var n=this.$options;if(!n.render){var r=n.template;if(r)if(typeof r=="string")r.charAt(0)==="#"&&(r=idToTemplate(r));else if(r.nodeType)r=r.innerHTML;else return this;else e&&(r=getOuterHTML(e));if(r){var i=compileToFunctions(r,{outputSourceRange:!1,shouldDecodeNewlines,shouldDecodeNewlinesForHref,delimiters:n.delimiters,comments:n.comments},this),s=i.render,l=i.staticRenderFns;n.render=s,n.staticRenderFns=l}}return mount.call(this,e,a)};function getOuterHTML(e){if(e.outerHTML)return e.outerHTML;var a=document.createElement("div");return a.appendChild(e.cloneNode(!0)),a.innerHTML}Vue.compile=compileToFunctions;function styleInject(e,a){a===void 0&&(a={});var n=a.insertAt;if(!e||typeof document=="undefined")return;var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",n==="top"&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}var css_248z=`/* fallback */ @@ -2494,7 +2494,7 @@ a { `;styleInject(css_248z$8);let wasEventListenerAdded=!1;class CustomSocket extends WebSocket{constructor(a){super(a)}emit(a,n){if(this.readyState!==WebSocket.OPEN)return!1;this.send(JSON.stringify({key:a,data:n}))}on(a,n){wasEventListenerAdded||(wasEventListenerAdded=!0,this.addEventListener("message",r=>{const i=JSON.parse(r.data);i.key===a&&n(i.data)}))}off(){console.log("off!")}}const socket=new CustomSocket("ws://"+location.host+"/");var __vue_render__=function(e,a){var n=a._c;return n("div",{directives:[{name:"show",rawName:"v-show",value:!a.props.hidden,expression:"!props.hidden"}],staticClass:"flex justify-center items-center flex-col flex-1 h-full",class:a.props.additionalClasses},[n("span",{staticClass:"mb-5"},[a._v(a._s(a.props.text||"Loading..."))]),a._v(" "),a._m(0)])},__vue_staticRenderFns__=[function(e,a){var n=a._c;return n("div",{staticClass:"lds-ring"},[n("div"),a._v(" "),n("div"),a._v(" "),n("div"),a._v(" "),n("div")])}];const __vue_inject_styles__=function(e){if(!e)return;e("data-v-20045564_0",{source:".lds-ring[data-v-20045564]{display:inline-block;position:relative;width:80px;height:80px}.lds-ring div[data-v-20045564]{box-sizing:border-box;display:block;position:absolute;width:64px;height:64px;margin:8px;border:8px solid #fff;border-radius:50%;animation:lds-ring-data-v-20045564 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:#fff transparent transparent transparent}.lds-ring div[data-v-20045564]:nth-child(1){animation-delay:-.45s}.lds-ring div[data-v-20045564]:nth-child(2){animation-delay:-.3s}.lds-ring div[data-v-20045564]:nth-child(3){animation-delay:-.15s}@keyframes lds-ring-data-v-20045564{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}",map:void 0,media:void 0})},__vue_scope_id__="data-v-20045564",__vue_module_identifier__=void 0,__vue_is_functional_template__=!0;function __vue_normalize__(e,a,n,r,i,s,l,c){const o=(typeof n=="function"?n.options:n)||{};o.__file="BaseLoadingPlaceholder.vue",o.render||(o.render=e.render,o.staticRenderFns=e.staticRenderFns,o._compiled=!0,i&&(o.functional=!0)),o._scopeId=r;{let d;if(a&&(d=function(u){a.call(this,l(u))}),d!==void 0)if(o.functional){const u=o.render;o.render=function(h,m){return d.call(m),u(h,m)}}else{const u=o.beforeCreate;o.beforeCreate=u?[].concat(u,d):[d]}}return o}function __vue_create_injector__(){const e=document.head||document.getElementsByTagName("head")[0],a=__vue_create_injector__.styles||(__vue_create_injector__.styles={}),n=typeof navigator!="undefined"&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(i,s){if(document.querySelector('style[data-vue-ssr-id~="'+i+'"]'))return;const l=n?s.media||"default":i,c=a[l]||(a[l]={ids:[],parts:[],element:void 0});if(!c.ids.includes(i)){let o=s.source,d=c.ids.length;if(c.ids.push(i),s.map&&(o+=` /*# sourceURL=`+s.map.sources[0]+" */",o+=` /*# sourceMappingURL=data:application/json;base64,`+btoa(unescape(encodeURIComponent(JSON.stringify(s.map))))+" */"),n&&(c.element=c.element||document.querySelector("style[data-group="+l+"]")),!c.element){const u=c.element=document.createElement("style");u.type="text/css",s.media&&u.setAttribute("media",s.media),n&&(u.setAttribute("data-group",l),u.setAttribute("data-next-index","0")),e.appendChild(u)}if(n&&(d=parseInt(c.element.getAttribute("data-next-index")),c.element.setAttribute("data-next-index",d+1)),c.element.styleSheet)c.parts.push(o),c.element.styleSheet.cssText=c.parts.filter(Boolean).join(` -`);else{const u=document.createTextNode(o),f=c.element.childNodes;f[d]&&c.element.removeChild(f[d]),f.length?c.element.insertBefore(u,f[d]):c.element.appendChild(u)}}}}var BaseLoadingPlaceholder=__vue_normalize__({render:__vue_render__,staticRenderFns:__vue_staticRenderFns__},__vue_inject_styles__,{},__vue_scope_id__,__vue_is_functional_template__,__vue_module_identifier__,__vue_create_injector__);function fetchApi(e,a){const n=new URL(`${window.location.origin}/api/${e}`);return Object.keys(a).forEach(r=>{n.searchParams.append(r,a[r])}),fetch(n.href).then(r=>r.json())}function sendAddToQueue(e,a=null){if(!e)throw new Error("No URL given to sendAddToQueue function!");fetchApi("addToQueue",{url:e,bitrate:a})}function aggregateDownloadLinks(e){let a=[];return e.forEach(n=>{a.push(n.link)}),a.join(";")}function generatePath(e){if(!e)throw new Error("No element passed to the generatePath function!");let a=[e];for(;(e=e.parentNode)&&e!==document;)a.push(e);return a}function isValidURL(e){let a=e.toLowerCase();if(a.startsWith("http")){if(a.indexOf("deezer.com")>=0||a.indexOf("deezer.page.link")>=0||a.indexOf("open.spotify.com")>=0||a.indexOf("link.tospotify.com")>=0)return!0}else if(a.startsWith("spotify:"))return!0;return!1}function convertDuration(e){let a,n;return a=Math.floor(e/60),n=e-a*60,n<10&&(n="0"+n),a+":"+n}function convertDurationSeparated(e){let a,n,r;return n=Math.floor(e/60),a=Math.floor(n/60),r=e-n*60,n-=a*60,[a,n,r]}function numberWithDots(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,".")}function debounce(e,a,n){var r;return function(){var i=this,s=arguments,l=function(){r=null,n||e.apply(i,s)},c=n&&!r;clearTimeout(r),r=setTimeout(l,a),c&&e.apply(i,s)}}function copyToClipboard(e){const a=document.createElement("input");document.body.appendChild(a),a.setAttribute("type","text"),a.setAttribute("value",e),a.select(),a.setSelectionRange(0,99999),document.execCommand("copy"),a.remove()}function getPropertyWithFallback(e,...a){for(const n of a){let r=/\./.test(n),i=r?n.split(".").reduce((s,l)=>{if(s)return s[l]},e):e[n];if(typeof i!="undefined")return i}return null}var Utils={isValidURL,convertDuration,convertDurationSeparated,numberWithDots,debounce};const downloadQualities=[{objName:"flac",label:"FLAC",value:9},{objName:"320kbps",label:"MP3 320kbps",value:3},{objName:"128kbps",label:"MP3 128kbps",value:1},{objName:"realityAudioHQ",label:"360 Reality Audio [HQ]",value:15},{objName:"realityAudioMQ",label:"360 Reality Audio [MQ]",value:14},{objName:"realityAudioLQ",label:"360 Reality Audio [LQ]",value:13}];var script={data(){return{menuOpen:!1,xPos:0,yPos:0,deezerHref:"",generalHref:"",imgSrc:""}},computed:{options(){const e={cut:{label:this.$t("globals.cut"),show:!1,position:1,action:()=>{document.execCommand("Cut")}},copy:{label:this.$t("globals.copy"),show:!1,position:2,action:()=>{document.execCommand("Copy")}},copyLink:{label:this.$t("globals.copyLink"),show:!1,position:3,action:()=>{copyToClipboard(this.generalHref)}},copyImageLink:{label:this.$t("globals.copyImageLink"),show:!1,position:4,action:()=>{copyToClipboard(this.imgSrc)}},copyDeezerLink:{label:this.$t("globals.copyDeezerLink"),show:!1,position:5,action:()=>{copyToClipboard(this.deezerHref)}},paste:{label:this.$t("globals.paste"),show:!1,position:6,action:()=>{clipboard in navigator?navigator.clipboard.readText().then(n=>{document.execCommand("insertText",void 0,n)}):document.execCommand("paste")}}};let a=Object.values(e).length+1;return downloadQualities.forEach((n,r)=>{e[n.objName]={label:`${this.$t("globals.download",{thing:n.label})}`,show:!1,position:a+r,action:sendAddToQueue.bind(null,this.deezerHref,n.value)}}),e},sortedOptions(){return Object.values(this.options).sort((e,a)=>e.position{this.menuOpen=!1,this.options.copyLink.show=!1,this.options.copyDeezerLink.show=!1,this.options.copyImageLink.show=!1,downloadQualities.forEach(e=>{this.options[e.objName].show=!1})}).catch(e=>{console.error(e)})},positionMenu(e,a){this.xPos=`${e}px`,this.yPos=`${a}px`,this.$nextTick().then(()=>{const{innerHeight:n,innerWidth:r}=window,i=e+this.$refs.contextMenu.getBoundingClientRect().width,s=a+this.$refs.contextMenu.getBoundingClientRect().height;if(i>r){const l=i-r+15;this.xPos=`${e-l}px`}if(s>n){const l=s-n+15;this.yPos=`${a-l}px`}})},showDeezerOptions(e){e||(this.options.copyDeezerLink.show=!0),downloadQualities.forEach(a=>{this.options[a.objName].show=!0})}}};const __vue_script__=script;var __vue_render__$1=function(){var e=this,a=e.$createElement,n=e._self._c||a;return n("div",{directives:[{name:"show",rawName:"v-show",value:e.menuOpen,expression:"menuOpen"}],ref:"contextMenu",staticClass:"context-menu",style:{top:e.yPos,left:e.xPos}},e._l(e.sortedOptions,function(r){return n("button",{directives:[{name:"show",rawName:"v-show",value:r.show,expression:"option.show"}],key:r.label,staticClass:"btn menu-option",on:{click:function(i){return i.preventDefault(),r.action(i)}}},[n("span",{staticClass:"menu-option__text"},[e._v(e._s(r.label))])])}),0)},__vue_staticRenderFns__$1=[];const __vue_inject_styles__$1=function(e){if(!e)return;e("data-v-ce73bd68_0",{source:".context-menu[data-v-ce73bd68]{position:absolute;top:0;left:0;min-width:100px;border-radius:7px;background:var(--secondary-background);box-shadow:4px 10px 18px 0 rgba(0,0,0,.15);overflow:hidden;z-index:10000}.menu-option[data-v-ce73bd68]{display:flex;align-items:center;width:100%;height:40px;padding-left:10px;padding-right:10px;color:var(--foreground);cursor:pointer}.menu-option[data-v-ce73bd68]:hover{background:var(--table-highlight);filter:brightness(150%)}.menu-option__text[data-v-ce73bd68]{text-transform:capitalize}button[data-v-ce73bd68]{color:var(--primary-text);color:unset;background-color:var(--primary-color);background-color:unset;min-width:unset;position:unset;border:unset;border-radius:unset;font-family:unset;font-weight:unset;font-size:unset;padding:unset;margin-right:unset;height:unset;text-transform:unset;cursor:unset;transition:unset}button[data-v-ce73bd68]:focus{outline:0}button[data-v-ce73bd68]:active{background-color:unset;transform:unset}button[data-v-ce73bd68]:hover{background:unset;border:unset}",map:void 0,media:void 0})},__vue_scope_id__$1="data-v-ce73bd68",__vue_module_identifier__$1=void 0,__vue_is_functional_template__$1=!1;function __vue_normalize__$1(e,a,n,r,i,s,l,c){const o=(typeof n=="function"?n.options:n)||{};o.__file="TheContextMenu.vue",o.render||(o.render=e.render,o.staticRenderFns=e.staticRenderFns,o._compiled=!0,i&&(o.functional=!0)),o._scopeId=r;{let d;if(a&&(d=function(u){a.call(this,l(u))}),d!==void 0)if(o.functional){const u=o.render;o.render=function(h,m){return d.call(m),u(h,m)}}else{const u=o.beforeCreate;o.beforeCreate=u?[].concat(u,d):[d]}}return o}function __vue_create_injector__$1(){const e=document.head||document.getElementsByTagName("head")[0],a=__vue_create_injector__$1.styles||(__vue_create_injector__$1.styles={}),n=typeof navigator!="undefined"&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(i,s){if(document.querySelector('style[data-vue-ssr-id~="'+i+'"]'))return;const l=n?s.media||"default":i,c=a[l]||(a[l]={ids:[],parts:[],element:void 0});if(!c.ids.includes(i)){let o=s.source,d=c.ids.length;if(c.ids.push(i),s.map&&(o+=` +`);else{const u=document.createTextNode(o),f=c.element.childNodes;f[d]&&c.element.removeChild(f[d]),f.length?c.element.insertBefore(u,f[d]):c.element.appendChild(u)}}}}var BaseLoadingPlaceholder=__vue_normalize__({render:__vue_render__,staticRenderFns:__vue_staticRenderFns__},__vue_inject_styles__,{},__vue_scope_id__,__vue_is_functional_template__,__vue_module_identifier__,__vue_create_injector__);function fetchData(e,a={}){const n=new URL(`${window.location.origin}/api/${e}`);return Object.keys(a).forEach(r=>{n.searchParams.append(r,a[r])}),fetch(n.href).then(r=>r.json())}function sendToServer(e,a){const n=new URL(`${window.location.origin}/api/${e}`);Object.keys(a).forEach(r=>{n.searchParams.append(r,a[r])}),fetch(n.href).catch(console.error)}function sendAddToQueue(e,a=null){if(!e)throw new Error("No URL given to sendAddToQueue function!");sendToServer("addToQueue",{url:e,bitrate:a})}function aggregateDownloadLinks(e){let a=[];return e.forEach(n=>{a.push(n.link)}),a.join(";")}function generatePath(e){if(!e)throw new Error("No element passed to the generatePath function!");let a=[e];for(;(e=e.parentNode)&&e!==document;)a.push(e);return a}function isValidURL(e){let a=e.toLowerCase();if(a.startsWith("http")){if(a.indexOf("deezer.com")>=0||a.indexOf("deezer.page.link")>=0||a.indexOf("open.spotify.com")>=0||a.indexOf("link.tospotify.com")>=0)return!0}else if(a.startsWith("spotify:"))return!0;return!1}function convertDuration(e){let a,n;return a=Math.floor(e/60),n=e-a*60,n<10&&(n="0"+n),a+":"+n}function convertDurationSeparated(e){let a,n,r;return n=Math.floor(e/60),a=Math.floor(n/60),r=e-n*60,n-=a*60,[a,n,r]}function numberWithDots(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,".")}function debounce(e,a,n){var r;return function(){var i=this,s=arguments,l=function(){r=null,n||e.apply(i,s)},c=n&&!r;clearTimeout(r),r=setTimeout(l,a),c&&e.apply(i,s)}}function copyToClipboard(e){const a=document.createElement("input");document.body.appendChild(a),a.setAttribute("type","text"),a.setAttribute("value",e),a.select(),a.setSelectionRange(0,99999),document.execCommand("copy"),a.remove()}function getPropertyWithFallback(e,...a){for(const n of a){let r=/\./.test(n),i=r?n.split(".").reduce((s,l)=>{if(s)return s[l]},e):e[n];if(typeof i!="undefined")return i}return null}var Utils={isValidURL,convertDuration,convertDurationSeparated,numberWithDots,debounce};const downloadQualities=[{objName:"flac",label:"FLAC",value:9},{objName:"320kbps",label:"MP3 320kbps",value:3},{objName:"128kbps",label:"MP3 128kbps",value:1},{objName:"realityAudioHQ",label:"360 Reality Audio [HQ]",value:15},{objName:"realityAudioMQ",label:"360 Reality Audio [MQ]",value:14},{objName:"realityAudioLQ",label:"360 Reality Audio [LQ]",value:13}];var script={data(){return{menuOpen:!1,xPos:0,yPos:0,deezerHref:"",generalHref:"",imgSrc:""}},computed:{options(){const e={cut:{label:this.$t("globals.cut"),show:!1,position:1,action:()=>{document.execCommand("Cut")}},copy:{label:this.$t("globals.copy"),show:!1,position:2,action:()=>{document.execCommand("Copy")}},copyLink:{label:this.$t("globals.copyLink"),show:!1,position:3,action:()=>{copyToClipboard(this.generalHref)}},copyImageLink:{label:this.$t("globals.copyImageLink"),show:!1,position:4,action:()=>{copyToClipboard(this.imgSrc)}},copyDeezerLink:{label:this.$t("globals.copyDeezerLink"),show:!1,position:5,action:()=>{copyToClipboard(this.deezerHref)}},paste:{label:this.$t("globals.paste"),show:!1,position:6,action:()=>{clipboard in navigator?navigator.clipboard.readText().then(n=>{document.execCommand("insertText",void 0,n)}):document.execCommand("paste")}}};let a=Object.values(e).length+1;return downloadQualities.forEach((n,r)=>{e[n.objName]={label:`${this.$t("globals.download",{thing:n.label})}`,show:!1,position:a+r,action:sendAddToQueue.bind(null,this.deezerHref,n.value)}}),e},sortedOptions(){return Object.values(this.options).sort((e,a)=>e.position{this.menuOpen=!1,this.options.copyLink.show=!1,this.options.copyDeezerLink.show=!1,this.options.copyImageLink.show=!1,downloadQualities.forEach(e=>{this.options[e.objName].show=!1})}).catch(e=>{console.error(e)})},positionMenu(e,a){this.xPos=`${e}px`,this.yPos=`${a}px`,this.$nextTick().then(()=>{const{innerHeight:n,innerWidth:r}=window,i=e+this.$refs.contextMenu.getBoundingClientRect().width,s=a+this.$refs.contextMenu.getBoundingClientRect().height;if(i>r){const l=i-r+15;this.xPos=`${e-l}px`}if(s>n){const l=s-n+15;this.yPos=`${a-l}px`}})},showDeezerOptions(e){e||(this.options.copyDeezerLink.show=!0),downloadQualities.forEach(a=>{this.options[a.objName].show=!0})}}};const __vue_script__=script;var __vue_render__$1=function(){var e=this,a=e.$createElement,n=e._self._c||a;return n("div",{directives:[{name:"show",rawName:"v-show",value:e.menuOpen,expression:"menuOpen"}],ref:"contextMenu",staticClass:"context-menu",style:{top:e.yPos,left:e.xPos}},e._l(e.sortedOptions,function(r){return n("button",{directives:[{name:"show",rawName:"v-show",value:r.show,expression:"option.show"}],key:r.label,staticClass:"btn menu-option",on:{click:function(i){return i.preventDefault(),r.action(i)}}},[n("span",{staticClass:"menu-option__text"},[e._v(e._s(r.label))])])}),0)},__vue_staticRenderFns__$1=[];const __vue_inject_styles__$1=function(e){if(!e)return;e("data-v-ce73bd68_0",{source:".context-menu[data-v-ce73bd68]{position:absolute;top:0;left:0;min-width:100px;border-radius:7px;background:var(--secondary-background);box-shadow:4px 10px 18px 0 rgba(0,0,0,.15);overflow:hidden;z-index:10000}.menu-option[data-v-ce73bd68]{display:flex;align-items:center;width:100%;height:40px;padding-left:10px;padding-right:10px;color:var(--foreground);cursor:pointer}.menu-option[data-v-ce73bd68]:hover{background:var(--table-highlight);filter:brightness(150%)}.menu-option__text[data-v-ce73bd68]{text-transform:capitalize}button[data-v-ce73bd68]{color:var(--primary-text);color:unset;background-color:var(--primary-color);background-color:unset;min-width:unset;position:unset;border:unset;border-radius:unset;font-family:unset;font-weight:unset;font-size:unset;padding:unset;margin-right:unset;height:unset;text-transform:unset;cursor:unset;transition:unset}button[data-v-ce73bd68]:focus{outline:0}button[data-v-ce73bd68]:active{background-color:unset;transform:unset}button[data-v-ce73bd68]:hover{background:unset;border:unset}",map:void 0,media:void 0})},__vue_scope_id__$1="data-v-ce73bd68",__vue_module_identifier__$1=void 0,__vue_is_functional_template__$1=!1;function __vue_normalize__$1(e,a,n,r,i,s,l,c){const o=(typeof n=="function"?n.options:n)||{};o.__file="TheContextMenu.vue",o.render||(o.render=e.render,o.staticRenderFns=e.staticRenderFns,o._compiled=!0,i&&(o.functional=!0)),o._scopeId=r;{let d;if(a&&(d=function(u){a.call(this,l(u))}),d!==void 0)if(o.functional){const u=o.render;o.render=function(h,m){return d.call(m),u(h,m)}}else{const u=o.beforeCreate;o.beforeCreate=u?[].concat(u,d):[d]}}return o}function __vue_create_injector__$1(){const e=document.head||document.getElementsByTagName("head")[0],a=__vue_create_injector__$1.styles||(__vue_create_injector__$1.styles={}),n=typeof navigator!="undefined"&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(i,s){if(document.querySelector('style[data-vue-ssr-id~="'+i+'"]'))return;const l=n?s.media||"default":i,c=a[l]||(a[l]={ids:[],parts:[],element:void 0});if(!c.ids.includes(i)){let o=s.source,d=c.ids.length;if(c.ids.push(i),s.map&&(o+=` /*# sourceURL=`+s.map.sources[0]+" */",o+=` /*# sourceMappingURL=data:application/json;base64,`+btoa(unescape(encodeURIComponent(JSON.stringify(s.map))))+" */"),n&&(c.element=c.element||document.querySelector("style[data-group="+l+"]")),!c.element){const u=c.element=document.createElement("style");u.type="text/css",s.media&&u.setAttribute("media",s.media),n&&(u.setAttribute("data-group",l),u.setAttribute("data-next-index","0")),e.appendChild(u)}if(n&&(d=parseInt(c.element.getAttribute("data-next-index")),c.element.setAttribute("data-next-index",d+1)),c.element.styleSheet)c.parts.push(o),c.element.styleSheet.cssText=c.parts.filter(Boolean).join(` `);else{const u=document.createTextNode(o),f=c.element.childNodes;f[d]&&c.element.removeChild(f[d]),f.length?c.element.insertBefore(u,f[d]):c.element.appendChild(u)}}}}var TheContextMenu=__vue_normalize__$1({render:__vue_render__$1,staticRenderFns:__vue_staticRenderFns__$1},__vue_inject_styles__$1,__vue_script__,__vue_scope_id__$1,__vue_is_functional_template__$1,__vue_module_identifier__$1,__vue_create_injector__$1);/*! @@ -2990,7 +2990,7 @@ PERFORMANCE OF THIS SOFTWARE. `+e._s(e.convertDuration(r.duration))+` `)]),e._v(" "),n("td",{staticClass:"cursor-pointer group",attrs:{"data-link":r.link,role:"button","aria-label":"download"},on:{click:function(i){return i.stopPropagation(),e.addToQueue(i)}}},[n("div",{staticClass:"table__cell-content table__cell-content--vertical-center"},[n("i",{staticClass:"transition-colors duration-150 ease-in-out material-icons group-hover:text-primary",attrs:{title:e.$t("globals.download_hint")}},[e._v(` get_app - `)])])])],1)}),0):e._e()])],1)},__vue_staticRenderFns__$i=[];const __vue_inject_styles__$i=void 0,__vue_scope_id__$i=void 0,__vue_is_functional_template__$i=!1;function __vue_normalize__$i(e,a,n,r,i,s,l,c){const o=(typeof n=="function"?n.options:n)||{};return o.__file="Favorites.vue",o.render||(o.render=e.render,o.staticRenderFns=e.staticRenderFns,o._compiled=!0,i&&(o.functional=!0)),o._scopeId=r,o}var Favorites=__vue_normalize__$i({render:__vue_render__$i,staticRenderFns:__vue_staticRenderFns__$i},__vue_inject_styles__$i,__vue_script__$g,__vue_scope_id__$i,__vue_is_functional_template__$i);let homeData={},cached$2=!1;function getHomeData(){return cached$2?homeData:(socket.emit("get_home_data"),new Promise((e,a)=>{socket.on("init_home",n=>{homeData=n,cached$2=!0,socket.off("init_home"),e(n)})}))}var script$h={components:{CoverContainer},data(){return{playlists:[],albums:[]}},async created(){const e=await getHomeData();this.initHome(e)},computed:{...mapGetters(["isLoggedIn"])},methods:{addToQueue(e){sendAddToQueue(e.currentTarget.dataset.link)},initHome(e){const{playlists:{data:a},albums:{data:n}}=e;this.playlists=a,this.albums=n}}};const __vue_script__$h=script$h;var __vue_render__$j=function(){var e=this,a=e.$createElement,n=e._self._c||a;return n("div",{attrs:{id:"home_tab"}},[n("h1",{staticClass:"mb-8 text-5xl"},[e._v(e._s(e.$t("globals.welcome")))]),e._v(" "),e.isLoggedIn?e._e():n("section",{ref:"notLogged",staticClass:"py-6 border-0 border-t border-solid border-grayscale-500"},[n("p",{staticClass:"mb-4",attrs:{id:"home_not_logged_text"}},[e._v(e._s(e.$t("home.needTologin")))]),e._v(" "),n("router-link",{staticClass:"btn btn-primary",attrs:{tag:"button",name:"button",to:{name:"Settings"}}},[e._v(` + `)])])])],1)}),0):e._e()])],1)},__vue_staticRenderFns__$i=[];const __vue_inject_styles__$i=void 0,__vue_scope_id__$i=void 0,__vue_is_functional_template__$i=!1;function __vue_normalize__$i(e,a,n,r,i,s,l,c){const o=(typeof n=="function"?n.options:n)||{};return o.__file="Favorites.vue",o.render||(o.render=e.render,o.staticRenderFns=e.staticRenderFns,o._compiled=!0,i&&(o.functional=!0)),o._scopeId=r,o}var Favorites=__vue_normalize__$i({render:__vue_render__$i,staticRenderFns:__vue_staticRenderFns__$i},__vue_inject_styles__$i,__vue_script__$g,__vue_scope_id__$i,__vue_is_functional_template__$i);let homeData={},cached$2=!1;async function getHomeData(){if(cached$2)return homeData;{const e=await fetchData("getHome");return homeData=e,cached$2=!0,e}}var script$h={components:{CoverContainer},data(){return{playlists:[],albums:[]}},async created(){const e=await getHomeData();this.initHome(e)},computed:{...mapGetters(["isLoggedIn"])},methods:{addToQueue(e){sendAddToQueue(e.currentTarget.dataset.link)},initHome(e){const{playlists:{data:a},albums:{data:n}}=e;this.playlists=a,this.albums=n}}};const __vue_script__$h=script$h;var __vue_render__$j=function(){var e=this,a=e.$createElement,n=e._self._c||a;return n("div",{attrs:{id:"home_tab"}},[n("h1",{staticClass:"mb-8 text-5xl"},[e._v(e._s(e.$t("globals.welcome")))]),e._v(" "),e.isLoggedIn?e._e():n("section",{ref:"notLogged",staticClass:"py-6 border-0 border-t border-solid border-grayscale-500"},[n("p",{staticClass:"mb-4",attrs:{id:"home_not_logged_text"}},[e._v(e._s(e.$t("home.needTologin")))]),e._v(" "),n("router-link",{staticClass:"btn btn-primary",attrs:{tag:"button",name:"button",to:{name:"Settings"}}},[e._v(` `+e._s(e.$t("home.openSettings"))+` `)])],1),e._v(" "),e.playlists.length?n("section",{staticClass:"py-6 border-0 border-t border-solid border-grayscale-500"},[n("h2",{staticClass:"mb-6 text-3xl"},[e._v(e._s(e.$t("home.sections.popularPlaylists")))]),e._v(" "),n("div",{staticClass:"release-grid"},e._l(e.playlists,function(r){return n("router-link",{key:r.id,staticClass:"release clickable",attrs:{tag:"div",to:{name:"Playlist",params:{id:r.id}},tabindex:"0"},nativeOn:{keyup:function(i){return!i.type.indexOf("key")&&e._k(i.keyCode,"enter",13,i.key,"Enter")?null:e.$router.push({name:"Playlist",params:{id:r.id}})}}},[n("CoverContainer",{attrs:{"is-rounded":"",cover:r.picture_medium,link:r.link},on:{click:function(i){return i.stopPropagation(),e.addToQueue(i)}}}),e._v(" "),n("p",{staticClass:"primary-text"},[e._v(e._s(r.title))]),e._v(" "),n("p",{staticClass:"secondary-text"},[e._v(` `+e._s(e.$t("globals.by",{artist:r.user.name})+" - "+e.$tc("globals.listTabs.trackN",r.nb_tracks))+` @@ -3040,7 +3040,7 @@ PERFORMANCE OF THIS SOFTWARE. `+e._s(e.$t("globals.by",{artist:r.artistName})+" - "+e.$tc("globals.listTabs.trackN",r.playlistTracksNumber))+` `)])],1)}),0)]],2)},__vue_staticRenderFns__$p=[];const __vue_inject_styles__$p=void 0,__vue_scope_id__$p=void 0,__vue_is_functional_template__$p=!1;function __vue_normalize__$p(e,a,n,r,i,s,l,c){const o=(typeof n=="function"?n.options:n)||{};return o.__file="ResultsPlaylists.vue",o.render||(o.render=e.render,o.staticRenderFns=e.staticRenderFns,o._compiled=!0,i&&(o.functional=!0)),o._scopeId=r,o}var ResultsPlaylists=__vue_normalize__$p({render:__vue_render__$p,staticRenderFns:__vue_staticRenderFns__$p},__vue_inject_styles__$p,__vue_script__$n,__vue_scope_id__$p,__vue_is_functional_template__$p),script$o={components:{TopResult,ResultsTracks,ResultsAlbums,ResultsArtists,ResultsPlaylists},props:{viewInfo:{type:Object,required:!1}},computed:{thereAreResults(){let e=!!this.viewInfo;if(!e)return!1;let a=this.viewInfo.ORDER.every(n=>n==="TOP_RESULT"?this.viewInfo[n].length===0:this.viewInfo[n].data.length===0);return!a}},methods:{convertDuration,upperCaseFirstLowerCaseRest,standardizeData,formatSingleTrack,formatAlbums,formatArtist,formatPlaylist,checkSectionResults(e){return e==="TOP_RESULT"?!!this.viewInfo.TOP_RESULT[0]:!!this.viewInfo[e].data[0]}}};const __vue_script__$o=script$o;var __vue_render__$q=function(){var e=this,a=e.$createElement,n=e._self._c||a;return n("section",[e.thereAreResults?e._l(e.viewInfo.ORDER,function(r){return n("section",{key:r,staticClass:"float-none py-5 border-t border-grayscale-500 first:border-t-0"},[e.checkSectionResults(r)?[n("h2",{staticClass:"mb-6 capitalize",class:{"text-4xl text-center":r==="TOP_RESULT","inline-block cursor-pointer text-3xl hover:text-primary transition-colors duration-200 ease-in-out":r!=="TOP_RESULT"},on:{click:function(i){return e.$emit("change-search-tab",r)}}},[e._v(` `+e._s(e.$tc("globals.listTabs."+r.toLowerCase(),2))+` - `)]),e._v(" "),r==="TOP_RESULT"?n("TopResult",{attrs:{info:e.viewInfo.TOP_RESULT[0]},on:{"add-to-queue":function(i){return e.$emit("add-to-queue",i)}}}):r==="TRACK"?n("ResultsTracks",{attrs:{viewInfo:e.standardizeData(e.viewInfo.TRACK,e.formatSingleTrack),itemsToShow:6},on:{"add-to-queue":function(i){return e.$emit("add-to-queue",i)}}}):r=="ALBUM"?n("ResultsAlbums",{attrs:{viewInfo:e.standardizeData(e.viewInfo.ALBUM,e.formatAlbums),itemsToShow:6},on:{"add-to-queue":function(i){return e.$emit("add-to-queue",i)}}}):r=="PLAYLIST"?n("ResultsPlaylists",{attrs:{viewInfo:e.standardizeData(e.viewInfo.PLAYLIST,e.formatPlaylist),itemsToShow:6},on:{"add-to-queue":function(i){return e.$emit("add-to-queue",i)}}}):r==="ARTIST"?n("ResultsArtists",{attrs:{viewInfo:e.standardizeData(e.viewInfo.ARTIST,e.formatArtist),itemsToShow:6},on:{"add-to-queue":function(i){return e.$emit("add-to-queue",i)}}}):e._e()]:e._e()],2)}):n("div",[n("h1",[e._v(e._s(e.$t("search.noResults")))])])],2)},__vue_staticRenderFns__$q=[];const __vue_inject_styles__$q=void 0,__vue_scope_id__$q=void 0,__vue_is_functional_template__$q=!1;function __vue_normalize__$q(e,a,n,r,i,s,l,c){const o=(typeof n=="function"?n.options:n)||{};return o.__file="ResultsAll.vue",o.render||(o.render=e.render,o.staticRenderFns=e.staticRenderFns,o._compiled=!0,i&&(o.functional=!0)),o._scopeId=r,o}var ResultsAll=__vue_normalize__$q({render:__vue_render__$q,staticRenderFns:__vue_staticRenderFns__$q},__vue_inject_styles__$q,__vue_script__$o,__vue_scope_id__$q,__vue_is_functional_template__$q);const searchResult=ref$2({});function performMainSearch(e){fetchApi("mainSearch",{term:e}).then(a=>{searchResult.value=a})}function useMainSearch(){return{searchResult,performMainSearch}}const result=ref$2({});function performSearch({term:e,type:a,start:n=0,nb:r=30}){fetchApi("search",{term:e,type:a,start:n,nb:r}).then(i=>{result.value=i})}function useSearch(){return{result,performSearch}}const resetObj={data:[],next:0,total:0,hasLoaded:!1},lastTab=ref$2(null);var script$p=defineComponent({components:{BaseLoadingPlaceholder,BaseTabs,BaseTab},props:{performScrolledSearch:{type:Boolean,required:!1}},setup(e,a){const n=reactive({currentTab:{name:"",searchType:"",component:{},viewInfo:"",formatFunc:()=>{}},results:{query:"",allTab:{ORDER:[],TOP_RESULT:[],ALBUM:{hasLoaded:!1},ARTIST:{hasLoaded:!1},TRACK:{hasLoaded:!1},PLAYLIST:{hasLoaded:!1}},trackTab:{...resetObj},albumTab:{...resetObj},artistTab:{...resetObj},playlistTab:{...resetObj}},tabs:[{name:a.root.$i18n.t("globals.listTabs.all"),searchType:"all",component:ResultsAll,viewInfo:"allTab"},{name:a.root.$i18n.tc("globals.listTabs.track",2),searchType:"track",component:ResultsTracks,viewInfo:"trackTab",formatFunc:formatSingleTrack},{name:a.root.$i18n.tc("globals.listTabs.album",2),searchType:"album",component:ResultsAlbums,viewInfo:"albumTab",formatFunc:formatAlbums},{name:a.root.$i18n.tc("globals.listTabs.artist",2),searchType:"artist",component:ResultsArtists,viewInfo:"artistTab",formatFunc:formatArtist},{name:a.root.$i18n.tc("globals.listTabs.playlist",2),searchType:"playlist",component:ResultsPlaylists,viewInfo:"playlistTab",formatFunc:formatPlaylist}]}),{searchResult:r,performMainSearch:i}=useMainSearch(),{result:s,performSearch:l}=useSearch(),c=computed(()=>a.root.$route.query.term),o=computed(()=>n.results.query===""),d=ref$2(!1),u=computed(()=>Object.keys(r.value).length!==0),f=computed(()=>r.value.QUERY!==c.value);u.value&&!f.value&&onMounted(()=>{h(r.value)}),c.value&&(!u.value||f.value)&&(i(c.value),d.value=!0);function h(m){d.value=!1,n.results.query=m.QUERY,n.results.allTab=m,n.results.allTab.TRACK.hasLoaded=!0,n.results.allTab.ALBUM.hasLoaded=!0,n.results.allTab.ARTIST.hasLoaded=!0,n.results.allTab.PLAYLIST.hasLoaded=!0,lastTab.value&&lastTab.value.searchType!=="all"?(n.currentTab=lastTab.value,l({term:m.QUERY,type:n.currentTab.searchType})):n.currentTab=n.tabs.find(v=>v.searchType==="all")}return watch(r,h),watch(s,m=>{const{next:v,total:y,type:k,data:w}=m,x=`${k}Tab`;let A=y;if(v&&(A=parseInt(v.match(/index=(\d*)/)[1])),n.results[x].total!==y&&(n.results[x].total=y),n.results[x].next!==A){n.results[x].next=A;const M=n.results[x].data.concat(w),D=uniqWith(M,(T,C)=>T.id===C.id);n.results[x].data=D}n.results[x].hasLoaded=!0}),n.currentTab=n.tabs.find(m=>m.searchType==="all"),{...toRefs(n),isSearching:d,isQueryEmpty:o,searchResult:r,performMainSearch:i,performSearch:l}},computed:{loadedTabs(){const e=[];for(const a in this.results)if(this.results.hasOwnProperty(a)&&a!=="query"){const n=this.results[a];n.hasLoaded&&e.push(a.replace(/Tab/g,""))}return e}},methods:{numberWithDots,convertDuration,addToQueue(e){sendAddToQueue(e.currentTarget.dataset.link)},getViewInfo(){return this.currentTab.searchType==="all"?this.results.allTab:standardizeData(this.results[this.currentTab.viewInfo],this.currentTab.formatFunc)},changeSearchTab(e){e=e.toLowerCase();const a=this.tabs.find(n=>n.searchType===e);if(!a){console.error(`No tab ${e} found`);return}window.scrollTo(0,0),this.currentTab=a,lastTab.value=a},scrolledSearch(){if(this.currentTab.searchType==="all")return;const e=`${this.currentTab.searchType}Tab`,a=this.results[e].next{searchResult.value=a})}function useMainSearch(){return{searchResult,performMainSearch}}const result=ref$2({});function performSearch({term:e,type:a,start:n=0,nb:r=30}){fetchData("search",{term:e,type:a,start:n,nb:r}).then(i=>{result.value=i})}function useSearch(){return{result,performSearch}}const resetObj={data:[],next:0,total:0,hasLoaded:!1},lastTab=ref$2(null);var script$p=defineComponent({components:{BaseLoadingPlaceholder,BaseTabs,BaseTab},props:{performScrolledSearch:{type:Boolean,required:!1}},setup(e,a){const n=reactive({currentTab:{name:"",searchType:"",component:{},viewInfo:"",formatFunc:()=>{}},results:{query:"",allTab:{ORDER:[],TOP_RESULT:[],ALBUM:{hasLoaded:!1},ARTIST:{hasLoaded:!1},TRACK:{hasLoaded:!1},PLAYLIST:{hasLoaded:!1}},trackTab:{...resetObj},albumTab:{...resetObj},artistTab:{...resetObj},playlistTab:{...resetObj}},tabs:[{name:a.root.$i18n.t("globals.listTabs.all"),searchType:"all",component:ResultsAll,viewInfo:"allTab"},{name:a.root.$i18n.tc("globals.listTabs.track",2),searchType:"track",component:ResultsTracks,viewInfo:"trackTab",formatFunc:formatSingleTrack},{name:a.root.$i18n.tc("globals.listTabs.album",2),searchType:"album",component:ResultsAlbums,viewInfo:"albumTab",formatFunc:formatAlbums},{name:a.root.$i18n.tc("globals.listTabs.artist",2),searchType:"artist",component:ResultsArtists,viewInfo:"artistTab",formatFunc:formatArtist},{name:a.root.$i18n.tc("globals.listTabs.playlist",2),searchType:"playlist",component:ResultsPlaylists,viewInfo:"playlistTab",formatFunc:formatPlaylist}]}),{searchResult:r,performMainSearch:i}=useMainSearch(),{result:s,performSearch:l}=useSearch(),c=computed(()=>a.root.$route.query.term),o=computed(()=>n.results.query===""),d=ref$2(!1),u=computed(()=>Object.keys(r.value).length!==0),f=computed(()=>r.value.QUERY!==c.value);u.value&&!f.value&&onMounted(()=>{h(r.value)}),c.value&&(!u.value||f.value)&&(i(c.value),d.value=!0);function h(m){d.value=!1,n.results.query=m.QUERY,n.results.allTab=m,n.results.allTab.TRACK.hasLoaded=!0,n.results.allTab.ALBUM.hasLoaded=!0,n.results.allTab.ARTIST.hasLoaded=!0,n.results.allTab.PLAYLIST.hasLoaded=!0,lastTab.value&&lastTab.value.searchType!=="all"?(n.currentTab=lastTab.value,l({term:m.QUERY,type:n.currentTab.searchType})):n.currentTab=n.tabs.find(v=>v.searchType==="all")}return watch(r,h),watch(s,m=>{const{next:v,total:y,type:k,data:w}=m,x=`${k}Tab`;let A=y;if(v&&(A=parseInt(v.match(/index=(\d*)/)[1])),n.results[x].total!==y&&(n.results[x].total=y),n.results[x].next!==A){n.results[x].next=A;const M=n.results[x].data.concat(w),D=uniqWith(M,(T,C)=>T.id===C.id);n.results[x].data=D}n.results[x].hasLoaded=!0}),n.currentTab=n.tabs.find(m=>m.searchType==="all"),{...toRefs(n),isSearching:d,isQueryEmpty:o,searchResult:r,performMainSearch:i,performSearch:l}},computed:{loadedTabs(){const e=[];for(const a in this.results)if(this.results.hasOwnProperty(a)&&a!=="query"){const n=this.results[a];n.hasLoaded&&e.push(a.replace(/Tab/g,""))}return e}},methods:{numberWithDots,convertDuration,addToQueue(e){sendAddToQueue(e.currentTarget.dataset.link)},getViewInfo(){return this.currentTab.searchType==="all"?this.results.allTab:standardizeData(this.results[this.currentTab.viewInfo],this.currentTab.formatFunc)},changeSearchTab(e){e=e.toLowerCase();const a=this.tabs.find(n=>n.searchType===e);if(!a){console.error(`No tab ${e} found`);return}window.scrollTo(0,0),this.currentTab=a,lastTab.value=a},scrolledSearch(){if(this.currentTab.searchType==="all")return;const e=`${this.currentTab.searchType}Tab`,a=this.results[e].next @@ -4827,5 +4827,5 @@ PERFORMANCE OF THIS SOFTWARE. `)]),e._v(" "),n("td",[e._v(e._s(r.artists[0].name))]),e._v(" "),n("td",[e._v(e._s(r.album.name))]),e._v(" "),n("td",[e._v(e._s(e.convertDuration(Math.floor(r.duration_ms/1e3))))]),e._v(" "),n("td",[n("input",{directives:[{name:"model",rawName:"v-model",value:r.selected,expression:"track.selected"}],staticClass:"clickable",attrs:{type:"checkbox"},domProps:{checked:Array.isArray(r.selected)?e._i(r.selected,null)>-1:r.selected},on:{change:function(s){var l=r.selected,c=s.target,o=!!c.checked;if(Array.isArray(l)){var d=null,u=e._i(l,d);c.checked?u<0&&e.$set(r,"selected",l.concat([d])):u>-1&&e.$set(r,"selected",l.slice(0,u).concat(l.slice(u+1)))}else e.$set(r,"selected",o)}}})])])})],2)]),e._v(" "),e.label?n("span",{staticStyle:{opacity:"0.4","margin-top":"8px",display:"inline-block","font-size":"13px"}},[e._v(e._s(e.label))]):e._e(),e._v(" "),n("footer",{staticClass:"bg-background-main"},[n("button",{staticClass:"mr-2 btn btn-primary",attrs:{"data-link":e.link},on:{click:function(r){return r.stopPropagation(),e.addToQueue(r)}}},[e._v(` `+e._s(""+e.$t("globals.download",{thing:e.$tc("globals.listTabs."+e.type,1)}))+` `)]),e._v(" "),n("button",{staticClass:"flex items-center btn btn-primary",attrs:{"data-link":e.selectedLinks()},on:{click:function(r){return r.stopPropagation(),e.addToQueue(r)}}},[e._v(` - `+e._s(e.$t("tracklist.downloadSelection"))),n("i",{staticClass:"ml-2 material-icons"},[e._v("file_download")])])])])},__vue_staticRenderFns__$v=[function(){var e=this,a=e.$createElement,n=e._self._c||a;return n("th",[n("i",{staticClass:"material-icons"},[e._v("music_note")])])},function(){var e=this,a=e.$createElement,n=e._self._c||a;return n("th",[n("i",{staticClass:"material-icons"},[e._v("timer")])])},function(){var e=this,a=e.$createElement,n=e._self._c||a;return n("td",[n("div",{staticClass:"table__cell-content table__cell-content--vertical-center",staticStyle:{opacity:"0.54"}},[n("i",{staticClass:"material-icons"},[e._v("album")])])])}];const __vue_inject_styles__$v=void 0,__vue_scope_id__$v=void 0,__vue_is_functional_template__$v=!1;function __vue_normalize__$v(e,a,n,r,i,s,l,c){const o=(typeof n=="function"?n.options:n)||{};return o.__file="Tracklist.vue",o.render||(o.render=e.render,o.staticRenderFns=e.staticRenderFns,o._compiled=!0,i&&(o.functional=!0)),o._scopeId=r,o}var Tracklist=__vue_normalize__$v({render:__vue_render__$v,staticRenderFns:__vue_staticRenderFns__$v},__vue_inject_styles__$v,__vue_script__$t,__vue_scope_id__$v,__vue_is_functional_template__$v);Vue.use(VueRouter);const routes=[{path:window.location.pathname,name:"Home",component:Home,meta:{notKeepAlive:!0}},{path:"/tracklist/:type/:id",name:"Tracklist",component:Tracklist},{path:"/artist/:id",name:"Artist",component:Artist,meta:{notKeepAlive:!0}},{path:"/album/:id",name:"Album",component:Tracklist},{path:"/playlist/:id",name:"Playlist",component:Tracklist},{path:"/spotify-playlist/:id",name:"Spotify Playlist",component:Tracklist},{path:"/charts",name:"Charts",component:Charts,meta:{notKeepAlive:!0}},{path:"/favorites",name:"Favorites",component:Favorites,meta:{notKeepAlive:!0}},{path:"/errors",name:"Errors",component:Errors},{path:"/link-analyzer",name:"Link Analyzer",component:LinkAnalyzer},{path:"/info-arl",name:"ARL",component:InfoArl},{path:"/info-spotify",name:"Spotify Features",component:InfoSpotifyFeatures},{path:"/settings",name:"Settings",component:Settings},{path:"/search",name:"Search",component:Search,meta:{notKeepAlive:!0}},{path:"*",component:Home}],router=new VueRouter({mode:"history",routes,scrollBehavior(e,a,n){return{x:0,y:0}}});router.beforeEach((e,a,n)=>{let r=null;switch(e.name){case"Tracklist":r={type:e.params.type,id:e.params.id};break;case"Album":r={type:"album",id:e.params.id};break;case"Playlist":r={type:"playlist",id:e.params.id};break;case"Spotify Playlist":r={type:"spotifyplaylist",id:e.params.id};break}r&&socket.emit("getTracklist",r),n()});async function startApp(){new Vue({store,router,i18n,render:a=>a(App)}).$mount("#app");const e=await(await fetch("connect")).json();if(store.dispatch("setAppInfo",e.update),e.autologin){console.info("Autologin successful");let a=localStorage.getItem("arl");const n=localStorage.getItem("accountNum");if(a){a=a.trim();let r;n!==0?r=fetchApi("login",{arl:a,force:!0,child:n||0}):r=fetchApi("login",{arl:a}),r.then(loggedIn)}}}function initClient(){store.dispatch("setClientMode",!0),setClientModeKeyBindings()}document.addEventListener("DOMContentLoaded",startApp),window.addEventListener("pywebviewready",initClient),document.addEventListener("paste",e=>{if(e.target.localName==="input")return;let a=e.clipboardData.getData("Text");if(isValidURL(a))router.currentRoute.name==="Link Analyzer"?socket.emit("analyzeLink",a):(a.indexOf(` -`)!=-1&&(a=a.replace(/\n/g,";")),sendAddToQueue(a));else{let n=document.querySelector("#searchbar");n.select(),n.setSelectionRange(0,99999)}});function setClientModeKeyBindings(){document.addEventListener("keyup",e=>{e.altKey&&e.key==="ArrowLeft"&&router.back(),e.altKey&&e.key==="ArrowRight"&&router.forward()})}socket.on("message",function(e){console.log(e)});function loggedIn(e){const{status:a,user:n}=e;switch(a){case 1:case 3:toast(i18n.t("toasts.loggedIn"),"done",!0,"login-toast"),store.dispatch("login",e);break;case 2:toast(i18n.t("toasts.alreadyLogged"),"done",!0,"login-toast"),store.dispatch("setUser",n);break;case 0:toast(i18n.t("toasts.loginFailed"),"close",!0,"login-toast"),store.dispatch("removeARL");break;case-1:toast(i18n.t("toasts.deezerNotAvailable"),"close",!0,"login-toast");return}}socket.on("restoringQueue",function(){toast(i18n.t("toasts.restoringQueue"),"loading",!1,"restoring_queue")}),socket.on("cancellingCurrentItem",function(e){toast(i18n.t("toasts.cancellingCurrentItem"),"loading",!1,"cancelling_"+e)}),socket.on("currentItemCancelled",function(e){toast(i18n.t("toasts.currentItemCancelled"),"done",!0,"cancelling_"+e)}),socket.on("startAddingArtist",function(e){toast(i18n.t("toasts.startAddingArtist",{artist:e.name}),"loading",!1,"artist_"+e.id)}),socket.on("finishAddingArtist",function(e){toast(i18n.t("toasts.finishAddingArtist",{artist:e.name}),"done",!0,"artist_"+e.id)}),socket.on("startConvertingSpotifyPlaylist",function(e){toast(i18n.t("toasts.startConvertingSpotifyPlaylist"),"loading",!1,"spotifyplaylist_"+e)}),socket.on("finishConvertingSpotifyPlaylist",function(e){toast(i18n.t("toasts.finishConvertingSpotifyPlaylist"),"done",!0,"spotifyplaylist_"+e)}),socket.on("errorMessage",function(e){toast(e,"error")}),socket.on("queueError",function(e){e.errid?toast(e.link+" - "+i18n.t(`errors.ids.${e.errid}`),"error"):toast(e.link+" - "+e.error,"error")}),socket.on("alreadyInQueue",function(e){toast(i18n.t("toasts.alreadyInQueue",{item:e.title}),"playlist_add_check")}),socket.on("loginNeededToDownload",function(e){toast(i18n.t("toasts.loginNeededToDownload"),"report")}),socket.on("startGeneratingItems",function(e){toast(i18n.t("toasts.startGeneratingItems",{n:e.total}),"loading",!1,"batch_"+e.uuid)}),socket.on("finishGeneratingItems",function(e){toast(i18n.t("toasts.finishGeneratingItems",{n:e.total}),"done",!0,"batch_"+e.uuid)}); + `+e._s(e.$t("tracklist.downloadSelection"))),n("i",{staticClass:"ml-2 material-icons"},[e._v("file_download")])])])])},__vue_staticRenderFns__$v=[function(){var e=this,a=e.$createElement,n=e._self._c||a;return n("th",[n("i",{staticClass:"material-icons"},[e._v("music_note")])])},function(){var e=this,a=e.$createElement,n=e._self._c||a;return n("th",[n("i",{staticClass:"material-icons"},[e._v("timer")])])},function(){var e=this,a=e.$createElement,n=e._self._c||a;return n("td",[n("div",{staticClass:"table__cell-content table__cell-content--vertical-center",staticStyle:{opacity:"0.54"}},[n("i",{staticClass:"material-icons"},[e._v("album")])])])}];const __vue_inject_styles__$v=void 0,__vue_scope_id__$v=void 0,__vue_is_functional_template__$v=!1;function __vue_normalize__$v(e,a,n,r,i,s,l,c){const o=(typeof n=="function"?n.options:n)||{};return o.__file="Tracklist.vue",o.render||(o.render=e.render,o.staticRenderFns=e.staticRenderFns,o._compiled=!0,i&&(o.functional=!0)),o._scopeId=r,o}var Tracklist=__vue_normalize__$v({render:__vue_render__$v,staticRenderFns:__vue_staticRenderFns__$v},__vue_inject_styles__$v,__vue_script__$t,__vue_scope_id__$v,__vue_is_functional_template__$v);Vue.use(VueRouter);const routes=[{path:window.location.pathname,name:"Home",component:Home,meta:{notKeepAlive:!0}},{path:"/tracklist/:type/:id",name:"Tracklist",component:Tracklist},{path:"/artist/:id",name:"Artist",component:Artist,meta:{notKeepAlive:!0}},{path:"/album/:id",name:"Album",component:Tracklist},{path:"/playlist/:id",name:"Playlist",component:Tracklist},{path:"/spotify-playlist/:id",name:"Spotify Playlist",component:Tracklist},{path:"/charts",name:"Charts",component:Charts,meta:{notKeepAlive:!0}},{path:"/favorites",name:"Favorites",component:Favorites,meta:{notKeepAlive:!0}},{path:"/errors",name:"Errors",component:Errors},{path:"/link-analyzer",name:"Link Analyzer",component:LinkAnalyzer},{path:"/info-arl",name:"ARL",component:InfoArl},{path:"/info-spotify",name:"Spotify Features",component:InfoSpotifyFeatures},{path:"/settings",name:"Settings",component:Settings},{path:"/search",name:"Search",component:Search,meta:{notKeepAlive:!0}},{path:"*",component:Home}],router=new VueRouter({mode:"history",routes,scrollBehavior(e,a,n){return{x:0,y:0}}});router.beforeEach((e,a,n)=>{let r=null;switch(e.name){case"Tracklist":r={type:e.params.type,id:e.params.id};break;case"Album":r={type:"album",id:e.params.id};break;case"Playlist":r={type:"playlist",id:e.params.id};break;case"Spotify Playlist":r={type:"spotifyplaylist",id:e.params.id};break}r&&socket.emit("getTracklist",r),n()});async function startApp(){new Vue({store,router,i18n,render:a=>a(App)}).$mount("#app");const e=await(await fetch("connect")).json();if(store.dispatch("setAppInfo",e.update),e.autologin){console.info("Autologin successful");let a=localStorage.getItem("arl");const n=localStorage.getItem("accountNum");if(a){a=a.trim();let r;n!==0?r=await fetchData("login",{arl:a,force:!0,child:n||0}):r=await fetchData("login",{arl:a}),loggedIn(r)}}}function initClient(){store.dispatch("setClientMode",!0),setClientModeKeyBindings()}document.addEventListener("DOMContentLoaded",startApp),window.addEventListener("pywebviewready",initClient),document.addEventListener("paste",e=>{if(e.target.localName==="input")return;let a=e.clipboardData.getData("Text");if(isValidURL(a))router.currentRoute.name==="Link Analyzer"?socket.emit("analyzeLink",a):(a.indexOf(` +`)!=-1&&(a=a.replace(/\n/g,";")),sendAddToQueue(a));else{let n=document.querySelector("#searchbar");n.select(),n.setSelectionRange(0,99999)}});function setClientModeKeyBindings(){document.addEventListener("keyup",e=>{e.altKey&&e.key==="ArrowLeft"&&router.back(),e.altKey&&e.key==="ArrowRight"&&router.forward()})}socket.on("message",function(e){console.log(e)});function loggedIn(e){console.log({data:e});const{status:a,user:n}=e;switch(a){case 1:case 3:toast(i18n.t("toasts.loggedIn"),"done",!0,"login-toast"),store.dispatch("login",e);break;case 2:toast(i18n.t("toasts.alreadyLogged"),"done",!0,"login-toast"),store.dispatch("setUser",n);break;case 0:toast(i18n.t("toasts.loginFailed"),"close",!0,"login-toast"),store.dispatch("removeARL");break;case-1:toast(i18n.t("toasts.deezerNotAvailable"),"close",!0,"login-toast");return}}socket.on("restoringQueue",function(){toast(i18n.t("toasts.restoringQueue"),"loading",!1,"restoring_queue")}),socket.on("cancellingCurrentItem",function(e){toast(i18n.t("toasts.cancellingCurrentItem"),"loading",!1,"cancelling_"+e)}),socket.on("currentItemCancelled",function(e){toast(i18n.t("toasts.currentItemCancelled"),"done",!0,"cancelling_"+e)}),socket.on("startAddingArtist",function(e){toast(i18n.t("toasts.startAddingArtist",{artist:e.name}),"loading",!1,"artist_"+e.id)}),socket.on("finishAddingArtist",function(e){toast(i18n.t("toasts.finishAddingArtist",{artist:e.name}),"done",!0,"artist_"+e.id)}),socket.on("startConvertingSpotifyPlaylist",function(e){toast(i18n.t("toasts.startConvertingSpotifyPlaylist"),"loading",!1,"spotifyplaylist_"+e)}),socket.on("finishConvertingSpotifyPlaylist",function(e){toast(i18n.t("toasts.finishConvertingSpotifyPlaylist"),"done",!0,"spotifyplaylist_"+e)}),socket.on("errorMessage",function(e){toast(e,"error")}),socket.on("queueError",function(e){e.errid?toast(e.link+" - "+i18n.t(`errors.ids.${e.errid}`),"error"):toast(e.link+" - "+e.error,"error")}),socket.on("alreadyInQueue",function(e){toast(i18n.t("toasts.alreadyInQueue",{item:e.title}),"playlist_add_check")}),socket.on("loginNeededToDownload",function(e){toast(i18n.t("toasts.loginNeededToDownload"),"report")}),socket.on("startGeneratingItems",function(e){toast(i18n.t("toasts.startGeneratingItems",{n:e.total}),"loading",!1,"batch_"+e.uuid)}),socket.on("finishGeneratingItems",function(e){toast(i18n.t("toasts.finishGeneratingItems",{n:e.total}),"done",!0,"batch_"+e.uuid)}); diff --git a/src/app.js b/src/app.js index a26873a..2e99316 100644 --- a/src/app.js +++ b/src/app.js @@ -19,7 +19,7 @@ import router from '@/router' import store from '@/store' import { socket } from '@/utils/socket' -import { fetchApi } from '@/utils/api' +import { fetchData } from '@/utils/api' import { toast } from '@/utils/toasts' import { isValidURL } from '@/utils/utils' import { sendAddToQueue } from '@/utils/downloads' @@ -47,12 +47,12 @@ async function startApp() { let result if (accountNum !== 0) { - result = fetchApi('login', { arl, force: true, child: accountNum || 0 }) + result = await fetchData('login', { arl, force: true, child: accountNum || 0 }) } else { - result = fetchApi('login', { arl }) + result = await fetchData('login', { arl }) } - result.then(loggedIn) + loggedIn(result) } } } @@ -111,6 +111,7 @@ socket.on('message', function (msg) { }) function loggedIn(data) { + console.log({ data }) const { status, user } = data switch (status) { diff --git a/src/data/home.js b/src/data/home.js index 9ef1862..fe9e33b 100644 --- a/src/data/home.js +++ b/src/data/home.js @@ -1,22 +1,17 @@ -import { socket } from '@/utils/socket' +import { fetchData } from '@/utils/api' let homeData = {} let cached = false -export function getHomeData() { +export async function getHomeData() { if (cached) { return homeData } else { - socket.emit('get_home_data') + const data = await fetchData('getHome') - return new Promise((resolve, reject) => { - socket.on('init_home', data => { - homeData = data - cached = true + homeData = data + cached = true - socket.off('init_home') - resolve(data) - }) - }) + return data } } diff --git a/src/use/main-search.js b/src/use/main-search.js index a850b70..de18035 100644 --- a/src/use/main-search.js +++ b/src/use/main-search.js @@ -1,10 +1,10 @@ import { ref } from '@vue/composition-api' -import { fetchApi } from '@/utils/api' +import { fetchData } from '@/utils/api' const searchResult = ref({}) function performMainSearch(searchTerm) { - fetchApi('mainSearch', { term: searchTerm }).then(data => { + fetchData('mainSearch', { term: searchTerm }).then(data => { searchResult.value = data }) } diff --git a/src/use/search.js b/src/use/search.js index 7cdef54..9546988 100644 --- a/src/use/search.js +++ b/src/use/search.js @@ -1,10 +1,10 @@ import { ref } from '@vue/composition-api' -import { fetchApi } from '@/utils/api' +import { fetchData } from '@/utils/api' const result = ref({}) function performSearch({ term, type, start = 0, nb = 30 }) { - fetchApi('search', { + fetchData('search', { term, type, start, diff --git a/src/utils/api.js b/src/utils/api.js index 7e537e0..7b8c4b5 100644 --- a/src/utils/api.js +++ b/src/utils/api.js @@ -1,4 +1,4 @@ -export function fetchApi(key, data) { +export function fetchData(key, data = {}) { const url = new URL(`${window.location.origin}/api/${key}`) Object.keys(data).forEach(key => { @@ -7,3 +7,13 @@ export function fetchApi(key, data) { return fetch(url.href).then(response => response.json()) } + +export function sendToServer(key, data) { + const url = new URL(`${window.location.origin}/api/${key}`) + + Object.keys(data).forEach(key => { + url.searchParams.append(key, data[key]) + }) + + fetch(url.href).catch(console.error) +} diff --git a/src/utils/downloads.js b/src/utils/downloads.js index c74a98a..5f3287f 100644 --- a/src/utils/downloads.js +++ b/src/utils/downloads.js @@ -1,13 +1,13 @@ -import { fetchApi } from '@/utils/api' +import { sendToServer } from '@/utils/api' /** * @param {string} url - * @param {number} bitrate + * @param {number|null} bitrate */ export function sendAddToQueue(url, bitrate = null) { if (!url) throw new Error('No URL given to sendAddToQueue function!') - fetchApi('addToQueue', { url, bitrate }) + sendToServer('addToQueue', { url, bitrate }) } export function aggregateDownloadLinks(releases) {