mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-06 08:30:29 +00:00
1 line
38 KiB
JavaScript
1 line
38 KiB
JavaScript
(()=>{var e={847(e,t,r){var n,o;n=function(){"use strict";function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function t(e,t,r){return t=l(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,c()?Reflect.construct(t,r||[],l(e).constructor):t.apply(e,r))}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,f(n.key),n)}}function i(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(t,r){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,r){if(t){if("string"==typeof t)return e(t,r);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?e(t,r):void 0}}(t))||r&&t&&"number"==typeof t.length){n&&(t=n);var o=0,i=function(){};return{s:i,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var e=n.next();return s=e.done,e},e:function(e){l=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(l)throw a}}}}function s(){return s="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=l(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},s.apply(null,arguments)}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(c=function(){return!!e})()}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function f(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}!function(e){e.AbortSignal,e.AbortController}("undefined"!=typeof self?self:r.g);var p=function(){return i(function e(){n(this,e),Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})},[{key:"addEventListener",value:function(e,t,r){e in this.listeners||(this.listeners[e]=[]),this.listeners[e].push({callback:t,options:r})}},{key:"removeEventListener",value:function(e,t){if(e in this.listeners)for(var r=this.listeners[e],n=0,o=r.length;n<o;n++)if(r[n].callback===t)return void r.splice(n,1)}},{key:"dispatchEvent",value:function(e){var t=this;if(e.type in this.listeners){for(var r=this.listeners[e.type].slice(),n=function(){var n=r[o];try{n.callback.call(t,e)}catch(e){Promise.resolve().then(function(){throw e})}n.options&&n.options.once&&t.removeEventListener(e.type,n.callback)},o=0,i=r.length;o<i;o++)n();return!e.defaultPrevented}}}])}(),d=function(e){function r(){var e;return n(this,r),(e=t(this,r)).listeners||p.call(e),Object.defineProperty(e,"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(e,"onabort",{value:null,writable:!0,configurable:!0}),Object.defineProperty(e,"reason",{value:void 0,writable:!0,configurable:!0}),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(r,e),i(r,[{key:"toString",value:function(){return"[object AbortSignal]"}},{key:"dispatchEvent",value:function(e){var t,n,o,i,a;"abort"===e.type&&(this.aborted=!0,"function"==typeof this.onabort&&this.onabort.call(this,e)),(t=r,n="dispatchEvent",o=this,a=s(l(1&(i=3)?t.prototype:t),n,o),2&i&&"function"==typeof a?function(e){return a.apply(o,e)}:a)([e])}},{key:"throwIfAborted",value:function(){var e=this.aborted,t=this.reason;if(e)throw void 0===t?"Aborted":t}}],[{key:"timeout",value:function(e){var t=new h;return setTimeout(function(){return t.abort(new DOMException("This signal is timeout in ".concat(e,"ms"),"TimeoutError"))},e),t.signal}},{key:"any",value:function(e){var t=new h;function r(){t.abort(this.reason),function(){var t,n=a(e);try{for(n.s();!(t=n.n()).done;)t.value.removeEventListener("abort",r)}catch(e){n.e(e)}finally{n.f()}}()}var n,o=a(e);try{for(o.s();!(n=o.n()).done;){var i=n.value;if(i.aborted){t.abort(i.reason);break}i.addEventListener("abort",r)}}catch(e){o.e(e)}finally{o.f()}return t.signal}}])}(p),h=function(){return i(function e(){n(this,e),Object.defineProperty(this,"signal",{value:new d,writable:!0,configurable:!0})},[{key:"abort",value:function(e){var t=function(e){if(void 0===e)if("undefined"==typeof document)(e=new Error("This operation was aborted")).name="AbortError";else try{e=new DOMException("signal is aborted without reason"),Object.defineProperty(e,"name",{value:"AbortError"})}catch(t){(e=new Error("This operation was aborted")).name="AbortError"}return e}(e),r=function(e){var t;try{t=new Event("abort")}catch(e){"undefined"!=typeof document?document.createEvent?(t=document.createEvent("Event")).initEvent("abort",!1,!1):(t=document.createEventObject()).type="abort":t={type:"abort",bubbles:!1,cancelable:!1}}return t.reason=e,t}(t);this.signal.reason=t,this.signal.dispatchEvent(r)}},{key:"toString",value:function(){return"[object AbortController]"}}])}();"undefined"!=typeof Symbol&&Symbol.toStringTag&&(h.prototype[Symbol.toStringTag]="AbortController",d.prototype[Symbol.toStringTag]="AbortSignal"),function(e){(function(e){return e.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):"function"==typeof e.Request&&!e.Request.prototype.hasOwnProperty("signal")||!e.AbortController})(e)&&(e.AbortController=h,e.AbortSignal=d)}("undefined"!=typeof self?self:r.g)},void 0===(o=n.call(t,r,t,e))||(e.exports=o)},203(e,t,r){var n,o,i;i="undefined"!=typeof self&&self||"undefined"!=typeof window&&window||void 0!==r.g&&r.g||this,n=function(e){"use strict";var t=i.BlobBuilder||i.WebKitBlobBuilder||i.MSBlobBuilder||i.MozBlobBuilder,r=i.URL||i.webkitURL||function(e,t){return(t=document.createElement("a")).href=e,t},n=i.Blob,o=r.createObjectURL,a=r.revokeObjectURL,s=i.Symbol&&i.Symbol.toStringTag,l=!1,c=!1,u=t&&t.prototype.append&&t.prototype.getBlob;try{l=2===new Blob(["ä"]).size,c=2===new Blob([new Uint8Array([1,2])]).size}catch(e){}function f(e){return e.map(function(e){if(e.buffer instanceof ArrayBuffer){var t=e.buffer;if(e.byteLength!==t.byteLength){var r=new Uint8Array(e.byteLength);r.set(new Uint8Array(t,e.byteOffset,e.byteLength)),t=r.buffer}return t}return e})}function p(e,r){r=r||{};var n=new t;return f(e).forEach(function(e){n.append(e)}),r.type?n.getBlob(r.type):n.getBlob()}function d(e,t){return new n(f(e),t||{})}i.Blob&&(p.prototype=Blob.prototype,d.prototype=Blob.prototype);var h="function"==typeof TextEncoder?TextEncoder.prototype.encode.bind(new TextEncoder):function(e){for(var t=0,r=e.length,n=i.Uint8Array||Array,o=0,a=Math.max(32,r+(r>>1)+7),s=new n(a>>3<<3);t<r;){var l=e.charCodeAt(t++);if(l>=55296&&l<=56319){if(t<r){var c=e.charCodeAt(t);56320==(64512&c)&&(++t,l=((1023&l)<<10)+(1023&c)+65536)}if(l>=55296&&l<=56319)continue}if(o+4>s.length){a+=8,a=(a*=1+t/e.length*2)>>3<<3;var u=new Uint8Array(a);u.set(s),s=u}if(4294967168&l){if(4294965248&l)if(4294901760&l){if(4292870144&l)continue;s[o++]=l>>18&7|240,s[o++]=l>>12&63|128,s[o++]=l>>6&63|128}else s[o++]=l>>12&15|224,s[o++]=l>>6&63|128;else s[o++]=l>>6&31|192;s[o++]=63&l|128}else s[o++]=l}return s.slice(0,o)},y="function"==typeof TextDecoder?TextDecoder.prototype.decode.bind(new TextDecoder):function(e){for(var t=e.length,r=[],n=0;n<t;){var o,i,a,s,l=e[n],c=null,u=l>239?4:l>223?3:l>191?2:1;if(n+u<=t)switch(u){case 1:l<128&&(c=l);break;case 2:128==(192&(o=e[n+1]))&&(s=(31&l)<<6|63&o)>127&&(c=s);break;case 3:o=e[n+1],i=e[n+2],128==(192&o)&&128==(192&i)&&(s=(15&l)<<12|(63&o)<<6|63&i)>2047&&(s<55296||s>57343)&&(c=s);break;case 4:o=e[n+1],i=e[n+2],a=e[n+3],128==(192&o)&&128==(192&i)&&128==(192&a)&&(s=(15&l)<<18|(63&o)<<12|(63&i)<<6|63&a)>65535&&s<1114112&&(c=s)}null===c?(c=65533,u=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),n+=u}for(var f=r.length,p="",d=0;d<f;)p+=String.fromCharCode.apply(String,r.slice(d,d+=4096));return p};function b(){var t=!!i.ActiveXObject||"-ms-scroll-limit"in document.documentElement.style&&"-ms-ime-align"in document.documentElement.style,r=i.XMLHttpRequest&&i.XMLHttpRequest.prototype.send;t&&r&&(XMLHttpRequest.prototype.send=function(e){e instanceof Blob?(this.setRequestHeader("Content-Type",e.type),r.call(this,e)):r.call(this,e)});try{new File([],""),e.File=i.File,e.FileReader=i.FileReader}catch(t){try{e.File=new Function('class File extends Blob {constructor(chunks, name, opts) {opts = opts || {};super(chunks, opts || {});this.name = name.replace(/\\//g, ":");this.lastModifiedDate = opts.lastModified ? new Date(opts.lastModified) : new Date();this.lastModified = +this.lastModifiedDate;}};return new File([], ""), File')()}catch(t){e.File=function(e,t,r){var n=new Blob(e,r),o=r&&void 0!==r.lastModified?new Date(r.lastModified):new Date;return n.name=t.replace(/\//g,":"),n.lastModifiedDate=o,n.lastModified=+o,n.toString=function(){return"[object File]"},s&&(n[s]="File"),n}}}}l?(b(),e.Blob=c?i.Blob:d):u?(b(),e.Blob=p):function(){function t(e){for(var t=new Array(e.byteLength),r=new Uint8Array(e),n=t.length;n--;)t[n]=r[n];return t}function n(e){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r=[],n=0;n<e.length;n+=3){var o=e[n],i=n+1<e.length,a=i?e[n+1]:0,s=n+2<e.length,l=s?e[n+2]:0,c=o>>2,u=(3&o)<<4|a>>4,f=(15&a)<<2|l>>6,p=63&l;s||(p=64,i||(f=64)),r.push(t[c],t[u],t[f],t[p])}return r.join("")}var s=Object.create||function(e){function t(){}return t.prototype=e,new t};function l(e){return Object.prototype.toString.call(e).slice(8,-1)}function c(e,t){return"object"==typeof e&&Object.prototype.isPrototypeOf.call(e.prototype,t)}function u(e){return"DataView"===l(e)||c(i.DataView,e)}var f=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","ArrayBuffer"];function p(e){return t=f,r=l(e),-1!==t.indexOf(r)||c(i.ArrayBuffer,e);var t,r}function d(e,r){r=null==r?{}:r;for(var n=0,o=(e=e?e.slice():[]).length;n<o;n++){var a=e[n];a instanceof d?e[n]=a._buffer:"string"==typeof a?e[n]=h(a):u(a)?e[n]=t(a.buffer):p(a)?e[n]=t(a):e[n]=h(String(a))}this._buffer=i.Uint8Array?function(e){for(var t=0,r=e.length;r--;)t+=e[r].length;for(var n=new Uint8Array(t),o=0,i=0;i<e.length;i++){var a=e[i];n.set(a,o),o+=a.byteLength||a.length}return n}(e):[].concat.apply([],e),this.size=this._buffer.length,this.type=r.type||"",/[^\u0020-\u007E]/.test(this.type)?this.type="":this.type=this.type.toLowerCase()}function b(e,t,r){r=r||{};var n=d.call(this,e,r)||this;return n.name=t.replace(/\//g,":"),n.lastModifiedDate=r.lastModified?new Date(r.lastModified):new Date,n.lastModified=+n.lastModifiedDate,n}if(d.prototype.arrayBuffer=function(){return Promise.resolve(this._buffer.buffer||this._buffer)},d.prototype.text=function(){return Promise.resolve(y(this._buffer))},d.prototype.slice=function(e,t,r){return new d([this._buffer.slice(e||0,t||this._buffer.length)],{type:r})},d.prototype.toString=function(){return"[object Blob]"},b.prototype=s(d.prototype),b.prototype.constructor=b,Object.setPrototypeOf)Object.setPrototypeOf(b,d);else try{b.__proto__=d}catch(e){}function g(){if(!(this instanceof g))throw new TypeError("Failed to construct 'FileReader': Please use the 'new' operator, this DOM object constructor cannot be called as a function.");var e=document.createDocumentFragment();this.addEventListener=e.addEventListener,this.dispatchEvent=function(t){var r=this["on"+t.type];"function"==typeof r&&r(t),e.dispatchEvent(t)},this.removeEventListener=e.removeEventListener}function v(e,t,r){if(!(t instanceof d))throw new TypeError("Failed to execute '"+r+"' on 'FileReader': parameter 1 is not of type 'Blob'.");e.result="",setTimeout(function(){this.readyState=g.LOADING,e.dispatchEvent(new Event("load")),e.dispatchEvent(new Event("loadend"))})}b.prototype.toString=function(){return"[object File]"},g.EMPTY=0,g.LOADING=1,g.DONE=2,g.prototype.error=null,g.prototype.onabort=null,g.prototype.onerror=null,g.prototype.onload=null,g.prototype.onloadend=null,g.prototype.onloadstart=null,g.prototype.onprogress=null,g.prototype.readAsDataURL=function(e){v(this,e,"readAsDataURL"),this.result="data:"+e.type+";base64,"+n(e._buffer)},g.prototype.readAsText=function(e){v(this,e,"readAsText"),this.result=y(e._buffer)},g.prototype.readAsArrayBuffer=function(e){v(this,e,"readAsText"),this.result=(e._buffer.buffer||e._buffer).slice()},g.prototype.abort=function(){},r.createObjectURL=function(e){return e instanceof d?"data:"+e.type+";base64,"+n(e._buffer):o.call(r,e)},r.revokeObjectURL=function(e){a&&a.call(r,e)};var w=i.XMLHttpRequest&&i.XMLHttpRequest.prototype.send;w&&(XMLHttpRequest.prototype.send=function(e){e instanceof d?(this.setRequestHeader("Content-Type",e.type),w.call(this,y(e._buffer))):w.call(this,e)}),e.Blob=d,e.File=b,e.FileReader=g,e.URL=r}(),s&&(e.File.prototype[s]||(e.File.prototype[s]="File"),e.Blob.prototype[s]||(e.Blob.prototype[s]="Blob"),e.FileReader.prototype[s]||(e.FileReader.prototype[s]="FileReader"));var g,v=e.Blob.prototype;try{new ReadableStream({type:"bytes"}),g=function(){var e=0,t=this;return new ReadableStream({type:"bytes",autoAllocateChunkSize:524288,pull:function(r){var n=r.byobRequest.view;return t.slice(e,e+n.byteLength).arrayBuffer().then(function(o){var i=new Uint8Array(o),a=i.byteLength;e+=a,n.set(i),r.byobRequest.respond(a),e>=t.size&&r.close()})}})}}catch(e){try{new ReadableStream({}),g=function(e){var t=0;return new ReadableStream({pull:function(r){return e.slice(t,t+524288).arrayBuffer().then(function(n){t+=n.byteLength;var o=new Uint8Array(n);r.enqueue(o),t==e.size&&r.close()})}})}}catch(e){try{new Response("").body.getReader().read(),g=function(){return new Response(this).body}}catch(e){g=function(){throw new Error("Include https://github.com/MattiasBuelens/web-streams-polyfill")}}}}function w(e){return new Promise(function(t,r){e.onload=e.onerror=function(n){e.onload=e.onerror=null,"load"===n.type?t(e.result||e):r(new Error("Failed to read the blob/file"))}})}v.arrayBuffer||(v.arrayBuffer=function(){var e=new FileReader;return e.readAsArrayBuffer(this),w(e)}),v.text||(v.text=function(){var e=new FileReader;return e.readAsText(this),w(e)}),v.stream||(v.stream=g)},void 0===(o=n.apply(t,[t]))||(e.exports=o)},767(e,t,r){"use strict";!function(e){function t(){}function r(){}var n=String.fromCharCode,o={}.toString,i=o.call(e.SharedArrayBuffer),a=o(),s=e.Uint8Array,l=s||Array,c=s?ArrayBuffer:l,u=c.isView||function(e){return e&&"length"in e},f=o.call(c.prototype);c=r.prototype;var p=e.TextEncoder,d=new(s?Uint16Array:l)(32);t.prototype.decode=function(e){if(!u(e)){var t=o.call(e);if(t!==f&&t!==i&&t!==a)throw TypeError("Failed to execute 'decode' on 'TextDecoder': The provided value is not of type '(ArrayBuffer or ArrayBufferView)'");e=s?new l(e):e||[]}for(var r,c,p,h=t="",y=0,b=0|e.length,g=b-32|0,v=0,w=0,m=0,E=-1;y<b;){for(r=y<=g?32:b-y|0;m<r;y=y+1|0,m=m+1|0){switch((c=255&e[y])>>4){case 15:if(2!=(p=255&e[y=y+1|0])>>6||247<c){y=y-1|0;break}v=(7&c)<<6|63&p,w=5,c=256;case 14:v<<=6,v|=(15&c)<<6|63&(p=255&e[y=y+1|0]),w=2==p>>6?w+4|0:24,c=c+256&768;case 13:case 12:v<<=6,v|=(31&c)<<6|63&(p=255&e[y=y+1|0]),w=w+7|0,y<b&&2==p>>6&&v>>w&&1114112>v?(c=v,0<=(v=v-65536|0)&&(E=55296+(v>>10)|0,c=56320+(1023&v)|0,31>m?(d[m]=E,m=m+1|0,E=-1):(p=E,E=c,c=p))):(y=y-(c>>=8)-1|0,c=65533),v=w=0,r=y<=g?32:b-y|0;default:d[m]=c;continue;case 11:case 10:case 9:case 8:}d[m]=65533}if(h+=n(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],d[8],d[9],d[10],d[11],d[12],d[13],d[14],d[15],d[16],d[17],d[18],d[19],d[20],d[21],d[22],d[23],d[24],d[25],d[26],d[27],d[28],d[29],d[30],d[31]),32>m&&(h=h.slice(0,m-32|0)),y<b){if(d[0]=E,m=~E>>>31,E=-1,h.length<t.length)continue}else-1!==E&&(h+=n(E));t+=h,h=""}return t},c.encode=function(e){var t,r=0|(e=void 0===e?"":""+e).length,n=new l(8+(r<<1)|0),o=0,i=!s;for(t=0;t<r;t=t+1|0,o=o+1|0){var a=0|e.charCodeAt(t);if(127>=a)n[o]=a;else{if(2047>=a)n[o]=192|a>>6;else{e:{if(55296<=a)if(56319>=a){var c=0|e.charCodeAt(t=t+1|0);if(56320<=c&&57343>=c){if(65535<(a=(a<<10)+c-56613888|0)){n[o]=240|a>>18,n[o=o+1|0]=128|a>>12&63,n[o=o+1|0]=128|a>>6&63,n[o=o+1|0]=128|63&a;continue}break e}a=65533}else 57343>=a&&(a=65533);!i&&t<<1<o&&t<<1<(o-7|0)&&(i=!0,(c=new l(3*r)).set(n),n=c)}n[o]=224|a>>12,n[o=o+1|0]=128|a>>6&63}n[o=o+1|0]=128|63&a}}return s?n.subarray(0,o):n.slice(0,o)},p||(e.TextDecoder=t,e.TextEncoder=r)}(""+void 0==typeof r.g?""+void 0==typeof self?this:self:r.g)}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,r),i.exports}r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),(()=>{"use strict";function e(e,r,...n){if(!e)throw new TypeError(t(r,n))}function t(e,t){let r=0;return e.replace(/%[os]/gu,()=>n(t[r++]))}function n(e){return"object"!=typeof e||null===e?String(e):Object.prototype.toString.call(e)}const o="undefined"!=typeof window?window:"undefined"!=typeof self?self:void 0!==r.g?r.g:"undefined"!=typeof globalThis?globalThis:void 0;let i;class a{constructor(e,t){this.code=e,this.message=t}warn(...e){var t;try{i;const r=(null!==(t=(new Error).stack)&&void 0!==t?t:"").replace(/^(?:.+?\n){2}/gu,"\n");console.warn(this.message,...e,r)}catch(e){}}}const s=new a("W01","Unable to initialize event under dispatching."),l=new a("W02","Assigning any falsy value to 'cancelBubble' property has no effect."),c=new a("W03","Assigning any truthy value to 'returnValue' property has no effect."),u=new a("W04","Unable to preventDefault on non-cancelable events."),f=new a("W05","Unable to preventDefault inside passive event listener invocation."),p=new a("W06","An event listener wasn't added because it has been added already: %o, %o"),d=new a("W07","The %o option value was abandoned because the event listener wasn't added as duplicated."),h=new a("W08","The 'callback' argument must be a function or an object that has 'handleEvent' method: %o");new a("W09","Event attribute handler must be a function: %o");class y{static get NONE(){return b}static get CAPTURING_PHASE(){return g}static get AT_TARGET(){return v}static get BUBBLING_PHASE(){return w}constructor(e,t){Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});const r=null!=t?t:{};m.set(this,{type:String(e),bubbles:Boolean(r.bubbles),cancelable:Boolean(r.cancelable),composed:Boolean(r.composed),target:null,currentTarget:null,stopPropagationFlag:!1,stopImmediatePropagationFlag:!1,canceledFlag:!1,inPassiveListenerFlag:!1,dispatchFlag:!1,timeStamp:Date.now()})}get type(){return E(this).type}get target(){return E(this).target}get srcElement(){return E(this).target}get currentTarget(){return E(this).currentTarget}composedPath(){const e=E(this).currentTarget;return e?[e]:[]}get NONE(){return b}get CAPTURING_PHASE(){return g}get AT_TARGET(){return v}get BUBBLING_PHASE(){return w}get eventPhase(){return E(this).dispatchFlag?2:0}stopPropagation(){E(this).stopPropagationFlag=!0}get cancelBubble(){return E(this).stopPropagationFlag}set cancelBubble(e){e?E(this).stopPropagationFlag=!0:l.warn()}stopImmediatePropagation(){const e=E(this);e.stopPropagationFlag=e.stopImmediatePropagationFlag=!0}get bubbles(){return E(this).bubbles}get cancelable(){return E(this).cancelable}get returnValue(){return!E(this).canceledFlag}set returnValue(e){e?c.warn():A(E(this))}preventDefault(){A(E(this))}get defaultPrevented(){return E(this).canceledFlag}get composed(){return E(this).composed}get isTrusted(){return!1}get timeStamp(){return E(this).timeStamp}initEvent(e,t=!1,r=!1){const n=E(this);n.dispatchFlag?s.warn():m.set(this,{...n,type:String(e),bubbles:Boolean(t),cancelable:Boolean(r),target:null,currentTarget:null,stopPropagationFlag:!1,stopImmediatePropagationFlag:!1,canceledFlag:!1})}}const b=0,g=1,v=2,w=3,m=new WeakMap;function E(t,r="this"){const n=m.get(t);return e(null!=n,"'%s' must be an object that Event constructor created, but got another one: %o",r,t),n}function A(e){e.inPassiveListenerFlag?f.warn():e.cancelable?e.canceledFlag=!0:u.warn()}Object.defineProperty(y,"NONE",{enumerable:!0}),Object.defineProperty(y,"CAPTURING_PHASE",{enumerable:!0}),Object.defineProperty(y,"AT_TARGET",{enumerable:!0}),Object.defineProperty(y,"BUBBLING_PHASE",{enumerable:!0});const T=Object.getOwnPropertyNames(y.prototype);for(let e=0;e<T.length;++e)"constructor"!==T[e]&&Object.defineProperty(y.prototype,T[e],{enumerable:!0});let R;void 0!==o&&void 0!==o.Event&&Object.setPrototypeOf(y.prototype,o.Event.prototype);const O={INDEX_SIZE_ERR:1,DOMSTRING_SIZE_ERR:2,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,INVALID_CHARACTER_ERR:5,NO_DATA_ALLOWED_ERR:6,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INUSE_ATTRIBUTE_ERR:10,INVALID_STATE_ERR:11,SYNTAX_ERR:12,INVALID_MODIFICATION_ERR:13,NAMESPACE_ERR:14,INVALID_ACCESS_ERR:15,VALIDATION_ERR:16,TYPE_MISMATCH_ERR:17,SECURITY_ERR:18,NETWORK_ERR:19,ABORT_ERR:20,URL_MISMATCH_ERR:21,QUOTA_EXCEEDED_ERR:22,TIMEOUT_ERR:23,INVALID_NODE_TYPE_ERR:24,DATA_CLONE_ERR:25};function _(e){const t=Object.keys(O);for(let r=0;r<t.length;++r){const n=t[r],o=O[n];Object.defineProperty(e,n,{get:()=>o,configurable:!0,enumerable:!0})}}class B extends y{static wrap(e){return new(L(e))(e)}constructor(e){super(e.type,{bubbles:e.bubbles,cancelable:e.cancelable,composed:e.composed}),e.cancelBubble&&super.stopPropagation(),e.defaultPrevented&&super.preventDefault(),P.set(this,{original:e});const t=Object.keys(e);for(let r=0;r<t.length;++r){const n=t[r];n in this||Object.defineProperty(this,n,F(e,n))}}stopPropagation(){super.stopPropagation();const{original:e}=S(this);"stopPropagation"in e&&e.stopPropagation()}get cancelBubble(){return super.cancelBubble}set cancelBubble(e){super.cancelBubble=e;const{original:t}=S(this);"cancelBubble"in t&&(t.cancelBubble=e)}stopImmediatePropagation(){super.stopImmediatePropagation();const{original:e}=S(this);"stopImmediatePropagation"in e&&e.stopImmediatePropagation()}get returnValue(){return super.returnValue}set returnValue(e){super.returnValue=e;const{original:t}=S(this);"returnValue"in t&&(t.returnValue=e)}preventDefault(){super.preventDefault();const{original:e}=S(this);"preventDefault"in e&&e.preventDefault()}get timeStamp(){const{original:e}=S(this);return"timeStamp"in e?e.timeStamp:super.timeStamp}}const P=new WeakMap;function S(t){const r=P.get(t);return e(null!=r,"'this' is expected an Event object, but got",t),r}const j=new WeakMap;function L(e){const t=Object.getPrototypeOf(e);if(null==t)return B;let r=j.get(t);return null==r&&(r=function(e,t){class r extends e{}const n=Object.keys(t);for(let e=0;e<n.length;++e)Object.defineProperty(r.prototype,n[e],F(t,n[e]));return r}(L(t),t),j.set(t,r)),r}function F(e,t){const r=Object.getOwnPropertyDescriptor(e,t);return{get(){const e=S(this).original,r=e[t];return"function"==typeof r?r.bind(e):r},set(e){S(this).original[t]=e},configurable:r.configurable,enumerable:r.enumerable}}function D(e){return!(1&~e.flags)}function I(e){return!(2&~e.flags)}function U(e){return!(4&~e.flags)}function x(e){return!(8&~e.flags)}function k({callback:e},t,r){try{"function"==typeof e?e.call(t,r):"function"==typeof e.handleEvent&&e.handleEvent(r)}catch(e){!function(e){try{const t=e instanceof Error?e:new Error(n(e));if("function"==typeof dispatchEvent&&"function"==typeof ErrorEvent)dispatchEvent(new ErrorEvent("error",{error:t,message:t.message}));else if("undefined"!=typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",t);console.error(t)}catch(e){}}(e)}}function C({listeners:e},t,r){for(let n=0;n<e.length;++n)if(e[n].callback===t&&D(e[n])===r)return n;return-1}function N(e,t,r){const n=C(e,t,r);return-1!==n&&M(e,n)}function M(e,t,r=!1){const n=e.listeners[t];return function(e){e.flags|=8}(n),n.signal&&n.signal.removeEventListener("abort",n.signalListener),e.cow&&!r?(e.cow=!1,e.listeners=e.listeners.filter((e,r)=>r!==t),!1):(e.listeners.splice(t,1),!0)}j.set(Object.prototype,B),void 0!==o&&void 0!==o.Event&&j.set(o.Event.prototype,B);class H{constructor(){V.set(this,Object.create(null))}addEventListener(e,t,r){const n=q(this),{callback:o,capture:i,once:a,passive:s,signal:l,type:c}=function(e,t,r){var n;return G(t),"object"==typeof r&&null!==r?{type:String(e),callback:null!=t?t:void 0,capture:Boolean(r.capture),passive:Boolean(r.passive),once:Boolean(r.once),signal:null!==(n=r.signal)&&void 0!==n?n:void 0}:{type:String(e),callback:null!=t?t:void 0,capture:Boolean(r),passive:!1,once:!1,signal:void 0}}(e,t,r);if(null==o||(null==l?void 0:l.aborted))return;const u=function(e,t){var r;return null!==(r=e[t])&&void 0!==r?r:e[t]={attrCallback:void 0,attrListener:void 0,cow:!1,listeners:[]}}(n,c),f=C(u,o,i);-1===f?function(e,t,r,n,o,i){let a;i&&(a=N.bind(null,e,t,r),i.addEventListener("abort",a));const s=function(e,t,r,n,o,i){return{callback:e,flags:(t?1:0)|(r?2:0)|(n?4:0),signal:o,signalListener:i}}(t,r,n,o,i,a);e.cow?(e.cow=!1,e.listeners=[...e.listeners,s]):e.listeners.push(s)}(u,o,i,s,a,l):function(e,t,r,n){p.warn(D(e)?"capture":"bubble",e.callback),I(e)!==t&&d.warn("passive"),U(e)!==r&&d.warn("once"),e.signal!==n&&d.warn("signal")}(u.listeners[f],s,a,l)}removeEventListener(e,t,r){const n=q(this),{callback:o,capture:i,type:a}=function(e,t,r){return G(t),"object"==typeof r&&null!==r?{type:String(e),callback:null!=t?t:void 0,capture:Boolean(r.capture)}:{type:String(e),callback:null!=t?t:void 0,capture:Boolean(r)}}(e,t,r),s=n[a];null!=o&&s&&N(s,o,i)}dispatchEvent(e){const t=q(this)[String(e.type)];if(null==t)return!0;const r=e instanceof y?e:B.wrap(e),n=E(r,"event");if(n.dispatchFlag)throw i="This event has been in dispatching.",o.DOMException?new o.DOMException(i,"InvalidStateError"):(null==R&&(R=class e extends Error{constructor(t){super(t),Error.captureStackTrace&&Error.captureStackTrace(this,e)}get code(){return 11}get name(){return"InvalidStateError"}},Object.defineProperties(R.prototype,{code:{enumerable:!0},name:{enumerable:!0}}),_(R),_(R.prototype)),new R(i));var i;if(n.dispatchFlag=!0,n.target=n.currentTarget=this,!n.stopPropagationFlag){const{cow:e,listeners:o}=t;t.cow=!0;for(let i=0;i<o.length;++i){const a=o[i];if(!x(a)&&(U(a)&&M(t,i,!e)&&(i-=1),n.inPassiveListenerFlag=I(a),k(a,this,r),n.inPassiveListenerFlag=!1,n.stopImmediatePropagationFlag))break}e||(t.cow=!1)}return n.target=null,n.currentTarget=null,n.stopImmediatePropagationFlag=!1,n.stopPropagationFlag=!1,n.dispatchFlag=!1,!n.canceledFlag}}const V=new WeakMap;function q(t,r="this"){const n=V.get(t);return e(null!=n,"'%s' must be an object that EventTarget constructor created, but got another one: %o",r,t),n}function G(e){if("function"!=typeof e&&("object"!=typeof e||null===e||"function"!=typeof e.handleEvent)){if(null!=e&&"object"!=typeof e)throw new TypeError(t(h.message,[e]));h.warn(e)}}const W=Object.getOwnPropertyNames(H.prototype);for(let e=0;e<W.length;++e)"constructor"!==W[e]&&Object.defineProperty(H.prototype,W[e],{enumerable:!0});void 0!==o&&void 0!==o.EventTarget&&Object.setPrototypeOf(H.prototype,o.EventTarget.prototype),"function"!=typeof globalThis.Event&&(globalThis.Event=y),"function"!=typeof globalThis.EventTarget&&(globalThis.EventTarget=H),r(847);var X=r(203);globalThis.Blob=X.Blob,globalThis.crypto={getRandomValues(e){for(let t=0,r=e.length;t<r;t++)e[t]=Math.floor(256*Math.random());return e},randomUUID(){return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,e=>(e^this.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}},r(767);var z="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==r.g&&r.g||{},Y="URLSearchParams"in z,Z="Symbol"in z&&"iterator"in Symbol,K="FileReader"in z&&"Blob"in z&&function(){try{return new Blob,!0}catch(e){return!1}}(),Q="FormData"in z,$="ArrayBuffer"in z;if($)var J=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],ee=ArrayBuffer.isView||function(e){return e&&J.indexOf(Object.prototype.toString.call(e))>-1};function te(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function re(e){return"string"!=typeof e&&(e=String(e)),e}function ne(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return Z&&(t[Symbol.iterator]=function(){return t}),t}function oe(e){this.map={},e instanceof oe?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){if(2!=e.length)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+e.length);this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function ie(e){if(!e._noBody)return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function ae(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function se(e){var t=new FileReader,r=ae(t);return t.readAsArrayBuffer(e),r}function le(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function ce(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:K&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:Q&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:Y&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():$&&K&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=le(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):$&&(ArrayBuffer.prototype.isPrototypeOf(e)||ee(e))?this._bodyArrayBuffer=le(e):this._bodyText=e=Object.prototype.toString.call(e):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):Y&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},K&&(this.blob=function(){var e=ie(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer)return ie(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer));if(K)return this.blob().then(se);throw new Error("could not read as ArrayBuffer")},this.text=function(){var e,t,r,n,o,i=ie(this);if(i)return i;if(this._bodyBlob)return e=this._bodyBlob,r=ae(t=new FileReader),o=(n=/charset=([A-Za-z0-9_-]+)/.exec(e.type))?n[1]:"utf-8",t.readAsText(e,o),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n<t.length;n++)r[n]=String.fromCharCode(t[n]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},Q&&(this.formData=function(){return this.text().then(pe)}),this.json=function(){return this.text().then(JSON.parse)},this}oe.prototype.append=function(e,t){e=te(e),t=re(t);var r=this.map[e];this.map[e]=r?r+", "+t:t},oe.prototype.delete=function(e){delete this.map[te(e)]},oe.prototype.get=function(e){return e=te(e),this.has(e)?this.map[e]:null},oe.prototype.has=function(e){return this.map.hasOwnProperty(te(e))},oe.prototype.set=function(e,t){this.map[te(e)]=re(t)},oe.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},oe.prototype.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),ne(e)},oe.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),ne(e)},oe.prototype.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),ne(e)},Z&&(oe.prototype[Symbol.iterator]=oe.prototype.entries);var ue=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function fe(e,t){if(!(this instanceof fe))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var r,n,o=(t=t||{}).body;if(e instanceof fe){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new oe(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,o||null==e._bodyInit||(o=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new oe(t.headers)),this.method=(n=(r=t.method||this.method||"GET").toUpperCase(),ue.indexOf(n)>-1?n:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal||function(){if("AbortController"in z)return(new AbortController).signal}(),this.referrer=null,this.redirect=t.redirect||"follow",("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(o),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var i=/([?&])_=[^&]*/;i.test(this.url)?this.url=this.url.replace(i,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function pe(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),o=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(o))}}),t}function de(e,t){if(!(this instanceof de))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new oe(t.headers),this.url=t.url||"",this._initBody(e)}fe.prototype.clone=function(){return new fe(this,{body:this._bodyInit})},ce.call(fe.prototype),ce.call(de.prototype),de.prototype.clone=function(){return new de(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new oe(this.headers),url:this.url})},de.error=function(){var e=new de(null,{status:200,statusText:""});return e.ok=!1,e.status=0,e.type="error",e};var he=[301,302,303,307,308];de.redirect=function(e,t){if(-1===he.indexOf(t))throw new RangeError("Invalid status code");return new de(null,{status:t,headers:{location:e}})};var ye=z.DOMException;try{new ye}catch(e){(ye=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack}).prototype=Object.create(Error.prototype),ye.prototype.constructor=ye}function be(e,t){return new Promise(function(r,n){var o=new fe(e,t);if(o.signal&&o.signal.aborted)return n(new ye("Aborted","AbortError"));var i=new XMLHttpRequest;function a(){i.abort()}if(i.onload=function(){var e,t,n={statusText:i.statusText,headers:(e=i.getAllResponseHeaders()||"",t=new oe,e.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e}).forEach(function(e){var r=e.split(":"),n=r.shift().trim();if(n){var o=r.join(":").trim();try{t.append(n,o)}catch(e){console.warn("Response "+e.message)}}}),t)};0===o.url.indexOf("file://")&&(i.status<200||i.status>599)?n.status=200:n.status=i.status,n.url="responseURL"in i?i.responseURL:n.headers.get("X-Request-URL");var a="response"in i?i.response:i.responseText;setTimeout(function(){r(new de(a,n))},0)},i.onerror=function(){setTimeout(function(){n(new TypeError("Network request failed"))},0)},i.ontimeout=function(){setTimeout(function(){n(new TypeError("Network request timed out"))},0)},i.onabort=function(){setTimeout(function(){n(new ye("Aborted","AbortError"))},0)},i.open(o.method,function(e){try{return""===e&&z.location.href?z.location.href:e}catch(t){return e}}(o.url),!0),"include"===o.credentials?i.withCredentials=!0:"omit"===o.credentials&&(i.withCredentials=!1),"responseType"in i&&(K?i.responseType="blob":$&&(i.responseType="arraybuffer")),"redirect"in i&&(i.redirect=o.redirect),t&&"object"==typeof t.headers&&!(t.headers instanceof oe||z.Headers&&t.headers instanceof z.Headers)){var s=[];Object.getOwnPropertyNames(t.headers).forEach(function(e){s.push(te(e)),i.setRequestHeader(e,re(t.headers[e]))}),o.headers.forEach(function(e,t){-1===s.indexOf(t)&&i.setRequestHeader(t,e)})}else o.headers.forEach(function(e,t){i.setRequestHeader(t,e)});o.signal&&(o.signal.addEventListener("abort",a),i.onreadystatechange=function(){4===i.readyState&&o.signal.removeEventListener("abort",a)}),i.send(void 0===o._bodyInit?null:o._bodyInit)})}be.polyfill=!0,z.fetch||(z.fetch=be,z.Headers=oe,z.Request=fe,z.Response=de)})()})(); |