dashjs
Version:
A reference client implementation for the playback of MPEG DASH via Javascript and compliant browsers.
2 lines • 451 kB
JavaScript
/*! For license information please see dash.offline.min.js.LICENSE.txt */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.dashjs=t():e.dashjs=t()}(self,(function(){return function(){var e={37316:function(e,t,r){"use strict";var n=r(95429);r(79432),r(26099),r(84864),r(57465),r(27495),r(69479),r(87745),r(38781),e.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==n(t)&&"object"==n(r)){if(t.constructor!==r.constructor)return!1;var i,o,a;if(Array.isArray(t)){if((i=t.length)!=r.length)return!1;for(o=i;0!=o--;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((i=(a=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(o=i;0!=o--;)if(!Object.prototype.hasOwnProperty.call(r,a[o]))return!1;for(o=i;0!=o--;){var s=a[o];if(!e(t[s],r[s]))return!1}return!0}return t!=t&&r!=r}},9809:function(e,t,r){var n,i,o,a,s=r(95429);r(52675),r(89463),r(2259),r(16280),r(28706),r(23792),r(44114),r(34782),r(54743),r(16573),r(78100),r(77936),r(62010),r(33110),r(79432),r(26099),r(3362),r(27495),r(90906),r(38781),r(47764),r(71761),r(25440),r(34594),r(29833),r(46594),r(72107),r(95477),r(21489),r(22134),r(3690),r(61740),r(48140),r(81630),r(72170),r(75044),r(69539),r(31694),r(89955),r(21903),r(91134),r(33206),r(44496),r(66651),r(12887),r(19369),r(66812),r(8995),r(31575),r(36072),r(88747),r(28845),r(29423),r(57301),r(373),r(86614),r(41405),r(37467),r(44732),r(33684),r(79577),r(58335),r(41549),r(49797),r(49631),r(35623),r(2945),r(42207),r(62953),r(55815),r(64979),r(79739),r(13611),a=function(){return function e(t,r,n){function i(a,s){if(!r[a]){if(!t[a]){if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=r[a]={exports:{}};t[a][0].call(c.exports,(function(e){return i(t[a][1][e]||e)}),c,c.exports,e,t,r,n)}return r[a].exports}for(var o=void 0,a=0;a<n.length;a++)i(n[a]);return i}({1:[function(e,t,n){(function(e){"use strict";var r,n,i=e.MutationObserver||e.WebKitMutationObserver;if(i){var o=0,a=new i(l),s=e.document.createTextNode("");a.observe(s,{characterData:!0}),r=function(){s.data=o=++o%2}}else if(e.setImmediate||void 0===e.MessageChannel)r="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){l(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(l,0)};else{var u=new e.MessageChannel;u.port1.onmessage=l,r=function(){u.port2.postMessage(0)}}var c=[];function l(){var e,t;n=!0;for(var r=c.length;r;){for(t=c,c=[],e=-1;++e<r;)t[e]();r=c.length}n=!1}t.exports=function(e){1!==c.push(e)||n||r()}}).call(this,void 0!==r.g?r.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(e,t,r){"use strict";var n=e(1);function i(){}var o={},a=["REJECTED"],u=["FULFILLED"],c=["PENDING"];function l(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=c,this.queue=[],this.outcome=void 0,e!==i&&h(this,e)}function f(e,t,r){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof r&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}function d(e,t,r){n((function(){var n;try{n=t(r)}catch(t){return o.reject(e,t)}n===e?o.reject(e,new TypeError("Cannot resolve promise with itself")):o.resolve(e,n)}))}function p(e){var t=e&&e.then;if(e&&("object"===s(e)||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function h(e,t){var r=!1;function n(t){r||(r=!0,o.reject(e,t))}function i(t){r||(r=!0,o.resolve(e,t))}var a=v((function(){t(i,n)}));"error"===a.status&&n(a.value)}function v(e,t){var r={};try{r.value=e(t),r.status="success"}catch(e){r.status="error",r.value=e}return r}t.exports=l,l.prototype.catch=function(e){return this.then(null,e)},l.prototype.then=function(e,t){if("function"!=typeof e&&this.state===u||"function"!=typeof t&&this.state===a)return this;var r=new this.constructor(i);return this.state!==c?d(r,this.state===u?e:t,this.outcome):this.queue.push(new f(r,e,t)),r},f.prototype.callFulfilled=function(e){o.resolve(this.promise,e)},f.prototype.otherCallFulfilled=function(e){d(this.promise,this.onFulfilled,e)},f.prototype.callRejected=function(e){o.reject(this.promise,e)},f.prototype.otherCallRejected=function(e){d(this.promise,this.onRejected,e)},o.resolve=function(e,t){var r=v(p,t);if("error"===r.status)return o.reject(e,r.value);var n=r.value;if(n)h(e,n);else{e.state=u,e.outcome=t;for(var i=-1,a=e.queue.length;++i<a;)e.queue[i].callFulfilled(t)}return e},o.reject=function(e,t){e.state=a,e.outcome=t;for(var r=-1,n=e.queue.length;++r<n;)e.queue[r].callRejected(t);return e},l.resolve=function(e){return e instanceof this?e:o.resolve(new this(i),e)},l.reject=function(e){var t=new this(i);return o.reject(t,e)},l.all=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var r=e.length,n=!1;if(!r)return this.resolve([]);for(var a=new Array(r),s=0,u=-1,c=new this(i);++u<r;)l(e[u],u);return c;function l(e,i){t.resolve(e).then((function(e){a[i]=e,++s!==r||n||(n=!0,o.resolve(c,a))}),(function(e){n||(n=!0,o.reject(c,e))}))}},l.race=function(e){if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var t=e.length,r=!1;if(!t)return this.resolve([]);for(var n,a=-1,s=new this(i);++a<t;)n=e[a],this.resolve(n).then((function(e){r||(r=!0,o.resolve(s,e))}),(function(e){r||(r=!0,o.reject(s,e))}));return s}},{1:1}],3:[function(e,t,n){(function(t){"use strict";"function"!=typeof t.Promise&&(t.Promise=e(2))}).call(this,void 0!==r.g?r.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],4:[function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"===s(Symbol.iterator)?function(e){return s(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":s(e)},i=function(){try{if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!=typeof mozIndexedDB)return mozIndexedDB;if("undefined"!=typeof OIndexedDB)return OIndexedDB;if("undefined"!=typeof msIndexedDB)return msIndexedDB}catch(e){return}}();function o(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(i){if("TypeError"!==i.name)throw i;for(var r=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),n=0;n<e.length;n+=1)r.append(e[n]);return r.getBlob(t.type)}}"undefined"==typeof Promise&&e(3);var a=Promise;function u(e,t){t&&e.then((function(e){t(null,e)}),(function(e){t(e)}))}function c(e,t,r){"function"==typeof t&&e.then(t),"function"==typeof r&&e.catch(r)}function l(e){return"string"!=typeof e&&(console.warn(e+" used as a key, but it is not a string."),e=String(e)),e}function f(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}var d="local-forage-detect-blob-support",p=void 0,h={},v=Object.prototype.toString,m="readonly",g="readwrite";function E(e){var t=h[e.name],r={};r.promise=new a((function(e,t){r.resolve=e,r.reject=t})),t.deferredOperations.push(r),t.dbReady?t.dbReady=t.dbReady.then((function(){return r.promise})):t.dbReady=r.promise}function y(e){var t=h[e.name].deferredOperations.pop();if(t)return t.resolve(),t.promise}function T(e,t){var r=h[e.name].deferredOperations.pop();if(r)return r.reject(t),r.promise}function _(e,t){return new a((function(r,n){if(h[e.name]=h[e.name]||{forages:[],db:null,dbReady:null,deferredOperations:[]},e.db){if(!t)return r(e.db);E(e),e.db.close()}var o=[e.name];t&&o.push(e.version);var a=i.open.apply(i,o);t&&(a.onupgradeneeded=function(t){var r=a.result;try{r.createObjectStore(e.storeName),t.oldVersion<=1&&r.createObjectStore(d)}catch(r){if("ConstraintError"!==r.name)throw r;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),a.onerror=function(e){e.preventDefault(),n(a.error)},a.onsuccess=function(){var t=a.result;t.onversionchange=function(e){e.target.close()},r(t),y(e)}}))}function I(e){return _(e,!1)}function S(e){return _(e,!0)}function A(e,t){if(!e.db)return!0;var r=!e.db.objectStoreNames.contains(e.storeName),n=e.version<e.db.version,i=e.version>e.db.version;if(n&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),i||r){if(r){var o=e.db.version+1;o>e.version&&(e.version=o)}return!0}return!1}function R(e){return o([function(e){for(var t=e.length,r=new ArrayBuffer(t),n=new Uint8Array(r),i=0;i<t;i++)n[i]=e.charCodeAt(i);return r}(atob(e.data))],{type:e.type})}function b(e){return e&&e.__local_forage_encoded_blob}function N(e){var t=this,r=t._initReady().then((function(){var e=h[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady}));return c(r,e,e),r}function O(e,t,r,n){void 0===n&&(n=1);try{var i=e.db.transaction(e.storeName,t);r(null,i)}catch(i){if(n>0&&(!e.db||"InvalidStateError"===i.name||"NotFoundError"===i.name))return a.resolve().then((function(){if(!e.db||"NotFoundError"===i.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),S(e)})).then((function(){return function(e){E(e);for(var t=h[e.name],r=t.forages,n=0;n<r.length;n++){var i=r[n];i._dbInfo.db&&(i._dbInfo.db.close(),i._dbInfo.db=null)}return e.db=null,I(e).then((function(t){return e.db=t,A(e)?S(e):t})).then((function(n){e.db=t.db=n;for(var i=0;i<r.length;i++)r[i]._dbInfo.db=n})).catch((function(t){throw T(e,t),t}))}(e).then((function(){O(e,t,r,n-1)}))})).catch(r);r(i)}}var D={_driver:"asyncStorage",_initStorage:function(e){var t=this,r={db:null};if(e)for(var n in e)r[n]=e[n];var i=h[r.name];i||(i={forages:[],db:null,dbReady:null,deferredOperations:[]},h[r.name]=i),i.forages.push(t),t._initReady||(t._initReady=t.ready,t.ready=N);var o=[];function s(){return a.resolve()}for(var u=0;u<i.forages.length;u++){var c=i.forages[u];c!==t&&o.push(c._initReady().catch(s))}var l=i.forages.slice(0);return a.all(o).then((function(){return r.db=i.db,I(r)})).then((function(e){return r.db=e,A(r,t._defaultConfig.version)?S(r):e})).then((function(e){r.db=i.db=e,t._dbInfo=r;for(var n=0;n<l.length;n++){var o=l[n];o!==t&&(o._dbInfo.db=r.db,o._dbInfo.version=r.version)}}))},_support:function(){try{if(!i||!i.open)return!1;var e="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),t="function"==typeof fetch&&-1!==fetch.toString().indexOf("[native code");return(!e||t)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(e){return!1}}(),iterate:function(e,t){var r=this,n=new a((function(t,n){r.ready().then((function(){O(r._dbInfo,m,(function(i,o){if(i)return n(i);try{var a=o.objectStore(r._dbInfo.storeName).openCursor(),s=1;a.onsuccess=function(){var r=a.result;if(r){var n=r.value;b(n)&&(n=R(n));var i=e(n,r.key,s++);void 0!==i?t(i):r.continue()}else t()},a.onerror=function(){n(a.error)}}catch(e){n(e)}}))})).catch(n)}));return u(n,t),n},getItem:function(e,t){var r=this;e=l(e);var n=new a((function(t,n){r.ready().then((function(){O(r._dbInfo,m,(function(i,o){if(i)return n(i);try{var a=o.objectStore(r._dbInfo.storeName).get(e);a.onsuccess=function(){var e=a.result;void 0===e&&(e=null),b(e)&&(e=R(e)),t(e)},a.onerror=function(){n(a.error)}}catch(e){n(e)}}))})).catch(n)}));return u(n,t),n},setItem:function(e,t,r){var n=this;e=l(e);var i=new a((function(r,i){var s;n.ready().then((function(){return s=n._dbInfo,"[object Blob]"===v.call(t)?function(e){return"boolean"==typeof p?a.resolve(p):function(e){return new a((function(t){var r=e.transaction(d,g),n=o([""]);r.objectStore(d).put(n,"key"),r.onabort=function(e){e.preventDefault(),e.stopPropagation(),t(!1)},r.oncomplete=function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/),r=navigator.userAgent.match(/Edge\//);t(r||!e||parseInt(e[1],10)>=43)}})).catch((function(){return!1}))}(e).then((function(e){return p=e}))}(s.db).then((function(e){return e?t:(r=t,new a((function(e,t){var n=new FileReader;n.onerror=t,n.onloadend=function(t){var n=btoa(t.target.result||"");e({__local_forage_encoded_blob:!0,data:n,type:r.type})},n.readAsBinaryString(r)})));var r})):t})).then((function(t){O(n._dbInfo,g,(function(o,a){if(o)return i(o);try{var s=a.objectStore(n._dbInfo.storeName);null===t&&(t=void 0);var u=s.put(t,e);a.oncomplete=function(){void 0===t&&(t=null),r(t)},a.onabort=a.onerror=function(){var e=u.error?u.error:u.transaction.error;i(e)}}catch(e){i(e)}}))})).catch(i)}));return u(i,r),i},removeItem:function(e,t){var r=this;e=l(e);var n=new a((function(t,n){r.ready().then((function(){O(r._dbInfo,g,(function(i,o){if(i)return n(i);try{var a=o.objectStore(r._dbInfo.storeName).delete(e);o.oncomplete=function(){t()},o.onerror=function(){n(a.error)},o.onabort=function(){var e=a.error?a.error:a.transaction.error;n(e)}}catch(e){n(e)}}))})).catch(n)}));return u(n,t),n},clear:function(e){var t=this,r=new a((function(e,r){t.ready().then((function(){O(t._dbInfo,g,(function(n,i){if(n)return r(n);try{var o=i.objectStore(t._dbInfo.storeName).clear();i.oncomplete=function(){e()},i.onabort=i.onerror=function(){var e=o.error?o.error:o.transaction.error;r(e)}}catch(e){r(e)}}))})).catch(r)}));return u(r,e),r},length:function(e){var t=this,r=new a((function(e,r){t.ready().then((function(){O(t._dbInfo,m,(function(n,i){if(n)return r(n);try{var o=i.objectStore(t._dbInfo.storeName).count();o.onsuccess=function(){e(o.result)},o.onerror=function(){r(o.error)}}catch(e){r(e)}}))})).catch(r)}));return u(r,e),r},key:function(e,t){var r=this,n=new a((function(t,n){e<0?t(null):r.ready().then((function(){O(r._dbInfo,m,(function(i,o){if(i)return n(i);try{var a=o.objectStore(r._dbInfo.storeName),s=!1,u=a.openKeyCursor();u.onsuccess=function(){var r=u.result;r?0===e||s?t(r.key):(s=!0,r.advance(e)):t(null)},u.onerror=function(){n(u.error)}}catch(e){n(e)}}))})).catch(n)}));return u(n,t),n},keys:function(e){var t=this,r=new a((function(e,r){t.ready().then((function(){O(t._dbInfo,m,(function(n,i){if(n)return r(n);try{var o=i.objectStore(t._dbInfo.storeName).openKeyCursor(),a=[];o.onsuccess=function(){var t=o.result;t?(a.push(t.key),t.continue()):e(a)},o.onerror=function(){r(o.error)}}catch(e){r(e)}}))})).catch(r)}));return u(r,e),r},dropInstance:function(e,t){t=f.apply(this,arguments);var r,n=this.config();if((e="function"!=typeof e&&e||{}).name||(e.name=e.name||n.name,e.storeName=e.storeName||n.storeName),e.name){var o=e.name===n.name&&this._dbInfo.db?a.resolve(this._dbInfo.db):I(e).then((function(t){var r=h[e.name],n=r.forages;r.db=t;for(var i=0;i<n.length;i++)n[i]._dbInfo.db=t;return t}));r=e.storeName?o.then((function(t){if(t.objectStoreNames.contains(e.storeName)){var r=t.version+1;E(e);var n=h[e.name],o=n.forages;t.close();for(var s=0;s<o.length;s++){var u=o[s];u._dbInfo.db=null,u._dbInfo.version=r}var c=new a((function(t,n){var o=i.open(e.name,r);o.onerror=function(e){o.result.close(),n(e)},o.onupgradeneeded=function(){o.result.deleteObjectStore(e.storeName)},o.onsuccess=function(){var e=o.result;e.close(),t(e)}}));return c.then((function(e){n.db=e;for(var t=0;t<o.length;t++){var r=o[t];r._dbInfo.db=e,y(r._dbInfo)}})).catch((function(t){throw(T(e,t)||a.resolve()).catch((function(){})),t}))}})):o.then((function(t){E(e);var r=h[e.name],n=r.forages;t.close();for(var o=0;o<n.length;o++)n[o]._dbInfo.db=null;var s=new a((function(t,r){var n=i.deleteDatabase(e.name);n.onerror=function(){var e=n.result;e&&e.close(),r(n.error)},n.onblocked=function(){console.warn('dropInstance blocked for database "'+e.name+'" until all open connections are closed')},n.onsuccess=function(){var e=n.result;e&&e.close(),t(e)}}));return s.then((function(e){r.db=e;for(var t=0;t<n.length;t++)y(n[t]._dbInfo)})).catch((function(t){throw(T(e,t)||a.resolve()).catch((function(){})),t}))}))}else r=a.reject("Invalid arguments");return u(r,t),r}},w="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",C=/^~~local_forage_type~([^~]+)~/,P="__lfsc__:",L="arbf",M="blob",x="si08",U="ui08",F="uic8",B="si16",k="si32",G="ur16",q="ui32",j="fl32",H="fl64",Y=Object.prototype.toString;function V(e){var t,r,n,i,o,a=.75*e.length,s=e.length,u=0;"="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--);var c=new ArrayBuffer(a),l=new Uint8Array(c);for(t=0;t<s;t+=4)r=w.indexOf(e[t]),n=w.indexOf(e[t+1]),i=w.indexOf(e[t+2]),o=w.indexOf(e[t+3]),l[u++]=r<<2|n>>4,l[u++]=(15&n)<<4|i>>2,l[u++]=(3&i)<<6|63&o;return c}function z(e){var t,r=new Uint8Array(e),n="";for(t=0;t<r.length;t+=3)n+=w[r[t]>>2],n+=w[(3&r[t])<<4|r[t+1]>>4],n+=w[(15&r[t+1])<<2|r[t+2]>>6],n+=w[63&r[t+2]];return r.length%3==2?n=n.substring(0,n.length-1)+"=":r.length%3==1&&(n=n.substring(0,n.length-2)+"=="),n}var W={serialize:function(e,t){var r="";if(e&&(r=Y.call(e)),e&&("[object ArrayBuffer]"===r||e.buffer&&"[object ArrayBuffer]"===Y.call(e.buffer))){var n,i=P;e instanceof ArrayBuffer?(n=e,i+=L):(n=e.buffer,"[object Int8Array]"===r?i+=x:"[object Uint8Array]"===r?i+=U:"[object Uint8ClampedArray]"===r?i+=F:"[object Int16Array]"===r?i+=B:"[object Uint16Array]"===r?i+=G:"[object Int32Array]"===r?i+=k:"[object Uint32Array]"===r?i+=q:"[object Float32Array]"===r?i+=j:"[object Float64Array]"===r?i+=H:t(new Error("Failed to get type for BinaryArray"))),t(i+z(n))}else if("[object Blob]"===r){var o=new FileReader;o.onload=function(){var r="~~local_forage_type~"+e.type+"~"+z(this.result);t(P+M+r)},o.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(r){console.error("Couldn't convert value into a JSON string: ",e),t(null,r)}},deserialize:function(e){if(e.substring(0,9)!==P)return JSON.parse(e);var t,r=e.substring(13),n=e.substring(9,13);if(n===M&&C.test(r)){var i=r.match(C);t=i[1],r=r.substring(i[0].length)}var a=V(r);switch(n){case L:return a;case M:return o([a],{type:t});case x:return new Int8Array(a);case U:return new Uint8Array(a);case F:return new Uint8ClampedArray(a);case B:return new Int16Array(a);case G:return new Uint16Array(a);case k:return new Int32Array(a);case q:return new Uint32Array(a);case j:return new Float32Array(a);case H:return new Float64Array(a);default:throw new Error("Unkown type: "+n)}},stringToBuffer:V,bufferToString:z};function K(e,t,r,n){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],r,n)}function X(e,t,r,n,i,o){e.executeSql(r,n,i,(function(e,a){a.code===a.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],(function(e,s){s.rows.length?o(e,a):K(e,t,(function(){e.executeSql(r,n,i,o)}),o)}),o):o(e,a)}),o)}function Q(e,t,r,n){var i=this;e=l(e);var o=new a((function(o,a){i.ready().then((function(){void 0===t&&(t=null);var s=t,u=i._dbInfo;u.serializer.serialize(t,(function(t,c){c?a(c):u.db.transaction((function(r){X(r,u,"INSERT OR REPLACE INTO "+u.storeName+" (key, value) VALUES (?, ?)",[e,t],(function(){o(s)}),(function(e,t){a(t)}))}),(function(t){if(t.code===t.QUOTA_ERR){if(n>0)return void o(Q.apply(i,[e,s,r,n-1]));a(t)}}))}))})).catch(a)}));return u(o,r),o}var $={_driver:"webSQLStorage",_initStorage:function(e){var t=this,r={db:null};if(e)for(var n in e)r[n]="string"!=typeof e[n]?e[n].toString():e[n];var i=new a((function(e,n){try{r.db=openDatabase(r.name,String(r.version),r.description,r.size)}catch(e){return n(e)}r.db.transaction((function(i){K(i,r,(function(){t._dbInfo=r,e()}),(function(e,t){n(t)}))}),n)}));return r.serializer=W,i},_support:"function"==typeof openDatabase,iterate:function(e,t){var r=this,n=new a((function(t,n){r.ready().then((function(){var i=r._dbInfo;i.db.transaction((function(r){X(r,i,"SELECT * FROM "+i.storeName,[],(function(r,n){for(var o=n.rows,a=o.length,s=0;s<a;s++){var u=o.item(s),c=u.value;if(c&&(c=i.serializer.deserialize(c)),void 0!==(c=e(c,u.key,s+1)))return void t(c)}t()}),(function(e,t){n(t)}))}))})).catch(n)}));return u(n,t),n},getItem:function(e,t){var r=this;e=l(e);var n=new a((function(t,n){r.ready().then((function(){var i=r._dbInfo;i.db.transaction((function(r){X(r,i,"SELECT * FROM "+i.storeName+" WHERE key = ? LIMIT 1",[e],(function(e,r){var n=r.rows.length?r.rows.item(0).value:null;n&&(n=i.serializer.deserialize(n)),t(n)}),(function(e,t){n(t)}))}))})).catch(n)}));return u(n,t),n},setItem:function(e,t,r){return Q.apply(this,[e,t,r,1])},removeItem:function(e,t){var r=this;e=l(e);var n=new a((function(t,n){r.ready().then((function(){var i=r._dbInfo;i.db.transaction((function(r){X(r,i,"DELETE FROM "+i.storeName+" WHERE key = ?",[e],(function(){t()}),(function(e,t){n(t)}))}))})).catch(n)}));return u(n,t),n},clear:function(e){var t=this,r=new a((function(e,r){t.ready().then((function(){var n=t._dbInfo;n.db.transaction((function(t){X(t,n,"DELETE FROM "+n.storeName,[],(function(){e()}),(function(e,t){r(t)}))}))})).catch(r)}));return u(r,e),r},length:function(e){var t=this,r=new a((function(e,r){t.ready().then((function(){var n=t._dbInfo;n.db.transaction((function(t){X(t,n,"SELECT COUNT(key) as c FROM "+n.storeName,[],(function(t,r){var n=r.rows.item(0).c;e(n)}),(function(e,t){r(t)}))}))})).catch(r)}));return u(r,e),r},key:function(e,t){var r=this,n=new a((function(t,n){r.ready().then((function(){var i=r._dbInfo;i.db.transaction((function(r){X(r,i,"SELECT key FROM "+i.storeName+" WHERE id = ? LIMIT 1",[e+1],(function(e,r){var n=r.rows.length?r.rows.item(0).key:null;t(n)}),(function(e,t){n(t)}))}))})).catch(n)}));return u(n,t),n},keys:function(e){var t=this,r=new a((function(e,r){t.ready().then((function(){var n=t._dbInfo;n.db.transaction((function(t){X(t,n,"SELECT key FROM "+n.storeName,[],(function(t,r){for(var n=[],i=0;i<r.rows.length;i++)n.push(r.rows.item(i).key);e(n)}),(function(e,t){r(t)}))}))})).catch(r)}));return u(r,e),r},dropInstance:function(e,t){t=f.apply(this,arguments);var r=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||r.name,e.storeName=e.storeName||r.storeName);var n,i=this;return u(n=e.name?new a((function(t){var n;n=e.name===r.name?i._dbInfo.db:openDatabase(e.name,"","",0),e.storeName?t({db:n,storeNames:[e.storeName]}):t(function(e){return new a((function(t,r){e.transaction((function(n){n.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],(function(r,n){for(var i=[],o=0;o<n.rows.length;o++)i.push(n.rows.item(o).name);t({db:e,storeNames:i})}),(function(e,t){r(t)}))}),(function(e){r(e)}))}))}(n))})).then((function(e){return new a((function(t,r){e.db.transaction((function(n){function i(e){return new a((function(t,r){n.executeSql("DROP TABLE IF EXISTS "+e,[],(function(){t()}),(function(e,t){r(t)}))}))}for(var o=[],s=0,u=e.storeNames.length;s<u;s++)o.push(i(e.storeNames[s]));a.all(o).then((function(){t()})).catch((function(e){r(e)}))}),(function(e){r(e)}))}))})):a.reject("Invalid arguments"),t),n}};function Z(e,t){var r=e.name+"/";return e.storeName!==t.storeName&&(r+=e.storeName+"/"),r}var J={_driver:"localStorageWrapper",_initStorage:function(e){var t={};if(e)for(var r in e)t[r]=e[r];return t.keyPrefix=Z(e,this._defaultConfig),!function(){var e="_localforage_support_test";try{return localStorage.setItem(e,!0),localStorage.removeItem(e),!1}catch(e){return!0}}()||localStorage.length>0?(this._dbInfo=t,t.serializer=W,a.resolve()):a.reject()},_support:function(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(e){return!1}}(),iterate:function(e,t){var r=this,n=r.ready().then((function(){for(var t=r._dbInfo,n=t.keyPrefix,i=n.length,o=localStorage.length,a=1,s=0;s<o;s++){var u=localStorage.key(s);if(0===u.indexOf(n)){var c=localStorage.getItem(u);if(c&&(c=t.serializer.deserialize(c)),void 0!==(c=e(c,u.substring(i),a++)))return c}}}));return u(n,t),n},getItem:function(e,t){var r=this;e=l(e);var n=r.ready().then((function(){var t=r._dbInfo,n=localStorage.getItem(t.keyPrefix+e);return n&&(n=t.serializer.deserialize(n)),n}));return u(n,t),n},setItem:function(e,t,r){var n=this;e=l(e);var i=n.ready().then((function(){void 0===t&&(t=null);var r=t;return new a((function(i,o){var a=n._dbInfo;a.serializer.serialize(t,(function(t,n){if(n)o(n);else try{localStorage.setItem(a.keyPrefix+e,t),i(r)}catch(e){"QuotaExceededError"!==e.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==e.name||o(e),o(e)}}))}))}));return u(i,r),i},removeItem:function(e,t){var r=this;e=l(e);var n=r.ready().then((function(){var t=r._dbInfo;localStorage.removeItem(t.keyPrefix+e)}));return u(n,t),n},clear:function(e){var t=this,r=t.ready().then((function(){for(var e=t._dbInfo.keyPrefix,r=localStorage.length-1;r>=0;r--){var n=localStorage.key(r);0===n.indexOf(e)&&localStorage.removeItem(n)}}));return u(r,e),r},length:function(e){var t=this.keys().then((function(e){return e.length}));return u(t,e),t},key:function(e,t){var r=this,n=r.ready().then((function(){var t,n=r._dbInfo;try{t=localStorage.key(e)}catch(e){t=null}return t&&(t=t.substring(n.keyPrefix.length)),t}));return u(n,t),n},keys:function(e){var t=this,r=t.ready().then((function(){for(var e=t._dbInfo,r=localStorage.length,n=[],i=0;i<r;i++){var o=localStorage.key(i);0===o.indexOf(e.keyPrefix)&&n.push(o.substring(e.keyPrefix.length))}return n}));return u(r,e),r},dropInstance:function(e,t){if(t=f.apply(this,arguments),!(e="function"!=typeof e&&e||{}).name){var r=this.config();e.name=e.name||r.name,e.storeName=e.storeName||r.storeName}var n,i=this;return u(n=e.name?new a((function(t){e.storeName?t(Z(e,i._defaultConfig)):t(e.name+"/")})).then((function(e){for(var t=localStorage.length-1;t>=0;t--){var r=localStorage.key(t);0===r.indexOf(e)&&localStorage.removeItem(r)}})):a.reject("Invalid arguments"),t),n}},ee=function(e,t){for(var r,n,i=e.length,o=0;o<i;){if((r=e[o])===(n=t)||"number"==typeof r&&"number"==typeof n&&isNaN(r)&&isNaN(n))return!0;o++}return!1},te=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},re={},ne={},ie={INDEXEDDB:D,WEBSQL:$,LOCALSTORAGE:J},oe=[ie.INDEXEDDB._driver,ie.WEBSQL._driver,ie.LOCALSTORAGE._driver],ae=["dropInstance"],se=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(ae),ue={description:"",driver:oe.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function ce(e,t){e[t]=function(){var r=arguments;return e.ready().then((function(){return e[t].apply(e,r)}))}}function le(){for(var e=1;e<arguments.length;e++){var t=arguments[e];if(t)for(var r in t)t.hasOwnProperty(r)&&(te(t[r])?arguments[0][r]=t[r].slice():arguments[0][r]=t[r])}return arguments[0]}var fe=function(){function e(t){for(var r in function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),ie)if(ie.hasOwnProperty(r)){var n=ie[r],i=n._driver;this[r]=i,re[i]||this.defineDriver(n)}this._defaultConfig=le({},ue),this._config=le({},this._defaultConfig,t),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch((function(){}))}return e.prototype.config=function(e){if("object"===(void 0===e?"undefined":n(e))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var t in e){if("storeName"===t&&(e[t]=e[t].replace(/\W/g,"_")),"version"===t&&"number"!=typeof e[t])return new Error("Database version must be a number.");this._config[t]=e[t]}return!("driver"in e)||!e.driver||this.setDriver(this._config.driver)}return"string"==typeof e?this._config[e]:this._config},e.prototype.defineDriver=function(e,t,r){var n=new a((function(t,r){try{var n=e._driver,i=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!e._driver)return void r(i);for(var o=se.concat("_initStorage"),s=0,c=o.length;s<c;s++){var l=o[s];if((!ee(ae,l)||e[l])&&"function"!=typeof e[l])return void r(i)}!function(){for(var t=function(e){return function(){var t=new Error("Method "+e+" is not implemented by the current driver"),r=a.reject(t);return u(r,arguments[arguments.length-1]),r}},r=0,n=ae.length;r<n;r++){var i=ae[r];e[i]||(e[i]=t(i))}}();var f=function(r){re[n]&&console.info("Redefining LocalForage driver: "+n),re[n]=e,ne[n]=r,t()};"_support"in e?e._support&&"function"==typeof e._support?e._support().then(f,r):f(!!e._support):f(!0)}catch(e){r(e)}}));return c(n,t,r),n},e.prototype.driver=function(){return this._driver||null},e.prototype.getDriver=function(e,t,r){var n=re[e]?a.resolve(re[e]):a.reject(new Error("Driver not found."));return c(n,t,r),n},e.prototype.getSerializer=function(e){var t=a.resolve(W);return c(t,e),t},e.prototype.ready=function(e){var t=this,r=t._driverSet.then((function(){return null===t._ready&&(t._ready=t._initDriver()),t._ready}));return c(r,e,e),r},e.prototype.setDriver=function(e,t,r){var n=this;te(e)||(e=[e]);var i=this._getSupportedDrivers(e);function o(){n._config.driver=n.driver()}function s(e){return n._extend(e),o(),n._ready=n._initStorage(n._config),n._ready}var u=null!==this._driverSet?this._driverSet.catch((function(){return a.resolve()})):a.resolve();return this._driverSet=u.then((function(){var e=i[0];return n._dbInfo=null,n._ready=null,n.getDriver(e).then((function(e){n._driver=e._driver,o(),n._wrapLibraryMethodsWithReady(),n._initDriver=function(e){return function(){var t=0;return function r(){for(;t<e.length;){var i=e[t];return t++,n._dbInfo=null,n._ready=null,n.getDriver(i).then(s).catch(r)}o();var u=new Error("No available storage method found.");return n._driverSet=a.reject(u),n._driverSet}()}}(i)}))})).catch((function(){o();var e=new Error("No available storage method found.");return n._driverSet=a.reject(e),n._driverSet})),c(this._driverSet,t,r),this._driverSet},e.prototype.supports=function(e){return!!ne[e]},e.prototype._extend=function(e){le(this,e)},e.prototype._getSupportedDrivers=function(e){for(var t=[],r=0,n=e.length;r<n;r++){var i=e[r];this.supports(i)&&t.push(i)}return t},e.prototype._wrapLibraryMethodsWithReady=function(){for(var e=0,t=se.length;e<t;e++)ce(this,se[e])},e.prototype.createInstance=function(t){return new e(t)},e}(),de=new fe;t.exports=de},{3:3}]},{},[4])(4)},"object"===s(t)?e.exports=a():(i=[],void 0===(o="function"==typeof(n=a)?n.apply(t,i):n)||(e.exports=o))},93282:function(e,t,r){"use strict";var n=r(95429);function i(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function o(e,t){for(var r,n="",i=0,o=-1,a=0,s=0;s<=e.length;++s){if(s<e.length)r=e.charCodeAt(s);else{if(47===r)break;r=47}if(47===r){if(o===s-1||1===a);else if(o!==s-1&&2===a){if(n.length<2||2!==i||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var u=n.lastIndexOf("/");if(u!==n.length-1){-1===u?(n="",i=0):i=(n=n.slice(0,u)).length-1-n.lastIndexOf("/"),o=s,a=0;continue}}else if(2===n.length||1===n.length){n="",i=0,o=s,a=0;continue}t&&(n.length>0?n+="/..":n="..",i=2)}else n.length>0?n+="/"+e.slice(o+1,s):n=e.slice(o+1,s),i=s-o-1;o=s,a=0}else 46===r&&-1!==a?++a:a=-1}return n}r(16280),r(34782),r(62010),r(33110);var a={resolve:function(){for(var e,t="",r=!1,n=arguments.length-1;n>=-1&&!r;n--){var a;n>=0?a=arguments[n]:(void 0===e&&(e=process.cwd()),a=e),i(a),0!==a.length&&(t=a+"/"+t,r=47===a.charCodeAt(0))}return t=o(t,!r),r?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(e){if(i(e),0===e.length)return".";var t=47===e.charCodeAt(0),r=47===e.charCodeAt(e.length-1);return 0!==(e=o(e,!t)).length||t||(e="."),e.length>0&&r&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return i(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t<arguments.length;++t){var r=arguments[t];i(r),r.length>0&&(void 0===e?e=r:e+="/"+r)}return void 0===e?".":a.normalize(e)},relative:function(e,t){if(i(e),i(t),e===t)return"";if((e=a.resolve(e))===(t=a.resolve(t)))return"";for(var r=1;r<e.length&&47===e.charCodeAt(r);++r);for(var n=e.length,o=n-r,s=1;s<t.length&&47===t.charCodeAt(s);++s);for(var u=t.length-s,c=o<u?o:u,l=-1,f=0;f<=c;++f){if(f===c){if(u>c){if(47===t.charCodeAt(s+f))return t.slice(s+f+1);if(0===f)return t.slice(s+f)}else o>c&&(47===e.charCodeAt(r+f)?l=f:0===f&&(l=0));break}var d=e.charCodeAt(r+f);if(d!==t.charCodeAt(s+f))break;47===d&&(l=f)}var p="";for(f=r+l+1;f<=n;++f)f!==n&&47!==e.charCodeAt(f)||(0===p.length?p+="..":p+="/..");return p.length>0?p+t.slice(s+l):(s+=l,47===t.charCodeAt(s)&&++s,t.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(i(e),0===e.length)return".";for(var t=e.charCodeAt(0),r=47===t,n=-1,o=!0,a=e.length-1;a>=1;--a)if(47===(t=e.charCodeAt(a))){if(!o){n=a;break}}else o=!1;return-1===n?r?"/":".":r&&1===n?"//":e.slice(0,n)},basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');i(e);var r,n=0,o=-1,a=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var s=t.length-1,u=-1;for(r=e.length-1;r>=0;--r){var c=e.charCodeAt(r);if(47===c){if(!a){n=r+1;break}}else-1===u&&(a=!1,u=r+1),s>=0&&(c===t.charCodeAt(s)?-1==--s&&(o=r):(s=-1,o=u))}return n===o?o=u:-1===o&&(o=e.length),e.slice(n,o)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!a){n=r+1;break}}else-1===o&&(a=!1,o=r+1);return-1===o?"":e.slice(n,o)},extname:function(e){i(e);for(var t=-1,r=0,n=-1,o=!0,a=0,s=e.length-1;s>=0;--s){var u=e.charCodeAt(s);if(47!==u)-1===n&&(o=!1,n=s+1),46===u?-1===t?t=s:1!==a&&(a=1):-1!==t&&(a=-1);else if(!o){r=s+1;break}}return-1===t||-1===n||0===a||1===a&&t===n-1&&t===r+1?"":e.slice(t,n)},format:function(e){if(null===e||"object"!==n(e))throw new TypeError('The "pathObject" argument must be of type Object. Received type '+n(e));return function(e,t){var r=t.dir||t.root,n=t.base||(t.name||"")+(t.ext||"");return r?r===t.root?r+n:r+"/"+n:n}(0,e)},parse:function(e){i(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var r,n=e.charCodeAt(0),o=47===n;o?(t.root="/",r=1):r=0;for(var a=-1,s=0,u=-1,c=!0,l=e.length-1,f=0;l>=r;--l)if(47!==(n=e.charCodeAt(l)))-1===u&&(c=!1,u=l+1),46===n?-1===a?a=l:1!==f&&(f=1):-1!==a&&(f=-1);else if(!c){s=l+1;break}return-1===a||-1===u||0===f||1===f&&a===u-1&&a===s+1?-1!==u&&(t.base=t.name=0===s&&o?e.slice(1,u):e.slice(s,u)):(0===s&&o?(t.name=e.slice(1,a),t.base=e.slice(1,u)):(t.name=e.slice(s,a),t.base=e.slice(s,u)),t.ext=e.slice(a,u)),s>0?t.dir=e.slice(0,s-1):o&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};a.posix=a,e.exports=a},79306:function(e,t,r){"use strict";var n=r(94901),i=r(16823),o=TypeError;e.exports=function(e){if(n(e))return e;throw new o(i(e)+" is not a function")}},35548:function(e,t,r){"use strict";var n=r(33517),i=r(16823),o=TypeError;e.exports=function(e){if(n(e))return e;throw new o(i(e)+" is not a constructor")}},73506:function(e,t,r){"use strict";var n=r(13925),i=String,o=TypeError;e.exports=function(e){if(n(e))return e;throw new o("Can't set "+i(e)+" as a prototype")}},97080:function(e,t,r){"use strict";var n=r(94402).has;e.exports=function(e){return n(e),e}},63463:function(e){"use strict";var t=TypeError;e.exports=function(e){if("string"==typeof e)return e;throw new t("Argument is not a string")}},6469:function(e,t,r){"use strict";var n=r(78227),i=r(2360),o=r(24913).f,a=n("unscopables"),s=Array.prototype;void 0===s[a]&&o(s,a,{configurable:!0,value:i(null)}),e.exports=function(e){s[a][e]=!0}},57829:function(e,t,r){"use strict";var n=r(68183).charAt;e.exports=function(e,t,r){return t+(r?n(e,t).length:1)}},90679:function(e,t,r){"use strict";var n=r(1625),i=TypeError;e.exports=function(e,t){if(n(t,e))return e;throw new i("Incorrect invocation")}},83972:function(e,t,r){"use strict";var n=r(20034),i=String,o=TypeError;e.exports=function(e){if(void 0===e||n(e))return e;throw new o(i(e)+" is not an object or undefined")}},28551:function(e,t,r){"use strict";var n=r(20034),i=String,o=TypeError;e.exports=function(e){if(n(e))return e;throw new o(i(e)+" is not an object")}},34154:function(e,t,r){"use strict";var n=r(36955),i=TypeError;e.exports=function(e){if("Uint8Array"===n(e))return e;throw new i("Argument is not an Uint8Array")}},77811:function(e){"use strict";e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},67394:function(e,t,r){"use strict";var n=r(44576),i=r(46706),o=r(22195),a=n.ArrayBuffer,s=n.TypeError;e.exports=a&&i(a.prototype,"byteLength","get")||function(e){if("ArrayBuffer"!==o(e))throw new s("ArrayBuffer expected");return e.byteLength}},3238:function(e,t,r){"use strict";var n=r(44576),i=r(77811),o=r(67394),a=n.DataView;e.exports=function(e){if(!i||0!==o(e))return!1;try{return new a(e),!1}catch(e){return!0}}},15652:function(e,t,r){"use strict";var n=r(79039);e.exports=n((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}))},55169:function(e,t,r){"use strict";var n=r(3238),i=TypeError;e.exports=function(e){if(n(e))throw new i("ArrayBuffer is detached");return e}},95636:function(e,t,r){"use strict";var n=r(44576),i=r(79504),o=r(46706),a=r(57696),s=r(55169),u=r(67394),c=r(94483),l=r(1548),f=n.structuredClone,d=n.ArrayBuffer,p=n.DataView,h=Math.min,v=d.prototype,m=p.prototype,g=i(v.slice),E=o(v,"resizable","get"),y=o(v,"maxByteLength","get"),T=i(m.getInt8),_=i(m.setInt8);e.exports=(l||c)&&function(e,t,r){var n,i=u(e),o=void 0===t?i:a(t),v=!E||!E(e);if(s(e),l&&(e=f(e,{transfer:[e]}),i===o&&(r||v)))return e;if(i>=o&&(!r||v))n=g(e,0,o);else{var m=r&&!v&&y?{maxByteLength:y(e)}:void 0;n=new d(o,m);for(var I=new p(e),S=new p(n),A=h(o,i),R=0;R<A;R++)_(S,R,T(I,R))}return l||c(e),n}},94644:function(e,t,r){"use strict";var n,i,o,a=r(77811),s=r(43724),u=r(44576),c=r(94901),l=r(20034),f=r(39297),d=r(36955),p=r(16823),h=r(66699),v=r(36840),m=r(62106),g=r(1625),E=r(42787),y=r(52967),T=r(78227),_=r(33392),I=r(91181),S=I.enforce,A=I.get,R=u.Int8Array,b=R&&R.prototype,N=u.Uint8ClampedArray,O=N&&N.prototype,D=R&&E(R),w=b&&E(b),C=Object.prototype,P=u.TypeError,L=T("toStringTag"),M=_("TYPED_ARRAY_TAG"),x="TypedArrayConstructor",U=a&&!!y&&"Opera"!==d(u.opera),F=!1,B={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},k={BigInt64Array:8,BigUint64Array:8},G=function(e){var t=E(e);if(l(t)){var r=A(t);return r&&f(r,x)?r[x]:G(t)}},q=function(e){if(!l(e))return!1;var t=d(e);return f(B,t)||f(k,t)};for(n in B)(o=(i=u[n])&&i.prototype)?S(o)[x]=i:U=!1;for(n in k)(o=(i=u[n])&&i.prototype)&&(S(o)[x]=i);if((!U||!c(D)||D===Function.prototype)&&(D=function(){throw new P("Incorrect invocation")},U))for(n in B)u[n]&&y(u[n],D);if((!U||!w||w===C)&&(w=D.prototype,U))for(n in B)u[n]&&y(u[n].prototype,w);if(U&&E(O)!==w&&y(O,w),s&&!f(w,L))for(n in F=!0,m(w,L,{configurable:!0,get:function(){return l(this)?this[M]:void 0}}),B)u[n]&&h(u[n],M,n);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:U,TYPED_ARRAY_TAG:F&&M,aTypedArray:function(e){if(q(e))return e;throw new P("Target is not a typed array")},aTypedArrayConstructor:function(e){if(c(e)&&(!y||g(D,e)))return e;throw new P(p(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,n){if(s){if(r)for(var i in B){var o=u[i];if(o&&f(o.prototype,e))try{delete o.prototype[e]}catch(r){try{o.prototype[e]=t}catch(e){}}}w[e]&&!r||v(w,e,r?t:U&&b[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,r){var n,i;if(s){if(y){if(r)for(n in B)if((i=u[n])&&f(i,e))try{delete i[e]}catch(e){}if(D[e]&&!r)return;try{return v(D,e,r?t:U&&D[e]||t)}catch(e){}}for(n in B)!(i=u[n])||i[e]&&!r||v(i,e,t)}},getTypedArrayConstructor:G,isView:function(e){if(!l(e))return!1;var t=d(e);return"DataView"===t||f(B,t)||f(k,t)},isTypedArray:q,TypedArray:D,TypedArrayPrototype:w}},66346:function(e,t,r){"use strict";var n=r(44576),i=r(79504),o=r(43724),a=r(77811),s=r(10350),u=r(66699),c=r(62106),l=r(56279),f=r(79039),d=r(90679),p=r(91291),h=r(18014),v=r(57696),m=r(15617),g=r(88490),E=r(42787),y=r(52967),T=r(84373),_=r(67680),I=r(23167),S=r(77740),A=r(10687),R=r(91181),b=s.PROPER,N=s.CONFIGURABLE,O="ArrayBuffer",D="DataView",w="prototype",C="Wrong index",P=R.getterFor(O),L=R.getterFor(D),M=R.set,x=n[O],U=x,F=U&&U[w],B=n[D],k=B&&B[w],G=Object.prototype,q=n.Array,j=n.RangeError,H=i(T),Y=i([].reverse),V=g.pack,z=g.unpack,W=function(e){return[255&e]},K=function(e){return[255&e,e>>8&255]},X=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},Q=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},$=function(e){return V(m(e),23,4)},Z=function(e){return V(e,52,8)},J=function(e,t,r){c(e[w],t,{configurable:!0,get:function(){return r(this)[t]}})},ee=function(e,t,r,n){var i=L(e),o=v(r),a=!!n;if(o+t>i.byteLength)throw new j(C);var s=i.bytes,u=o+i.byteOffset,c=_(s,u,u+t);return a?c:Y(c)},te=function(e,t,r,n,i,o){var a=L(e),s=v(r),u=n(+i),c=!!o;if(s+t>a.byteLength)throw new j(C);for(var l=a.bytes,f=s+a.byteOffset,d=0;d<t;d++)l[f+d]=u[c?d:t-d-1]};if(a){var re=b&&x.name!==O;f((function(){x(1)}))&&f((function(){new x(-1)}))&&!f((function(){return new x,new x(1.5),new x(NaN),1!==x.length||re&&!N}))?re&&N&&u(x,"name",O):((U=function(e){return d(this,F),I(new x(v(e)),this,U)})[w]=F,F.constructor=U,S(U,x)),y&&E(k)!==G&&y(k,G);var ne=new B(new U(2)),ie=i(k.setInt8);ne.setInt8(0,2147483648),ne.setInt8(1,2147483649),!ne.getInt8(0)&&ne.getInt8(1)||l(k,{setInt8:function(e,t){ie(this,e,t<<24>>24)},setUint8:function(e,t){ie(this,e,t<<24>>24)}},{unsafe:!0})}else F=(U=function(e){d(this,F);var t=v(e);M(this,{type:O,bytes:H(q(t),0),byteLength:t}),o||(this.byteLength=t,this.detached=!1)})[w],k=(B=function(e,t,r){d(this,k),d(e,F);var n=P(e),i=n.byteLength,a=p(t);if(a<0||a>i)throw new j("Wrong offset");if(a+(r=void 0===r?i-a:h(r))>i)throw new j("Wrong length");M(this,{type:D,buffer:e,byteLength:r,byteOffset:a,bytes:n.bytes}),o||(this.buffer=e,this.byteLength=r,this.byteOffset=a)})[w],o&&(J(U,"byteLength",P),J(B,"buffer",L),J(B,"byteLength",L),J(B,"byteOffset",L)),l(k,{getInt8:function(e){return ee(this,1,e)[0]<<24>>24},getUint8:function(e){return ee(this,1,e)[0]},getInt16:function(e){var t=ee(this,2,e,arguments.length>1&&arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=ee(this,2,e,arguments.length>1&&arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return Q(ee(this,4,e,arguments.length>1&&arguments[1]))},getUint32:function(e){return Q(ee(this,4,e,arguments.length>1&&arguments[1]))>>>0},getFloat32:function(e){return z(ee(this,4,e,arguments.length>1&&arguments[1]),23)},getFloat64:function(e){return z(ee(this,8,e,arguments.length>1&&arguments[1]),52)},setInt8:function(e,t){te(this,1,e,W,t)},setUint8:function(e,t){te(this,1,e,W,t)},setInt16:function(e,t){te(this,2,e,K,t,arguments.length>2&&arguments[2])},setUint16:function(e,t){te(this,2,e,K,t,arguments.length>2&&arguments[2])},setInt32:function(e,t){te(this,4,e,X,t,arguments.length>2&&arguments[2])},setUint32:function(e,t){te(this,4,e,X,t,arguments.length>2&&arguments[2])},setFloat32:function(e,t){te(this,4,e,$,t,arguments.length>2&&arguments[2])},setFloat64:function(e,t){te(this,8,e,Z,t,arguments.length>2&&arguments[2])}});A(U,O),A(B,D),e.exports={ArrayBuffer:U,DataView:B}},57029:function(e,t,r){"use strict";var n=r(48981),i=r(35610),o=r(26198),a=r(84606),s=Math.min;e.exports=[].copyWithin||function(e,t){var r=n(this),u=o(r),c=i(e,u),l=i(t,u),f=arguments.length>2?arguments[2]:void 0,d=s((void 0===f?u:i(f,u))-l,u-c),p=1;for(l<c&&c<l+d&&(p=-1,l+=d-1,c+=d-1);d-- >0;)l in r?r[c]=r[l]:a(r,c),c+=p,l+=p;return r}},84373:function(e,t,r){"use strict";var n=r(48981),i=r(35610),o=r(26198);e.exports=function(e){for(var t=n(this),r=o(t),a=arguments.length,s=i(a>1?arguments[1]:void 0,r),u=a>2?arguments[2]:void 0,c=void 0===u?r:i(u,r);c>s;)t[s++]=e;return t}},90235:function(e,t,r){"use strict";var n=r(59213).forEach,i=r(34598)("forEach");e.exports=i?[].forEach:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}},35370:function(e,t,r){"use strict";var n=r(26198);e.exports=function(e,t,r){for(var i=0,o=arguments.length>2?r:n(t),a=new e(o);o>i;)a[i]=t[i++];return a}},97916:function(e,t,r){"use strict";var n=r(76080),i=r(69565),o=r(48981),a=r(96319),s=r(44209),u=r(33517),c=r(26198),l=r(97040),f=r(70081),d=r(50851),p=Array;e.exports=function(e){var t=o(e),r=u(this),h=arguments.length,v=h>1?arguments[1]:void 0,m=void 0!==v;m&&(v=n(v,h>2?arguments[2]:void 0));var g,E,y,T,_,I,S=d(t),A=0;if(!S||this===p&&s(S))for(g=c(t),E=r?new this(g):p(g);g>A;A++)I=m?v(t[A],A):t[A],l(E,A,I);else for(E=r?new this:[],_=(T=f(t,S)).next;!(y=i(_,T)).done;A++)I=m?a(T,v,[y.value,A],!0):y.value,l(E,A,I);return E.length=A,E}},19617:function(e,t,r){"use strict";var n=r(25397),i=r(35610),o=r(26198),a=function(e){return function(t,r,a){var s=n(t),u=o(s);if(0===u)return!e&&-1;var c,l=i(a,u);if(e&&r!=r){for(;u>l;)if((c=s[l++])!=c)return!0}else for(;u>l;l++)if((e||l in s)&&s[l]===r)return e||l||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},43839:function(e,t,r){"use strict";var n=r(76080),i=r(47055),o=r(48981),a=r(26198),s=function(e){var t=1===e;return function(r,s,u){for(var c,l=o(r),f=i(l),d=a(f),p=n(s,u);d-- >0;)if(p(c=f[d],d,l))switch(e){case 0:return c;case 1:return d}return t?-1:void 0}};e.exports={findLast:s(0),findLastIndex:s(1)}},59213:function(e,t,r){"use strict";var n=r(76080),i=r(79504),o=r(47055),a=r(48981),s=r(26198),u=r(1469),c=i([].push),l=function(e){var t=1===e,r=2===e,i=3===e,l=4===e,f=6===e,d=7===e,p=5===e||f;return function(h,v,m,g){for(var E,y,T=a(h),_=o(T),I=s(_),S=n(v,m),A=0,R=g||u,b=t?R(h,I):r||d?R(h,0):void 0;I>A;A++)if((p||A in _)&&(y=S(E=_[A],A,T),e))if(t)b[A]=y;else if(y)switch(e){case 3:return!0;case 5:return E;case 6:return A;case 2:c(b,E)}else switch(e){case 4:return!1;case 7:c(b,E)}return f?-1:i||l?l:b}};e.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},8379:function(e,t,r){"use strict";var n=r(18745),i=r(25397),o=r(91291),a=r(26198),s=r(34598),u=Math.min,c=[].lastIndexOf,l=!!c&&1/[1].lastIndexOf(1,-0)<0,f=s("lastIndexOf"),d=l||!f;e.exports=d?function(e){if(l)return n(c,this,arguments)||0;var t=i(this),r=a(t);if(0===r)return-1;var s=r-1;for(arguments.length>1&&(s=u(s,o(arguments[1]))),s<0&&(s=r+s);s>=0;s--)if(s in t&&t[s]===e)return s||0;return-1}:c},70597:function(e,t,r){"use strict";var n=r(79039),i=r(78227),o=r(39519),a=i("species");e.exports=function(e){return o>=51||!n((function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},34598:function(e,t,r){"use strict";var n=r(79039);e.exports=function(e,t){var r=[][e];return!!r&&n((function(){r.call(null,t||function(){return 1},1)}))}},80926:function(e,t,r){"use strict";var n=r(79306),i=r(48981),o=r(47055),a=r(26198),s=TypeError,u="Reduce of empty array with no initial value",c=function(e){return function(t,r,c,l){var f=i(t),d=o(f),p=a(f);if(n(r),0===p&&c<2)throw new s(u);var h=e?p-1:0,v=e?-1:1;if(c<2)for(;;){if(h in d){l=d[h],h+=v;break}if(h+=v,e?h<0:p<=h)throw new s(u)}for(;e?h>=0:p>h;h+=v)h in d&&(l=r(l,d[h],h,f));return l}};e.exports={left:c(!1),right:c(!0)}},34527:function(e,t,r){"use strict";var n=r(43724),i=r(34376),o=TypeError,a=Object.getOwnPropertyDescriptor,s=n&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=s?function(e,t){if(i(e)&&!a(e,"length").writable)throw new o("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},67680:function(e,t,r){"use strict";var n=r(79504);e.exports=n([].slice)},74488:function(e,t,r){"use strict";var n=r(67680),i=Math.floor,o=function(e,t){var r=e.length;if(r<8)for(var a,s,u=1;u<r;){for(s=u,a=e[u];s&&t(e[s-1],a)>0;)e[s]=e[--s];s!==u++&&(e[s]=a)}else for(var c=i(r/2),l=o(n(e,0,c),t),f=o(n(e,c),t),d=l.length,p=f.length,h=0,v=0;h<d||v<p;)e[h+v]=h<d&&v<p?t(l[h],f[v])<=0?l[h++]:f[v++]:h<d?l[h++]:f[v++];return e};e.exports=o},87433:function(e,t,r){"use strict";var n=r(34376),i=r(33517),o=r(20034),a=r(78227)("species"),s=Array;e.exports=function(e){var t;return n(e)&&(t=e.constructor,(i(t)&&(t===s||n(t.prototype))||o(t)&&null===(t=t[a]))&&(t=void 0)),void 0===t?s:t}},1469:function(e,t,r){"use strict";var n=r(87433);e.exports=function(e,t){return new(n(e))(0===t?0:t)}},37628:function(e,t,r){"use strict";var n=r(26198);e.exports=function(e,t){for(var r=n(e),i=new t(r),o=0;o<r;o++)i[o]=e[r-o-1];return i}},39928:function(e,t,r){"use strict";var n=r(26198),i=r(91291),o=RangeError;e.exports=function(e,t,r,a){var s=n(e),u=i(r),c=u<0?s+u:u;if(c>=s||c<0)throw new o("Incorrect index");for(var l=new t(s),f=0;f<s;f++)l[f]=f===c?a:e[f];return l}},92804:function(e){"use strict";var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=t+"+/",n=t+"-_",i=function(e){for(var t={},r=0;r<64;r++)t[e.charAt(r)]=r;return t};e.exports={i2c:r,c2i:i(r),i2cUrl:n,c2iUrl:i(n)}},96319:function(e,t,r){"use strict";var n=r(28551),i=r(9539);e.exports=function(e,t,r,o){try{return o?t(n(r)[0],r[1]):t(r)}catch(t){i(e,"throw",t)}}},84428:function(e,t,r){"use strict";var n=r(78227)("iterator"),i=!1;try{var o=0,a={next:function(){return{done:!!o++}},return:function(){i=!0}};a[n]=function(){return this},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,t){try{if(!t&&!i)return!1}catch(e){return!1}var r=!1;try{var o={};o[n]=function(){return{next:function(){return{done:r=!0}}}},e(o)}catch(e){}return r}},22195:function(e,t,r){"use strict";var n=r(79504),i=n({}.toString),o=n("".slice);e.expo