You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
215 KiB
2 lines
215 KiB
/*! For license information please see background-page.js.LICENSE.txt */
|
|
(()=>{var e={8608:(e,t,r)=>{"use strict";var n=r(4663),o=r(1413),i=o(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&i(e,".prototype.")>-1?o(r):r}},1413:(e,t,r)=>{"use strict";var n=r(4672),o=r(4663),i=r(7319),a=o("%TypeError%"),s=o("%Function.prototype.apply%"),u=o("%Function.prototype.call%"),l=o("%Reflect.apply%",!0)||n.call(u,s),c=o("%Object.defineProperty%",!0),f=o("%Math.max%");if(c)try{c({},"a",{value:1})}catch(e){c=null}e.exports=function(e){if("function"!=typeof e)throw new a("a function is required");var t=l(n,u,arguments);return i(t,1+f(0,e.length-(arguments.length-1)),!0)};var h=function(){return l(n,s,arguments)};c?c(e.exports,"apply",{value:h}):e.exports.apply=h},8531:(e,t,r)=>{"use strict";var n=r(3219)(),o=r(4663),i=n&&o("%Object.defineProperty%",!0);if(i)try{i({},"a",{value:1})}catch(e){i=!1}var a=o("%SyntaxError%"),s=o("%TypeError%"),u=r(8337);e.exports=function(e,t,r){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new s("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,l=arguments.length>5?arguments[5]:null,c=arguments.length>6&&arguments[6],f=!!u&&u(e,t);if(i)i(e,t,{configurable:null===l&&f?f.configurable:!l,enumerable:null===n&&f?f.enumerable:!n,value:r,writable:null===o&&f?f.writable:!o});else{if(!c&&(n||o||l))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=r}}},3351:e=>{"use strict";var t=Object.prototype.toString,r=Math.max,n=function(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var o=0;o<t.length;o+=1)r[o+e.length]=t[o];return r};e.exports=function(e){var o=this;if("function"!=typeof o||"[object Function]"!==t.apply(o))throw new TypeError("Function.prototype.bind called on incompatible "+o);for(var i,a=function(e,t){for(var r=[],n=1,o=0;n<e.length;n+=1,o+=1)r[o]=e[n];return r}(arguments),s=r(0,o.length-a.length),u=[],l=0;l<s;l++)u[l]="$"+l;if(i=Function("binder","return function ("+function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=",");return r}(u)+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof i){var t=o.apply(this,n(a,arguments));return Object(t)===t?t:this}return o.apply(e,n(a,arguments))})),o.prototype){var c=function(){};c.prototype=o.prototype,i.prototype=new c,c.prototype=null}return i}},4672:(e,t,r)=>{"use strict";var n=r(3351);e.exports=Function.prototype.bind||n},4663:(e,t,r)=>{"use strict";var n,o=SyntaxError,i=Function,a=TypeError,s=function(e){try{return i('"use strict"; return ('+e+").constructor;")()}catch(e){}},u=Object.getOwnPropertyDescriptor;if(u)try{u({},"")}catch(e){u=null}var l=function(){throw new a},c=u?function(){try{return l}catch(e){try{return u(arguments,"callee").get}catch(e){return l}}}():l,f=r(4573)(),h=r(8912)(),p=Object.getPrototypeOf||(h?function(e){return e.__proto__}:null),d={},y="undefined"!=typeof Uint8Array&&p?p(Uint8Array):n,g={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":f&&p?p([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":d,"%AsyncGenerator%":d,"%AsyncGeneratorFunction%":d,"%AsyncIteratorPrototype%":d,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":d,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":f&&p?p(p([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&f&&p?p((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&f&&p?p((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":f&&p?p(""[Symbol.iterator]()):n,"%Symbol%":f?Symbol:n,"%SyntaxError%":o,"%ThrowTypeError%":c,"%TypedArray%":y,"%TypeError%":a,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(p)try{null.error}catch(e){var m=p(p(e));g["%Error.prototype%"]=m}var v=function e(t){var r;if("%AsyncFunction%"===t)r=s("async function () {}");else if("%GeneratorFunction%"===t)r=s("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=s("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&p&&(r=p(o.prototype))}return g[t]=r,r},b={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},w=r(4672),x=r(2907),k=w.call(Function.call,Array.prototype.concat),S=w.call(Function.apply,Array.prototype.splice),O=w.call(Function.call,String.prototype.replace),A=w.call(Function.call,String.prototype.slice),_=w.call(Function.call,RegExp.prototype.exec),j=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,P=/\\(\\)?/g,E=function(e,t){var r,n=e;if(x(b,n)&&(n="%"+(r=b[n])[0]+"%"),x(g,n)){var i=g[n];if(i===d&&(i=v(n)),void 0===i&&!t)throw new a("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new o("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===_(/^%?[^%]*%?$/,e))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=A(e,0,1),r=A(e,-1);if("%"===t&&"%"!==r)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new o("invalid intrinsic syntax, expected opening `%`");var n=[];return O(e,j,(function(e,t,r,o){n[n.length]=r?O(o,P,"$1"):t||e})),n}(e),n=r.length>0?r[0]:"",i=E("%"+n+"%",t),s=i.name,l=i.value,c=!1,f=i.alias;f&&(n=f[0],S(r,k([0,1],f)));for(var h=1,p=!0;h<r.length;h+=1){var d=r[h],y=A(d,0,1),m=A(d,-1);if(('"'===y||"'"===y||"`"===y||'"'===m||"'"===m||"`"===m)&&y!==m)throw new o("property names with quotes must have matching quotes");if("constructor"!==d&&p||(c=!0),x(g,s="%"+(n+="."+d)+"%"))l=g[s];else if(null!=l){if(!(d in l)){if(!t)throw new a("base intrinsic for "+e+" exists, but the property is not available.");return}if(u&&h+1>=r.length){var v=u(l,d);l=(p=!!v)&&"get"in v&&!("originalValue"in v.get)?v.get:l[d]}else p=x(l,d),l=l[d];p&&!c&&(g[s]=l)}}return l}},8337:(e,t,r)=>{"use strict";var n=r(4663)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(e){n=null}e.exports=n},3219:(e,t,r)=>{"use strict";var n=r(4663)("%Object.defineProperty%",!0),o=function(){if(n)try{return n({},"a",{value:1}),!0}catch(e){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==n([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},8912:e=>{"use strict";var t={foo:{}},r=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof r)}},4573:(e,t,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(4283);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},4283:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},2907:(e,t,r)=>{"use strict";var n=Function.prototype.call,o=Object.prototype.hasOwnProperty,i=r(4672);e.exports=i.call(n,o)},9427:(e,t,r)=>{"use strict";var n=r(1020),o=n.ValidatorResult,i=n.SchemaError,a={ignoreProperties:{id:!0,default:!0,description:!0,title:!0,additionalItems:!0,then:!0,else:!0,$schema:!0,$ref:!0,extends:!0}},s=a.validators={};function u(e,t,r,n,o){var i=t.throwError,a=t.throwAll;t.throwError=!1,t.throwAll=!1;var s=this.validateSchema(e,o,t,r);return t.throwError=i,t.throwAll=a,!s.valid&&n instanceof Function&&n(s),s.valid}function l(e,t){if(Object.hasOwnProperty.call(e,t))return e[t];if(t in e)for(;e=Object.getPrototypeOf(e);)if(Object.propertyIsEnumerable.call(e,t))return e[t]}function c(e,t,r,n,o,i){if(this.types.object(e)&&(!t.properties||void 0===t.properties[o]))if(!1===t.additionalProperties)i.addError({name:"additionalProperties",argument:o,message:"is not allowed to have the additional property "+JSON.stringify(o)});else{var a=t.additionalProperties||{};"function"==typeof r.preValidateProperty&&r.preValidateProperty(e,o,a,r,n);var s=this.validateSchema(e[o],a,r,n.makeChild(a,o));s.instance!==i.instance[o]&&(i.instance[o]=s.instance),i.importErrors(s)}}s.type=function(e,t,r,n){if(void 0===e)return null;var i=new o(e,t,r,n),a=Array.isArray(t.type)?t.type:[t.type];if(!a.some(this.testType.bind(this,e,t,r,n))){var s=a.map((function(e){if(e){var t=e.$id||e.id;return t?"<"+t+">":e+""}}));i.addError({name:"type",argument:s,message:"is not of a type(s) "+s})}return i},s.anyOf=function(e,t,r,n){if(void 0===e)return null;var a=new o(e,t,r,n),s=new o(e,t,r,n);if(!Array.isArray(t.anyOf))throw new i("anyOf must be an array");if(!t.anyOf.some(u.bind(this,e,r,n,(function(e){s.importErrors(e)})))){var l=t.anyOf.map((function(e,t){var r=e.$id||e.id;return r?"<"+r+">":e.title&&JSON.stringify(e.title)||e.$ref&&"<"+e.$ref+">"||"[subschema "+t+"]"}));r.nestedErrors&&a.importErrors(s),a.addError({name:"anyOf",argument:l,message:"is not any of "+l.join(",")})}return a},s.allOf=function(e,t,r,n){if(void 0===e)return null;if(!Array.isArray(t.allOf))throw new i("allOf must be an array");var a=new o(e,t,r,n),s=this;return t.allOf.forEach((function(t,o){var i=s.validateSchema(e,t,r,n);if(!i.valid){var u=t.$id||t.id||t.title&&JSON.stringify(t.title)||t.$ref&&"<"+t.$ref+">"||"[subschema "+o+"]";a.addError({name:"allOf",argument:{id:u,length:i.errors.length,valid:i},message:"does not match allOf schema "+u+" with "+i.errors.length+" error[s]:"}),a.importErrors(i)}})),a},s.oneOf=function(e,t,r,n){if(void 0===e)return null;if(!Array.isArray(t.oneOf))throw new i("oneOf must be an array");var a=new o(e,t,r,n),s=new o(e,t,r,n),l=t.oneOf.filter(u.bind(this,e,r,n,(function(e){s.importErrors(e)}))).length,c=t.oneOf.map((function(e,t){return e.$id||e.id||e.title&&JSON.stringify(e.title)||e.$ref&&"<"+e.$ref+">"||"[subschema "+t+"]"}));return 1!==l&&(r.nestedErrors&&a.importErrors(s),a.addError({name:"oneOf",argument:c,message:"is not exactly one from "+c.join(",")})),a},s.if=function(e,t,r,i){if(void 0===e)return null;if(!n.isSchema(t.if))throw new Error('Expected "if" keyword to be a schema');var a,s=u.call(this,e,r,i,null,t.if),l=new o(e,t,r,i);if(s){if(void 0===t.then)return;if(!n.isSchema(t.then))throw new Error('Expected "then" keyword to be a schema');a=this.validateSchema(e,t.then,r,i.makeChild(t.then)),l.importErrors(a)}else{if(void 0===t.else)return;if(!n.isSchema(t.else))throw new Error('Expected "else" keyword to be a schema');a=this.validateSchema(e,t.else,r,i.makeChild(t.else)),l.importErrors(a)}return l},s.propertyNames=function(e,t,r,a){if(this.types.object(e)){var s=new o(e,t,r,a),u=void 0!==t.propertyNames?t.propertyNames:{};if(!n.isSchema(u))throw new i('Expected "propertyNames" to be a schema (object or boolean)');for(var c in e)if(void 0!==l(e,c)){var f=this.validateSchema(c,u,r,a.makeChild(u));s.importErrors(f)}return s}},s.properties=function(e,t,r,n){if(this.types.object(e)){var a=new o(e,t,r,n),s=t.properties||{};for(var u in s){var c=s[u];if(void 0!==c){if(null===c)throw new i('Unexpected null, expected schema in "properties"');"function"==typeof r.preValidateProperty&&r.preValidateProperty(e,u,c,r,n);var f=l(e,u),h=this.validateSchema(f,c,r,n.makeChild(c,u));h.instance!==a.instance[u]&&(a.instance[u]=h.instance),a.importErrors(h)}}return a}},s.patternProperties=function(e,t,r,n){if(this.types.object(e)){var a=new o(e,t,r,n),s=t.patternProperties||{};for(var u in e){var l=!0;for(var f in s){var h=s[f];if(void 0!==h){if(null===h)throw new i('Unexpected null, expected schema in "patternProperties"');try{var p=new RegExp(f,"u")}catch(e){p=new RegExp(f)}if(p.test(u)){l=!1,"function"==typeof r.preValidateProperty&&r.preValidateProperty(e,u,h,r,n);var d=this.validateSchema(e[u],h,r,n.makeChild(h,u));d.instance!==a.instance[u]&&(a.instance[u]=d.instance),a.importErrors(d)}}}l&&c.call(this,e,t,r,n,u,a)}return a}},s.additionalProperties=function(e,t,r,n){if(this.types.object(e)){if(t.patternProperties)return null;var i=new o(e,t,r,n);for(var a in e)c.call(this,e,t,r,n,a,i);return i}},s.minProperties=function(e,t,r,n){if(this.types.object(e)){var i=new o(e,t,r,n);return Object.keys(e).length>=t.minProperties||i.addError({name:"minProperties",argument:t.minProperties,message:"does not meet minimum property length of "+t.minProperties}),i}},s.maxProperties=function(e,t,r,n){if(this.types.object(e)){var i=new o(e,t,r,n);return Object.keys(e).length<=t.maxProperties||i.addError({name:"maxProperties",argument:t.maxProperties,message:"does not meet maximum property length of "+t.maxProperties}),i}},s.items=function(e,t,r,n){var i=this;if(this.types.array(e)&&void 0!==t.items){var a=new o(e,t,r,n);return e.every((function(e,o){if(Array.isArray(t.items))var s=void 0===t.items[o]?t.additionalItems:t.items[o];else s=t.items;if(void 0===s)return!0;if(!1===s)return a.addError({name:"items",message:"additionalItems not permitted"}),!1;var u=i.validateSchema(e,s,r,n.makeChild(s,o));return u.instance!==a.instance[o]&&(a.instance[o]=u.instance),a.importErrors(u),!0})),a}},s.contains=function(e,t,r,i){var a=this;if(this.types.array(e)&&void 0!==t.contains){if(!n.isSchema(t.contains))throw new Error('Expected "contains" keyword to be a schema');var s=new o(e,t,r,i);return!1===e.some((function(e,n){return 0===a.validateSchema(e,t.contains,r,i.makeChild(t.contains,n)).errors.length}))&&s.addError({name:"contains",argument:t.contains,message:"must contain an item matching given schema"}),s}},s.minimum=function(e,t,r,n){if(this.types.number(e)){var i=new o(e,t,r,n);return t.exclusiveMinimum&&!0===t.exclusiveMinimum?e>t.minimum||i.addError({name:"minimum",argument:t.minimum,message:"must be greater than "+t.minimum}):e>=t.minimum||i.addError({name:"minimum",argument:t.minimum,message:"must be greater than or equal to "+t.minimum}),i}},s.maximum=function(e,t,r,n){if(this.types.number(e)){var i=new o(e,t,r,n);return t.exclusiveMaximum&&!0===t.exclusiveMaximum?e<t.maximum||i.addError({name:"maximum",argument:t.maximum,message:"must be less than "+t.maximum}):e<=t.maximum||i.addError({name:"maximum",argument:t.maximum,message:"must be less than or equal to "+t.maximum}),i}},s.exclusiveMinimum=function(e,t,r,n){if("boolean"!=typeof t.exclusiveMinimum&&this.types.number(e)){var i=new o(e,t,r,n);return e>t.exclusiveMinimum||i.addError({name:"exclusiveMinimum",argument:t.exclusiveMinimum,message:"must be strictly greater than "+t.exclusiveMinimum}),i}},s.exclusiveMaximum=function(e,t,r,n){if("boolean"!=typeof t.exclusiveMaximum&&this.types.number(e)){var i=new o(e,t,r,n);return e<t.exclusiveMaximum||i.addError({name:"exclusiveMaximum",argument:t.exclusiveMaximum,message:"must be strictly less than "+t.exclusiveMaximum}),i}};var f=function(e,t,r,a,s,u){if(this.types.number(e)){var l=t[s];if(0==l)throw new i(s+" cannot be zero");var c=new o(e,t,r,a),f=n.getDecimalPlaces(e),h=n.getDecimalPlaces(l),p=Math.max(f,h),d=Math.pow(10,p);return Math.round(e*d)%Math.round(l*d)!=0&&c.addError({name:s,argument:l,message:u+JSON.stringify(l)}),c}};function h(e,t,r){var o,i=r.length;for(o=t+1;o<i;o++)if(n.deepCompareStrict(e,r[o]))return!1;return!0}s.multipleOf=function(e,t,r,n){return f.call(this,e,t,r,n,"multipleOf","is not a multiple of (divisible by) ")},s.divisibleBy=function(e,t,r,n){return f.call(this,e,t,r,n,"divisibleBy","is not divisible by (multiple of) ")},s.required=function(e,t,r,n){var i=new o(e,t,r,n);return void 0===e&&!0===t.required?i.addError({name:"required",message:"is required"}):this.types.object(e)&&Array.isArray(t.required)&&t.required.forEach((function(t){void 0===l(e,t)&&i.addError({name:"required",argument:t,message:"requires property "+JSON.stringify(t)})})),i},s.pattern=function(e,t,r,n){if(this.types.string(e)){var i=new o(e,t,r,n),a=t.pattern;try{var s=new RegExp(a,"u")}catch(e){s=new RegExp(a)}return e.match(s)||i.addError({name:"pattern",argument:t.pattern,message:"does not match pattern "+JSON.stringify(t.pattern.toString())}),i}},s.format=function(e,t,r,i){if(void 0!==e){var a=new o(e,t,r,i);return a.disableFormat||n.isFormat(e,t.format,this)||a.addError({name:"format",argument:t.format,message:"does not conform to the "+JSON.stringify(t.format)+" format"}),a}},s.minLength=function(e,t,r,n){if(this.types.string(e)){var i=new o(e,t,r,n),a=e.match(/[\uDC00-\uDFFF]/g);return e.length-(a?a.length:0)>=t.minLength||i.addError({name:"minLength",argument:t.minLength,message:"does not meet minimum length of "+t.minLength}),i}},s.maxLength=function(e,t,r,n){if(this.types.string(e)){var i=new o(e,t,r,n),a=e.match(/[\uDC00-\uDFFF]/g);return e.length-(a?a.length:0)<=t.maxLength||i.addError({name:"maxLength",argument:t.maxLength,message:"does not meet maximum length of "+t.maxLength}),i}},s.minItems=function(e,t,r,n){if(this.types.array(e)){var i=new o(e,t,r,n);return e.length>=t.minItems||i.addError({name:"minItems",argument:t.minItems,message:"does not meet minimum length of "+t.minItems}),i}},s.maxItems=function(e,t,r,n){if(this.types.array(e)){var i=new o(e,t,r,n);return e.length<=t.maxItems||i.addError({name:"maxItems",argument:t.maxItems,message:"does not meet maximum length of "+t.maxItems}),i}},s.uniqueItems=function(e,t,r,n){if(!0===t.uniqueItems&&this.types.array(e)){var i=new o(e,t,r,n);return e.every(h)||i.addError({name:"uniqueItems",message:"contains duplicate item"}),i}},s.dependencies=function(e,t,r,n){if(this.types.object(e)){var i=new o(e,t,r,n);for(var a in t.dependencies)if(void 0!==e[a]){var s=t.dependencies[a],u=n.makeChild(s,a);if("string"==typeof s&&(s=[s]),Array.isArray(s))s.forEach((function(t){void 0===e[t]&&i.addError({name:"dependencies",argument:u.propertyPath,message:"property "+t+" not found, required by "+u.propertyPath})}));else{var l=this.validateSchema(e,s,r,u);i.instance!==l.instance&&(i.instance=l.instance),l&&l.errors.length&&(i.addError({name:"dependencies",argument:u.propertyPath,message:"does not meet dependency required by "+u.propertyPath}),i.importErrors(l))}}return i}},s.enum=function(e,t,r,a){if(void 0===e)return null;if(!Array.isArray(t.enum))throw new i("enum expects an array",t);var s=new o(e,t,r,a);return t.enum.some(n.deepCompareStrict.bind(null,e))||s.addError({name:"enum",argument:t.enum,message:"is not one of enum values: "+t.enum.map(String).join(",")}),s},s.const=function(e,t,r,i){if(void 0===e)return null;var a=new o(e,t,r,i);return n.deepCompareStrict(t.const,e)||a.addError({name:"const",argument:t.const,message:"does not exactly match expected constant: "+t.const}),a},s.not=s.disallow=function(e,t,r,n){var i=this;if(void 0===e)return null;var a=new o(e,t,r,n),s=t.not||t.disallow;return s?(Array.isArray(s)||(s=[s]),s.forEach((function(o){if(i.testType(e,t,r,n,o)){var s=o&&(o.$id||o.id)||o;a.addError({name:"not",argument:s,message:"is of prohibited type "+s})}})),a):null},e.exports=a},1020:(e,t,r)=>{"use strict";var n=r(8526),o=t.ValidationError=function(e,t,r,n,o,i){if(Array.isArray(n)?(this.path=n,this.property=n.reduce((function(e,t){return e+f(t)}),"instance")):void 0!==n&&(this.property=n),e&&(this.message=e),r){var a=r.$id||r.id;this.schema=a||r}void 0!==t&&(this.instance=t),this.name=o,this.argument=i,this.stack=this.toString()};o.prototype.toString=function(){return this.property+" "+this.message};var i=t.ValidatorResult=function(e,t,r,n){this.instance=e,this.schema=t,this.options=r,this.path=n.path,this.propertyPath=n.propertyPath,this.errors=[],this.throwError=r&&r.throwError,this.throwFirst=r&&r.throwFirst,this.throwAll=r&&r.throwAll,this.disableFormat=r&&!0===r.disableFormat};function a(e,t){return t+": "+e.toString()+"\n"}function s(e){Error.captureStackTrace&&Error.captureStackTrace(this,s),this.instance=e.instance,this.schema=e.schema,this.options=e.options,this.errors=e.errors}i.prototype.addError=function(e){var t;if("string"==typeof e)t=new o(e,this.instance,this.schema,this.path);else{if(!e)throw new Error("Missing error detail");if(!e.message)throw new Error("Missing error message");if(!e.name)throw new Error("Missing validator type");t=new o(e.message,this.instance,this.schema,this.path,e.name,e.argument)}if(this.errors.push(t),this.throwFirst)throw new s(this);if(this.throwError)throw t;return t},i.prototype.importErrors=function(e){"string"==typeof e||e&&e.validatorType?this.addError(e):e&&e.errors&&(this.errors=this.errors.concat(e.errors))},i.prototype.toString=function(e){return this.errors.map(a).join("")},Object.defineProperty(i.prototype,"valid",{get:function(){return!this.errors.length}}),e.exports.ValidatorResultError=s,s.prototype=new Error,s.prototype.constructor=s,s.prototype.name="Validation Error";var u=t.SchemaError=function e(t,r){this.message=t,this.schema=r,Error.call(this,t),Error.captureStackTrace(this,e)};u.prototype=Object.create(Error.prototype,{constructor:{value:u,enumerable:!1},name:{value:"SchemaError",enumerable:!1}});var l=t.SchemaContext=function(e,t,r,n,o){this.schema=e,this.options=t,Array.isArray(r)?(this.path=r,this.propertyPath=r.reduce((function(e,t){return e+f(t)}),"instance")):this.propertyPath=r,this.base=n,this.schemas=o};l.prototype.resolve=function(e){return n.resolve(this.base,e)},l.prototype.makeChild=function(e,t){var r=void 0===t?this.path:this.path.concat([t]),o=e.$id||e.id,i=n.resolve(this.base,o||""),a=new l(e,this.options,r,i,Object.create(this.schemas));return o&&!a.schemas[i]&&(a.schemas[i]=e),a};var c=t.FORMAT_REGEXPS={"date-time":/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])[tT ](2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])(\.\d+)?([zZ]|[+-]([0-5][0-9]):(60|[0-5][0-9]))$/,date:/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])$/,time:/^(2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])$/,duration:/P(T\d+(H(\d+M(\d+S)?)?|M(\d+S)?|S)|\d+(D|M(\d+D)?|Y(\d+M(\d+D)?)?)(T\d+(H(\d+M(\d+S)?)?|M(\d+S)?|S))?|\d+W)/i,email:/^(?:[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!\.)){0,61}[a-zA-Z0-9]?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!$)){0,61}[a-zA-Z0-9]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/,"idn-email":/^("(?:[!#-\[\]-\u{10FFFF}]|\\[\t -\u{10FFFF}])*"|[!#-'*+\-/-9=?A-Z\^-\u{10FFFF}](?:\.?[!#-'*+\-/-9=?A-Z\^-\u{10FFFF}])*)@([!#-'*+\-/-9=?A-Z\^-\u{10FFFF}](?:\.?[!#-'*+\-/-9=?A-Z\^-\u{10FFFF}])*|\[[!-Z\^-\u{10FFFF}]*\])$/u,"ip-address":/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,ipv6:/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,uri:/^[a-zA-Z][a-zA-Z0-9+.-]*:[^\s]*$/,"uri-reference":/^(((([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|([A-Za-z][+\-.0-9A-Za-z]*:?)?)|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|(\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?)?))#(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|(([A-Za-z][+\-.0-9A-Za-z]*)?%[0-9A-Fa-f]{2}|[!$&-.0-9;=@_~]|[A-Za-z][+\-.0-9A-Za-z]*[!$&-*,;=@_~])(%[0-9A-Fa-f]{2}|[!$&-.0-9;=@-Z_a-z~])*((([/?](%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*)?#|[/?])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*)?|([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+(:\d*)?|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?:\d*|\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)?|[A-Za-z][+\-.0-9A-Za-z]*:?)?$/,iri:/^[a-zA-Z][a-zA-Z0-9+.-]*:[^\s]*$/,"iri-reference":/^(((([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~-\u{10FFFF}]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|([A-Za-z][+\-.0-9A-Za-z]*:?)?)|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~-\u{10FFFF}])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|(\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?)?))#(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|(([A-Za-z][+\-.0-9A-Za-z]*)?%[0-9A-Fa-f]{2}|[!$&-.0-9;=@_~-\u{10FFFF}]|[A-Za-z][+\-.0-9A-Za-z]*[!$&-*,;=@_~-\u{10FFFF}])(%[0-9A-Fa-f]{2}|[!$&-.0-9;=@-Z_a-z~-\u{10FFFF}])*((([/?](%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*)?#|[/?])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*)?|([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~-\u{10FFFF}]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~-\u{10FFFF}])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+(:\d*)?|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?:\d*|\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)?|[A-Za-z][+\-.0-9A-Za-z]*:?)?$/u,uuid:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i,"uri-template":/(%[0-9a-f]{2}|[!#$&(-;=?@\[\]_a-z~]|\{[!#&+,./;=?@|]?(%[0-9a-f]{2}|[0-9_a-z])(\.?(%[0-9a-f]{2}|[0-9_a-z]))*(:[1-9]\d{0,3}|\*)?(,(%[0-9a-f]{2}|[0-9_a-z])(\.?(%[0-9a-f]{2}|[0-9_a-z]))*(:[1-9]\d{0,3}|\*)?)*\})*/iu,"json-pointer":/^(\/([\x00-\x2e0-@\[-}\x7f]|~[01])*)*$/iu,"relative-json-pointer":/^\d+(#|(\/([\x00-\x2e0-@\[-}\x7f]|~[01])*)*)$/iu,hostname:/^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/,"host-name":/^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/,"utc-millisec":function(e){return"string"==typeof e&&parseFloat(e)===parseInt(e,10)&&!isNaN(e)},regex:function(e){var t=!0;try{new RegExp(e)}catch(e){t=!1}return t},style:/[\r\n\t ]*[^\r\n\t ][^:]*:[\r\n\t ]*[^\r\n\t ;]*[\r\n\t ]*;?/,color:/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/,phone:/^\+(?:[0-9] ?){6,14}[0-9]$/,alpha:/^[a-zA-Z]+$/,alphanumeric:/^[a-zA-Z0-9]+$/};c.regexp=c.regex,c.pattern=c.regex,c.ipv4=c["ip-address"],t.isFormat=function(e,t,r){if("string"==typeof e&&void 0!==c[t]){if(c[t]instanceof RegExp)return c[t].test(e);if("function"==typeof c[t])return c[t](e)}else if(r&&r.customFormats&&"function"==typeof r.customFormats[t])return r.customFormats[t](e);return!0};var f=t.makeSuffix=function(e){return(e=e.toString()).match(/[.\s\[\]]/)||e.match(/^[\d]/)?e.match(/^\d+$/)?"["+e+"]":"["+JSON.stringify(e)+"]":"."+e};function h(e,t,r,n){"object"==typeof r?t[n]=y(e[n],r):-1===e.indexOf(r)&&t.push(r)}function p(e,t,r){t[r]=e[r]}function d(e,t,r,n){"object"==typeof t[n]&&t[n]&&e[n]?r[n]=y(e[n],t[n]):r[n]=t[n]}function y(e,t){var r=Array.isArray(t),n=r&&[]||{};return r?(e=e||[],n=n.concat(e),t.forEach(h.bind(null,e,n))):(e&&"object"==typeof e&&Object.keys(e).forEach(p.bind(null,e,n)),Object.keys(t).forEach(d.bind(null,e,t,n))),n}function g(e){return"/"+encodeURIComponent(e).replace(/~/g,"%7E")}t.deepCompareStrict=function e(t,r){if(typeof t!=typeof r)return!1;if(Array.isArray(t))return!!Array.isArray(r)&&t.length===r.length&&t.every((function(n,o){return e(t[o],r[o])}));if("object"==typeof t){if(!t||!r)return t===r;var n=Object.keys(t),o=Object.keys(r);return n.length===o.length&&n.every((function(n){return e(t[n],r[n])}))}return t===r},e.exports.deepMerge=y,t.objectGetPath=function(e,t){for(var r,n=t.split("/").slice(1);"string"==typeof(r=n.shift());){var o=decodeURIComponent(r.replace(/~0/,"~").replace(/~1/g,"/"));if(!(o in e))return;e=e[o]}return e},t.encodePath=function(e){return e.map(g).join("")},t.getDecimalPlaces=function(e){var t=0;if(isNaN(e))return t;"number"!=typeof e&&(e=Number(e));var r=e.toString().split("e");if(2===r.length){if("-"!==r[1][0])return t;t=Number(r[1].slice(1))}var n=r[0].split(".");return 2===n.length&&(t+=n[1].length),t},t.isSchema=function(e){return"object"==typeof e&&e||"boolean"==typeof e}},4445:(e,t,r)=>{"use strict";r(6719);r(1020).ValidatorResult,r(1020).ValidatorResultError,r(1020).ValidationError,r(1020).SchemaError,r(3107),r(3107).R},3107:(e,t,r)=>{"use strict";var n=r(8526),o=r(1020);function i(e,t){this.id=e,this.ref=t}e.exports.R=function(e,t){function r(e,t){if(t&&"object"==typeof t)if(t.$ref){var i=n.resolve(e,t.$ref);l[i]=l[i]?l[i]+1:0}else{var c=t.$id||t.id,f=c?n.resolve(e,c):e;if(f){if(f.indexOf("#")<0&&(f+="#"),u[f]){if(!o.deepCompareStrict(u[f],t))throw new Error("Schema <"+f+"> already exists with different definition");return u[f]}u[f]=t,"#"==f[f.length-1]&&(u[f.substring(0,f.length-1)]=t)}a(f+"/items",Array.isArray(t.items)?t.items:[t.items]),a(f+"/extends",Array.isArray(t.extends)?t.extends:[t.extends]),r(f+"/additionalItems",t.additionalItems),s(f+"/properties",t.properties),r(f+"/additionalProperties",t.additionalProperties),s(f+"/definitions",t.definitions),s(f+"/patternProperties",t.patternProperties),s(f+"/dependencies",t.dependencies),a(f+"/disallow",t.disallow),a(f+"/allOf",t.allOf),a(f+"/anyOf",t.anyOf),a(f+"/oneOf",t.oneOf),r(f+"/not",t.not)}}function a(e,t){if(Array.isArray(t))for(var n=0;n<t.length;n++)r(e+"/"+n,t[n])}function s(e,t){if(t&&"object"==typeof t)for(var n in t)r(e+"/"+n,t[n])}var u={},l={};return r(e,t),new i(u,l)}},6719:(e,t,r)=>{"use strict";var n=r(8526),o=r(9427),i=r(1020),a=r(3107).R,s=i.ValidatorResult,u=i.ValidatorResultError,l=i.SchemaError,c=i.SchemaContext,f=function e(){this.customFormats=Object.create(e.prototype.customFormats),this.schemas={},this.unresolvedRefs=[],this.types=Object.create(p),this.attributes=Object.create(o.validators)};function h(e){var t="string"==typeof e?e:e.$ref;return"string"==typeof t&&t}f.prototype.customFormats={},f.prototype.schemas=null,f.prototype.types=null,f.prototype.attributes=null,f.prototype.unresolvedRefs=null,f.prototype.addSchema=function(e,t){var r=this;if(!e)return null;var n=a(t||"/",e),o=t||e.$id||e.id;for(var i in n.id)this.schemas[i]=n.id[i];for(var i in n.ref)this.unresolvedRefs.push(i);return this.unresolvedRefs=this.unresolvedRefs.filter((function(e){return void 0===r.schemas[e]})),this.schemas[o]},f.prototype.addSubSchemaArray=function(e,t){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addSubSchema(e,t[r])},f.prototype.addSubSchemaObject=function(e,t){if(t&&"object"==typeof t)for(var r in t)this.addSubSchema(e,t[r])},f.prototype.setSchemas=function(e){this.schemas=e},f.prototype.getSchema=function(e){return this.schemas[e]},f.prototype.validate=function(e,t,r,o){if("boolean"!=typeof t&&"object"!=typeof t||null===t)throw new l("Expected `schema` to be an object or boolean");r||(r={});var i,f=t.$id||t.id,h=n.resolve(r.base||"/",f||"");if(!o){(o=new c(t,r,[],h,Object.create(this.schemas))).schemas[h]||(o.schemas[h]=t);var p=a(h,t);for(var d in p.id){var y=p.id[d];o.schemas[d]=y}}if(r.required&&void 0===e)return(i=new s(e,t,r,o)).addError("is required, but is undefined"),i;if(!(i=this.validateSchema(e,t,r,o)))throw new Error("Result undefined");if(r.throwAll&&i.errors.length)throw new u(i);return i},f.prototype.validateSchema=function(e,t,r,n){var a=new s(e,t,r,n);if("boolean"==typeof t)!0===t?t={}:!1===t&&(t={type:[]});else if(!t)throw new Error("schema is undefined");if(t.extends)if(Array.isArray(t.extends)){var u={schema:t,ctx:n};t.extends.forEach(this.schemaTraverser.bind(this,u)),t=u.schema,u.schema=null,u.ctx=null,u=null}else t=i.deepMerge(t,this.superResolve(t.extends,n));var f=h(t);if(f){var p=this.resolve(t,f,n),d=new c(p.subschema,r,n.path,p.switchSchema,n.schemas);return this.validateSchema(e,p.subschema,r,d)}var y=r&&r.skipAttributes||[];for(var g in t)if(!o.ignoreProperties[g]&&y.indexOf(g)<0){var m=null,v=this.attributes[g];if(v)m=v.call(this,e,t,r,n);else if(!1===r.allowUnknownAttributes)throw new l("Unsupported attribute: "+g,t);m&&a.importErrors(m)}if("function"==typeof r.rewrite){var b=r.rewrite.call(this,e,t,r,n);a.instance=b}return a},f.prototype.schemaTraverser=function(e,t){e.schema=i.deepMerge(e.schema,this.superResolve(t,e.ctx))},f.prototype.superResolve=function(e,t){var r=h(e);return r?this.resolve(e,r,t).subschema:e},f.prototype.resolve=function(e,t,r){if(t=r.resolve(t),r.schemas[t])return{subschema:r.schemas[t],switchSchema:t};var o=n.parse(t),a=o&&o.hash,s=a&&a.length&&t.substr(0,t.length-a.length);if(!s||!r.schemas[s])throw new l("no such schema <"+t+">",e);var u=i.objectGetPath(r.schemas[s],a.substr(1));if(void 0===u)throw new l("no such schema "+a+" located in <"+s+">",e);return{subschema:u,switchSchema:t}},f.prototype.testType=function(e,t,r,n,o){if(void 0!==o){if(null===o)throw new l('Unexpected null in "type" keyword');if("function"==typeof this.types[o])return this.types[o].call(this,e);if(o&&"object"==typeof o){var i=this.validateSchema(e,o,r,n);return void 0===i||!(i&&i.errors.length)}return!0}};var p=f.prototype.types={};p.string=function(e){return"string"==typeof e},p.number=function(e){return"number"==typeof e&&isFinite(e)},p.integer=function(e){return"number"==typeof e&&e%1==0},p.boolean=function(e){return"boolean"==typeof e},p.array=function(e){return Array.isArray(e)},p.null=function(e){return null===e},p.date=function(e){return e instanceof Date},p.any=function(e){return!0},p.object=function(e){return e&&"object"==typeof e&&!Array.isArray(e)&&!(e instanceof Date)},e.exports=f},201:(e,t,r)=>{var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,a=n&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,u=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,l=s&&u&&"function"==typeof u.get?u.get:null,c=s&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,h="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,p="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,d=Boolean.prototype.valueOf,y=Object.prototype.toString,g=Function.prototype.toString,m=String.prototype.match,v=String.prototype.slice,b=String.prototype.replace,w=String.prototype.toUpperCase,x=String.prototype.toLowerCase,k=RegExp.prototype.test,S=Array.prototype.concat,O=Array.prototype.join,A=Array.prototype.slice,_=Math.floor,j="function"==typeof BigInt?BigInt.prototype.valueOf:null,P=Object.getOwnPropertySymbols,E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,F="function"==typeof Symbol&&"object"==typeof Symbol.iterator,R="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,C=Object.prototype.propertyIsEnumerable,I=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function N(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||k.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var n=e<0?-_(-e):_(e);if(n!==e){var o=String(n),i=v.call(t,o.length+1);return b.call(o,r,"$&_")+"."+b.call(b.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(t,r,"$&_")}var D=r(6553),T=D.custom,L=z(T)?T:null;function M(e,t,r){var n="double"===(r.quoteStyle||t)?'"':"'";return n+e+n}function B(e){return b.call(String(e),/"/g,""")}function K(e){return!("[object Array]"!==V(e)||R&&"object"==typeof e&&R in e)}function $(e){return!("[object RegExp]"!==V(e)||R&&"object"==typeof e&&R in e)}function z(e){if(F)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!E)return!1;try{return E.call(e),!0}catch(e){}return!1}e.exports=function e(t,n,o,s){var u=n||{};if(q(u,"quoteStyle")&&"single"!==u.quoteStyle&&"double"!==u.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(q(u,"maxStringLength")&&("number"==typeof u.maxStringLength?u.maxStringLength<0&&u.maxStringLength!==1/0:null!==u.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var y=!q(u,"customInspect")||u.customInspect;if("boolean"!=typeof y&&"symbol"!==y)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(q(u,"indent")&&null!==u.indent&&"\t"!==u.indent&&!(parseInt(u.indent,10)===u.indent&&u.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(q(u,"numericSeparator")&&"boolean"!=typeof u.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var w=u.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return H(t,u);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var k=String(t);return w?N(t,k):k}if("bigint"==typeof t){var _=String(t)+"n";return w?N(t,_):_}var P=void 0===u.depth?5:u.depth;if(void 0===o&&(o=0),o>=P&&P>0&&"object"==typeof t)return K(t)?"[Array]":"[Object]";var T,U=function(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=O.call(Array(e.indent+1)," ")}return{base:r,prev:O.call(Array(t+1),r)}}(u,o);if(void 0===s)s=[];else if(Z(s,t)>=0)return"[Circular]";function W(t,r,n){if(r&&(s=A.call(s)).push(r),n){var i={depth:u.depth};return q(u,"quoteStyle")&&(i.quoteStyle=u.quoteStyle),e(t,i,o+1,s)}return e(t,u,o+1,s)}if("function"==typeof t&&!$(t)){var ee=function(e){if(e.name)return e.name;var t=m.call(g.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}(t),te=X(t,W);return"[Function"+(ee?": "+ee:" (anonymous)")+"]"+(te.length>0?" { "+O.call(te,", ")+" }":"")}if(z(t)){var re=F?b.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):E.call(t);return"object"!=typeof t||F?re:J(re)}if((T=t)&&"object"==typeof T&&("undefined"!=typeof HTMLElement&&T instanceof HTMLElement||"string"==typeof T.nodeName&&"function"==typeof T.getAttribute)){for(var ne="<"+x.call(String(t.nodeName)),oe=t.attributes||[],ie=0;ie<oe.length;ie++)ne+=" "+oe[ie].name+"="+M(B(oe[ie].value),"double",u);return ne+=">",t.childNodes&&t.childNodes.length&&(ne+="..."),ne+"</"+x.call(String(t.nodeName))+">"}if(K(t)){if(0===t.length)return"[]";var ae=X(t,W);return U&&!function(e){for(var t=0;t<e.length;t++)if(Z(e[t],"\n")>=0)return!1;return!0}(ae)?"["+Q(ae,U)+"]":"[ "+O.call(ae,", ")+" ]"}if(function(e){return!("[object Error]"!==V(e)||R&&"object"==typeof e&&R in e)}(t)){var se=X(t,W);return"cause"in Error.prototype||!("cause"in t)||C.call(t,"cause")?0===se.length?"["+String(t)+"]":"{ ["+String(t)+"] "+O.call(se,", ")+" }":"{ ["+String(t)+"] "+O.call(S.call("[cause]: "+W(t.cause),se),", ")+" }"}if("object"==typeof t&&y){if(L&&"function"==typeof t[L]&&D)return D(t,{depth:P-o});if("symbol"!==y&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!i||!e||"object"!=typeof e)return!1;try{i.call(e);try{l.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var ue=[];return a&&a.call(t,(function(e,r){ue.push(W(r,t,!0)+" => "+W(e,t))})),Y("Map",i.call(t),ue,U)}if(function(e){if(!l||!e||"object"!=typeof e)return!1;try{l.call(e);try{i.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var le=[];return c&&c.call(t,(function(e){le.push(W(e,t))})),Y("Set",l.call(t),le,U)}if(function(e){if(!f||!e||"object"!=typeof e)return!1;try{f.call(e,f);try{h.call(e,h)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return G("WeakMap");if(function(e){if(!h||!e||"object"!=typeof e)return!1;try{h.call(e,h);try{f.call(e,f)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return G("WeakSet");if(function(e){if(!p||!e||"object"!=typeof e)return!1;try{return p.call(e),!0}catch(e){}return!1}(t))return G("WeakRef");if(function(e){return!("[object Number]"!==V(e)||R&&"object"==typeof e&&R in e)}(t))return J(W(Number(t)));if(function(e){if(!e||"object"!=typeof e||!j)return!1;try{return j.call(e),!0}catch(e){}return!1}(t))return J(W(j.call(t)));if(function(e){return!("[object Boolean]"!==V(e)||R&&"object"==typeof e&&R in e)}(t))return J(d.call(t));if(function(e){return!("[object String]"!==V(e)||R&&"object"==typeof e&&R in e)}(t))return J(W(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if(t===r.g)return"{ [object globalThis] }";if(!function(e){return!("[object Date]"!==V(e)||R&&"object"==typeof e&&R in e)}(t)&&!$(t)){var ce=X(t,W),fe=I?I(t)===Object.prototype:t instanceof Object||t.constructor===Object,he=t instanceof Object?"":"null prototype",pe=!fe&&R&&Object(t)===t&&R in t?v.call(V(t),8,-1):he?"Object":"",de=(fe||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(pe||he?"["+O.call(S.call([],pe||[],he||[]),": ")+"] ":"");return 0===ce.length?de+"{}":U?de+"{"+Q(ce,U)+"}":de+"{ "+O.call(ce,", ")+" }"}return String(t)};var U=Object.prototype.hasOwnProperty||function(e){return e in this};function q(e,t){return U.call(e,t)}function V(e){return y.call(e)}function Z(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function H(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return H(v.call(e,0,t.maxStringLength),t)+n}return M(b.call(b.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,W),"single",t)}function W(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+w.call(t.toString(16))}function J(e){return"Object("+e+")"}function G(e){return e+" { ? }"}function Y(e,t,r,n){return e+" ("+t+") {"+(n?Q(r,n):O.call(r,", "))+"}"}function Q(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+O.call(e,","+r)+"\n"+t.prev}function X(e,t){var r=K(e),n=[];if(r){n.length=e.length;for(var o=0;o<e.length;o++)n[o]=q(e,o)?t(e[o],e):""}var i,a="function"==typeof P?P(e):[];if(F){i={};for(var s=0;s<a.length;s++)i["$"+a[s]]=a[s]}for(var u in e)q(e,u)&&(r&&String(Number(u))===u&&u<e.length||F&&i["$"+u]instanceof Symbol||(k.call(/[^\w$]/,u)?n.push(t(u,e)+": "+t(e[u],e)):n.push(u+": "+t(e[u],e))));if("function"==typeof P)for(var l=0;l<a.length;l++)C.call(e,a[l])&&n.push("["+t(a[l])+"]: "+t(e[a[l]],e));return n}},2565:(e,t,r)=>{"use strict";var n=r(3298),o=/[\/\?<>\\:\*\|"]/g,i=/[\x00-\x1f\x80-\x9f]/g,a=/^\.+$/,s=/^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i,u=/[\. ]+$/;function l(e,t){if("string"!=typeof e)throw new Error("Input must be string");var r=e.replace(o,t).replace(i,t).replace(a,t).replace(s,t).replace(u,t);return n(r,255)}e.exports=function(e,t){var r=t&&t.replacement||"",n=l(e,r);return""===r?n:l(n,"")}},7319:(e,t,r)=>{"use strict";var n=r(4663),o=r(8531),i=r(3219)(),a=r(8337),s=n("%TypeError%"),u=n("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new s("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||u(t)!==t)throw new s("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,l=!0;if("length"in e&&a){var c=a(e,"length");c&&!c.configurable&&(n=!1),c&&!c.writable&&(l=!1)}return(n||l||!r)&&(i?o(e,"length",t,!0,!0):o(e,"length",t)),e}},8959:(e,t,r)=>{"use strict";var n=r(4663),o=r(8608),i=r(201),a=n("%TypeError%"),s=n("%WeakMap%",!0),u=n("%Map%",!0),l=o("WeakMap.prototype.get",!0),c=o("WeakMap.prototype.set",!0),f=o("WeakMap.prototype.has",!0),h=o("Map.prototype.get",!0),p=o("Map.prototype.set",!0),d=o("Map.prototype.has",!0),y=function(e,t){for(var r,n=e;null!==(r=n.next);n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r};e.exports=function(){var e,t,r,n={assert:function(e){if(!n.has(e))throw new a("Side channel does not contain "+i(e))},get:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(e)return l(e,n)}else if(u){if(t)return h(t,n)}else if(r)return function(e,t){var r=y(e,t);return r&&r.value}(r,n)},has:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(e)return f(e,n)}else if(u){if(t)return d(t,n)}else if(r)return function(e,t){return!!y(e,t)}(r,n);return!1},set:function(n,o){s&&n&&("object"==typeof n||"function"==typeof n)?(e||(e=new s),c(e,n,o)):u?(t||(t=new u),p(t,n,o)):(r||(r={key:{},next:null}),function(e,t,r){var n=y(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}}(r,n,o))}};return n}},3298:(e,t,r)=>{"use strict";var n=r(2815),o=r(2875);e.exports=n.bind(null,o)},2815:e=>{"use strict";function t(e){return e>=55296&&e<=56319}function r(e){return e>=56320&&e<=57343}e.exports=function(e,n,o){if("string"!=typeof n)throw new Error("Input must be string");for(var i,a,s=n.length,u=0,l=0;l<s;l+=1){if(i=n.charCodeAt(l),a=n[l],t(i)&&r(n.charCodeAt(l+1))&&(a+=n[l+=1]),(u+=e(a))===o)return n.slice(0,l+1);if(u>o)return n.slice(0,l-a.length+1)}return n}},9177:function(e,t,r){var n;e=r.nmd(e),function(o){t&&t.nodeType,e&&e.nodeType;var i="object"==typeof r.g&&r.g;i.global!==i&&i.window!==i&&i.self;var a,s=2147483647,u=36,l=26,c=38,f=700,h=/^xn--/,p=/[^\x20-\x7E]/,d=/[\x2E\u3002\uFF0E\uFF61]/g,y={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},g=u-1,m=Math.floor,v=String.fromCharCode;function b(e){throw new RangeError(y[e])}function w(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function x(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+w((e=e.replace(d,".")).split("."),t).join(".")}function k(e){for(var t,r,n=[],o=0,i=e.length;o<i;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<i?56320==(64512&(r=e.charCodeAt(o++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),o--):n.push(t);return n}function S(e){return w(e,(function(e){var t="";return e>65535&&(t+=v((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+v(e)})).join("")}function O(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function A(e,t,r){var n=0;for(e=r?m(e/f):e>>1,e+=m(e/t);e>g*l>>1;n+=u)e=m(e/g);return m(n+(g+1)*e/(e+c))}function _(e){var t,r,n,o,i,a,c,f,h,p,d,y=[],g=e.length,v=0,w=128,x=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&b("not-basic"),y.push(e.charCodeAt(n));for(o=r>0?r+1:0;o<g;){for(i=v,a=1,c=u;o>=g&&b("invalid-input"),((f=(d=e.charCodeAt(o++))-48<10?d-22:d-65<26?d-65:d-97<26?d-97:u)>=u||f>m((s-v)/a))&&b("overflow"),v+=f*a,!(f<(h=c<=x?1:c>=x+l?l:c-x));c+=u)a>m(s/(p=u-h))&&b("overflow"),a*=p;x=A(v-i,t=y.length+1,0==i),m(v/t)>s-w&&b("overflow"),w+=m(v/t),v%=t,y.splice(v++,0,w)}return S(y)}function j(e){var t,r,n,o,i,a,c,f,h,p,d,y,g,w,x,S=[];for(y=(e=k(e)).length,t=128,r=0,i=72,a=0;a<y;++a)(d=e[a])<128&&S.push(v(d));for(n=o=S.length,o&&S.push("-");n<y;){for(c=s,a=0;a<y;++a)(d=e[a])>=t&&d<c&&(c=d);for(c-t>m((s-r)/(g=n+1))&&b("overflow"),r+=(c-t)*g,t=c,a=0;a<y;++a)if((d=e[a])<t&&++r>s&&b("overflow"),d==t){for(f=r,h=u;!(f<(p=h<=i?1:h>=i+l?l:h-i));h+=u)x=f-p,w=u-p,S.push(v(O(p+x%w,0))),f=m(x/w);S.push(v(O(f,0))),i=A(r,g,n==o),r=0,++n}++r,++t}return S.join("")}a={version:"1.4.1",ucs2:{decode:k,encode:S},decode:_,encode:j,toASCII:function(e){return x(e,(function(e){return p.test(e)?"xn--"+j(e):e}))},toUnicode:function(e){return x(e,(function(e){return h.test(e)?_(e.slice(4).toLowerCase()):e}))}},void 0===(n=function(){return a}.call(t,r,t,e))||(e.exports=n)}()},7032:e=>{"use strict";var t=String.prototype.replace,r=/%20/g,n="RFC3986";e.exports={default:n,formatters:{RFC1738:function(e){return t.call(e,r,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:n}},3184:(e,t,r)=>{"use strict";var n=r(1645),o=r(5610),i=r(7032);e.exports={formats:i,parse:o,stringify:n}},5610:(e,t,r)=>{"use strict";var n=r(8206),o=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},u=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},l=function(e,t,r,n){if(e){var i=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,s=r.depth>0&&/(\[[^[\]]*])/.exec(i),l=s?i.slice(0,s.index):i,c=[];if(l){if(!r.plainObjects&&o.call(Object.prototype,l)&&!r.allowPrototypes)return;c.push(l)}for(var f=0;r.depth>0&&null!==(s=a.exec(i))&&f<r.depth;){if(f+=1,!r.plainObjects&&o.call(Object.prototype,s[1].slice(1,-1))&&!r.allowPrototypes)return;c.push(s[1])}return s&&c.push("["+i.slice(s.index)+"]"),function(e,t,r,n){for(var o=n?t:u(t,r),i=e.length-1;i>=0;--i){var a,s=e[i];if("[]"===s&&r.parseArrays)a=[].concat(o);else{a=r.plainObjects?Object.create(null):{};var l="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,c=parseInt(l,10);r.parseArrays||""!==l?!isNaN(c)&&s!==l&&String(c)===l&&c>=0&&r.parseArrays&&c<=r.arrayLimit?(a=[])[c]=o:"__proto__"!==l&&(a[l]=o):a={0:o}}o=a}return o}(c,t,r,n)}};e.exports=function(e,t){var r=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?a.charset:e.charset;return{allowDots:void 0===e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:a.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||n.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var c="string"==typeof e?function(e,t){var r,l={__proto__:null},c=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,f=t.parameterLimit===1/0?void 0:t.parameterLimit,h=c.split(t.delimiter,f),p=-1,d=t.charset;if(t.charsetSentinel)for(r=0;r<h.length;++r)0===h[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===h[r]?d="utf-8":"utf8=%26%2310003%3B"===h[r]&&(d="iso-8859-1"),p=r,r=h.length);for(r=0;r<h.length;++r)if(r!==p){var y,g,m=h[r],v=m.indexOf("]="),b=-1===v?m.indexOf("="):v+1;-1===b?(y=t.decoder(m,a.decoder,d,"key"),g=t.strictNullHandling?null:""):(y=t.decoder(m.slice(0,b),a.decoder,d,"key"),g=n.maybeMap(u(m.slice(b+1),t),(function(e){return t.decoder(e,a.decoder,d,"value")}))),g&&t.interpretNumericEntities&&"iso-8859-1"===d&&(g=s(g)),m.indexOf("[]=")>-1&&(g=i(g)?[g]:g),o.call(l,y)?l[y]=n.combine(l[y],g):l[y]=g}return l}(e,r):e,f=r.plainObjects?Object.create(null):{},h=Object.keys(c),p=0;p<h.length;++p){var d=h[p],y=l(d,c[d],r,"string"==typeof e);f=n.merge(f,y,r)}return!0===r.allowSparse?f:n.compact(f)}},1645:(e,t,r)=>{"use strict";var n=r(8959),o=r(8206),i=r(7032),a=Object.prototype.hasOwnProperty,s={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},u=Array.isArray,l=Array.prototype.push,c=function(e,t){l.apply(e,u(t)?t:[t])},f=Date.prototype.toISOString,h=i.default,p={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:o.encode,encodeValuesOnly:!1,format:h,formatter:i.formatters[h],indices:!1,serializeDate:function(e){return f.call(e)},skipNulls:!1,strictNullHandling:!1},d={},y=function e(t,r,i,a,s,l,f,h,y,g,m,v,b,w,x,k){for(var S,O=t,A=k,_=0,j=!1;void 0!==(A=A.get(d))&&!j;){var P=A.get(t);if(_+=1,void 0!==P){if(P===_)throw new RangeError("Cyclic object value");j=!0}void 0===A.get(d)&&(_=0)}if("function"==typeof h?O=h(r,O):O instanceof Date?O=m(O):"comma"===i&&u(O)&&(O=o.maybeMap(O,(function(e){return e instanceof Date?m(e):e}))),null===O){if(s)return f&&!w?f(r,p.encoder,x,"key",v):r;O=""}if("string"==typeof(S=O)||"number"==typeof S||"boolean"==typeof S||"symbol"==typeof S||"bigint"==typeof S||o.isBuffer(O))return f?[b(w?r:f(r,p.encoder,x,"key",v))+"="+b(f(O,p.encoder,x,"value",v))]:[b(r)+"="+b(String(O))];var E,F=[];if(void 0===O)return F;if("comma"===i&&u(O))w&&f&&(O=o.maybeMap(O,f)),E=[{value:O.length>0?O.join(",")||null:void 0}];else if(u(h))E=h;else{var R=Object.keys(O);E=y?R.sort(y):R}for(var C=a&&u(O)&&1===O.length?r+"[]":r,I=0;I<E.length;++I){var N=E[I],D="object"==typeof N&&void 0!==N.value?N.value:O[N];if(!l||null!==D){var T=u(O)?"function"==typeof i?i(C,N):C:C+(g?"."+N:"["+N+"]");k.set(t,_);var L=n();L.set(d,k),c(F,e(D,T,i,a,s,l,"comma"===i&&w&&u(O)?null:f,h,y,g,m,v,b,w,x,L))}}return F};e.exports=function(e,t){var r,o=e,l=function(e){if(!e)return p;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||p.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=i.default;if(void 0!==e.format){if(!a.call(i.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var n=i.formatters[r],o=p.filter;return("function"==typeof e.filter||u(e.filter))&&(o=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:p.addQueryPrefix,allowDots:void 0===e.allowDots?p.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:p.charsetSentinel,delimiter:void 0===e.delimiter?p.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:p.encode,encoder:"function"==typeof e.encoder?e.encoder:p.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:p.encodeValuesOnly,filter:o,format:r,formatter:n,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:p.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:p.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:p.strictNullHandling}}(t);"function"==typeof l.filter?o=(0,l.filter)("",o):u(l.filter)&&(r=l.filter);var f,h=[];if("object"!=typeof o||null===o)return"";f=t&&t.arrayFormat in s?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var d=s[f];if(t&&"commaRoundTrip"in t&&"boolean"!=typeof t.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var g="comma"===d&&t&&t.commaRoundTrip;r||(r=Object.keys(o)),l.sort&&r.sort(l.sort);for(var m=n(),v=0;v<r.length;++v){var b=r[v];l.skipNulls&&null===o[b]||c(h,y(o[b],b,d,g,l.strictNullHandling,l.skipNulls,l.encode?l.encoder:null,l.filter,l.sort,l.allowDots,l.serializeDate,l.format,l.formatter,l.encodeValuesOnly,l.charset,m))}var w=h.join(l.delimiter),x=!0===l.addQueryPrefix?"?":"";return l.charsetSentinel&&("iso-8859-1"===l.charset?x+="utf8=%26%2310003%3B&":x+="utf8=%E2%9C%93&"),w.length>0?x+w:""}},8206:(e,t,r)=>{"use strict";var n=r(7032),o=Object.prototype.hasOwnProperty,i=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),s=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r};e.exports={arrayToObject:s,assign:function(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var o=t[n],a=o.obj[o.prop],s=Object.keys(a),u=0;u<s.length;++u){var l=s[u],c=a[l];"object"==typeof c&&null!==c&&-1===r.indexOf(c)&&(t.push({obj:a,prop:l}),r.push(c))}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(i(r)){for(var n=[],o=0;o<r.length;++o)void 0!==r[o]&&n.push(r[o]);t.obj[t.prop]=n}}}(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function(e,t,r,o,i){if(0===e.length)return e;var s=e;if("symbol"==typeof e?s=Symbol.prototype.toString.call(e):"string"!=typeof e&&(s=String(e)),"iso-8859-1"===r)return escape(s).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var u="",l=0;l<s.length;++l){var c=s.charCodeAt(l);45===c||46===c||95===c||126===c||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||i===n.RFC1738&&(40===c||41===c)?u+=s.charAt(l):c<128?u+=a[c]:c<2048?u+=a[192|c>>6]+a[128|63&c]:c<55296||c>=57344?u+=a[224|c>>12]+a[128|c>>6&63]+a[128|63&c]:(l+=1,c=65536+((1023&c)<<10|1023&s.charCodeAt(l)),u+=a[240|c>>18]+a[128|c>>12&63]+a[128|c>>6&63]+a[128|63&c])}return u},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(i(e)){for(var r=[],n=0;n<e.length;n+=1)r.push(t(e[n]));return r}return t(e)},merge:function e(t,r,n){if(!r)return t;if("object"!=typeof r){if(i(t))t.push(r);else{if(!t||"object"!=typeof t)return[t,r];(n&&(n.plainObjects||n.allowPrototypes)||!o.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(r);var a=t;return i(t)&&!i(r)&&(a=s(t,n)),i(t)&&i(r)?(r.forEach((function(r,i){if(o.call(t,i)){var a=t[i];a&&"object"==typeof a&&r&&"object"==typeof r?t[i]=e(a,r,n):t.push(r)}else t[i]=r})),t):Object.keys(r).reduce((function(t,i){var a=r[i];return o.call(t,i)?t[i]=e(t[i],a,n):t[i]=a,t}),a)}}},8526:(e,t,r)=>{"use strict";var n=r(9177);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var i=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,s=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,u=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(u),c=["%","/","?",";","#"].concat(l),f=["/","?","#"],h=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,d={javascript:!0,"javascript:":!0},y={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},m=r(3184);function v(e,t,r){if(e&&"object"==typeof e&&e instanceof o)return e;var n=new o;return n.parse(e,t,r),n}o.prototype.parse=function(e,t,r){if("string"!=typeof e)throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),a=-1!==o&&o<e.indexOf("#")?"?":"#",u=e.split(a);u[0]=u[0].replace(/\\/g,"/");var v=e=u.join(a);if(v=v.trim(),!r&&1===e.split("#").length){var b=s.exec(v);if(b)return this.path=v,this.href=v,this.pathname=b[1],b[2]?(this.search=b[2],this.query=t?m.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var w=i.exec(v);if(w){var x=(w=w[0]).toLowerCase();this.protocol=x,v=v.substr(w.length)}if(r||w||v.match(/^\/\/[^@/]+@[^@/]+/)){var k="//"===v.substr(0,2);!k||w&&y[w]||(v=v.substr(2),this.slashes=!0)}if(!y[w]&&(k||w&&!g[w])){for(var S,O,A=-1,_=0;_<f.length;_++)-1!==(j=v.indexOf(f[_]))&&(-1===A||j<A)&&(A=j);for(-1!==(O=-1===A?v.lastIndexOf("@"):v.lastIndexOf("@",A))&&(S=v.slice(0,O),v=v.slice(O+1),this.auth=decodeURIComponent(S)),A=-1,_=0;_<c.length;_++){var j;-1!==(j=v.indexOf(c[_]))&&(-1===A||j<A)&&(A=j)}-1===A&&(A=v.length),this.host=v.slice(0,A),v=v.slice(A),this.parseHost(),this.hostname=this.hostname||"";var P="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!P)for(var E=this.hostname.split(/\./),F=(_=0,E.length);_<F;_++){var R=E[_];if(R&&!R.match(h)){for(var C="",I=0,N=R.length;I<N;I++)R.charCodeAt(I)>127?C+="x":C+=R[I];if(!C.match(h)){var D=E.slice(0,_),T=E.slice(_+1),L=R.match(p);L&&(D.push(L[1]),T.unshift(L[2])),T.length&&(v="/"+T.join(".")+v),this.hostname=D.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),P||(this.hostname=n.toASCII(this.hostname));var M=this.port?":"+this.port:"",B=this.hostname||"";this.host=B+M,this.href+=this.host,P&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==v[0]&&(v="/"+v))}if(!d[x])for(_=0,F=l.length;_<F;_++){var K=l[_];if(-1!==v.indexOf(K)){var $=encodeURIComponent(K);$===K&&($=escape(K)),v=v.split(K).join($)}}var z=v.indexOf("#");-1!==z&&(this.hash=v.substr(z),v=v.slice(0,z));var U=v.indexOf("?");if(-1!==U?(this.search=v.substr(U),this.query=v.substr(U+1),t&&(this.query=m.parse(this.query)),v=v.slice(0,U)):t&&(this.search="",this.query={}),v&&(this.pathname=v),g[x]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){M=this.pathname||"";var q=this.search||"";this.path=M+q}return this.href=this.format(),this},o.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",o=!1,i="";this.host?o=e+this.host:this.hostname&&(o=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&"object"==typeof this.query&&Object.keys(this.query).length&&(i=m.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var a=this.search||i&&"?"+i||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||g[t])&&!1!==o?(o="//"+(o||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):o||(o=""),n&&"#"!==n.charAt(0)&&(n="#"+n),a&&"?"!==a.charAt(0)&&(a="?"+a),t+o+(r=r.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(a=a.replace("#","%23"))+n},o.prototype.resolve=function(e){return this.resolveObject(v(e,!1,!0)).format()},o.prototype.resolveObject=function(e){if("string"==typeof e){var t=new o;t.parse(e,!1,!0),e=t}for(var r=new o,n=Object.keys(this),i=0;i<n.length;i++){var a=n[i];r[a]=this[a]}if(r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var s=Object.keys(e),u=0;u<s.length;u++){var l=s[u];"protocol"!==l&&(r[l]=e[l])}return g[r.protocol]&&r.hostname&&!r.pathname&&(r.pathname="/",r.path=r.pathname),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!g[e.protocol]){for(var c=Object.keys(e),f=0;f<c.length;f++){var h=c[f];r[h]=e[h]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||y[e.protocol])r.pathname=e.pathname;else{for(var p=(e.pathname||"").split("/");p.length&&!(e.host=p.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),r.pathname=p.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var d=r.pathname||"",m=r.search||"";r.path=d+m}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var v=r.pathname&&"/"===r.pathname.charAt(0),b=e.host||e.pathname&&"/"===e.pathname.charAt(0),w=b||v||r.host&&e.pathname,x=w,k=r.pathname&&r.pathname.split("/")||[],S=(p=e.pathname&&e.pathname.split("/")||[],r.protocol&&!g[r.protocol]);if(S&&(r.hostname="",r.port=null,r.host&&(""===k[0]?k[0]=r.host:k.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===p[0]?p[0]=e.host:p.unshift(e.host)),e.host=null),w=w&&(""===p[0]||""===k[0])),b)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,k=p;else if(p.length)k||(k=[]),k.pop(),k=k.concat(p),r.search=e.search,r.query=e.query;else if(null!=e.search)return S&&(r.host=k.shift(),r.hostname=r.host,(P=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=P.shift(),r.hostname=P.shift(),r.host=r.hostname)),r.search=e.search,r.query=e.query,null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!k.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var O=k.slice(-1)[0],A=(r.host||e.host||k.length>1)&&("."===O||".."===O)||""===O,_=0,j=k.length;j>=0;j--)"."===(O=k[j])?k.splice(j,1):".."===O?(k.splice(j,1),_++):_&&(k.splice(j,1),_--);if(!w&&!x)for(;_--;_)k.unshift("..");!w||""===k[0]||k[0]&&"/"===k[0].charAt(0)||k.unshift(""),A&&"/"!==k.join("/").substr(-1)&&k.push("");var P,E=""===k[0]||k[0]&&"/"===k[0].charAt(0);return S&&(r.hostname=E?"":k.length?k.shift():"",r.host=r.hostname,(P=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=P.shift(),r.hostname=P.shift(),r.host=r.hostname)),(w=w||r.host&&k.length)&&!E&&k.unshift(""),k.length>0?r.pathname=k.join("/"):(r.pathname=null,r.path=null),null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},o.prototype.parseHost=function(){var e=this.host,t=a.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},t.parse=v,t.resolve=function(e,t){return v(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?v(e,!1,!0).resolveObject(t):t},t.format=function(e){return"string"==typeof e&&(e=v(e)),e instanceof o?e.format():o.prototype.format.call(e)},t.Url=o},2875:e=>{"use strict";function t(e){return e>=55296&&e<=56319}function r(e){return e>=56320&&e<=57343}e.exports=function(e){if("string"!=typeof e)throw new Error("Input must be string");for(var n=e.length,o=0,i=null,a=null,s=0;s<n;s++)r(i=e.charCodeAt(s))?null!=a&&t(a)?o+=1:o+=3:i<=127?o+=1:i>=128&&i<=2047?o+=2:i>=2048&&i<=65535&&(o+=3),a=i;return o}},6553:()=>{}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}r.m=e,r.u=e=>e+".js",r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var o=n.length-1;o>-1&&!e;)e=n[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})(),r.b=document.baseURI||self.location.href,(()=>{"use strict";const e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,t=Object.keys,n=Array.isArray;function o(e,r){return"object"!=typeof r||t(r).forEach((function(t){e[t]=r[t]})),e}"undefined"==typeof Promise||e.Promise||(e.Promise=Promise);const i=Object.getPrototypeOf,a={}.hasOwnProperty;function s(e,t){return a.call(e,t)}function u(e,r){"function"==typeof r&&(r=r(i(e))),("undefined"==typeof Reflect?t:Reflect.ownKeys)(r).forEach((t=>{c(e,t,r[t])}))}const l=Object.defineProperty;function c(e,t,r,n){l(e,t,o(r&&s(r,"get")&&"function"==typeof r.get?{get:r.get,set:r.set,configurable:!0}:{value:r,configurable:!0,writable:!0},n))}function f(e){return{from:function(t){return e.prototype=Object.create(t.prototype),c(e.prototype,"constructor",e),{extend:u.bind(null,e.prototype)}}}}const h=Object.getOwnPropertyDescriptor;function p(e,t){let r;return h(e,t)||(r=i(e))&&p(r,t)}const d=[].slice;function y(e,t,r){return d.call(e,t,r)}function g(e,t){return t(e)}function m(e){if(!e)throw new Error("Assertion Failed")}function v(t){e.setImmediate?setImmediate(t):setTimeout(t,0)}function b(e,t){return e.reduce(((e,r,n)=>{var o=t(r,n);return o&&(e[o[0]]=o[1]),e}),{})}function w(e,t){if(s(e,t))return e[t];if(!t)return e;if("string"!=typeof t){for(var r=[],n=0,o=t.length;n<o;++n){var i=w(e,t[n]);r.push(i)}return r}var a=t.indexOf(".");if(-1!==a){var u=e[t.substr(0,a)];return void 0===u?void 0:w(u,t.substr(a+1))}}function x(e,t,r){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){m("string"!=typeof r&&"length"in r);for(var o=0,i=t.length;o<i;++o)x(e,t[o],r[o])}else{var a=t.indexOf(".");if(-1!==a){var u=t.substr(0,a),l=t.substr(a+1);if(""===l)void 0===r?n(e)&&!isNaN(parseInt(u))?e.splice(u,1):delete e[u]:e[u]=r;else{var c=e[u];c&&s(e,u)||(c=e[u]={}),x(c,l,r)}}else void 0===r?n(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=r}}function k(e){var t={};for(var r in e)s(e,r)&&(t[r]=e[r]);return t}const S=[].concat;function O(e){return S.apply([],e)}const A="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(O([8,16,32,64].map((e=>["Int","Uint","Float"].map((t=>t+e+"Array")))))).filter((t=>e[t])),_=A.map((t=>e[t]));b(A,(e=>[e,!0]));let j=null;function P(e){j="undefined"!=typeof WeakMap&&new WeakMap;const t=E(e);return j=null,t}function E(e){if(!e||"object"!=typeof e)return e;let t=j&&j.get(e);if(t)return t;if(n(e)){t=[],j&&j.set(e,t);for(var r=0,o=e.length;r<o;++r)t.push(E(e[r]))}else if(_.indexOf(e.constructor)>=0)t=e;else{const r=i(e);for(var a in t=r===Object.prototype?{}:Object.create(r),j&&j.set(e,t),e)s(e,a)&&(t[a]=E(e[a]))}return t}const{toString:F}={};function R(e){return F.call(e).slice(8,-1)}const C="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",I="symbol"==typeof C?function(e){var t;return null!=e&&(t=e[C])&&t.apply(e)}:function(){return null},N={};function D(e){var t,r,o,i;if(1===arguments.length){if(n(e))return e.slice();if(this===N&&"string"==typeof e)return[e];if(i=I(e)){for(r=[];!(o=i.next()).done;)r.push(o.value);return r}if(null==e)return[e];if("number"==typeof(t=e.length)){for(r=new Array(t);t--;)r[t]=e[t];return r}return[e]}for(t=arguments.length,r=new Array(t);t--;)r[t]=arguments[t];return r}const T="undefined"!=typeof Symbol?e=>"AsyncFunction"===e[Symbol.toStringTag]:()=>!1;var L="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function M(e,t){L=e,B=t}var B=()=>!0;const K=!new Error("").stack;function $(){if(K)try{throw $.arguments,new Error}catch(e){return e}return new Error}function z(e,t){var r=e.stack;return r?(t=t||0,0===r.indexOf(e.name)&&(t+=(e.name+e.message).split("\n").length),r.split("\n").slice(t).filter(B).map((e=>"\n"+e)).join("")):""}var U=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],q=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(U),V={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function Z(e,t){this._e=$(),this.name=e,this.message=t}function H(e,t){return e+". Errors: "+Object.keys(t).map((e=>t[e].toString())).filter(((e,t,r)=>r.indexOf(e)===t)).join("\n")}function W(e,t,r,n){this._e=$(),this.failures=t,this.failedKeys=n,this.successCount=r,this.message=H(e,t)}function J(e,t){this._e=$(),this.name="BulkError",this.failures=Object.keys(t).map((e=>t[e])),this.failuresByPos=t,this.message=H(e,t)}f(Z).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+z(this._e,2))}},toString:function(){return this.name+": "+this.message}}),f(W).from(Z),f(J).from(Z);var G=q.reduce(((e,t)=>(e[t]=t+"Error",e)),{});const Y=Z;var Q=q.reduce(((e,t)=>{var r=t+"Error";function n(e,n){this._e=$(),this.name=r,e?"string"==typeof e?(this.message=`${e}${n?"\n "+n:""}`,this.inner=n||null):"object"==typeof e&&(this.message=`${e.name} ${e.message}`,this.inner=e):(this.message=V[t]||r,this.inner=null)}return f(n).from(Y),e[t]=n,e}),{});Q.Syntax=SyntaxError,Q.Type=TypeError,Q.Range=RangeError;var X=U.reduce(((e,t)=>(e[t+"Error"]=Q[t],e)),{}),ee=q.reduce(((e,t)=>(-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=Q[t]),e)),{});function te(){}function re(e){return e}function ne(e,t){return null==e||e===re?t:function(r){return t(e(r))}}function oe(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function ie(e,t){return e===te?t:function(){var r=e.apply(this,arguments);void 0!==r&&(arguments[0]=r);var n=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var i=t.apply(this,arguments);return n&&(this.onsuccess=this.onsuccess?oe(n,this.onsuccess):n),o&&(this.onerror=this.onerror?oe(o,this.onerror):o),void 0!==i?i:r}}function ae(e,t){return e===te?t:function(){e.apply(this,arguments);var r=this.onsuccess,n=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),r&&(this.onsuccess=this.onsuccess?oe(r,this.onsuccess):r),n&&(this.onerror=this.onerror?oe(n,this.onerror):n)}}function se(e,t){return e===te?t:function(r){var n=e.apply(this,arguments);o(r,n);var i=this.onsuccess,a=this.onerror;this.onsuccess=null,this.onerror=null;var s=t.apply(this,arguments);return i&&(this.onsuccess=this.onsuccess?oe(i,this.onsuccess):i),a&&(this.onerror=this.onerror?oe(a,this.onerror):a),void 0===n?void 0===s?void 0:s:o(n,s)}}function ue(e,t){return e===te?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}}function le(e,t){return e===te?t:function(){var r=e.apply(this,arguments);if(r&&"function"==typeof r.then){for(var n=this,o=arguments.length,i=new Array(o);o--;)i[o]=arguments[o];return r.then((function(){return t.apply(n,i)}))}return t.apply(this,arguments)}}ee.ModifyError=W,ee.DexieError=Z,ee.BulkError=J;var ce={};const[fe,he,pe]="undefined"==typeof Promise?[]:(()=>{let e=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[e,i(e),e];const t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,i(t),e]})(),de=he&&he.then,ye=fe&&fe.constructor,ge=!!pe;var me=!1,ve=pe?()=>{pe.then($e)}:e.setImmediate?setImmediate.bind(null,$e):e.MutationObserver?()=>{var e=document.createElement("div");new MutationObserver((()=>{$e(),e=null})).observe(e,{attributes:!0}),e.setAttribute("i","1")}:()=>{setTimeout($e,0)},be=function(e,t){Pe.push([e,t]),xe&&(ve(),xe=!1)},we=!0,xe=!0,ke=[],Se=[],Oe=null,Ae=re,_e={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:ft,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach((e=>{try{ft(e[0],e[1])}catch(e){}}))}},je=_e,Pe=[],Ee=0,Fe=[];function Re(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=te,this._lib=!1;var t=this._PSD=je;if(L&&(this._stackHolder=$(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==ce)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&De(this,this._value))}this._state=null,this._value=null,++t.ref,Ne(this,e)}const Ce={get:function(){var e=je,t=Ye;function r(r,n){var o=!e.global&&(e!==je||t!==Ye);const i=o&&!tt();var a=new Re(((t,a)=>{Le(this,new Ie(lt(r,e,o,i),lt(n,e,o,i),t,a,e))}));return L&&Ke(a,this),a}return r.prototype=ce,r},set:function(e){c(this,"then",e&&e.prototype===ce?Ce:{get:function(){return e},set:Ce.set})}};function Ie(e,t,r,n,o){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=r,this.reject=n,this.psd=o}function Ne(e,t){try{t((t=>{if(null===e._state){if(t===e)throw new TypeError("A promise cannot be resolved with itself.");var r=e._lib&&ze();t&&"function"==typeof t.then?Ne(e,((e,r)=>{t instanceof Re?t._then(e,r):t.then(e,r)})):(e._state=!0,e._value=t,Te(e)),r&&Ue()}}),De.bind(null,e))}catch(t){De(e,t)}}function De(e,t){if(Se.push(t),null===e._state){var r=e._lib&&ze();t=Ae(t),e._state=!1,e._value=t,L&&null!==t&&"object"==typeof t&&!t._promise&&function(e,t,r){try{e.apply(null,void 0)}catch(e){}}((()=>{var r=p(t,"stack");t._promise=e,c(t,"stack",{get:()=>me?r&&(r.get?r.get.apply(t):r.value):e.stack})})),function(e){ke.some((t=>t._value===e._value))||ke.push(e)}(e),Te(e),r&&Ue()}}function Te(e){var t=e._listeners;e._listeners=[];for(var r=0,n=t.length;r<n;++r)Le(e,t[r]);var o=e._PSD;--o.ref||o.finalize(),0===Ee&&(++Ee,be((()=>{0==--Ee&&qe()}),[]))}function Le(e,t){if(null!==e._state){var r=e._state?t.onFulfilled:t.onRejected;if(null===r)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++Ee,be(Me,[r,e,t])}else e._listeners.push(t)}function Me(e,t,r){try{Oe=t;var n,o=t._value;t._state?n=e(o):(Se.length&&(Se=[]),n=e(o),-1===Se.indexOf(o)&&function(e){for(var t=ke.length;t;)if(ke[--t]._value===e._value)return void ke.splice(t,1)}(t)),r.resolve(n)}catch(e){r.reject(e)}finally{Oe=null,0==--Ee&&qe(),--r.psd.ref||r.psd.finalize()}}function Be(e,t,r){if(t.length===r)return t;var n="";if(!1===e._state){var o,i,a=e._value;null!=a?(o=a.name||"Error",i=a.message||a,n=z(a,0)):(o=a,i=""),t.push(o+(i?": "+i:"")+n)}return L&&((n=z(e._stackHolder,2))&&-1===t.indexOf(n)&&t.push(n),e._prev&&Be(e._prev,t,r)),t}function Ke(e,t){var r=t?t._numPrev+1:0;r<100&&(e._prev=t,e._numPrev=r)}function $e(){ze()&&Ue()}function ze(){var e=we;return we=!1,xe=!1,e}function Ue(){var e,t,r;do{for(;Pe.length>0;)for(e=Pe,Pe=[],r=e.length,t=0;t<r;++t){var n=e[t];n[0].apply(null,n[1])}}while(Pe.length>0);we=!0,xe=!0}function qe(){var e=ke;ke=[],e.forEach((e=>{e._PSD.onunhandled.call(null,e._value,e)}));for(var t=Fe.slice(0),r=t.length;r;)t[--r]()}function Ve(e){return new Re(ce,!1,e)}function Ze(e,t){var r=je;return function(){var n=ze(),o=je;try{return it(r,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{it(o,!1),n&&Ue()}}}u(Re.prototype,{then:Ce,_then:function(e,t){Le(this,new Ie(null,null,e,t,je))},catch:function(e){if(1===arguments.length)return this.then(null,e);var t=arguments[0],r=arguments[1];return"function"==typeof t?this.then(null,(e=>e instanceof t?r(e):Ve(e))):this.then(null,(e=>e&&e.name===t?r(e):Ve(e)))},finally:function(e){return this.then((t=>(e(),t)),(t=>(e(),Ve(t))))},stack:{get:function(){if(this._stack)return this._stack;try{me=!0;var e=Be(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{me=!1}}},timeout:function(e,t){return e<1/0?new Re(((r,n)=>{var o=setTimeout((()=>n(new Q.Timeout(t))),e);this.then(r,n).finally(clearTimeout.bind(null,o))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&c(Re.prototype,Symbol.toStringTag,"Dexie.Promise"),_e.env=at(),u(Re,{all:function(){var e=D.apply(null,arguments).map(rt);return new Re((function(t,r){0===e.length&&t([]);var n=e.length;e.forEach(((o,i)=>Re.resolve(o).then((r=>{e[i]=r,--n||t(e)}),r)))}))},resolve:e=>{if(e instanceof Re)return e;if(e&&"function"==typeof e.then)return new Re(((t,r)=>{e.then(t,r)}));var t=new Re(ce,!0,e);return Ke(t,Oe),t},reject:Ve,race:function(){var e=D.apply(null,arguments).map(rt);return new Re(((t,r)=>{e.map((e=>Re.resolve(e).then(t,r)))}))},PSD:{get:()=>je,set:e=>je=e},totalEchoes:{get:()=>Ye},newPSD:Xe,usePSD:st,scheduler:{get:()=>be,set:e=>{be=e}},rejectionMapper:{get:()=>Ae,set:e=>{Ae=e}},follow:(e,t)=>new Re(((r,n)=>Xe(((t,r)=>{var n=je;n.unhandleds=[],n.onunhandled=r,n.finalize=oe((function(){!function(e){Fe.push((function t(){e(),Fe.splice(Fe.indexOf(t),1)})),++Ee,be((()=>{0==--Ee&&qe()}),[])}((()=>{0===this.unhandleds.length?t():r(this.unhandleds[0])}))}),n.finalize),e()}),t,r,n)))}),ye&&(ye.allSettled&&c(Re,"allSettled",(function(){const e=D.apply(null,arguments).map(rt);return new Re((t=>{0===e.length&&t([]);let r=e.length;const n=new Array(r);e.forEach(((e,o)=>Re.resolve(e).then((e=>n[o]={status:"fulfilled",value:e}),(e=>n[o]={status:"rejected",reason:e})).then((()=>--r||t(n)))))}))})),ye.any&&"undefined"!=typeof AggregateError&&c(Re,"any",(function(){const e=D.apply(null,arguments).map(rt);return new Re(((t,r)=>{0===e.length&&r(new AggregateError([]));let n=e.length;const o=new Array(n);e.forEach(((e,i)=>Re.resolve(e).then((e=>t(e)),(e=>{o[i]=e,--n||r(new AggregateError(o))}))))}))})));const He={awaits:0,echoes:0,id:0};var We=0,Je=[],Ge=0,Ye=0,Qe=0;function Xe(e,t,r,n){var i=je,a=Object.create(i);a.parent=i,a.ref=0,a.global=!1,a.id=++Qe;var s=_e.env;a.env=ge?{Promise:Re,PromiseProp:{value:Re,configurable:!0,writable:!0},all:Re.all,race:Re.race,allSettled:Re.allSettled,any:Re.any,resolve:Re.resolve,reject:Re.reject,nthen:ct(s.nthen,a),gthen:ct(s.gthen,a)}:{},t&&o(a,t),++i.ref,a.finalize=function(){--this.parent.ref||this.parent.finalize()};var u=st(a,e,r,n);return 0===a.ref&&a.finalize(),u}function et(){return He.id||(He.id=++We),++He.awaits,He.echoes+=100,He.id}function tt(){return!!He.awaits&&(0==--He.awaits&&(He.id=0),He.echoes=100*He.awaits,!0)}function rt(e){return He.echoes&&e&&e.constructor===ye?(et(),e.then((e=>(tt(),e)),(e=>(tt(),ht(e))))):e}function nt(e){++Ye,He.echoes&&0!=--He.echoes||(He.echoes=He.id=0),Je.push(je),it(e,!0)}function ot(){var e=Je[Je.length-1];Je.pop(),it(e,!1)}function it(t,r){var n=je;if((r?!He.echoes||Ge++&&t===je:!Ge||--Ge&&t===je)||ut(r?nt.bind(null,t):ot),t!==je&&(je=t,n===_e&&(_e.env=at()),ge)){var o=_e.env.Promise,i=t.env;he.then=i.nthen,o.prototype.then=i.gthen,(n.global||t.global)&&(Object.defineProperty(e,"Promise",i.PromiseProp),o.all=i.all,o.race=i.race,o.resolve=i.resolve,o.reject=i.reject,i.allSettled&&(o.allSettled=i.allSettled),i.any&&(o.any=i.any))}}function at(){var t=e.Promise;return ge?{Promise:t,PromiseProp:Object.getOwnPropertyDescriptor(e,"Promise"),all:t.all,race:t.race,allSettled:t.allSettled,any:t.any,resolve:t.resolve,reject:t.reject,nthen:he.then,gthen:t.prototype.then}:{}}function st(e,t,r,n,o){var i=je;try{return it(e,!0),t(r,n,o)}finally{it(i,!1)}}function ut(e){de.call(fe,e)}function lt(e,t,r,n){return"function"!=typeof e?e:function(){var o=je;r&&et(),it(t,!0);try{return e.apply(this,arguments)}finally{it(o,!1),n&&ut(tt)}}}function ct(e,t){return function(r,n){return e.call(this,lt(r,t),lt(n,t))}}function ft(t,r){var n;try{n=r.onuncatched(t)}catch(e){}if(!1!==n)try{var i,a={promise:r,reason:t};if(e.document&&document.createEvent?((i=document.createEvent("Event")).initEvent("unhandledrejection",!0,!0),o(i,a)):e.CustomEvent&&o(i=new CustomEvent("unhandledrejection",{detail:a}),a),i&&e.dispatchEvent&&(dispatchEvent(i),!e.PromiseRejectionEvent&&e.onunhandledrejection))try{e.onunhandledrejection(i)}catch(e){}L&&i&&!i.defaultPrevented&&console.warn(`Unhandled rejection: ${t.stack||t}`)}catch(e){}}-1===(""+de).indexOf("[native code]")&&(et=tt=te);var ht=Re.reject;function pt(e,t,r,n){if(e.idbdb&&(e._state.openComplete||je.letThrough||e._vip)){var o=e._createTransaction(t,r,e._dbSchema);try{o.create(),e._state.PR1398_maxLoop=3}catch(o){return o.name===G.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((()=>pt(e,t,r,n)))):ht(o)}return o._promise(t,((e,t)=>Xe((()=>(je.trans=o,n(e,t,o)))))).then((e=>o._completion.then((()=>e))))}if(e._state.openComplete)return ht(new Q.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return ht(new Q.DatabaseClosed);e.open().catch(te)}return e._state.dbReadyPromise.then((()=>pt(e,t,r,n)))}const dt=String.fromCharCode(65535),yt="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",gt=[],mt="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),vt=mt,bt=mt,wt=e=>!/(dexie\.js|dexie\.min\.js)/.test(e);function xt(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}const kt={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function St(e){return"string"!=typeof e||/\./.test(e)?e=>e:t=>(void 0===t[e]&&e in t&&delete(t=P(t))[e],t)}class Ot{_trans(e,t,r){const n=this._tx||je.trans,o=this.name;function i(e,r,n){if(!n.schema[o])throw new Q.NotFound("Table "+o+" not part of transaction");return t(n.idbtrans,n)}const a=ze();try{return n&&n.db===this.db?n===je.trans?n._promise(e,i,r):Xe((()=>n._promise(e,i,r)),{trans:n,transless:je.transless||je}):pt(this.db,e,[this.name],i)}finally{a&&Ue()}}get(e,t){return e&&e.constructor===Object?this.where(e).first(t):this._trans("readonly",(t=>this.core.get({trans:t,key:e}).then((e=>this.hook.reading.fire(e))))).then(t)}where(e){if("string"==typeof e)return new this.db.WhereClause(this,e);if(n(e))return new this.db.WhereClause(this,`[${e.join("+")}]`);const r=t(e);if(1===r.length)return this.where(r[0]).equals(e[r[0]]);const o=this.schema.indexes.concat(this.schema.primKey).filter((e=>e.compound&&r.every((t=>e.keyPath.indexOf(t)>=0))&&e.keyPath.every((e=>r.indexOf(e)>=0))))[0];if(o&&this.db._maxKey!==dt)return this.where(o.name).equals(o.keyPath.map((t=>e[t])));!o&&L&&console.warn(`The query ${JSON.stringify(e)} on ${this.name} would benefit of a compound index [${r.join("+")}]`);const{idxByName:i}=this.schema,a=this.db._deps.indexedDB;function s(e,t){try{return 0===a.cmp(e,t)}catch(e){return!1}}const[u,l]=r.reduce((([t,r],o)=>{const a=i[o],u=e[o];return[t||a,t||!a?xt(r,a&&a.multi?e=>{const t=w(e,o);return n(t)&&t.some((e=>s(u,e)))}:e=>s(u,w(e,o))):r]}),[null,null]);return u?this.where(u.name).equals(e[u.keyPath]).filter(l):o?this.filter(l):this.where(r).equals("")}filter(e){return this.toCollection().and(e)}count(e){return this.toCollection().count(e)}offset(e){return this.toCollection().offset(e)}limit(e){return this.toCollection().limit(e)}each(e){return this.toCollection().each(e)}toArray(e){return this.toCollection().toArray(e)}toCollection(){return new this.db.Collection(new this.db.WhereClause(this))}orderBy(e){return new this.db.Collection(new this.db.WhereClause(this,n(e)?`[${e.join("+")}]`:e))}reverse(){return this.toCollection().reverse()}mapToClass(e){this.schema.mappedClass=e;const t=t=>{if(!t)return t;const r=Object.create(e.prototype);for(var n in t)if(s(t,n))try{r[n]=t[n]}catch(e){}return r};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=t,this.hook("reading",t),e}defineClass(){return this.mapToClass((function(e){o(this,e)}))}add(e,t){const{auto:r,keyPath:n}=this.schema.primKey;let o=e;return n&&r&&(o=St(n)(e)),this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[o]}))).then((e=>e.numFailures?Re.reject(e.failures[0]):e.lastResult)).then((t=>{if(n)try{x(e,n,t)}catch(e){}return t}))}update(e,r){if("object"!=typeof e||n(e))return this.where(":id").equals(e).modify(r);{const n=w(e,this.schema.primKey.keyPath);if(void 0===n)return ht(new Q.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof r?t(r).forEach((t=>{x(e,t,r[t])})):r(e,{value:e,primKey:n})}catch(e){}return this.where(":id").equals(n).modify(r)}}put(e,t){const{auto:r,keyPath:n}=this.schema.primKey;let o=e;return n&&r&&(o=St(n)(e)),this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"put",values:[o],keys:null!=t?[t]:null}))).then((e=>e.numFailures?Re.reject(e.failures[0]):e.lastResult)).then((t=>{if(n)try{x(e,n,t)}catch(e){}return t}))}delete(e){return this._trans("readwrite",(t=>this.core.mutate({trans:t,type:"delete",keys:[e]}))).then((e=>e.numFailures?Re.reject(e.failures[0]):void 0))}clear(){return this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"deleteRange",range:kt}))).then((e=>e.numFailures?Re.reject(e.failures[0]):void 0))}bulkGet(e){return this._trans("readonly",(t=>this.core.getMany({keys:e,trans:t}).then((e=>e.map((e=>this.hook.reading.fire(e)))))))}bulkAdd(e,t,r){const n=Array.isArray(t)?t:void 0,o=(r=r||(n?void 0:t))?r.allKeys:void 0;return this._trans("readwrite",(t=>{const{auto:r,keyPath:i}=this.schema.primKey;if(i&&n)throw new Q.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(n&&n.length!==e.length)throw new Q.InvalidArgument("Arguments objects and keys must have the same length");const a=e.length;let s=i&&r?e.map(St(i)):e;return this.core.mutate({trans:t,type:"add",keys:n,values:s,wantResults:o}).then((({numFailures:e,results:t,lastResult:r,failures:n})=>{if(0===e)return o?t:r;throw new J(`${this.name}.bulkAdd(): ${e} of ${a} operations failed`,n)}))}))}bulkPut(e,t,r){const n=Array.isArray(t)?t:void 0,o=(r=r||(n?void 0:t))?r.allKeys:void 0;return this._trans("readwrite",(t=>{const{auto:r,keyPath:i}=this.schema.primKey;if(i&&n)throw new Q.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(n&&n.length!==e.length)throw new Q.InvalidArgument("Arguments objects and keys must have the same length");const a=e.length;let s=i&&r?e.map(St(i)):e;return this.core.mutate({trans:t,type:"put",keys:n,values:s,wantResults:o}).then((({numFailures:e,results:t,lastResult:r,failures:n})=>{if(0===e)return o?t:r;throw new J(`${this.name}.bulkPut(): ${e} of ${a} operations failed`,n)}))}))}bulkDelete(e){const t=e.length;return this._trans("readwrite",(t=>this.core.mutate({trans:t,type:"delete",keys:e}))).then((({numFailures:e,lastResult:r,failures:n})=>{if(0===e)return r;throw new J(`${this.name}.bulkDelete(): ${e} of ${t} operations failed`,n)}))}}function At(e){var r={},o=function(t,n){if(n){for(var o=arguments.length,i=new Array(o-1);--o;)i[o-1]=arguments[o];return r[t].subscribe.apply(null,i),e}if("string"==typeof t)return r[t]};o.addEventType=s;for(var i=1,a=arguments.length;i<a;++i)s(arguments[i]);return o;function s(e,t,n){if("object"==typeof e)return u(e);t||(t=ue),n||(n=te);var i={subscribers:[],fire:n,subscribe:function(e){-1===i.subscribers.indexOf(e)&&(i.subscribers.push(e),i.fire=t(i.fire,e))},unsubscribe:function(e){i.subscribers=i.subscribers.filter((function(t){return t!==e})),i.fire=i.subscribers.reduce(t,n)}};return r[e]=o[e]=i,i}function u(e){t(e).forEach((function(t){var r=e[t];if(n(r))s(t,e[t][0],e[t][1]);else{if("asap"!==r)throw new Q.InvalidArgument("Invalid event config");var o=s(t,re,(function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];o.subscribers.forEach((function(e){v((function(){e.apply(null,t)}))}))}))}}))}}function _t(e,t){return f(t).from({prototype:e}),t}function jt(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function Pt(e,t){e.filter=xt(e.filter,t)}function Et(e,t,r){var n=e.replayFilter;e.replayFilter=n?()=>xt(n(),t()):t,e.justLimit=r&&!n}function Ft(e,t){if(e.isPrimKey)return t.primaryKey;const r=t.getIndexByKeyPath(e.index);if(!r)throw new Q.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return r}function Rt(e,t,r){const n=Ft(e,t.schema);return t.openCursor({trans:r,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:n,range:e.range}})}function Ct(e,t,r,n){const o=e.replayFilter?xt(e.filter,e.replayFilter()):e.filter;if(e.or){const i={},a=(e,r,n)=>{if(!o||o(r,n,(e=>r.stop(e)),(e=>r.fail(e)))){var a=r.primaryKey,u=""+a;"[object ArrayBuffer]"===u&&(u=""+new Uint8Array(a)),s(i,u)||(i[u]=!0,t(e,r,n))}};return Promise.all([e.or._iterate(a,r),It(Rt(e,n,r),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return It(Rt(e,n,r),xt(e.algorithm,o),t,!e.keysOnly&&e.valueMapper)}function It(e,t,r,n){var o=Ze(n?(e,t,o)=>r(n(e),t,o):r);return e.then((e=>{if(e)return e.start((()=>{var r=()=>e.continue();t&&!t(e,(e=>r=e),(t=>{e.stop(t),r=te}),(t=>{e.fail(t),r=te}))||o(e.value,e,(e=>r=e)),r()}))}))}function Nt(e,t){try{const r=Dt(e),n=Dt(t);if(r!==n)return"Array"===r?1:"Array"===n?-1:"binary"===r?1:"binary"===n?-1:"string"===r?1:"string"===n?-1:"Date"===r?1:"Date"!==n?NaN:-1;switch(r){case"number":case"Date":case"string":return e>t?1:e<t?-1:0;case"binary":return function(e,t){const r=e.length,n=t.length,o=r<n?r:n;for(let r=0;r<o;++r)if(e[r]!==t[r])return e[r]<t[r]?-1:1;return r===n?0:r<n?-1:1}(Tt(e),Tt(t));case"Array":return function(e,t){const r=e.length,n=t.length,o=r<n?r:n;for(let r=0;r<o;++r){const n=Nt(e[r],t[r]);if(0!==n)return n}return r===n?0:r<n?-1:1}(e,t)}}catch(e){}return NaN}function Dt(e){const t=typeof e;if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";const r=R(e);return"ArrayBuffer"===r?"binary":r}function Tt(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}class Lt{_read(e,t){var r=this._ctx;return r.error?r.table._trans(null,ht.bind(null,r.error)):r.table._trans("readonly",e).then(t)}_write(e){var t=this._ctx;return t.error?t.table._trans(null,ht.bind(null,t.error)):t.table._trans("readwrite",e,"locked")}_addAlgorithm(e){var t=this._ctx;t.algorithm=xt(t.algorithm,e)}_iterate(e,t){return Ct(this._ctx,e,t,this._ctx.table.core)}clone(e){var t=Object.create(this.constructor.prototype),r=Object.create(this._ctx);return e&&o(r,e),t._ctx=r,t}raw(){return this._ctx.valueMapper=null,this}each(e){var t=this._ctx;return this._read((r=>Ct(t,e,r,t.table.core)))}count(e){return this._read((e=>{const t=this._ctx,r=t.table.core;if(jt(t,!0))return r.count({trans:e,query:{index:Ft(t,r.schema),range:t.range}}).then((e=>Math.min(e,t.limit)));var n=0;return Ct(t,(()=>(++n,!1)),e,r).then((()=>n))})).then(e)}sortBy(e,t){const r=e.split(".").reverse(),n=r[0],o=r.length-1;function i(e,t){return t?i(e[r[t]],t-1):e[n]}var a="next"===this._ctx.dir?1:-1;function s(e,t){var r=i(e,o),n=i(t,o);return r<n?-a:r>n?a:0}return this.toArray((function(e){return e.sort(s)})).then(t)}toArray(e){return this._read((e=>{var t=this._ctx;if("next"===t.dir&&jt(t,!0)&&t.limit>0){const{valueMapper:r}=t,n=Ft(t,t.table.core.schema);return t.table.core.query({trans:e,limit:t.limit,values:!0,query:{index:n,range:t.range}}).then((({result:e})=>r?e.map(r):e))}{const r=[];return Ct(t,(e=>r.push(e)),e,t.table.core).then((()=>r))}}),e)}offset(e){var t=this._ctx;return e<=0||(t.offset+=e,jt(t)?Et(t,(()=>{var t=e;return(e,r)=>0===t||(1===t?(--t,!1):(r((()=>{e.advance(t),t=0})),!1))})):Et(t,(()=>{var t=e;return()=>--t<0}))),this}limit(e){return this._ctx.limit=Math.min(this._ctx.limit,e),Et(this._ctx,(()=>{var t=e;return function(e,r,n){return--t<=0&&r(n),t>=0}}),!0),this}until(e,t){return Pt(this._ctx,(function(r,n,o){return!e(r.value)||(n(o),t)})),this}first(e){return this.limit(1).toArray((function(e){return e[0]})).then(e)}last(e){return this.reverse().first(e)}filter(e){var t,r;return Pt(this._ctx,(function(t){return e(t.value)})),t=this._ctx,r=e,t.isMatch=xt(t.isMatch,r),this}and(e){return this.filter(e)}or(e){return new this.db.WhereClause(this._ctx.table,e,this)}reverse(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}desc(){return this.reverse()}eachKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,r){e(r.key,r)}))}eachUniqueKey(e){return this._ctx.unique="unique",this.eachKey(e)}eachPrimaryKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,r){e(r.primaryKey,r)}))}keys(e){var t=this._ctx;t.keysOnly=!t.isMatch;var r=[];return this.each((function(e,t){r.push(t.key)})).then((function(){return r})).then(e)}primaryKeys(e){var t=this._ctx;if("next"===t.dir&&jt(t,!0)&&t.limit>0)return this._read((e=>{var r=Ft(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:r,range:t.range}})})).then((({result:e})=>e)).then(e);t.keysOnly=!t.isMatch;var r=[];return this.each((function(e,t){r.push(t.primaryKey)})).then((function(){return r})).then(e)}uniqueKeys(e){return this._ctx.unique="unique",this.keys(e)}firstKey(e){return this.limit(1).keys((function(e){return e[0]})).then(e)}lastKey(e){return this.reverse().firstKey(e)}distinct(){var e=this._ctx,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var r={};return Pt(this._ctx,(function(e){var t=e.primaryKey.toString(),n=s(r,t);return r[t]=!0,!n})),this}modify(e){var r=this._ctx;return this._write((n=>{var o;if("function"==typeof e)o=e;else{var i=t(e),a=i.length;o=function(t){for(var r=!1,n=0;n<a;++n){var o=i[n],s=e[o];w(t,o)!==s&&(x(t,o,s),r=!0)}return r}}const s=r.table.core,{outbound:u,extractKey:l}=s.schema.primaryKey,c=this.db._options.modifyChunkSize||200,f=[];let h=0;const p=[],d=(e,r)=>{const{failures:n,numFailures:o}=r;h+=e-o;for(let e of t(n))f.push(n[e])};return this.clone().primaryKeys().then((t=>{const i=a=>{const f=Math.min(c,t.length-a);return s.getMany({trans:n,keys:t.slice(a,a+f),cache:"immutable"}).then((h=>{const p=[],y=[],g=u?[]:null,m=[];for(let e=0;e<f;++e){const r=h[e],n={value:P(r),primKey:t[a+e]};!1!==o.call(n,n.value,n)&&(null==n.value?m.push(t[a+e]):u||0===Nt(l(r),l(n.value))?(y.push(n.value),u&&g.push(t[a+e])):(m.push(t[a+e]),p.push(n.value)))}const v=jt(r)&&r.limit===1/0&&("function"!=typeof e||e===Mt)&&{index:r.index,range:r.range};return Promise.resolve(p.length>0&&s.mutate({trans:n,type:"add",values:p}).then((e=>{for(let t in e.failures)m.splice(parseInt(t),1);d(p.length,e)}))).then((()=>(y.length>0||v&&"object"==typeof e)&&s.mutate({trans:n,type:"put",keys:g,values:y,criteria:v,changeSpec:"function"!=typeof e&&e}).then((e=>d(y.length,e))))).then((()=>(m.length>0||v&&e===Mt)&&s.mutate({trans:n,type:"delete",keys:m,criteria:v}).then((e=>d(m.length,e))))).then((()=>t.length>a+f&&i(a+c)))}))};return i(0).then((()=>{if(f.length>0)throw new W("Error modifying one or more objects",f,h,p);return t.length}))}))}))}delete(){var e=this._ctx,t=e.range;return jt(e)&&(e.isPrimKey&&!bt||3===t.type)?this._write((r=>{const{primaryKey:n}=e.table.core.schema,o=t;return e.table.core.count({trans:r,query:{index:n,range:o}}).then((t=>e.table.core.mutate({trans:r,type:"deleteRange",range:o}).then((({failures:e,lastResult:r,results:n,numFailures:o})=>{if(o)throw new W("Could not delete some values",Object.keys(e).map((t=>e[t])),t-o);return t-o}))))})):this.modify(Mt)}}const Mt=(e,t)=>t.value=null;function Bt(e,t){return e<t?-1:e===t?0:1}function Kt(e,t){return e>t?-1:e===t?0:1}function $t(e,t,r){var n=e instanceof Ht?new e.Collection(e):e;return n._ctx.error=r?new r(t):new TypeError(t),n}function zt(e){return new e.Collection(e,(()=>Zt(""))).limit(0)}function Ut(e,t,r,n,o,i){for(var a=Math.min(e.length,n.length),s=-1,u=0;u<a;++u){var l=t[u];if(l!==n[u])return o(e[u],r[u])<0?e.substr(0,u)+r[u]+r.substr(u+1):o(e[u],n[u])<0?e.substr(0,u)+n[u]+r.substr(u+1):s>=0?e.substr(0,s)+t[s]+r.substr(s+1):null;o(e[u],l)<0&&(s=u)}return a<n.length&&"next"===i?e+r.substr(e.length):a<e.length&&"prev"===i?e.substr(0,r.length):s<0?null:e.substr(0,s)+n[s]+r.substr(s+1)}function qt(e,t,r,n){var o,i,a,s,u,l,c,f=r.length;if(!r.every((e=>"string"==typeof e)))return $t(e,"String expected.");function h(e){o=function(e){return"next"===e?e=>e.toUpperCase():e=>e.toLowerCase()}(e),i=function(e){return"next"===e?e=>e.toLowerCase():e=>e.toUpperCase()}(e),a="next"===e?Bt:Kt;var t=r.map((function(e){return{lower:i(e),upper:o(e)}})).sort((function(e,t){return a(e.lower,t.lower)}));s=t.map((function(e){return e.upper})),u=t.map((function(e){return e.lower})),l=e,c="next"===e?"":n}h("next");var p=new e.Collection(e,(()=>Vt(s[0],u[f-1]+n)));p._ondirectionchange=function(e){h(e)};var d=0;return p._addAlgorithm((function(e,r,n){var o=e.key;if("string"!=typeof o)return!1;var h=i(o);if(t(h,u,d))return!0;for(var p=null,y=d;y<f;++y){var g=Ut(o,h,s[y],u[y],a,l);null===g&&null===p?d=y+1:(null===p||a(p,g)>0)&&(p=g)}return r(null!==p?function(){e.continue(p+c)}:n),!1})),p}function Vt(e,t,r,n){return{type:2,lower:e,upper:t,lowerOpen:r,upperOpen:n}}function Zt(e){return{type:1,lower:e,upper:e}}class Ht{get Collection(){return this._ctx.table.db.Collection}between(e,t,r,n){r=!1!==r,n=!0===n;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(r||n)&&(!r||!n)?zt(this):new this.Collection(this,(()=>Vt(e,t,!r,!n)))}catch(e){return $t(this,yt)}}equals(e){return null==e?$t(this,yt):new this.Collection(this,(()=>Zt(e)))}above(e){return null==e?$t(this,yt):new this.Collection(this,(()=>Vt(e,void 0,!0)))}aboveOrEqual(e){return null==e?$t(this,yt):new this.Collection(this,(()=>Vt(e,void 0,!1)))}below(e){return null==e?$t(this,yt):new this.Collection(this,(()=>Vt(void 0,e,!1,!0)))}belowOrEqual(e){return null==e?$t(this,yt):new this.Collection(this,(()=>Vt(void 0,e)))}startsWith(e){return"string"!=typeof e?$t(this,"String expected."):this.between(e,e+dt,!0,!0)}startsWithIgnoreCase(e){return""===e?this.startsWith(e):qt(this,((e,t)=>0===e.indexOf(t[0])),[e],dt)}equalsIgnoreCase(e){return qt(this,((e,t)=>e===t[0]),[e],"")}anyOfIgnoreCase(){var e=D.apply(N,arguments);return 0===e.length?zt(this):qt(this,((e,t)=>-1!==t.indexOf(e)),e,"")}startsWithAnyOfIgnoreCase(){var e=D.apply(N,arguments);return 0===e.length?zt(this):qt(this,((e,t)=>t.some((t=>0===e.indexOf(t)))),e,dt)}anyOf(){const e=D.apply(N,arguments);let t=this._cmp;try{e.sort(t)}catch(e){return $t(this,yt)}if(0===e.length)return zt(this);const r=new this.Collection(this,(()=>Vt(e[0],e[e.length-1])));r._ondirectionchange=r=>{t="next"===r?this._ascending:this._descending,e.sort(t)};let n=0;return r._addAlgorithm(((r,o,i)=>{const a=r.key;for(;t(a,e[n])>0;)if(++n,n===e.length)return o(i),!1;return 0===t(a,e[n])||(o((()=>{r.continue(e[n])})),!1)})),r}notEqual(e){return this.inAnyRange([[-1/0,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){const e=D.apply(N,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return $t(this,yt)}const t=e.reduce(((e,t)=>e?e.concat([[e[e.length-1][1],t]]):[[-1/0,t]]),null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})}inAnyRange(e,t){const r=this._cmp,n=this._ascending,o=this._descending,i=this._min,a=this._max;if(0===e.length)return zt(this);if(!e.every((e=>void 0!==e[0]&&void 0!==e[1]&&n(e[0],e[1])<=0)))return $t(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",Q.InvalidArgument);const s=!t||!1!==t.includeLowers,u=t&&!0===t.includeUppers;let l,c=n;function f(e,t){return c(e[0],t[0])}try{l=e.reduce((function(e,t){let n=0,o=e.length;for(;n<o;++n){const o=e[n];if(r(t[0],o[1])<0&&r(t[1],o[0])>0){o[0]=i(o[0],t[0]),o[1]=a(o[1],t[1]);break}}return n===o&&e.push(t),e}),[]),l.sort(f)}catch(e){return $t(this,yt)}let h=0;const p=u?e=>n(e,l[h][1])>0:e=>n(e,l[h][1])>=0,d=s?e=>o(e,l[h][0])>0:e=>o(e,l[h][0])>=0;let y=p;const g=new this.Collection(this,(()=>Vt(l[0][0],l[l.length-1][1],!s,!u)));return g._ondirectionchange=e=>{"next"===e?(y=p,c=n):(y=d,c=o),l.sort(f)},g._addAlgorithm(((e,t,r)=>{for(var o=e.key;y(o);)if(++h,h===l.length)return t(r),!1;return!!function(e){return!p(e)&&!d(e)}(o)||(0===this._cmp(o,l[h][1])||0===this._cmp(o,l[h][0])||t((()=>{c===n?e.continue(l[h][0]):e.continue(l[h][1])})),!1)})),g}startsWithAnyOf(){const e=D.apply(N,arguments);return e.every((e=>"string"==typeof e))?0===e.length?zt(this):this.inAnyRange(e.map((e=>[e,e+dt]))):$t(this,"startsWithAnyOf() only works with strings")}}function Wt(e){return Ze((function(t){return Jt(t),e(t.target.error),!1}))}function Jt(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}const Gt=At(null,"storagemutated");class Yt{_lock(){return m(!je.global),++this._reculock,1!==this._reculock||je.global||(je.lockOwnerFor=this),this}_unlock(){if(m(!je.global),0==--this._reculock)for(je.global||(je.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{st(e[1],e[0])}catch(e){}}return this}_locked(){return this._reculock&&je.lockOwnerFor!==this}create(e){if(!this.mode)return this;const t=this.db.idbdb,r=this.db._state.dbOpenError;if(m(!this.idbtrans),!e&&!t)switch(r&&r.name){case"DatabaseClosedError":throw new Q.DatabaseClosed(r);case"MissingAPIError":throw new Q.MissingAPI(r.message,r);default:throw new Q.OpenFailed(r)}if(!this.active)throw new Q.TransactionInactive;return m(null===this._completion._state),(e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):t.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=Ze((t=>{Jt(t),this._reject(e.error)})),e.onabort=Ze((t=>{Jt(t),this.active&&this._reject(new Q.Abort(e.error)),this.active=!1,this.on("abort").fire(t)})),e.oncomplete=Ze((()=>{this.active=!1,this._resolve(),"mutatedParts"in e&&Gt.storagemutated.fire(e.mutatedParts)})),this}_promise(e,t,r){if("readwrite"===e&&"readwrite"!==this.mode)return ht(new Q.ReadOnly("Transaction is readonly"));if(!this.active)return ht(new Q.TransactionInactive);if(this._locked())return new Re(((n,o)=>{this._blockedFuncs.push([()=>{this._promise(e,t,r).then(n,o)},je])}));if(r)return Xe((()=>{var e=new Re(((e,r)=>{this._lock();const n=t(e,r,this);n&&n.then&&n.then(e,r)}));return e.finally((()=>this._unlock())),e._lib=!0,e}));var n=new Re(((e,r)=>{var n=t(e,r,this);n&&n.then&&n.then(e,r)}));return n._lib=!0,n}_root(){return this.parent?this.parent._root():this}waitFor(e){var t=this._root();const r=Re.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then((()=>r));else{t._waitingFor=r,t._waitingQueue=[];var n=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(n.get(-1/0).onsuccess=e)}()}var o=t._waitingFor;return new Re(((e,n)=>{r.then((r=>t._waitingQueue.push(Ze(e.bind(null,r)))),(e=>t._waitingQueue.push(Ze(n.bind(null,e))))).finally((()=>{t._waitingFor===o&&(t._waitingFor=null)}))}))}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new Q.Abort))}table(e){const t=this._memoizedTables||(this._memoizedTables={});if(s(t,e))return t[e];const r=this.schema[e];if(!r)throw new Q.NotFound("Table "+e+" not part of transaction");const n=new this.db.Table(e,r,this);return n.core=this.db.core.table(e),t[e]=n,n}}function Qt(e,t,r,n,o,i,a){return{name:e,keyPath:t,unique:r,multi:n,auto:o,compound:i,src:(r&&!a?"&":"")+(n?"*":"")+(o?"++":"")+Xt(t)}}function Xt(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function er(e,t,r){return{name:e,primKey:t,indexes:r,mappedClass:null,idxByName:b(r,(e=>[e.name,e]))}}let tr=e=>{try{return e.only([[]]),tr=()=>[[]],[[]]}catch(e){return tr=()=>dt,dt}};function rr(e){return null==e?()=>{}:"string"==typeof e?function(e){return 1===e.split(".").length?t=>t[e]:t=>w(t,e)}(e):t=>w(t,e)}function nr(e){return[].slice.call(e)}let or=0;function ir(e){return null==e?":id":"string"==typeof e?e:`[${e.join("+")}]`}function ar(e,t,r){function o(e){if(3===e.type)return null;if(4===e.type)throw new Error("Cannot convert never type to IDBKeyRange");const{lower:r,upper:n,lowerOpen:o,upperOpen:i}=e;return void 0===r?void 0===n?null:t.upperBound(n,!!i):void 0===n?t.lowerBound(r,!!o):t.bound(r,n,!!o,!!i)}const{schema:i,hasGetAll:a}=function(e,t){const r=nr(e.objectStoreNames);return{schema:{name:e.name,tables:r.map((e=>t.objectStore(e))).map((e=>{const{keyPath:t,autoIncrement:r}=e,o=n(t),i=null==t,a={},s={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:i,compound:o,keyPath:t,autoIncrement:r,unique:!0,extractKey:rr(t)},indexes:nr(e.indexNames).map((t=>e.index(t))).map((e=>{const{name:t,unique:r,multiEntry:o,keyPath:i}=e,s={name:t,compound:n(i),keyPath:i,unique:r,multiEntry:o,extractKey:rr(i)};return a[ir(i)]=s,s})),getIndexByKeyPath:e=>a[ir(e)]};return a[":id"]=s.primaryKey,null!=t&&(a[ir(t)]=s.primaryKey),s}))},hasGetAll:r.length>0&&"getAll"in t.objectStore(r[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}(e,r),s=i.tables.map((e=>function(e){const t=e.name;return{name:t,schema:e,mutate:function({trans:e,type:r,keys:n,values:i,range:a}){return new Promise(((s,u)=>{s=Ze(s);const l=e.objectStore(t),c=null==l.keyPath,f="put"===r||"add"===r;if(!f&&"delete"!==r&&"deleteRange"!==r)throw new Error("Invalid operation type: "+r);const{length:h}=n||i||{length:1};if(n&&i&&n.length!==i.length)throw new Error("Given keys array must have same length as given values array.");if(0===h)return s({numFailures:0,failures:{},results:[],lastResult:void 0});let p;const d=[],y=[];let g=0;const m=e=>{++g,Jt(e)};if("deleteRange"===r){if(4===a.type)return s({numFailures:g,failures:y,results:[],lastResult:void 0});3===a.type?d.push(p=l.clear()):d.push(p=l.delete(o(a)))}else{const[e,t]=f?c?[i,n]:[i,null]:[n,null];if(f)for(let n=0;n<h;++n)d.push(p=t&&void 0!==t[n]?l[r](e[n],t[n]):l[r](e[n])),p.onerror=m;else for(let t=0;t<h;++t)d.push(p=l[r](e[t])),p.onerror=m}const v=e=>{const t=e.target.result;d.forEach(((e,t)=>null!=e.error&&(y[t]=e.error))),s({numFailures:g,failures:y,results:"delete"===r?n:d.map((e=>e.result)),lastResult:t})};p.onerror=e=>{m(e),v(e)},p.onsuccess=v}))},getMany:({trans:e,keys:r})=>new Promise(((n,o)=>{n=Ze(n);const i=e.objectStore(t),a=r.length,s=new Array(a);let u,l=0,c=0;const f=e=>{const t=e.target;s[t._pos]=t.result,++c===l&&n(s)},h=Wt(o);for(let e=0;e<a;++e)null!=r[e]&&(u=i.get(r[e]),u._pos=e,u.onsuccess=f,u.onerror=h,++l);0===l&&n(s)})),get:({trans:e,key:r})=>new Promise(((n,o)=>{n=Ze(n);const i=e.objectStore(t).get(r);i.onsuccess=e=>n(e.target.result),i.onerror=Wt(o)})),query:function(e){return r=>new Promise(((n,i)=>{n=Ze(n);const{trans:a,values:s,limit:u,query:l}=r,c=u===1/0?void 0:u,{index:f,range:h}=l,p=a.objectStore(t),d=f.isPrimaryKey?p:p.index(f.name),y=o(h);if(0===u)return n({result:[]});if(e){const e=s?d.getAll(y,c):d.getAllKeys(y,c);e.onsuccess=e=>n({result:e.target.result}),e.onerror=Wt(i)}else{let e=0;const t=s||!("openKeyCursor"in d)?d.openCursor(y):d.openKeyCursor(y),r=[];t.onsuccess=o=>{const i=t.result;return i?(r.push(s?i.value:i.primaryKey),++e===u?n({result:r}):void i.continue()):n({result:r})},t.onerror=Wt(i)}}))}(a),openCursor:function({trans:e,values:r,query:n,reverse:i,unique:a}){return new Promise(((s,u)=>{s=Ze(s);const{index:l,range:c}=n,f=e.objectStore(t),h=l.isPrimaryKey?f:f.index(l.name),p=i?a?"prevunique":"prev":a?"nextunique":"next",d=r||!("openKeyCursor"in h)?h.openCursor(o(c),p):h.openKeyCursor(o(c),p);d.onerror=Wt(u),d.onsuccess=Ze((t=>{const r=d.result;if(!r)return void s(null);r.___id=++or,r.done=!1;const n=r.continue.bind(r);let o=r.continuePrimaryKey;o&&(o=o.bind(r));const i=r.advance.bind(r),a=()=>{throw new Error("Cursor not stopped")};r.trans=e,r.stop=r.continue=r.continuePrimaryKey=r.advance=()=>{throw new Error("Cursor not started")},r.fail=Ze(u),r.next=function(){let e=1;return this.start((()=>e--?this.continue():this.stop())).then((()=>this))},r.start=e=>{const t=new Promise(((e,t)=>{e=Ze(e),d.onerror=Wt(t),r.fail=t,r.stop=t=>{r.stop=r.continue=r.continuePrimaryKey=r.advance=a,e(t)}})),s=()=>{if(d.result)try{e()}catch(e){r.fail(e)}else r.done=!0,r.start=()=>{throw new Error("Cursor behind last entry")},r.stop()};return d.onsuccess=Ze((e=>{d.onsuccess=s,s()})),r.continue=n,r.continuePrimaryKey=o,r.advance=i,s(),t},s(r)}),u)}))},count({query:e,trans:r}){const{index:n,range:i}=e;return new Promise(((e,a)=>{const s=r.objectStore(t),u=n.isPrimaryKey?s:s.index(n.name),l=o(i),c=l?u.count(l):u.count();c.onsuccess=Ze((t=>e(t.target.result))),c.onerror=Wt(a)}))}}}(e))),u={};return s.forEach((e=>u[e.name]=e)),{stack:"dbcore",transaction:e.transaction.bind(e),table(e){if(!u[e])throw new Error(`Table '${e}' not found`);return u[e]},MIN_KEY:-1/0,MAX_KEY:tr(t),schema:i}}function sr({_novip:e},t){const r=t.db,n=function(e,t,{IDBKeyRange:r,indexedDB:n},o){const i=function(e,t){return t.reduce(((e,{create:t})=>({...e,...t(e)})),e)}(ar(t,r,o),e.dbcore);return{dbcore:i}}(e._middlewares,r,e._deps,t);e.core=n.dbcore,e.tables.forEach((t=>{const r=t.name;e.core.schema.tables.some((e=>e.name===r))&&(t.core=e.core.table(r),e[r]instanceof e.Table&&(e[r].core=t.core))}))}function ur({_novip:e},t,r,n){r.forEach((r=>{const o=n[r];t.forEach((t=>{const n=p(t,r);(!n||"value"in n&&void 0===n.value)&&(t===e.Transaction.prototype||t instanceof e.Transaction?c(t,r,{get(){return this.table(r)},set(e){l(this,r,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):t[r]=new e.Table(r,o))}))}))}function lr({_novip:e},t){t.forEach((t=>{for(let r in t)t[r]instanceof e.Table&&delete t[r]}))}function cr(e,t){return e._cfg.version-t._cfg.version}function fr(e,r,n,o){const i=e._dbSchema,a=e._createTransaction("readwrite",e._storeNames,i);a.create(n),a._completion.catch(o);const s=a._reject.bind(a),u=je.transless||je;Xe((()=>{je.trans=a,je.transless=u,0===r?(t(i).forEach((e=>{pr(n,e,i[e].primKey,i[e].indexes)})),sr(e,n),Re.follow((()=>e.on.populate.fire(a))).catch(s)):function({_novip:e},r,n,o){const i=[],a=e._versions;let s=e._dbSchema=yr(0,e.idbdb,o),u=!1;return a.filter((e=>e._cfg.version>=r)).forEach((a=>{i.push((()=>{const i=s,l=a._cfg.dbschema;gr(e,i,o),gr(e,l,o),s=e._dbSchema=l;const c=hr(i,l);c.add.forEach((e=>{pr(o,e[0],e[1].primKey,e[1].indexes)})),c.change.forEach((e=>{if(e.recreate)throw new Q.Upgrade("Not yet support for changing primary key");{const t=o.objectStore(e.name);e.add.forEach((e=>dr(t,e))),e.change.forEach((e=>{t.deleteIndex(e.name),dr(t,e)})),e.del.forEach((e=>t.deleteIndex(e)))}}));const f=a._cfg.contentUpgrade;if(f&&a._cfg.version>r){sr(e,o),n._memoizedTables={},u=!0;let r=k(l);c.del.forEach((e=>{r[e]=i[e]})),lr(e,[e.Transaction.prototype]),ur(e,[e.Transaction.prototype],t(r),r),n.schema=r;const a=T(f);let s;a&&et();const h=Re.follow((()=>{if(s=f(n),s&&a){var e=tt.bind(null,null);s.then(e,e)}}));return s&&"function"==typeof s.then?Re.resolve(s):h.then((()=>s))}})),i.push((t=>{u&&vt||function(e,t){[].slice.call(t.db.objectStoreNames).forEach((r=>null==e[r]&&t.db.deleteObjectStore(r)))}(a._cfg.dbschema,t),lr(e,[e.Transaction.prototype]),ur(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),n.schema=e._dbSchema}))})),function e(){return i.length?Re.resolve(i.shift()(n.idbtrans)).then(e):Re.resolve()}().then((()=>{var e,r;r=o,t(e=s).forEach((t=>{r.db.objectStoreNames.contains(t)||pr(r,t,e[t].primKey,e[t].indexes)}))}))}(e,r,a,n).catch(s)}))}function hr(e,t){const r={del:[],add:[],change:[]};let n;for(n in e)t[n]||r.del.push(n);for(n in t){const o=e[n],i=t[n];if(o){const e={name:n,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")!=""+(i.primKey.keyPath||"")||o.primKey.auto!==i.primKey.auto&&!mt)e.recreate=!0,r.change.push(e);else{const t=o.idxByName,n=i.idxByName;let a;for(a in t)n[a]||e.del.push(a);for(a in n){const r=t[a],o=n[a];r?r.src!==o.src&&e.change.push(o):e.add.push(o)}(e.del.length>0||e.add.length>0||e.change.length>0)&&r.change.push(e)}}else r.add.push([n,i])}return r}function pr(e,t,r,n){const o=e.db.createObjectStore(t,r.keyPath?{keyPath:r.keyPath,autoIncrement:r.auto}:{autoIncrement:r.auto});return n.forEach((e=>dr(o,e))),o}function dr(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function yr(e,t,r){const n={};return y(t.objectStoreNames,0).forEach((e=>{const t=r.objectStore(e);let o=t.keyPath;const i=Qt(Xt(o),o||"",!1,!1,!!t.autoIncrement,o&&"string"!=typeof o,!0),a=[];for(let e=0;e<t.indexNames.length;++e){const r=t.index(t.indexNames[e]);o=r.keyPath;var s=Qt(r.name,o,!!r.unique,!!r.multiEntry,!1,o&&"string"!=typeof o,!1);a.push(s)}n[e]=er(e,i,a)})),n}function gr({_novip:t},r,n){const o=n.db.objectStoreNames;for(let e=0;e<o.length;++e){const i=o[e],a=n.objectStore(i);t._hasGetAll="getAll"in a;for(let e=0;e<a.indexNames.length;++e){const t=a.indexNames[e],n=a.index(t).keyPath,o="string"==typeof n?n:"["+y(n).join("+")+"]";if(r[i]){const e=r[i].idxByName[o];e&&(e.name=t,delete r[i].idxByName[o],r[i].idxByName[t]=e)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&e.WorkerGlobalScope&&e instanceof e.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(t._hasGetAll=!1)}class mr{_parseStoresSpec(e,r){t(e).forEach((t=>{if(null!==e[t]){var o=e[t].split(",").map(((e,t)=>{const r=(e=e.trim()).replace(/([&*]|\+\+)/g,""),o=/^\[/.test(r)?r.match(/^\[(.*)\]$/)[1].split("+"):r;return Qt(r,o||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),n(o),0===t)})),i=o.shift();if(i.multi)throw new Q.Schema("Primary key cannot be multi-valued");o.forEach((e=>{if(e.auto)throw new Q.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new Q.Schema("Index must have a name and cannot be an empty string")})),r[t]=er(t,i,o)}}))}stores(e){const r=this.db;this._cfg.storesSource=this._cfg.storesSource?o(this._cfg.storesSource,e):e;const n=r._versions,i={};let a={};return n.forEach((e=>{o(i,e._cfg.storesSource),a=e._cfg.dbschema={},e._parseStoresSpec(i,a)})),r._dbSchema=a,lr(r,[r._allTables,r,r.Transaction.prototype]),ur(r,[r._allTables,r,r.Transaction.prototype,this._cfg.tables],t(a),a),r._storeNames=t(a),this}upgrade(e){return this._cfg.contentUpgrade=le(this._cfg.contentUpgrade||te,e),this}}function vr(e,t){let r=e._dbNamesDB;return r||(r=e._dbNamesDB=new Br("__dbnames",{addons:[],indexedDB:e,IDBKeyRange:t}),r.version(1).stores({dbnames:"name"})),r.table("dbnames")}function br(e){return e&&"function"==typeof e.databases}function wr(e){return Xe((function(){return je.letThrough=!0,e()}))}function xr(){var e;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise((function(t){var r=function(){return indexedDB.databases().finally(t)};e=setInterval(r,100),r()})).finally((function(){return clearInterval(e)})):Promise.resolve()}function kr(e){var t=t=>e.next(t),r=i(t),o=i((t=>e.throw(t)));function i(e){return t=>{var i=e(t),a=i.value;return i.done?a:a&&"function"==typeof a.then?a.then(r,o):n(a)?Promise.all(a).then(r,o):r(a)}}return i(t)()}function Sr(e,t,r){var n=arguments.length;if(n<2)throw new Q.InvalidArgument("Too few arguments");for(var o=new Array(n-1);--n;)o[n-1]=arguments[n];return r=o.pop(),[e,O(o),r]}function Or(e,t,r,n,o){return Re.resolve().then((()=>{const i=je.transless||je,a=e._createTransaction(t,r,e._dbSchema,n),s={trans:a,transless:i};if(n)a.idbtrans=n.idbtrans;else try{a.create(),e._state.PR1398_maxLoop=3}catch(n){return n.name===G.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((()=>Or(e,t,r,null,o)))):ht(n)}const u=T(o);let l;u&&et();const c=Re.follow((()=>{if(l=o.call(a,a),l)if(u){var e=tt.bind(null,null);l.then(e,e)}else"function"==typeof l.next&&"function"==typeof l.throw&&(l=kr(l))}),s);return(l&&"function"==typeof l.then?Re.resolve(l).then((e=>a.active?e:ht(new Q.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn")))):c.then((()=>l))).then((e=>(n&&a._resolve(),a._completion.then((()=>e))))).catch((e=>(a._reject(e),ht(e))))}))}function Ar(e,t,r){const o=n(e)?e.slice():[e];for(let e=0;e<r;++e)o.push(t);return o}const _r={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return{...e,table(t){const r=e.table(t),{schema:n}=r,o={},i=[];function a(e,t,r){const n=ir(e),s=o[n]=o[n]||[],u=null==e?0:"string"==typeof e?1:e.length,l=t>0,c={...r,isVirtual:l,keyTail:t,keyLength:u,extractKey:rr(e),unique:!l&&r.unique};return s.push(c),c.isPrimaryKey||i.push(c),u>1&&a(2===u?e[0]:e.slice(0,u-1),t+1,r),s.sort(((e,t)=>e.keyTail-t.keyTail)),c}const s=a(n.primaryKey.keyPath,0,n.primaryKey);o[":id"]=[s];for(const e of n.indexes)a(e.keyPath,0,e);function u(t){const r=t.query.index;return r.isVirtual?{...t,query:{index:r,range:(n=t.query.range,o=r.keyTail,{type:1===n.type?2:n.type,lower:Ar(n.lower,n.lowerOpen?e.MAX_KEY:e.MIN_KEY,o),lowerOpen:!0,upper:Ar(n.upper,n.upperOpen?e.MIN_KEY:e.MAX_KEY,o),upperOpen:!0})}}:t;var n,o}const l={...r,schema:{...n,primaryKey:s,indexes:i,getIndexByKeyPath:function(e){const t=o[ir(e)];return t&&t[0]}},count:e=>r.count(u(e)),query:e=>r.query(u(e)),openCursor(t){const{keyTail:n,isVirtual:o,keyLength:i}=t.query.index;return o?r.openCursor(u(t)).then((r=>r&&function(r){const o=Object.create(r,{continue:{value:function(o){null!=o?r.continue(Ar(o,t.reverse?e.MAX_KEY:e.MIN_KEY,n)):t.unique?r.continue(r.key.slice(0,i).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,n)):r.continue()}},continuePrimaryKey:{value(t,o){r.continuePrimaryKey(Ar(t,e.MAX_KEY,n),o)}},primaryKey:{get:()=>r.primaryKey},key:{get(){const e=r.key;return 1===i?e[0]:e.slice(0,i)}},value:{get:()=>r.value}});return o}(r))):r.openCursor(t)}};return l}}}};function jr(e,r,n,o){return n=n||{},o=o||"",t(e).forEach((t=>{if(s(r,t)){var i=e[t],a=r[t];if("object"==typeof i&&"object"==typeof a&&i&&a){const e=R(i);e!==R(a)?n[o+t]=r[t]:"Object"===e?jr(i,a,n,o+t+"."):i!==a&&(n[o+t]=r[t])}else i!==a&&(n[o+t]=r[t])}else n[o+t]=void 0})),t(r).forEach((t=>{s(e,t)||(n[o+t]=r[t])})),n}const Pr={stack:"dbcore",name:"HooksMiddleware",level:2,create:e=>({...e,table(t){const r=e.table(t),{primaryKey:n}=r.schema,o={...r,mutate(e){const o=je.trans,{deleting:i,creating:a,updating:u}=o.table(t).hook;switch(e.type){case"add":if(a.fire===te)break;return o._promise("readwrite",(()=>l(e)),!0);case"put":if(a.fire===te&&u.fire===te)break;return o._promise("readwrite",(()=>l(e)),!0);case"delete":if(i.fire===te)break;return o._promise("readwrite",(()=>l(e)),!0);case"deleteRange":if(i.fire===te)break;return o._promise("readwrite",(()=>function(e){return c(e.trans,e.range,1e4)}(e)),!0)}return r.mutate(e);function l(e){const t=je.trans,o=e.keys||function(e,t){return"delete"===t.type?t.keys:t.keys||t.values.map(e.extractKey)}(n,e);if(!o)throw new Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?{...e,keys:o}:{...e}).type&&(e.values=[...e.values]),e.keys&&(e.keys=[...e.keys]),function(e,t,r){return"add"===t.type?Promise.resolve([]):e.getMany({trans:t.trans,keys:r,cache:"immutable"})}(r,e,o).then((l=>{const c=o.map(((r,o)=>{const c=l[o],f={onerror:null,onsuccess:null};if("delete"===e.type)i.fire.call(f,r,c,t);else if("add"===e.type||void 0===c){const i=a.fire.call(f,r,e.values[o],t);null==r&&null!=i&&(r=i,e.keys[o]=r,n.outbound||x(e.values[o],n.keyPath,r))}else{const n=jr(c,e.values[o]),i=u.fire.call(f,n,r,c,t);if(i){const t=e.values[o];Object.keys(i).forEach((e=>{s(t,e)?t[e]=i[e]:x(t,e,i[e])}))}}return f}));return r.mutate(e).then((({failures:t,results:r,numFailures:n,lastResult:i})=>{for(let n=0;n<o.length;++n){const i=r?r[n]:o[n],a=c[n];null==i?a.onerror&&a.onerror(t[n]):a.onsuccess&&a.onsuccess("put"===e.type&&l[n]?e.values[n]:i)}return{failures:t,results:r,numFailures:n,lastResult:i}})).catch((e=>(c.forEach((t=>t.onerror&&t.onerror(e))),Promise.reject(e))))}))}function c(e,t,o){return r.query({trans:e,values:!1,query:{index:n,range:t},limit:o}).then((({result:r})=>l({type:"delete",keys:r,trans:e}).then((n=>n.numFailures>0?Promise.reject(n.failures[0]):r.length<o?{failures:[],numFailures:0,lastResult:void 0}:c(e,{...t,lower:r[r.length-1],lowerOpen:!0},o)))))}}};return o}})};function Er(e,t,r){try{if(!t)return null;if(t.keys.length<e.length)return null;const n=[];for(let o=0,i=0;o<t.keys.length&&i<e.length;++o)0===Nt(t.keys[o],e[i])&&(n.push(r?P(t.values[o]):t.values[o]),++i);return n.length===e.length?n:null}catch(e){return null}}const Fr={stack:"dbcore",level:-1,create:e=>({table:t=>{const r=e.table(t);return{...r,getMany:e=>{if(!e.cache)return r.getMany(e);const t=Er(e.keys,e.trans._cache,"clone"===e.cache);return t?Re.resolve(t):r.getMany(e).then((t=>(e.trans._cache={keys:e.keys,values:"clone"===e.cache?P(t):t},t)))},mutate:e=>("add"!==e.type&&(e.trans._cache=null),r.mutate(e))}}})};function Rr(e){return!("from"in e)}const Cr=function(e,t){if(!this){const t=new Cr;return e&&"d"in e&&o(t,e),t}o(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function Ir(e,t,r){const n=Nt(t,r);if(isNaN(n))return;if(n>0)throw RangeError();if(Rr(e))return o(e,{from:t,to:r,d:1});const i=e.l,a=e.r;if(Nt(r,e.from)<0)return i?Ir(i,t,r):e.l={from:t,to:r,d:1,l:null,r:null},Tr(e);if(Nt(t,e.to)>0)return a?Ir(a,t,r):e.r={from:t,to:r,d:1,l:null,r:null},Tr(e);Nt(t,e.from)<0&&(e.from=t,e.l=null,e.d=a?a.d+1:1),Nt(r,e.to)>0&&(e.to=r,e.r=null,e.d=e.l?e.l.d+1:1);const s=!e.r;i&&!e.l&&Nr(e,i),a&&s&&Nr(e,a)}function Nr(e,t){Rr(t)||function e(t,{from:r,to:n,l:o,r:i}){Ir(t,r,n),o&&e(t,o),i&&e(t,i)}(e,t)}function Dr(e){let t=Rr(e)?null:{s:0,n:e};return{next(e){const r=arguments.length>0;for(;t;)switch(t.s){case 0:if(t.s=1,r)for(;t.n.l&&Nt(e,t.n.from)<0;)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!r||Nt(e,t.n.to)<=0)return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function Tr(e){var t,r;const n=((null===(t=e.r)||void 0===t?void 0:t.d)||0)-((null===(r=e.l)||void 0===r?void 0:r.d)||0),o=n>1?"r":n<-1?"l":"";if(o){const t="r"===o?"l":"r",r={...e},n=e[o];e.from=n.from,e.to=n.to,e[o]=n[o],r[o]=n[t],e[t]=r,r.d=Lr(r)}e.d=Lr(e)}function Lr({r:e,l:t}){return(e?t?Math.max(e.d,t.d):e.d:t?t.d:0)+1}u(Cr.prototype,{add(e){return Nr(this,e),this},addKey(e){return Ir(this,e,e),this},addKeys(e){return e.forEach((e=>Ir(this,e,e))),this},[C](){return Dr(this)}});const Mr={stack:"dbcore",level:0,create:e=>{const r=e.schema.name,o=new Cr(e.MIN_KEY,e.MAX_KEY);return{...e,table:i=>{const a=e.table(i),{schema:s}=a,{primaryKey:u}=s,{extractKey:l,outbound:c}=u,f={...a,mutate:e=>{const t=e.trans,u=t.mutatedParts||(t.mutatedParts={}),l=e=>{const t=`idb://${r}/${i}/${e}`;return u[t]||(u[t]=new Cr)},c=l(""),f=l(":dels"),{type:h}=e;let[p,d]="deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[];const y=e.trans._cache;return a.mutate(e).then((e=>{if(n(p)){"delete"!==h&&(p=e.results),c.addKeys(p);const t=Er(p,y);t||"add"===h||f.addKeys(p),(t||d)&&function(e,t,r,o){t.indexes.forEach((function(t){const i=e(t.name||"");function a(e){return null!=e?t.extractKey(e):null}const s=e=>t.multiEntry&&n(e)?e.forEach((e=>i.addKey(e))):i.addKey(e);(r||o).forEach(((e,t)=>{const n=r&&a(r[t]),i=o&&a(o[t]);0!==Nt(n,i)&&(null!=n&&s(n),null!=i&&s(i))}))}))}(l,s,t,d)}else if(p){const e={from:p.lower,to:p.upper};f.add(e),c.add(e)}else c.add(o),f.add(o),s.indexes.forEach((e=>l(e.name).add(o)));return e}))}},h=({query:{index:t,range:r}})=>{var n,o;return[t,new Cr(null!==(n=r.lower)&&void 0!==n?n:e.MIN_KEY,null!==(o=r.upper)&&void 0!==o?o:e.MAX_KEY)]},p={get:e=>[u,new Cr(e.key)],getMany:e=>[u,(new Cr).addKeys(e.keys)],count:h,query:h,openCursor:h};return t(p).forEach((e=>{f[e]=function(t){const{subscr:n}=je;if(n){const s=e=>{const t=`idb://${r}/${i}/${e}`;return n[t]||(n[t]=new Cr)},u=s(""),f=s(":dels"),[h,d]=p[e](t);if(s(h.name||"").add(d),!h.isPrimaryKey){if("count"!==e){const r="query"===e&&c&&t.values&&a.query({...t,values:!1});return a[e].apply(this,arguments).then((n=>{if("query"===e){if(c&&t.values)return r.then((({result:e})=>(u.addKeys(e),n)));const e=t.values?n.result.map(l):n.result;t.values?u.addKeys(e):f.addKeys(e)}else if("openCursor"===e){const e=n,r=t.values;return e&&Object.create(e,{key:{get:()=>(f.addKey(e.primaryKey),e.key)},primaryKey:{get(){const t=e.primaryKey;return f.addKey(t),t}},value:{get:()=>(r&&u.addKey(e.primaryKey),e.value)}})}return n}))}f.add(o)}}return a[e].apply(this,arguments)}})),f}}}};class Br{constructor(e,t){this._middlewares={},this.verno=0;const r=Br.dependencies;this._options=t={addons:Br.addons,autoOpen:!0,indexedDB:r.indexedDB,IDBKeyRange:r.IDBKeyRange,...t},this._deps={indexedDB:t.indexedDB,IDBKeyRange:t.IDBKeyRange};const{addons:n}=t;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;const o={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:te,dbReadyPromise:null,cancelOpen:te,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};var i;o.dbReadyPromise=new Re((e=>{o.dbReadyResolve=e})),o.openCanceller=new Re(((e,t)=>{o.cancelOpen=t})),this._state=o,this.name=e,this.on=At(this,"populate","blocked","versionchange","close",{ready:[le,te]}),this.on.ready.subscribe=g(this.on.ready.subscribe,(e=>(t,r)=>{Br.vip((()=>{const n=this._state;if(n.openComplete)n.dbOpenError||Re.resolve().then(t),r&&e(t);else if(n.onReadyBeingFired)n.onReadyBeingFired.push(t),r&&e(t);else{e(t);const n=this;r||e((function e(){n.on.ready.unsubscribe(t),n.on.ready.unsubscribe(e)}))}}))})),this.Collection=(i=this,_t(Lt.prototype,(function(e,t){this.db=i;let r=kt,n=null;if(t)try{r=t()}catch(e){n=e}const o=e._ctx,a=o.table,s=a.hook.reading.fire;this._ctx={table:a,index:o.index,isPrimKey:!o.index||a.schema.primKey.keyPath&&o.index===a.schema.primKey.name,range:r,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:n,or:o.or,valueMapper:s!==re?s:null}}))),this.Table=function(e){return _t(Ot.prototype,(function(t,r,n){this.db=e,this._tx=n,this.name=t,this.schema=r,this.hook=e._allTables[t]?e._allTables[t].hook:At(null,{creating:[ie,te],reading:[ne,re],updating:[se,te],deleting:[ae,te]})}))}(this),this.Transaction=function(e){return _t(Yt.prototype,(function(t,r,n,o,i){this.db=e,this.mode=t,this.storeNames=r,this.schema=n,this.chromeTransactionDurability=o,this.idbtrans=null,this.on=At(this,"complete","error","abort"),this.parent=i||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new Re(((e,t)=>{this._resolve=e,this._reject=t})),this._completion.then((()=>{this.active=!1,this.on.complete.fire()}),(e=>{var t=this.active;return this.active=!1,this.on.error.fire(e),this.parent?this.parent._reject(e):t&&this.idbtrans&&this.idbtrans.abort(),ht(e)}))}))}(this),this.Version=function(e){return _t(mr.prototype,(function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}(this),this.WhereClause=function(e){return _t(Ht.prototype,(function(t,r,n){this.db=e,this._ctx={table:t,index:":id"===r?null:r,or:n};const o=e._deps.indexedDB;if(!o)throw new Q.MissingAPI;this._cmp=this._ascending=o.cmp.bind(o),this._descending=(e,t)=>o.cmp(t,e),this._max=(e,t)=>o.cmp(e,t)>0?e:t,this._min=(e,t)=>o.cmp(e,t)<0?e:t,this._IDBKeyRange=e._deps.IDBKeyRange}))}(this),this.on("versionchange",(e=>{e.newVersion>0?console.warn(`Another connection wants to upgrade database '${this.name}'. Closing db now to resume the upgrade.`):console.warn(`Another connection wants to delete database '${this.name}'. Closing db now to resume the delete request.`),this.close()})),this.on("blocked",(e=>{!e.newVersion||e.newVersion<e.oldVersion?console.warn(`Dexie.delete('${this.name}') was blocked`):console.warn(`Upgrade '${this.name}' blocked by other connection holding version ${e.oldVersion/10}`)})),this._maxKey=tr(t.IDBKeyRange),this._createTransaction=(e,t,r,n)=>new this.Transaction(e,t,r,this._options.chromeTransactionDurability,n),this._fireOnBlocked=e=>{this.on("blocked").fire(e),gt.filter((e=>e.name===this.name&&e!==this&&!e._state.vcFired)).map((t=>t.on("versionchange").fire(e)))},this.use(_r),this.use(Pr),this.use(Mr),this.use(Fr),this.vip=Object.create(this,{_vip:{value:!0}}),n.forEach((e=>e(this)))}version(e){if(isNaN(e)||e<.1)throw new Q.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new Q.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);const t=this._versions;var r=t.filter((t=>t._cfg.version===e))[0];return r||(r=new this.Version(e),t.push(r),t.sort(cr),r.stores({}),this._state.autoSchema=!1,r)}_whenReady(e){return this.idbdb&&(this._state.openComplete||je.letThrough||this._vip)?e():new Re(((e,t)=>{if(this._state.openComplete)return t(new Q.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void t(new Q.DatabaseClosed);this.open().catch(te)}this._state.dbReadyPromise.then(e,t)})).then(e)}use({stack:e,create:t,level:r,name:n}){n&&this.unuse({stack:e,name:n});const o=this._middlewares[e]||(this._middlewares[e]=[]);return o.push({stack:e,create:t,level:null==r?10:r,name:n}),o.sort(((e,t)=>e.level-t.level)),this}unuse({stack:e,name:t,create:r}){return e&&this._middlewares[e]&&(this._middlewares[e]=this._middlewares[e].filter((e=>r?e.create!==r:!!t&&e.name!==t))),this}open(){return function(e){const r=e._state,{indexedDB:n}=e._deps;if(r.isBeingOpened||e.idbdb)return r.dbReadyPromise.then((()=>r.dbOpenError?ht(r.dbOpenError):e));L&&(r.openCanceller._stackHolder=$()),r.isBeingOpened=!0,r.dbOpenError=null,r.openComplete=!1;const o=r.openCanceller;function i(){if(r.openCanceller!==o)throw new Q.DatabaseClosed("db.open() was cancelled")}let a=r.dbReadyResolve,s=null,u=!1;return Re.race([o,("undefined"==typeof navigator?Re.resolve():xr()).then((()=>new Re(((o,a)=>{if(i(),!n)throw new Q.MissingAPI;const l=e.name,c=r.autoSchema?n.open(l):n.open(l,Math.round(10*e.verno));if(!c)throw new Q.MissingAPI;c.onerror=Wt(a),c.onblocked=Ze(e._fireOnBlocked),c.onupgradeneeded=Ze((t=>{if(s=c.transaction,r.autoSchema&&!e._options.allowEmptyDB){c.onerror=Jt,s.abort(),c.result.close();const e=n.deleteDatabase(l);e.onsuccess=e.onerror=Ze((()=>{a(new Q.NoSuchDatabase(`Database ${l} doesnt exist`))}))}else{s.onerror=Wt(a);var o=t.oldVersion>Math.pow(2,62)?0:t.oldVersion;u=o<1,e._novip.idbdb=c.result,fr(e,o/10,s,a)}}),a),c.onsuccess=Ze((()=>{s=null;const n=e._novip.idbdb=c.result,i=y(n.objectStoreNames);if(i.length>0)try{const o=n.transaction(1===(a=i).length?a[0]:a,"readonly");r.autoSchema?function({_novip:e},r,n){e.verno=r.version/10;const o=e._dbSchema=yr(0,r,n);e._storeNames=y(r.objectStoreNames,0),ur(e,[e._allTables],t(o),o)}(e,n,o):(gr(e,e._dbSchema,o),function(e,t){const r=hr(yr(0,e.idbdb,t),e._dbSchema);return!(r.add.length||r.change.some((e=>e.add.length||e.change.length)))}(e,o)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),sr(e,o)}catch(e){}var a;gt.push(e),n.onversionchange=Ze((t=>{r.vcFired=!0,e.on("versionchange").fire(t)})),n.onclose=Ze((t=>{e.on("close").fire(t)})),u&&function({indexedDB:e,IDBKeyRange:t},r){!br(e)&&"__dbnames"!==r&&vr(e,t).put({name:r}).catch(te)}(e._deps,l),o()}),a)}))))]).then((()=>(i(),r.onReadyBeingFired=[],Re.resolve(wr((()=>e.on.ready.fire(e.vip)))).then((function t(){if(r.onReadyBeingFired.length>0){let n=r.onReadyBeingFired.reduce(le,te);return r.onReadyBeingFired=[],Re.resolve(wr((()=>n(e.vip)))).then(t)}}))))).finally((()=>{r.onReadyBeingFired=null,r.isBeingOpened=!1})).then((()=>e)).catch((t=>{r.dbOpenError=t;try{s&&s.abort()}catch(e){}return o===r.openCanceller&&e._close(),ht(t)})).finally((()=>{r.openComplete=!0,a()}))}(this)}_close(){const e=this._state,t=gt.indexOf(this);if(t>=0&>.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new Re((t=>{e.dbReadyResolve=t})),e.openCanceller=new Re(((t,r)=>{e.cancelOpen=r}))}close(){this._close();const e=this._state;this._options.autoOpen=!1,e.dbOpenError=new Q.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}delete(){const e=arguments.length>0,t=this._state;return new Re(((r,n)=>{const o=()=>{this.close();var e=this._deps.indexedDB.deleteDatabase(this.name);e.onsuccess=Ze((()=>{!function({indexedDB:e,IDBKeyRange:t},r){!br(e)&&"__dbnames"!==r&&vr(e,t).delete(r).catch(te)}(this._deps,this.name),r()})),e.onerror=Wt(n),e.onblocked=this._fireOnBlocked};if(e)throw new Q.InvalidArgument("Arguments not allowed in db.delete()");t.isBeingOpened?t.dbReadyPromise.then(o):o()}))}backendDB(){return this.idbdb}isOpen(){return null!==this.idbdb}hasBeenClosed(){const e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name}hasFailed(){return null!==this._state.dbOpenError}dynamicallyOpened(){return this._state.autoSchema}get tables(){return t(this._allTables).map((e=>this._allTables[e]))}transaction(){const e=Sr.apply(this,arguments);return this._transaction.apply(this,e)}_transaction(e,t,r){let n=je.trans;n&&n.db===this&&-1===e.indexOf("!")||(n=null);const o=-1!==e.indexOf("?");let i,a;e=e.replace("!","").replace("?","");try{if(a=t.map((e=>{var t=e instanceof this.Table?e.name:e;if("string"!=typeof t)throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t})),"r"==e||"readonly"===e)i="readonly";else{if("rw"!=e&&"readwrite"!=e)throw new Q.InvalidArgument("Invalid transaction mode: "+e);i="readwrite"}if(n){if("readonly"===n.mode&&"readwrite"===i){if(!o)throw new Q.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");n=null}n&&a.forEach((e=>{if(n&&-1===n.storeNames.indexOf(e)){if(!o)throw new Q.SubTransaction("Table "+e+" not included in parent transaction.");n=null}})),o&&n&&!n.active&&(n=null)}}catch(e){return n?n._promise(null,((t,r)=>{r(e)})):ht(e)}const s=Or.bind(null,this,i,a,n,r);return n?n._promise(i,s,"lock"):je.trans?st(je.transless,(()=>this._whenReady(s))):this._whenReady(s)}table(e){if(!s(this._allTables,e))throw new Q.InvalidTable(`Table ${e} does not exist`);return this._allTables[e]}}const Kr="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable";class $r{constructor(e){this._subscribe=e}subscribe(e,t,r){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:r})}[Kr](){return this}}function zr(e,r){return t(r).forEach((t=>{Nr(e[t]||(e[t]=new Cr),r[t])})),e}function Ur(e){return new $r((r=>{const n=T(e);let o=!1,i={},a={};const s={get closed(){return o},unsubscribe:()=>{o=!0,Gt.storagemutated.unsubscribe(f)}};r.start&&r.start(s);let u=!1,l=!1;function c(){return t(a).some((e=>i[e]&&function(e,t){const r=Dr(t);let n=r.next();if(n.done)return!1;let o=n.value;const i=Dr(e);let a=i.next(o.from),s=a.value;for(;!n.done&&!a.done;){if(Nt(s.from,o.to)<=0&&Nt(s.to,o.from)>=0)return!0;Nt(o.from,s.from)<0?o=(n=r.next(s.from)).value:s=(a=i.next(o.from)).value}return!1}(i[e],a[e])))}const f=e=>{zr(i,e),c()&&h()},h=()=>{if(u||o)return;i={};const t={},p=function(t){n&&et();const r=()=>Xe(e,{subscr:t,trans:null}),o=je.trans?st(je.transless,r):r();return n&&o.then(tt,tt),o}(t);l||(Gt("storagemutated",f),l=!0),u=!0,Promise.resolve(p).then((e=>{u=!1,o||(c()?h():(i={},a=t,r.next&&r.next(e)))}),(e=>{u=!1,r.error&&r.error(e),s.unsubscribe()}))};return h(),s}))}let qr;try{qr={indexedDB:e.indexedDB||e.mozIndexedDB||e.webkitIndexedDB||e.msIndexedDB,IDBKeyRange:e.IDBKeyRange||e.webkitIDBKeyRange}}catch(e){qr={indexedDB:null,IDBKeyRange:null}}const Vr=Br;function Zr(e){let t=Hr;try{Hr=!0,Gt.storagemutated.fire(e)}finally{Hr=t}}u(Vr,{...ee,delete:e=>new Vr(e,{addons:[]}).delete(),exists:e=>new Vr(e,{addons:[]}).open().then((e=>(e.close(),!0))).catch("NoSuchDatabaseError",(()=>!1)),getDatabaseNames(e){try{return function({indexedDB:e,IDBKeyRange:t}){return br(e)?Promise.resolve(e.databases()).then((e=>e.map((e=>e.name)).filter((e=>"__dbnames"!==e)))):vr(e,t).toCollection().primaryKeys()}(Vr.dependencies).then(e)}catch(e){return ht(new Q.MissingAPI)}},defineClass:()=>function(e){o(this,e)},ignoreTransaction:e=>je.trans?st(je.transless,e):e(),vip:wr,async:function(e){return function(){try{var t=kr(e.apply(this,arguments));return t&&"function"==typeof t.then?t:Re.resolve(t)}catch(e){return ht(e)}}},spawn:function(e,t,r){try{var n=kr(e.apply(r,t||[]));return n&&"function"==typeof n.then?n:Re.resolve(n)}catch(e){return ht(e)}},currentTransaction:{get:()=>je.trans||null},waitFor:function(e,t){const r=Re.resolve("function"==typeof e?Vr.ignoreTransaction(e):e).timeout(t||6e4);return je.trans?je.trans.waitFor(r):r},Promise:Re,debug:{get:()=>L,set:e=>{M(e,"dexie"===e?()=>!0:wt)}},derive:f,extend:o,props:u,override:g,Events:At,on:Gt,liveQuery:Ur,extendObservabilitySet:zr,getByKeyPath:w,setByKeyPath:x,delByKeyPath:function(e,t){"string"==typeof t?x(e,t,void 0):"length"in t&&[].map.call(t,(function(t){x(e,t,void 0)}))},shallowClone:k,deepClone:P,getObjectDiff:jr,cmp:Nt,asap:v,minKey:-1/0,addons:[],connections:gt,errnames:G,dependencies:qr,semVer:"3.2.3",version:"3.2.3".split(".").map((e=>parseInt(e))).reduce(((e,t,r)=>e+t/Math.pow(10,2*r)))}),Vr.maxKey=tr(Vr.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(Gt("storagemutated",(e=>{if(!Hr){let t;mt?(t=document.createEvent("CustomEvent"),t.initCustomEvent("x-storagemutated-1",!0,!0,e)):t=new CustomEvent("x-storagemutated-1",{detail:e}),Hr=!0,dispatchEvent(t),Hr=!1}})),addEventListener("x-storagemutated-1",(({detail:e})=>{Hr||Zr(e)})));let Hr=!1;if("undefined"!=typeof BroadcastChannel){const e=new BroadcastChannel("x-storagemutated-1");"function"==typeof e.unref&&e.unref(),Gt("storagemutated",(t=>{Hr||e.postMessage(t)})),e.onmessage=e=>{e.data&&Zr(e.data)}}else if("undefined"!=typeof self&&"undefined"!=typeof navigator){Gt("storagemutated",(e=>{try{Hr||("undefined"!=typeof localStorage&&localStorage.setItem("x-storagemutated-1",JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach((t=>t.postMessage({type:"x-storagemutated-1",changedParts:e}))))}catch(e){}})),"undefined"!=typeof addEventListener&&addEventListener("storage",(e=>{if("x-storagemutated-1"===e.key){const t=JSON.parse(e.newValue);t&&Zr(t.changedParts)}}));const e=self.document&&navigator.serviceWorker;e&&e.addEventListener("message",(function({data:e}){e&&"x-storagemutated-1"===e.type&&Zr(e.changedParts)}))}Re.rejectionMapper=function(e,t){if(!e||e instanceof Z||e instanceof TypeError||e instanceof SyntaxError||!e.name||!X[e.name])return e;var r=new X[e.name](t||e.message,e);return"stack"in e&&c(r,"stack",{get:function(){return this.inner.stack}}),r},M(L,wt);class Wr extends Br{constructor(){super("CopyHistoryDatabase"),this.version(1).stores({copyHistoryItems:"++index,id,timestamp"}),this.version(2).stores({copyHistoryItems:"++index,id,timestamp"}).upgrade((e=>e.table("copyHistoryItems").toCollection().modify((e=>{const t={text:e.text,textImage:e.textImage,start:e.start,end:e.end,originalStart:e.originalStart,originalEnd:e.originalEnd,track:e.track};if(e.subtitle=t,delete e.text,delete e.textImage,delete e.start,delete e.end,delete e.originalStart,delete e.originalEnd,delete e.track,e.videoFileName||e.audioFileName){const t={name:e.videoFileName||e.audioFileName,blobUrl:"",playbackRate:e.filePlaybackRate,audioTrack:e.audioTrack};e.file=t,delete e.videoFileName,delete e.audioFileName,delete e.filePlaybackRate,delete e.audioTrack}}))))}}class Jr{constructor(e){this._db=new Wr,this._limit=e}set limit(e){this._limit=e}async clear(){await this._db.delete()}async fetch(e){if(e<=0)return[];const t=await await this._db.copyHistoryItems.reverse().limit(e).toArray();return t.reverse(),t}liveFetch(e){return Ur((()=>this.fetch(e)))}async save(e){if(this._limit<=0)return;const t={id:e.id,timestamp:e.timestamp,subtitle:e.subtitle,surroundingSubtitles:e.surroundingSubtitles,subtitleFileName:e.subtitleFileName,url:e.url,image:e.image,audio:e.audio,file:e.file,mediaTimestamp:e.mediaTimestamp},r=await this._db.copyHistoryItems.where("id").equals(e.id).primaryKeys();r.length>0&&(t.index=r[0]);const n=await this._db.copyHistoryItems.put(t);await this._prune(n)}async _prune(e){if(await this._db.copyHistoryItems.count()>this._limit){const t=await this._db.copyHistoryItems.where("index").belowOrEqual(e-this._limit).primaryKeys();t.length>0&&await this._db.copyHistoryItems.bulkDelete(t)}}async delete(e){const t=await this._db.copyHistoryItems.where("id").equals(e).primaryKeys();await this._db.copyHistoryItems.bulkDelete(t)}}var Gr,Yr,Qr,Xr,en;Object.keys({ankiConnectUrl:!0,deck:!0,noteType:!0,sentenceField:!0,definitionField:!0,audioField:!0,imageField:!0,wordField:!0,sourceField:!0,urlField:!0,customAnkiFields:!0,tags:!0,preferMp3:!0,audioPaddingStart:!0,audioPaddingEnd:!0,maxImageWidth:!0,maxImageHeight:!0,surroundingSubtitlesCountRadius:!0,surroundingSubtitlesTimeRadius:!0}),function(e){e.noSubtitleList="noSubtitleList",e.app="app"}(Gr||(Gr={})),r(2565),function(e){e[e.forward=0]="forward",e[e.backward=1]="backward"}(Yr||(Yr={})),function(e){e[e.none=0]="none",e[e.showAnkiDialog=1]="showAnkiDialog",e[e.updateLastCard=2]="updateLastCard"}(Qr||(Qr={})),function(e){e[e.atStart=1]="atStart",e[e.atEnd=2]="atEnd"}(Xr||(Xr={})),function(e){e[e.normal=1]="normal",e[e.condensed=2]="condensed",e[e.autoPause=3]="autoPause",e[e.fastForward=4]="fastForward"}(en||(en={}));const tn=(navigator.userAgentData?.platform??navigator.platform)?.toUpperCase()?.indexOf("MAC")>-1,rn={ankiConnectUrl:"http://127.0.0.1:8765",deck:"",noteType:"",sentenceField:"",definitionField:"",audioField:"",imageField:"",wordField:"",sourceField:"",urlField:"",subtitleSize:36,subtitleColor:"#ffffff",subtitleThickness:700,subtitleOutlineThickness:0,subtitleOutlineColor:"#000000",subtitleShadowThickness:2,subtitleShadowColor:"#000000",subtitleBackgroundColor:"#000000",subtitleBackgroundOpacity:.5,subtitleFontFamily:"",subtitlePreview:"アあ安Aa",subtitlePositionOffset:75,subtitleAlignment:"bottom",audioPaddingStart:0,audioPaddingEnd:500,maxImageWidth:0,maxImageHeight:0,surroundingSubtitlesCountRadius:2,surroundingSubtitlesTimeRadius:1e4,autoPausePreference:Xr.atEnd,fastForwardModePlaybackRate:2.7,keyBindSet:{togglePlay:{keys:"space"},toggleAutoPause:{keys:tn?"⇧+P":"shift+P"},toggleCondensedPlayback:{keys:tn?"⇧+O":"shift+O"},toggleFastForwardPlayback:{keys:tn?"⇧+F":"shift+F"},toggleSubtitles:{keys:"down"},toggleVideoSubtitleTrack1:{keys:"1"},toggleVideoSubtitleTrack2:{keys:"2"},toggleVideoSubtitleTrack3:{keys:"3"},toggleAsbplayerSubtitleTrack1:{keys:"W+1"},toggleAsbplayerSubtitleTrack2:{keys:"W+2"},toggleAsbplayerSubtitleTrack3:{keys:"W+3"},seekBackward:{keys:"A"},seekForward:{keys:"D"},seekToPreviousSubtitle:{keys:"left"},seekToNextSubtitle:{keys:"right"},seekToBeginningOfCurrentSubtitle:{keys:"up"},adjustOffsetToPreviousSubtitle:{keys:tn?"⇧+left":"ctrl+left"},adjustOffsetToNextSubtitle:{keys:tn?"⇧+right":"ctrl+right"},decreaseOffset:{keys:tn?"⇧+⌃+right":"ctrl+shift+right"},increaseOffset:{keys:tn?"⇧+⌃+left":"ctrl+shift+left"},resetOffset:{keys:tn?"⇧+⌃+down":"ctrl+shift+down"},copySubtitle:{keys:tn?"⇧+⌃+Z":"ctrl+shift+Z"},ankiExport:{keys:tn?"⇧+⌃+X":"ctrl+shift+X"},updateLastCard:{keys:tn?"⇧+⌃+U":"ctrl+shift+U"},takeScreenshot:{keys:tn?"⇧+⌃+V":"ctrl+shift+V"},decreasePlaybackRate:{keys:tn?"⇧+⌃+[":"ctrl+shift+["},increasePlaybackRate:{keys:tn?"⇧+⌃+]":"ctrl+shift+]"},toggleSidePanel:{keys:"`"}},preferMp3:!0,miningHistoryStorageLimit:25,preCacheSubtitleDom:!0,clickToMineDefaultAction:Qr.showAnkiDialog,themeType:"dark",copyToClipboardOnMine:!1,rememberSubtitleOffset:!0,lastSubtitleOffset:0,autoCopyCurrentSubtitle:!1,subtitleRegexFilter:"",subtitleRegexFilterTextReplacement:"",language:"en",customAnkiFields:{},tags:[],imageBasedSubtitleScaleFactor:1,subtitleCustomStyles:[],streamingAppUrl:"https://killergerbah.github.io/asbplayer",streamingDisplaySubtitles:!0,streamingRecordMedia:!0,streamingTakeScreenshot:!0,streamingCleanScreenshot:!0,streamingCropScreenshot:!0,streamingSubsDragAndDrop:!0,streamingAutoSync:!1,streamingLastLanguagesSynced:{},streamingCondensedPlaybackMinimumSkipIntervalMs:1e3,streamingScreenshotDelay:1e3,streamingSubtitleListPreference:Gr.noSubtitleList};Object.fromEntries(Object.entries(rn).map((([e,t])=>{if("string"==typeof t)return[e,e=>e];if("boolean"==typeof t)return[e,e=>"true"===e];if("number"==typeof t)return[e,e=>Number(e)];if("keyBindSet"===e)return[e,e=>{const t=JSON.parse(e);for(const e of Object.keys(rn.keyBindSet)){const r=e;void 0===t[r]&&(t[r]=rn.keyBindSet[r])}return t}];if("object"==typeof t)return[e,e=>JSON.parse(e)];throw new Error("Could not determine deserializer for setting")})));class nn{constructor(e){this._storage=e}async getAll(){return this.get(Object.keys(rn))}async getSingle(e){return(await this.get([e]))[e]}async get(e){let t={};for(const r of e)t[r]=rn[r];const r=await this._storage.get(t),n={};for(const e in t)n[e]=r[e]??rn[e];return n}async set(e){await this._storage.set(e)}}r(4445);const on=["en","es","de","ja","pl","pt_BR","zh_CN"];function an(e){let t="";const r=new Uint8Array(e),n=r.byteLength;for(let e=0;e<n;++e)t+=String.fromCharCode(r[e]);return window.btoa(t)}function sn(e){return sn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},sn(e)}function un(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ln(e){var t=function(e,t){if("object"!==sn(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==sn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===sn(t)?t:String(t)}function cn(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,ln(n.key),n)}}function fn(e,t,r){return t&&cn(e.prototype,t),r&&cn(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function hn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pn(e,t){return pn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},pn(e,t)}function dn(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&&pn(e,t)}function yn(e,t){if(t&&("object"===sn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return hn(e)}function gn(e){return gn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},gn(e)}function mn(e,t,r){return(t=ln(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function bn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function wn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?bn(Object(r),!0).forEach((function(t){mn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var xn={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},kn=new(function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};un(this,e),this.init(t,r)}return fn(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||xn,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,r,n){return n&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(r).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,wn(wn({},{prefix:"".concat(this.prefix,":").concat(t,":")}),this.options))}},{key:"clone",value:function(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new e(this.logger,t)}}]),e}()),Sn=function(){function e(){un(this,e),this.observers={}}return fn(e,[{key:"on",value:function(e,t){var r=this;return e.split(" ").forEach((function(e){r.observers[e]=r.observers[e]||[],r.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];this.observers[e]&&[].concat(this.observers[e]).forEach((function(e){e.apply(void 0,r)})),this.observers["*"]&&[].concat(this.observers["*"]).forEach((function(t){t.apply(t,[e].concat(r))}))}}]),e}();function On(){var e,t,r=new Promise((function(r,n){e=r,t=n}));return r.resolve=e,r.reject=t,r}function An(e){return null==e?"":""+e}function _n(e,t,r){function n(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function o(){return!e||"string"==typeof e}for(var i="string"!=typeof t?[].concat(t):t.split(".");i.length>1;){if(o())return{};var a=n(i.shift());!e[a]&&r&&(e[a]=new r),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return o()?{}:{obj:e,k:n(i.shift())}}function jn(e,t,r){var n=_n(e,t,Object);n.obj[n.k]=r}function Pn(e,t){var r=_n(e,t),n=r.obj,o=r.k;if(n)return n[o]}function En(e,t,r){for(var n in t)"__proto__"!==n&&"constructor"!==n&&(n in e?"string"==typeof e[n]||e[n]instanceof String||"string"==typeof t[n]||t[n]instanceof String?r&&(e[n]=t[n]):En(e[n],t[n],r):e[n]=t[n]);return e}function Fn(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var Rn={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function Cn(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return Rn[e]})):e}var In="undefined"!=typeof window&&window.navigator&&void 0===window.navigator.userAgentData&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,Nn=[" ",",","?","!",";"];function Dn(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(e){if(e[t])return e[t];for(var n=t.split(r),o=e,i=0;i<n.length;++i){if(!o)return;if("string"==typeof o[n[i]]&&i+1<n.length)return;if(void 0===o[n[i]]){for(var a=2,s=n.slice(i,i+a).join(r),u=o[s];void 0===u&&n.length>i+a;)a++,u=o[s=n.slice(i,i+a).join(r)];if(void 0===u)return;if(null===u)return null;if(t.endsWith(s)){if("string"==typeof u)return u;if(s&&"string"==typeof u[s])return u[s]}var l=n.slice(i+a).join(r);return l?Dn(u,l,r):void 0}o=o[n[i]]}return o}}function Tn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ln(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Tn(Object(r),!0).forEach((function(t){mn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Mn=function(e){dn(o,e);var t,r,n=(t=o,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=gn(t);if(r){var o=gn(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return yn(this,e)});function o(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return un(this,o),t=n.call(this),In&&Sn.call(hn(t)),t.data=e||{},t.options=r,void 0===t.options.keySeparator&&(t.options.keySeparator="."),void 0===t.options.ignoreJSONStructure&&(t.options.ignoreJSONStructure=!0),t}return fn(o,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,i=void 0!==n.ignoreJSONStructure?n.ignoreJSONStructure:this.options.ignoreJSONStructure,a=[e,t];r&&"string"!=typeof r&&(a=a.concat(r)),r&&"string"==typeof r&&(a=a.concat(o?r.split(o):r)),e.indexOf(".")>-1&&(a=e.split("."));var s=Pn(this.data,a);return s||!i||"string"!=typeof r?s:Dn(this.data&&this.data[e]&&this.data[e][t],r,o)}},{key:"addResource",value:function(e,t,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=this.options.keySeparator;void 0===i&&(i=".");var a=[e,t];r&&(a=a.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(n=t,t=(a=e.split("."))[1]),this.addNamespaces(t),jn(this.data,a,n),o.silent||this.emit("added",e,t,r,n)}},{key:"addResources",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in r)"string"!=typeof r[o]&&"[object Array]"!==Object.prototype.toString.apply(r[o])||this.addResource(e,t,o,r[o],{silent:!0});n.silent||this.emit("added",e,t,r)}},{key:"addResourceBundle",value:function(e,t,r,n,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(n=r,r=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var s=Pn(this.data,a)||{};n?En(s,r,o):s=Ln(Ln({},s),r),jn(this.data,a,s),i.silent||this.emit("added",e,t,r)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?Ln(Ln({},{}),this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"hasLanguageSomeTranslations",value:function(e){var t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((function(e){return t[e]&&Object.keys(t[e]).length>0}))}},{key:"toJSON",value:function(){return this.data}}]),o}(Sn),Bn={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,r,n,o){var i=this;return e.forEach((function(e){i.processors[e]&&(t=i.processors[e].process(t,r,n,o))})),t}};function Kn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function $n(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Kn(Object(r),!0).forEach((function(t){mn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Kn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var zn={},Un=function(e){dn(o,e);var t,r,n=(t=o,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=gn(t);if(r){var o=gn(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return yn(this,e)});function o(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return un(this,o),t=n.call(this),In&&Sn.call(hn(t)),function(e,t,r){["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach((function(e){t[e]&&(r[e]=t[e])}))}(0,e,hn(t)),t.options=r,void 0===t.options.keySeparator&&(t.options.keySeparator="."),t.logger=kn.create("translator"),t}return fn(o,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;var r=this.resolve(e,t);return r&&void 0!==r.res}},{key:"extractFromKey",value:function(e,t){var r=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===r&&(r=":");var n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS||[],i=r&&e.indexOf(r)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||function(e,t,r){t=t||"",r=r||"";var n=Nn.filter((function(e){return t.indexOf(e)<0&&r.indexOf(e)<0}));if(0===n.length)return!0;var o=new RegExp("(".concat(n.map((function(e){return"?"===e?"\\?":e})).join("|"),")")),i=!o.test(e);if(!i){var a=e.indexOf(r);a>0&&!o.test(e.substring(0,a))&&(i=!0)}return i}(e,r,n));if(i&&!a){var s=e.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:e,namespaces:o};var u=e.split(r);(r!==n||r===n&&this.options.ns.indexOf(u[0])>-1)&&(o=u.shift()),e=u.join(n)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}},{key:"translate",value:function(e,t,r){var n=this;if("object"!==sn(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var i=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,a=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,s=this.extractFromKey(e[e.length-1],t),u=s.key,l=s.namespaces,c=l[l.length-1],f=t.lng||this.language,h=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f&&"cimode"===f.toLowerCase()){if(h){var p=t.nsSeparator||this.options.nsSeparator;return i?{res:"".concat(c).concat(p).concat(u),usedKey:u,exactUsedKey:u,usedLng:f,usedNS:c}:"".concat(c).concat(p).concat(u)}return i?{res:u,usedKey:u,exactUsedKey:u,usedLng:f,usedNS:c}:u}var d=this.resolve(e,t),y=d&&d.res,g=d&&d.usedKey||u,m=d&&d.exactUsedKey||u,v=Object.prototype.toString.apply(y),b=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject;if(w&&y&&"string"!=typeof y&&"boolean"!=typeof y&&"number"!=typeof y&&["[object Number]","[object Function]","[object RegExp]"].indexOf(v)<0&&("string"!=typeof b||"[object Array]"!==v)){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var x=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,y,$n($n({},t),{},{ns:l})):"key '".concat(u," (").concat(this.language,")' returned an object instead of string.");return i?(d.res=x,d):x}if(a){var k="[object Array]"===v,S=k?[]:{},O=k?m:g;for(var A in y)if(Object.prototype.hasOwnProperty.call(y,A)){var _="".concat(O).concat(a).concat(A);S[A]=this.translate(_,$n($n({},t),{joinArrays:!1,ns:l})),S[A]===_&&(S[A]=y[A])}y=S}}else if(w&&"string"==typeof b&&"[object Array]"===v)(y=y.join(b))&&(y=this.extendTranslation(y,e,t,r));else{var j=!1,P=!1,E=void 0!==t.count&&"string"!=typeof t.count,F=o.hasDefaultValue(t),R=E?this.pluralResolver.getSuffix(f,t.count,t):"",C=t["defaultValue".concat(R)]||t.defaultValue;!this.isValidLookup(y)&&F&&(j=!0,y=C),this.isValidLookup(y)||(P=!0,y=u);var I=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&P?void 0:y,N=F&&C!==y&&this.options.updateMissing;if(P||j||N){if(this.logger.log(N?"updateKey":"missingKey",f,c,u,N?C:y),a){var D=this.resolve(u,$n($n({},t),{},{keySeparator:!1}));D&&D.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var T=[],L=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&L&&L[0])for(var M=0;M<L.length;M++)T.push(L[M]);else"all"===this.options.saveMissingTo?T=this.languageUtils.toResolveHierarchy(t.lng||this.language):T.push(t.lng||this.language);var B=function(e,r,o){var i=F&&o!==y?o:I;n.options.missingKeyHandler?n.options.missingKeyHandler(e,c,r,i,N,t):n.backendConnector&&n.backendConnector.saveMissing&&n.backendConnector.saveMissing(e,c,r,i,N,t),n.emit("missingKey",e,c,r,y)};this.options.saveMissing&&(this.options.saveMissingPlurals&&E?T.forEach((function(e){n.pluralResolver.getSuffixes(e,t).forEach((function(r){B([e],u+r,t["defaultValue".concat(r)]||C)}))})):B(T,u,C))}y=this.extendTranslation(y,e,t,d,r),P&&y===u&&this.options.appendNamespaceToMissingKey&&(y="".concat(c,":").concat(u)),(P||j)&&this.options.parseMissingKeyHandler&&(y="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(c,":").concat(u):u,j?y:void 0):this.options.parseMissingKeyHandler(y))}return i?(d.res=y,d):y}},{key:"extendTranslation",value:function(e,t,r,n,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,$n($n({},this.options.interpolation.defaultVariables),r),n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init($n($n({},r),{interpolation:$n($n({},this.options.interpolation),r.interpolation)}));var a,s="string"==typeof e&&(r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(s){var u=e.match(this.interpolator.nestingRegexp);a=u&&u.length}var l=r.replace&&"string"!=typeof r.replace?r.replace:r;if(this.options.interpolation.defaultVariables&&(l=$n($n({},this.options.interpolation.defaultVariables),l)),e=this.interpolator.interpolate(e,l,r.lng||this.language,r),s){var c=e.match(this.interpolator.nestingRegexp);a<(c&&c.length)&&(r.nest=!1)}!r.lng&&"v1"!==this.options.compatibilityAPI&&n&&n.res&&(r.lng=n.usedLng),!1!==r.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++)n[a]=arguments[a];return o&&o[0]===n[0]&&!r.context?(i.logger.warn("It seems you are nesting recursively key: ".concat(n[0]," in key: ").concat(t[0])),null):i.translate.apply(i,n.concat([t]))}),r)),r.interpolation&&this.interpolator.reset()}var f=r.postProcess||this.options.postProcess,h="string"==typeof f?[f]:f;return null!=e&&h&&h.length&&!1!==r.applyPostProcessor&&(e=Bn.handle(h,e,t,this.options&&this.options.postProcessPassResolved?$n({i18nResolved:n},r):r,this)),e}},{key:"resolve",value:function(e){var t,r,n,o,i,a=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!a.isValidLookup(t)){var u=a.extractFromKey(e,s),l=u.key;r=l;var c=u.namespaces;a.options.fallbackNS&&(c=c.concat(a.options.fallbackNS));var f=void 0!==s.count&&"string"!=typeof s.count,h=f&&!s.ordinal&&0===s.count&&a.pluralResolver.shouldUseIntlApi(),p=void 0!==s.context&&("string"==typeof s.context||"number"==typeof s.context)&&""!==s.context,d=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);c.forEach((function(e){a.isValidLookup(t)||(i=e,!zn["".concat(d[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(i)&&(zn["".concat(d[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(r,'" for languages "').concat(d.join(", "),'" won\'t get resolved as namespace "').concat(i,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),d.forEach((function(r){if(!a.isValidLookup(t)){o=r;var i,u=[l];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(u,l,r,e,s);else{var c;f&&(c=a.pluralResolver.getSuffix(r,s.count,s));var d="".concat(a.options.pluralSeparator,"zero");if(f&&(u.push(l+c),h&&u.push(l+d)),p){var y="".concat(l).concat(a.options.contextSeparator).concat(s.context);u.push(y),f&&(u.push(y+c),h&&u.push(y+d))}}for(;i=u.pop();)a.isValidLookup(t)||(n=i,t=a.getResource(r,e,i,s))}})))}))}})),{res:t,usedKey:r,exactUsedKey:n,usedLng:o,usedNS:i}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,r,n):this.resourceStore.getResource(e,t,r,n)}}],[{key:"hasDefaultValue",value:function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"defaultValue"===t.substring(0,12)&&void 0!==e[t])return!0;return!1}}]),o}(Sn);function qn(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Vn=function(){function e(t){un(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=kn.create("languageUtils")}return fn(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],r=e.split("-");return this.options.lowerCaseLng?r=r.map((function(e){return e.toLowerCase()})):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=qn(r[1].toLowerCase()))):3===r.length&&(r[0]=r[0].toLowerCase(),2===r[1].length&&(r[1]=r[1].toUpperCase()),"sgn"!==r[0]&&2===r[2].length&&(r[2]=r[2].toUpperCase()),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=qn(r[1].toLowerCase())),t.indexOf(r[2].toLowerCase())>-1&&(r[2]=qn(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,r=this;return e?(e.forEach((function(e){if(!t){var n=r.formatLanguageCode(e);r.options.supportedLngs&&!r.isSupportedCode(n)||(t=n)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var n=r.getLanguagePartFromCode(e);if(r.isSupportedCode(n))return t=n;t=r.options.supportedLngs.find((function(e){return e===n?e:e.indexOf("-")<0&&n.indexOf("-")<0?void 0:0===e.indexOf(n)?e:void 0}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e[this.getLanguagePartFromCode(t)]),r||(r=e.default),r||[]}},{key:"toResolveHierarchy",value:function(e,t){var r=this,n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),o=[],i=function(e){e&&(r.isSupportedCode(e)?o.push(e):r.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):"string"==typeof e&&i(this.formatLanguageCode(e)),n.forEach((function(e){o.indexOf(e)<0&&i(r.formatLanguageCode(e))})),o}}]),e}(),Zn=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Hn={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},Wn=["v1","v2","v3"],Jn={zero:0,one:1,two:2,few:3,many:4,other:5},Gn=function(){function e(t){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};un(this,e),this.languageUtils=t,this.options=n,this.logger=kn.create("pluralResolver"),this.options.compatibilityJSON&&"v4"!==this.options.compatibilityJSON||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=(r={},Zn.forEach((function(e){e.lngs.forEach((function(t){r[t]={numbers:e.nr,plurals:Hn[e.fc]}}))})),r)}return fn(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(e,{type:t.ordinal?"ordinal":"cardinal"})}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRule(e,t);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,r).map((function(e){return"".concat(t).concat(e)}))}},{key:"getSuffixes",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,r);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((function(e,t){return Jn[e]-Jn[t]})).map((function(e){return"".concat(t.options.prepend).concat(e)})):n.numbers.map((function(n){return t.getSuffix(e,n,r)})):[]}},{key:"getSuffix",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this.getRule(e,r);return n?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(n.select(t)):this.getSuffixRetroCompatible(n,t):(this.logger.warn("no plural rule found for: ".concat(e)),"")}},{key:"getSuffixRetroCompatible",value:function(e,t){var r=this,n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),o=e.numbers[n];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===o?o="plural":1===o&&(o=""));var i=function(){return r.options.prepend&&o.toString()?r.options.prepend+o.toString():o.toString()};return"v1"===this.options.compatibilityJSON?1===o?"":"number"==typeof o?"_plural_".concat(o.toString()):i():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?i():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}},{key:"shouldUseIntlApi",value:function(){return!Wn.includes(this.options.compatibilityJSON)}}]),e}();function Yn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Qn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Yn(Object(r),!0).forEach((function(t){mn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Xn(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=function(e,t,r){var n=Pn(e,r);return void 0!==n?n:Pn(t,r)}(e,t,r);return!i&&o&&"string"==typeof r&&void 0===(i=Dn(e,r,n))&&(i=Dn(t,r,n)),i}var eo=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};un(this,e),this.logger=kn.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return fn(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:Cn,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?Fn(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?Fn(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?Fn(t.nestingPrefix):t.nestingPrefixEscaped||Fn("$t("),this.nestingSuffix=t.nestingSuffix?Fn(t.nestingSuffix):t.nestingSuffixEscaped||Fn(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var r="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(r,"g")}},{key:"interpolate",value:function(e,t,r,n){var o,i,a,s=this,u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function l(e){return e.replace(/\$/g,"$$$$")}var c=function(e){if(e.indexOf(s.formatSeparator)<0){var o=Xn(t,u,e,s.options.keySeparator,s.options.ignoreJSONStructure);return s.alwaysFormat?s.format(o,void 0,r,Qn(Qn(Qn({},n),t),{},{interpolationkey:e})):o}var i=e.split(s.formatSeparator),a=i.shift().trim(),l=i.join(s.formatSeparator).trim();return s.format(Xn(t,u,a,s.options.keySeparator,s.options.ignoreJSONStructure),l,r,Qn(Qn(Qn({},n),t),{},{interpolationkey:a}))};this.resetRegExp();var f=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler,h=n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return l(e)}},{regex:this.regexp,safeValue:function(e){return s.escapeValue?l(s.escape(e)):l(e)}}].forEach((function(t){for(a=0;o=t.regex.exec(e);){var r=o[1].trim();if(void 0===(i=c(r)))if("function"==typeof f){var u=f(e,o,n);i="string"==typeof u?u:""}else if(n&&Object.prototype.hasOwnProperty.call(n,r))i="";else{if(h){i=o[0];continue}s.logger.warn("missed to pass in variable ".concat(r," for interpolating ").concat(e)),i=""}else"string"==typeof i||s.useRawValueToEscape||(i=An(i));var l=t.safeValue(i);if(e=e.replace(o[0],l),h?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,++a>=s.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var r,n,o,i=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};function s(e,t){var r=this.nestingOptionsSeparator;if(e.indexOf(r)<0)return e;var n=e.split(new RegExp("".concat(r,"[ ]*{"))),i="{".concat(n[1]);e=n[0];var a=(i=this.interpolate(i,o)).match(/'/g),s=i.match(/"/g);(a&&a.length%2==0&&!s||s.length%2!=0)&&(i=i.replace(/'/g,'"'));try{o=JSON.parse(i),t&&(o=Qn(Qn({},t),o))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(r).concat(i)}return delete o.defaultValue,e}for(;r=this.nestingRegexp.exec(e);){var u=[];(o=(o=Qn({},a)).replace&&"string"!=typeof o.replace?o.replace:o).applyPostProcessor=!1,delete o.defaultValue;var l=!1;if(-1!==r[0].indexOf(this.formatSeparator)&&!/{.*}/.test(r[1])){var c=r[1].split(this.formatSeparator).map((function(e){return e.trim()}));r[1]=c.shift(),u=c,l=!0}if((n=t(s.call(this,r[1].trim(),o),o))&&r[0]===e&&"string"!=typeof n)return n;"string"!=typeof n&&(n=An(n)),n||(this.logger.warn("missed to resolve ".concat(r[1]," for nesting ").concat(e)),n=""),l&&(n=u.reduce((function(e,t){return i.format(e,t,a.lng,Qn(Qn({},a),{},{interpolationkey:r[1].trim()}))}),n.trim())),e=e.replace(r[0],n),this.regexp.lastIndex=0}return e}}]),e}();function to(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ro(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?to(Object(r),!0).forEach((function(t){mn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):to(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function no(e){var t={};return function(r,n,o){var i=n+JSON.stringify(o),a=t[i];return a||(a=e(n,o),t[i]=a),a(r)}}var oo=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};un(this,e),this.logger=kn.create("formatter"),this.options=t,this.formats={number:no((function(e,t){var r=new Intl.NumberFormat(e,ro({},t));return function(e){return r.format(e)}})),currency:no((function(e,t){var r=new Intl.NumberFormat(e,ro(ro({},t),{},{style:"currency"}));return function(e){return r.format(e)}})),datetime:no((function(e,t){var r=new Intl.DateTimeFormat(e,ro({},t));return function(e){return r.format(e)}})),relativetime:no((function(e,t){var r=new Intl.RelativeTimeFormat(e,ro({},t));return function(e){return r.format(e,t.range||"day")}})),list:no((function(e,t){var r=new Intl.ListFormat(e,ro({},t));return function(e){return r.format(e)}}))},this.init(t)}return fn(e,[{key:"init",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||","}},{key:"add",value:function(e,t){this.formats[e.toLowerCase().trim()]=t}},{key:"addCached",value:function(e,t){this.formats[e.toLowerCase().trim()]=no(t)}},{key:"format",value:function(e,t,r){var n=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=t.split(this.formatSeparator).reduce((function(e,t){var i=function(e){var t=e.toLowerCase().trim(),r={};if(e.indexOf("(")>-1){var n=e.split("(");t=n[0].toLowerCase().trim();var o=n[1].substring(0,n[1].length-1);"currency"===t&&o.indexOf(":")<0?r.currency||(r.currency=o.trim()):"relativetime"===t&&o.indexOf(":")<0?r.range||(r.range=o.trim()):o.split(";").forEach((function(e){if(e){var t=function(e){if(Array.isArray(e))return e}(i=e.split(":"))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(i)||function(e,t){if(e){if("string"==typeof e)return vn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?vn(e,t):void 0}}(i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=t[0],o=t.slice(1).join(":").trim().replace(/^'+|'+$/g,"");r[n.trim()]||(r[n.trim()]=o),"false"===o&&(r[n.trim()]=!1),"true"===o&&(r[n.trim()]=!0),isNaN(o)||(r[n.trim()]=parseInt(o,10))}var i}))}return{formatName:t,formatOptions:r}}(t),a=i.formatName,s=i.formatOptions;if(n.formats[a]){var u=e;try{var l=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},c=l.locale||l.lng||o.locale||o.lng||r;u=n.formats[a](e,c,ro(ro(ro({},s),o),l))}catch(e){n.logger.warn(e)}return u}return n.logger.warn("there was no format function for ".concat(a)),e}),e);return i}}]),e}();function io(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ao(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?io(Object(r),!0).forEach((function(t){mn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):io(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var so=function(e){dn(o,e);var t,r,n=(t=o,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=gn(t);if(r){var o=gn(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return yn(this,e)});function o(e,t,r){var i,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return un(this,o),i=n.call(this),In&&Sn.call(hn(i)),i.backend=e,i.store=t,i.services=r,i.languageUtils=r.languageUtils,i.options=a,i.logger=kn.create("backendConnector"),i.waitingReads=[],i.maxParallelReads=a.maxParallelReads||10,i.readingCalls=0,i.maxRetries=a.maxRetries>=0?a.maxRetries:5,i.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(r,a.backend,a),i}return fn(o,[{key:"queueLoad",value:function(e,t,r,n){var o=this,i={},a={},s={},u={};return e.forEach((function(e){var n=!0;t.forEach((function(t){var s="".concat(e,"|").concat(t);!r.reload&&o.store.hasResourceBundle(e,t)?o.state[s]=2:o.state[s]<0||(1===o.state[s]?void 0===a[s]&&(a[s]=!0):(o.state[s]=1,n=!1,void 0===a[s]&&(a[s]=!0),void 0===i[s]&&(i[s]=!0),void 0===u[t]&&(u[t]=!0)))})),n||(s[e]=!0)})),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:n}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(u)}}},{key:"loaded",value:function(e,t,r){var n=e.split("|"),o=n[0],i=n[1];t&&this.emit("failedLoading",o,i,t),r&&this.store.addResourceBundle(o,i,r),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(r){!function(e,t,r,n){var o=_n(e,t,Object),i=o.obj,a=o.k;i[a]=i[a]||[],i[a].push(r)}(r.loaded,[o],i),function(e,t){void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)}(r,e),t&&r.errors.push(t),0!==r.pendingCount||r.done||(Object.keys(r.loaded).forEach((function(e){a[e]||(a[e]={});var t=r.loaded[e];t.length&&t.forEach((function(t){void 0===a[e][t]&&(a[e][t]=!0)}))})),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,r){var n=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads)this.waitingReads.push({lng:e,ns:t,fcName:r,tried:o,wait:i,callback:a});else{this.readingCalls++;var s=function(s,u){if(n.readingCalls--,n.waitingReads.length>0){var l=n.waitingReads.shift();n.read(l.lng,l.ns,l.fcName,l.tried,l.wait,l.callback)}s&&u&&o<n.maxRetries?setTimeout((function(){n.read.call(n,e,t,r,o+1,2*i,a)}),i):a(s,u)},u=this.backend[r].bind(this.backend);if(2!==u.length)return u(e,t,s);try{var l=u(e,t);l&&"function"==typeof l.then?l.then((function(e){return s(null,e)})).catch(s):s(null,l)}catch(e){s(e)}}}},{key:"prepareLoading",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var i=this.queueLoad(e,t,n,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach((function(e){r.loadOne(e)}))}},{key:"load",value:function(e,t,r){this.prepareLoading(e,t,{},r)}},{key:"reload",value:function(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}},{key:"loadOne",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.split("|"),o=n[0],i=n[1];this.read(o,i,"read",void 0,void 0,(function(n,a){n&&t.logger.warn("".concat(r,"loading namespace ").concat(i," for language ").concat(o," failed"),n),!n&&a&&t.logger.log("".concat(r,"loaded namespace ").concat(i," for language ").concat(o),a),t.loaded(e,n,a)}))}},{key:"saveMissing",value:function(e,t,r,n,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:function(){};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t))this.logger.warn('did not save key "'.concat(r,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");else if(null!=r&&""!==r){if(this.backend&&this.backend.create){var s=ao(ao({},i),{},{isUpdate:o}),u=this.backend.create.bind(this.backend);if(u.length<6)try{var l;(l=5===u.length?u(e,t,r,n,s):u(e,t,r,n))&&"function"==typeof l.then?l.then((function(e){return a(null,e)})).catch(a):a(null,l)}catch(e){a(e)}else u(e,t,r,n,a,s)}e&&e[0]&&this.store.addResource(e[0],t,r,n)}}}]),o}(Sn);function uo(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===sn(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===sn(e[2])||"object"===sn(e[3])){var r=e[3]||e[2];Object.keys(r).forEach((function(e){t[e]=r[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,r,n){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function lo(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function co(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function fo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?co(Object(r),!0).forEach((function(t){mn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):co(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ho(){}var po=function(e){dn(o,e);var t,r,n=(t=o,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=gn(t);if(r){var o=gn(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return yn(this,e)});function o(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if(un(this,o),e=n.call(this),In&&Sn.call(hn(e)),e.options=lo(r),e.services={},e.logger=kn,e.modules={external:[]},t=hn(e),Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach((function(e){"function"==typeof t[e]&&(t[e]=t[e].bind(t))})),i&&!e.isInitialized&&!r.isClone){if(!e.options.initImmediate)return e.init(r,i),yn(e,hn(e));setTimeout((function(){e.init(r,i)}),0)}return e}return fn(o,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;"function"==typeof t&&(r=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));var n=uo();function o(e){return e?"function"==typeof e?new e:e:null}if(this.options=fo(fo(fo({},n),this.options),lo(t)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=fo(fo({},n.interpolation),this.options.interpolation)),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){var i;this.modules.logger?kn.init(o(this.modules.logger),this.options):kn.init(null,this.options),this.modules.formatter?i=this.modules.formatter:"undefined"!=typeof Intl&&(i=oo);var a=new Vn(this.options);this.store=new Mn(this.options.resources,this.options);var s=this.services;s.logger=kn,s.resourceStore=this.store,s.languageUtils=a,s.pluralResolver=new Gn(a,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!i||this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format||(s.formatter=o(i),s.formatter.init(s,this.options),this.options.interpolation.format=s.formatter.format.bind(s.formatter)),s.interpolator=new eo(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new so(o(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",(function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];e.emit.apply(e,[t].concat(n))})),this.modules.languageDetector&&(s.languageDetector=o(this.modules.languageDetector),s.languageDetector.init&&s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=o(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new Un(this.services,this.options),this.translator.on("*",(function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];e.emit.apply(e,[t].concat(n))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}if(this.format=this.options.interpolation.format,r||(r=ho),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&"dev"!==u[0]&&(this.options.lng=u[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments)}})),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments),e}}));var l=On(),c=function(){var t=function(t,n){e.isInitialized&&!e.initializedStoreOnce&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),l.resolve(n),r(t,n)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),l}},{key:"loadResources",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ho,n="string"==typeof e?e:this.language;if("function"==typeof e&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(n&&"cimode"===n.toLowerCase())return r();var o=[],i=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){o.indexOf(e)<0&&o.push(e)}))};n?i(n):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((function(e){return i(e)})),this.options.preload&&this.options.preload.forEach((function(e){return i(e)})),this.services.backendConnector.load(o,this.options.ns,(function(e){e||t.resolvedLanguage||!t.language||t.setResolvedLanguage(t.language),r(e)}))}else r(null)}},{key:"reloadResources",value:function(e,t,r){var n=On();return e||(e=this.languages),t||(t=this.options.ns),r||(r=ho),this.services.backendConnector.reload(e,t,(function(e){n.resolve(),r(e)})),n}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&Bn.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"setResolvedLanguage",value:function(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(var t=0;t<this.languages.length;t++){var r=this.languages[t];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}},{key:"changeLanguage",value:function(e,t){var r=this;this.isLanguageChangingTo=e;var n=On();this.emit("languageChanging",e);var o=function(e){r.language=e,r.languages=r.services.languageUtils.toResolveHierarchy(e),r.resolvedLanguage=void 0,r.setResolvedLanguage(e)},i=function(i){e||i||!r.services.languageDetector||(i=[]);var a="string"==typeof i?i:r.services.languageUtils.getBestMatchFromCodes(i);a&&(r.language||o(a),r.translator.language||r.translator.changeLanguage(a),r.services.languageDetector&&r.services.languageDetector.cacheUserLanguage&&r.services.languageDetector.cacheUserLanguage(a)),r.loadResources(a,(function(e){!function(e,i){i?(o(i),r.translator.changeLanguage(i),r.isLanguageChangingTo=void 0,r.emit("languageChanged",i),r.logger.log("languageChanged",i)):r.isLanguageChangingTo=void 0,n.resolve((function(){return r.t.apply(r,arguments)})),t&&t(e,(function(){return r.t.apply(r,arguments)}))}(e,a)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(i):this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),n}},{key:"getFixedT",value:function(e,t,r){var n=this,o=function e(t,o){var i;if("object"!==sn(o)){for(var a=arguments.length,s=new Array(a>2?a-2:0),u=2;u<a;u++)s[u-2]=arguments[u];i=n.options.overloadTranslationOptionHandler([t,o].concat(s))}else i=fo({},o);i.lng=i.lng||e.lng,i.lngs=i.lngs||e.lngs,i.ns=i.ns||e.ns,i.keyPrefix=i.keyPrefix||r||e.keyPrefix;var l,c=n.options.keySeparator||".";return l=i.keyPrefix&&Array.isArray(t)?t.map((function(e){return"".concat(i.keyPrefix).concat(c).concat(e)})):i.keyPrefix?"".concat(i.keyPrefix).concat(c).concat(t):t,n.t(l,i)};return"string"==typeof e?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=r,o}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var n=this.resolvedLanguage||this.languages[0],o=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;var a=function(e,r){var n=t.services.backendConnector.state["".concat(e,"|").concat(r)];return-1===n||2===n};if(r.precheck){var s=r.precheck(this,a);if(void 0!==s)return s}return!(!this.hasResourceBundle(n,e)&&this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages)&&(!a(n,e)||o&&!a(i,e)))}},{key:"loadNamespaces",value:function(e,t){var r=this,n=On();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){r.options.ns.indexOf(e)<0&&r.options.ns.push(e)})),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var r=On();"string"==typeof e&&(e=[e]);var n=this.options.preload||[],o=e.filter((function(e){return n.indexOf(e)<0}));return o.length?(this.options.preload=n.concat(o),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";var t=this.services&&this.services.languageUtils||new Vn(uo());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ho,n=fo(fo(fo({},this.options),t),{isClone:!0}),i=new o(n);return void 0===t.debug&&void 0===t.prefix||(i.logger=i.logger.clone(t)),["store","services","language"].forEach((function(t){i[t]=e[t]})),i.services=fo({},this.services),i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i.translator=new Un(i.services,i.options),i.translator.on("*",(function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];i.emit.apply(i,[e].concat(r))})),i.init(n,r),i.translator.options=i.options,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),o}(Sn);mn(po,"createInstance",(function(){return new po(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}));var yo,go=po.createInstance();go.createInstance=po.createInstance,go.createInstance,go.dir,go.init,go.loadResources,go.reloadResources,go.use,go.changeLanguage,go.getFixedT,go.t,go.exists,go.setDefaultNamespace,go.hasLoadedNamespace,go.loadNamespaces,go.loadLanguages;class mo{async get(e){return await chrome.storage.local.get(e)}async set(e){await chrome.storage.local.set(e)}}var vo=new Uint8Array(16);function bo(){if(!yo&&!(yo="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return yo(vo)}const wo=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var xo=[],ko=0;ko<256;++ko)xo.push((ko+256).toString(16).substr(1));const So=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(xo[e[t+0]]+xo[e[t+1]]+xo[e[t+2]]+xo[e[t+3]]+"-"+xo[e[t+4]]+xo[e[t+5]]+"-"+xo[e[t+6]]+xo[e[t+7]]+"-"+xo[e[t+8]]+xo[e[t+9]]+"-"+xo[e[t+10]]+xo[e[t+11]]+xo[e[t+12]]+xo[e[t+13]]+xo[e[t+14]]+xo[e[t+15]]).toLowerCase();if(!function(e){return"string"==typeof e&&wo.test(e)}(r))throw TypeError("Stringified UUID is invalid");return r},Oo=function(e,t,r){var n=(e=e||{}).random||(e.rng||bo)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var o=0;o<16;++o)t[r+o]=n[o];return t}return So(n)},Ao=(new nn(new mo),e=>`locStrings-${e}`),_o=(new nn(new mo),async e=>await Po(e)??await jo(e)??await jo("en")),jo=async e=>{for(const t of on)if(e===t)return{lang:e,strings:await(await fetch(chrome.runtime.getURL(`asbplayer-locales/${e}.json`))).json()}},Po=async e=>{const t=Ao(e),r=(await chrome.storage.local.get(t))[t];if(void 0!==r)return{lang:e,strings:r}};let Eo;const Fo={};class Ro{static async encode(e,t){return new Promise((async(r,n)=>{var o=new FileReader;o.onload=async e=>{try{const o=new AudioContext;if(null===e.target)return void n(new Error("Could not obtain buffer to encode"));const i=await o.decodeAudioData(e.target.result),a=[];for(let e=0;e<i.numberOfChannels;++e)a.push(i.getChannelData(e));const s=t();s.postMessage({command:"encode",audioBuffer:{channels:a,numberOfChannels:i.numberOfChannels,length:i.length,sampleRate:i.sampleRate}}),s.onmessage=e=>{r(new Blob(e.data.buffer,{type:"audio/mp3"})),s.terminate()},s.onerror=e=>{const t=e?.error??new Error("MP3 encoding failed: "+e?.message);n(t),s.terminate()}}catch(e){n(e)}},o.readAsArrayBuffer(e)}))}}const Co=new nn(new mo),Io=new class{constructor(){this.recording=!1,this.recorder=null,this.stream=null,this.audio=null,this.blobPromise=null}startWithTimeout(e,t){return new Promise((async(r,n)=>{try{if(this.recording)return console.error("Already recording, cannot start with timeout."),void n("Already recording");await this.start(),t(),setTimeout((async()=>{r(await this.stop())}),e)}catch(e){n(e)}}))}async start(){if(!this.recording)return new Promise(((e,t)=>{chrome.tabCapture.capture({audio:!0},(r=>{if(!r)return void t(new Error(chrome.runtime.lastError?.message??"Missing stream"));const n=new MediaRecorder(r),o=[];n.ondataavailable=e=>{o.push(e.data)},this.blobPromise=new Promise(((e,t)=>{n.onstop=t=>{e(new Blob(o))}})),n.start();const i=new Audio;i.srcObject=r,i.play(),this.recorder=n,this.recording=!0,this.stream=r,this.audio=i,e(void 0)}))}));console.error("Already recording, cannot start")}async stop(){if(!this.recording)throw new Error("Not recording, unable to stop");this.recording=!1,this.recorder?.stop(),this.recorder=null,this.stream?.getAudioTracks()[0].stop(),this.stream=null,this.audio&&(this.audio.pause(),this.audio.srcObject=null,this.audio=null);const e=await this.blobPromise;return this.blobPromise=null,await an(await e.arrayBuffer())}},No=async(e,t)=>{if(t){const t=await(await fetch("data:audio/webm;base64,"+e)).blob(),n=await Ro.encode(t,(()=>new Worker(new URL(r.p+r.u(265),r.b))));e=an(await n.arrayBuffer())}const n={sender:"asbplayer-background-page",message:{command:"audio-base64",base64:e}};chrome.runtime.sendMessage(n)};window.onload=async()=>{const e=(e,t,r)=>{if("asbplayer-extension-to-background-page"===e.sender)switch(e.message.command){case"start-recording-audio-with-timeout":const t=e.message;return Io.startWithTimeout(t.timeout,(()=>r(!0))).then((e=>No(e,t.preferMp3))).catch((e=>{console.error(e),r(!1)})),!0;case"start-recording-audio":return Io.start().then((()=>r(!0))).catch((e=>{console.error(e),r(!1)})),!0;case"stop-recording-audio":const n=e.message;Io.stop().then((e=>No(e,n.preferMp3)));break;case"copy":const o=e.message;return Co.getSingle("miningHistoryStorageLimit").then((e=>new Jr(e).save({...o,id:o.id??Oo(),timestamp:Date.now()}))).then((()=>r(!0))),!0}};chrome.runtime.onMessage.addListener(e),window.addEventListener("beforeunload",(t=>{chrome.runtime.onMessage.removeListener(e)})),await chrome.runtime.sendMessage({sender:"asbplayer-background-page",message:{command:"background-page-ready"}})||window.close();const t=await Co.getSingle("language");await(async e=>{if(Eo){if(await Eo,!(e in Fo)){const t=await _o(e);go.addResourceBundle(t.lang,"translation",t.strings),Fo[e]=t.lang}const t=Fo[e];go.language!==t&&go.changeLanguage(t)}else Eo=new Promise((async(t,r)=>{try{const r=await _o(e);go.init({resources:{[r.lang]:{translation:r.strings}},lng:r.lang,fallbackLng:r.lang,debug:!1,ns:"translation",defaultNS:"translation",interpolation:{escapeValue:!1}}),Fo[e]=r.lang,t()}catch(e){r(e)}})),await Eo})(t),document.getElementById("helper-text").innerHTML=go.t("extension.backgroundAudioRecordingPage.description")}})()})();
|