Mini Kabibi Habibi
/*! For license information please see coretech.js.LICENSE.txt */
(self.webpackChunkCCD=self.webpackChunkCCD||[]).push([[8087],{692190:(e,t,r)=>{"use strict";r.d(t,{B:()=>n});var n=[]},753974:(e,t,r)=>{"use strict";function n(e){return n="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},n(e)}function a(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||i(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=i(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){u=!0,o=e},f:function(){try{s||null==r.return||r.return()}finally{if(u)throw o}}}}function i(e,t){if(e){if("string"==typeof e)return s(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)?s(e,t):void 0}}function s(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 u(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,(void 0,o=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,"string");if("object"!==n(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(a.key),"symbol"===n(o)?o:String(o)),a)}var o}r.d(t,{z:()=>l});var l=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.nodes={},this.apex=null,this.name=t,this.comparator=r}var t,r;return t=e,(r=[{key:"backup",value:function(){var t=new e(this.name,this.comparator);return t.nodes=JSON.parse(JSON.stringify(this.nodes)),t.apex=this.apex,t}},{key:"restore",value:function(e){this.name=e.name,this.comparator=e.comparator,this.nodes=JSON.parse(JSON.stringify(e.nodes)),this.apex=e.apex}},{key:"insert",value:function(e,t){if(e<=0)throw new Error("avl index ids are required to be numbers greater than zero");var r=this.nodes[e]={id:e,value:t,parent:null,balance:0,height:0,left:null,right:null,siblings:[]};this.apex?this.insertNode(this.nodes[this.apex],r):this.apex=e}},{key:"insertNode",value:function(e,t){switch(this.comparator(t.value,e.value)){case 0:e.siblings.push(t.id),t.parent=e.id;break;case 1:e.right?(this.insertNode(this.nodes[e.right],t),this.updateBalance(e)):(e.right=t.id,t.parent=e.id,this.updateBalance(e));break;case-1:e.left?(this.insertNode(this.nodes[e.left],t),this.updateBalance(e)):(e.left=t.id,t.parent=e.id,this.updateBalance(e));break;default:throw new Error("Invalid comparator result")}if(e.balance<-1){if(null===e.left)throw new Error("insertNode.balance() : left child should not be null");this.nodes[e.left].balance<=0?this.leftLeftCase(e):this.leftRightCase(e)}if(e.balance>1){if(null===e.right)throw new Error("insertNode.balance() : right child should not be null");this.nodes[e.right].balance>=0?this.rightRightCase(e):this.rightLeftCase(e)}return e.height}},{key:"updateBalance",value:function(e){var t=e.left?this.nodes[e.left].height:-1,r=e.right?this.nodes[e.right].height:-1;e.height=t>r?1+t:1+r,e.balance=r-t}},{key:"leftLeftCase",value:function(e){return this.rotateRight(e)}},{key:"leftRightCase",value:function(e){if(!e.left)throw new Error("leftRightCase: left child not set");return e.left=this.rotateLeft(this.nodes[e.left]).id,this.rotateRight(e)}},{key:"rightRightCase",value:function(e){return this.rotateLeft(e)}},{key:"rightLeftCase",value:function(e){if(!e.right)throw new Error("rightLeftCase: right child not set");return e.right=this.rotateRight(this.nodes[e.right]).id,this.rotateLeft(e)}},{key:"rotateLeft",value:function(e){if(!e.right)throw new Error("rotateLeft: right child was unavailable.");var t=e.parent?this.nodes[e.parent]:null,r=this.nodes[e.right];if(e.right=r.left,e.right&&(this.nodes[e.right].parent=e.id),r.left=e.id,r.parent=e.parent,e.parent=r.id,t)if(t.left===e.id)t.left=r.id;else{if(t.right!==e.id)throw new Error("rotateLeft() : attempt to remap parent back to child failed... not found");t.right=r.id}else{if(this.apex!==e.id)throw new Error("rightRotate expecting parentless node to be apex");this.apex=r.id}return this.updateBalance(e),this.updateBalance(r),r}},{key:"rotateRight",value:function(e){if(!e.left)throw new Error("rotateRight : left child unavailable");var t=e.parent?this.nodes[e.parent]:null,r=this.nodes[e.left];if(e.left=r.right,r.right&&(this.nodes[r.right].parent=e.id),r.right=e.id,r.parent=e.parent,e.parent=r.id,t)t.left===e.id?t.left=r.id:t.right=r.id;else{if(this.apex!==e.id)throw new Error("rightRotate expecting parentless node to be apex");this.apex=r.id}return this.updateBalance(e),this.updateBalance(r),r}},{key:"getValuesAsTree",value:function(e){return null===this.apex?null:{id:(e=e||this.nodes[this.apex]).id,val:e.value,siblings:e.siblings,balance:e.balance,height:e.height,left:e.left?this.getValuesAsTree(this.nodes[e.left]):null,right:e.right?this.getValuesAsTree(this.nodes[e.right]):null}}},{key:"update",value:function(e,t){var r=this.nodes[e];0!==this.comparator(r.value,t)&&(this.remove(e),this.insert(e,t))}},{key:"remove",value:function(e){if(!this.apex)throw new Error("remove() : attempting remove when tree has no apex");this.removeNode(this.nodes[this.apex],e)}},{key:"removeNode",value:function(e,t){if(!this.nodes[t])throw new Error("removeNode: attempting to remove a node which is not in hashmap");var r=this.nodes[t].value;switch(this.comparator(r,e.value)){case 0:if(e.siblings.length>0){if(e.id===t){var n=e.siblings.shift(),a=this.nodes[n];a.parent=e.parent,this.updateChildLink(e.parent,t,n),e.left&&(this.nodes[e.left].parent=n),e.right&&(this.nodes[e.right].parent=n),a.left=e.left,a.right=e.right,a.siblings=e.siblings,a.height=e.height,a.balance=e.balance,this.apex===t&&(this.apex=n);var i,s=o(a.siblings);try{for(s.s();!(i=s.n()).done;){var u=i.value;this.nodes[u].parent=n}}catch(e){s.e(e)}finally{s.f()}return void delete this.nodes[t]}var l=e.siblings.indexOf(t);if(-1===l)throw new Error("Unable to remove sibling from parented sibling");return e.siblings.splice(l,1),void delete this.nodes[t]}return e.left||e.right?e.left&&e.right?void this.promoteSuccessor(e):(e.left&&(this.promoteChild(e,this.nodes[e.left]),this.apex===t&&(this.apex=e.left)),void(e.right&&(this.promoteChild(e,this.nodes[e.right]),this.apex===t&&(this.apex=e.right)))):(this.updateChildLink(e.parent,e.id,null),delete this.nodes[t],void(t===this.apex&&(this.apex=null)));case 1:if(!e.right)throw new Error("removeNode: Unable to find value in tree");this.removeNode(this.nodes[e.right],t);break;case-1:if(!e.left)throw new Error("removeNode: Unable to find value in tree");this.removeNode(this.nodes[e.left],t)}if(this.updateBalance(e),e.balance<-1){if(null===e.left)throw new Error("insertNode.balance() : left child should not be null");this.nodes[e.left].balance<=0?this.leftLeftCase(e):this.leftRightCase(e)}if(e.balance>1){if(null===e.right)throw new Error("insertNode.balance() : right child should not be null");this.nodes[e.right].balance>=0?this.rightRightCase(e):this.rightLeftCase(e)}}},{key:"updateChildLink",value:function(e,t,r){if(null!==e){var n=this.nodes[e];n.left===t?n.left=r:n.right===t&&(n.right=r)}}},{key:"promoteChild",value:function(e,t){var r=e.parent;if(r){var n=this.nodes[r];n.left===e.id?n.left=t.id:n.right===e.id&&(n.right=t.id)}t.parent=r,delete this.nodes[e.id]}},{key:"promoteSuccessor",value:function(e){var t=e.id;if(!e.right||!e.left)throw new Error("promoteSuccessor() : node to replace does not have two children");var r,n,a,o=null;if(e.balance<0){var i=this.nodes[e.left];r=(o=this.findGreaterLeaf(i)).id,n=o.value,a=o.siblings,o.siblings=[],this.removeNode(i,r)}else{var s=this.nodes[e.right];r=(o=this.findLesserLeaf(s)).id,n=o.value,a=o.siblings,o.siblings=[],this.removeNode(s,r)}if(e.parent){var u=this.nodes[e.parent];u.left===t&&(u.left=r),u.right===t&&(u.right=r)}e.left&&(this.nodes[e.left].parent=r),e.right&&(this.nodes[e.right].parent=r),e.id=r,e.value=n,e.siblings=a,this.nodes[r]=e,delete this.nodes[t],this.apex===t&&(this.apex=r),this.updateBalance(e)}},{key:"findGreaterLeaf",value:function(e){return e.right&&this.findGreaterLeaf(this.nodes[e.right])||e}},{key:"findLesserLeaf",value:function(e){return e.left&&this.findLesserLeaf(this.nodes[e.left])||e}},{key:"rangeRequest",value:function(e){if(!this.apex)return[];if(!e)return this.collateIds(this.nodes[this.apex]);if("$eq"===e.op){var t=this.locate(this.nodes[this.apex],e.val);return null===t?[]:t.siblings.length?[t.id].concat(a(t.siblings)):[t.id]}return this.collateRequest(this.nodes[this.apex],e)}},{key:"collateRequest",value:function(e,t){var r,n=[];if("$eq"===t.op)throw new Error("collateRequest does not support $eq range request");var o,i,s=this.comparator(e.value,t.val),u=0;if("$between"===t.op){if(null===t.high||void 0===t.high)throw new Error("collateRequest: $between request missing high range value");u=this.comparator(e.value,t.high)}if(e.left)switch(t.op){case"$lt":case"$lte":n=this.collateRequest(this.nodes[e.left],t);break;case"$gt":case"$gte":case"$between":1===s&&(n=this.collateRequest(this.nodes[e.left],t))}if(t)switch(t.op){case"$lt":var l;-1===s&&(n.push(e.id),(l=n).push.apply(l,a(e.siblings)));break;case"$lte":var c;-1!==s&&0!==s||(n.push(e.id),(c=n).push.apply(c,a(e.siblings)));break;case"$gt":var f;1===s&&(n.push(e.id),(f=n).push.apply(f,a(e.siblings)));break;case"$gte":var h;1!==s&&0!==s||(n.push(e.id),(h=n).push.apply(h,a(e.siblings)));break;case"$between":var p;s>=0&&u<=0&&(n.push(e.id),(p=n).push.apply(p,a(e.siblings)))}else n.push(e.id),(o=n).push.apply(o,a(e.siblings));if(e.right)if(t)switch(t.op){case"$lt":case"$lte":var d;-1===s&&(d=n).push.apply(d,a(this.collateRequest(this.nodes[e.right],t)));break;case"$gt":case"$gte":(r=n).push.apply(r,a(this.collateRequest(this.nodes[e.right],t)));break;case"$between":var m;-1===u&&(m=n).push.apply(m,a(this.collateRequest(this.nodes[e.right],t)))}else(i=n).push.apply(i,a(this.collateRequest(this.nodes[e.right],t)));return n}},{key:"collateIds",value:function(e){var t,r,n=[];return e?(e.left&&(n=this.collateIds(this.nodes[e.left])),n.push(e.id),(t=n).push.apply(t,a(e.siblings)),e.right&&(r=n).push.apply(r,a(this.collateIds(this.nodes[e.right]))),n):[]}},{key:"locate",value:function(e,t){for(;null!==e;)switch(this.comparator(t,e.value)){case 0:return e;case 1:if(!e.right)return null;e=this.nodes[e.right];break;case-1:if(!e.left)return null;e=this.nodes[e.left]}return null}},{key:"validateIndex",value:function(){if(!this.apex)return 0===Object.keys(this.nodes).length;if(null!==this.nodes[this.apex].parent)return!1;var e=this.collateIds(this.nodes[this.apex]),t=Object.keys(this.nodes).length;if(e.length!==t)return!1;if(1===e.length)return null===this.nodes[e[0]].parent&&null===this.nodes[e[0]].left&&null===this.nodes[e[0]].right;for(var r=0;r<e.length-1;r++)if(1===this.comparator(this.nodes[e[r]].value,this.nodes[e[r+1]].value))return!1;return this.validateNode(this.nodes[this.apex])}},{key:"validateNode",value:function(e){if(-1!==[e.parent,e.left,e.right].indexOf(e.id))return!1;var t=e.left?this.nodes[e.left].height:-1,r=e.right?this.nodes[e.right].height:-1,n=1+Math.max(t,r);if(e.height!==n)return!1;if(e.balance!==r-t)return!1;if(e.siblings.length>0){var a,i=o(e.siblings);try{for(i.s();!(a=i.n()).done;){var s=a.value;if(this.nodes[s].parent!==e.id)return!1}}catch(e){i.e(e)}finally{i.f()}}if(e.left){if(this.nodes[e.left].parent!==e.id)return!1;if(!this.validateNode(this.nodes[e.left]))return!1}if(e.right){if(this.nodes[e.right].parent!==e.id)return!1;if(!this.validateNode(this.nodes[e.right]))return!1}return!0}}])&&u(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}()},22153:(e,t,r)=>{"use strict";function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},n.apply(this,arguments)}function a(e){return a="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},a(e)}function o(e,t,r){return e instanceof Array?(e.push(r),e[e.length-1]):e instanceof Object?(e[t]=r,e[t]):void 0}function i(e,t){for(var r in e){var n=e[r];n instanceof Date?o(t,r,new Date(n.getTime())):n instanceof Function?o(t,r,n):n instanceof Array?i(n,o(t,r,[])):n instanceof Object?i(n,o(t,r,{})):o(t,r,n)}}function s(e){if(/number|string|boolean/.test(a(e)))return e;if(e instanceof Date)return new Date(e.getTime());var t=e instanceof Array?[]:{};return i(e,t),t}function u(e){var t;if(null==e)return null;switch(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"parse-stringify"){case"parse-stringify":t=JSON.parse(JSON.stringify(e));break;case"deep":t=s(e);break;case"shallow":n(t=Object.create(e.constructor.prototype),e);break;case"shallow-recurse":t=u(e,"shallow");for(var r=Object.keys(e),o=0;o<r.length;o++){var i=r[o];"object"===a(e[i])&&"Object"===e[i].constructor.name&&(t[i]=u(e[i],"shallow-recurse"))}}return t}r.d(t,{d:()=>u})},986492:(e,t,r)=>{"use strict";r.d(t,{F:()=>v});var n=r(274289),a=r(915899),o=r(418311),i=r(83828),s=r(530349),u=r(690386),l=r(22153),c=r(692190);function f(e){return f="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},f(e)}function h(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,(void 0,a=function(e,t){if("object"!==f(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===f(a)?a:String(a)),n)}var a}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function m(e){return e.reduce((function(e,t){return e+t}),0)/e.length}function y(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(void 0===e)return!1;if(n+1===t.length)return r.push(e[t[n]]),!1;var a=e[t[n]];if(Array.isArray(a)){for(var o=0;o<a.length;o++)y(a[o],t,r,n+1);return!0}return y(a,t,r,n+1)}var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(_,e);var t,r,n,v,g,b=(v=_,g=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,t=d(v);if(g){var r=d(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===f(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function _(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,_),(t=b.call(this))._data=[],t._idIndex=[],t._rangedIndexes={},t._lokimap={},t._unindexedSortComparator="js",t._defaultLokiOperatorPackage="js",t._constraints={unique:{}},t._transforms={},t._dirty=!0,t._cached=null,t._nestedProperties=[],t._ttl={age:null,ttlInterval:null,daemon:null},t._maxId=0,t._dynamicViews=[],t._changes=[],t._stages={},t._commitLog=[],r&&!0===r.disableMeta){if(!1===r.disableChangesApi)throw new Error("disableMeta option cannot be passed as true when disableChangesApi is passed as false");if(!1===r.disableDeltaChangesApi)throw new Error("disableMeta option cannot be passed as true when disableDeltaChangesApi is passed as false");if("number"==typeof r.ttl&&r.ttl>0)throw new Error("disableMeta option cannot be passed as true when ttl is enabled")}if(t.name=e,t._unindexedSortComparator=r.unindexedSortComparator||"js",t._defaultLokiOperatorPackage=r.defaultLokiOperatorPackage||"js",void 0!==r.unique&&(Array.isArray(r.unique)||(r.unique=[r.unique]),r.unique.forEach((function(e){t._constraints.unique[e]=new a.P(e)}))),void 0!==c.B.FullTextSearch?t._fullTextSearch=void 0!==r.fullTextSearch?new c.B.FullTextSearch(r.fullTextSearch):null:t._fullTextSearch=null,t._transactional=void 0!==r.transactional&&r.transactional,t._cloneObjects=void 0!==r.clone&&r.clone,t._asyncListeners=void 0!==r.asyncListeners&&r.asyncListeners,t._disableMeta=void 0!==r.disableMeta&&r.disableMeta,t._disableChangesApi=void 0===r.disableChangesApi||r.disableChangesApi,t._disableDeltaChangesApi=void 0===r.disableDeltaChangesApi||r.disableDeltaChangesApi,t._cloneMethod=void 0!==r.cloneMethod?r.cloneMethod:"deep",t._disableChangesApi&&(t._disableDeltaChangesApi=!0),t._serializableIndexes=void 0===r.serializableIndexes||r.serializableIndexes,null!=r.nestedProperties)for(var n=0;n<r.nestedProperties.length;n++){var o=r.nestedProperties[n];"string"==typeof o?t._nestedProperties.push({name:o,path:o.split(".")}):t._nestedProperties.push(o)}t.setTTL(r.ttl||-1,r.ttlInterval),t._events={insert:[],update:[],"pre-insert":[],"pre-update":[],close:[],flushbuffer:[],error:[],delete:[],warning:[]},t._ensureId();var i=r.rangedIndexes||{};for(var s in i)t.ensureRangedIndex(s,i[s].indexTypeName,i[s].comparatorName);return t.setChangesApi(t._disableChangesApi,t._disableDeltaChangesApi),t.flushChanges(),t}return t=_,r=[{key:"toJSON",value:function(){return{name:this.name,unindexedSortComparator:this._unindexedSortComparator,defaultLokiOperatorPackage:this._defaultLokiOperatorPackage,_dynamicViews:this._dynamicViews,uniqueNames:Object.keys(this._constraints.unique),transforms:this._transforms,rangedIndexes:this._rangedIndexes,_data:this._data,idIndex:this._idIndex,maxId:this._maxId,_dirty:this._dirty,_nestedProperties:this._nestedProperties,transactional:this._transactional,asyncListeners:this._asyncListeners,disableMeta:this._disableMeta,disableChangesApi:this._disableChangesApi,disableDeltaChangesApi:this._disableDeltaChangesApi,cloneObjects:this._cloneObjects,cloneMethod:this._cloneMethod,changes:this._changes,_fullTextSearch:this._fullTextSearch}}},{key:"addTransform",value:function(e,t){if(void 0!==this._transforms[e])throw new Error("a transform by that name already exists");this._transforms[e]=t}},{key:"getTransform",value:function(e){return this._transforms[e]}},{key:"setTransform",value:function(e,t){this._transforms[e]=t}},{key:"removeTransform",value:function(e){delete this._transforms[e]}},{key:"setTTL",value:function(e,t){var r=this;e<0?clearInterval(this._ttl.daemon):(this._ttl.age=e,this._ttl.ttlInterval=t,this._ttl.daemon=setInterval((function(){var e=Date.now();r.chain().where((function(t){var n=t.meta.updated||t.meta.created,a=e-n;return r._ttl.age<a})).remove()}),t))}},{key:"_prepareFullDocIndex",value:function(){for(var e=new Array(this._data.length),t=0;t<e.length;t++)e[t]=t;return e}},{key:"ensureIndex",value:function(e,t,r){this.ensureRangedIndex(e,t,r)}},{key:"ensureRangedIndex",value:function(e,t,r){if(t=t||"avl",r=r||"loki",!s.X[t])throw new Error("ensureRangedIndex: Unknown range index type");if(!u.O[r])throw new Error("ensureRangedIndex: Unknown comparator");var n=s.X[t],a=u.O[r];this._rangedIndexes[e]={index:n(e,a),indexTypeName:t,comparatorName:r};for(var o=this._rangedIndexes[e].index,i=0;i<this._data.length;i++)o.insert(this._data[i].$loki,this._data[i][e])}},{key:"ensureUniqueIndex",value:function(e){var t=new a.P(e);this._constraints.unique[e]=t;for(var r=0;r<this._data.length;r++)t.set(this._data[r].$loki,this._data[r][e]);return t}},{key:"count",value:function(e){return e?this.chain().find(e)._filteredRows.length:this._data.length}},{key:"_ensureId",value:function(){this._idIndex=[];for(var e=0;e<this._data.length;e++)this._idIndex.push(this._data[e].$loki)}},{key:"addDynamicView",value:function(e,t){var r=new i.H(this,e,t);return this._dynamicViews.push(r),r}},{key:"removeDynamicView",value:function(e){for(var t=0;t<this._dynamicViews.length;t++)this._dynamicViews[t].name===e&&this._dynamicViews.splice(t,1)}},{key:"getDynamicView",value:function(e){for(var t=0;t<this._dynamicViews.length;t++)if(this._dynamicViews[t].name===e)return this._dynamicViews[t];return null}},{key:"findAndUpdate",value:function(e,t){this.chain().find(e).update(t)}},{key:"findAndRemove",value:function(e){this.chain().find(e).remove()}},{key:"insert",value:function(e){if(!Array.isArray(e))return this.insertOne(e);var t,r=[];this.emit("pre-insert",e);for(var n=0;n<e.length;n++){if(!(t=this.insertOne(e[n],!0)))return;r.push(t)}return this.emit("insert",r),1===(r=this._cloneObjects?(0,l.d)(r,this._cloneMethod):r).length?r[0]:r}},{key:"insertOne",value:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=null;if("object"!==f(e)?n=new TypeError("Document needs to be an object"):null===e&&(n=new TypeError("Object cannot be null")),null!==n)throw this.emit("error",n),n;var a=this._defineNestedProperties(this._cloneObjects?(0,l.d)(e,this._cloneMethod):e);if(this._disableMeta||void 0!==a.meta||(a.meta={version:0,revision:0,created:0}),r||this.emit("pre-insert",a),this._add(a))return this._disableChangesApi?this._insertMeta(a):this._insertMetaWithChange(a),t=this._cloneObjects?(0,l.d)(a,this._cloneMethod):a,r||this.emit("insert",t),t}},{key:"_defineNestedProperties",value:function(e){for(var t=this,r=function(){var r=t._nestedProperties[n].name,a=t._nestedProperties[n].path;Object.defineProperty(e,r,{get:function(){var e=[];return y(this,a,e)?e:e[0]},set:function(e){a.slice(0,a.length-1).reduce((function(e,t){return e&&e[t]?e[t]:null}),this)[a[a.length-1]]=e},enumerable:!1,configurable:!0})},n=0;n<this._nestedProperties.length;n++)r();return e}},{key:"clear",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).removeIndices,t=void 0!==e&&e;if(this._data=[],this._idIndex=[],this._cached=null,this._maxId=0,this._dynamicViews=[],this._dirty=!0,!0===t)this._rangedIndexes={},this._constraints={unique:{}};else{for(var r in this._rangedIndexes)this.ensureRangedIndex(r,this._rangedIndexes[r].indexTypeName,this._rangedIndexes[r].comparatorName);for(var n=Object.keys(this._constraints.unique),a=0;a<n.length;a++)this._constraints.unique[n[a]].clear()}null!==this._fullTextSearch&&this._fullTextSearch.clear()}},{key:"update",value:function(e){var t=this;if(Array.isArray(e))for(var r=0;r<e.length;r++)this.update(e[r]);else{if(void 0===e.$loki)throw new Error("Trying to update unsynced document. Please save the document first by using insert() or addMany()");try{this.startTransaction();var n=this.get(e.$loki,!0);if(!n)throw new Error("Trying to update a document not in collection.");var a=n[0],o=n[1],i=this._defineNestedProperties(this._cloneObjects||!this._disableDeltaChangesApi?(0,l.d)(e,this._cloneMethod):e);this.emit("pre-update",e),Object.keys(this._constraints.unique).forEach((function(e){t._constraints.unique[e].update(i.$loki,i[e])})),this._data[o]=i,this._lokimap[e.$loki]=i;for(var s=0;s<this._dynamicViews.length;s++)this._dynamicViews[s]._evaluateDocument(o,!1);for(var u in this._rangedIndexes)this._rangedIndexes[u].index.update(e.$loki,e[u]);this._idIndex[o]=i.$loki,null!==this._fullTextSearch&&this._fullTextSearch.updateDocument(e,o),this.commit(),this._dirty=!0,this._disableChangesApi?this._updateMeta(i):this._updateMetaWithChange(i,a);var c=i;this._cloneObjects&&(c=(0,l.d)(i,this._cloneMethod)),this.emit("update",c,a)}catch(e){throw this.rollback(),this.emit("error",e),e}}}},{key:"_add",value:function(e){if("object"!==f(e))throw new TypeError("Object being added needs to be an object");if(void 0!==e.$loki)throw new Error("Document is already in collection, please use update()");try{this.startTransaction(),this._maxId++,isNaN(this._maxId)&&(this._maxId=this._data[this._data.length-1].$loki+1);var t=e;t.$loki=this._maxId,this._disableMeta||(t.meta.version=0);var r=this._constraints.unique;for(var n in r)void 0!==r[n]&&r[n].set(t.$loki,t[n]);this._idIndex.push(t.$loki),this._lokimap[t.$loki]=t,this._data.push(t);for(var a=this._data.length-1,o=this._dynamicViews.length,i=0;i<o;i++)this._dynamicViews[i]._evaluateDocument(a,!0);for(var s in this._rangedIndexes)this._serializableIndexes&&t[s]instanceof Date&&(t[s]=t[s].getTime()),this._rangedIndexes[s].index.insert(e.$loki,e[s]);return null!==this._fullTextSearch&&this._fullTextSearch.addDocument(t,a),this.commit(),this._dirty=!0,this._cloneObjects?(0,l.d)(t,this._cloneMethod):t}catch(e){throw this.rollback(),this.emit("error",e),e}}},{key:"updateWhere",value:function(e,t){var r=this.where(e);try{for(var n=0;n<r.length;n++)this.update(t(r[n]))}catch(e){throw this.rollback(),e}}},{key:"removeWhere",value:function(e){this.remove(this._data.filter(e))}},{key:"removeDataOnly",value:function(){this.remove(this._data.slice())}},{key:"remove",value:function(e){var t=this;if("number"==typeof e&&(e=this.get(e)),Array.isArray(e))for(var r=0,n=e.length;r<n;r++)this.remove(e[r]);else{if(void 0===e.$loki)throw new Error("Object is not a document stored in the collection");try{this.startTransaction();var a=this.get(e.$loki,!0),o=a[1],i="number"==typeof e?this.get(e):e;Object.keys(this._constraints.unique).forEach((function(e){e in i&&t._constraints.unique[e].remove(i.$loki)}));for(var s=0;s<this._dynamicViews.length;s++)this._dynamicViews[s]._removeDocument(o);for(var u in this._data.splice(o,1),this._idIndex.splice(o,1),delete this._lokimap[e.$loki],this._rangedIndexes)this._rangedIndexes[u].index.remove(e.$loki);null!==this._fullTextSearch&&this._fullTextSearch.removeDocument(e,o),this.commit(),this._dirty=!0,this._disableChangesApi||this._createChange(this.name,"R",a[0]),this.emit("delete",a[0]),delete e.$loki,delete e.meta}catch(e){throw this.rollback(),this.emit("error",e),e}}}},{key:"getChanges",value:function(){return this._changes}},{key:"setChangesApi",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this._disableChangesApi=e,this._disableDeltaChangesApi=!!e||t}},{key:"flushChanges",value:function(){this._changes=[]}},{key:"_getObjectDelta",value:function(e,t){var r=null!==t&&"object"===f(t)?Object.keys(t):null;if(r&&r.length&&["string","boolean","number"].indexOf(f(t))<0){for(var n={},a=0;a<r.length;a++){var o=r[a];if(t.hasOwnProperty(o))if(e.hasOwnProperty(o)&&void 0===this._constraints.unique[o]&&"$loki"!==o&&"meta"!==o){var i=this._getObjectDelta(e[o],t[o]);void 0!==i&&i!=={}&&(n[o]=i)}else n[o]=t[o]}return 0===Object.keys(n).length?void 0:n}return e===t?void 0:t}},{key:"_getChangeDelta",value:function(e,t){return t?this._getObjectDelta(t,e):JSON.parse(JSON.stringify(e))}},{key:"_createChange",value:function(e,t,r,n){this._changes.push({name:e,operation:t,obj:"U"!==t||this._disableDeltaChangesApi?JSON.parse(JSON.stringify(r)):this._getChangeDelta(r,n)})}},{key:"_createInsertChange",value:function(e){this._createChange(this.name,"I",e)}},{key:"_createUpdateChange",value:function(e,t){this._createChange(this.name,"U",e,t)}},{key:"_insertMetaWithChange",value:function(e){this._insertMeta(e),this._createInsertChange(e)}},{key:"_updateMetaWithChange",value:function(e,t){this._updateMeta(e),this._createUpdateChange(e,t)}},{key:"_insertMeta",value:function(e){this._disableMeta||(e.meta||(e.meta={version:0,revision:0,created:0}),e.meta.created=(new Date).getTime(),e.meta.revision=0)}},{key:"_updateMeta",value:function(e){this._disableMeta||(e.meta.updated=(new Date).getTime(),e.meta.revision+=1)}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!t){var r=this._lokimap[e];return void 0===r?null:r}var n=this._idIndex,a=n.length-1,o=0,i=o+a>>1;if(e="number"==typeof e?e:parseInt(e,10),isNaN(e))throw new TypeError("Passed id is not an integer");for(;n[o]<n[a];)n[i=o+a>>1]<e?o=i+1:a=i;return a===o&&n[o]===e?t?[this._data[o],o]:this._data[o]:null}},{key:"by",value:function(e,t){var r=this._constraints.unique[e].get(t);return this._cloneObjects?(0,l.d)(this._lokimap[r],this._cloneMethod):this._lokimap[r]}},{key:"findOne",value:function(e){e=e||{};var t=this.chain().find(e,!0).data();return Array.isArray(t)&&0===t.length?null:this._cloneObjects?(0,l.d)(t[0],this._cloneMethod):t[0]}},{key:"chain",value:function(e,t){var r=new o.Z(this);return void 0===e?r:r.transform(e,t)}},{key:"find",value:function(e){return this.chain().find(e).data()}},{key:"findOneUnindexed",value:function(e,t){for(var r=this._data.length;r--;)if(this._data[r][e]===t)return this._data[r];return null}},{key:"startTransaction",value:function(){if(this._transactional){var e={};for(var t in this._rangedIndexes)e[t].indexTypeName=this._rangedIndexes[t].indexTypeName,e[t].comparatorName=this._rangedIndexes[t].comparatorName,e[t].index=this._rangedIndexes[t].index.backup();this._cached={index:this._idIndex,data:(0,l.d)(this._data,this._cloneMethod),rangedIndexes:e};for(var r=0;r<this._dynamicViews.length;r++)this._dynamicViews[r].startTransaction()}}},{key:"commit",value:function(){if(this._transactional){this._cached=null;for(var e=0;e<this._dynamicViews.length;e++)this._dynamicViews[e].commit()}}},{key:"rollback",value:function(){if(this._transactional&&null!==this._cached){this._idIndex=this._cached.index,this._data=this._cached.data;for(var e=0;e<this._data.length;e++)this._data[e]=this._defineNestedProperties(this._data[e]);for(var t in this._cached.rangedIndexes){var r=this._cached.rangedIndexes[t],n=(0,s.X[r.indexTypeName])(t,u.O[r.comparatorName]);n.restore(r.index),this._rangedIndexes[t].index=n}for(var a=0;a<this._dynamicViews.length;a++)this._dynamicViews[a].rollback()}}},{key:"where",value:function(e){return this.chain().where(e).data()}},{key:"mapReduce",value:function(e,t){return t(this._data.map(e))}},{key:"eqJoin",value:function(e,t,r,n,a){return new o.Z(this).eqJoin(e,t,r,n,a)}},{key:"getStage",value:function(e){return this._stages[e]||(this._stages[e]={}),this._stages[e]}},{key:"stage",value:function(e,t){var r=JSON.parse(JSON.stringify(t));return this.getStage(e)[t.$loki]=r,r}},{key:"commitStage",value:function(e,t){var r=this.getStage(e),n=(new Date).getTime();for(var a in r)this.update(r[a]),this._commitLog.push({timestamp:n,message:t,data:JSON.parse(JSON.stringify(r[a]))});this._stages[e]={}}},{key:"extract",value:function(e){for(var t=[],r=0;r<this._data.length;r++)t.push(this._data[r][e]);return t}},{key:"min",value:function(e){return Math.min.apply(null,this.extractNumerical(e))}},{key:"max",value:function(e){return Math.max.apply(null,this.extractNumerical(e))}},{key:"minRecord",value:function(e){var t={index:0,value:0};if(0===this._data.length)return t.index=null,t.value=null,t;t.index=this._data[0].$loki,t.value=parseFloat(this._data[0][e]);for(var r=1;r<this._data.length;r++){var n=parseFloat(this._data[r][e]);t.value>n&&(t.value=n,t.index=this._data[r].$loki)}return t}},{key:"maxRecord",value:function(e){var t={index:0,value:0};if(0===this._data.length)return t.index=null,t.value=null,t;t.index=this._data[0].$loki,t.value=parseFloat(this._data[0][e]);for(var r=1;r<this._data.length;r++){var n=parseFloat(this._data[r][e]);t.value<n&&(t.value=n,t.index=this._data[r].$loki)}return t}},{key:"extractNumerical",value:function(e){return this.extract(e).map(parseFloat).filter(Number).filter((function(e){return!isNaN(e)}))}},{key:"avg",value:function(e){return m(this.extractNumerical(e))}},{key:"stdDev",value:function(e){return t=this.extractNumerical(e),r=m(t),n=m(t.map((function(e){var t=e-r;return t*t}))),Math.sqrt(n);var t,r,n}},{key:"mode",value:function(e){for(var t={},r=this.extractNumerical(e),n=r[0],a=-1/0,o=0;o<r.length;o++){var i=r[o];t[i]?t[i]++:t[i]=1,t[i]>a&&(n=i,a=t[i])}return n}},{key:"median",value:function(e){var t=this.extractNumerical(e);t.sort((function(e,t){return e-t}));var r=Math.floor(t.length/2);return t.length%2?t[r]:(t[r-1]+t[r])/2}}],n=[{key:"fromJSONObject",value:function(e,t){var r=new _(e.name,{disableChangesApi:e.disableChangesApi,disableDeltaChangesApi:e.disableDeltaChangesApi,unindexedSortComparator:e.unindexedSortComparator,defaultLokiOperatorPackage:e.defaultLokiOperatorPackage});if(r._transactional=e.transactional,r._asyncListeners=e.asyncListeners,r._disableMeta=e.disableMeta,r._disableChangesApi=e.disableChangesApi,r._cloneObjects=e.cloneObjects,r._cloneMethod=e.cloneMethod||"deep",r._changes=e.changes,r._nestedProperties=e._nestedProperties,r._rangedIndexes=e.rangedIndexes||{},r._dirty=!(!t||!0!==t.retainDirtyFlags)&&e._dirty,t&&void 0!==t[e.name])for(var n=function(e){var r=t[e.name];if(r.proto){var n=r.inflate||function(e,t){for(var r in e)t[r]=e[r]};return function(e){var t=new r.proto;return n(e,t),t}}return r.inflate}(e),a=0;a<e._data.length;a++)r._data[a]=r._defineNestedProperties(n(e._data[a])),r._lokimap[r._data[a].$loki]=r._data[a];else for(var o=0;o<e._data.length;o++)r._data[o]=r._defineNestedProperties(e._data[o]),r._lokimap[r._data[o].$loki]=r._data[o];for(var l in r._maxId=void 0===e.maxId?0:e.maxId,r._idIndex=e.idIndex,void 0!==e.transforms&&(r._transforms=e.transforms),e.rangedIndexes){var f=e.rangedIndexes[l],h=(0,s.X[f.indexTypeName])(l,u.O[f.comparatorName]);h.restore(f.index),r._rangedIndexes[l].index=h}if(r._ensureId(),void 0!==e.uniqueNames)for(var p=0;p<e.uniqueNames.length;p++)r.ensureUniqueIndex(e.uniqueNames[p]);if(void 0!==e._dynamicViews)for(var d=0;d<e._dynamicViews.length;d++)r._dynamicViews.push(i.H.fromJSONObject(r,e._dynamicViews[d]));return e._fullTextSearch&&(r._fullTextSearch=c.B.FullTextSearch.fromJSONObject(e._fullTextSearch,t.fullTextSearch)),r}}],r&&h(t.prototype,r),n&&h(t,n),Object.defineProperty(t,"prototype",{writable:!1}),_}(n.P)},690386:(e,t,r)=>{"use strict";r.d(t,{O:()=>a});var n=r(679330),a={js:function(e,t){return e===t?0:e<t?-1:1},"abstract-js":function(e,t){return e==t?0:e<t?-1:1},"abstract-date":function(e,t){var r=new Date(e).toISOString(),n=new Date(t).toISOString();return r==n?0:r<n?-1:1},loki:function(e,t){return(0,n.GX)(e,t)?0:(0,n.JZ)(e,t,!1)?-1:1}}},83828:(e,t,r)=>{"use strict";r.d(t,{H:()=>l});var n=r(274289),a=r(418311);function o(e){return o="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},o(e)}function i(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,(void 0,a=function(e,t){if("object"!==o(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===o(a)?a:String(a)),n)}var a}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}var l=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(h,e);var t,r,n,l,c,f=(l=h,c=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,t=u(l);if(c){var r=u(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function h(e,t){var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,h),(r=f.call(this))._rebuildPending=!1,r._resultData=[],r._resultDirty=!1,r._cachedResultSet=null,r._filterPipeline=[],r._sortFunction=null,r._sortCriteria=null,r._sortCriteriaSimple=null,r._sortByScoring=null,r._sortDirty=!1;var o=n.persistent;r._persistent=void 0!==o&&o;var i=n.sortPriority;r._sortPriority=void 0===i?"passive":i;var s=n.minRebuildInterval;return r._minRebuildInterval=void 0===s?1:s,r._collection=e,r.name=t,r._resultSet=new a.Z(e),r._events={rebuild:[]},r}return t=h,r=[{key:"_rematerialize",value:function(e){var t=e.removeWhereFilters,r=void 0!==t&&t;if(this._resultData=[],this._resultDirty=!0,this._resultSet=new a.Z(this._collection),(this._sortFunction||this._sortCriteria||this._sortCriteriaSimple||null!==this._sortByScoring)&&(this._sortDirty=!0),r)for(var n=this._filterPipeline.length;n--;)"where"===this._filterPipeline[n].type&&(n!==this._filterPipeline.length-1&&(this._filterPipeline[n]=this._filterPipeline[this._filterPipeline.length-1]),this._filterPipeline.length--);var o=this._filterPipeline;this._filterPipeline=[];for(var i=0;i<o.length;i++)this.applyFind(o[i].val);return this.data(),this.emit("rebuild",this),this}},{key:"branchResultSet",value:function(e,t){var r=this._resultSet.copy();return void 0===e?r:r.transform(e,t)}},{key:"toJSON",value:function(){return{name:this.name,_persistent:this._persistent,_sortPriority:this._sortPriority,_minRebuildInterval:this._minRebuildInterval,_resultSet:this._resultSet,_filterPipeline:this._filterPipeline,_sortCriteria:this._sortCriteria,_sortCriteriaSimple:this._sortCriteriaSimple,_sortByScoring:this._sortByScoring,_sortDirty:this._sortDirty}}},{key:"removeFilters",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).queueSortPhase,t=void 0!==e&&e;this._rebuildPending=!1,this._resultSet.reset(),this._resultData=[],this._resultDirty=!0,this._cachedResultSet=null,this._filterPipeline=[],this._sortFunction=null,this._sortCriteria=null,this._sortCriteriaSimple=null,this._sortByScoring=null,this._sortDirty=!1,!0===t&&this._queueSortPhase()}},{key:"applySort",value:function(e){return this._sortFunction=e,this._sortCriteria=null,this._sortCriteriaSimple=null,this._sortByScoring=null,this._queueSortPhase(),this}},{key:"applySimpleSort",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this._sortCriteriaSimple={field:e,options:t},this._sortFunction=null,this._sortCriteria=null,this._sortByScoring=null,this._queueSortPhase(),this}},{key:"applySortCriteria",value:function(e){return this._sortCriteria=e,this._sortCriteriaSimple=null,this._sortFunction=null,this._sortByScoring=null,this._queueSortPhase(),this}},{key:"applySortByScoring",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._sortFunction=null,this._sortCriteria=null,this._sortCriteriaSimple=null,this._sortByScoring=e,this._queueSortPhase(),this}},{key:"getScoring",value:function(){return this._resultSet.getScoring()}},{key:"startTransaction",value:function(){return this._cachedResultSet=this._resultSet.copy(),this}},{key:"commit",value:function(){return this._cachedResultSet=null,this}},{key:"rollback",value:function(){return this._resultSet=this._cachedResultSet,this._persistent&&(this._resultData=this._resultSet.data(),this.emit("rebuild",this)),this}},{key:"_indexOfFilterWithId",value:function(e){if("string"==typeof e||"number"==typeof e)for(var t=0,r=this._filterPipeline.length;t<r;t++)if(e===this._filterPipeline[t].uid)return t;return-1}},{key:"_addFilter",value:function(e){this._filterPipeline.push(e),this._resultSet[e.type](e.val)}},{key:"reapplyFilters",value:function(){this._resultSet.reset(),this._cachedResultSet=null,this._persistent&&(this._resultData=[],this._resultDirty=!0);var e=this._filterPipeline;this._filterPipeline=[];for(var t=0,r=e.length;t<r;t++)this._addFilter(e[t]);return this._sortFunction||this._sortCriteria||this._sortCriteriaSimple||null!==this._sortByScoring?this._queueSortPhase():this._queueRebuildEvent(),this}},{key:"applyFilter",value:function(e){var t=this._indexOfFilterWithId(e.uid);return t>=0?(this._filterPipeline[t]=e,this.reapplyFilters()):(this._cachedResultSet=null,this._persistent&&(this._resultData=[],this._resultDirty=!0),this._addFilter(e),this._sortFunction||this._sortCriteria||this._sortCriteriaSimple||null!==this._sortByScoring?this._queueSortPhase():this._queueRebuildEvent(),this)}},{key:"applyFind",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return this.applyFilter({type:"find",val:e,uid:t}),this}},{key:"applyWhere",value:function(e,t){return this.applyFilter({type:"where",val:e,uid:t}),this}},{key:"removeFilter",value:function(e){var t=this._indexOfFilterWithId(e);if(t<0)throw new Error("Dynamic view does not contain a filter with ID: "+e);return this._filterPipeline.splice(t,1),this.reapplyFilters(),this}},{key:"count",value:function(){return this._resultDirty&&(this._resultData=this._resultSet.data()),this._resultSet.count()}},{key:"data",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(this._sortDirty||this._resultDirty)&&this._performSortPhase({suppressRebuildEvent:!0}),this._persistent?this._resultData:this._resultSet.data(e)}},{key:"_queueRebuildEvent",value:function(){var e=this;this._rebuildPending||(this._rebuildPending=!0,setTimeout((function(){e._rebuildPending&&(e._rebuildPending=!1,e.emit("rebuild",e))}),this._minRebuildInterval))}},{key:"_queueSortPhase",value:function(){var e=this;this._sortDirty||(this._sortDirty=!0,"active"===this._sortPriority?setTimeout((function(){e._performSortPhase()}),this._minRebuildInterval):this._queueRebuildEvent())}},{key:"_performSortPhase",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(this._sortDirty||this._resultDirty)&&(this._sortDirty&&(this._sortFunction?this._resultSet.sort(this._sortFunction):this._sortCriteria?this._resultSet.compoundsort(this._sortCriteria):this._sortCriteriaSimple?this._resultSet.simplesort(this._sortCriteriaSimple.field,this._sortCriteriaSimple.options):null!==this._sortByScoring&&this._resultSet.sortByScoring(this._sortByScoring),this._sortDirty=!1),this._persistent&&(this._resultData=this._resultSet.data(),this._resultDirty=!1),e.suppressRebuildEvent||this.emit("rebuild",this))}},{key:"_evaluateDocument",value:function(e,t){if(!this._resultSet._filterInitialized)return this._persistent&&(this._resultData=this._resultSet.data()),void(this._sortFunction||this._sortCriteria||this._sortCriteriaSimple?this._queueSortPhase():this._queueRebuildEvent());var r,n=this._resultSet._filteredRows,o=t?-1:n.indexOf(+e),i=n.length,s=new a.Z(this._collection);s._filteredRows=[e],s._filterInitialized=!0;for(var u=0,l=this._filterPipeline.length;u<l;u++)s[(r=this._filterPipeline[u]).type](r.val);var c=0===s._filteredRows.length?-1:0;return-1!==o||-1!==c?-1===o&&-1!==c?(n.push(e),this._persistent&&this._resultData.push(this._collection._data[e]),void(this._sortFunction||this._sortCriteria||this._sortCriteriaSimple?this._queueSortPhase():this._queueRebuildEvent())):-1!==o&&-1===c?(o<i-1?(n.splice(o,1),this._persistent&&this._resultData.splice(o,1)):(n.length=i-1,this._persistent&&(this._resultData.length=i-1)),void(this._sortFunction||this._sortCriteria||this._sortCriteriaSimple?this._queueSortPhase():this._queueRebuildEvent())):void(-1!==o&&-1!==c&&(this._persistent&&(this._resultData[o]=this._collection._data[e]),this._sortFunction||this._sortCriteria||this._sortCriteriaSimple?this._queueSortPhase():this._queueRebuildEvent())):void 0}},{key:"_removeDocument",value:function(e){if(!this._resultSet._filterInitialized)return this._persistent&&(this._resultData=this._resultSet.data()),void(this._sortFunction||this._sortCriteria||this._sortCriteriaSimple?this._queueSortPhase():this._queueRebuildEvent());var t=this._resultSet._filteredRows,r=t.indexOf(+e),n=t.length;-1!==r&&(r<n-1?(t[r]=t[n-1],t.length=n-1,this._persistent&&(this._resultData[r]=this._resultData[n-1],this._resultData.length=n-1)):(t.length=n-1,this._persistent&&(this._resultData.length=n-1)),this._sortFunction||this._sortCriteria||this._sortCriteriaSimple?this._queueSortPhase():this._queueRebuildEvent()),n=t.length;for(var a=0;a<n;a++)t[a]>e&&t[a]--}},{key:"mapReduce",value:function(e,t){try{return t(this.data().map(e))}catch(e){throw e}}}],n=[{key:"fromJSONObject",value:function(e,t){var r=new h(e,t.name);return r._resultDirty=!0,r._filterPipeline=t._filterPipeline,r._resultData=[],r._sortCriteria=t._sortCriteria,r._sortCriteriaSimple=t._sortCriteriaSimple,r._sortByScoring=t._sortByScoring,r._sortDirty=t._sortDirty,r._resultSet._filteredRows=t._resultSet._filteredRows,r._resultSet._filterInitialized=t._resultSet._filterInitialized,r._rematerialize({removeWhereFilters:!0}),r}}],r&&i(t.prototype,r),n&&i(t,n),Object.defineProperty(t,"prototype",{writable:!1}),h}(n.P)},274289:(e,t,r)=>{"use strict";function n(e){return n="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},n(e)}function a(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,(void 0,o=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,"string");if("object"!==n(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(a.key),"symbol"===n(o)?o:String(o)),a)}var o}r.d(t,{P:()=>o});var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._events={},this._asyncListeners=!1}var t,r;return t=e,r=[{key:"on",value:function(e,t){var r,n=this;return Array.isArray(e)?(e.forEach((function(e){n.on(e,t)})),t):((r=this._events[e])||(r=this._events[e]=[]),r.push(t),t)}},{key:"emit",value:function(e){for(var t=this,r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];e&&this._events[e]&&this._events[e].forEach((function(e){t._asyncListeners?setTimeout((function(){e.apply(void 0,n)}),1):e.apply(void 0,n)}))}},{key:"addListener",value:function(e,t){return this.on(e,t)}},{key:"removeListener",value:function(e,t){var r=this;if(Array.isArray(e)&&e.forEach((function(e){r.removeListener(e,t)})),this._events[e]){var n=this._events[e];n.splice(n.indexOf(t),1)}}}],r&&a(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}()},97802:(e,t,r)=>{"use strict";r.d(t,{ZP:()=>o});var n=r(386129),a=r(986492);n.R.Collection=a.F;const o=n.R},386129:(e,t,r)=>{"use strict";r.d(t,{R:()=>p});var n=r(274289),a=r(986492),o=r(692190),i=r(690386),s=r(530349),u=r(679330);function l(e){return l="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},l(e)}function c(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,(void 0,a=function(e,t){if("object"!==l(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===l(a)?a:String(a)),n)}var a}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(m,e);var t,r,n,p,d=(n=m,p=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,t=h(n);if(p){var r=h(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===l(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function m(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"loki.db",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,m),(e=d.call(this)).databaseVersion=1.5,e.engineVersion=1.5,e._persistenceMethod=null,e._persistenceAdapter=null,e._throttledSaves=!0,e._throttledSaveRunning=null,e._throttledSavePending=null,e._autosave=!1,e._autosaveInterval=5e3,e._autosaveRunning=!1,e._autosaveHandler=Promise.resolve(),e.filename=t,e._collections=[];var n=r.serializationMethod;e._serializationMethod=void 0===n?"normal":n;var a=r.destructureDelimiter;e._destructureDelimiter=void 0===a?"$<\n":a;var o=r.env;if(e._env=void 0===o?"BROWSER":o,e._events={init:[],loaded:[],flushChanges:[],close:[],changes:[],warning:[]},r.comparatorMap)for(var l in r.comparatorMap)i.O[l]=r.comparatorMap[l];if(r.rangedIndexFactoryMap)for(var c in r.rangedIndexFactoryMap)s.X[c]=r.rangedIndexFactoryMap[c];if(r.lokiOperatorPackageMap)for(var f in r.lokiOperatorPackageMap)u.yo[f]=r.lokiOperatorPackageMap[f];return e.on("init",e.clearChanges),e}return t=m,r=[{key:"initializePersistence",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=this._autosaveDisable(),n=t.autosave;this._autosave=void 0!==n&&n;var a=t.autosaveInterval;this._autosaveInterval=void 0===a?5e3:a,this._persistenceMethod=t.persistenceMethod;var i=t.throttledSaves;this._throttledSaves=void 0===i||i;var s={"fs-storage":o.B.FSStorage,"local-storage":o.B.LocalStorage,"indexed-storage":o.B.IndexedStorage,"memory-storage":o.B.MemoryStorage};if(void 0!==this._persistenceMethod){if("function"!=typeof s[this._persistenceMethod])throw Error("Unknown persistence method.");this._persistenceAdapter=new s[this._persistenceMethod]}if(void 0!==t.adapter&&(this._persistenceMethod="adapter",this._persistenceAdapter=t.adapter),null===this._persistenceAdapter){var u={NODEJS:["fs-storage"],BROWSER:["local-storage","indexed-storage"],CORDOVA:["local-storage","indexed-storage"],MEMORY:["memory-storage"]}[this._env];if(u)for(var l=0;l<u.length;l++)if(s[u[l]]){this._persistenceMethod=u[l],this._persistenceAdapter=new s[u[l]];break}}return t.autoload&&(r=r.then((function(){return e._loadDatabase(t.inflate,!0)}))),r.then((function(){e._autosaveEnable()}))}},{key:"copy",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new m(this.filename,{env:this._env});if(t.loadJSONObject(this,{retainDirtyFlags:!0}),e.removeNonSerializable){t._persistenceAdapter=null;for(var r=0;r<t._collections.length;r++)t._collections[r]._constraints=null,t._collections[r]._ttl=null}return t}},{key:"addCollection",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=0;r<this._collections.length;r++)if(this._collections[r].name===e)return this._collections[r];var n=new a.F(e,t);return this._collections.push(n),n}},{key:"loadCollection",value:function(e){if(!e.name)throw new Error("Collection must have a name property to be loaded");this._collections.push(e)}},{key:"getCollection",value:function(e){for(var t=0;t<this._collections.length;t++)if(this._collections[t].name===e)return this._collections[t];return this.emit("warning","collection "+e+" not found"),null}},{key:"renameCollection",value:function(e,t){var r=this.getCollection(e);return r&&(r.name=t),r}},{key:"listCollections",value:function(){for(var e=[],t=0;t<this._collections.length;t++)e.push({name:this._collections[t].name,count:this._collections[t].count()});return e}},{key:"removeCollection",value:function(e){for(var t=0;t<this._collections.length;t++)if(this._collections[t].name===e){var r=new a.F(e,{}),n=this._collections[t];for(var o in n)void 0!==n[o]&&void 0!==r[o]&&(n[o]=r[o]);return void this._collections.splice(t,1)}}},{key:"serialize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};switch(void 0===e.serializationMethod&&(e.serializationMethod=this._serializationMethod),e.serializationMethod){case"normal":default:return JSON.stringify(this);case"pretty":return JSON.stringify(this,null,2);case"destructured":return this.serializeDestructured()}}},{key:"toJSON",value:function(){return{_env:this._env,_serializationMethod:this._serializationMethod,_autosave:this._autosave,_autosaveInterval:this._autosaveInterval,_collections:this._collections,databaseVersion:this.databaseVersion,engineVersion:this.engineVersion,filename:this.filename,_persistenceAdapter:this._persistenceAdapter,_persistenceMethod:this._persistenceMethod,_throttledSaves:this._throttledSaves}}},{key:"serializeDestructured",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(void 0===e.partitioned&&(e.partitioned=!1),void 0===e.delimited&&(e.delimited=!0),void 0===e.delimiter&&(e.delimiter=this._destructureDelimiter),!0===e.partitioned&&void 0!==e.partition&&e.partition>=0)return this.serializeCollection({delimited:e.delimited,delimiter:e.delimiter,collectionIndex:e.partition});var t=new m(this.filename);t.loadJSONObject(this);for(var r=0;r<t._collections.length;r++)t._collections[r]._data=[];if(!0===e.partitioned&&-1===e.partition)return t.serialize({serializationMethod:"normal"});var n=[];n.push(t.serialize({serializationMethod:"normal"})),t=null;for(var a=0;a<this._collections.length;a++){var o=this.serializeCollection({delimited:e.delimited,delimiter:e.delimiter,collectionIndex:a});if(!1===e.partitioned&&!1===e.delimited){if(!Array.isArray(o))throw new Error("a nondelimited, non partitioned collection serialization did not return an expected array");for(var i=0;i<o.length;i++)n.push(o[i]),o[i]=null;n.push("")}else n.push(o)}return e.partitioned?(e.delimited,n):e.delimited?(n.push(""),n.join(e.delimiter)):(n.push(""),n)}},{key:"serializeCollection",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(void 0===e.delimited&&(e.delimited=!0),void 0===e.collectionIndex)throw new Error("serializeCollection called without 'collectionIndex' option");for(var t=this._collections[e.collectionIndex].count(),r=[],n=0;n<t;n++)r.push(JSON.stringify(this._collections[e.collectionIndex]._data[n]));return e.delimited?(r.push(""),r.join(e.delimiter)):r}},{key:"deserializeDestructured",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(void 0===t.partitioned&&(t.partitioned=!1),void 0===t.delimited&&(t.delimited=!0),void 0===t.delimiter&&(t.delimiter=this._destructureDelimiter),t.partitioned){if(void 0!==t.partition)return-1===t.partition?JSON.parse(e[0]):this.deserializeCollection(e[t.partition+1],t);for(var r=JSON.parse(e[0]),n=r._collections.length,a=0;a<n;a++)r._collections[a]._data=this.deserializeCollection(e[a+1],t);return r}var o=[];if(t.delimited){if(o=e.split(t.delimiter),e=null,0===o.length)return null}else o=e;var i=JSON.parse(o[0]),s=i._collections.length;o[0]=null;for(var u=0,l=1,c=!1;!c;)""===o[l]?++u>s&&(c=!0):i._collections[u]._data.push(JSON.parse(o[l])),o[l++]=null;return i}},{key:"deserializeCollection",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};void 0===t.partitioned&&(t.partitioned=!1),void 0===t.delimited&&(t.delimited=!0),void 0===t.delimiter&&(t.delimiter=this._destructureDelimiter);var r=[];t.delimited?(r=e.split(t.delimiter)).pop():r=e;for(var n=0;n<r.length;n++)r[n]=JSON.parse(r[n]);return r}},{key:"loadJSON",value:function(e,t){var r;if(0===e.length)r={};else switch(this._serializationMethod){case"normal":case"pretty":default:r=JSON.parse(e);break;case"destructured":r=this.deserializeDestructured(e)}this.loadJSONObject(r,t)}},{key:"loadJSONObject",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e._collections?e._collections.length:0;this.filename=e.filename,this._collections=[];for(var n=0;n<r;++n)this._collections.push(a.F.fromJSONObject(e._collections[n],t))}},{key:"close",value:function(){var e=this;return this._autosave?this._autosaveDisable().then((function(){return e._autosaveDirty()?e.saveDatabase():Promise.resolve()})):Promise.resolve().then((function(){e.emit("close")}))}},{key:"generateChangesNotification",value:function(e){var t=[],r=e||this._collections.map((function(e){return e.name}));return this._collections.forEach((function(e){-1!==r.indexOf(e.name)&&(t=t.concat(e.getChanges()))})),t}},{key:"serializeChanges",value:function(e){return JSON.stringify(this.generateChangesNotification(e))}},{key:"clearChanges",value:function(){this._collections.forEach((function(e){e.flushChanges&&e.flushChanges()}))}},{key:"throttledSaveDrain",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=(new Date).getTime();return this._throttledSaves?(void 0===t.recursiveWait&&(t.recursiveWait=!0),void 0===t.recursiveWaitLimit&&(t.recursiveWaitLimit=!1),void 0===t.recursiveWaitLimitDuration&&(t.recursiveWaitLimitDuration=2e3),void 0===t.started&&(t.started=new Date),this._throttledSaves&&null!==this._throttledSaveRunning?t.recursiveWait?Promise.resolve(Promise.all([this._throttledSaveRunning,this._throttledSavePending])).then((function(){return null!==e._throttledSaveRunning||null!==e._throttledSavePending?t.recursiveWaitLimit&&r-t.started.getTime()>t.recursiveWaitLimitDuration?Promise.reject({}):e.throttledSaveDrain(t):Promise.resolve()})):Promise.resolve(this._throttledSaveRunning):Promise.resolve()):Promise.resolve()}},{key:"_loadDatabase",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];return null===this._persistenceAdapter?Promise.reject(new Error("persistenceAdapter not configured")):Promise.resolve(this._persistenceAdapter.loadDatabase(this.filename)).then((function(r){if("string"==typeof r)e.loadJSON(r,t),e.emit("load",e);else{if("object"!==l(r)||null===r||r instanceof Error)throw r;e.loadJSONObject(r,t),e.emit("load",e)}})).catch((function(e){if(e instanceof Error)throw e;if(null!=e)throw new TypeError("The persistence adapter did not load a serialized DB string or object.");if(!r)throw new Error("Database not found.")}))}},{key:"loadDatabase",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._throttledSaves?this.throttledSaveDrain(t).then((function(){return e._throttledSaveRunning=e._loadDatabase(t).then((function(){e._throttledSaveRunning=null})),e._throttledSaveRunning}),(function(){throw new Error("Unable to pause save throttling long enough to read database")})):this._loadDatabase(t)}},{key:"_saveDatabase",value:function(){var e=this;return null===this._persistenceAdapter?Promise.reject(new Error("persistenceAdapter not configured")):"reference"===this._persistenceAdapter.mode&&"function"==typeof this._persistenceAdapter.exportDatabase?Promise.resolve(this._persistenceAdapter.exportDatabase(this.filename,this.copy({removeNonSerializable:!0}))).then((function(){e._autosaveClearFlags(),e.emit("save")})):(this._autosaveClearFlags(),Promise.resolve(this._persistenceAdapter.saveDatabase(this.filename,this.serialize())).then((function(){e.emit("save")})))}},{key:"saveDatabase",value:function(){var e=this;return this._throttledSaves?(null!==this._throttledSaveRunning&&null===this._throttledSavePending&&(this._throttledSavePending=Promise.resolve(this._throttledSaveRunning).then((function(){return e._throttledSaveRunning=null,e._throttledSavePending=null,e.saveDatabase()}))),null!==this._throttledSavePending?this._throttledSavePending:(this._throttledSaveRunning=this._saveDatabase().then((function(){e._throttledSaveRunning=null})),this._throttledSaveRunning)):this._saveDatabase()}},{key:"deleteDatabase",value:function(){return null===this._persistenceAdapter?Promise.reject(new Error("persistenceAdapter not configured")):Promise.resolve(this._persistenceAdapter.deleteDatabase(this.filename))}},{key:"_autosaveDirty",value:function(){for(var e=0;e<this._collections.length;e++)if(this._collections[e]._dirty)return!0;return!1}},{key:"_autosaveClearFlags",value:function(){for(var e=0;e<this._collections.length;e++)this._collections[e]._dirty=!1}},{key:"_autosaveEnable",value:function(){var e=this;if(this._autosave&&!this._autosaveRunning){this._autosaveRunning=!0;var t=setInterval((function(){e._autosaveRunning?e._autosaveDirty()&&(e._autosaveHandler=e._autosaveHandler.then((function(){return e.saveDatabase()}))):clearInterval(t)}),this._autosaveInterval)}}},{key:"_autosaveDisable",value:function(){return this._autosaveRunning=!1,this._autosaveHandler}}],r&&c(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),m}(n.P)},679330:(e,t,r)=>{"use strict";function n(e,t){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},n(e,t)}function a(e){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},a(e)}function o(e){return o="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},o(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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,(void 0,a=function(e,t){if("object"!==o(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===o(a)?a:String(a)),n)}var a}function u(e,t,r){return t&&s(e.prototype,t),r&&s(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e,t){if(e===t)return!0;if(!e||!t||!0===e||!0===t||e!=e||t!=t){var r,n;switch(e){case void 0:case null:r=1;break;case!1:r=3;break;case!0:r=4;break;case"":r=5;break;default:r=e==e?9:0}switch(t){case void 0:case null:n=1;break;case!1:n=3;break;case!0:n=4;break;case"":n=5;break;default:n=t==t?9:0}if(9!==r||9!==n)return r===n}var a=Number(e),o=Number(t);return a==a||o==o?a===o:(a=e.toString())==(o=t.toString())}function c(e,t,r){if(!e||!t||!0===e||!0===t||e!=e||t!=t){var n,a;switch(e){case void 0:case null:n=1;break;case!1:n=3;break;case!0:n=4;break;case"":n=5;break;default:n=e==e?9:0}switch(t){case void 0:case null:a=1;break;case!1:a=3;break;case!0:a=4;break;case"":a=5;break;default:a=t==t?9:0}if(9!==n||9!==a)return n===a?r:n<a}var o=Number(e),i=Number(t);return o==o&&i==i?o<i||!(o>i)&&r:o==o&&i!=i||(i!=i||o==o)&&(e<t||!(e>t)&&(e==t?r:(o=e.toString())<(i=t.toString())||o==i&&r))}function f(e,t,r){if(!e||!t||!0===e||!0===t||e!=e||t!=t){var n,a;switch(e){case void 0:case null:n=1;break;case!1:n=3;break;case!0:n=4;break;case"":n=5;break;default:n=e==e?9:0}switch(t){case void 0:case null:a=1;break;case!1:a=3;break;case!0:a=4;break;case"":a=5;break;default:a=t==t?9:0}if(9!==n||9!==a)return n===a?r:n>a}var o=Number(e),i=Number(t);return o==o&&i==i?o>i||!(o<i)&&r:(o!=o||i==i)&&(i==i&&o!=o||e>t||!(e<t)&&(e==t?r:(o=e.toString())>(i=t.toString())||o==i&&r))}function h(e,t,r){return l(e,t)?0:c(e,t,!1)?r?1:-1:f(e,t,!1)?r?-1:1:0}r.d(t,{GX:()=>l,JZ:()=>c,wb:()=>h,yo:()=>m});var p=function(){function e(){i(this,e)}return u(e,[{key:"$eq",value:function(e,t){return e===t}},{key:"$ne",value:function(e,t){return e!==t}},{key:"$gt",value:function(e,t){return e>t}},{key:"$gte",value:function(e,t){return e>=t}},{key:"$lt",value:function(e,t){return e<t}},{key:"$lte",value:function(e,t){return e<=t}},{key:"$between",value:function(e,t){return null!=e&&e>=t[0]&&e<=t[1]}},{key:"$in",value:function(e,t){return-1!==t.indexOf(e)}},{key:"$nin",value:function(e,t){return-1===t.indexOf(e)}},{key:"$keyin",value:function(e,t){return e in t}},{key:"$nkeyin",value:function(e,t){return!(e in t)}},{key:"$definedin",value:function(e,t){return void 0!==t[e]}},{key:"$undefinedin",value:function(e,t){return void 0===t[e]}},{key:"$regex",value:function(e,t){return t.test(e)}},{key:"$containsNone",value:function(e,t){return!this.$containsAny(e,t)}},{key:"$containsAny",value:function(e,t){var r=this.containsCheckFn(e);return null!==r&&(Array.isArray(t)?t.some(r):r(t))}},{key:"$contains",value:function(e,t){var r=this.containsCheckFn(e);return null!==r&&(Array.isArray(t)?t.every(r):r(t))}},{key:"$type",value:function(e,t){var r=o(e);return"object"===r&&(Array.isArray(e)?r="array":e instanceof Date&&(r="date")),"object"!==o(t)?r===t:this.doQueryOp(r,t)}},{key:"$finite",value:function(e,t){return t===isFinite(e)}},{key:"$size",value:function(e,t){return!!Array.isArray(e)&&("object"!==o(t)?e.length===t:this.doQueryOp(e.length,t))}},{key:"$len",value:function(e,t){return"string"==typeof e&&("object"!==o(t)?e.length===t:this.doQueryOp(e.length,t))}},{key:"$where",value:function(e,t){return!0===t(e)}},{key:"$not",value:function(e,t){return!this.doQueryOp(e,t)}},{key:"$and",value:function(e,t){for(var r=0,n=t.length;r<n;r++)if(!this.doQueryOp(e,t[r]))return!1;return!0}},{key:"$or",value:function(e,t){for(var r=0,n=t.length;r<n;r++)if(this.doQueryOp(e,t[r]))return!0;return!1}},{key:"doQueryOp",value:function(e,t){for(var r in t)if(Object.hasOwnProperty.call(t,r))return this[r](e,t[r]);return!1}},{key:"containsCheckFn",value:function(e){return"string"==typeof e||Array.isArray(e)?function(t){return-1!==e.indexOf(t)}:"object"===o(e)&&null!==e?function(t){return Object.hasOwnProperty.call(e,t)}:null}}]),e}(),d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&n(e,t)}(h,e);var t,r,s=(t=h,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=a(t);if(r){var i=a(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return function(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function h(){return i(this,h),s.call(this)}return u(h,[{key:"$eq",value:function(e,t){return l(e,t)}},{key:"$ne",value:function(e,t){return!l(e,t)}},{key:"$gt",value:function(e,t){return f(e,t,!1)}},{key:"$gte",value:function(e,t){return f(e,t,!0)}},{key:"$lt",value:function(e,t){return c(e,t,!1)}},{key:"$lte",value:function(e,t){return c(e,t,!0)}},{key:"$between",value:function(e,t){return null!=e&&f(e,t[0],!0)&&c(e,t[1],!0)}}]),h}(p),m={js:new p,loki:new d}},530349:(e,t,r)=>{"use strict";r.d(t,{X:()=>a});var n=r(753974),a={avl:function(e,t){return new n.z(e,t)}}},418311:(e,t,r)=>{"use strict";r.d(t,{Z:()=>p});var n=r(986492),a=r(22153),o=r(679330),i=r(690386);function s(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return u(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)?u(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function u(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 l(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,(void 0,a=function(e,t){if("object"!==c(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===c(a)?a:String(a)),n)}var a}function c(e){return c="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},c(e)}function f(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(++r>=10)return e;for(var n in e)if("string"==typeof e[n]&&0===e[n].indexOf("[%lktxp]")){var a=e[n].substring(8);void 0!==t[a]&&(e[n]=t[a])}else"object"===c(e[n])&&(e[n]=f(e[n],t,r));return e}var h={$eq:!0,$dteq:!0,$gt:!0,$gte:!0,$lt:!0,$lte:!0,$in:!0,$between:!0},p=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._filteredRows=[],this._filterInitialized=!1,this._scoring=null,this._collection=t}var t,r;return t=e,r=[{key:"reset",value:function(){return this._filteredRows.length>0&&(this._filteredRows=[]),this._filterInitialized=!1,this}},{key:"toJSON",value:function(){var e=this.copy();return e._collection=null,e}},{key:"limit",value:function(e){return this._filterInitialized||0!==this._filteredRows.length||(this._filteredRows=this._collection._prepareFullDocIndex()),this._filteredRows=this._filteredRows.slice(0,e),this._filterInitialized=!0,this}},{key:"offset",value:function(e){return this._filterInitialized||0!==this._filteredRows.length||(this._filteredRows=this._collection._prepareFullDocIndex()),this._filteredRows=this._filteredRows.slice(e),this._filterInitialized=!0,this}},{key:"copy",value:function(){var t=new e(this._collection);return t._filteredRows=this._filteredRows.slice(),t._filterInitialized=this._filterInitialized,t}},{key:"transform",value:function(e,t){"string"==typeof e&&(e=this._collection._transforms[e]),void 0!==t&&(e=function(e,t){if(void 0===t)return e;for(var r=[],n=0;n<e.length;n++){var o=(0,a.d)(e[n],"shallow-recurse");r.push(f(o,t))}return r}(e,t));for(var r=this,n=0;n<e.length;n++){var o=e[n];switch(o.type){case"find":r.find(o.value);break;case"where":r.where(o.value);break;case"simplesort":r.simplesort(o.property,o.options);break;case"compoundsort":r.compoundsort(o.value);break;case"sort":r.sort(o.value);break;case"sortByScoring":r.sortByScoring(o.desc);break;case"limit":r=r.limit(o.value);break;case"offset":r=r.offset(o.value);break;case"map":r=r.map(o.value,o.dataOptions);break;case"eqJoin":r=r.eqJoin(o.joinData,o.leftJoinKey,o.rightJoinKey,o.mapFun,o.dataOptions);break;case"mapReduce":r=r.mapReduce(o.mapFunction,o.reduceFunction);break;case"update":r.update(o.value);break;case"remove":r.remove()}}return r}},{key:"sort",value:function(e){this._filterInitialized||0!==this._filteredRows.length||(this._filteredRows=this._collection._prepareFullDocIndex());var t=this._collection._data;return this._filteredRows.sort((function(r,n){return e(t[r],t[n])})),this}},{key:"simplesort",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{desc:!1};if("boolean"==typeof t&&(t={desc:t}),!this._filterInitialized&&this._collection._rangedIndexes.hasOwnProperty(e)){var r,n=[],a=s(this._collection._rangedIndexes[e].index.rangeRequest());try{for(a.s();!(r=a.n()).done;){var o=r.value;n.push(this._collection.get(o,!0)[1])}}catch(e){a.e(e)}finally{a.f()}return this._filteredRows=t.desc?n.reverse():n,this._filterInitialized=!0,this}this._filterInitialized||0!==this._filteredRows.length||(this._filteredRows=this._collection._prepareFullDocIndex());var u=this._collection._data,l=t.sortComparator?i.O[t.sortComparator]:i.O[this._collection._unindexedSortComparator];return this._filteredRows.sort((function(t,r){return l(u[t][e],u[r][e])})),t.desc&&this._filteredRows.reverse(),this}},{key:"compoundsort",value:function(e){var t=this;if(0===e.length)throw new Error("Invalid call to compoundsort, need at least one property");if(1===e.length){var r=e[0];return"string"==typeof r?this.simplesort(r,!1):this.simplesort(r[0],r[1])}for(var n=0,a=e.length;n<a;n++){var o=e[n];"string"==typeof o&&(e[n]=[o,!1])}this._filterInitialized||0!==this._filteredRows.length||(this._filteredRows=this._collection._prepareFullDocIndex());var i=this._collection._data;return this._filteredRows.sort((function(r,n){return t._compoundeval(e,i[r],i[n])})),this}},{key:"_compoundeval",value:function(e,t,r){for(var n=0,a=e.length;n<a;n++){var i=e[n],s=i[0],u=(0,o.wb)(t[s],r[s],i[1]);if(0!==u)return u}return 0}},{key:"sortByScoring",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null===this._scoring)throw new Error("No scoring available");return t?this._filteredRows.sort((function(t,r){return e._scoring[t].score-e._scoring[r].score})):this._filteredRows.sort((function(t,r){return e._scoring[r].score-e._scoring[t].score})),this}},{key:"getScoring",value:function(){if(null===this._scoring)throw new Error("No scoring available");for(var e=[],t=0;t<this._filteredRows.length;t++)e.push(this._scoring[this._filteredRows[t]]);return e}},{key:"findOr",value:function(e){for(var t=[],r=[],n=this.count(),a=0,o=e.length;a<o;a++){var i=this.copy().find(e[a])._filteredRows,s=i.length;if(s===n)return this;for(var u=0;u<s;u++){var l=i[u];void 0===r[l]&&(r[l]=!0,t.push(l))}}return this._filteredRows=t,this._filterInitialized=!0,this}},{key:"$or",value:function(e){return this.findOr(e)}},{key:"findAnd",value:function(e){for(var t=0,r=e.length;t<r;t++){if(0===this.count())return this;this.find(e[t])}return this}},{key:"$and",value:function(e){return this.findAnd(e)}},{key:"find",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(0===this._collection._data.length)return this._filteredRows=[],this._filterInitialized=!0,this;var r,n,a,i=e||"getAll";if("object"===c(i)){var u=[];for(var l in i){var f={};f[l]=i[l],u.push(f),void 0!==i[l]&&(r=l,n=i[l])}if(u.length>1)return this.find({$and:u},t)}if(!r||"getAll"===i)return t&&(this._filteredRows=this._collection._data.length>0?[0]:[],this._filterInitialized=!0),this;if("$and"===r||"$or"===r)return this[r](n),t&&this._filteredRows.length>1&&(this._filteredRows=this._filteredRows.slice(0,1)),this;var p="";if(null===n||"object"!==c(n)||n instanceof Date)p="$eq",a=n;else{if("object"!==c(n))throw new Error("Do not know what you want to do.");for(var d in n)if(void 0!==n[d]){p=d,a=n[d];break}}"$regex"===p&&(Array.isArray(a)?a=new RegExp(a[0],a[1]):a instanceof RegExp||(a=new RegExp(a)));var m=!1;!this._filterInitialized&&this._collection._rangedIndexes[r]&&h[p]&&(m=!0);var y=o.yo[this._collection._defaultLokiOperatorPackage],v=this._collection._data,g=[];if(this._filterInitialized){var b=this._filteredRows;if("$fts"===r){this._scoring=this._collection._fullTextSearch.search(i.$fts);for(var _=Object.keys(this._scoring),w=0;w<_.length;w++)-1!==b.indexOf(+_[w])&&g.push(+_[w])}else if(void 0!==this._collection._constraints.unique[r]&&"$eq"===p){var E=this._collection._constraints.unique[r].get(a);if(void 0!==E){var S=this._collection.get(E,!0)[1];-1!==b.indexOf(S)&&g.push(S)}}else for(var T=0;T<b.length;T++){var k=b[T];y[p](v[k][r],a)&&g.push(k)}return this._filteredRows=g,this._filterInitialized=!0,this}if(this._filteredRows=g,this._filterInitialized=!0,"$fts"===r){this._scoring=this._collection._fullTextSearch.search(i.$fts);for(var A=Object.keys(this._scoring),N=0;N<A.length;N++)g.push(+A[N]);return this}if(void 0!==this._collection._constraints.unique[r]&&"$eq"===p){var O=this._collection._constraints.unique[r].get(a);return void 0!==O&&g.push(this._collection.get(O,!0)[1]),this}if(!m){for(var I=0;I<v.length;I++)if(y[p](v[I][r],a)&&(g.push(I),t))return this;return this}if(this._collection._rangedIndexes[r]){if("$in"===p){var L,x=this._collection._rangedIndexes[r],C=s(a);try{for(C.s();!(L=C.n()).done;){var F,P=L.value,R=s(x.index.rangeRequest({op:"$eq",val:P}));try{for(R.s();!(F=R.n()).done;){var D=F.value;g.push(this._collection.get(D,!0)[1])}}catch(e){R.e(e)}finally{R.f()}}}catch(e){C.e(e)}finally{C.f()}return this}if("$between"===p){var U,M=s(this._collection._rangedIndexes[r].index.rangeRequest({op:p,val:a[0],high:a[1]}));try{for(M.s();!(U=M.n()).done;){var B=U.value;g.push(this._collection.get(B,!0)[1])}}catch(e){M.e(e)}finally{M.f()}return this}var j=this._collection._rangedIndexes[r].index.rangeRequest({op:p,val:a});if(!0!==h[p]){var G,K=s(j);try{for(K.s();!(G=K.n()).done;){var H=G.value,V=this._collection.get(H,!0)[1];h[p](v[V][r],a)&&g.push(V)}}catch(e){K.e(e)}finally{K.f()}}else{var W,Y=s(j);try{for(Y.s();!(W=Y.n()).done;){var J=W.value;g.push(this._collection.get(J,!0)[1])}}catch(e){Y.e(e)}finally{Y.f()}}}return this}},{key:"where",value:function(e){var t,r=[];if("function"!=typeof e)throw new TypeError("Argument is not a stored view or a function");if(t=e,this._filterInitialized){for(var n=this._filteredRows.length;n--;)!0===t(this._collection._data[this._filteredRows[n]])&&r.push(this._filteredRows[n]);return this._filteredRows=r,this}for(var a=this._collection._data.length;a--;)!0===t(this._collection._data[a])&&r.push(a);return this._filteredRows=r,this._filterInitialized=!0,this}},{key:"count",value:function(){return this._filterInitialized?this._filteredRows.length:this._collection.count()}},{key:"data",value:function(){var e,t,r,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=n.forceClones;e=void 0!==o&&o;var i=n.forceCloneMethod;t=void 0===i?this._collection._cloneMethod:i;var s=n.removeMeta;r=void 0!==s&&s;var u,l,c=[],f=this._collection._data;if(r&&!e&&(e=!0,t="shallow"),this._collection._disableDeltaChangesApi||(e=!0,t="deep"),!this._filterInitialized){if(0===this._filteredRows.length){if(this._collection._cloneObjects||e){l=t;for(var h=0;h<f.length;h++)u=this._collection._defineNestedProperties((0,a.d)(f[h],l)),r&&(delete u.$loki,delete u.meta),c.push(u);return c}return f.slice()}this._filterInitialized=!0}var p=this._filteredRows;if(this._collection._cloneObjects||e){l=t;for(var d=0;d<p.length;d++)u=this._collection._defineNestedProperties((0,a.d)(f[p[d]],l)),r&&(delete u.$loki,delete u.meta),c.push(u)}else for(var m=0;m<p.length;m++)c.push(f[p[m]]);return c}},{key:"update",value:function(e){this._filterInitialized||0!==this._filteredRows.length||(this._filteredRows=this._collection._prepareFullDocIndex());for(var t=this._filteredRows.length,r=this._collection._data,n=0;n<t;n++)if(this._collection._cloneObjects||!this._collection._disableDeltaChangesApi){var o=(0,a.d)(r[this._filteredRows[n]],this._collection._cloneMethod);e(o),this._collection.update(o)}else e(r[this._filteredRows[n]]),this._collection.update(r[this._filteredRows[n]]);return this}},{key:"remove",value:function(){return this._filterInitialized||0!==this._filteredRows.length||(this._filteredRows=this._collection._prepareFullDocIndex()),this._collection.remove(this.data()),this._filteredRows=[],this}},{key:"mapReduce",value:function(e,t){try{return t(this.data().map(e))}catch(e){throw e}}},{key:"eqJoin",value:function(t,r,a,o,i){var s,u,l=[],c=[],f="function"==typeof r,h="function"==typeof a,p={},d=this.data(i),m=d.length;if(t instanceof n.F)l=t.chain().data(i);else if(t instanceof e)l=t.data(i);else{if(!Array.isArray(t))throw new TypeError("joinData needs to be an array or result set");l=t}s=l.length;for(var y=0;y<s;y++)p[u=h?a(l[y]):l[y][a]]=l[y];o||(o=function(e,t){return{left:e,right:t}});for(var v=0;v<m;v++)u=f?r(d[v]):d[v][r],c.push(o(d[v],p[u]||{}));return this._collection=new n.F("joinData"),this._collection.insert(c),this._filteredRows=[],this._filterInitialized=!1,this}},{key:"map",value:function(e,t){var r=this.data(t).map(e);return this._collection=new n.F("mappedData"),this._collection.insert(r),this._filteredRows=[],this._filterInitialized=!1,this}}],r&&l(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}()},915899:(e,t,r)=>{"use strict";function n(e){return n="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},n(e)}function a(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,(void 0,o=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,"string");if("object"!==n(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(a.key),"symbol"===n(o)?o:String(o)),a)}var o}r.d(t,{P:()=>o});var o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._field=t,this._lokiMap={},this._valMap={}}var t,r;return t=e,(r=[{key:"set",value:function(e,t){if(null!=t){if(t in this._lokiMap)throw new Error("Duplicate key for property "+this._field+": "+t);if(e in this._valMap)throw new Error("Duplicate key for property $loki : "+e);this._lokiMap[t]=e,this._valMap[e]=t}}},{key:"get",value:function(e){return this._lokiMap[e]}},{key:"update",value:function(e,t){if(t!==this._valMap[e]){if(t in this._lokiMap)throw new Error("Duplicate key for property "+this._field+": "+t);this.remove(e),this.set(e,t)}}},{key:"remove",value:function(e){if(!(e in this._valMap))throw new Error("Key is not in unique index: "+this._field);var t=this._valMap[e];delete this._lokiMap[t],delete this._valMap[e]}},{key:"clear",value:function(){this._lokiMap={},this._valMap={}}}])&&a(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}()},609867:(e,t,r)=>{"use strict";r.d(t,{L:()=>m});var n=r(51939),a=r(206069);function o(e){return o="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},o(e)}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,s=[],u=!0,l=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){l=!0,a=e}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw a}}return s}}(e,t)||l(e,t)||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.")}()}function s(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=l(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function u(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||l(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){if(e){if("string"==typeof e)return c(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)?c(e,t):void 0}}function c(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 f(){f=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},s=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function h(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,i=Object.create(o.prototype),s=new C(n||[]);return a(i,"_invoke",{value:O(e,r,s)}),i}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=h;var d="suspendedStart",m="suspendedYield",y="executing",v="completed",g={};function b(){}function _(){}function w(){}var E={};c(E,s,(function(){return this}));var S=Object.getPrototypeOf,T=S&&S(S(F([])));T&&T!==r&&n.call(T,s)&&(E=T);var k=w.prototype=b.prototype=Object.create(E);function A(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function N(e,t){function r(a,i,s,u){var l=p(e[a],e,i);if("throw"!==l.type){var c=l.arg,f=c.value;return f&&"object"==o(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(f).then((function(e){c.value=e,s(c)}),(function(e){return r("throw",e,s,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return i=i?i.then(a,a):a()}})}function O(t,r,n){var a=d;return function(o,i){if(a===y)throw new Error("Generator is already running");if(a===v){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var s=n.delegate;if(s){var u=I(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===d)throw a=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=y;var l=p(t,r,n);if("normal"===l.type){if(a=n.done?v:m,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(a=v,n.method="throw",n.arg=l.arg)}}}function I(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,I(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=p(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function F(t){if(t||""===t){var r=t[s];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,i=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(o(t)+" is not iterable")}return _.prototype=w,a(k,"constructor",{value:w,configurable:!0}),a(w,"constructor",{value:_,configurable:!0}),_.displayName=c(w,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,c(e,l,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},A(N.prototype),c(N.prototype,u,(function(){return this})),t.AsyncIterator=N,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new N(h(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},A(k),c(k,l,"Generator"),c(k,s,(function(){return this})),c(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=F,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(x),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return s.type="throw",s.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;x(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:F(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}function h(e,t,r,n,a,o,i){try{var s=e[o](i),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,a)}function p(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){h(o,n,a,i,s,"next",e)}function s(e){h(o,n,a,i,s,"throw",e)}i(void 0)}))}}function d(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,(void 0,a=function(e,t){if("object"!==o(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===o(a)?a:String(a)),n)}var a}var m=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._scheduler=t}var t,r,o,l;return t=e,r=[{key:"downloadCollabFont",value:(l=p(f().mark((function e(t){var r,o;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.error,!t.downloadUrl){e.next=8;break}return o={root:{downloadCB:null,fontsList:[t.fontInfo.fontId],fontsIds:[],fontInfo:t.fontInfo,unicodesList:[]},retryCount:1},e.next=5,this._scheduler.scheduleTask(n.l0.TaskType.FONT_DOWNLOAD,o,t.downloadUrl);case 5:r=e.sent,e.next=9;break;case 8:r.errCode=n.l0.ErrorCode.FONT_NOT_FOUND;case 9:return e.next=11,a.p.checkIfValidFontStream(t.fontInfo.fontBuffer);case 11:if(e.t0=e.sent,!1!==e.t0){e.next=14;break}t.fontInfo.fontBuffer=a.p.reversePartArray(t.fontInfo.fontBuffer,0,1040);case 14:return r.errCode===n.l0.ErrorCode.NONE&&t.fontInfo.fontBuffer.length&&this._scheduler.foundFontsHandler.putFontBufferInCache(t.fontInfo,!1),e.abrupt("return",r);case 16:case"end":return e.stop()}}),e,this)}))),function(e){return l.apply(this,arguments)})},{key:"_collabAPIResponseParser",value:function(e,t,r){var a=new Map,o=r;void 0!==o.root.psNamesInfo&&null!==o.root.psNamesInfo||(o.root.psNamesInfo=new Map),void 0!==o.root.fontIDsInfo&&null!==o.root.psNamesInfo||(o.root.fontIDsInfo=new Map);var l=new Map([].concat(u(o.root.psNamesInfo.entries()),u(o.root.fontIDsInfo.entries())));if(t.errCode!==n.l0.ErrorCode.NONE){var c,f=s(l);try{for(f.s();!(c=f.n()).done;){var h=i(c.value,2),p=h[0],d={fontInfo:h[1],error:t,downloadUrl:""};a.set(p,d)}}catch(e){f.e(e)}finally{f.f()}}else{var m=e.results;for(var y in m){var v=l.get(y);if(void 0!==v){m[y].expires_at&&(v.expiryTime=m[y].expires_at),"byof"===m[y].source&&(v.type=n.l0.FontType.BYOF),""===v.familyName&&m[y].family_name&&(v.familyName=m[y].family_name),""===v.styleName&&m[y].subfamily_name&&(v.styleName=m[y].subfamily_name),""===v.fontName&&(v.fontName="".concat(v.familyName," ").concat(v.styleName)),""===v.postscriptName&&m[y].postscript_name&&(v.postscriptName=m[y].postscript_name),""===v.fontId&&m[y].id&&(v.fontId=m[y].id);var g=this._scheduler.cachedFonts().get(v.fontId);!g||v.type!==n.l0.FontType.BYOF&&g.type!==n.l0.FontType.BYOF||(v.accessLevel=n.l0.AccessLevel.READ_WRITE);var b=void 0;m[y].download_url&&(b=m[y].download_url);var _=new n.l0.Error;void 0!==b&&""!==b&&null!==b||t.errCode!==n.l0.ErrorCode.NONE||(_.errCode=n.l0.ErrorCode.FONT_NOT_FOUND,_.errMsg="FONT_NOT_FOUND"),_.httpStatus=t.httpStatus;var w={fontInfo:v,error:_,downloadUrl:b};a.set(y,w),""!==v.fontId&&""!==v.postscriptName&&(this._scheduler.collabFonts.set(v.fontId,v),this._scheduler.collabFonts.set(v.postscriptName,v))}}}return a}},{key:"getFontMetadataUsingCollabAuthAPI",value:(o=p(f().mark((function e(t,r,a,o){var u,l,c,h,p,d,m,y,v,g,b,_,w,E,S,T,k,A,N,O,I,L,x,C,F,P,R,D,U,M,B,j,G,K,H,V,W,Y,J,z,$;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u=[],l=[],t.size){c=0,h=s(t);try{for(h.s();!(p=h.n()).done;)d=i(p.value,2),m=d[0],y=d[1],v=Math.floor(c/30),u[v]||(u[v]=new Map),u[v].set(m,y),c++}catch(e){h.e(e)}finally{h.f()}}if(r.size){g=0,b=s(r);try{for(b.s();!(_=b.n()).done;)w=i(_.value,2),E=w[0],S=w[1],T=Math.floor(g/30),l[T]||(l[T]=new Map),l[T].set(E,S),g++}catch(e){b.e(e)}finally{b.f()}}k=0,A=new Map,N=0;case 8:if(!(N<u.length)){e.next=23;break}return O={root:{psNames:Array.from(u[N].keys()),fontIDs:k<l.length?Array.from(l[k].keys()):[],fontAccessToken:a,documentId:o,psNamesInfo:u[N],fontIDsInfo:k<l.length?l[k]:new Map},retryCount:3},e.next=12,this._scheduler.scheduleTask(n.l0.TaskType.COLLAB_AUTH_API,O);case 12:I=e.sent,L=I.responsebody,x=I.err,C=I.callback,F=this._collabAPIResponseParser(L,x,C),P=s(F);try{for(P.s();!(R=P.n()).done;)D=i(R.value,2),U=D[0],M=D[1],A.set(U,M)}catch(e){P.e(e)}finally{P.f()}k++;case 20:N++,e.next=8;break;case 23:if(!(k<l.length)){e.next=37;break}return B={root:{psNames:[],fontIDs:Array.from(l[k].keys()),fontAccessToken:a,documentId:o,psNamesInfo:new Map,fontIDsInfo:l[k]},retryCount:3},e.next=27,this._scheduler.scheduleTask(n.l0.TaskType.COLLAB_AUTH_API,B);case 27:j=e.sent,G=j.responsebody,K=j.err,H=j.callback,V=this._collabAPIResponseParser(G,K,H),W=s(V);try{for(W.s();!(Y=W.n()).done;)J=i(Y.value,2),z=J[0],$=J[1],A.set(z,$)}catch(e){W.e(e)}finally{W.f()}case 34:k++,e.next=23;break;case 37:return e.abrupt("return",A);case 38:case"end":return e.stop()}}),e,this)}))),function(e,t,r,n){return o.apply(this,arguments)})}],r&&d(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}()},631780:(e,t,r)=>{"use strict";r.d(t,{V:()=>l});var n=r(51939),a=r(206069);function o(e){return o="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},o(e)}function i(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return s(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)?s(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){u=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(u)throw o}}}}function s(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 u(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,(void 0,a=function(e,t){if("object"!==o(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===o(a)?a:String(a)),n)}var a}var l=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._responseBody=void 0,this._responseBody=t,this._subtype=r}var t,r;return t=e,(r=[{key:"parse",value:function(e){var t=this,r=new n.mP;return this._responseBody.forEach((function(o){try{var s=o.postscript_name;if(""===s)return;var u=o.id,l=[],c=[],f=a.p.getAppropriateRegion(),h=new n.K1(n.l0.FontType.APPLICATION,s);h._subtype=t._subtype;var p="",d="",m=o.browsable;for(var y in o.localized_family_names)if(o.localized_family_names[y]){var v=o.localized_family_names[y].trim().replace(/\s+/g," ");l.push("".concat(v,"##").concat(y)),y===f.valueOf()&&(h.familyName=v),y===n.l0.Language.Default.valueOf()&&(p=v)}for(var g in o.localized_subfamily_names)if(o.localized_subfamily_names[g]){var b=o.localized_subfamily_names[g].trim().replace(/\s+/g," ");c.push("".concat(b,"##").concat(g)),g===f.valueOf()&&(h.styleName=b),g===n.l0.Language.Default.valueOf()&&(d=b)}""===h.familyName&&(h.familyName=p),""===h.styleName&&(h.styleName=d);var _=r.getFamilyFromName(h.familyName);null==_&&(_=new n.FX(h.familyName),r.addFamily(h.familyName,_)),h.fontName="".concat(h.familyName," ").concat(h.styleName),h.fontId=u,h.isPremiumFont=!1,h.accessLevel=n.l0.AccessLevel.READ_WRITE,h.isActiveForUser=!0,h.sortIndex=o.sort_order;var w=o.default_language;h.script=a.p.getLanguageFromString(w);var E=new Set;h.addSupportedLanguage(h.script);var S,T=i(o.language_support);try{for(T.s();!(S=T.n()).done;){var k=S.value;E.add(a.p.getLanguageFromString(k))}}catch(e){T.e(e)}finally{T.f()}for(var A in 0===E.size&&E.add(n.l0.Language.Default),h.supportedLanguages=E,1===E.size?h.script=E.values().next().value:a.p.overrideFontScriptFromPostscriptName(h),o.variations_postscript_name_prefix&&(h.isVariableFont=!0,h.variableFamilyPrefix=o.variations_postscript_name_prefix),o.default_axes)h.varAxisValues.set(A,o.default_axes[A]);if(o.instances){""===h.variableFamilyPrefix&&(h.variableFamilyPrefix=p.trim().replace(/\W/g,""),h.isVariableFont=!0);var N=o.instances,O=_.getEntries().length;-1!==_.displayFont.postscriptName.toLowerCase().indexOf("italic")&&(O=-N.length);var I,L=i(N);try{for(L.s();!(I=L.n()).done;){var x=I.value,C=d,F=new n.K1(n.l0.FontType.APPLICATION);for(var P in F._subtype=t._subtype,x.postscript_name&&(F.generatedPostscriptName=x.postscript_name,F.postscriptName=x.postscript_name),x.localized_subfamily_names)if(x.localized_subfamily_names[P]){var R=x.localized_subfamily_names[P].trim().replace(/\s+/g," ");if(P===f.valueOf()){F.styleName=R;break}P===n.l0.Language.Default.valueOf()&&(C=R)}""===F.styleName&&(F.styleName=C);var D=h.variableFamilyPrefix.trim().replace(/\W/g,""),U=F.styleName.trim().replace(/\W/g,"");for(var M in""!==U&&(F.postscriptName="".concat(D,"-").concat(U)),""===F.generatedPostscriptName&&(F.generatedPostscriptName=F.postscriptName),F.fontId=h.fontId,F.isPremiumFont=h.isPremiumFont,F.accessLevel=n.l0.AccessLevel.READ_WRITE,F.sortIndex=O,O+=1,F.supportedLanguages=h.supportedLanguages,F.script=h.script,F.familyName=h.familyName,F.fontName="".concat(F.familyName," ").concat(F.styleName),F.variableFamilyPrefix=h.variableFamilyPrefix,F.isVariableFont=!0,F.isActiveForUser=!0,F.defaultPostscriptName=h.postscriptName,F.type=n.l0.FontType.APPLICATION,x.axis_values)F.varAxisValues.set(M,x.axis_values[M]);_.displayFont=h,""!==h.variableFamilyPrefix&&(e.set(h.variableFamilyPrefix,h),_.displayFont=h),""!==F.postscriptName&&(m?_.addFont(F.postscriptName,F):F.isBrowsable=!1,e.set(F.postscriptName,F),e.set(F.generatedPostscriptName,F))}}catch(e){L.e(e)}finally{L.f()}e.set(h.postscriptName,h),e.set(h.fontId,h)}else m?_.addFont(h.postscriptName,h):h.isBrowsable=!1,0===_.getRawUnorderedMap().size&&r.removeFamily(_.familyName),e.set(h.postscriptName,h),e.set(h.fontId,h)}catch(e){}})),r}}])&&u(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}()},177579:(e,t,r)=>{"use strict";r.d(t,{uP:()=>G,xp:()=>R,yZ:()=>K});var n=r(631780),a=r(165127),o=r(27042),i=r(660234),s=r(51939),u=r(850291),l=r(809863),c=r(234174),f=r(921198),h=r(950150),p=r(372482),d=r(461660),m=r(811604),y=r(643716),v=r(971604),g=r(108428),b=r(206069);function _(e){return _="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},_(e)}function w(){w=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function c(e,t,r,n){var o=t&&t.prototype instanceof v?t:v,i=Object.create(o.prototype),s=new C(n||[]);return a(i,"_invoke",{value:O(e,r,s)}),i}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=c;var h="suspendedStart",p="suspendedYield",d="executing",m="completed",y={};function v(){}function g(){}function b(){}var E={};l(E,i,(function(){return this}));var S=Object.getPrototypeOf,T=S&&S(S(F([])));T&&T!==r&&n.call(T,i)&&(E=T);var k=b.prototype=v.prototype=Object.create(E);function A(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function N(e,t){function r(a,o,i,s){var u=f(e[a],e,o);if("throw"!==u.type){var l=u.arg,c=l.value;return c&&"object"==_(c)&&n.call(c,"__await")?t.resolve(c.__await).then((function(e){r("next",e,i,s)}),(function(e){r("throw",e,i,s)})):t.resolve(c).then((function(e){l.value=e,i(l)}),(function(e){return r("throw",e,i,s)}))}s(u.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function O(t,r,n){var a=h;return function(o,i){if(a===d)throw new Error("Generator is already running");if(a===m){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var s=n.delegate;if(s){var u=I(s,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===h)throw a=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=d;var l=f(t,r,n);if("normal"===l.type){if(a=n.done?m:p,l.arg===y)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(a=m,n.method="throw",n.arg=l.arg)}}}function I(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,I(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var o=f(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function F(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(_(t)+" is not iterable")}return g.prototype=b,a(k,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:g,configurable:!0}),g.displayName=l(b,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,l(e,u,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},A(N.prototype),l(N.prototype,s,(function(){return this})),t.AsyncIterator=N,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new N(c(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},A(k),l(k,u,"Generator"),l(k,i,(function(){return this})),l(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=F,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(x),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return s.type="throw",s.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;x(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:F(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}function E(e,t,r,n,a,o,i){try{var s=e[o](i),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,a)}function S(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){E(o,n,a,i,s,"next",e)}function s(e){E(o,n,a,i,s,"throw",e)}i(void 0)}))}}function T(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=N(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function k(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,s=[],u=!0,l=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){l=!0,a=e}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw a}}return s}}(e,t)||N(e,t)||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.")}()}function A(e){return function(e){if(Array.isArray(e))return O(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||N(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function N(e,t){if(e){if("string"==typeof e)return O(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)?O(e,t):void 0}}function O(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 I(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,(void 0,a=function(e,t){if("object"!==_(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==_(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===_(a)?a:String(a)),n)}var a}function L(e){var t,r;function n(t,r){try{var o=e[t](r),i=o.value,s=i instanceof C;Promise.resolve(s?i.v:i).then((function(r){if(s){var u="return"===t?"return":"next";if(!i.k||r.done)return n(u,r);r=e[u](r).value}a(o.done?"return":"normal",r)}),(function(e){n("throw",e)}))}catch(e){a("throw",e)}}function a(e,a){switch(e){case"return":t.resolve({value:a,done:!0});break;case"throw":t.reject(a);break;default:t.resolve({value:a,done:!1})}(t=t.next)?n(t.key,t.arg):r=null}this._invoke=function(e,a){return new Promise((function(o,i){var s={key:e,arg:a,resolve:o,reject:i,next:null};r?r=r.next=s:(t=r=s,n(e,a))}))},"function"!=typeof e.return&&(this.return=void 0)}function x(e){var t={},r=!1;function n(t,n){return r=!0,n=new Promise((function(r){r(e[t](n))})),{done:!1,value:new C(n,1)}}return t["undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator"]=function(){return this},t.next=function(e){return r?(r=!1,e):n("next",e)},"function"==typeof e.throw&&(t.throw=function(e){if(r)throw r=!1,e;return n("throw",e)}),"function"==typeof e.return&&(t.return=function(e){return r?(r=!1,e):n("return",e)}),t}function C(e,t){this.v=e,this.k=t}function F(e){var t,r,n,a=2;for("undefined"!=typeof Symbol&&(r=Symbol.asyncIterator,n=Symbol.iterator);a--;){if(r&&null!=(t=e[r]))return t.call(e);if(n&&null!=(t=e[n]))return new P(t.call(e));r="@@asyncIterator",n="@@iterator"}throw new TypeError("Object is not async iterable")}function P(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then((function(e){return{value:e,done:t}}))}return P=function(e){this.s=e,this.n=e.next},P.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var r=this.s.return;return void 0===r?Promise.resolve({value:e,done:!0}):t(r.apply(this.s,arguments))},throw:function(e){var r=this.s.return;return void 0===r?Promise.reject(e):t(r.apply(this.s,arguments))}},new P(e)}L.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},L.prototype.next=function(e){return this._invoke("next",e)},L.prototype.throw=function(e){return this._invoke("throw",e)},L.prototype.return=function(e){return this._invoke("return",e)};var R,D="tempCache",U="dbVersion",M="selectionsPoll",B="byofPoll",j="fontsUpdateNotify",G="_1";!function(e){e[e.UNINITIALIZED=0]="UNINITIALIZED",e[e.IN_PROGRESS=1]="IN_PROGRESS",e[e.LOCAL_DONE=2]="LOCAL_DONE",e[e.DONE=3]="DONE"}(R||(R={}));var K=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._status=s.l0.StatusCode.UNINITIALIZED,this._catalogStatus=R.UNINITIALIZED,this._tagCatalogLastCheck=0,this._byofFontsLastCheck=0,this._userDetailsLastChecked="",this._obtainedTokenParams=new s.l0.ObtainedTokenParams,this._postCatalogTaskQueue=[],this._dbWrapper=new f.vV,this._recommendedUrlsMap=new Map,this._timer=new g.z(1e3,2e4),this._selections=new Set,this._byofFonts=new Set,this._responseCache=new h.d,this._selectionsEtag="",this._byofsEtag="",this._allByofFontHashes=new Map,this._cachedFonts=new Map,this._collabFonts=new Map,this._cachedNotFoundNonAdobeFonts=new Map,this._accessTokenByofStatus=new Map([["",!1]]),this._nonBlockingTokenCallStatus=!1,this._accessTokenBlockedSet=new Set,this._processUseFontReportResponse=function(e,t){return e.status===p.t.ResponseStatus.OK},this._activatedResponse=function(e,t){if(e.status===p.t.ResponseStatus.OK){var n=e.body,a=r.getResponseHeader(e,"etag");return{res:n,etag:a=b.p.parseETagValue(a)}}return!0},this._byofListResponse=function(e,t){if(e.status===p.t.ResponseStatus.OK){var n=e.body,a=r.getResponseHeader(e,"etag");return{res:n,etag:a=b.p.parseETagValue(a)}}return!0},this._processTokenResponse=function(e,t,n){var a;r._obtainedTokenParams.localClockOutdated=!1,r._nonBlockingTokenCallStatus=!1;var o=b.p.parseHeadersAndGetReqId(e.headers);if(!1===b.p.isValidAccessToken(r._initParams.authParams.accessToken)&&(t.body.links&&t.body.links.catalog&&(r._obtainedTokenParams.catalog=t.body.links.catalog),""===r._obtainedTokenParams.catalog)){var u="";u=r._initParams.authParams.isStaging?p.t.ServerUrl.FASTER_STAGE:p.t.ServerUrl.FASTER_PROD,u+=p.t.AF_COMPLETE_CATALOG_URL_PREFIX+p.t.AF_CATALOG_VERSION+p.t.AF_COMPLETE_CATALOG_URL_SUFFIX,r._obtainedTokenParams.catalog=u}if(t.status!==p.t.ResponseStatus.OK)if(t.taskType,s.l0.TaskType.TOKEN_FETCH,a=n,t.status===p.t.ResponseStatus.UNAUTHORIZED||t.status===p.t.ResponseStatus.FORBIDDEN?(r._accessTokenBlockedSet.add(r._initParams.authParams.accessToken),a.retryCount=0):a.retryCount=a.retryCount-1,a.retryCount)r.scheduleTask(t.taskType,a);else{var l=b.p.mapStatusNumberToErrorCode(t.status);r._status=s.l0.StatusCode.ERROR_OCCURED,r._initParams.statusUpdateCallback(r._status,new s.l0.Error(l,"Token Error for X-Request-Id: ".concat(o),!0,t.status))}else{var c=t.body.auth_preview_token,f=t.body.x_af_auth_token,d=t.body.auth_free_full_token;t.body.token&&(r._obtainedTokenParams.fasterEndPointToken=t.body.token),t.body.links&&t.body.links.download&&(r._obtainedTokenParams.genericdownloadUrl=t.body.links.download);var m=t.body.library,y=void 0===m?s.l0.Entitlement.ANONYMOUS:m;void 0!==y&&(r._obtainedTokenParams.entitlement=y,r.fetchCachedEntitlement().then((function(e){if(i.X.cachedEntitlement=y,(e===s.l0.Entitlement.FULL||e===s.l0.Entitlement.TRIAL)&&e!==y){var t=h.C.BYOF_ACCESS_ENDPOINT_PREFIX+r._initParams.authParams.userId+h.C.BYOF_ACCESS_ENDPOINT_SUFFIX;r._responseCache.deleteValue(t)}var n=h.C.ENTITLEMENT_ENDPOINT_PREFIX+encodeURIComponent(r.initParams.authParams.userId)+h.C.ENTITLEMENT_ENDPOINT_SUFFIX;r.responseCache.putValue(n,y)}))),y===s.l0.Entitlement.TRIAL&&"undefined"!==d&&""!==d&&r.initParams.fontBufferType!==s.l0.FontBufferType.RAW&&(f=d),!f&&c&&(f=c),r._obtainedTokenParams.token=f;var v=f.indexOf("="),g=f.indexOf("~");-1!==v&&-1!==g&&(r._obtainedTokenParams.expiry=Number(f.substring(v+1,g))),r._status=s.l0.StatusCode.DONE,t.taskType===s.l0.TaskType.TOKEN_FETCH?r._initParams.statusUpdateCallback(r._status,new s.l0.Error(s.l0.ErrorCode.NONE,"X-Request-Id: ".concat(o),!1,t.status)):((a=n).retryCount=a.retryCount-1,r._obtainedTokenParams.expiry<Math.round((new Date).getTime()/1e3)?(Math.round((new Date).getTime()/1e3)-r._obtainedTokenParams.expiry>900&&(r._obtainedTokenParams.localClockOutdated=!0),a.root.forceDownload=!0,r.scheduleTask(s.l0.TaskType.FONT_DOWNLOAD,n)):a.retryCount&&r.scheduleTask(s.l0.TaskType.FONT_DOWNLOAD,n)),r.initParams.runtimeMode!==s.l0.RuntimeMode.FOUND_FONTS&&r.tryLocalCatalogAndFetchIfRequired(null),r._initParams.advancedServiceSearch&&r.tryCatalogFetch()}return!0},this._processFileResponse=function(e,t){var n=new s.l0.Error;if(e.status!==p.t.ResponseStatus.OK){var a=b.p.mapStatusNumberToErrorCode(e.status);n=new s.l0.Error(a,"Error occurred")}var o=r.getResponseHeader(e,"last-modified");return{file:e.body,err:n,lastModTime:o}},this._processResponse=function(e,t,n){switch(t.taskType){case s.l0.TaskType.TOKEN_FETCH:case s.l0.TaskType.TOKEN_FETCH_INTERNAL:return r._processTokenResponse(e,t,n);case s.l0.TaskType.FONT_SEARCH:return r._processSearchResponse(e,t,n);case s.l0.TaskType.FONT_DOWNLOAD:return r._processFontDownloadResponse(e,t,n);case s.l0.TaskType.USAGE_REPORT:return r._processUseFontReportResponse(t,n);case s.l0.TaskType.FILE_DOWNLOAD:return r._processFileResponse(t,n);case s.l0.TaskType.ACTIVATED_FONTS_COUNT:return r._activatedCountResponse(t,n);case s.l0.TaskType.ACTIVATED_FONTS:return r._activatedResponse(t,n);case s.l0.TaskType.BYOF_COUNT:return r._byofCountResponse(t,n);case s.l0.TaskType.BYOF_LISTS:return r._byofListResponse(t,n);case s.l0.TaskType.ACTIVATED_FONTS_POLL:return r._activatedPollResponse(t,n);case s.l0.TaskType.BYOF_FONTS_POLL:return r._byofPollResponse(t,n);case s.l0.TaskType.FONT_CATALOG_URL:return r._processFontCatalogUrl(t,n);case s.l0.TaskType.FETCH_FAMILY:return r._fetchFamilyResponse(t,n);case s.l0.TaskType.SEARCH_FAMILY:return r._searchFamilyResponse(t,n);case s.l0.TaskType.CATALOG_DOWNLOAD:return r._handleCatalogResponse(t,n);case s.l0.TaskType.CUSTOM_CATALOG_URL_VARIABLE:case s.l0.TaskType.CUSTOM_CATALOG_URL_PHOTOSHOP:return r._handleCustomBrowseCatalogUrlResponse(t,n);case s.l0.TaskType.CUSTOM_CATALOG_DOWNLOAD:return r._handleCustomBrowseCatalogResponse(t,n);case s.l0.TaskType.TAG_CATALOG_URL:return r._processTagCatalogUrl(t,n);case s.l0.TaskType.FETCH_LANGS:return r._processLangNames(t,n);case s.l0.TaskType.RECOMMENDATION_URL:return r._processRecommendationUrl(t,n);case s.l0.TaskType.BYOF_UPLOAD_URL:return r._processByofUploadUrl(t,n);case s.l0.TaskType.BYOF_ACCESS_LEVEL:return r._handleByofAccessLevelResponse(e,t,n);case s.l0.TaskType.BYOF_DELETE:return r._handleByofAuthDeleteResponse(e,t,n);case s.l0.TaskType.FILE_UPLOAD:return r._processFileUploadResponse(t,n);case s.l0.TaskType.ANS_SHORT_POLL:return r._handleAnsShortPollResponse(t,n);case s.l0.TaskType.HEALTHCHECK_API:return r._processHealthCheckResponse(e,t,n);case s.l0.TaskType.RECOMMENDED_SLUGS:case s.l0.TaskType.NEWEST_SLUGS:case s.l0.TaskType.TRENDING_SLUGS:return r._processMoreSlugs(t,n);case s.l0.TaskType.COLLAB_AUTH_API:return r._processCollabAuthResponse(e,t,n);case s.l0.TaskType.UNICODE_RANGE_MATCH_API:return r._processUnicodeRangeMatchResponse(e,t,n)}},this._initParams=t,this._foundFontsHandler=new y.n(this);try{this.createBroadcastChannel(),this._responseCache.init(),(this.initParams.watchFontUpdates.length||this.initParams.runtimeMode===s.l0.RuntimeMode.ALL)&&this.startTimers(),this.initParams.runtimeMode===s.l0.RuntimeMode.FOUND_FONTS&&this.addDemoCollectionToCachedFonts()}catch(e){}this._initParams.diskCache===s.l0.DiskCacheType.OPFS&&d.Wd.getAvailableStorage().then((function(t){!d.Wd.isEstimateEnabled()||t>=e.kMaxDiskCacheSize?e._diskCache=new c.p(e.kMaxDiskCacheSize,d.xB,e.kMaxNumFonts):e._diskCache=new c.p(t,d.xB,e.kMaxNumFonts)})),e._schedulersList.push(this)}var t,r,_,E,N,O,C,P,K,H,V,W,Y,J,z,$,q,X,Q,Z,ee,te,re,ne,ae,oe,ie,se,ue,le,ce,fe,he,pe,de,me,ye,ve,ge,be,_e,we,Ee,Se,Te,ke,Ae,Ne;return t=e,r=[{key:"status",get:function(){return this._status},set:function(e){this._status=e}},{key:"channel",get:function(){return this._channel}},{key:"foundFontsHandler",get:function(){return this._foundFontsHandler},set:function(e){this._foundFontsHandler=e}},{key:"responseCache",get:function(){return this._responseCache},set:function(e){this._responseCache=e}},{key:"cachedFonts",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.l0.FontType.DEFAULT;return e===s.l0.FontType.DEFAULT?this._cachedFonts:new Map(A(this._cachedFonts).filter((function(t){return k(t,2)[1].type===e})))}},{key:"collabFonts",get:function(){return this._collabFonts},set:function(e){this._collabFonts=e}},{key:"catalogStatus",get:function(){return this._catalogStatus},set:function(e){this._catalogStatus=e}},{key:"obtainedTokenParams",get:function(){return this._obtainedTokenParams},set:function(e){this._obtainedTokenParams=e}},{key:"dbWrapper",get:function(){return this._dbWrapper},set:function(e){this._dbWrapper=e}},{key:"createBroadcastChannel",value:function(){var e=this;try{this._channel=new BroadcastChannel("Recents_".concat(this.initParams.authParams.appId,"_").concat(this.initParams.authParams.userId)),this._channel.onmessage=function(t){try{var r=t.data;e.publishMessage(r)}catch(e){}}}catch(e){}}},{key:"publishMessage",value:function(e){var t=this;Promise.resolve().then((function(){var r,n=[],a=T(e);try{for(a.s();!(r=a.n()).done;){var o=r.value;try{var i=s.K1.fromJSON(o.fontJson);if(i.type!==s.l0.FontType.APPLICATION&&!t.initParams.additionalFontTechnologies.has(s.l0.AdditionalFontTechnologies.VARIABLE)&&i.isVariableFont)continue;if(i.type===s.l0.FontType.SYSTEM&&!1===b.p.checkIfSystemFontApplicable(i,t.initParams.additionalFontTechnologies))continue;n.push(i)}catch(e){}}}catch(e){a.e(e)}finally{a.f()}t.initParams.recentFontsUpdateCallback(n)}))}},{key:"startTimers",value:function(){var e=this;Promise.resolve().then((function(){var t=b.p.isValidAccessToken(e.initParams.authParams.accessToken),r=!1;t&&e.initParams.runtimeMode!==s.l0.RuntimeMode.FOUND_FONTS&&""===e._timer.getTask(M).id&&(r=!0,e._timer.addTask(M,(function(){Promise.resolve().then((function(){t&&(e.initParams.advancedServiceSearch||e.initParams.fontsUpdateCallback)&&e._selections.size>0&&e._status===s.l0.StatusCode.DONE&&e.scheduleTask(s.l0.TaskType.ACTIVATED_FONTS_POLL,{root:{page:1,perPage:1,isRequested:!1},retryCount:1})}))}),e.initParams.selectionPollInterval,!1)),t&&b.p.isGivenScopePresent(e._initParams.authParams.accessToken,"af_byof")&&""===e._timer.getTask(B).id&&(r=!0,e._timer.addTask(B,(function(){Promise.resolve().then((function(){e._obtainedTokenParams.entitlement!==s.l0.Entitlement.TRIAL&&-1!==e.initParams.watchFontUpdates.indexOf(s.l0.FontType.BYOF)&&t&&e.initParams.fontsUpdateCallback&&e._status===s.l0.StatusCode.DONE&&e.scheduleTask(s.l0.TaskType.BYOF_FONTS_POLL,{root:{page:1,perPage:1,isRequested:!1},retryCount:1})}))}),e.initParams.selectionPollInterval,!0)),r&&""===e._timer.getTask(j).id&&e._timer.addTask(j,(function(){Promise.resolve().then((function(){e.fireFontUpdates()}))}),12,!1)}))}},{key:"togglePollTimers",value:function(e){e?this._timer.pause():this._timer.isPaused()&&this._timer.resume()}},{key:"performByofValidationScope",value:function(){var e=this._initParams.authParams.accessToken;return!(!b.p.isValidAccessToken(e)||!b.p.isGivenScopePresent(e,"af_byof"))}},{key:"addDemoCollectionToCachedFonts",value:function(){var t=new s.K1(s.l0.FontType.DEFAULT,"EmojiOneColor","f612971c-aec5-447d-9a09-4428dd770ec9");t.familyName="EmojiOne",t.styleName="Color",t.fontName="".concat(t.familyName," ").concat(t.styleName),t.script=s.l0.Language.Emoji,t.isActiveForUser=!0,t.addSupportedLanguage(s.l0.Language.Emoji),this._cachedFonts.set("EmojiOneColor",t),this._cachedFonts.set(t.fontId,t),e._cachedFontsUrlProd.set("EmojiOneColor","https://faster.typekit.net/try/library/rocket-full/otf/f612971c-aec5-447d-9a09-4428dd770ec9?__token__=exp=1674353427~acl=/try/library/rocket-full/otf/*~hmac=1723b20f81e1909a975ecf18937a7f390c0c4f56344a288910543695195cc0e7"),e._cachedFontsUrlStage.set("EmojiOneColor","https://faster-staging.typekit.net/try/library/rocket-full/otf/f612971c-aec5-447d-9a09-4428dd770ec9?__token__=exp=1674353168~acl=/try/library/rocket-full/otf/*~hmac=e95cffad0784845c76a3d2892795edfdc623ab99a5692bd1cf735bf41a3b7d9d")}},{key:"cleanup",value:function(){var t=e._schedulersList.indexOf(this);t>=0&&e._schedulersList.splice(t,1)}},{key:"initParams",get:function(){return this._initParams},set:function(e){this._initParams=e}},{key:"handleAuthFailure",value:function(){var e=this;Promise.resolve().then((function(){e._status=s.l0.StatusCode.ERROR_OCCURED,e._initParams.statusUpdateCallback(e._status,new s.l0.Error(s.l0.ErrorCode.AUTH_FAILURE,"Auth Token Error",!0))}))}},{key:"populateByofScript",value:(Ne=S(w().mark((function e(t){var r,n,a;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=h.C.BYOF_SCRIPT_ENDPOINT_PREFIX+t.fontId+G+h.C.BYOF_SCRIPT_ENDPOINT_SUFFIX,e.next=3,this._responseCache.getValue(r);case 3:n=e.sent,""!==t.fontId&&n?t.script=n:t.fontBuffer.length&&(a=new m.w(t.fontBuffer),t.script=a.computeFontScript(t.postscriptName),this._responseCache.putValue(r,t.script));case 5:case"end":return e.stop()}}),e,this)}))),function(e){return Ne.apply(this,arguments)})},{key:"hasUserAccessForByofUpload",value:(Ae=S(w().mark((function e(){var t,r,n,a=this;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=new s.l0.Error,void 0===(r=this._accessTokenByofStatus.get(this._initParams.authParams.accessToken))){e.next=5;break}return!1===b.p.isValidAccessToken(this._initParams.authParams.accessToken)&&(t.errCode=s.l0.ErrorCode.AUTH_FAILURE),e.abrupt("return",{error:t,hasAccess:r});case 5:if(!1!==this.performByofValidationScope()){e.next=8;break}return r=!1,e.abrupt("return",{error:t,hasAccess:r});case 8:return n=h.C.BYOF_ACCESS_ENDPOINT_PREFIX+this._initParams.authParams.userId+h.C.BYOF_ACCESS_ENDPOINT_SUFFIX,e.next=11,this._responseCache.getValue(n);case 11:if(void 0!==(r=e.sent)){e.next=18;break}return e.next=15,this.scheduleTask(s.l0.TaskType.BYOF_ACCESS_LEVEL,null);case 15:return e.abrupt("return",e.sent);case 18:setTimeout((function(){a.scheduleTask(s.l0.TaskType.BYOF_ACCESS_LEVEL,null)}),3e4);case 19:return void 0===r&&(r=!0),e.abrupt("return",{error:t,hasAccess:r});case 21:case"end":return e.stop()}}),e,this)}))),function(){return Ae.apply(this,arguments)})},{key:"deleteByofAuth",value:(ke=S(w().mark((function e(t){var r;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t.length>0)){e.next=5;break}return r={root:{downloadCB:null,fontsList:t,fontsIds:[],unicodesList:[],fontInfo:new s.K1},retryCount:1},e.next=4,this.scheduleTask(s.l0.TaskType.BYOF_DELETE,r);case 4:return e.abrupt("return",e.sent);case 5:return e.abrupt("return",{error:new s.l0.Error,status:!1});case 6:case"end":return e.stop()}}),e,this)}))),function(e){return ke.apply(this,arguments)})},{key:"populateCharacterSet",value:function(e){if(this.initParams.runtimeMode!==s.l0.RuntimeMode.FOUND_FONTS&&e.fontBuffer.length&&this._initParams.enableCharacterSets)try{var t=new m.w(e.fontBuffer);e.characterSet=t.charSet}catch(e){}}},{key:"fetchCachedEntitlement",value:(Te=S(w().mark((function e(){var t,r,n;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=b.p.isValidAccessToken(this.initParams.authParams.accessToken),void 0===i.X.cachedEntitlement){e.next=3;break}return e.abrupt("return",i.X.cachedEntitlement);case 3:if(""===this.initParams.authParams.userId||!1!==t){e.next=6;break}return i.X.cachedEntitlement=s.l0.Entitlement.ANONYMOUS,e.abrupt("return",s.l0.Entitlement.ANONYMOUS);case 6:if(""===this.initParams.authParams.userId||!t){e.next=14;break}return r=h.C.ENTITLEMENT_ENDPOINT_PREFIX+encodeURIComponent(this.initParams.authParams.userId)+h.C.ENTITLEMENT_ENDPOINT_SUFFIX,e.next=10,this.responseCache.getValue(r);case 10:if((n=e.sent)!==s.l0.Entitlement.FULL&&n!==s.l0.Entitlement.TRIAL){e.next=14;break}return i.X.cachedEntitlement=n,e.abrupt("return",n);case 14:return e.abrupt("return",void 0);case 15:case"end":return e.stop()}}),e,this)}))),function(){return Te.apply(this,arguments)})},{key:"getFontFromDisk",value:(Se=S(w().mark((function t(r){var n;return w().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.initParams.diskCache!==s.l0.DiskCacheType.OPFS||""===e._diskCache.getFile(r)){t.next=5;break}return t.next=3,d.Wd.ReadFile(d.xB,r);case 3:return n=t.sent,t.abrupt("return",new Uint8Array(n));case 5:case"end":return t.stop()}}),t,this)}))),function(e){return Se.apply(this,arguments)})},{key:"getDemoFontsCollection",value:(Ee=S(w().mark((function t(){var r,n,a,o,i,u,l;return w().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.addDemoCollectionToCachedFonts();case 2:r=[],n=T(e._cachedFontsUrlProd);try{for(n.s();!(a=n.n()).done;)o=k(a.value,1),i=o[0],(u=this._cachedFonts.get(i))&&r.push(u)}catch(e){n.e(e)}finally{n.f()}return l=b.p.getAggregationFromFonts(r),t.abrupt("return",{aggregation:l,error:new s.l0.Error});case 7:case"end":return t.stop()}}),t,this)}))),function(){return Ee.apply(this,arguments)})},{key:"prevalidateByofFont",value:(we=S(w().mark((function e(t){var r,n,a=this;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i.X.Logger.logMessage(s.ds.DEBUG,t),r=function(){var e=S(w().mark((function e(t){return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.getFontFromLocalInfo(t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),n=new o.u(t,r),e.next=5,n._validateInternal(!1);case 5:return e.abrupt("return",n);case 6:case"end":return e.stop()}}),e)}))),function(e){return we.apply(this,arguments)})},{key:"uploadByofFont",value:(_e=S(w().mark((function e(t){var r,n;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i.X.Logger.logMessage(s.ds.DEBUG,t),r=new o.u(t),e.next=4,r._validateInternal(!0);case 4:if(e.t0=e.sent,!1!==e.t0){e.next=7;break}return e.abrupt("return",{status:!1,error:new s.l0.Error(s.l0.ErrorCode.UNKNOWN,r.byofError,!0)});case 7:return n={root:{file:t},retryCount:1},e.next=10,this.scheduleTask(s.l0.TaskType.BYOF_UPLOAD_URL,n);case 10:return e.abrupt("return",e.sent);case 11:case"end":return e.stop()}}),e,this)}))),function(e){return _e.apply(this,arguments)})},{key:"updateRecentsListAndBroadcastMessage",value:(be=S(w().mark((function e(t){var r,n,a,o,i,u,l,c,h,p,d,m,y,v,g,b,_,E,S;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.length){e.next=20;break}return r=new Map,e.next=4,this.dbWrapper.getRecentListRaw(10);case 4:n=e.sent,a=T(n);try{for(a.s();!(o=a.n()).done;){i=o.value;try{u=s.K1.fromJSON(i.fontJson),r.set(u,i.timestamp)}catch(e){}}}catch(e){a.e(e)}finally{a.f()}l=T(t);try{for(l.s();!(c=l.n()).done;)h=c.value,r.set(h,(new Date).getTime())}catch(e){l.e(e)}finally{l.f()}p=A(r.entries()).sort((function(e,t){return t[1]-e[1]})),d=[],m=new Set,y=T(p);try{for(y.s();!(v=y.n()).done;)g=v.value,!1===m.has(g[0].postscriptName)&&(m.add(g[0].postscriptName),d.push(g))}catch(e){y.e(e)}finally{y.f()}d=d.slice(0,10),b=[],_=T(d);try{for(_.s();!(E=_.n()).done;)S=E.value,b.push({psName:S[0].postscriptName,fontJson:S[0].toJSON(),timestamp:S[1]})}catch(e){_.e(e)}finally{_.f()}return e.next=20,this.dbWrapper.bulkPutPrefsDbData(f.jD.RECENTS,b);case 20:this.getRecentListSortedAndBroadcastMessage();case 21:case"end":return e.stop()}}),e,this)}))),function(e){return be.apply(this,arguments)})},{key:"getRecentListSortedAndBroadcastMessage",value:(ge=S(w().mark((function e(){var t,r,n,a,o,i,u,l,c,f=arguments;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=!(f.length>0&&void 0!==f[0])||f[0],e.next=3,this.dbWrapper.getRecentListSorted(10);case 3:r=e.sent,n=[],a=T(r),e.prev=6,a.s();case 8:if((o=a.n()).done){e.next=27;break}if(i=o.value,e.prev=10,(u=s.K1.fromJSON(i.fontJson)).type===s.l0.FontType.APPLICATION||this.initParams.additionalFontTechnologies.has(s.l0.AdditionalFontTechnologies.VARIABLE)||!u.isVariableFont){e.next=14;break}return e.abrupt("continue",25);case 14:if(u.type!==s.l0.FontType.SYSTEM||!1!==b.p.checkIfSystemFontApplicable(u,this.initParams.additionalFontTechnologies)){e.next=16;break}return e.abrupt("continue",25);case 16:if(l=this.initParams.fontFetchStrategy,c=l===s.l0.FontFetchStrategy.ALL||l===s.l0.FontFetchStrategy.SYSTEM,u.type!==s.l0.FontType.SYSTEM||c){e.next=20;break}return e.abrupt("continue",25);case 20:n.push(u),e.next=25;break;case 23:e.prev=23,e.t0=e.catch(10);case 25:e.next=8;break;case 27:e.next=32;break;case 29:e.prev=29,e.t1=e.catch(6),a.e(e.t1);case 32:return e.prev=32,a.f(),e.finish(32);case 35:this.channel&&t&&this.channel.postMessage(r),this.initParams.recentFontsUpdateCallback(n);case 37:case"end":return e.stop()}}),e,this,[[6,29,32,35],[10,23]])}))),function(){return ge.apply(this,arguments)})},{key:"getCachedActivated",value:(ve=S(w().mark((function e(t,r,n){var a,o,i,u,l,c,f,p,d,m,y=this;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=[],o=function(e){return""===t?y._responseCache.getInMemoryOrFromResponseCache(e):y._responseCache.getValue(e)},e.next=4,o(h.C.SELECTIONS_LIST_ENDPOINT_PREFIX.concat(String(this._initParams.getLanguage()),"_",this.initParams.authParams.userId,h.C.SELECTIONS_LIST_ENDPOINT_SUFFIX));case 4:return i=e.sent,e.next=7,o(h.C.SELECTIONS_ETAG_ENDPOINT_PREFIX+this.initParams.authParams.userId+h.C.SELECTIONS_ETAG_ENDPOINT_SUFFIX);case 7:if(u=e.sent,""!==t&&String(u)!==t||!i){e.next=15;break}b.p.getFamiliesFromFontsArrayJSON(i,s.l0.FontType.ACTIVATED,this.obtainedTokenParams.entitlement,r,"",null,this._initParams,!0,[]),r=b.p.setDisplayFontForEachFamilyIfNeeded(r),l=T(r.getEntries());try{for(l.s();!(c=l.n()).done;){f=c.value,p=T(f[1].getEntries());try{for(p.s();!(d=p.n()).done;)m=d.value,a.push(m.postscriptName),this._cachedFonts.set(m.postscriptName,m)}catch(e){p.e(e)}finally{p.f()}}}catch(e){l.e(e)}finally{l.f()}return n&&(this._selections=new Set(a),this._selectionsEtag=""!==t?t:u),e.abrupt("return",!0);case 15:return e.abrupt("return",!1);case 16:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return ve.apply(this,arguments)})},{key:"_activatedCountResponse",value:(ye=S(w().mark((function e(t,r){var n,a,o,i,u,l,c,f,d,m,y,v,g,_,E,S,k,N,O,I,L,x,C=this;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(new s.mP,new s.l0.Error,n=r,a=new s.mP,o=this.getResponseHeader(t,"etag"),o=b.p.parseETagValue(o),b.p.mapStatusNumberToErrorCode(t.status)===s.l0.ErrorCode.NONE){e.next=20;break}if(t.status===p.t.ResponseStatus.UNAUTHORIZED?n.retryCount=0:n.retryCount=n.retryCount-1,!(n.retryCount>0)){e.next=14;break}return e.next=10,this.scheduleTask(s.l0.TaskType.ACTIVATED_FONTS_COUNT,n);case 10:return i=e.sent,e.abrupt("return",i);case 14:return u=b.p.mapStatusNumberToErrorCode(t.status),(l=new s.l0.Error(u,"Activated fonts Error",!1)).errCode===s.l0.ErrorCode.AUTH_FAILURE&&this.handleAuthFailure(),e.abrupt("return",{aggregation:a,error:l});case 18:e.next=55;break;case 20:return c=0,t.headers.forEach((function(e){"total-count"===e[0]&&(c=Number(e[1]),n.root.page=Math.floor(c/100)+1,n.root.perPage=100)})),e.next=24,this.getCachedActivated(o,a,n.root.isRequested);case 24:if(!e.sent){e.next=30;break}return f=new s.l0.Error,e.abrupt("return",{aggregation:a,error:f});case 30:for(d=[],m=[],y=1;y<n.root.page;y++)v={root:{page:y+1,perPage:n.root.perPage,isRequested:n.root.isRequested},retryCount:n.retryCount},m.push(this.scheduleTask(s.l0.TaskType.ACTIVATED_FONTS,v));if(g=[{res:t.body,etag:o}],!m.length){e.next=43;break}return e.t0=g.push,e.t1=g,e.t2=A,e.next=40,Promise.all(m);case 40:e.t3=e.sent,e.t4=(0,e.t2)(e.t3),e.t0.apply.call(e.t0,e.t1,e.t4);case 43:g.forEach((function(e){var t=e.res;""!==String(t)&&(d=[].concat(A(d),A(t)),b.p.getFamiliesFromFontsArrayJSON(t,s.l0.FontType.ACTIVATED,C.obtainedTokenParams.entitlement,a,"",null,C._initParams,!0,[]))})),a=b.p.setDisplayFontForEachFamilyIfNeeded(a),_=[],E=T(a.getEntries());try{for(E.s();!(S=E.n()).done;){k=S.value,N=T(k[1].getEntries());try{for(N.s();!(O=N.n()).done;)I=O.value,_.push(I.postscriptName),this._cachedFonts.set(I.postscriptName,I)}catch(e){N.e(e)}finally{N.f()}}}catch(e){E.e(e)}finally{E.f()}return this._responseCache.putValue(h.C.SELECTIONS_LIST_ENDPOINT_PREFIX.concat(String(this._initParams.getLanguage()),"_",this.initParams.authParams.userId,h.C.SELECTIONS_LIST_ENDPOINT_SUFFIX),d),this._responseCache.putValue(h.C.SELECTIONS_ETAG_ENDPOINT_PREFIX.concat(this.initParams.authParams.userId,h.C.SELECTIONS_ETAG_ENDPOINT_SUFFIX),o),this.dbWrapper.putSelectionsData(o,_),L=new Set(_),n.root.isRequested?(this._selections=L,this._selectionsEtag=o):setTimeout((function(){C.fireFontUpdates()}),1e3),x=new s.l0.Error,e.abrupt("return",{aggregation:a,error:x});case 55:case"end":return e.stop()}}),e,this)}))),function(e,t){return ye.apply(this,arguments)})},{key:"fireActivatedUpdates",value:(me=S(w().mark((function t(){var r,n,a,o,i,u,l,c,f,h,p,d,m,y,v,g,b,_;return w().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.dbWrapper.getSelectionsData();case 2:if(!(r=t.sent)||!r.psNames.length||""===this._selectionsEtag||r.etag===this._selectionsEtag){t.next=41;break}n=new Set(r.psNames),this._selectionsEtag=r.etag,a=[],o=T(this._selections);try{for(o.s();!(i=o.n()).done;)u=i.value,!1===n.has(u)?a.push({fontInfo:u,isVariationId:!1,updateType:s.l0.FontUpdateOperationType.REMOVED,contextData:null}):n.delete(u)}catch(e){o.e(e)}finally{o.f()}l=T(n);try{for(l.s();!(c=l.n()).done;)f=c.value,a.push({fontInfo:f,isVariationId:!1,updateType:s.l0.FontUpdateOperationType.ADDED,contextData:null})}catch(e){l.e(e)}finally{l.f()}if(!a.length){t.next=41;break}h=[],p=T(a),t.prev=14,p.s();case 16:if((d=p.n()).done){t.next=31;break}if(!1!==(m=d.value).isVariationId){t.next=25;break}return t.next=21,this.getFontFromLocalOrRemoteInfo(m.fontInfo,"",s.l0.FontType.ACTIVATED);case 21:(y=t.sent)&&h.push(new s.l0.FontUpdateNotification(y,m.updateType,s.l0.FontUpdateNotificationType.SELECTIONS)),t.next=29;break;case 25:return t.next=27,this.dbWrapper.getFontDataFromVariationId([m.fontInfo],this.initParams.appEntitlement,s.l0.FontType.ACTIVATED);case 27:(v=t.sent).size>0&&h.push(new s.l0.FontUpdateNotification(v.entries().next().value,m.updateType,s.l0.FontUpdateNotificationType.SELECTIONS));case 29:t.next=16;break;case 31:t.next=36;break;case 33:t.prev=33,t.t0=t.catch(14),p.e(t.t0);case 36:return t.prev=36,p.f(),t.finish(36);case 39:g=T(e._schedulersList);try{for(g.s();!(b=g.n()).done;)(_=b.value).initParams.fontsUpdateCallback?_.initParams.fontsUpdateCallback(h):e.updateCachedSelectionsAndByof(h,[this])}catch(e){g.e(e)}finally{g.f()}case 41:case"end":return t.stop()}}),t,this,[[14,33,36,39]])}))),function(){return me.apply(this,arguments)})},{key:"fireByofUpdates",value:(de=S(w().mark((function t(){var r,n,a,o,i,u,l,c,f,p,d,m,y,v,g,_,E,S,A,N,O,I,L,x,C,F,P;return w().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._responseCache.getValue(h.C.BYOF_LIST_ENDPOINT_PREFIX+this.initParams.authParams.userId+h.C.BYOF_LIST_ENDPOINT_SUFFIX);case 2:return r=t.sent,t.next=5,this._responseCache.getValue(h.C.BYOF_ETAG_ENDPOINT_PREFIX+this.initParams.authParams.userId+h.C.BYOF_ETAG_ENDPOINT_SUFFIX);case 5:if(n=t.sent,!r||""===this._byofsEtag||this._byofsEtag===String(n)){t.next=51;break}a=new Map,this._byofsEtag=n,o=b.p.getFontsFromByofData(r),i=T(o);try{for(i.s();!(u=i.n()).done;)l=u.value,a.set(l.postscriptName,l)}catch(e){i.e(e)}finally{i.f()}c=[],f=T(this._byofFonts);try{for(f.s();!(p=f.n()).done;)d=p.value,!1===a.has(d)?(void 0===(m=this._cachedFonts.get(d))&&(m=new s.K1(s.l0.FontType.BYOF,d,"byof-font")),c.push({fontInfo:d,isVariationId:!1,updateType:s.l0.FontUpdateOperationType.REMOVED,contextData:m})):a.delete(d)}catch(e){f.e(e)}finally{f.f()}y=T(a);try{for(y.s();!(v=y.n()).done;)g=k(v.value,2),_=g[0],E=g[1],c.push({fontInfo:_,isVariationId:!1,updateType:s.l0.FontUpdateOperationType.ADDED,contextData:E})}catch(e){y.e(e)}finally{y.f()}if(!c.length){t.next=51;break}S=[],A=T(c),t.prev=20,A.s();case 22:if((N=A.n()).done){t.next=41;break}if(!(O=N.value).contextData){t.next=28;break}try{I=O.contextData,S.push(new s.l0.FontUpdateNotification(I,O.updateType,s.l0.FontUpdateNotificationType.BYOF))}catch(e){}t.next=39;break;case 28:if(!1!==O.isVariationId){t.next=35;break}return t.next=31,this.getFontFromLocalOrRemoteInfo(O.fontInfo,"",s.l0.FontType.BYOF);case 31:(L=t.sent)&&S.push(new s.l0.FontUpdateNotification(L,O.updateType,s.l0.FontUpdateNotificationType.BYOF)),t.next=39;break;case 35:return t.next=37,this.dbWrapper.getFontDataFromVariationId([O.fontInfo],this.initParams.appEntitlement,s.l0.FontType.BYOF);case 37:(x=t.sent).size>0&&S.push(new s.l0.FontUpdateNotification(x.entries().next().value,O.updateType,s.l0.FontUpdateNotificationType.BYOF));case 39:t.next=22;break;case 41:t.next=46;break;case 43:t.prev=43,t.t0=t.catch(20),A.e(t.t0);case 46:return t.prev=46,A.f(),t.finish(46);case 49:C=T(e._schedulersList);try{for(C.s();!(F=C.n()).done;)(P=F.value).initParams.fontsUpdateCallback?P.initParams.fontsUpdateCallback(S):e.updateCachedSelectionsAndByof(S,[this])}catch(e){C.e(e)}finally{C.f()}case 51:case"end":return t.stop()}}),t,this,[[20,43,46,49]])}))),function(){return de.apply(this,arguments)})},{key:"fireFontUpdates",value:(pe=S(w().mark((function e(){return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.fireActivatedUpdates();case 2:return e.next=4,this.fireByofUpdates();case 4:case"end":return e.stop()}}),e,this)}))),function(){return pe.apply(this,arguments)})},{key:"queryBrowseDB",value:(he=S(w().mark((function e(t,r){var n,a,o=arguments;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=o.length>2&&void 0!==o[2]?o[2]:f.WM.BROWSE,a=!(o.length>3&&void 0!==o[3])||o[3],e.next=4,this.dbWrapper.dbQueryUp(t,r,n,a);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e,this)}))),function(e,t){return he.apply(this,arguments)})},{key:"_processTagCatalogUrl",value:(fe=S(w().mark((function e(t,r){var n,a,o,i,u,l,c,h,p,d,m,y,v,g,_,E,S,k,A,N,O,I,L;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="",a=r,e.next=4,b.p.getAppropriateLocale();case 4:if(o=e.sent,i=b.p.mapStatusNumberToErrorCode(t.status),u=new s.l0.Error(i,"",!1),l=b.p.parseTagCatalogResponse(t.body,o),e.prev=8,!l){e.next=60;break}return c=[],e.next=13,this.dbWrapper.getBrowseDbTableSize(f.WM.VARIATION_TAGS);case 13:if(h=e.sent,p="",!h){e.next=19;break}return e.next=18,this.dbWrapper.getBrowseDBLastModTime(f.WM.VARIATION_TAGS);case 18:p=e.sent;case 19:return d=3,m=!1,y=["","",""],3===p.split("||").length&&(y=p.split("||")),c.push(this.scheduleTask(s.l0.TaskType.FILE_DOWNLOAD,null,l.tagUrl,y[0])),c.push(this.scheduleTask(s.l0.TaskType.FILE_DOWNLOAD,null,l.tagAssignmentUrl,y[1])),c.push(this.scheduleTask(s.l0.TaskType.FILE_DOWNLOAD,null,l.tagSynonymsUrl,y[2])),e.next=28,Promise.all(c);case 28:if((v=e.sent).length){g=0,_=T(v);try{for(_.s();!(E=_.n()).done;)""!==E.value.file&&(g+=1)}catch(e){_.e(e)}finally{_.f()}g!==d&&0!==g&&(m=!0)}else m=!0;if(!m){e.next=41;break}return e.next=33,this.dbWrapper.browseDb.tagData.clear();case 33:return p="",(S=[]).push(this.scheduleTask(s.l0.TaskType.FILE_DOWNLOAD,null,l.tagUrl,p)),S.push(this.scheduleTask(s.l0.TaskType.FILE_DOWNLOAD,null,l.tagAssignmentUrl,p)),S.push(this.scheduleTask(s.l0.TaskType.FILE_DOWNLOAD,null,l.tagSynonymsUrl,p)),e.next=40,Promise.all(S);case 40:v=e.sent;case 41:if(!v.length){e.next=60;break}k=T(v);try{for(k.s();!(A=k.n()).done;)N=A.value,n=(n+N.lastModTime).concat("||")}catch(e){k.e(e)}finally{k.f()}return n.length>=2&&(n=n.slice(0,-2)),e.next=47,this.dbWrapper.processTagCatalogFiles(v);case 47:if(O=e.sent,I=Array.from(O.values()),0!==O.size){e.next=55;break}return e.next=52,this.queryBrowseDB([],[],f.WM.VARIATION_TAGS,!0);case 52:I=e.sent,e.next=57;break;case 55:I=I.sort((function(e,t){return e.tagName.localeCompare(t.tagName)})),this.dbWrapper.putTagDataInDB(n,I);case 57:return this._tagCatalogLastCheck=(new Date).getTime(),L=this.dbWrapper.getVariationDataFromFetchedDBData(I,this.initParams.appEntitlement,this._obtainedTokenParams.entitlement,a.root.delayLoad,a.root.filters),e.abrupt("return",{tags:L,err:u});case 60:e.next=66;break;case 62:e.prev=62,e.t0=e.catch(8),console.log(e.t0.stack||e.t0),u.errCode=s.l0.ErrorCode.UNKNOWN;case 66:return e.abrupt("return",{tags:new Map,err:u});case 67:case"end":return e.stop()}}),e,this,[[8,62]])}))),function(e,t){return fe.apply(this,arguments)})},{key:"executePostCatalogTasks",value:function(){for(var e=this._postCatalogTaskQueue.pop();this._postCatalogTaskQueue.length;){try{e()}catch(e){}e=this._postCatalogTaskQueue.pop()}if(e)try{e()}catch(e){}}},{key:"tryLocalCatalogAndFetchIfRequired",value:(ce=S(w().mark((function e(t){var r,n,a,o=arguments;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=o.length>1&&void 0!==o[1]&&o[1],this.catalogStatus!==R.LOCAL_DONE&&this.catalogStatus!==R.DONE){e.next=4;break}if(t)try{t()}catch(e){}return e.abrupt("return",!0);case 4:return e.next=6,this.dbWrapper.getBrowseDbTableSize(f.WM.BROWSE);case 6:if(n=e.sent,a="",!n){e.next=12;break}return e.next=11,this.dbWrapper.getBrowseDBLastModTime(f.WM.BROWSE);case 11:a=e.sent;case 12:if(!n||""===a){e.next=16;break}if(this.catalogStatus=R.LOCAL_DONE,t)try{t()}catch(e){}return e.abrupt("return",!0);case 16:if(!r){e.next=21;break}return e.next=19,this.tryCatalogFetch();case 19:e.next=22;break;case 21:this.tryCatalogFetch();case 22:return this._postCatalogTaskQueue.push(t),e.abrupt("return",!1);case 24:case"end":return e.stop()}}),e,this)}))),function(e){return ce.apply(this,arguments)})},{key:"tryCatalogFetch",value:(le=S(w().mark((function e(){var t,r,n,a,o,i=arguments;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!1!==(t=i.length>0&&void 0!==i[0]&&i[0])||this.catalogStatus!==R.IN_PROGRESS){e.next=3;break}return e.abrupt("return");case 3:if(!1!==t||this.catalogStatus!==R.DONE){e.next=6;break}return this.executePostCatalogTasks(),e.abrupt("return");case 6:if(this.catalogStatus=R.IN_PROGRESS,""!==this.obtainedTokenParams.catalog||!b.p.isValidAccessToken(this._initParams.authParams.accessToken)){e.next=10;break}return e.next=10,this.scheduleTask(s.l0.TaskType.FONT_CATALOG_URL,null);case 10:return e.next=12,this.dbWrapper.getBrowseDbTableSize(f.WM.BROWSE);case 12:if(r=e.sent,n="",!r){e.next=18;break}return e.next=17,this.dbWrapper.getBrowseDBLastModTime(f.WM.BROWSE);case 17:n=e.sent;case 18:return e.next=20,this.dbWrapper.getBrowseDBLastModTime(D);case 20:if("1"===(a=e.sent)&&this._obtainedTokenParams.entitlement===s.l0.Entitlement.TRIAL||"0"===a&&this._obtainedTokenParams.entitlement===s.l0.Entitlement.FULL||"1"!==a&&"0"!==a&&(n=""),!1===b.p.isValidAccessToken(this.initParams.authParams.accessToken)&&""===this.obtainedTokenParams.catalog&&(o="",o=this._initParams.authParams.isStaging?p.t.ServerUrl.FASTER_STAGE:p.t.ServerUrl.FASTER_PROD,o+=p.t.AF_COMPLETE_CATALOG_URL_PREFIX+p.t.AF_CATALOG_VERSION+p.t.AF_COMPLETE_CATALOG_URL_SUFFIX,this._obtainedTokenParams.catalog=o),""===this.obtainedTokenParams.catalog){e.next=29;break}return e.next=26,this.scheduleTask(s.l0.TaskType.CATALOG_DOWNLOAD,null,this.obtainedTokenParams.catalog,n);case 26:return e.next=28,this.dbWrapper.getBrowseDBLastModTime(f.WM.BROWSE);case 28:n=e.sent;case 29:return e.next=31,this.dbWrapper.getBrowseDbTableSize(f.WM.BROWSE);case 31:r=e.sent,this.catalogStatus=r?R.DONE:R.UNINITIALIZED,this.executePostCatalogTasks();case 34:case"end":return e.stop()}}),e,this)}))),function(){return le.apply(this,arguments)})},{key:"clearCacheIfNeeded",value:(ue=S(w().mark((function e(){var t,r;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=""!==this.initParams.authParams.userId&&!b.p.isValidAccessToken(this.initParams.authParams.accessToken),e.t0=""!==this.initParams.authParams.userId,!e.t0){e.next=7;break}return e.next=5,this.dbWrapper.clearInitCacheIfNeeded(this.initParams.authParams.userId,this.initParams.authParams.appId,t);case 5:e.t1=e.sent,e.t0=!0===e.t1;case 7:if(!e.t0){e.next=13;break}return e.next=10,b.p.getAppropriateRegion();case 10:return r=e.sent,e.next=13,this._responseCache.deleteValue(h.C.LANG_FILTER_DUMMY_ENDPOINT_PREFIX+r+h.C.LANG_FILTER_DUMMY_ENDPOINT_SUFFIX);case 13:case"end":return e.stop()}}),e,this)}))),function(){return ue.apply(this,arguments)})},{key:"getTagCatalogsOnceAvailable",value:(se=S(w().mark((function t(r,n){var a,o,u,l,c,h,p=this,d=arguments;return w().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=d.length>2&&void 0!==d[2]?d[2]:[],t.next=3,b.p.getAppropriateRegion();case 3:if(o=t.sent,this.initParams.authParams.userId+o+this.initParams.authParams.accessToken===this._userDetailsLastChecked){t.next=7;break}return t.next=7,this.clearCacheIfNeeded();case 7:return u=function(){p._postCatalogTaskQueue.push((function(){e.tryTagCatalogFetch(r,a,p)})),p.tryCatalogFetch()},t.next=10,this.queryBrowseDB([],[],f.WM.VARIATION_TAGS,!0);case 10:if(l=t.sent,t.prev=11,!l.length){t.next=31;break}if(c=this.dbWrapper.getVariationDataFromFetchedDBData(l,this.initParams.appEntitlement,this._obtainedTokenParams.entitlement,n,a),h=c.entries().next().value[1],t.t0=a.length,t.t0){t.next=24;break}if(t.t1=c.size,!t.t1){t.next=23;break}return t.next=21,h.displayFont;case 21:t.t2=t.sent.fontId,t.t1=""!==t.t2;case 23:t.t0=t.t1;case 24:if(!t.t0){t.next=31;break}if(!r){t.next=31;break}return r(c,new s.l0.Error),r=void 0,i.X.Logger.logMessage(s.ds.DEBUG,"Tags are served from cache, now scheduling the tag catalogs update work"),setTimeout((function(){u()}),3e4),t.abrupt("return");case 31:t.next=35;break;case 33:t.prev=33,t.t3=t.catch(11);case 35:r&&i.X.Logger.logMessage(s.ds.DEBUG,"Tags not served from cache, now scheduling the tag catalogs fetch and callbacks"),u();case 37:case"end":return t.stop()}}),t,this,[[11,33]])}))),function(e,t){return se.apply(this,arguments)})},{key:"getAggregationFromTagId",value:function(e){return this.dbWrapper.getAggregationFromTagId(e,this.initParams.appEntitlement,this.obtainedTokenParams.entitlement)}},{key:"getAggregationFromTagIdV2",value:function(e){var t,r=this;return(t=w().mark((function t(){return w().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.delegateYield(x(F(r.dbWrapper.getAggregationFromTagIdV2(e,r.initParams.appEntitlement,r.obtainedTokenParams.entitlement))),"t0",1);case 1:case"end":return t.stop()}}),t)})),function(){return new L(t.apply(this,arguments))})()}},{key:"getFamilyOnceAvailable",value:function(t,r){var n=this;this.tryLocalCatalogAndFetchIfRequired((function(){e.getFamilyFromFontId(t,n,r)}))}},{key:"getFontsByLanguageOnceAvailable",value:function(t,r){var n=this;this.tryLocalCatalogAndFetchIfRequired((function(){e.getLangFonts(t,n,r)}))}},{key:"getFamiliesFromSlugsOnceAvailable",value:function(t,r,n,a){var o=this;this.tryLocalCatalogAndFetchIfRequired((function(){e.fetchFamiliesPostCatalog(t,o,r,n,a)}))}},{key:"getRecommendationsOnceAvailable",value:(ie=S(w().mark((function e(t){var r;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0!==this._recommendedUrlsMap.get(t)&&""!==this._recommendedUrlsMap.get(t)){e.next=3;break}return e.next=3,this.scheduleTask(s.l0.TaskType.RECOMMENDATION_URL,null);case 3:if(void 0!==(r=this._recommendedUrlsMap.get(t))&&""!==r){e.next=6;break}return e.abrupt("return",{aggregation:new s.mP,error:new Error});case 6:case"end":return e.stop()}}),e,this)}))),function(e){return ie.apply(this,arguments)})},{key:"getResponseHeader",value:function(e,t){var r="";return e.headers.forEach((function(e){e[0].toLowerCase()===t&&(r=e[1])})),r}},{key:"handleCacheOnInit",value:(oe=S(w().mark((function t(){var r,n,a,o,i,u,l,c,f,p=this;return w().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,b.p.getAppropriateRegion();case 2:if(r=t.sent,this.initParams.authParams.userId+r+this.initParams.authParams.accessToken!==this._userDetailsLastChecked){t.next=5;break}return t.abrupt("return");case 5:if(!(this.initParams.authParams.userId.length>0)){t.next=8;break}return t.next=8,this.clearCacheIfNeeded();case 8:if(n=function(e){return p._responseCache.getInMemoryOrFromResponseCache(e)},a=h.C.SELECTIONS_LIST_ENDPOINT_PREFIX.concat(String(this._initParams.getLanguage()),"_",this.initParams.authParams.userId,h.C.SELECTIONS_LIST_ENDPOINT_SUFFIX),n(a),o=h.C.SELECTIONS_ETAG_ENDPOINT_PREFIX+this.initParams.authParams.userId+h.C.SELECTIONS_ETAG_ENDPOINT_SUFFIX,n(o),i=h.C.BYOF_LIST_ENDPOINT_PREFIX+this.initParams.authParams.userId+h.C.BYOF_LIST_ENDPOINT_SUFFIX,n(i),u=h.C.BYOF_ETAG_ENDPOINT_PREFIX+this.initParams.authParams.userId+h.C.BYOF_ETAG_ENDPOINT_SUFFIX,n(u),l=y.n.systemFontsCacheKey,n(l),c=h.C.LANG_FILTER_DUMMY_ENDPOINT_PREFIX+r+h.C.LANG_FILTER_DUMMY_ENDPOINT_SUFFIX,n(c),this.fetchCachedEntitlement().then((function(e){e!==s.l0.Entitlement.FULL&&e!==s.l0.Entitlement.TRIAL||p._responseCache.matchKey("/slugs_".concat(e)).then((function(e){""!==e&&n(e)}))})),!1!==b.p.isValidAccessToken(this._initParams.authParams.accessToken)){t.next=33;break}return t.prev=23,t.next=26,this.tryLocalCatalogAndFetchIfRequired(null,!0);case 26:e.getRecents(null,this),t.next=31;break;case 29:t.prev=29,t.t0=t.catch(23);case 31:t.next=34;break;case 33:this.initParams.runtimeMode!==s.l0.RuntimeMode.FOUND_FONTS?(f=function(){e.getRecents(null,p)},this.tryLocalCatalogAndFetchIfRequired(f)):setTimeout((function(){p.tryLocalCatalogAndFetchIfRequired(null)}),4e4);case 34:this._userDetailsLastChecked=this.initParams.authParams.userId+r+this.initParams.authParams.accessToken;case 35:case"end":return t.stop()}}),t,this,[[23,29]])}))),function(){return oe.apply(this,arguments)})},{key:"fetchCustomCatalogUrl",value:(ae=S(w().mark((function e(){var t,r,n,a,o,i,u;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this._initParams.applicationFontsCollectionType,r=[],t&&(r=r.concat(t)),0!==r.length){e.next=5;break}return e.abrupt("return");case 5:n=T(r),e.prev=6,n.s();case 8:if((a=n.n()).done){e.next=16;break}return o=a.value,i=o===s.l0.ApplicationFontsType.PHOTOSHOP?s.l0.TaskType.CUSTOM_CATALOG_URL_PHOTOSHOP:s.l0.TaskType.CUSTOM_CATALOG_URL_VARIABLE,u={root:o,retryCount:1},e.next=14,this.scheduleTask(i,u);case 14:e.next=8;break;case 16:e.next=21;break;case 18:e.prev=18,e.t0=e.catch(6),n.e(e.t0);case 21:return e.prev=21,n.f(),e.finish(21);case 24:case"end":return e.stop()}}),e,this,[[6,18,21,24]])}))),function(){return ae.apply(this,arguments)})},{key:"fetchAndprocessCustomCatalog",value:(ne=S(w().mark((function e(){var t,r,n,a,o,i,u,l,c,f,h,p,d,m;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this._initParams.applicationFontsCollectionType,r=[],t&&(r=r.concat(t)),n=new s.l0.Error,a=new s.mP,0===r.length&&(n.errCode=s.l0.ErrorCode.INVALID_CONFIGURATION),0!==r.length&&!1!==b.p.isValidAccessToken(this.initParams.authParams.accessToken)){e.next=8;break}return e.abrupt("return",{aggregation:new s.mP,error:n});case 8:o=T(r),e.prev=9,o.s();case 11:if((i=o.n()).done){e.next=30;break}return u=i.value,l=u===s.l0.ApplicationFontsType.PHOTOSHOP?s.l0.TaskType.CUSTOM_CATALOG_URL_PHOTOSHOP:s.l0.TaskType.CUSTOM_CATALOG_URL_VARIABLE,c={root:u,retryCount:1},e.next=17,this.scheduleTask(l,c);case 17:if(f=e.sent,h=this.obtainedTokenParams.mapOfCustomCatalogParams.get(u),f.errCode!==s.l0.ErrorCode.NONE||!h||""===h.catalog){e.next=27;break}return e.next=22,this.scheduleTask(s.l0.TaskType.CUSTOM_CATALOG_DOWNLOAD,c,h.catalog);case 22:p=e.sent,d=p.aggregation,m=p.error,a.merge(d),n.errCode=m.errCode;case 27:f.errCode!==s.l0.ErrorCode.NONE&&(n.errCode=f.errCode);case 28:e.next=11;break;case 30:e.next=35;break;case 32:e.prev=32,e.t0=e.catch(9),o.e(e.t0);case 35:return e.prev=35,o.f(),e.finish(35);case 38:return e.abrupt("return",{aggregation:a,error:n});case 39:case"end":return e.stop()}}),e,this,[[9,32,35,38]])}))),function(){return ne.apply(this,arguments)})},{key:"_handleCustomBrowseCatalogUrlResponse",value:function(e,t){var r=new s.l0.Error;if(e.status!==p.t.ResponseStatus.OK)r.errCode=b.p.mapStatusNumberToErrorCode(e.status);else{var n=new s.l0.ObtainedTokenParams;if(e.body.links){n.catalog=e.body.links.catalog,n.token=e.body.token,n.genericdownloadUrl=e.body.links.download;var a=n.token.indexOf("="),o=n.token.indexOf("~");-1!==a&&-1!==o&&(n.expiry=Number(n.token.substring(a+1,o)));var i=t;i.root&&this.obtainedTokenParams.mapOfCustomCatalogParams.set(i.root,n)}else r.errCode=s.l0.ErrorCode.UNKNOWN}return r}},{key:"_handleCustomBrowseCatalogResponse",value:function(e,t){var r=new s.l0.Error,a=new s.mP;if(e.status>=p.t.ResponseStatus.BAD_REQUEST)r.errCode=b.p.mapStatusNumberToErrorCode(e.status);else if(""!==e.body){var o=performance.now();try{var u=t;u.root&&(a=new n.V(e.body,u.root).parse(this._cachedFonts),b.p.setDisplayFontForEachFamilyIfNeeded(a))}catch(e){}i.X.Logger.logMessage(s.ds.DEBUG,a),i.X.Logger.logMessage(s.ds.DEBUG,this.cachedFonts()),i.X.Logger.logMessage(s.ds.DEBUG,"In-Memory DB put operations done. Took ".concat(Math.round(performance.now()-o)," milliseconds."))}return{aggregation:a,error:r}}},{key:"_handleCatalogResponse",value:(re=S(w().mark((function e(t,r){var n,a,o,u,l,c=this;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=[],a=[],!(t.status>=p.t.ResponseStatus.BAD_REQUEST)){e.next=5;break}e.next=24;break;case 5:if(""!==t.body){e.next=7;break}return e.abrupt("return");case 7:return o=this.getResponseHeader(t,"last-modified"),e.next=10,this.dbWrapper.clearBrowseDbTables(f.WM.BROWSE);case 10:return t.body.forEach((function(e){var t=!1,r=e.availability.find((function(e){return"trial"===e}));void 0===r&&(t=!0);var o=e.sync_font_id,i=o.split("-").slice(0,2).pop();void 0===i&&(i=o);var u="",l=[],c=[],f=[],h=[],p="",d=[],m=new Map,y=new Map;for(var v in e.localized_family_name)if(e.localized_family_name[v]){var g=e.localized_family_name[v].trim().replace(/\s+/g," ");""!==u&&v!==s.l0.Language.Default.valueOf()||(u=g),l.push("".concat(g,"##").concat(v)),m.set(v,g.toLowerCase()),y.set(v,g.toLowerCase()),c.push.apply(c,A(g.toLowerCase().split(" ")))}for(var b in e.localized_subfamily_name)if(e.localized_subfamily_name[b]){var _=e.localized_subfamily_name[b].trim().replace(/\s+/g," ");h.push.apply(h,A(_.toLowerCase().split(" "))),h.push(_.toLowerCase()),""!==p&&b!==s.l0.Language.Default.valueOf()||(p=_),f.push("".concat(_,"##").concat(b));var w=m.get(b);w&&m.set(b,w.concat(" ",_))}var E,S=T(e.language_support);try{for(S.s();!(E=S.n()).done;){var k=E.value;d.push(k)}}catch(e){S.e(e)}finally{S.f()}var N="";e.variations_postscript_name_prefix&&(N=e.variations_postscript_name_prefix),""===N&&(N=u.replace(/\W/g,""));var O,I=function(){return{psName:e.postscript_name,alternatePsName:e.postscript_name,tkId:o,sortIndex:e.sort_order,lang:e.default_language,supportedLangs:d,premium:t,display:e.is_display_font,variationId:i,familyName:l,styleName:f,familySlug:e.family_slug,locFamilyName:[].concat(A(new Set(c)),A(new Set(Array.from(m.values())))),locStyleName:A(new Set(h)),variationPrefix:N,isVariableFont:e.is_variable_font,otherData:"defaultPsName##".concat(e.postscript_name)}},L=new Set,x=!0,C=new Set,F=T(e.instances);try{for(F.s();!(O=F.n()).done;){var P=O.value;if(P.postscript_name&&C.has(P.postscript_name)){x=!1;break}P.postscript_name&&C.add(P.postscript_name)}}catch(e){F.e(e)}finally{F.f()}var R,D=0,U=!1,M=T(e.instances);try{var B=function(){var r=R.value;c.push("variable");var u=[],f=[],h=new Map(y),m="";for(var v in r.localized_subfamily_names)if(r.localized_subfamily_names[v]){var g=r.localized_subfamily_names[v].trim().replace(/\s+/g," ");""!==m&&v!==s.l0.Language.Default.valueOf()||(m=g),u.push.apply(u,A(g.toLowerCase().split(" "))),u.push(g.toLowerCase()),f.push("".concat(g,"##").concat(v));var b=h.get(v);b&&h.set(v,"".concat(b," ").concat(g).toLowerCase())}var _="axisValues##",w=!1;for(var E in r.axis_values)_=(_=_.concat(E,"=",String(r.axis_values[E]))).concat(","),w=!0;_=w?(_=_.slice(0,-1)).concat("||"):"";var S,T="".concat(N,"-").concat(m.replace(/\W/g,""));S=r.postscript_name&&x?r.postscript_name:T;var k=!1;U||m!==p||(U=!0,k=!0);var O=function(){return L.add(S),{psName:S,alternatePsName:T,tkId:o,sortIndex:D++,lang:e.default_language,supportedLangs:d,premium:t,display:k,variationId:i,familyName:l,styleName:f,familySlug:e.family_slug,locFamilyName:[].concat(A(new Set(c)),A(new Set(Array.from(h.values())))),locStyleName:A(new Set(u)),variationPrefix:N,isVariableFont:!0,otherData:_.concat("defaultPsName##",e.postscript_name)}};n.push(O()),a.push(O())};for(M.s();!(R=M.n()).done;)B()}catch(e){M.e(e)}finally{M.f()}L.has(e.postscript_name)||(n.push(I()),a.push(I()))})),u=performance.now(),e.next=14,this.dbWrapper.clearBrowseDbTables(f.WM.BROWSE);case 14:return e.next=16,this.dbWrapper.commitIDBTime("",f.WM.BROWSE);case 16:return e.next=18,this.dbWrapper.bulkPutBrowseMemDbData(f.WM.BROWSE,a);case 18:i.X.Logger.logMessage(s.ds.DEBUG,"In-Memory DB put operations done. Took ".concat(Math.round(performance.now()-u)," milliseconds.")),this.dbWrapper.commitMemDBTime(o,f.WM.BROWSE),this.dbWrapper.commitMemDBTime(this._obtainedTokenParams.entitlement===s.l0.Entitlement.FULL?"1":"0",D),this.dbWrapper.commitMemDBTime("4",U),l=function(){var e=S(w().mark((function e(){var t,r,a;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=performance.now(),r=50,c._timer.isPaused()||(r=50),a=n.splice(-r);case 4:if(!(a.length>0)){e.next=12;break}return e.next=7,c.dbWrapper.bulkPutIDBBrowseDbData(f.WM.BROWSE,a);case 7:c._timer.isPaused(),r=50,a=n.splice(-r),i.X.Logger.logMessage(s.ds.DEBUG,"IDB Put operations done. Took ".concat(Math.round(performance.now()-t)," milliseconds with result for chunk ").concat(r)),e.next=4;break;case 12:c.dbWrapper.commitIDBTime(o,f.WM.BROWSE),c.dbWrapper.commitIDBTime(c._obtainedTokenParams.entitlement===s.l0.Entitlement.FULL?"1":"0",D),c.dbWrapper.commitIDBTime("4",U);case 15:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),l();case 24:case"end":return e.stop()}}),e,this)}))),function(e,t){return re.apply(this,arguments)})},{key:"getSearchQueryUrlForAdobeFonts",value:function(e){return s.l0.ViewQueryIntroductionURL(e,this._initParams.authParams.clientKey,this._initParams.authParams.isStaging,this._initParams.introductionURLEnabled)}},{key:"getSlugNames",value:(te=S(w().mark((function e(t){var r,n,a,o,i,u,l,c,f,h,p,d,m,y,v,g,b,_,E,S,A,N,O=this;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=[],n=[],t.forEach((function(e){var t={root:{familySlug:e,page:1,perPage:100},retryCount:1};r.push(O.scheduleTask(s.l0.TaskType.SEARCH_FAMILY,t))})),a=new s.l0.Error,e.next=6,Promise.all(r);case 6:o=e.sent,i=new Map,u=T(o);try{for(u.s();!(l=u.n()).done;){c=l.value,a=c.error,f=T(c.slugs);try{for(f.s();!(h=f.n()).done;)p=k(h.value,2),d=p[0],m=p[1],i.set(d,m)}catch(e){f.e(e)}finally{f.f()}}}catch(e){u.e(e)}finally{u.f()}if(!n.length){e.next=16;break}return e.next=13,Promise.all(n);case 13:y=e.sent,v=T(y);try{for(v.s();!(g=v.n()).done;){b=g.value,_=T(b.slugs);try{for(_.s();!(E=_.n()).done;)S=k(E.value,2),A=S[0],N=S[1],i.set(A,N)}catch(e){_.e(e)}finally{_.f()}}}catch(e){v.e(e)}finally{v.f()}case 16:return e.abrupt("return",{querySet:i,error:a});case 17:case"end":return e.stop()}}),e)}))),function(e){return te.apply(this,arguments)})},{key:"serverQueryGetSlugPromises",value:function(e){var t,r=[],n=T(e);try{for(n.s();!(t=n.n()).done;){var a={root:{familySlug:t.value},retryCount:1};r.push(this.scheduleTask(s.l0.TaskType.FETCH_FAMILY,a))}}catch(e){n.e(e)}finally{n.f()}return r}},{key:"_fetchDefaultFamiliesData",value:(ee=S(w().mark((function e(t,r){var n,a,o,i,u,l,c,h,p,d,m,y=this,g=arguments;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=g.length>2&&void 0!==g[2]?g[2]:[],a=g.length>3&&void 0!==g[3]&&g[3],o=new s.mP,i=function(){Promise.resolve().then((function(){if(a){var e,t=T(o.getEntries());try{for(t.s();!(e=t.n()).done;){var r,n=T(k(e.value,2)[1].getEntries());try{for(n.s();!(r=n.n()).done;){var i=r.value;y._cachedFonts.set(i.postscriptName,i)}}catch(e){n.e(e)}finally{n.f()}}}catch(e){t.e(e)}finally{t.f()}}}))},u=[],l=t.join(","),e.next=8,this.fetchCachedEntitlement();case 8:return c=e.sent,e.t0="/slugs_",e.t1=c,e.next=13,b.p.getHash(b.V.SHA256,l);case 13:if(e.t2=e.sent,h=e.t0.concat.call(e.t0,e.t1,e.t2),!a){e.next=19;break}return e.next=18,this._responseCache.getInMemoryOrFromResponseCache(h);case 18:u=e.sent;case 19:if(null!=u&&0!==u.length){e.next=24;break}return e.next=22,this.queryBrowseDB(t,["familySlug"],f.WM.BROWSE,!0);case 22:u=e.sent,a&&this._responseCache.putValue(h,u);case 24:if(p=new Set(A(t)),n.length&&(u=u.filter((function(e){var t,r=T(n);try{for(r.s();!(t=r.n()).done;){var a=t.value;if(a=a.toLowerCase(),-1===e.locFamilyName.join("#").indexOf(a)&&-1===e.locStyleName.join("#").indexOf(a))return!1}}catch(e){r.e(e)}finally{r.f()}return!0}))),u.forEach((function(e){p.delete(e.familySlug)})),b.p.getFamiliesFromBulkDBData(u,o,this._initParams,this.obtainedTokenParams.entitlement,r),v.Z._setIsActiveForUserIfApplicable(o),!this._initParams.advancedServiceSearch||!p.size){e.next=32;break}e.next=38;break;case 32:if(!u.length){e.next=37;break}return i(),e.abrupt("return",{aggregation:o,error:new s.l0.Error});case 37:p=new Set(A(t));case 38:return d=[],p.forEach((function(e){var t={root:{familySlug:e},retryCount:1};d.push(y.scheduleTask(s.l0.TaskType.FETCH_FAMILY,t))})),e.next=42,Promise.all(d);case 42:return e.sent.forEach((function(e){if(""!==e){var t="";e.display_font&&e.display_font.postscript_name&&(t=e.display_font.postscript_name);var a=e.fonts;b.p.getFamiliesFromFontsArrayJSON(a,s.l0.FontType.DEFAULT,y.obtainedTokenParams.entitlement,o,t,null,y._initParams,r,n)}})),m=new s.l0.Error,i(),e.abrupt("return",{aggregation:o,error:m});case 47:case"end":return e.stop()}}),e,this)}))),function(e,t){return ee.apply(this,arguments)})},{key:"_fetchFamilyResponse",value:function(e,t){return e.status!==p.t.ResponseStatus.OK?"":e.body}},{key:"_searchFamilyResponse",value:function(e,t){var r=new Map,n=0,a=b.p.mapStatusNumberToErrorCode(e.status),o=new s.l0.Error(a,"",!1);if(e.status!==p.t.ResponseStatus.OK);else{var i=e.body;e.headers.forEach((function(e){"total-count"===e[0]&&(n=Number(e[1]))}));var u,l=T(i);try{for(l.s();!(u=l.n()).done;){var c=u.value;try{var f=c.slug,h=c.foundry.slug,d=c.foundry.name,m=c.name,y=c.matched_font_count;r.set(f,{foundryId:h,foundryName:d,familyName:m,fontCount:y})}catch(e){}}}catch(e){l.e(e)}finally{l.f()}}return{slugs:r,totalCount:n,error:o}}},{key:"getCachedByof",value:(Z=S(w().mark((function e(t,r,n){var a,o,i,s,u,l,c,f,p=this;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=[],o=function(e){return""===t?p._responseCache.getInMemoryOrFromResponseCache(e):p._responseCache.getValue(e)},e.next=4,o(h.C.BYOF_LIST_ENDPOINT_PREFIX+this.initParams.authParams.userId+h.C.BYOF_LIST_ENDPOINT_SUFFIX);case 4:return i=e.sent,e.next=7,o(h.C.BYOF_ETAG_ENDPOINT_PREFIX+this.initParams.authParams.userId+h.C.BYOF_ETAG_ENDPOINT_SUFFIX);case 7:if(s=e.sent,""!==t&&s!==t||!i){e.next=17;break}u=b.p.getFontsFromByofData(i),l=T(u);try{for(l.s();!(c=l.n()).done;)f=c.value,this._allByofFontHashes.set(f.fontId,f)}catch(e){l.e(e)}finally{l.f()}return b.p.getFamiliesFromByofData(u,r,[]),(r=b.p.setDisplayFontForEachFamilyIfNeeded(r)).getEntries().forEach((function(e){e.getEntries().forEach((function(e){a.push(e.postscriptName),p._cachedFonts.set(e.postscriptName,e),p._cachedFonts.set(e.fontId,e)}))})),n&&(this._byofFonts=new Set(a),this._byofsEtag=""!==t?t:s),e.abrupt("return",!0);case 17:return e.abrupt("return",!1);case 18:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return Z.apply(this,arguments)})},{key:"_byofCountResponse",value:(Q=S(w().mark((function e(t,r){var n,a,o,i,u,l,c,f,d,m,y,v,g,_,E,S=this;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(new s.mP,new s.l0.Error,n=r,a=new s.mP,t.status===p.t.ResponseStatus.OK){e.next=17;break}if(t.status===p.t.ResponseStatus.UNAUTHORIZED?n.retryCount=0:n.retryCount=n.retryCount-1,!(n.retryCount>0)){e.next=12;break}return e.next=8,this.scheduleTask(s.l0.TaskType.BYOF_COUNT,n);case 8:return o=e.sent,e.abrupt("return",o);case 12:return i=b.p.mapStatusNumberToErrorCode(t.status),u=new s.l0.Error(i,"BYOF fonts Error",!1),e.abrupt("return",{aggregation:a,error:u});case 15:e.next=53;break;case 17:return l=t.body.total,Number.isNaN(l)?l=0:(n.root.page=Math.floor(l/100)+1,n.root.perPage=100),c=this.getResponseHeader(t,"etag"),c=b.p.parseETagValue(c),e.next=23,this.getCachedByof(c,a,n.root.isRequested);case 23:if(!e.sent){e.next=30;break}return this._byofFontsLastCheck=(new Date).getTime(),f=new s.l0.Error,e.abrupt("return",{aggregation:a,error:f});case 30:for(d=[],m=1;m<n.root.page;m++)y={root:{page:m+1,perPage:n.root.perPage,isRequested:n.root.isRequested},retryCount:n.retryCount},d.push(this.scheduleTask(s.l0.TaskType.BYOF_LISTS,y));if(v=[{res:t.body,etag:c}],!d.length){e.next=42;break}return e.t0=v.push,e.t1=v,e.t2=A,e.next=39,Promise.all(d);case 39:e.t3=e.sent,e.t4=(0,e.t2)(e.t3),e.t0.apply.call(e.t0,e.t1,e.t4);case 42:return g=[],v.forEach((function(e){var t=e.res.fonts;if(g=0===g.length?t:[].concat(A(g),A(t)),""!==t){S._allByofFontHashes.clear();var r,n=b.p.getFontsFromByofData(t),o=T(n);try{for(o.s();!(r=o.n()).done;){var i=r.value;S._allByofFontHashes.set(i.fontId,i)}}catch(e){o.e(e)}finally{o.f()}b.p.getFamiliesFromByofData(n,a,[])}})),_=[],(a=b.p.setDisplayFontForEachFamilyIfNeeded(a)).getEntries().forEach((function(e){e.getEntries().forEach((function(e){_.push(e.postscriptName),S._cachedFonts.set(e.postscriptName,e),S._cachedFonts.set(e.fontId,e)}))})),this._byofFontsLastCheck=(new Date).getTime(),this._responseCache.putValue(h.C.BYOF_LIST_ENDPOINT_PREFIX+this.initParams.authParams.userId+h.C.BYOF_LIST_ENDPOINT_SUFFIX,g),this._responseCache.putValue(h.C.BYOF_ETAG_ENDPOINT_PREFIX+this.initParams.authParams.userId+h.C.BYOF_ETAG_ENDPOINT_SUFFIX,c),n.root.isRequested?(this._byofFonts=new Set(_),this._byofsEtag=c):setTimeout((function(){S.fireFontUpdates()}),1e3),E=new s.l0.Error,e.abrupt("return",{aggregation:a,error:E});case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return Q.apply(this,arguments)})},{key:"_activatedPollResponse",value:(X=S(w().mark((function e(t,r){var n,a,o,i,u=this;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=b.p.mapStatusNumberToErrorCode(t.status),void 0,void 0,r=u.getResponseHeader(t,"retry-after"),l=parseInt(r),""!==r&&l>p.t.defaultPollInterval?u._timer.getTask(M).tickTime=l:n!==s.l0.ErrorCode.NONE&&t.status>=500?u._timer.getTask(M).tickTime=2*u._timer.getTask(M).tickTime:""===r&&n===s.l0.ErrorCode.NONE&&u._timer.getTask(M).tickTime!==u.initParams.selectionPollInterval&&(u._timer.getTask(M).tickTime=u.initParams.selectionPollInterval),n===s.l0.ErrorCode.NONE){e.next=7;break}n===s.l0.ErrorCode.AUTH_FAILURE&&this.handleAuthFailure(),e.next=13;break;case 7:return a=this.getResponseHeader(t,"etag"),a=b.p.parseETagValue(a),e.next=11,this.dbWrapper.getSelectionsData();case 11:(o=e.sent)&&""!==this._selectionsEtag&&(o.etag===a||""===a||(i={root:{page:1,perPage:100,isRequested:!1},retryCount:1},this.scheduleTask(s.l0.TaskType.ACTIVATED_FONTS_COUNT,i)));case 13:return e.abrupt("return",!0);case 14:case"end":return e.stop()}var r,l}),e,this)}))),function(e,t){return X.apply(this,arguments)})},{key:"_byofPollResponse",value:function(e,t){var r,n,a=this,o=b.p.mapStatusNumberToErrorCode(e.status);if(r=a.getResponseHeader(e,"retry-after"),n=parseInt(r),""!==r&&n>p.t.defaultPollInterval?a._timer.getTask(B).tickTime=n:o!==s.l0.ErrorCode.NONE&&e.status>=500?a._timer.getTask(B).tickTime=2*a._timer.getTask(B).tickTime:""===r&&o===s.l0.ErrorCode.NONE&&a._timer.getTask(B).tickTime!==a.initParams.selectionPollInterval&&(a._timer.getTask(B).tickTime=a.initParams.selectionPollInterval),o!==s.l0.ErrorCode.NONE)o===s.l0.ErrorCode.AUTH_FAILURE&&this.handleAuthFailure();else{var i=this.getResponseHeader(e,"etag");i=b.p.parseETagValue(i);var u=this._byofsEtag;""!==u&&(u===i||""===i||this.scheduleTask(s.l0.TaskType.BYOF_COUNT,{root:{page:1,perPage:100,isRequested:!1},retryCount:1}))}return!0}},{key:"_processFontDownloadResponse",value:(q=S(w().mark((function t(r,n,a){var o,i,u,l,c,f,y,v,g,_,E,T,k,A;return w().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=a,i=b.p.mapStatusNumberToErrorCode(n.status),u=!1,l=o.root.fontInfo.fontId,c=new s.l0.Error(i,"",!1,n.status),f=o.root.fontInfo,y=function(){var e=S(w().mark((function e(){return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.root.downloadCB(f,c);case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),n.status===p.t.ResponseStatus.OK){t.next=19;break}if(n.status!==p.t.ResponseStatus.NOT_FOUND||""===l||0===o.retryCount||this.initParams.fontBufferType===s.l0.FontBufferType.RAW){t.next=16;break}return o.retryCount=0,v="",v=""!==this._obtainedTokenParams.genericdownloadUrl&&""!==this._obtainedTokenParams.fasterEndPointToken?(v=this._obtainedTokenParams.genericdownloadUrl).concat(l,"?__token__=",this._obtainedTokenParams.fasterEndPointToken):(v=v.concat(this._initParams.authParams.isStaging?p.t.ServerUrl.TYPEKIT_STAGE:p.t.ServerUrl.TYPEKIT_PROD)).concat(p.t.ServerAPI.TYPEKIT_DOWNLOAD,l,"/download"),t.next=14,this.scheduleTask(s.l0.TaskType.FONT_DOWNLOAD,o,v);case 14:t.next=17;break;case 16:null!==o.root.downloadCB&&(u=!0,c.errMsg="Font Error",y());case 17:t.next=63;break;case 19:if(!1!==r.isBlob){t.next=31;break}if(o.retryCount=0,""===(g=n.body[0])){t.next=28;break}return t.next=25,this.scheduleTask(s.l0.TaskType.FONT_DOWNLOAD,o,g);case 25:u=!0,t.next=29;break;case 28:c.errCode=s.l0.ErrorCode.UNKNOWN;case 29:t.next=63;break;case 31:return t.next=33,new Response(n.body).arrayBuffer();case 33:return _=t.sent,o.root.fontInfo.fontBuffer=new Uint8Array(_),t.next=37,b.p.checkIfValidFontStream(o.root.fontInfo.fontBuffer);case 37:if(t.t0=t.sent,!1!==t.t0){t.next=40;break}o.root.fontInfo.fontBuffer=b.p.reversePartArray(o.root.fontInfo.fontBuffer,0,1040);case 40:if(this.initParams.runtimeMode!==s.l0.RuntimeMode.FOUND_FONTS&&this._initParams.enableCharacterSets)try{E=new m.w(o.root.fontInfo.fontBuffer),o.root.fontInfo.characterSet=E.charSet}catch(e){}if(this._foundFontsHandler.putFontBufferInCache(o.root.fontInfo,!1),o.root.fontInfo.type!==s.l0.FontType.BYOF){t.next=57;break}if(t.prev=43,!(T=new m.w(o.root.fontInfo.fontBuffer)).font){t.next=53;break}if(""===o.root.fontInfo.postscriptName){t.next=53;break}return k=h.C.BYOF_SCRIPT_ENDPOINT_PREFIX+o.root.fontInfo.fontId+G+h.C.BYOF_SCRIPT_ENDPOINT_SUFFIX,t.next=50,this._responseCache.getValue(k);case 50:A=t.sent,""!==o.root.fontInfo.fontId&&A?o.root.fontInfo.script=A:(o.root.fontInfo.script=T.computeFontScript(o.root.fontInfo.postscriptName),this._responseCache.putValue(k,o.root.fontInfo.script)),o.root.fontInfo.addSupportedLanguage(o.root.fontInfo.script);case 53:t.next=57;break;case 55:t.prev=55,t.t1=t.catch(43);case 57:if(null!==o.root.downloadCB&&(u=!0,c.errCode=s.l0.ErrorCode.NONE,y()),this._initParams.diskCache!==s.l0.DiskCacheType.OPFS){t.next=63;break}return t.next=61,e._diskCache.addFile(o.root.fontInfo.postscriptName,o.root.fontInfo.postscriptName,o.root.fontInfo.fontBuffer.length,o.root.fontInfo.fontBuffer);case 61:t.sent&&(o.root.fontInfo.filePath=d.xB+o.root.fontInfo.postscriptName);case 63:if(!u){t.next=67;break}return t.abrupt("return",!0);case 67:return t.abrupt("return",c);case 68:case"end":return t.stop()}}),t,this,[[43,55]])}))),function(e,t,r){return q.apply(this,arguments)})},{key:"getCachedFontsFromFamilyName",value:function(e,t){var r,n=[],a=T(this._cachedFonts);try{for(a.s();!(r=a.n()).done;){var o=k(r.value,2)[1];o.familyName===e&&o.type===t&&n.push(o)}}catch(e){a.e(e)}finally{a.f()}return n}},{key:"getCollabFamilyFromFontId",value:function(e){var t="",r=e.fontId?this._collabFonts.get(e.fontId):void 0,n=[];if(void 0===r&&e.postscriptName&&""!==e.postscriptName&&(r=this._collabFonts.get(e.postscriptName)),r&&(t=r.familyName),""!==t){var a,o=T(this._collabFonts);try{for(o.s();!(a=o.n()).done;){var i=k(a.value,2)[1];i.familyName===t&&n.push(i)}}catch(e){o.e(e)}finally{o.f()}}return n}},{key:"checkVariableFontInCachedFonts",value:function(e){try{var t=this._cachedFonts.get(e);if(t)return t.clone();if(-1!==e.indexOf("_")&&e.length>e.indexOf("_")+3){var r=parseInt(e.substring(e.indexOf("_")+1,e.indexOf("_")+2));if(!Number.isNaN(r)){var n=e.substring(0,e.indexOf("_")),a=A(this._cachedFonts.entries()).filter((function(e){return e[1].isVariableFont&&e[1].variableFamilyPrefix===n}));if(a.length){var o=a[0][1].clone();if(!1===o.isVariableFont)return;return o.postscriptName=e,o.varAxisValues=b.p.getAxisValuesFromPostscriptName(e),o.styleName=p.t.VARIABLE_FONT_CUSTOM_STYLE_NAME,o.fontName="".concat(o.familyName," ").concat(p.t.VARIABLE_FONT_CUSTOM_STYLE_NAME),o}}}}catch(e){}}},{key:"checkVariableFontInDBFonts",value:($=S(w().mark((function e(t){var r,n,a,o;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!(-1!==t.indexOf("_")&&t.length>t.indexOf("_")+3)){e.next=16;break}if(r=parseInt(t.substring(t.indexOf("_")+1,t.indexOf("_")+2)),Number.isNaN(r)){e.next=16;break}return n=t.substring(0,t.indexOf("_")),e.next=7,this.dbWrapper.dbQueryUp([n],["variationPrefix"],f.WM.BROWSE,!0);case 7:if(!((a=e.sent)&&a.length>0)){e.next=16;break}if(!1!==(o=b.p.createFontFromDBData(a[0],this.initParams.appEntitlement)).isVariableFont){e.next=12;break}return e.abrupt("return",void 0);case 12:return o.postscriptName=t,o.generatedPostscriptName=t,o.varAxisValues=b.p.getAxisValuesFromPostscriptName(t),e.abrupt("return",o);case 16:e.next=20;break;case 18:e.prev=18,e.t0=e.catch(0);case 20:case"end":return e.stop()}}),e,this,[[0,18]])}))),function(e){return $.apply(this,arguments)})},{key:"getFontFromLocalInfo",value:(z=S(w().mark((function t(r){var n,a,o,i,u,l,c,h,p,d,m,y,v,g,_,E,S,k,N,O,I,L=arguments;return w().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=L.length>1&&void 0!==L[1]?L[1]:"",a=L.length>2&&void 0!==L[2]?L[2]:s.l0.FontType.DEFAULT,o=L.length>3&&void 0!==L[3]&&L[3],i=void 0,u=function(e){if(n&&""!==n&&(i=e._cachedFonts.get(n)))return i.clone();if((i=e._cachedFonts.get(r))&&(!n||i.fontId===n||b.p.getVariationIdFromTkId(i.fontId)===b.p.getVariationIdFromTkId(n))){if(n&&i.fontId!==n){var t=i.clone();return t.fontId=n,t}return i.clone()}},u(this),!i){t.next=8;break}return t.abrupt("return",i);case 8:l=T(e._schedulersList),t.prev=9,l.s();case 11:if((c=l.n()).done){t.next=18;break}if(this!==(h=c.value)&&u(h),!i){t.next=16;break}return t.abrupt("return",i);case 16:t.next=11;break;case 18:t.next=23;break;case 20:t.prev=20,t.t0=t.catch(9),l.e(t.t0);case 23:return t.prev=23,l.f(),t.finish(23);case 26:if(p=[],d=!1,""!==n&&"TkD-"===n.substring(0,4)&&(d=!0),""===n){t.next=41;break}return t.next=32,this.dbWrapper.dbQueryUp([n],["tkId"],f.WM.BROWSE,!0);case 32:if(void 0!==(p=t.sent)&&0!==p.length){t.next=39;break}if(!(m=n.split("-").slice(0,2).pop())||""===m){t.next=39;break}return t.next=38,this.dbWrapper.dbQueryUp([m],["variationId"],f.WM.BROWSE,!0);case 38:p=t.sent;case 39:t.next=45;break;case 41:if(""===r){t.next=45;break}return t.next=44,this.dbWrapper.dbQueryUp([r],["psName","alternatePsName"],f.WM.BROWSE,!0);case 44:p=t.sent;case 45:if(void 0!==p&&0!==p.length){t.next=53;break}if(y=this.checkVariableFontInCachedFonts(r)){t.next=51;break}return t.next=50,this.checkVariableFontInDBFonts(r);case 50:y=t.sent;case 51:if(!y){t.next=53;break}return t.abrupt("return",y);case 53:if(!p||!p.length){t.next=75;break}v=b.p.createFontFromDBData(p[0],this.initParams.appEntitlement,a),""!==n&&v.fontId!==n&&(v.fontId=n),g=T(e._schedulersList),t.prev=57,g.s();case 59:if((_=g.n()).done){t.next=66;break}if(!_.value.cachedFonts().has(v.postscriptName)){t.next=64;break}return v.isActiveForUser=!0,t.abrupt("break",66);case 64:t.next=59;break;case 66:t.next=71;break;case 68:t.prev=68,t.t1=t.catch(57),g.e(t.t1);case 71:return t.prev=71,g.f(),t.finish(71);case 74:return t.abrupt("return",v);case 75:if(E=void 0,n&&""!==n?E=n:r&&""!==r&&(E=r),!E){t.next=81;break}if(!(S=this._cachedFonts.get(E))){t.next=81;break}return t.abrupt("return",S.clone());case 81:if(!o){t.next=83;break}return t.abrupt("return",new s.K1);case 83:if(k=this._initParams.authParams.accessToken,d||0!==this._byofFontsLastCheck||!b.p.isGivenScopePresent(k,"af_byof")||this._obtainedTokenParams.entitlement!==s.l0.Entitlement.FULL){t.next=92;break}return N={root:{page:1,perPage:100,isRequested:!1},retryCount:2},new s.mP,new s.l0.Error,t.next=89,this.scheduleTask(s.l0.TaskType.BYOF_COUNT,N);case 89:if(!(O=this._cachedFonts.get(E))){t.next=92;break}return t.abrupt("return",O.clone());case 92:if(d||0!==A(this._cachedFonts).filter((function(e){return e[1].type===s.l0.FontType.APPLICATION})).length||!this.initParams.applicationFontsCollectionType){t.next=95;break}return t.next=95,this.fetchAndprocessCustomCatalog();case 95:if(!(I=this.checkVariableFontInCachedFonts(E))){t.next=98;break}return t.abrupt("return",I);case 98:return t.abrupt("return",new s.K1);case 99:case"end":return t.stop()}}),t,this,[[9,20,23,26],[57,68,71,74]])}))),function(e){return z.apply(this,arguments)})},{key:"getFontFromLocalOrRemoteInfo",value:(J=S(w().mark((function e(t){var r,n,a,o,i,u=arguments;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=u.length>1&&void 0!==u[1]?u[1]:"",n=u.length>2&&void 0!==u[2]?u[2]:s.l0.FontType.DEFAULT,""!==t||""!==r){e.next=4;break}return e.abrupt("return",void 0);case 4:return e.next=6,this.getFontFromLocalInfo(t,r,n);case 6:if(!(a=e.sent)||""===a.fontId){e.next=9;break}return e.abrupt("return",a);case 9:if(0!==A(this._cachedFonts).filter((function(e){return e[1].type===s.l0.FontType.APPLICATION})).length||!this.initParams.applicationFontsCollectionType){e.next=12;break}return e.next=12,this.fetchAndprocessCustomCatalog();case 12:return e.next=14,this.getFontFromLocalInfo(t,r,n);case 14:if(!(a=e.sent)||""===a.fontId){e.next=17;break}return e.abrupt("return",a);case 17:if(""!==t||""!==r&&"TkD-"===r.substring(0,4)){e.next=19;break}return e.abrupt("return",void 0);case 19:return o={root:{downloadCB:null,fontsList:""!==t?[t]:[],fontsIds:""!==r?[r]:[],unicodesList:[],fontInfo:new s.K1(n)},retryCount:1},e.next=23,this.fetchCachedEntitlement();case 23:if(e.t0=e.sent,e.t1=s.l0.Entitlement.ANONYMOUS,e.t0!==e.t1){e.next=27;break}return e.abrupt("return",void 0);case 27:return e.next=29,this.scheduleTask(s.l0.TaskType.FONT_SEARCH,o);case 29:if(!(i=e.sent).length||""===i[0][0].postscriptName){e.next=32;break}return e.abrupt("return",i[0][0]);case 32:return e.abrupt("return",void 0);case 33:case"end":return e.stop()}}),e,this)}))),function(e){return J.apply(this,arguments)})},{key:"_processSearchResponse",value:(Y=S(w().mark((function e(t,r,n){var a,o,i,u,l,c,f,h,d,m,y,v,g,_,E,k,A,N,O,I,L,x;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=n,o=function(){var e=S(w().mark((function e(t,r){return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!a.root.downloadCB){e.next=4;break}return e.next=3,a.root.downloadCB(t,r);case 3:return e.abrupt("return",!0);case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),i=b.p.parseHeadersAndGetReqId(t.headers),u=[],r.status===p.t.ResponseStatus.OK){e.next=15;break}if(l=b.p.mapStatusNumberToErrorCode(r.status),r.status!==p.t.ResponseStatus.UNAUTHORIZED&&r.status!==p.t.ResponseStatus.FORBIDDEN&&r.status!==p.t.ResponseStatus.TOO_MANY_REQUESTS||(a.retryCount=0),!(a.retryCount>1)){e.next=12;break}return a.retryCount=a.retryCount-1,e.next=11,this.scheduleTask(s.l0.TaskType.FONT_SEARCH,a);case 11:return e.abrupt("return",e.sent);case 12:for(c in a.root.fontsList)f=new s.K1(s.l0.FontType.DEFAULT,a.root.fontsList[c],""),u.push([f,new s.l0.Error(l,"Searching Error for X-Request-Id: ".concat(i),!1,r.status)]),o(f,new s.l0.Error(l,"Searching Error for X-Request-Id: ".concat(i),!0,r.status));e.next=47;break;case 15:if(h=r.body.results,d=r.body,!h||!h.length){e.next=46;break}m=T(h),e.prev=19,m.s();case 21:if((y=m.n()).done){e.next=36;break}if(v=y.value,g=b.p.createFontFromFindFontResult(v,s.l0.FontType.DEFAULT),this._initParams.appEntitlement!==s.l0.AppEntitlement.FREE){e.next=29;break}return e.next=27,this.getFontFromLocalInfo(g.postscriptName,g.fontId,s.l0.FontType.DEFAULT,!0);case 27:(_=e.sent).postscriptName===g.postscriptName&&(g.isPremiumFont=_.isPremiumFont,g.isPremiumFont&&g.accessLevel===s.l0.AccessLevel.READ_WRITE&&(g.accessLevel=s.l0.AccessLevel.READ_ONLY));case 29:E=new s.l0.Error,""!==g.fontId&&""!==g.postscriptName||(E=new s.l0.Error(s.l0.ErrorCode.FONT_NOT_FOUND,"Font not found for X-Request-Id: ".concat(i),!1),!1===Boolean(v.found).valueOf()&&this._cachedNotFoundNonAdobeFonts.set(g.postscriptName,g)),E.httpStatus=r.status,u.push([g,E]),o(g,E);case 34:e.next=21;break;case 36:e.next=41;break;case 38:e.prev=38,e.t0=e.catch(19),m.e(e.t0);case 41:return e.prev=41,m.f(),e.finish(41);case 44:e.next=47;break;case 46:if(d&&d.length){k=T(d);try{for(k.s();!(A=k.n()).done;){if(N=A.value,O=new s.K1,I=new s.l0.Error,-1!==(L=N.requested_id).indexOf("TkD-")?O.fontId=L:O.postscriptName=L,x=N.variation)try{O=b.p.createFontFromJSONData(x,s.l0.FontType.DEFAULT,s.l0.Entitlement.ANONYMOUS,this._initParams)[0]}catch(e){I=new s.l0.Error(s.l0.ErrorCode.FONT_NOT_FOUND,"Font not found for X-Request-Id: ".concat(i))}else I=new s.l0.Error(s.l0.ErrorCode.FONT_NOT_FOUND,"Font not found for X-Request-Id: ".concat(i));I.httpStatus=r.status,u.push([O,I]),o(O,I)}}catch(e){k.e(e)}finally{k.f()}}case 47:return e.abrupt("return",u);case 48:case"end":return e.stop()}}),e,this,[[19,38,41,44]])}))),function(e,t,r){return Y.apply(this,arguments)})},{key:"_processFontCatalogUrl",value:function(e,t){e.status!==p.t.ResponseStatus.OK?this.catalogStatus=R.UNINITIALIZED:this._obtainedTokenParams.catalog=e.body.links.catalog}},{key:"_processRecommendationUrl",value:function(e,t){e.status,p.t.ResponseStatus.OK}},{key:"_processMoreSlugs",value:(W=S(w().mark((function e(t,r){var n,a;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.status===p.t.ResponseStatus.OK){e.next=3;break}e.next=8;break;case 3:return n=t.body,e.next=6,this._fetchDefaultFamiliesData(n,!1);case 6:return a=e.sent,e.abrupt("return",a);case 8:case"end":return e.stop()}}),e,this)}))),function(e,t){return W.apply(this,arguments)})},{key:"constructLangNamesMap",value:function(e){var t=new Map,r=e.languages;if(r){var n,a=T(r);try{for(a.s();!(n=a.n()).done;){var o=n.value,i=b.p.getLanguageFromString(o.key,!1);!0===Object.values(s.l0.Language).includes(i)&&o.label&&t.set(i,o.label)}}catch(e){a.e(e)}finally{a.f()}}return t}},{key:"getLangNames",value:(V=S(w().mark((function e(){var t,r,n,a,o,i,u,l=this;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new Map,e.next=3,b.p.getAppropriateRegion();case 3:return r=e.sent,e.next=6,this._responseCache.getInMemoryOrFromResponseCache(h.C.LANG_FILTER_DUMMY_ENDPOINT_PREFIX+r+h.C.LANG_FILTER_DUMMY_ENDPOINT_SUFFIX);case 6:if(!((n=e.sent)&&n.languages&&n.languages.length>0)){e.next=12;break}t=this.constructLangNamesMap(n),setTimeout((function(){l.scheduleTask(s.l0.TaskType.FETCH_LANGS,null)}),15e3),e.next=15;break;case 12:return e.next=14,this.scheduleTask(s.l0.TaskType.FETCH_LANGS,null);case 14:t=e.sent;case 15:a=new s.l0.Error,0===t.size&&(a.errCode=s.l0.ErrorCode.UNKNOWN),o=T(this.initParams.excludedLanguages);try{for(o.s();!(i=o.n()).done;)u=i.value,t.delete(u)}catch(e){o.e(e)}finally{o.f()}return e.abrupt("return",{languageMap:t,error:a});case 20:case"end":return e.stop()}}),e,this)}))),function(){return V.apply(this,arguments)})},{key:"_processLangNames",value:(H=S(w().mark((function e(t,r){var n;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.status===p.t.ResponseStatus.OK){e.next=3;break}e.next=8;break;case 3:return e.next=5,b.p.getAppropriateRegion();case 5:return n=e.sent,this._responseCache.putValue(h.C.LANG_FILTER_DUMMY_ENDPOINT_PREFIX+n+h.C.LANG_FILTER_DUMMY_ENDPOINT_SUFFIX,t.body),e.abrupt("return",this.constructLangNamesMap(t.body));case 8:case"end":return e.stop()}}),e,this)}))),function(e,t){return H.apply(this,arguments)})},{key:"_processByofUploadUrl",value:(K=S(w().mark((function e(t,r){var n,a,o;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(b.p.mapStatusNumberToErrorCode(t.status)===s.l0.ErrorCode.NONE){e.next=7;break}return n=b.p.mapStatusNumberToErrorCode(t.status),(a=new s.l0.Error(n,"BYOF upload Error",!1)).errCode===s.l0.ErrorCode.AUTH_FAILURE&&this.handleAuthFailure(),e.abrupt("return",{status:!1,error:a});case 7:if(!(o=t.body.upload_url)){e.next=14;break}return e.next=11,this.scheduleTask(s.l0.TaskType.FILE_UPLOAD,r,o);case 11:return e.abrupt("return",e.sent);case 14:return e.abrupt("return",{status:!1,error:new s.l0.Error(s.l0.ErrorCode.UNKNOWN,"Unknown error ")});case 15:case"end":return e.stop()}}),e,this)}))),function(e,t){return K.apply(this,arguments)})},{key:"_handleByofAccessLevelResponse",value:function(e,t,r){var n=b.p.mapStatusNumberToErrorCode(t.status),a=new s.l0.Error(n,"BYOF access check",!1),o=!0;n!==s.l0.ErrorCode.NONE?n!==s.l0.ErrorCode.SERVER_UNREACHABLE&&n!==s.l0.ErrorCode.OFFLINE&&(o=!1):t.body&&t.body.access_level&&!1===Boolean(t.body.access_level.upload).valueOf()&&(o=!1);var i=e.headers.filter((function(e){return e[0]===p.t.HeaderKey.AUTHORIZARION}));if(i.length&&i[0][1]){var u=i[0][1].replace(p.t.HeaderValue.BEARER,"");this._accessTokenByofStatus.set(u,o);var l=h.C.BYOF_ACCESS_ENDPOINT_PREFIX+this._initParams.authParams.userId+h.C.BYOF_ACCESS_ENDPOINT_SUFFIX;this._responseCache.putValue(l,o)}return{error:a,hasAccess:o}}},{key:"_handleByofAuthDeleteResponse",value:function(e,t,r){var n=b.p.mapStatusNumberToErrorCode(t.status);return{error:new s.l0.Error(n),status:n===s.l0.ErrorCode.NONE}}},{key:"_handleAnsShortPollResponse",value:function(e,t){if(b.p.mapStatusNumberToErrorCode(e.status)!==s.l0.ErrorCode.NONE){var r,n=b.p.mapStatusNumberToErrorCode(e.status);return{status:!1,error:new s.l0.Error(n,"Received error from ANS",!1)}}var a,o=T(e.body.notifications.notification);try{for(o.s();!(a=o.n()).done;){var i=a.value;if("com.adobe.fonts.v1"===i.type&&"byof_upload_status"===i["sub-type"]&&i.payload){var u=i.payload;"failed"===u.status||u.status}}}catch(r){o.e(r)}finally{o.f()}return{status:!0,error:new s.l0.Error}}},{key:"_processHealthCheckResponse",value:function(e,t,r){var n=b.p.parseHeadersAndGetReqId(e.headers);if(b.p.mapStatusNumberToErrorCode(t.status)!==s.l0.ErrorCode.NONE){var a=b.p.mapStatusNumberToErrorCode(t.status);return{status:!1,error:new s.l0.Error(a,"Received error from Healthcheck for X-Request-Id: ".concat(n),!1,t.status)}}return{status:!0,error:new s.l0.Error(s.l0.ErrorCode.NONE,"X-Request-Id: ".concat(n),!1,t.status)}}},{key:"_processUnicodeRangeMatchResponse",value:function(e,t,r){if(b.p.mapStatusNumberToErrorCode(t.status)!==s.l0.ErrorCode.NONE){var n=b.p.mapStatusNumberToErrorCode(t.status);return{fonts:[],error:new s.l0.Error(n,"Received from Unicode Range Match",!1,t.status)}}var a=t.body.results;if(!a||0===a.length)return{fonts:[],error:new s.l0.Error(s.l0.ErrorCode.UNKNOWN,"No fonts found for Unicode Range Match",!1,t.status)};var o=a.map((function(e){if(e.postscript_name&&e.sync_font_id)return{postscriptName:e.postscript_name,fontId:e.sync_font_id}}));return 0===o.length?{fonts:[],error:new s.l0.Error(s.l0.ErrorCode.UNKNOWN,"Invalid response from Unicode Range Match",!1,t.status)}:{fonts:o,error:new s.l0.Error}}},{key:"_processFileUploadResponse",value:function(e,t){if(b.p.mapStatusNumberToErrorCode(e.status)!==s.l0.ErrorCode.NONE){var r=b.p.mapStatusNumberToErrorCode(e.status);return{status:!1,error:new s.l0.Error(r,"File upload Error to the endpoint",!1)}}return{status:!0,error:new s.l0.Error}}},{key:"_processCollabAuthResponse",value:function(e,t,r){var n=new s.l0.Error(b.p.mapStatusNumberToErrorCode(t.status),"",!1,t.status),a=b.p.parseHeadersAndGetReqId(e.headers);return n.errMsg="Received for X-Request-Id: ".concat(a),{responsebody:t.body,err:n,callback:r}}},{key:"bloomFilterEncoded",value:function(e,t){var r=l.q.calcSize(e.length,t),n=l.q.calcHashes(e.length,r);e.length>50&&(n=Math.min(10,n*Math.floor(e.length/50)));var a,o=new l.q(r,n),i=T(e);try{for(i.s();!(a=i.n()).done;){var s=a.value;!1===o.has(s)&&o.add(s)}}catch(e){i.e(e)}finally{i.f()}return o.toBase64().length<2e3?o.toBase64():""}},{key:"scheduleTask",value:(P=S(w().mark((function t(r,n){var o,l,c,f,h,d,m,y,v,g,_,E,S,T,k,A,N,O,I,L,x,C,F,P,R,D,U,M,B,j,G,K,H,V,W,Y,J,z,$,q,X,Q,Z,ee,te,re,ne,ae,oe,ie,se,ue,le,ce,fe,he,pe,de,me,ye,ve,ge,be,_e,we,Ee,Se,Te,ke=this,Ae=arguments;return w().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:o=Ae.length>2&&void 0!==Ae[2]?Ae[2]:"",l=Ae.length>3&&void 0!==Ae[3]?Ae[3]:"",c=Ae.length>4&&void 0!==Ae[4]?Ae[4]:[],f=new a.nr(r),(h=new a.uF(f.taskType)).status=p.t.ResponseStatus.UNAUTHORIZED,t.t0=f.taskType,t.next=t.t0===s.l0.TaskType.TOKEN_FETCH||t.t0===s.l0.TaskType.TOKEN_FETCH_INTERNAL?9:t.t0===s.l0.TaskType.FONT_SEARCH?25:t.t0===s.l0.TaskType.FONT_DOWNLOAD?40:t.t0===s.l0.TaskType.USAGE_REPORT?82:t.t0===s.l0.TaskType.FILE_DOWNLOAD?99:t.t0===s.l0.TaskType.FILE_UPLOAD?104:t.t0===s.l0.TaskType.FONT_CATALOG_URL?114:t.t0===s.l0.TaskType.CUSTOM_CATALOG_URL_VARIABLE||t.t0===s.l0.TaskType.CUSTOM_CATALOG_URL_PHOTOSHOP?121:t.t0===s.l0.TaskType.ACTIVATED_FONTS_POLL||t.t0===s.l0.TaskType.ACTIVATED_FONTS||t.t0===s.l0.TaskType.ACTIVATED_FONTS_COUNT||t.t0===s.l0.TaskType.BYOF_COUNT||t.t0===s.l0.TaskType.BYOF_LISTS||t.t0===s.l0.TaskType.BYOF_FONTS_POLL?136:t.t0===s.l0.TaskType.FETCH_FAMILY?152:t.t0===s.l0.TaskType.SEARCH_FAMILY?164:t.t0===s.l0.TaskType.CUSTOM_CATALOG_DOWNLOAD||t.t0===s.l0.TaskType.CATALOG_DOWNLOAD?180:t.t0===s.l0.TaskType.TAG_CATALOG_URL?186:t.t0===s.l0.TaskType.RECOMMENDATION_URL?198:t.t0===s.l0.TaskType.BYOF_ACCESS_LEVEL?204:t.t0===s.l0.TaskType.BYOF_DELETE?210:t.t0===s.l0.TaskType.ANS_SHORT_POLL?219:t.t0===s.l0.TaskType.RECOMMENDED_SLUGS||t.t0===s.l0.TaskType.TRENDING_SLUGS||t.t0===s.l0.TaskType.NEWEST_SLUGS?236:t.t0===s.l0.TaskType.FETCH_LANGS?246:t.t0===s.l0.TaskType.BYOF_UPLOAD_URL?256:t.t0===s.l0.TaskType.COLLAB_AUTH_API?267:t.t0===s.l0.TaskType.HEALTHCHECK_API?282:t.t0===s.l0.TaskType.UNICODE_RANGE_MATCH_API?288:299;break;case 9:if(!this._accessTokenBlockedSet.has(this._initParams.authParams.accessToken)){t.next=11;break}return t.abrupt("return",this._processResponse(f,h,n));case 11:return this._initParams.authParams.isStaging?f.url=p.t.ServerUrl.TYPEKIT_STAGE:f.url=p.t.ServerUrl.TYPEKIT_PROD,f.url+=p.t.ServerAPI.TYPEKIT_TOKEN,d=[[p.t.HeaderKey.CONTENT_TYPE,p.t.HeaderValue.ACCEPT_JSON],[p.t.HeaderKey.API_KEY,this.initParams.authParams.appId],[p.t.HeaderKey.X_REQUEST_ID,b.p.getXRequestId()]],!1===b.p.isValidAccessToken(this.initParams.authParams.accessToken)?d.push([p.t.HeaderKey.SESSION_ID,this._initParams.authParams.userId]):d.push([p.t.HeaderKey.AUTHORIZARION,p.t.HeaderValue.BEARER+this._initParams.authParams.accessToken]),t.next=17,b.p.getAppropriateRegion();case 17:return m=t.sent,f.url=f.url.concat("?",p.t.ServerQueryParams.LOCALE_KEY,m),f.url=f.url.concat("&",p.t.ServerQueryParams.VERSION_KEY,p.t.AF_CATALOG_VERSION),f.url=f.url.concat("&",p.t.HeaderKey.X_REQUEST_ID,"=",this.initParams.runtimeMode,"_",(new Date).getTime().toString()),f.url=f.url.concat("&tqweb_version=",u.x),f.method=p.t.RequestMethod.GET,f.headers=d,t.abrupt("break",300);case 25:return this._initParams.authParams.isStaging?f.url=p.t.ServerUrl.TYPEKIT_STAGE:f.url=p.t.ServerUrl.TYPEKIT_PROD,y=[[p.t.HeaderKey.CONTENT_TYPE,p.t.HeaderValue.ACCEPT_JSON],[p.t.HeaderKey.API_KEY,this.initParams.authParams.appId],[p.t.HeaderKey.X_REQUEST_ID,b.p.getXRequestId()]],v=n,f.url+=p.t.ServerAPI.TYPEKIT_SEARCH,g=!0,!1===b.p.isValidAccessToken(this.initParams.authParams.accessToken)?g=!1:y.push([p.t.HeaderKey.AUTHORIZARION,p.t.HeaderValue.BEARER+this._initParams.authParams.accessToken]),(_={auto_activate:!1,postscript_names:[""],tk_font_ids:[""],check_entitlement:g}).postscript_names=v.root.fontsList,_.tk_font_ids=v.root.fontsIds,f.body=JSON.stringify(_),f.method=p.t.RequestMethod.POST,f.headers=y,E=b.p.getAppropriateLocale(),f.url=f.url.concat("?",p.t.ServerQueryParams.LOCALE_KEY,E),t.abrupt("break",300);case 40:if(S=function(e){switch(e.fontBufferType){case s.l0.FontBufferType.RAW:return p.t.ServerAPI.USEFONT_DOWNLOAD_SUFFIX_RAW;case s.l0.FontBufferType.WOFF:return p.t.ServerAPI.USEFONT_DOWNLOAD_SUFFIX_WOFF;case s.l0.FontBufferType.WOFF2:return p.t.ServerAPI.USEFONT_DOWNLOAD_SUFFIX_WOFF2;default:return p.t.ServerAPI.USEFONT_DOWNLOAD_SUFFIX_RAW_PROTECTED}}(this.initParams),n=T=n,!(""===o&&this._obtainedTokenParams.expiry<Math.round((new Date).getTime()/1e3)&&!0!==T.root.forceDownload&&!1===this._obtainedTokenParams.localClockOutdated)){t.next=48;break}return this.scheduleTask(s.l0.TaskType.TOKEN_FETCH_INTERNAL,n),t.abrupt("return");case 48:if(A=[[p.t.HeaderKey.ACCEPT,p.t.HeaderValue.ALL]],!this._cachedFonts.has(T.root.fontInfo.postscriptName)||!e._cachedFontsUrlProd.has(T.root.fontInfo.postscriptName)){t.next=56;break}"",(N=this._initParams.authParams.isStaging?e._cachedFontsUrlStage.get(T.root.fontInfo.postscriptName):e._cachedFontsUrlProd.get(T.root.fontInfo.postscriptName))&&(f.url=N),f.isBlob=!0,t.next=79;break;case 56:if(""!==o||T.root.fontInfo.type!==s.l0.FontType.BYOF){t.next=63;break}this._initParams.authParams.isStaging?f.url=p.t.ServerUrl.BYOF_STAGE:f.url=p.t.ServerUrl.BYOF_PROD,f.url=f.url.concat(p.t.ServerAPI.BYOF_DOWNLOAD,"?checksums=",T.root.fontInfo.fontId),A.push([p.t.HeaderKey.API_KEY,this.initParams.authParams.appId]),A.push([p.t.HeaderKey.AUTHORIZARION,p.t.HeaderValue.BEARER+this._initParams.authParams.accessToken]),t.next=79;break;case 63:if(""!==o||T.root.fontInfo.type!==s.l0.FontType.APPLICATION){t.next=78;break}if(!this.initParams.applicationFontsCollectionType||!T.root.fontInfo._subtype){t.next=76;break}if(!(O=this.obtainedTokenParams.mapOfCustomCatalogParams.get(T.root.fontInfo._subtype))){t.next=75;break}if(!(O.expiry<Math.round((new Date).getTime()/1e3))){t.next=72;break}return t.next=70,this.fetchCustomCatalogUrl();case 70:(I=this.obtainedTokenParams.mapOfCustomCatalogParams.get(T.root.fontInfo._subtype))&&(O=I);case 72:f.url=O.genericdownloadUrl,f.url=f.url.concat(T.root.fontInfo.fontId),f.url=f.url.concat("?__token__=",O.token);case 75:f.isBlob=!0;case 76:t.next=79;break;case 78:""===o&&T.root.fontsList.length>0?(A.push([p.t.HeaderKey.SUBSET_SERVICE_AUTHORIZATION,this._obtainedTokenParams.token]),this._initParams.authParams.isStaging?f.url=p.t.ServerUrl.USE_FONTS_STAGE:f.url=p.t.ServerUrl.USE_FONTS_PROD,this._obtainedTokenParams.entitlement===s.l0.Entitlement.ANONYMOUS?f.url=f.url.concat("/ps"):this.initParams.fontBufferType===s.l0.FontBufferType.RAW?f.url=f.url.concat(p.t.ServerAPI.USEFONT_DOWNLOAD_PREFIX,this._obtainedTokenParams.entitlement):f.url=f.url.concat(p.t.ServerAPI.USEFONT_DOWNLOAD_PREFIX,"full"),f.url=f.url.concat(S,T.root.fontsList[0]),!0===T.root.isExactSubset&&""!==T.root.unicodesList&&T.root.unicodesList.length&&T.root.unicodesList.length<100?(f.url=f.url.concat("?exact_unicode_utf16="),L="",L="string"!=typeof T.root.unicodesList?T.root.unicodesList.map((function(e){return String.fromCharCode(e)})).join(""):T.root.unicodesList,x=encodeURIComponent(btoa(unescape(encodeURIComponent(L.split("").sort().join(""))))),f.url=f.url.concat(x)):(f.url=f.url.concat("?unicode="),T.root.unicodesList.length?(""===(C=this.bloomFilterEncoded(T.root.unicodesList,.01))&&(C=this.bloomFilterEncoded(T.root.unicodesList,.02)),""===C&&(C=this.bloomFilterEncoded(T.root.unicodesList,.05)),0===C.length?f.url=f.url.concat("AAAAAQAAAAEAAAAB"):f.url=f.url.concat(C)):f.url+="AAAAAQAAAAEAAAAB"),f.isBlob=!0):(f.url=o,f.headers=c,f.isBlob=!0);case 79:f.method=p.t.RequestMethod.GET,(k=f.headers).push.apply(k,A);case 81:return t.abrupt("break",300);case 82:if(F=n,this._initParams.authParams.isStaging?f.url=p.t.ServerUrl.TYPEKIT_STAGE:f.url=p.t.ServerUrl.TYPEKIT_PROD,!(F.root.fontsList.length>0)){t.next=98;break}return f.url+=p.t.ServerAPI.USEFONT_USAGE,P=[[p.t.HeaderKey.CONTENT_TYPE,p.t.HeaderValue.ACCEPT_JSON],[p.t.HeaderKey.API_KEY,this.initParams.authParams.appId]],b.p.isValidAccessToken(this._initParams.authParams.accessToken)?P.push([p.t.HeaderKey.AUTHORIZARION,p.t.HeaderValue.BEARER+this._initParams.authParams.accessToken]):P.push([p.t.HeaderKey.SESSION_ID,this._initParams.authParams.userId]),f.method=p.t.RequestMethod.POST,f.headers=P,t.next=92,b.p.convertToSha256(F.root.documentId);case 92:for(U in R=t.sent,D=[],F.root.fontsList)M={sync_font_id:F.root.fontsList[U],document_id:R,app_id:this._initParams.authParams.appId,app_version:this._initParams.authParams.appVersion,used_at:Math.round((new Date).getTime()/1e3),operation:F.root.operation,activate:F.root.autoActivate,install_state:F.root.installState.toString(),readonly:F.root.readonly},D=D.concat(M);f.body=JSON.stringify(D),t.next=98;break;case 98:return t.abrupt("break",300);case 99:return f.url=o,f.method=p.t.RequestMethod.GET,f.isBlob=!0,l.length&&(B=[[p.t.HeaderKey.IF_MODIFIED_SINCE,l]],f.headers=B),t.abrupt("break",300);case 104:return f.url=o,f.method=p.t.RequestMethod.PUT,f.isBlob=!0,j=[[p.t.HeaderKey.CONTENT_TYPE,p.t.HeaderValue.MULTIPART_FORM_DATA]],f.headers=j,G=n,t.next=112,G.root.file.arrayBuffer();case 112:return f.body=t.sent,t.abrupt("break",300);case 114:return this._initParams.authParams.isStaging?f.url=p.t.ServerUrl.TYPEKIT_STAGE:f.url=p.t.ServerUrl.TYPEKIT_PROD,f.url+=p.t.ServerAPI.TYPEKIT_CATALOG_URL,K=[[p.t.HeaderKey.API_KEY,this.initParams.authParams.appId],[p.t.HeaderKey.AUTHORIZARION,p.t.HeaderValue.BEARER+this._initParams.authParams.accessToken]],f.headers=K,f.url=f.url.concat("?",p.t.ServerQueryParams.LIBRARY_KEY,p.t.ServerQueryParams.LIBRARY_VALUE_TAGS),f.url=f.url.concat("&",p.t.ServerQueryParams.VERSION_KEY,p.t.AF_CATALOG_VERSION),t.abrupt("break",300);case 121:if(!this._accessTokenBlockedSet.has(this._initParams.authParams.accessToken)){t.next=123;break}return t.abrupt("return",this._processResponse(f,h,n));case 123:return this._initParams.authParams.isStaging?f.url=p.t.ServerUrl.TYPEKIT_STAGE:f.url=p.t.ServerUrl.TYPEKIT_PROD,f.url+=p.t.ServerAPI.TYPEKIT_TOKEN,H=[[p.t.HeaderKey.CONTENT_TYPE,p.t.HeaderValue.ACCEPT_JSON],[p.t.HeaderKey.API_KEY,this.initParams.authParams.appId],[p.t.HeaderKey.AUTHORIZARION,p.t.HeaderValue.BEARER+this._initParams.authParams.accessToken]],V=function(e){return e===s.l0.TaskType.CUSTOM_CATALOG_URL_PHOTOSHOP?s.l0.ApplicationFontsType.PHOTOSHOP:s.l0.ApplicationFontsType.VARIABLE}(f.taskType),t.next=129,b.p.getAppropriateRegion();case 129:return W=t.sent,f.url=f.url.concat("?",p.t.ServerQueryParams.LOCALE_KEY,W),f.url=f.url.concat("&","l=",V),f.url=f.url.concat("&",p.t.ServerQueryParams.VERSION_KEY,"1.0.0"),f.method=p.t.RequestMethod.GET,f.headers=H,t.abrupt("break",300);case 136:if(!this._accessTokenBlockedSet.has(this._initParams.authParams.accessToken)){t.next=138;break}return t.abrupt("return",this._processResponse(f,h,n));case 138:return Y=n,f.taskType===s.l0.TaskType.BYOF_COUNT||f.taskType===s.l0.TaskType.BYOF_LISTS||f.taskType===s.l0.TaskType.BYOF_FONTS_POLL?(this._initParams.authParams.isStaging?f.url=p.t.ServerUrl.BYOF_STAGE:f.url=p.t.ServerUrl.BYOF_PROD,f.url+=p.t.ServerAPI.BYOF_LIST):(this._initParams.authParams.isStaging?f.url=p.t.ServerUrl.TYPEKIT_STAGE:f.url=p.t.ServerUrl.TYPEKIT_PROD,f.url+=p.t.ServerAPI.TYPEKIT_SELECTIONS),J=[[p.t.HeaderKey.ACCEPT,p.t.HeaderValue.ALL],[p.t.HeaderKey.API_KEY,this.initParams.authParams.appId],[p.t.HeaderKey.AUTHORIZARION,p.t.HeaderValue.BEARER+this._initParams.authParams.accessToken]],f.headers=J,r===s.l0.TaskType.ACTIVATED_FONTS_POLL||r===s.l0.TaskType.BYOF_FONTS_POLL?(f.method=p.t.RequestMethod.HEAD,f.isBlob=!0):f.method=p.t.RequestMethod.GET,z=b.p.getAppropriateRegion(),f.url=f.url.concat("?"),f.taskType!==s.l0.TaskType.BYOF_COUNT&&f.taskType!==s.l0.TaskType.BYOF_LISTS&&(f.url=f.url.concat(p.t.ServerQueryParams.INSTALL_STATE_KEY+p.t.ServerQueryParams.INSTALL_STATE_VALUE),f.url=f.url.concat("&")),f.url=f.url.concat(p.t.ServerQueryParams.PAGE_ID_KEY+Y.root.page),f.url=f.url.concat("&",p.t.ServerQueryParams.PER_PAGE_ID_KEY,Y.root.perPage.toString()),f.url=f.url.concat("&",p.t.ServerQueryParams.LOCALE_KEY,z),f.url=f.url.concat("&",p.t.ServerQueryParams.LOCALE_KEY,z),f.url=f.url.concat("&",p.t.ServerQueryParams.FONT_TECHNOLOGY_KEY,"static,vf"),t.abrupt("break",300);case 152:return $=n,this._initParams.authParams.isStaging?f.url=p.t.ServerUrl.TYPEKIT_STAGE:f.url=p.t.ServerUrl.TYPEKIT_PROD,f.url+=p.t.ServerAPI.TYPEKIT_GET_FAMILIES,q=[[p.t.HeaderKey.ACCEPT,p.t.HeaderValue.ACCEPT_JSON],[p.t.HeaderKey.API_KEY,this.initParams.authParams.appId]],f.url+=$.root.familySlug,f.headers=q,f.method=p.t.RequestMethod.GET,X=b.p.getAppropriateRegion(),f.url=f.url.concat("?",p.t.ServerQueryParams.LOCALE_KEY,X),f.url=f.url.concat("&",p.t.ServerQueryParams.BROWSE_MODE_KEY,p.t.ServerQueryParams.BROWSE_MODE_VALUE_ALL),f.url=f.url.concat("&",p.t.ServerQueryParams.FONT_TECHNOLOGY_KEY,"static,vf"),t.abrupt("break",300);case 164:return Q=n,this._initParams.authParams.isStaging?f.url=p.t.ServerUrl.TYPEKIT_STAGE:f.url=p.t.ServerUrl.TYPEKIT_PROD,f.url+=p.t.ServerAPI.TYPEKIT_SEARCH_FAMILIES,Z=[[p.t.HeaderKey.ACCEPT,p.t.HeaderValue.ACCEPT_JSON],[p.t.HeaderKey.API_KEY,this.initParams.authParams.appId]],f.headers=Z,f.method=p.t.RequestMethod.GET,t.next=172,b.p.getAppropriateRegion();case 172:return ee=t.sent,f.url=f.url.concat("?",p.t.ServerQueryParams.SEARCH_KEY,Q.root.familySlug),f.url=f.url.concat("&",p.t.ServerQueryParams.LOCALE_KEY,ee),f.url=f.url.concat("&",p.t.ServerQueryParams.BROWSE_MODE_KEY,p.t.ServerQueryParams.BROWSE_MODE_VALUE_ALL),f.url=f.url.concat("&",p.t.ServerQueryParams.FONT_TECHNOLOGY_KEY,"static,vf"),Q.root.page&&(f.url=f.url.concat("&",p.t.ServerQueryParams.PAGE_ID_KEY,Q.root.page.toString())),Q.root.perPage&&(f.url=f.url.concat("&",p.t.ServerQueryParams.PER_PAGE_ID_KEY,Q.root.perPage.toString())),t.abrupt("break",300);case 180:return f.url=o,te=[],l.length&&te.push([p.t.HeaderKey.IF_MODIFIED_SINCE,l]),f.headers=te,f.method=p.t.RequestMethod.GET,t.abrupt("break",300);case 186:return this._initParams.authParams.isStaging?f.url=p.t.ServerUrl.TYPEKIT_STAGE:f.url=p.t.ServerUrl.TYPEKIT_PROD,f.url+=p.t.ServerAPI.TYPEKIT_TAG_CATALOGS,re=[[p.t.HeaderKey.API_KEY,this.initParams.authParams.appId],[p.t.HeaderKey.ACCEPT,p.t.HeaderValue.ACCEPT_JSON]],f.headers=re,f.method=p.t.RequestMethod.GET,t.next=193,b.p.getAppropriateLocale();case 193:return ne=t.sent,f.url=f.url.concat("?",p.t.ServerQueryParams.VERSION_KEY,p.t.ServerQueryParams.VERSION_VALUE_TAGS),f.url=f.url.concat("&",p.t.ServerQueryParams.LIBRARY_KEY,p.t.ServerQueryParams.LIBRARY_VALUE_TAGS),f.url=f.url.concat("&",p.t.ServerQueryParams.CULTURAL_LOCALE_KEY,ne),t.abrupt("break",300);case 198:return this._initParams.authParams.isStaging?f.url=p.t.ServerUrl.TYPEKIT_STAGE:f.url=p.t.ServerUrl.TYPEKIT_PROD,f.url+=p.t.ServerAPI.TYPEKIT_RECOMMENDATION_URLS,ae=[[p.t.HeaderKey.ACCEPT,p.t.HeaderValue.ACCEPT_JSON]],f.headers=ae,f.method=p.t.RequestMethod.GET,t.abrupt("break",300);case 204:return this._initParams.authParams.isStaging?f.url=p.t.ServerUrl.BYOF_STAGE:f.url=p.t.ServerUrl.BYOF_PROD,f.url+=p.t.ServerAPI.BYOF_UPLOAD_ACCESS_CHECK,oe=[[p.t.HeaderKey.ACCEPT,p.t.HeaderValue.ALL],[p.t.HeaderKey.API_KEY,this.initParams.authParams.appId],[p.t.HeaderKey.AUTHORIZARION,p.t.HeaderValue.BEARER+this._initParams.authParams.accessToken]],f.headers=oe,f.method=p.t.RequestMethod.GET,t.abrupt("break",300);case 210:return this._initParams.authParams.isStaging?f.url=p.t.ServerUrl.BYOF_STAGE:f.url=p.t.ServerUrl.BYOF_PROD,f.url+=p.t.ServerAPI.BYOF_AUTH_DELETE,(ie=n).root.fontsList.join(","),f.url=f.url.concat("?",p.t.ServerQueryParams.CHECKSUMS_KEY,ie.root.fontsList.join(",")),se=[[p.t.HeaderKey.ACCEPT,p.t.HeaderValue.ALL],[p.t.HeaderKey.API_KEY,this.initParams.authParams.appId],[p.t.HeaderKey.AUTHORIZARION,p.t.HeaderValue.BEARER+this._initParams.authParams.accessToken]],f.headers=se,f.method=p.t.RequestMethod.DELETE,t.abrupt("break",300);case 219:if(""!==this._initParams.authParams.ansAppIdentifier){t.next=221;break}return t.abrupt("return");case 221:return this._initParams.authParams.isStaging?f.url=p.t.ServerUrl.ANS_STAGE:f.url=p.t.ServerUrl.ANS_PROD,f.url+=p.t.ServerAPI.ANS_QUERY_NOTIFICATIONS,ue=[[p.t.HeaderKey.API_KEY,this.initParams.authParams.appId],[p.t.HeaderKey.USER_AUTHORIZARION,p.t.HeaderValue.BEARER+this._initParams.authParams.accessToken],[p.t.HeaderKey.ANS_APP_ID,this._initParams.authParams.ansAppIdentifier]],f.headers=ue,f.method=p.t.RequestMethod.GET,t.next=228,b.p.getAppropriateLocale();case 228:return le=t.sent,f.url=f.url.concat("?",p.t.ServerQueryParams.PAGE_SIZE_KEY,"100"),f.url=f.url.concat("&","_type=json"),f.url=f.url.concat("&",p.t.ServerQueryParams.CONFIG_VERSION_KEY,"1"),f.url=f.url.concat("&",p.t.ServerQueryParams.LOCALE_KEY,le),f.url=f.url.concat("&",p.t.ServerQueryParams.CURRENT_TIMESTAMP_KEY,Number((new Date).getTime()-1e4).toString()),f.url=f.url.concat("&",p.t.ServerQueryParams.FUTURE_TIMESTAMP_KEY,Number((new Date).getTime()+12e4).toString()),t.abrupt("break",300);case 236:return f.url=o,ce=[[p.t.HeaderKey.API_KEY,this.initParams.authParams.appId],[p.t.HeaderKey.ACCEPT,p.t.HeaderValue.ACCEPT_JSON],[p.t.HeaderKey.AUTHORIZARION,p.t.HeaderValue.BEARER+this._initParams.authParams.accessToken]],f.headers=ce,f.method=p.t.RequestMethod.GET,t.next=242,b.p.getAppropriateLocale();case 242:return fe=t.sent,f.url=f.url.concat("?",p.t.ServerQueryParams.LIBRARY_KEY,p.t.ServerQueryParams.LIBRARY_VALUE_TAGS),f.url=f.url.concat("&",p.t.ServerQueryParams.LOCALE_KEY,fe),t.abrupt("break",300);case 246:return this._initParams.authParams.isStaging?f.url=p.t.ServerUrl.TYPEKIT_STAGE:f.url=p.t.ServerUrl.TYPEKIT_PROD,f.url+=p.t.ServerAPI.TYPEKIT_LANG_NAMES,he=[[p.t.HeaderKey.API_KEY,this.initParams.authParams.appId],[p.t.HeaderKey.ACCEPT,p.t.HeaderValue.ACCEPT_JSON]],f.headers=he,f.method=p.t.RequestMethod.GET,t.next=253,b.p.getAppropriateRegion();case 253:return pe=t.sent,f.url=f.url.concat("?",p.t.ServerQueryParams.LOCALE_KEY,pe),t.abrupt("break",300);case 256:return de=n,this._initParams.authParams.isStaging?f.url=p.t.ServerUrl.BYOF_STAGE:f.url=p.t.ServerUrl.BYOF_PROD,f.url+=p.t.ServerAPI.BYOF_UPLOAD_HANDSHAKE,me=[[p.t.HeaderKey.ACCEPT,p.t.HeaderValue.ALL],[p.t.HeaderKey.API_KEY,this.initParams.authParams.appId],[p.t.HeaderKey.AUTHORIZARION,p.t.HeaderValue.BEARER+this._initParams.authParams.accessToken]],f.headers=me,f.method=p.t.RequestMethod.GET,t.next=264,b.p.getHash(b.V.SHA256,new Blob([de.root.file]));case 264:return ye=t.sent,f.url=f.url.concat("?",p.t.ServerQueryParams.CHECKSUM_KEY,ye),t.abrupt("break",300);case 267:return this._initParams.authParams.isStaging?f.url=p.t.ServerUrl.TYPEKIT_STAGE:f.url=p.t.ServerUrl.TYPEKIT_PROD,f.url+=p.t.ServerAPI.COLLABORATION_FONT_AUTH_URL,f.url+="?include_metadata=true",ve=n,ge=[[p.t.HeaderKey.API_KEY,this.initParams.authParams.appId]],b.p.isValidAccessToken(this._initParams.authParams.accessToken)?ge.push([p.t.HeaderKey.AUTHORIZARION,"Bearer ".concat(this._initParams.authParams.accessToken)]):""!==ve.root.fontAccessToken?ge.push([p.t.HeaderKey.COLLABORATION_AUTHORIZATION,ve.root.fontAccessToken]):ge.push([p.t.HeaderKey.COLLABORATION_AUTHORIZATION,this._initParams.authParams.accessToken]),this._initParams.authParams.isStaging&&this._initParams.logLevel===s.ds.DEBUG&&!1===b.p.isValidAccessToken(this._initParams.authParams.accessToken)&&ge.push([p.t.HeaderKey.BYPASS_AUTHORIZARION,"true"]),ge.push([p.t.HeaderKey.X_REQUEST_ID,b.p.getXRequestId()]),f.headers=ge,(be={font_ids:[""],ps_names:[""],format:"obfuscated-opentype",document_id:ve.root.documentId}).font_ids=ve.root.fontIDs,be.ps_names=ve.root.psNames,f.body=JSON.stringify(be),f.method=p.t.RequestMethod.POST,t.abrupt("break",300);case 282:return this._initParams.authParams.isStaging?f.url=p.t.ServerUrl.TYPEKIT_STAGE:f.url=p.t.ServerUrl.TYPEKIT_PROD,f.url+=p.t.ServerAPI.TYPEKIT_HEALTHCHECK,_e=[[p.t.HeaderKey.API_KEY,this.initParams.authParams.appId],[p.t.HeaderKey.X_REQUEST_ID,b.p.getXRequestId()]],f.headers=_e,f.method=p.t.RequestMethod.GET,t.abrupt("break",300);case 288:return this._initParams.authParams.isStaging?f.url=p.t.ServerUrl.FONT_SERVICE_STAGE:f.url=p.t.ServerUrl.FONT_SERVICE_PROD,we=n,f.url+=p.t.ServerAPI.TYPEKIT_UNICODE_RANGE_MATCH,f.url=f.url.concat("?",p.t.ServerQueryParams.LIMIT_KEY,we.root.perPage.toString()),f.url=f.url.concat("&",p.t.ServerQueryParams.PAGE_ID_KEY,we.root.page.toString()),Ee=[[p.t.HeaderKey.API_KEY,this.initParams.authParams.appId],[p.t.HeaderKey.X_REQUEST_ID,b.p.getXRequestId()]],Se={unicodeRange:we.root.unicodes},f.body=JSON.stringify(Se),f.headers=Ee,f.method=p.t.RequestMethod.POST,t.abrupt("break",300);case 299:return t.abrupt("return",!0);case 300:return t.prev=300,Te=new a.up(f),t.abrupt("return",Te.send().then((function(e){return ke._processResponse(f,e,n)})).catch((function(e){i.X.Logger.logMessage(s.ds.DEBUG,e);var t=new a.uF(f.taskType);return t.status=p.t.ResponseStatus.OFFLINE,ke._processResponse(f,t,n)})));case 305:t.prev=305,t.t1=t.catch(300),console.log("Request faced an Unfortunate exception");case 308:case"end":return t.stop()}}),t,this,[[300,305]])}))),function(e,t){return P.apply(this,arguments)})}],_=[{key:"isStagingEnvironment",value:function(){var t,r=T(e._schedulersList);try{for(r.s();!(t=r.n()).done;)if(t.value._initParams.authParams.isStaging)return!0}catch(e){r.e(e)}finally{r.f()}return!1}},{key:"updateCachedSelectionsAndByof",value:function(t,r){0===r.length&&(r=e._schedulersList);var n,a=T(r);try{for(a.s();!(n=a.n()).done;){var o,i=n.value,u=T(t);try{for(u.s();!(o=u.n()).done;){var l=o.value;l.notificationType===s.l0.FontUpdateNotificationType.SELECTIONS?l.operationType===s.l0.FontUpdateOperationType.ADDED?(i._selections.add(l.font.postscriptName),i._cachedFonts.set(l.font.postscriptName,l.font)):l.operationType===s.l0.FontUpdateOperationType.REMOVED&&(i._selections.delete(l.font.postscriptName),i._cachedFonts.delete(l.font.postscriptName)):l.notificationType===s.l0.FontUpdateNotificationType.BYOF&&(l.operationType===s.l0.FontUpdateOperationType.ADDED?(i._byofFonts.add(l.font.postscriptName),i._cachedFonts.set(l.font.postscriptName,l.font)):l.operationType===s.l0.FontUpdateOperationType.REMOVED&&(i._byofFonts.delete(l.font.postscriptName),i._cachedFonts.delete(l.font.postscriptName)))}}catch(e){u.e(e)}finally{u.f()}}}catch(e){a.e(e)}finally{a.f()}}},{key:"handleEvent",value:function(t){var r,n=T(e._schedulersList);try{for(n.s();!(r=n.n()).done;){var a=r.value;if(t===s.l0.TQEventType.USERID_CHANGED){var o="Recents_".concat(a.initParams.authParams.appId,"_").concat(a.initParams.authParams.userId);a.channel&&a.channel.name!==o&&a.createBroadcastChannel()}}}catch(e){n.e(e)}finally{n.f()}}},{key:"checkByofDuplicacy",value:function(t){var r,n=T(e._schedulersList);try{for(n.s();!(r=n.n()).done;)if(!0===r.value._allByofFontHashes.has(t))return!0}catch(e){n.e(e)}finally{n.f()}return!1}},{key:"tryTagCatalogFetch",value:(C=S(w().mark((function e(t,r,n){var a,o;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n._tagCatalogLastCheck&&Math.abs((new Date).getTime()-n._tagCatalogLastCheck)/6e4<600)){e.next=3;break}if(t){e.next=3;break}return e.abrupt("return");case 3:return a={root:{filters:r,delayLoad:!0},retryCount:1},e.next=6,n.scheduleTask(s.l0.TaskType.TAG_CATALOG_URL,a);case 6:o=e.sent,i.X.Logger.logMessage(s.ds.DEBUG,"Updated in background now"),t&&t(o.tags,o.err);case 9:case"end":return e.stop()}}),e)}))),function(e,t,r){return C.apply(this,arguments)})},{key:"getFamilyFromFontId",value:(O=S(w().mark((function e(t,r,n){var a,o,i,u,l,c,h,p,d,m,y,g;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n.postscriptName&&""!==n.postscriptName||n.fontId&&""!==n.fontId||t(new s.FX("")),e.next=4,r.getFontFromLocalOrRemoteInfo(n.postscriptName?n.postscriptName:"",n.fontId);case 4:if(a=e.sent,o=new s.mP,i=void 0,!a||a.type!==s.l0.FontType.BYOF&&a.type!==s.l0.FontType.APPLICATION){e.next=14;break}return e.next=10,r.getCachedFontsFromFamilyName(a.familyName,a.type);case 10:u=e.sent,i=b.p.getAggregationFromFonts(u).getFamilyFromName(a.familyName),e.next=34;break;case 14:if(!a||""===a.familyName){e.next=34;break}return e.next=17,r.queryBrowseDB([a.familyName.concat("##",b.p.getAppropriateRegion()),a.familyName.concat("##",s.l0.Language.Default)],["familyName"],f.WM.BROWSE,!0);case 17:if((l=e.sent)&&0!==l.length){e.next=22;break}return e.next=21,r.queryBrowseDB([a.familyName.concat("##")],["familyName"],f.WM.BROWSE,!1);case 21:l=e.sent;case 22:if(b.p.getFamiliesFromBulkDBData(l,o,r.initParams,r.obtainedTokenParams.entitlement,!1),v.Z._setIsActiveForUserIfApplicable(o),!(i=o.getFamilyFromName(a.familyName))){e.next=30;break}c=T(i.getEntries());try{for(c.s();!(h=c.n()).done;)p=h.value,r._cachedFonts.has(p.postscriptName)&&(p.isActiveForUser=!0)}catch(e){c.e(e)}finally{c.f()}e.next=34;break;case 30:return e.next=32,r.getCachedFontsFromFamilyName(a.familyName,a.type);case 32:(d=e.sent).length&&(i=b.p.getAggregationFromFonts(d).getFamilyFromName(a.familyName));case 34:if(void 0!==i){e.next=39;break}return e.next=37,r.getCollabFamilyFromFontId(n);case 37:(m=e.sent).length&&(i=b.p.getAggregationFromFonts(m).getFamilyFromName(m[0].familyName));case 39:if(y=r.initParams.fontFetchStrategy,void 0!==i||y!==s.l0.FontFetchStrategy.ALL&&y!==s.l0.FontFetchStrategy.SYSTEM){e.next=45;break}return e.next=43,b.p.getSystemFamilyFromFontId(n);case 43:g=e.sent,i=null!=g?g:i;case 45:void 0===i&&(i=new s.FX("")),t(i),e.next=52;break;case 49:e.prev=49,e.t0=e.catch(0),t(new s.FX(""));case 52:case"end":return e.stop()}}),e,null,[[0,49]])}))),function(e,t,r){return O.apply(this,arguments)})},{key:"getRecents",value:function(e,t){setTimeout((function(){t.getRecentListSortedAndBroadcastMessage(!1)}),0)}},{key:"getLangFonts",value:(N=S(w().mark((function e(t,r,n){var a,o;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=new s.mP,o=new v.Z,e.next=4,o.getAggregationFromLanguageSearch(r.dbWrapper,[n],a,r._obtainedTokenParams.entitlement,r.initParams);case 4:t(a);case 5:case"end":return e.stop()}}),e)}))),function(e,t,r){return N.apply(this,arguments)})},{key:"fetchFamiliesPostCatalog",value:(E=S(w().mark((function e(t,r,n,a){var o,i,s=arguments;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=s.length>4&&void 0!==s[4]?s[4]:[],e.next=3,r._fetchDefaultFamiliesData(n,a,o,!0);case 3:i=e.sent,t(i);case 5:case"end":return e.stop()}}),e)}))),function(e,t,r,n){return E.apply(this,arguments)})}],r&&I(t.prototype,r),_&&I(t,_),Object.defineProperty(t,"prototype",{writable:!1}),e}();K._cachedFontsUrlProd=new Map,K._cachedFontsUrlStage=new Map,K._schedulersList=[],K.kMaxDiskCacheSize=1e9,K.kMaxNumFonts=2e3},977144:(e,t,r)=>{"use strict";r.r(t),r.d(t,{ByofFileError:()=>n.j,ColorTechnology:()=>o.D2,LocalFontsPermissionStatus:()=>o.GX,TQByofFileValidatorResult:()=>n.u,TQFont:()=>o.K1,TQFontAggregation:()=>o.mP,TQFontFamily:()=>o.FX,TQInitParams:()=>a.X,TQLogLevel:()=>o.ds,TQUtils:()=>s.p,TQWeb:()=>i.e,tqtypes:()=>o.l0});var n=r(27042),a=r(660234),o=r(51939),i=r(497806),s=r(206069)},165127:(e,t,r)=>{"use strict";r.d(t,{nr:()=>c,uF:()=>f,up:()=>h});var n=r(372482);function a(e){return a="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},a(e)}function o(){o=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},s="function"==typeof Symbol?Symbol:{},u=s.iterator||"@@iterator",l=s.asyncIterator||"@@asyncIterator",c=s.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function h(e,t,r,n){var a=t&&t.prototype instanceof b?t:b,o=Object.create(a.prototype),s=new C(n||[]);return i(o,"_invoke",{value:O(e,r,s)}),o}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=h;var d="suspendedStart",m="suspendedYield",y="executing",v="completed",g={};function b(){}function _(){}function w(){}var E={};f(E,u,(function(){return this}));var S=Object.getPrototypeOf,T=S&&S(S(F([])));T&&T!==r&&n.call(T,u)&&(E=T);var k=w.prototype=b.prototype=Object.create(E);function A(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function N(e,t){function r(o,i,s,u){var l=p(e[o],e,i);if("throw"!==l.type){var c=l.arg,f=c.value;return f&&"object"==a(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(f).then((function(e){c.value=e,s(c)}),(function(e){return r("throw",e,s,u)}))}u(l.arg)}var o;i(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function O(t,r,n){var a=d;return function(o,i){if(a===y)throw new Error("Generator is already running");if(a===v){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var s=n.delegate;if(s){var u=I(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===d)throw a=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=y;var l=p(t,r,n);if("normal"===l.type){if(a=n.done?v:m,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(a=v,n.method="throw",n.arg=l.arg)}}}function I(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,I(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=p(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function F(t){if(t||""===t){var r=t[u];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(a(t)+" is not iterable")}return _.prototype=w,i(k,"constructor",{value:w,configurable:!0}),i(w,"constructor",{value:_,configurable:!0}),_.displayName=f(w,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,f(e,c,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},A(N.prototype),f(N.prototype,l,(function(){return this})),t.AsyncIterator=N,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new N(h(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},A(k),f(k,c,"Generator"),f(k,u,(function(){return this})),f(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=F,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(x),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return s.type="throw",s.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;x(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:F(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}function i(e,t,r,n,a,o,i){try{var s=e[o](i),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,a)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(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,(void 0,o=function(e,t){if("object"!==a(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===a(o)?o:String(o)),n)}var o}function l(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var c=function(){function e(t){s(this,e),this._url="",this._authToken="",this._headers=[],this._method=n.t.RequestMethod.GET,this._body="",this._isBlob=!1,this._taskType=t}return l(e,[{key:"isBlob",get:function(){return this._isBlob},set:function(e){this._isBlob=e}},{key:"url",get:function(){return this._url},set:function(e){this._url=e}},{key:"method",get:function(){return this._method},set:function(e){this._method=e}},{key:"headers",get:function(){return this._headers},set:function(e){this._headers=e}},{key:"authToken",get:function(){return this._authToken},set:function(e){this._authToken=e}},{key:"body",get:function(){return this._body},set:function(e){this._body=e}},{key:"taskType",get:function(){return this._taskType},set:function(e){this._taskType=e}}]),e}(),f=function(){function e(t){s(this,e),this._status=0,this._statusText="",this._headers=[],this._url="",this._body="",this._taskType=t}return l(e,[{key:"status",get:function(){return this._status},set:function(e){this._status=e}},{key:"statusText",get:function(){return this._statusText},set:function(e){this._statusText=e}},{key:"headers",get:function(){return this._headers},set:function(e){this._headers=e}},{key:"url",get:function(){return this._url},set:function(e){this._url=e}},{key:"body",get:function(){return this._body},set:function(e){this._body=e}},{key:"taskType",get:function(){return this._taskType},set:function(e){this._taskType=e}}]),e}(),h=function(){function e(t){s(this,e),this._request=t}var t,r;return l(e,[{key:"request",get:function(){return this._request},set:function(e){this._request=e}},{key:"send",value:(t=o().mark((function t(){var r,a;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=this._request.isBlob,a=new f(this._request.taskType),t.next=4,fetch(this._request.url,{method:this._request.method,headers:this._request.headers,body:(o=this._request,""!==o.body?o.body:null)}).then((function(t){return a.status=e.mapStatusNumberToStatusCode(t.status),a.statusText=t.statusText,t.headers.forEach((function(e,t){a.headers.push([t,e])})),a.url=t.url,a.status>=n.t.ResponseStatus.REDIRECTED?t.text():r?t.blob():t.json()})).then((function(e){return a.body=e,a})).catch((function(e){throw e}));case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}var o}),t,this)})),r=function(){var e=this,r=arguments;return new Promise((function(n,a){var o=t.apply(e,r);function s(e){i(o,n,a,s,u,"next",e)}function u(e){i(o,n,a,s,u,"throw",e)}s(void 0)}))},function(){return r.apply(this,arguments)})}],[{key:"mapStatusNumberToStatusCode",value:function(e){switch(e){case 200:return n.t.ResponseStatus.OK;case 204:return n.t.ResponseStatus.NO_CONTENT;case 206:return n.t.ResponseStatus.PARTIAL_CONTENT;case 301:return n.t.ResponseStatus.REDIRECTED;case 302:return n.t.ResponseStatus.FOUND;case 304:return n.t.ResponseStatus.NOT_MODIFIED;case 305:return n.t.ResponseStatus.USE_PROXY;case 307:return n.t.ResponseStatus.REDIRECT_TEMP;case 308:return n.t.ResponseStatus.REDIRECT_PERMANENTLY;case 400:return n.t.ResponseStatus.BAD_REQUEST;case 401:return n.t.ResponseStatus.UNAUTHORIZED;case 403:return n.t.ResponseStatus.FORBIDDEN;case 404:return n.t.ResponseStatus.NOT_FOUND;case 405:return n.t.ResponseStatus.METHOD_NOT_ALLOWED;case 407:return n.t.ResponseStatus.PROXY_REQUIRED;case 408:return n.t.ResponseStatus.REQUEST_TIMEOUT;case 0:return n.t.ResponseStatus.OFFLINE;case 429:return n.t.ResponseStatus.TOO_MANY_REQUESTS;case 449:return n.t.ResponseStatus.RETRY_WITH;case 500:return n.t.ResponseStatus.SERVER_ERROR;case 501:return n.t.ResponseStatus.NOT_IMPLMENTED;case 502:return n.t.ResponseStatus.BAD_GATEWAY;case 503:return n.t.ResponseStatus.SERVICE_UNAVAILABLE;case 504:return n.t.ResponseStatus.GATEWAY_TIMEOUT;case 511:return n.t.ResponseStatus.NETWORK_AUTH_NEEDED;case 598:return n.t.ResponseStatus.NETWORK_READ_TIMEOUT;case 599:return n.t.ResponseStatus.NETWORK_CONNECT_TIMEOUT}return n.t.ResponseStatus.SERVER_ERROR}}]),e}()},27042:(e,t,r)=>{"use strict";r.d(t,{j:()=>n,u:()=>d});var n,a=r(51939),o=r(177579),i=r(811604),s=r(206069);function u(e){return u="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},u(e)}function l(){l=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function h(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,i=Object.create(o.prototype),s=new C(n||[]);return a(i,"_invoke",{value:O(e,r,s)}),i}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=h;var d="suspendedStart",m="suspendedYield",y="executing",v="completed",g={};function b(){}function _(){}function w(){}var E={};f(E,i,(function(){return this}));var S=Object.getPrototypeOf,T=S&&S(S(F([])));T&&T!==r&&n.call(T,i)&&(E=T);var k=w.prototype=b.prototype=Object.create(E);function A(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function N(e,t){function r(a,o,i,s){var l=p(e[a],e,o);if("throw"!==l.type){var c=l.arg,f=c.value;return f&&"object"==u(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,i,s)}),(function(e){r("throw",e,i,s)})):t.resolve(f).then((function(e){c.value=e,i(c)}),(function(e){return r("throw",e,i,s)}))}s(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function O(t,r,n){var a=d;return function(o,i){if(a===y)throw new Error("Generator is already running");if(a===v){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var s=n.delegate;if(s){var u=I(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===d)throw a=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=y;var l=p(t,r,n);if("normal"===l.type){if(a=n.done?v:m,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(a=v,n.method="throw",n.arg=l.arg)}}}function I(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,I(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=p(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function F(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(u(t)+" is not iterable")}return _.prototype=w,a(k,"constructor",{value:w,configurable:!0}),a(w,"constructor",{value:_,configurable:!0}),_.displayName=f(w,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,f(e,c,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},A(N.prototype),f(N.prototype,s,(function(){return this})),t.AsyncIterator=N,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new N(h(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},A(k),f(k,c,"Generator"),f(k,i,(function(){return this})),f(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=F,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(x),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return s.type="throw",s.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;x(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:F(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}function c(e,t,r,n,a,o,i){try{var s=e[o](i),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,a)}function f(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){c(o,n,a,i,s,"next",e)}function s(e){c(o,n,a,i,s,"throw",e)}i(void 0)}))}}function h(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,(void 0,a=function(e,t){if("object"!==u(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===u(a)?a:String(a)),n)}var a}!function(e){e.NONE="validation-passed",e.INVALID_EXTENSION="validation-invalid-extension",e.INVALID_SIZE="validation-invalid-size",e.INVALID_FILE_CONTENTS="validation-file-not-a-font",e.INVALID_DUPLICATE="validation-duplicate-byof",e.INVALID_BLOCKLISTED_AF="validation-postscriptname-blocklisted"}(n||(n={}));var p=["otf","ttf"],d=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._byofError=n.NONE,this._isFatalError=!1,this._font=new a.K1,this._fileChecksum="",this._fontNameSanitizerProc=void 0,this._file=t,r&&(this._fontNameSanitizerProc=r)}var t,r,u,c;return t=e,r=[{key:"_parseFontFile",value:(c=f(l().mark((function e(){var t;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.t0=i.w,e.t1=Uint8Array,e.next=5,this._file.arrayBuffer();case 5:e.t2=e.sent,e.t3=new e.t1(e.t2),(t=new e.t0(e.t3)).font&&(this._font=t.getTQFont(),""!==this._font.postscriptName&&(this._font.script=t.computeFontScript(this._font.postscriptName),this._font.addSupportedLanguage(this._font.script))),""===this._font.postscriptName&&(this._font.fontName=this._file.name.split(".")[0].replace(/\W/g," ").substring(0,32),""===this._font.familyName&&(this._font.familyName=this._font.fontName)),e.next=14;break;case 12:e.prev=12,e.t4=e.catch(0);case 14:case"end":return e.stop()}}),e,this,[[0,12]])}))),function(){return c.apply(this,arguments)})},{key:"_isBelowUploadSizeLimit",value:function(){return this._file.size/1024/1024<=512}},{key:"_hasValidExtension",value:function(){var e,t=null===(e=this._file.name.split(".").pop())||void 0===e?void 0:e.toLocaleLowerCase();return Boolean(t&&p.includes(t))}},{key:"_checkByofDuplicacy",value:function(e){return o.yZ.checkByofDuplicacy(e)}},{key:"fileChecksum",get:function(){return this._fileChecksum},set:function(e){this._fileChecksum=e}},{key:"byofError",get:function(){return this._byofError},set:function(e){this._byofError=e}},{key:"isFatalError",get:function(){return this._isFatalError},set:function(e){this._isFatalError=e}},{key:"font",get:function(){return this._font},set:function(e){this._font=e}},{key:"_validateInternal",value:(u=f(l().mark((function e(t){var r,o;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isFatalError){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,s.p.getHash(s.V.SHA256,new Blob([this._file]));case 4:if(r=e.sent,this.fileChecksum=r,e.prev=6,this._hasValidExtension()){e.next=12;break}this.byofError=n.INVALID_EXTENSION,this.isFatalError=!0,e.next=26;break;case 12:if(this._isBelowUploadSizeLimit()){e.next=17;break}this.byofError=n.INVALID_SIZE,this.isFatalError=!0,e.next=26;break;case 17:return e.next=19,s.p.checkIfValidFontStream(this._file);case 19:if(e.t0=e.sent,!1!==e.t0){e.next=25;break}this.byofError=n.INVALID_FILE_CONTENTS,this.isFatalError=!0,e.next=26;break;case 25:!0===this._checkByofDuplicacy(r)&&(this.byofError=n.INVALID_DUPLICATE,this.isFatalError=!0);case 26:if(!1!==t){e.next=29;break}return e.next=29,this._parseFontFile();case 29:if(!1!==this.isFatalError||!1!==t){e.next=40;break}if(""!==this._font.postscriptName){e.next=35;break}this.byofError=n.INVALID_FILE_CONTENTS,this.isFatalError=!0,e.next=40;break;case 35:if(""===this._font.postscriptName||!this._fontNameSanitizerProc){e.next=40;break}return e.next=38,this._fontNameSanitizerProc(this._font.postscriptName);case 38:(o=e.sent).type===a.l0.FontType.BYOF?(this.byofError=n.INVALID_DUPLICATE,this.isFatalError=!0):""!==o.fontId&&(o.isVariableFont&&o.postscriptName!==o.defaultPostscriptName&&o.generatedPostscriptName!==o.defaultPostscriptName?(this.byofError=n.NONE,this.isFatalError=!1):(this.byofError=n.INVALID_BLOCKLISTED_AF,this.isFatalError=!0));case 40:e.next=46;break;case 42:e.prev=42,e.t1=e.catch(6),this.byofError=n.INVALID_FILE_CONTENTS,this.isFatalError=!0;case 46:return e.abrupt("return",!1===this.isFatalError);case 47:case"end":return e.stop()}}),e,this,[[6,42]])}))),function(e){return u.apply(this,arguments)})}],r&&h(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}()},660234:(e,t,r)=>{"use strict";r.d(t,{X:()=>u});var n=r(51939),a=r(372482),o=r(291689);function i(e){return i="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},i(e)}function s(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,(void 0,a=function(e,t){if("object"!==i(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===i(a)?a:String(a)),n)}var a}var u=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._runtimeMode=n.l0.RuntimeMode.FOUND_FONTS,this._appEntitlement=n.l0.AppEntitlement.FREEMIUM,this._excludedLanguages=[],this._fontBufferType=n.l0.FontBufferType.RAW_PROTECTED,this._fontFetchStrategy=n.l0.FontFetchStrategy.ADOBE,this._applicationFontsCollectionType=void 0,this._watchFontUpdates=[n.l0.FontType.BYOF],this._diskCacheType=n.l0.DiskCacheType.NONE,this._advancedServiceSearch=!1,this._anonymousUserFallbackServiceSearch=!1,this._introductionURLEnabled=!0,this._additionalFontTechnologies=new Set,this._fontsUpdateCallback=void 0,this._statusUpdateCallback=function(e,t){return!0},this._fontDownloadCallback=function(e,t){return!0},this._timeOutDurationInMillis=6e4,this._selectionPollInterval=a.t.defaultPollInterval,this._enableCharacterSets=!0,this._recentsUpdatePreference=n.l0.RecentsUpdatePreference.ONLY_APPLY,this._recentFontsUpdateCallback=function(e){return!0},this._authParams=t}var t,r,i;return t=e,i=[{key:"Logger",get:function(){return void 0===e._Logger&&(e._Logger=new o.e),e._Logger},set:function(t){e._Logger=t}},{key:"setLanguage",value:function(t){e._lang=t}},{key:"getAppLanguage",value:function(){return e._lang}},{key:"cachedEntitlement",get:function(){return e._cachedEntitlement},set:function(t){e._cachedEntitlement=t}}],(r=[{key:"logLevel",get:function(){return void 0===e._Logger&&(e._Logger=new o.e),e._Logger.defaultLogLevel},set:function(t){void 0===e._Logger&&(e._Logger=new o.e),e._Logger.defaultLogLevel=t}},{key:"applicationFontsCollectionType",get:function(){return this._applicationFontsCollectionType},set:function(e){this._applicationFontsCollectionType=e}},{key:"fontBufferType",get:function(){return this._fontBufferType},set:function(e){this._fontBufferType=e}},{key:"recentsUpdatePreference",get:function(){return this._recentsUpdatePreference},set:function(e){this._recentsUpdatePreference=e}},{key:"anonymousUserFallbackServiceSearch",get:function(){return this._anonymousUserFallbackServiceSearch},set:function(e){this._anonymousUserFallbackServiceSearch=e}},{key:"additionalFontTechnologies",get:function(){return this._additionalFontTechnologies},set:function(e){this._additionalFontTechnologies=e}},{key:"introductionURLEnabled",get:function(){return this._introductionURLEnabled},set:function(e){this._introductionURLEnabled=e}},{key:"getLanguage",value:function(){return e._lang}},{key:"fontsUpdateCallback",get:function(){return this._fontsUpdateCallback},set:function(e){this._fontsUpdateCallback=e}},{key:"selectionPollInterval",get:function(){return this._selectionPollInterval},set:function(e){this._selectionPollInterval=e}},{key:"watchFontUpdates",get:function(){return this._watchFontUpdates},set:function(e){this._watchFontUpdates=e}},{key:"advancedServiceSearch",get:function(){return this._advancedServiceSearch},set:function(e){this._advancedServiceSearch=e}},{key:"appEntitlement",get:function(){return this._appEntitlement},set:function(e){this._appEntitlement=e}},{key:"runtimeMode",get:function(){return this._runtimeMode},set:function(e){this._runtimeMode=e}},{key:"authParams",get:function(){return this._authParams},set:function(e){this._authParams=e}},{key:"fontFetchStrategy",get:function(){return this._fontFetchStrategy},set:function(e){this._fontFetchStrategy=e}},{key:"diskCache",get:function(){return this._diskCacheType},set:function(e){this._diskCacheType=e}},{key:"statusUpdateCallback",get:function(){return this._statusUpdateCallback},set:function(e){this._statusUpdateCallback=e}},{key:"recentFontsUpdateCallback",get:function(){return this._recentFontsUpdateCallback},set:function(e){this._recentFontsUpdateCallback=e}},{key:"fontDownloadCallback",get:function(){return this._fontDownloadCallback},set:function(e){this._fontDownloadCallback=e}},{key:"timeOutDurationInMillis",get:function(){return this._timeOutDurationInMillis},set:function(e){this._timeOutDurationInMillis=e}},{key:"excludedLanguages",get:function(){return this._excludedLanguages},set:function(e){this._excludedLanguages=e}},{key:"enableCharacterSets",get:function(){return this._enableCharacterSets},set:function(e){this._enableCharacterSets=e}}])&&s(t.prototype,r),i&&s(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();u._lang=void 0,u._cachedEntitlement=void 0,u._Logger=void 0},51939:(e,t,r)=>{"use strict";r.d(t,{D2:()=>n,FX:()=>A,GX:()=>k,K1:()=>S,ds:()=>T,l0:()=>o,mP:()=>N,nl:()=>a});var n,a,o,i=r(177579),s=r(372482),u=r(206069);function l(){l=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,i=Object.create(o.prototype),s=new C(n||[]);return a(i,"_invoke",{value:O(e,r,s)}),i}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var d="suspendedStart",m="suspendedYield",y="executing",v="completed",g={};function b(){}function _(){}function w(){}var E={};c(E,i,(function(){return this}));var S=Object.getPrototypeOf,T=S&&S(S(F([])));T&&T!==r&&n.call(T,i)&&(E=T);var k=w.prototype=b.prototype=Object.create(E);function A(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function N(e,t){function r(a,o,i,s){var u=h(e[a],e,o);if("throw"!==u.type){var l=u.arg,c=l.value;return c&&"object"==p(c)&&n.call(c,"__await")?t.resolve(c.__await).then((function(e){r("next",e,i,s)}),(function(e){r("throw",e,i,s)})):t.resolve(c).then((function(e){l.value=e,i(l)}),(function(e){return r("throw",e,i,s)}))}s(u.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function O(t,r,n){var a=d;return function(o,i){if(a===y)throw new Error("Generator is already running");if(a===v){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var s=n.delegate;if(s){var u=I(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===d)throw a=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=y;var l=h(t,r,n);if("normal"===l.type){if(a=n.done?v:m,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(a=v,n.method="throw",n.arg=l.arg)}}}function I(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,I(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function F(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(p(t)+" is not iterable")}return _.prototype=w,a(k,"constructor",{value:w,configurable:!0}),a(w,"constructor",{value:_,configurable:!0}),_.displayName=c(w,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,c(e,u,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},A(N.prototype),c(N.prototype,s,(function(){return this})),t.AsyncIterator=N,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new N(f(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},A(k),c(k,u,"Generator"),c(k,i,(function(){return this})),c(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=F,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(x),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return s.type="throw",s.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;x(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:F(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}function c(e,t,r,n,a,o,i){try{var s=e[o](i),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,a)}function f(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){c(o,n,a,i,s,"next",e)}function s(e){c(o,n,a,i,s,"throw",e)}i(void 0)}))}}function h(e){return function(e){if(Array.isArray(e))return v(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||y(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e){return p="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},p(e)}function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,s=[],u=!0,l=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){l=!0,a=e}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw a}}return s}}(e,t)||y(e,t)||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.")}()}function m(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=y(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function y(e,t){if(e){if("string"==typeof e)return v(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)?v(e,t):void 0}}function v(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 g(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,E(n.key),n)}}function b(e,t,r){return t&&g(e.prototype,t),r&&g(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function _(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function w(e,t,r){return(t=E(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function E(e){var t=function(e,t){if("object"!==p(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==p(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===p(t)?t:String(t)}!function(e){e.NONE="NONE",e.SBIX="SBIX",e.OT_SVG="OT_SVG",e.COLR="COLR"}(n||(n={})),function(e){e.TTC="TTC"}(a||(a={})),function(e){var t,r,n,a,o,l,c,f,h,p,d,m,y,v,g,E;(E=e.StatusCode||(e.StatusCode={})).UNINITIALIZED="UNINITIALIZED",E.WORKING="WORKING",E.DONE="DONE",E.PAUSED="PAUSED",E.ERROR_OCCURED="ERROR_OCCURED",(g=e.RuntimeMode||(e.RuntimeMode={})).ALL="ALL",g.FOUND_FONTS="FOUND_FONTS",(v=e.SortOrderPreference||(e.SortOrderPreference={}))[v.DEFAULT=0]="DEFAULT",v[v.LANGUAGE=1]="LANGUAGE",v[v.ENTITLEMENT=2]="ENTITLEMENT",v[v.RECENTLY_UPDATED=3]="RECENTLY_UPDATED",(y=e.FontBufferType||(e.FontBufferType={}))[y.RAW_PROTECTED=0]="RAW_PROTECTED",y[y.WOFF=1]="WOFF",y[y.WOFF2=2]="WOFF2",y[y.RAW=4]="RAW",(m=e.InstallState||(e.InstallState={})).OS="os",m.CC="cc",(d=e.AccessLevel||(e.AccessLevel={})).READ_WRITE="READ_WRITE",d.READ_ONLY="READ_ONLY",(p=e.AdditionalFontTechnologies||(e.AdditionalFontTechnologies={})).VARIABLE="VARIABLE",p.COLR="COLR",p.SBIX="SBIX",p.OT_SVG="OT_SVG",p.TTC="TTC",function(e){e[e.NONE=0]="NONE",e[e.OFFLINE=1]="OFFLINE",e[e.SERVER_UNREACHABLE=2]="SERVER_UNREACHABLE",e[e.AUTH_FAILURE=3]="AUTH_FAILURE",e[e.PROXY_FAILURE=4]="PROXY_FAILURE",e[e.JSON_PARSE_ERROR=5]="JSON_PARSE_ERROR",e[e.BAD_REQUEST=6]="BAD_REQUEST",e[e.FORBIDDEN=7]="FORBIDDEN",e[e.FONT_NOT_FOUND=8]="FONT_NOT_FOUND",e[e.TOO_MANY_REQUESTS=9]="TOO_MANY_REQUESTS",e[e.DISK_CACHE_CAPACITY_REACHED=10]="DISK_CACHE_CAPACITY_REACHED",e[e.DISK_WRITE_FAILED=11]="DISK_WRITE_FAILED",e[e.BAD_FONT_DATA=12]="BAD_FONT_DATA",e[e.DUPLICATE_BYOF=13]="DUPLICATE_BYOF",e[e.INVALID_CONFIGURATION=14]="INVALID_CONFIGURATION",e[e.SYSTEM_FONTS_SECURITY_ERROR=15]="SYSTEM_FONTS_SECURITY_ERROR",e[e.SYSTEM_FONTS_API_NOT_AVAILABLE=16]="SYSTEM_FONTS_API_NOT_AVAILABLE",e[e.SYSTEM_FONTS_API_NOT_AVAILABLE_FOR_WORKER_THREAD=17]="SYSTEM_FONTS_API_NOT_AVAILABLE_FOR_WORKER_THREAD",e[e.SYSTEM_FONTS_UNKNOWN=18]="SYSTEM_FONTS_UNKNOWN",e[e.UNKNOWN=19]="UNKNOWN"}(t=e.ErrorCode||(e.ErrorCode={})),(h=e.DiskCacheType||(e.DiskCacheType={}))[h.NONE=0]="NONE",h[h.OPFS=1]="OPFS",h[h.IN_MEMORY=2]="IN_MEMORY",(f=e.AppEntitlement||(e.AppEntitlement={}))[f.PAID=0]="PAID",f[f.FREEMIUM=1]="FREEMIUM",f[f.FREE=2]="FREE",function(e){e.Default="en",e.Amharic="am",e.Arabic="ar",e.Armenian="hy",e.Belarusian="be",e.Bengali="bn",e.Catalan="ca",e.Cherokee="chr",e.SimplifiedChinese="zh-Hans",e.TraditionalChinese="zh-Hant",e.Mandarin="zh-Latn-pinyin",e.Croatian="hr",e.Czech="cs",e.Danish="da",e.Devanagari="Deva",e.Dutch="nl",e.Emoji="emoji",e.Filipino="fil",e.Finnish="fi",e.French="fr",e.Fula="ff",e.German="de",e.Greek="el",e.Gujarati="gu",e.Gurmukhi="Guru",e.Hebrew="he",e.Hindi="hi",e.HongKongCh="HK",e.Hungarian="hu",e.Indonesian="id",e.IPA="IPA",e.Italian="it",e.Japanese="ja",e.Kannada="kn",e.Kazakh="kk",e.Khmer="km",e.Korean="ko",e.Lao="lo",e.Latvian="lv",e.Macedonian="mk",e.Malay="ms",e.Malayalam="ml",e.Maltese="mt",e.Myanmar="my",e.NKo="nqo",e.Norwegian="no",e.Oriya="or",e.PanAfrican="panafrican",e.Persian="fa",e.Polish="pl",e.Portuguese="pt",e.Romanian="ro",e.Russian="ru",e.Serbian="sr",e.Sinhalese="si",e.Slovak="sk",e.Slovenian="sl",e.Somali="so-Osma",e.Spanish="es",e.Swedish="sv",e.Tachelhit="shi",e.Tamil="ta",e.Telugu="te",e.Thai="th",e.Turkish="tr",e.Ukrainian="uk",e.Urdu="ur",e.Vai="vai",e.Vietnamese="vi"}(r=e.Language||(e.Language={})),function(e){e.Default="en_US",e.Amharic="am_ET",e.Arabic="ar_AE",e.Armenian="hy_AM",e.Belarusian="be_BY",e.Bengali="bn_IN",e.Catalan="ca_ES",e.Cherokee="chr_US",e.SimplifiedChinese="zh_Hans",e.TraditionalChinese="zh_Hant",e.Mandarin="zh_Latn_pinyin",e.Croatian="hr_HR",e.Czech="cs_CZ",e.Danish="da_DK",e.Dutch="nl_NL",e.Emoji="emoji",e.Filipino="fil_PH",e.Finnish="fi_FI",e.French="fr_FR",e.Fula="ff_SN",e.German="de_DE",e.Greek="el_GR",e.Gujarati="gu_IN",e.Gurmukhi="pa_Guru",e.Hebrew="he_IL",e.Hindi="hi_IN",e.HongKongCh="zh_HK",e.Hungarian="hu_HU",e.Indonesian="id_ID",e.IPA="IPA",e.Italian="it_IT",e.Japanese="ja_JP",e.Kannada="kn_IN",e.Kazakh="kk_KZ",e.Khmer="km_KH",e.Korean="ko_KR",e.Lao="lo_LA",e.Latvian="lv_LV",e.Macedonian="mk_MK",e.Malay="ms_MY",e.Malayalam="ml_IN",e.Maltese="mt_MT",e.Myanmar="my_MM",e.NKo="nqo_GN",e.Norwegian="no_NO",e.Oriya="or_IN",e.PanAfrican="panafrican",e.Persian="fa_IR",e.Polish="pl_PL",e.Portuguese="pt_BR",e.Romanian="ro_RO",e.Russian="ru_RU",e.Serbian="sr_RS",e.Sinhalese="si_LK",e.Slovak="sk_SK",e.Slovenian="sl_SL",e.Somali="so_SO",e.Spanish="es_ES",e.Swedish="sv_SE",e.Tachelhit="shi_Latn",e.Tamil="ta_IN",e.Telugu="te_IN",e.Thai="th_TH",e.Turkish="tr_TR",e.Ukrainian="uk_UA",e.Urdu="ur_IN",e.Vai="vai_LR",e.Vietnamese="vi_VN"}(n=e.Locale||(e.Locale={})),e.RegionToLocale=new Map([[r.Default,n.Default],[r.Amharic,n.Amharic],[r.Arabic,n.Arabic],[r.Armenian,n.Armenian],[r.Belarusian,n.Belarusian],[r.Bengali,n.Bengali],[r.Catalan,n.Catalan],[r.Cherokee,n.Cherokee],[r.SimplifiedChinese,n.SimplifiedChinese],[r.TraditionalChinese,n.TraditionalChinese],[r.Mandarin,n.Mandarin],[r.Croatian,n.Croatian],[r.Czech,n.Czech],[r.Danish,n.Danish],[r.Devanagari,n.Hindi],[r.Dutch,n.Dutch],[r.Emoji,n.Emoji],[r.Filipino,n.Filipino],[r.Finnish,n.Finnish],[r.French,n.French],[r.Fula,n.Fula],[r.German,n.German],[r.Greek,n.Greek],[r.Gujarati,n.Gujarati],[r.Gurmukhi,n.Gurmukhi],[r.Hebrew,n.Hebrew],[r.Hindi,n.Hindi],[r.HongKongCh,n.HongKongCh],[r.Hungarian,n.Hungarian],[r.Indonesian,n.Indonesian],[r.IPA,n.IPA],[r.Italian,n.Italian],[r.Japanese,n.Japanese],[r.Kannada,n.Kannada],[r.Kazakh,n.Kazakh],[r.Khmer,n.Khmer],[r.Korean,n.Korean],[r.Lao,n.Lao],[r.Latvian,n.Latvian],[r.Macedonian,n.Macedonian],[r.Malay,n.Malay],[r.Malayalam,n.Malayalam],[r.Maltese,n.Maltese],[r.Myanmar,n.Myanmar],[r.NKo,n.NKo],[r.Norwegian,n.Norwegian],[r.Oriya,n.Oriya],[r.PanAfrican,n.PanAfrican],[r.Persian,n.Persian],[r.Polish,n.Polish],[r.Portuguese,n.Portuguese],[r.Romanian,n.Romanian],[r.Russian,n.Russian],[r.Serbian,n.Serbian],[r.Sinhalese,n.Sinhalese],[r.Slovak,n.Slovak],[r.Slovenian,n.Slovenian],[r.Somali,n.Somali],[r.Spanish,n.Spanish],[r.Swedish,n.Swedish],[r.Tachelhit,n.Tachelhit],[r.Tamil,n.Tamil],[r.Telugu,n.Telugu],[r.Thai,n.Thai],[r.Turkish,n.Turkish],[r.Ukrainian,n.Ukrainian],[r.Urdu,n.Urdu],[r.Vai,n.Vai],[r.Vietnamese,n.Vietnamese]]),e.LanguagePreviewString=function(e){var t,n,a=(w(t={},r.Arabic,"على غرار الكلمات والجمل، تتميز أشكال الأحرف بنبرة ولون وأسلوب."),w(t,r.Armenian,"Բել դղյակի ձախ ժամն օֆ ազգությանը ցպահանջ չճշտած վնաս էր և փառք"),w(t,r.Bengali,"লেটারফর্মগুলিতে টোন, টিম্বার, অক্ষর থাকে ঠিক শব্দ এবং বাক্যগুলির মতো৷"),w(t,r.Myanmar,"မြန်မာဘာသာ\tယ္ဝန္တော္၊က္ယ္ဝန္မ မ္ယက္စားနုိင္သည္။ ၎က္ရောင့္ ထိခုိက္မ္ဟု မရ္ဟိပာ။"),w(t,r.Devanagari,"शब्दों और वाक्यों की तरह ही अक्षराकृतियों के भी स्वर, ध्वनि और व्यक्तित्व होते हैं ।"),w(t,r.Hindi,"शब्दों और वाक्यों की तरह ही अक्षराकृतियों के भी स्वर, ध्वनि और व्यक्तित्व होते हैं ।"),w(t,r.SimplifiedChinese,"这句话后来演变成'饮水思源'这个成语,意为喝水的时候想一想流水的源头,比喻不忘本。"),w(t,r.TraditionalChinese,"這句話後來演變成「飲水思源」這個成語,意為喝水的時候想一想流水的源頭,比喻不忘本。"),w(t,r.Default,"The quick brown fox jumps over the lazy dog"),w(t,r.Emoji,"☺ ☹ ☔ ⚽ ♻ ⛈"),w(t,r.Gujarati,"શબ્દો તથા વાક્યોની જેમ જ, લેટરફૉર્મ્સના ટોન, સ્વર અને લાક્ષણિકતાઓ હોય છે."),w(t,r.Gurmukhi,"ਕਿਸੇ ਅੱਖਰ ਦੇ ਆਕਾਰ ਵਿੱਚ ਲਹਿਜਾ, ਲੈਅ ਅਤੇ ਗੁਣ ਹੁੰਦੇ ਹਨ ਜਿਵੇਂ ਕਿ ਸ਼ਬਦਾਂ ਅਤੇ ਵਾਕਾਂ ਵਿੱਚ ਹੁੰਦੇ ਹਨ।"),w(t,r.Hebrew,"עטלף אבק נס דרך מזגן שהתפוצץ כי חם"),w(t,r.Japanese,"見本さんぷるサンプル"),w(t,r.Kannada,"ಶಬ್ದ ಮತ್ತು ವಾಕ್ಯಗಳಂತೆಯೇ ಲೆಟರ್ಫಾರ್ಮ್ಗಳು ಕೂಡ ತಮ್ಮದೇ ಆದ ಟೋನ್, ಲಹರಿ ಮತ್ತು ವಿಶೇಷ ಗುಣಗಳನ್ನು ಹೊಂದಿರುತ್ತವೆ."),w(t,r.Khmer,"ខ្មែរ\tខ្ញុំអាចញុំកញ្ចក់បាន ដោយគ្មានបញ្ហារ"),w(t,r.Korean,"동해 물과 백두산이 마르고 닳도록 하느님이 보우하사 우리나라 만세."),w(t,r.Lao,"ລາວ\tຂອ້ຍກິນແກ້ວໄດ້ໂດຍທີ່ມັນບໍ່ໄດ້ເຮັດໃຫ້ຂອ້ຍເຈັບ."),w(t,r.Malayalam,"അജവും ആനയും ഐരാവതവും ഗരുഡനും കഠോര സ്വരം പൊഴിക്കെ ഹാരവും ഒഢ്യാണവും ഫാലത്തില് മഞ്ഞളും"),w(t,r.Oriya,"ଅ କ ଖ ଗ ଘ \0"),w(t,r.Sinhalese,"සිංහල\tමට වීදුරු කෑමට හැකියි. එයින් මට කිසි"),w(t,r.Tamil,"எழுத்து வடிவங்களுக்கு வார்த்தைகள் மற்றும் வாக்கியங்கள் போலவே தொனி, ஒலி பண்பு, தன்மை உண்டு."),w(t,r.Telugu,"లెటర్ఫారమ్లు పదాలు మరియు వాక్యాలు వలె టోన్, స్వరం, అక్షరాలను కలిగి ఉంటాయి."),w(t,r.Thai,"ลักษณะของตัวพิมพ์แต่ละตัวสามารถแสดงออกได้ถึงระดับเสียง"),t);return null!==(n=a[e])&&void 0!==n?n:a[r.Default]},e.LanguageTwoCharPreviewString=function(e){var t,n,a=(w(t={},r.Arabic,"اب"),w(t,r.Armenian,"Ագ"),w(t,r.Bengali,"কঅ"),w(t,r.Myanmar,"ဆွမ်"),w(t,r.Devanagari,"कअ"),w(t,r.Hindi,"कअ"),w(t,r.SimplifiedChinese,"简化"),w(t,r.TraditionalChinese,"繁體"),w(t,r.Default,"Ag"),w(t,r.Emoji,"☺"),w(t,r.Gujarati,"કઅ"),w(t,r.Gurmukhi,"ਕਅ"),w(t,r.Hebrew,"אק"),w(t,r.Japanese,"永あ"),w(t,r.Kannada,"ಕಅ"),w(t,r.Khmer,"ខ្មែរ"),w(t,r.Korean,"한글"),w(t,r.Malayalam,"കഅ"),w(t,r.Sinhalese,"එක"),w(t,r.Tamil,"கஅ"),w(t,r.Telugu,"కఅ"),w(t,r.Thai,"กะ"),t);return null!==(n=a[e])&&void 0!==n?n:a[r.Default]},function(e){e.CC_HOME_WEB="cchome",e.CC_DESKTOP="ccdesktop",e.CC_ASSETS="ccassets"}(a||(a={})),e.SlugIntroductionURL=function(e,t,r,n){var o=new Map([[a.CC_HOME_WEB,"d/27c6290a13?familySlug="],[a.CC_ASSETS,"d/12a4cc3ff2?familySlug="],[a.CC_DESKTOP,"d/96caf89a5a?familySlug="]]),i=r?s.t.FontsWeb.STAGE:s.t.FontsWeb.PROD;if(n)for(var l=0,c=Object.values(a);l<c.length;l++){var f=c[l];if(-1!==t.toLowerCase().indexOf(f)){var h=o.get(f);if(h)return(i=(i=i.concat(h)).concat(e)).concat("&locale=",u.p.getAppropriateRegion())}}return(i=i.concat("fonts/",e)).concat("?locale=",u.p.getAppropriateRegion())},e.ViewQueryIntroductionURL=function(e,t,r,n){var o=new Map([[a.CC_HOME_WEB,"d/62cbe6aedc?query="],[a.CC_ASSETS,"d/1a15f03a56?query="],[a.CC_DESKTOP,"d/b7cf401c42?query="]]),i=r?s.t.FontsWeb.STAGE:s.t.FontsWeb.PROD;if(n)for(var l=0,c=Object.values(a);l<c.length;l++){var f=c[l];if(-1!==t.toLowerCase().indexOf(f)){var h=o.get(f);if(h)return(i=(i=i.concat(h)).concat(e)).concat("&locale=",u.p.getAppropriateRegion())}}return(i=i.concat("search?query=",e)).concat("&locale=",u.p.getAppropriateRegion())},(c=e.PrimaryScriptGroups||(e.PrimaryScriptGroups={})).WESTERN="WESTERN",c.JAPANESE="JAPANESE",c.TRAD_CHINESE="TRAD_CHINESE",c.SIMPLIFIED_CHINESE="SIMPLIFIED_CHINESE",c.KOREAN="KOREAN",c.ARABIC="ARABIC",c.HEBREW="HEBREW",c.INDIC="INDIC",c.EMOJI="EMOJI",(l=e.InternalPrimaryScriptSubGroups||(e.InternalPrimaryScriptSubGroups={})).EMOJI_EMOJI="EMOJI_EMOJI",l.WESTERN_DEFAULT="WESTERN_DEFAULT",l.WESTERN_AMHARIC="WESTERN_AMHARIC",l.WESTERN_ARMENIAN="WESTERN_ARMENIAN",l.WESTERN_BELARUSIAN="WESTERN_BELARUSIAN",l.WESTERN_CATALAN="WESTERN_CATALAN",l.WESTERN_CHEROKEE="WESTERN_CHEROKEE",l.WESTERN_CROATIAN="WESTERN_CROATIAN",l.WESTERN_CZECH="WESTERN_CZECH",l.WESTERN_DANISH="WESTERN_DANISH",l.WESTERN_DUTCH="WESTERN_DUTCH",l.WESTERN_FILIPINO="WESTERN_FILIPINO",l.WESTERN_FINNISH="WESTERN_FINNISH",l.WESTERN_FRENCH="WESTERN_FRENCH",l.WESTERN_FULA="WESTERN_FULA",l.WESTERN_GERMAN="WESTERN_GERMAN",l.WESTERN_GREEK="WESTERN_GREEK",l.WESTERN_HUNGARIAN="WESTERN_HUNGARIAN",l.WESTERN_INDONESIAN="WESTERN_INDONESIAN",l.WESTERN_ITALIAN="WESTERN_ITALIAN",l.WESTERN_KAZAKH="WESTERN_KAZAKH",l.WESTERN_LATVIAN="WESTERN_LATVIAN",l.WESTERN_MACEDONIAN="WESTERN_MACEDONIAN",l.WESTERN_MALTESE="WESTERN_MALTESE",l.WESTERN_MANDARIN="WESTERN_MANDARIN",l.WESTERN_NKO="WESTERN_NKO",l.WESTERN_NORWEGIAN="WESTERN_NORWEGIAN",l.WESTERN_PANAFRICAN="WESTERN_PANAFRICAN",l.WESTERN_POLISH="WESTERN_POLISH",l.WESTERN_PORTUGUESE="WESTERN_PORTUGUESE",l.WESTERN_ROMANIAN="WESTERN_ROMANIAN",l.WESTERN_RUSSIAN="WESTERN_RUSSIAN",l.WESTERN_SERBIAN="WESTERN_SERBIAN",l.WESTERN_SLOVAK="WESTERN_SLOVAK",l.WESTERN_SLOVENIAN="WESTERN_SLOVENIAN",l.WESTERN_SOMALI="WESTERN_SOMALI",l.WESTERN_SPANISH="WESTERN_SPANISH",l.WESTERN_SWEDISH="WESTERN_SWEDISH",l.WESTERN_TACHELHIT="WESTERN_TACHELHIT",l.WESTERN_TURKISH="WESTERN_TURKISH",l.WESTERN_UKRAINIAN="WESTERN_UKRAINIAN",l.WESTERN_VAI="WESTERN_VAI",l.WESTERN_VIETNAMESE="WESTERN_VIETNAMESE",l.JAPANESE_JAPANESE="JAPANESE_JAPANESE",l.SIMPLIFIED_CHINESE_SIMPLIFIEDCHINESE="SIMPLIFIED_CHINESE_SIMPLIFIEDCHINESE",l.TRAD_CHINESE_HONGKONGCH="TRAD_CHINESE_HONGKONGCH",l.TRAD_CHINESE_TRADITIONALCHINESE="TRAD_CHINESE_TRADITIONALCHINESE",l.KOREAN_KOREAN="KOREAN_KOREAN",l.ARABIC_ARABIC="ARABIC_ARABIC",l.ARABIC_PERSIAN="ARABIC_PERSIAN",l.HEBREW_HEBREW="HEBREW_HEBREW",l.INDIC_BENGALI="INDIC_BENGALI",l.INDIC_DEVANAGARI="INDIC_DEVANAGARI",l.INDIC_GUJARATI="INDIC_GUJARATI",l.INDIC_GURMUKHI="INDIC_GURMUKHI",l.INDIC_HINDI="INDIC_HINDI",l.INDIC_KANNADA="INDIC_KANNADA",l.INDIC_KHMER="INDIC_KHMER",l.INDIC_LAO="INDIC_LAO",l.INDIC_MALAY="INDIC_MALAY",l.INDIC_MALAYALAM="INDIC_MALAYALAM",l.INDIC_MYANMAR="INDIC_MYANMAR",l.INDIC_SINHALESE="INDIC_SINHALESE",l.INDIC_TAMIL="INDIC_TAMIL",l.INDIC_TELUGU="INDIC_TELUGU",l.INDIC_THAI="INDIC_THAI",l.INDIC_URDU="INDIC_URDU",(o=e.FontFetchStrategy||(e.FontFetchStrategy={}))[o.ALL=0]="ALL",o[o.SYSTEM=1]="SYSTEM",o[o.ADOBE=2]="ADOBE";var S,T,k,A,N,O=b((function e(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.NONE,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"No Error",a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;_(this,e),this.errCode=t.NONE,this.errMsg="No Error",this.isFatal=!1,this.httpStatus=1,this.errCode=r,this.errMsg=n,this.errCode!==t.NONE&&"No Error"===this.errMsg&&(this.errMsg="Error occurred"),this.isFatal=a,this.httpStatus=o}));e.Error=O,(N=e.FontType||(e.FontType={})).DEFAULT="DEFAULT",N.SYSTEM="SYSTEM",N.LOCAL="LOCAL",N.ACTIVATED="ACTIVATED",N.BYOF="BYOF",N.DEMO="DEMO",N.APPLICATION="APPLICATION",(A=e.ApplicationFontsType||(e.ApplicationFontsType={})).VARIABLE="variable_fonts",A.PHOTOSHOP="ps_fonts",function(e){e.FULL="full",e.TRIAL="trial",e.ANONYMOUS="anonymous"}(S=e.Entitlement||(e.Entitlement={})),(k=e.FontUpdateOperationType||(e.FontUpdateOperationType={})).ADDED="ADDED",k.REMOVED="REMOVED",function(e){e[e.DEFAULT=0]="DEFAULT",e[e.SELECTIONS=1]="SELECTIONS",e[e.BYOF=2]="BYOF"}(T=e.FontUpdateNotificationType||(e.FontUpdateNotificationType={}));var I=function(){function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:T.DEFAULT;_(this,e),this._font=t,this._operationType=r,this._notificationType=n}return b(e,[{key:"font",get:function(){return this._font},set:function(e){this._font=e}},{key:"operationType",get:function(){return this._operationType},set:function(e){this._operationType=e}},{key:"notificationType",get:function(){return this._notificationType},set:function(e){this._notificationType=e}}]),e}();e.FontUpdateNotification=I;var L,x=function(){function e(){_(this,e),this._fasterEndPointToken="",this._token="",this._expiry=0,this._catalog="",this._genericdownloadUrl="",this._entitlement=S.TRIAL,this._mapOfCustomCatalogParams=new Map,this._localClockOutdated=!1}return b(e,[{key:"fasterEndPointToken",get:function(){return this._fasterEndPointToken},set:function(e){this._fasterEndPointToken=e}},{key:"genericdownloadUrl",get:function(){return this._genericdownloadUrl},set:function(e){this._genericdownloadUrl=e}},{key:"mapOfCustomCatalogParams",get:function(){return this._mapOfCustomCatalogParams},set:function(e){this._mapOfCustomCatalogParams=e}},{key:"token",get:function(){return this._token},set:function(e){this._token=e}},{key:"catalog",get:function(){return this._catalog},set:function(e){this._catalog=e}},{key:"expiry",get:function(){return this._expiry},set:function(e){this._expiry=e}},{key:"entitlement",get:function(){return this._entitlement},set:function(e){this._entitlement=e}},{key:"localClockOutdated",get:function(){return this._localClockOutdated},set:function(e){this._localClockOutdated=e}}]),e}();e.ObtainedTokenParams=x,function(e){e[e.USERID_CHANGED=0]="USERID_CHANGED",e[e.FONT_CHANGED=1]="FONT_CHANGED"}(L=e.TQEventType||(e.TQEventType={}));var C,F,P,R=function(){function e(t,r,n){_(this,e),this._appVersion="",this._userId="",this._accessToken="",this._ansAppIdentifier="",this._isStaging=!1,this._proxyUsername="",this._proxyPassword="",this._surfaceKey="",this._clientKey="",this._appId=t,this._userId=r,this._accessToken=n}return b(e,[{key:"appId",get:function(){return this._appId},set:function(e){this._appId=e}},{key:"appVersion",get:function(){return this._appVersion},set:function(e){this._appVersion=e}},{key:"userId",get:function(){return this._userId},set:function(e){this._userId=e,i.yZ.handleEvent(L.USERID_CHANGED)}},{key:"accessToken",get:function(){return this._accessToken},set:function(e){this._accessToken=e}},{key:"surfaceKey",get:function(){return this._surfaceKey},set:function(e){this._surfaceKey=e}},{key:"clientKey",get:function(){return this._clientKey},set:function(e){this._clientKey=e}},{key:"isStaging",get:function(){return this._isStaging},set:function(e){this._isStaging=e}},{key:"proxyUsername",get:function(){return this._proxyUsername},set:function(e){this._proxyUsername=e}},{key:"proxyPassword",get:function(){return this._proxyPassword},set:function(e){this._proxyPassword=e}},{key:"ansAppIdentifier",get:function(){return this._ansAppIdentifier},set:function(e){this._ansAppIdentifier=e}}]),e}();e.AuthParams=R,(P=e.OperationMode||(e.OperationMode={}))[P.DATA=0]="DATA",P[P.CHECK=1]="CHECK",P[P.FORCE_REFRESH=2]="FORCE_REFRESH",(F=e.FontUsageOperation||(e.FontUsageOperation={})).OPEN="open",F.APPLY="apply",F.COLLABORATION_USE="collaboration-use",F.PREVIEW="preview",(C=e.RecentsUpdatePreference||(e.RecentsUpdatePreference={}))[C.ONLY_APPLY=0]="ONLY_APPLY",C[C.ONLY_OPEN=1]="ONLY_OPEN",C[C.BOTH_OPEN_AND_APPLY=2]="BOTH_OPEN_AND_APPLY";var D=function(){function e(){_(this,e),this._downloadBytes=0,this._totalBytes=0}return b(e,[{key:"totalBytes",get:function(){return this._totalBytes},set:function(e){this._totalBytes=e}},{key:"downloadBytes",get:function(){return this._downloadBytes},set:function(e){this._downloadBytes=e}}]),e}();e.ProgressInfo=D}(o||(o={}));var S=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.FontType.DEFAULT,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";_(this,e),this._type=o.FontType.DEFAULT,this._subtype=void 0,this._defaultPostscriptName="",this._isActiveForUser=!1,this._fontBuffer=new Uint8Array(0),this._expiryTime=0,this._serverTimestamp=0,this._filePath="",this._fontName="",this._styleName="",this._cssStyleNames=[],this._colorTechnology=n.NONE,this._otherTechnologies=[],this._familyName="",this._sortIndex=0,this._script=o.Language.Default,this._supportedLanguages=new Set([o.Language.Default]),this._characterSet=new Set,this._localizedFamilyNames=new Map,this._localizedStyleNames=new Map,this._accessLevel=o.AccessLevel.READ_ONLY,this._isPremiumFont=!1,this._isBrowsable=!0,this._isVariableFont=!1,this._variableFamilyPrefix="",this._varAxisValues=new Map,this._postscriptName=r,this._generatedPostscriptName=r,this._fontId=a,this._type=t}return b(e,[{key:"clone",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=new e;return u.p.copyAttributes(t,this,r),r}},{key:"toJSON",value:function(){var t={};return u.p.copyAttributes(e._omittedKeys,this,t),JSON.stringify(t,e.replacer)}},{key:"cssStyleNames",get:function(){return this._cssStyleNames},set:function(e){this._cssStyleNames=e}},{key:"colorTechnology",get:function(){return this._colorTechnology},set:function(e){this._colorTechnology=e}},{key:"otherTechnologies",get:function(){return this._otherTechnologies},set:function(e){this._otherTechnologies=e}},{key:"varAxisValues",get:function(){return this._varAxisValues},set:function(e){this._varAxisValues=e}},{key:"variableFamilyPrefix",get:function(){return this._variableFamilyPrefix},set:function(e){this._variableFamilyPrefix=e}},{key:"isVariableFont",get:function(){return this._isVariableFont},set:function(e){this._isVariableFont=e}},{key:"supportedLanguages",get:function(){return this._supportedLanguages},set:function(e){this._supportedLanguages=e}},{key:"addSupportedLanguage",value:function(e){this._supportedLanguages.add(e)}},{key:"generatedPostscriptName",get:function(){return this._generatedPostscriptName},set:function(e){this._generatedPostscriptName=e}},{key:"defaultPostscriptName",get:function(){return this._isVariableFont&&""!==this._defaultPostscriptName?this._defaultPostscriptName:this._postscriptName},set:function(e){this._defaultPostscriptName=e}},{key:"isBrowsable",get:function(){return this._isBrowsable},set:function(e){this._isBrowsable=e}},{key:"characterSet",get:function(){return this._characterSet},set:function(e){this._characterSet=e}},{key:"sortIndex",get:function(){return this._sortIndex},set:function(e){this._sortIndex=e}},{key:"localizedStyleNames",get:function(){return 0===this._localizedStyleNames.size&&this._localizedStyleNames.set(u.p.getAppropriateRegion(),this._styleName),this._localizedStyleNames},set:function(e){this._localizedStyleNames=e}},{key:"localizedFamilyNames",get:function(){return 0===this._localizedFamilyNames.size&&this._localizedFamilyNames.set(u.p.getAppropriateRegion(),this._familyName),this._localizedFamilyNames},set:function(e){this._localizedFamilyNames=e}},{key:"accessLevel",get:function(){return this._accessLevel},set:function(e){this._accessLevel=e}},{key:"setPremiumFont",set:function(e){this._isPremiumFont=e}},{key:"isPremiumFont",get:function(){return this._isPremiumFont},set:function(e){this._isPremiumFont=e}},{key:"familyName",get:function(){return this._familyName},set:function(e){this._familyName=e}},{key:"styleName",get:function(){return this._styleName},set:function(e){this._styleName=e}},{key:"filePath",get:function(){return this._filePath},set:function(e){this._filePath=e}},{key:"type",get:function(){return this._type},set:function(e){this._type=e}},{key:"fontBuffer",get:function(){return this._fontBuffer},set:function(e){this._fontBuffer=e}},{key:"postscriptName",get:function(){return this._postscriptName},set:function(e){this._postscriptName=e}},{key:"script",get:function(){return this._script},set:function(e){this._script=e}},{key:"fontId",get:function(){return this._fontId},set:function(e){this._fontId=e}},{key:"isActiveForUser",get:function(){return this._isActiveForUser},set:function(e){this._isActiveForUser=e}},{key:"expiryTime",get:function(){return this._expiryTime},set:function(e){this._expiryTime=e}},{key:"serverTimestamp",get:function(){return this._serverTimestamp},set:function(e){this._serverTimestamp=e}},{key:"family",get:function(){return this._family},set:function(e){this._family=e}},{key:"fontName",get:function(){return this._fontName},set:function(e){this._fontName=e}},{key:"generateCustomOTVarInstance",value:function(e){if(this._fontBuffer.length){if(this.isVariableFont&&e.size){var t,r=m(i.yZ._schedulersList);try{for(r.s();!(t=r.n()).done;){var n,a=m(t.value.cachedFonts());try{for(a.s();!(n=a.n()).done;){var o=d(n.value,2)[1];if(o.isVariableFont&&o.variableFamilyPrefix===this.variableFamilyPrefix&&u.p.equalMaps(o.varAxisValues,e))return o.postscriptName}}catch(e){a.e(e)}finally{a.f()}}}catch(e){r.e(e)}finally{r.f()}return u.p.generateCustomOTVarName(this,e)}return this._postscriptName}}},{key:"isCurrentFontPreferredOver",value:function(e){var t=this,r=function(r){var n,a=m(r);try{for(a.s();!(n=a.n()).done;){var i=n.value;if(t._accessLevel===o.AccessLevel.READ_ONLY&&e._accessLevel===o.AccessLevel.READ_WRITE)return!1;if(t.isVariableFont&&e.isVariableFont&&t.styleName===e.styleName){if(t._varAxisValues.size>e.varAxisValues.size)return!0;if(t._varAxisValues.size<e.varAxisValues.size)return!1;if(t.generatedPostscriptName!==t.postscriptName)return!0;if(e.generatedPostscriptName!==e.postscriptName)return!1}if(t.type===i)return!0;if(e.type===i)return!1}}catch(e){a.e(e)}finally{a.f()}}([o.FontType.BYOF,o.FontType.APPLICATION,o.FontType.ACTIVATED,o.FontType.DEFAULT,o.FontType.LOCAL,o.FontType.SYSTEM]);return null==r||r}}],[{key:"replacer",value:function(e,t){return t instanceof Map?{dataType:"Map",value:Array.from(t.entries())}:t}},{key:"reviver",value:function(e,t){return"object"===p(t)&&null!==t&&"Map"===t.dataType?new Map(t.value):t}},{key:"fromJSON",value:function(t){var r=new e;try{var n=JSON.parse(t,e.reviver);u.p.copyAttributes(e._omittedKeys,n,r)}catch(e){}return r}}]),e}();S._omittedKeys=["_family","_fontBuffer","_characterSet"];var T,k,A=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";_(this,e),this._creatorInfo={foundryId:"",foundryName:"",familyName:void 0,fontCount:0},this._displayFont=new S,this._fontMap=new Map,this._styleNameMap=new Map,this._isPremium=!0,this._familyName=t,this._familySlug=r}return b(e,[{key:"familyName",get:function(){return this._familyName},set:function(e){this._familyName=e}},{key:"familySlug",get:function(){return this._familySlug},set:function(e){this._familySlug=e}},{key:"script",get:function(){return this._displayFont.script}},{key:"isPremium",get:function(){return this._isPremium}},{key:"displayFont",get:function(){return this._displayFont},set:function(e){this._displayFont=e}},{key:"creatorInfo",get:function(){return this._creatorInfo},set:function(e){this._creatorInfo=e}},{key:"addFont",value:function(e,t){var r=this._fontMap.get(e);!r&&t.isVariableFont&&this._fontMap.get(t.generatedPostscriptName)&&(r=this._fontMap.get(t.generatedPostscriptName)),!r&&t.isVariableFont&&this._styleNameMap.get(t.styleName)&&(r=this._styleNameMap.get(t.styleName)),r&&r.isCurrentFontPreferredOver(t)||(this._fontMap.get(t.generatedPostscriptName)?(this._fontMap.delete(t.generatedPostscriptName),this._styleNameMap.delete(t.styleName)):this._fontMap.get(t.postscriptName)?(this._fontMap.delete(t.postscriptName),this._styleNameMap.delete(t.styleName)):this._styleNameMap.get(t.styleName)&&(r=this._styleNameMap.get(t.styleName))&&(this._fontMap.delete(r.postscriptName),this._fontMap.delete(r.generatedPostscriptName),this._styleNameMap.delete(t.styleName)),this._fontMap.set(e,t),t.isVariableFont&&t.styleName===s.t.VARIABLE_FONT_CUSTOM_STYLE_NAME||this._styleNameMap.set(t.styleName,t),t.postscriptName!==this._displayFont.postscriptName&&t.styleName!==this._displayFont.styleName||(this._displayFont=t)),this._isPremium=this._isPremium&&t.isPremiumFont}},{key:"removeFont",value:function(e){var t=this._fontMap.get(e);t&&this._styleNameMap.delete(t.styleName),this._fontMap.delete(e)}},{key:"familyLinkUrl",get:function(){if((void 0===this._familyLinkUrl||null===this._familyLinkUrl)&&""!==this._familySlug){var e="",t=!1;try{var r=i.yZ._schedulersList.values().next().value.initParams;e=r.authParams.clientKey,t=r.introductionURLEnabled}catch(e){}this._familyLinkUrl=o.SlugIntroductionURL(this._familySlug,e,i.yZ.isStagingEnvironment(),t)}return this._familyLinkUrl},set:function(e){this._familyLinkUrl=e}},{key:"getEntries",value:function(){var e=this,t=[];this._fontMap.forEach((function(e){t.push(e)}));var r=this._displayFont.isVariableFont,n=function(e,t,r){var n=e.varAxisValues.get(r),a=t.varAxisValues.get(r);return n&&a&&n!==a?n-a:n&&!a?1:!n&&a?-1:void 0};return t.sort((function(t,a){if(r){if(t.fontId!==a.fontId)return-1!==t.defaultPostscriptName.toLowerCase().indexOf("italic")&&-1===a.defaultPostscriptName.toLowerCase().indexOf("italic")||-1!==t.defaultPostscriptName.toLowerCase().indexOf("oblique")&&-1===a.defaultPostscriptName.toLowerCase().indexOf("oblique")?1:-1===t.defaultPostscriptName.toLowerCase().indexOf("italic")&&-1!==a.defaultPostscriptName.toLowerCase().indexOf("italic")||-1===t.defaultPostscriptName.toLowerCase().indexOf("oblique")&&-1!==a.defaultPostscriptName.toLowerCase().indexOf("oblique")?-1:t.defaultPostscriptName.length!==a.defaultPostscriptName.length?t.defaultPostscriptName.length-a.defaultPostscriptName.length:String(t.defaultPostscriptName).localeCompare(a.defaultPostscriptName);for(var i=void 0,s=0,u=["wdth","wght","slnt","ital","opsz"];s<u.length;s++)if(i=n(t,a,u[s]))return i;var l,c=m(new Set([].concat(h(t.varAxisValues.keys()),h(a.varAxisValues.keys()))));try{for(c.s();!(l=c.n()).done;){var f=l.value;if(i=n(t,a,f))return i}}catch(e){c.e(e)}finally{c.f()}return String(t.styleName).localeCompare(a.styleName)}if(e._displayFont.type===o.FontType.SYSTEM){for(var p=void 0,d=0,y=["wdth","wght","slnt","ital","opsz"];d<y.length;d++)if(p=n(t,a,y[d]))return p;return String(t.styleName).localeCompare(a.styleName)}return t.sortIndex-a.sortIndex})),t}},{key:"getRawUnorderedMap",value:function(){return this._fontMap}}]),e}(),N=function(){function e(){_(this,e),this._familyMap=new Map}return b(e,[{key:"addFamily",value:function(e,t){this._familyMap.set(e,t)}},{key:"removeFamily",value:function(e){this._familyMap.delete(e)}},{key:"getFamilyFromName",value:function(e){return this._familyMap.get(e)}},{key:"getRawMap",value:function(){return this._familyMap}},{key:"setRawMap",value:function(e){this._familyMap=e}},{key:"addFonts",value:function(e){var t,r=[],n=m(e);try{for(n.s();!(t=n.n()).done;){var a=t.value;r.push(new o.FontUpdateNotification(a,o.FontUpdateOperationType.ADDED))}}catch(e){n.e(e)}finally{n.f()}this.handleUpdates(r)}},{key:"handleUpdates",value:function(e){var t,r=m(e);try{for(r.s();!(t=r.n()).done;){var n=t.value,a=n.font;if(""!==a.familyName){var s=this._familyMap.get(a.familyName);n.operationType===o.FontUpdateOperationType.ADDED?s?s.addFont(a.postscriptName,a):(s=new A(a.familyName),this.addFamily(a.familyName,s),s.addFont(a.postscriptName,a),s.displayFont=a):s&&(s.removeFont(a.postscriptName),s.displayFont.postscriptName===a.postscriptName&&s.getRawUnorderedMap().size?s.displayFont=s.getEntries()[0]:0===s.getRawUnorderedMap().size&&this._familyMap.delete(a.familyName))}}}catch(e){r.e(e)}finally{r.f()}var u,l=m(i.yZ._schedulersList);try{for(l.s();!(u=l.n()).done;){var c=u.value;c.initParams.fontsUpdateCallback&&i.yZ.updateCachedSelectionsAndByof(e,[c])}}catch(e){l.e(e)}finally{l.f()}}},{key:"getEntries",value:function(){var t,r=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.SortOrderPreference.DEFAULT,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.Entitlement.FULL,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,c=!1,f=m(i.yZ._schedulersList);try{for(f.s();!(t=f.n()).done;){var p=t.value;if(p.initParams.runtimeMode===o.RuntimeMode.ALL&&!p.initParams.additionalFontTechnologies.has(o.AdditionalFontTechnologies.VARIABLE)){c=!0;break}}}catch(e){f.e(e)}finally{f.f()}var y=[];l?y.push(l._scheduler):y.push.apply(y,h(i.yZ._schedulersList));for(var v=function(){var e=b[g];(c||e.initParams.excludedLanguages.length||e.initParams.additionalFontTechnologies.size)&&r._familyMap.forEach((function(t){e.initParams.excludedLanguages.length&&-1!==e.initParams.excludedLanguages.indexOf(t.getRawUnorderedMap().values().next().value.script)&&r._familyMap.delete(t.familyName),c&&t.displayFont.isVariableFont&&t.displayFont.type!==o.FontType.APPLICATION&&r._familyMap.delete(t.familyName),t.displayFont.type===o.FontType.SYSTEM&&!1===u.p.checkIfSystemFontApplicable(t.displayFont,e.initParams.additionalFontTechnologies)&&r._familyMap.delete(t.familyName)}))},g=0,b=y;g<b.length;g++)v();switch(n){case o.SortOrderPreference.LANGUAGE:var _=new Map,w=u.p.getAppropriateRegion();s&&(w=s);var E=u.p.mapLangToPrimaryScriptGroup(w);for(var S in o.InternalPrimaryScriptSubGroups)-1!==S.toString().indexOf(E)&&_.set(S,new e);for(var T in o.InternalPrimaryScriptSubGroups)!1===_.has(T)&&_.set(T,new e);var k,A=m(this._familyMap);try{for(A.s();!(k=A.n()).done;){var N=d(k.value,2),O=N[0],I=N[1],L=u.p.mapLangToInternalPrimaryScriptSubgroup(I.script),x=_.get(L);x&&x.addFamily(O,I)}}catch(e){A.e(e)}finally{A.f()}var C,F=m(_);try{for(F.s();!(C=F.n()).done;){var P=d(C.value,2)[1];P._familyMap=new Map(h(P._familyMap).sort((function(e,t){return String(e[0]).localeCompare(t[0])})))}}catch(e){F.e(e)}finally{F.f()}var R,D=new Map,U=m(_);try{for(U.s();!(R=U.n()).done;){var M,B=m(d(R.value,2)[1]._familyMap);try{for(B.s();!(M=B.n()).done;){var j=d(M.value,2),G=j[0],K=j[1];D.set(G,K)}}catch(e){B.e(e)}finally{B.f()}}}catch(e){U.e(e)}finally{U.f()}return D;case o.SortOrderPreference.DEFAULT:return new Map(h(this._familyMap).sort((function(e,t){return String(e[0]).localeCompare(t[0])})));case o.SortOrderPreference.ENTITLEMENT:return new Map(h(this._familyMap).sort((function(e,t){if(a===o.Entitlement.TRIAL){if(!1===e[1].isPremium&&!0===t[1].isPremium)return-1;if(!0===e[1].isPremium&&!1===t[1].isPremium)return 1}return String(e[0]).localeCompare(t[0])})));case o.SortOrderPreference.RECENTLY_UPDATED:var H=new Map;return this._familyMap.forEach((function(e){var t,r=0,n=m(e.getEntries());try{for(n.s();!(t=n.n()).done;){var a=t.value;a.serverTimestamp>r&&(r=a.serverTimestamp)}}catch(e){n.e(e)}finally{n.f()}H.set(e.familyName,r)})),new Map(h(this._familyMap).sort((function(e,t){var r=H.get(e[0]),n=H.get(t[0]);return r&&n?n-r:r?-1:n?1:String(e[0]).localeCompare(t[0])})))}}},{key:"merge",value:function(e){var t=this;e._familyMap.forEach((function(e,r){var n=t._familyMap.get(r);void 0!==n?(e.getEntries().forEach((function(e){var t=n.getRawUnorderedMap().get(e.postscriptName);(void 0===t||e.isCurrentFontPreferredOver(t))&&n.addFont(e.postscriptName,e)})),e.displayFont.type===o.FontType.DEFAULT&&n.displayFont.type===o.FontType.ACTIVATED&&(n.displayFont=e.displayFont)):t._familyMap.set(r,e)}))}}]),e}();!function(e){var t;(t=e.TaskType||(e.TaskType={}))[t.TOKEN_FETCH=0]="TOKEN_FETCH",t[t.TOKEN_FETCH_INTERNAL=1]="TOKEN_FETCH_INTERNAL",t[t.FONT_SEARCH=2]="FONT_SEARCH",t[t.FONT_DOWNLOAD=3]="FONT_DOWNLOAD",t[t.TAG_CATALOG_URL=4]="TAG_CATALOG_URL",t[t.USAGE_REPORT=5]="USAGE_REPORT",t[t.FILE_DOWNLOAD=6]="FILE_DOWNLOAD",t[t.FILE_UPLOAD=7]="FILE_UPLOAD",t[t.FONT_CATALOG_URL=8]="FONT_CATALOG_URL",t[t.ACTIVATED_FONTS_POLL=9]="ACTIVATED_FONTS_POLL",t[t.ACTIVATED_FONTS=10]="ACTIVATED_FONTS",t[t.ACTIVATED_FONTS_COUNT=11]="ACTIVATED_FONTS_COUNT",t[t.FETCH_FAMILY=12]="FETCH_FAMILY",t[t.SEARCH_FAMILY=13]="SEARCH_FAMILY",t[t.FETCH_LANGS=14]="FETCH_LANGS",t[t.CATALOG_DOWNLOAD=15]="CATALOG_DOWNLOAD",t[t.CUSTOM_CATALOG_URL_VARIABLE=16]="CUSTOM_CATALOG_URL_VARIABLE",t[t.CUSTOM_CATALOG_URL_PHOTOSHOP=17]="CUSTOM_CATALOG_URL_PHOTOSHOP",t[t.CUSTOM_CATALOG_DOWNLOAD=18]="CUSTOM_CATALOG_DOWNLOAD",t[t.BYOF_COUNT=19]="BYOF_COUNT",t[t.BYOF_LISTS=20]="BYOF_LISTS",t[t.BYOF_UPLOAD_URL=21]="BYOF_UPLOAD_URL",t[t.BYOF_BLOCKLIST_CHECK=22]="BYOF_BLOCKLIST_CHECK",t[t.BYOF_FONTS_POLL=23]="BYOF_FONTS_POLL",t[t.BYOF_ACCESS_LEVEL=24]="BYOF_ACCESS_LEVEL",t[t.BYOF_DELETE=25]="BYOF_DELETE",t[t.RECOMMENDATION_URL=26]="RECOMMENDATION_URL",t[t.RECOMMENDED_SLUGS=27]="RECOMMENDED_SLUGS",t[t.NEWEST_SLUGS=28]="NEWEST_SLUGS",t[t.TRENDING_SLUGS=29]="TRENDING_SLUGS",t[t.ANS_SHORT_POLL=30]="ANS_SHORT_POLL",t[t.COLLAB_AUTH_API=31]="COLLAB_AUTH_API",t[t.HEALTHCHECK_API=32]="HEALTHCHECK_API",t[t.UNICODE_RANGE_MATCH_API=33]="UNICODE_RANGE_MATCH_API";var r=function(){function e(t,r){_(this,e),this._tagId="",this._namespaceId="",this._tagName="",this._synonyms=new Set,this._displayFont=new S,this._aggregation=new N,this._executorDisplayFontInternal=void 0,this._executorAggregatorInternal=void 0,this._tagId=t,this._tagName=r}return b(e,[{key:"executorDisplayFontInternal",get:function(){return this._executorDisplayFontInternal},set:function(e){this._executorDisplayFontInternal=e}},{key:"executorAggregatorInternal",get:function(){return this._executorAggregatorInternal},set:function(e){this._executorAggregatorInternal=e}},{key:"tagId",get:function(){return this._tagId},set:function(e){this._tagId=e}},{key:"namespaceId",get:function(){return this._namespaceId},set:function(e){this._namespaceId=e}},{key:"tagName",get:function(){return this._tagName},set:function(e){this._tagName=e}},{key:"synonyms",get:function(){return this._synonyms},set:function(e){this._synonyms=e}},{key:"displayFont",get:function(){var e=this;return f(l().mark((function t(){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,void 0===e._executorDisplayFontInternal){t.next=6;break}return t.next=4,e._executorDisplayFontInternal();case 4:e._displayFont=t.sent,e._executorDisplayFontInternal=void 0;case 6:t.next=10;break;case 8:t.prev=8,t.t0=t.catch(0);case 10:return t.abrupt("return",e._displayFont);case 11:case"end":return t.stop()}}),t,null,[[0,8]])})))()}},{key:"aggregation",get:function(){var e=this;return f(l().mark((function t(){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,void 0===e._executorAggregatorInternal){t.next=6;break}return t.next=4,e._executorAggregatorInternal();case 4:e._aggregation=t.sent,e._executorAggregatorInternal=void 0;case 6:t.next=10;break;case 8:t.prev=8,t.t0=t.catch(0);case 10:return t.abrupt("return",e._aggregation);case 11:case"end":return t.stop()}}),t,null,[[0,8]])})))()}},{key:"setAggregation",value:function(e){this._aggregation=e}}]),e}();e.VariationTag=r}(o||(o={})),function(e){e[e.NONE=0]="NONE",e[e.TRACE=1]="TRACE",e[e.DEBUG=2]="DEBUG",e[e.INFO=3]="INFO",e[e.WARN=4]="WARN",e[e.ERROR=5]="ERROR"}(T||(T={})),function(e){e.GRANTED="granted",e.DENIED="denied",e.PROMPT="prompt"}(k||(k={}))},850291:(e,t,r)=>{"use strict";r.d(t,{x:()=>n});var n="2.8.2"},497806:(e,t,r)=>{"use strict";r.d(t,{e:()=>N});var n=r(660234),a=r(51939),o=r(609867),i=r(177579),s=r(372482),u=r(971604),l=r(206069);function c(e){return c="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},c(e)}function f(e){return function(e){if(Array.isArray(e))return g(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||v(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(){h=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,i=Object.create(o.prototype),s=new C(n||[]);return a(i,"_invoke",{value:O(e,r,s)}),i}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var d="suspendedStart",m="suspendedYield",y="executing",v="completed",g={};function b(){}function _(){}function w(){}var E={};l(E,i,(function(){return this}));var S=Object.getPrototypeOf,T=S&&S(S(F([])));T&&T!==r&&n.call(T,i)&&(E=T);var k=w.prototype=b.prototype=Object.create(E);function A(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function N(e,t){function r(a,o,i,s){var u=p(e[a],e,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==c(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,i,s)}),(function(e){r("throw",e,i,s)})):t.resolve(f).then((function(e){l.value=e,i(l)}),(function(e){return r("throw",e,i,s)}))}s(u.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function O(t,r,n){var a=d;return function(o,i){if(a===y)throw new Error("Generator is already running");if(a===v){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var s=n.delegate;if(s){var u=I(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===d)throw a=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=y;var l=p(t,r,n);if("normal"===l.type){if(a=n.done?v:m,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(a=v,n.method="throw",n.arg=l.arg)}}}function I(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,I(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=p(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function F(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(c(t)+" is not iterable")}return _.prototype=w,a(k,"constructor",{value:w,configurable:!0}),a(w,"constructor",{value:_,configurable:!0}),_.displayName=l(w,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,l(e,u,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},A(N.prototype),l(N.prototype,s,(function(){return this})),t.AsyncIterator=N,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new N(f(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},A(k),l(k,u,"Generator"),l(k,i,(function(){return this})),l(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=F,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(x),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return s.type="throw",s.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;x(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:F(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}function p(e,t,r,n,a,o,i){try{var s=e[o](i),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,a)}function d(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){p(o,n,a,i,s,"next",e)}function s(e){p(o,n,a,i,s,"throw",e)}i(void 0)}))}}function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,s=[],u=!0,l=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){l=!0,a=e}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw a}}return s}}(e,t)||v(e,t)||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.")}()}function y(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=v(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function v(e,t){if(e){if("string"==typeof e)return g(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)?g(e,t):void 0}}function g(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 b(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,(void 0,a=function(e,t){if("object"!==c(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===c(a)?a:String(a)),n)}var a}function _(e){var t={},r=!1;function n(t,n){return r=!0,n=new Promise((function(r){r(e[t](n))})),{done:!1,value:new T(n,1)}}return t["undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator"]=function(){return this},t.next=function(e){return r?(r=!1,e):n("next",e)},"function"==typeof e.throw&&(t.throw=function(e){if(r)throw r=!1,e;return n("throw",e)}),"function"==typeof e.return&&(t.return=function(e){return r?(r=!1,e):n("return",e)}),t}function w(e){return new T(e,0)}function E(e){return function(){return new S(e.apply(this,arguments))}}function S(e){var t,r;function n(t,r){try{var o=e[t](r),i=o.value,s=i instanceof T;Promise.resolve(s?i.v:i).then((function(r){if(s){var u="return"===t?"return":"next";if(!i.k||r.done)return n(u,r);r=e[u](r).value}a(o.done?"return":"normal",r)}),(function(e){n("throw",e)}))}catch(e){a("throw",e)}}function a(e,a){switch(e){case"return":t.resolve({value:a,done:!0});break;case"throw":t.reject(a);break;default:t.resolve({value:a,done:!1})}(t=t.next)?n(t.key,t.arg):r=null}this._invoke=function(e,a){return new Promise((function(o,i){var s={key:e,arg:a,resolve:o,reject:i,next:null};r?r=r.next=s:(t=r=s,n(e,a))}))},"function"!=typeof e.return&&(this.return=void 0)}function T(e,t){this.v=e,this.k=t}function k(e){var t,r,n,a=2;for("undefined"!=typeof Symbol&&(r=Symbol.asyncIterator,n=Symbol.iterator);a--;){if(r&&null!=(t=e[r]))return t.call(e);if(n&&null!=(t=e[n]))return new A(t.call(e));r="@@asyncIterator",n="@@iterator"}throw new TypeError("Object is not async iterable")}function A(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then((function(e){return{value:e,done:t}}))}return A=function(e){this.s=e,this.n=e.next},A.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var r=this.s.return;return void 0===r?Promise.resolve({value:e,done:!0}):t(r.apply(this.s,arguments))},throw:function(e){var r=this.s.return;return void 0===r?Promise.reject(e):t(r.apply(this.s,arguments))}},new A(e)}S.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},S.prototype.next=function(e){return this._invoke("next",e)},S.prototype.throw=function(e){return this._invoke("throw",e)},S.prototype.return=function(e){return this._invoke("return",e)};var N=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._retryCount=3,this._matchAndResolvePromises=function(e,t,r,n){var o,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:new a.l0.Error,s=y(n?Array.from(t).filter((function(t){return e.fontId===t[0].fontId})):Array.from(t).filter((function(t){return e.postscriptName===t[0].postscriptName||e.generatedPostscriptName===t[0].postscriptName})));try{var u=function(){var n=m(o.value,2),a=n[0],s=n[1];void 0!==r?r().then((function(t){s({error:t,font:e})})):s({error:i,font:e}),t.delete(a)};for(s.s();!(o=s.n()).done;)u()}catch(e){s.e(e)}finally{s.f()}},this._getCachedOrDownloadFoundFonts=function(){var e=d(h().mark((function e(t,n,o,i,s){var u,l,c,f,p,d,m;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r._scheduler.foundFontsHandler.populateFontBufferFromCache(t,!1);case 2:c=e.sent,f=""!==n,!0!==c?(p=null===(u=i.get(f?t.fontId:t.postscriptName))||void 0===u?void 0:u.unicodes,d=!0===(null===(l=i.get(f?t.fontId:t.postscriptName))||void 0===l?void 0:l.isExactSubset),m={root:{downloadCB:function(e,n){return r._matchAndResolvePromises(t,s,void 0,f,n),!0},fontsList:[t.fontId],fontsIds:[],isExactSubset:d,unicodesList:p||"",fontInfo:t},retryCount:r._retryCount},r._scheduler.scheduleTask(a.l0.TaskType.FONT_DOWNLOAD,m)):r._matchAndResolvePromises(t,s,void 0,f);case 5:case"end":return e.stop()}}),e)})));return function(t,r,n,a,o){return e.apply(this,arguments)}}(),this._scheduler=new i.yZ(t)}var t,r,c,p,v,g,S,T,A,N,O,I,L,x,C,F,P,R,D,U,M,B,j,G,K,H,V,W,Y,J,z,$;return t=e,r=[{key:"initToken",value:($=d(h().mark((function e(){var t,r=this;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t={retryCount:this._retryCount,root:[]},this._scheduler.startTimers(),e.next=4,this._scheduler.scheduleTask(a.l0.TaskType.TOKEN_FETCH,t);case 4:return e.next=6,this._scheduler.handleCacheOnInit();case 6:if(this._scheduler.initParams.runtimeMode!==a.l0.RuntimeMode.FOUND_FONTS&&!this._scheduler.initParams.advancedServiceSearch){e.next=13;break}if(!0!==l.p.isValidAccessToken(this._scheduler.initParams.authParams.accessToken)){e.next=11;break}return setTimeout((function(){r._fetchFreshCollection(a.l0.TaskType.ACTIVATED_FONTS_COUNT)}),2e4),e.next=11,this._fetchFreshCollection(a.l0.TaskType.BYOF_COUNT);case 11:return e.next=13,this._scheduler.fetchAndprocessCustomCatalog();case 13:case"end":return e.stop()}}),e,this)}))),function(){return $.apply(this,arguments)})},{key:"initTokenIfNeeded",value:(z=d(h().mark((function e(){var t;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((t=this.getStatusCode())!==a.l0.StatusCode.ERROR_OCCURED&&t!==a.l0.StatusCode.UNINITIALIZED){e.next=6;break}if(!l.p.isValidAccessToken(this._scheduler.initParams.authParams.accessToken)){e.next=6;break}return this._scheduler._nonBlockingTokenCallStatus=!0,e.next=6,this.initToken();case 6:case"end":return e.stop()}}),e,this)}))),function(){return z.apply(this,arguments)})},{key:"getStatusCode",value:function(){return this._scheduler.status}},{key:"notifySystemFonts",value:function(e,t){var r,n=y(e);try{for(n.s();!(r=n.n()).done;)t(r.value,new a.l0.Error)}catch(e){n.e(e)}finally{n.f()}}},{key:"notifyErrorSystemFonts",value:function(e,t){Promise.resolve().then((function(){var r,n=y(e);try{for(n.s();!(r=n.n()).done;){var o=r.value,i=new a.K1(a.l0.FontType.SYSTEM,"","");i.postscriptName=o,t(i,new a.l0.Error(a.l0.ErrorCode.FONT_NOT_FOUND,"Font not found in system"))}}catch(e){n.e(e)}finally{n.f()}}))}},{key:"checkFonts",value:(J=d(h().mark((function e(t){var r,n=arguments;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.length>1&&void 0!==n[1]?n[1]:[],e.t0=this._scheduler.foundFontsHandler,e.t1=t,e.t2=r,e.next=6,this.getUserEntitlement();case 6:return e.t3=e.sent,e.abrupt("return",e.t0.checkFonts.call(e.t0,e.t1,e.t2,e.t3));case 8:case"end":return e.stop()}}),e,this)}))),function(e){return J.apply(this,arguments)})},{key:"start",value:(Y=d(h().mark((function e(){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.initToken();case 2:case"end":return e.stop()}}),e,this)}))),function(){return Y.apply(this,arguments)})},{key:"cleanup",value:function(){this._scheduler.cleanup()}},{key:"updateLanguage",value:(W=d(h().mark((function e(t){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.X.setLanguage(t),e.next=3,this._scheduler.handleCacheOnInit();case 3:return e.abrupt("return",!0);case 4:case"end":return e.stop()}}),e,this)}))),function(e){return W.apply(this,arguments)})},{key:"getInitParams",value:function(){return this._scheduler.initParams}},{key:"updateFetchStrategy",value:function(e){this._scheduler.initParams.fontFetchStrategy=e}},{key:"updateAuthParams",value:(V=d(h().mark((function e(t,r){var o,i=arguments;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((o=i.length>2&&void 0!==i[2]&&i[2])||this._scheduler.initParams.authParams.accessToken!==r){e.next=4;break}if(this.getStatusCode()!==a.l0.StatusCode.DONE){e.next=4;break}return e.abrupt("return",!1);case 4:return o&&(n.X.cachedEntitlement=void 0),this._scheduler.initParams.authParams.userId=t,this._scheduler.initParams.authParams.accessToken=r,this._scheduler._cachedNotFoundNonAdobeFonts.clear(),e.next=10,this.initToken();case 10:return e.abrupt("return",!0);case 11:case"end":return e.stop()}}),e,this)}))),function(e,t){return V.apply(this,arguments)})},{key:"getStatus",value:function(){return this.getStatusCode()}},{key:"getUserEntitlement",value:(H=d(h().mark((function e(){var t;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._scheduler.fetchCachedEntitlement();case 2:if((t=e.sent)!==a.l0.Entitlement.FULL&&t!==a.l0.Entitlement.TRIAL&&t!==a.l0.Entitlement.ANONYMOUS){e.next=5;break}return e.abrupt("return",t);case 5:return e.next=7,this.initTokenIfNeeded();case 7:return e.next=9,this.getStatusCode();case 9:if(e.sent!==a.l0.StatusCode.ERROR_OCCURED){e.next=12;break}return e.abrupt("return",void 0);case 12:return e.abrupt("return",this._scheduler.obtainedTokenParams.entitlement);case 13:case"end":return e.stop()}}),e,this)}))),function(){return H.apply(this,arguments)})},{key:"findFont",value:(K=d(h().mark((function e(t,r){var n;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"string"==typeof r&&(r=r.split("").map((function(e){return e.charCodeAt(0)}))),r=Array.from(f(new Set(r))),n={root:{downloadCB:null,fontsList:[t.fontId],fontsIds:[],fontInfo:t,unicodesList:r},retryCount:this._retryCount},e.next=6,this._scheduler.foundFontsHandler.populateFontBufferFromCache(t,!1);case 6:if(!e.sent){e.next=9;break}return e.abrupt("return",new Promise((function(e,t){e(new a.l0.Error)})));case 9:return e.next=11,this._scheduler.scheduleTask(a.l0.TaskType.FONT_DOWNLOAD,n);case 11:return e.abrupt("return",e.sent);case 12:case"end":return e.stop()}}),e,this)}))),function(e,t){return K.apply(this,arguments)})},{key:"_postProcessCheckFonts",value:(G=d(h().mark((function e(t,r){var n,a,o,i,s,u,c,p,d=this;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=f(t.psNames.values()),a=f(t.fontIds.values()),o=n.filter((function(e){return""===e.font.fontId})),i=a.filter((function(e){return""===e.font.postscriptName})),s=n.filter((function(e){return""!==e.font.fontId})),u=a.filter((function(e){return""!==e.font.postscriptName})),c=0,p=h().mark((function e(){var t,n,a,o;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=u[c],!((n=f(r).filter((function(e){return e.fontId&&e.fontId===t.font.fontId}))).length&&n[0].postscriptName&&t.font.isVariableFont&&t.font.postscriptName!==n[0].postscriptName)){e.next=8;break}return e.next=5,d.checkFonts([n[0].postscriptName],[]);case 5:a=e.sent,!(o=a.psNames.get(n[0].postscriptName))||o.font.postscriptName!==n[0].postscriptName||o.font.fontId!==t.font.fontId&&l.p.getVariationIdFromTkId(o.font.fontId)!==l.p.getVariationIdFromTkId(t.font.fontId)||(u[c]=o,n[0].fontId&&o.font.fontId&&o.font.fontId!==n[0].fontId&&(o.font.fontId=n[0].fontId));case 8:case"end":return e.stop()}}),e)}));case 8:if(!(c<u.length)){e.next=13;break}return e.delegateYield(p(),"t0",10);case 10:c++,e.next=8;break;case 13:return e.abrupt("return",{notFoundPsNames:o,notFoundFontIds:i,psNameFoundArray:s,fontIdFoundArray:u});case 14:case"end":return e.stop()}}),e)}))),function(e,t){return G.apply(this,arguments)})},{key:"findFontsAsync",value:(j=d(h().mark((function e(t){var r,n,o,i,u,c,p,d,v,g,b,_,w,E,S,T,k,A,N,O,I,L,x,C,F,P,R,D,U,M,B,j,G,K,H,V,W,Y,J,z,$,q,X,Q,Z,ee,te,re,ne,ae,oe,ie,se,ue,le,ce,fe,he,pe,de,me,ye,ve,ge,be,_e,we,Ee,Se,Te,ke,Ae,Ne,Oe,Ie,Le,xe,Ce,Fe,Pe,Re,De,Ue,Me=arguments;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=Me.length>1&&void 0!==Me[1]?Me[1]:a.l0.OperationMode.DATA,o=this._scheduler.initParams.fontFetchStrategy,i=[],u=[],c="",p="",d=y(t);try{for(d.s();!(v=d.n()).done;)(g=v.value).fontId&&""!==g.fontId?u.push(g.fontId):g.postscriptName&&""!==g.postscriptName&&i.push(g.postscriptName),""===c&&g.fontAccessToken&&(c=g.fontAccessToken),""===p&&g.documentId&&(p=g.documentId)}catch(e){d.e(e)}finally{d.f()}b=new Map,_=new Map,w=y(t),e.prev=11,S=h().mark((function e(){var t;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=E.value,b.set(t,new Promise((function(e,r){_.set(t,e)})));case 2:case"end":return e.stop()}}),e)})),w.s();case 14:if((E=w.n()).done){e.next=18;break}return e.delegateYield(S(),"t0",16);case 16:e.next=14;break;case 18:e.next=23;break;case 20:e.prev=20,e.t1=e.catch(11),w.e(e.t1);case 23:return e.prev=23,w.f(),e.finish(23);case 26:if(this._scheduler.initParams.runtimeMode!==a.l0.RuntimeMode.FOUND_FONTS&&o!==a.l0.FontFetchStrategy.ALL&&o!==a.l0.FontFetchStrategy.SYSTEM){e.next=44;break}return e.next=29,l.p.findSystemFonts(i,!1,!1);case 29:T=e.sent,k=T.remainingFonts,A=T.foundSystemFonts,N=y(A);try{for(N.s();!(O=N.n()).done;)I=O.value,this._matchAndResolvePromises(I,_,void 0,!1)}catch(e){N.e(e)}finally{N.f()}if(0!==(i=k).length||0!==u.length){e.next=37;break}return e.abrupt("return",b);case 37:if(o!==a.l0.FontFetchStrategy.SYSTEM){e.next=44;break}L=new a.l0.Error(a.l0.ErrorCode.FONT_NOT_FOUND,"Font not found in system"),x=y(u);try{for(x.s();!(C=x.n()).done;)F=C.value,P=new a.K1(a.l0.FontType.SYSTEM,"",F),this._matchAndResolvePromises(P,_,void 0,!0,L)}catch(e){x.e(e)}finally{x.f()}R=y(i);try{for(R.s();!(D=R.n()).done;)U=D.value,M=new a.K1(a.l0.FontType.SYSTEM,U,""),this._matchAndResolvePromises(M,_,void 0,!1,L)}catch(e){R.e(e)}finally{R.f()}return e.abrupt("return",b);case 44:return!0!==this._scheduler._nonBlockingTokenCallStatus&&(this.initTokenIfNeeded(),this._scheduler._nonBlockingTokenCallStatus=!0),i=i.filter((function(e){return""!==e})),u=u.filter((function(e){return""!==e})),e.next=49,this.checkFonts(i,u);case 49:return B=e.sent,e.next=52,this._postProcessCheckFonts(B,t);case 52:if(j=e.sent,G=j.notFoundPsNames,K=j.notFoundFontIds,H=j.psNameFoundArray,V=j.fontIdFoundArray,!G.length&&!K.length){e.next=166;break}W=new Map,Y=y(V);try{for(Y.s();!(J=Y.n()).done;)z=J.value,($=l.p.getVariationIdFromTkId(z.font.fontId))&&W.set($,z.font)}catch(e){Y.e(e)}finally{Y.f()}q=new a.l0.Error(a.l0.ErrorCode.FONT_NOT_FOUND,"Font not found"),X=new Set,Q=y(G),e.prev=64,Q.s();case 66:if((Z=Q.n()).done){e.next=92;break}if(ee=Z.value,!s.t.fontInfoMap.has(ee.font.postscriptName)){e.next=89;break}te=y(t),e.prev=70,te.s();case 72:if((re=te.n()).done){e.next=79;break}if(!(ne=re.value).postscriptName||ne.postscriptName!==ee.font.postscriptName){e.next=77;break}return X.add(ne),e.abrupt("break",79);case 77:e.next=72;break;case 79:e.next=84;break;case 81:e.prev=81,e.t2=e.catch(70),te.e(e.t2);case 84:return e.prev=84,te.f(),e.finish(84);case 87:e.next=90;break;case 89:this._matchAndResolvePromises(ee.font,_,void 0,!1,ee.error.errCode?ee.error:q);case 90:e.next=66;break;case 92:e.next=97;break;case 94:e.prev=94,e.t3=e.catch(64),Q.e(e.t3);case 97:return e.prev=97,Q.f(),e.finish(97);case 100:ae=y(K),e.prev=101,ae.s();case 103:if((oe=ae.n()).done){e.next=152;break}if(ie=oe.value,!(se=l.p.getVariationIdFromTkId(ie.font.fontId))||!W.has(se)){e.next=112;break}(ue=null===(n=W.get(se))||void 0===n?void 0:n.clone()).fontId=ie.font.fontId,V.push({font:ue,error:new a.l0.Error}),e.next=150;break;case 112:le=!1,ce=y(s.t.fontInfoMap.values()),e.prev=114,ce.s();case 116:if((fe=ce.n()).done){e.next=141;break}if(fe.value!==se){e.next=139;break}le=!0,he=y(t),e.prev=121,he.s();case 123:if((pe=he.n()).done){e.next=130;break}if(!(de=pe.value).fontId||de.fontId!==ie.font.fontId){e.next=128;break}return X.add(de),e.abrupt("break",130);case 128:e.next=123;break;case 130:e.next=135;break;case 132:e.prev=132,e.t4=e.catch(121),he.e(e.t4);case 135:return e.prev=135,he.f(),e.finish(135);case 138:return e.abrupt("break",141);case 139:e.next=116;break;case 141:e.next=146;break;case 143:e.prev=143,e.t5=e.catch(114),ce.e(e.t5);case 146:return e.prev=146,ce.f(),e.finish(146);case 149:le||this._matchAndResolvePromises(ie.font,_,void 0,!0,ie.error.errCode?ie.error:q);case 150:e.next=103;break;case 152:e.next=157;break;case 154:e.prev=154,e.t6=e.catch(101),ae.e(e.t6);case 157:return e.prev=157,ae.f(),e.finish(157);case 160:if(!X.size){e.next=166;break}return e.next=163,this.findFontsUsingCollabAuthAPI(X,r,c,p);case 163:me=e.sent,ye=y(me.entries());try{for(ye.s();!(ve=ye.n()).done;)ge=m(ve.value,2),be=ge[0],_e=ge[1],b.set(be,_e)}catch(e){ye.e(e)}finally{ye.f()}case 166:if(we=new a.l0.Error,r!==a.l0.OperationMode.CHECK){e.next=173;break}Ee=y(H);try{for(Ee.s();!(Se=Ee.n()).done;)Te=Se.value,this._matchAndResolvePromises(Te.font,_,void 0,!1,Te.error.errCode?Te.error:we)}catch(e){Ee.e(e)}finally{Ee.f()}ke=y(V);try{for(ke.s();!(Ae=ke.n()).done;)Ne=Ae.value,this._matchAndResolvePromises(Ne.font,_,void 0,!0,Ne.error.errCode?Ne.error:we)}catch(e){ke.e(e)}finally{ke.f()}return e.abrupt("return",b);case 173:t.forEach((function(e){e.unicodes&&"string"==typeof e.unicodes&&(e.unicodes=e.unicodes.split("").map((function(e){return e.charCodeAt(0)})),e.unicodes=Array.from(f(new Set(e.unicodes))))})),Oe=new Map,Ie=y(t);try{for(Ie.s();!(Le=Ie.n()).done;)(xe=Le.value).fontId&&""!==xe.fontId?Oe.set(xe.fontId,{unicodes:xe.unicodes,isExactSubset:!0===xe.exactSubset}):xe.postscriptName&&""!==xe.postscriptName&&Oe.set(xe.postscriptName,{unicodes:xe.unicodes,isExactSubset:!0===xe.exactSubset})}catch(e){Ie.e(e)}finally{Ie.f()}Ce=y(H);try{for(Ce.s();!(Fe=Ce.n()).done;)Pe=Fe.value,this._getCachedOrDownloadFoundFonts(Pe.font,"",Pe.font.postscriptName,Oe,_)}catch(e){Ce.e(e)}finally{Ce.f()}Re=y(V);try{for(Re.s();!(De=Re.n()).done;)Ue=De.value,this._getCachedOrDownloadFoundFonts(Ue.font,Ue.font.fontId,Ue.font.postscriptName,Oe,_)}catch(e){Re.e(e)}finally{Re.f()}return e.abrupt("return",b);case 182:case"end":return e.stop()}}),e,this,[[11,20,23,26],[64,94,97,100],[70,81,84,87],[101,154,157,160],[114,143,146,149],[121,132,135,138]])}))),function(e){return j.apply(this,arguments)})},{key:"findFontsUsingCollabAuthAPI",value:(B=d(h().mark((function e(t){var r,n,i,s,u,l,c,p,m,v,g,b,_,w,E,S,T,k,A,N,O,I,L,x,C,F,P,R,D,U,M,B,j,G,K,H,V,W,Y,J,z,$,q,X,Q,Z=this,ee=arguments;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=ee.length>1&&void 0!==ee[1]?ee[1]:a.l0.OperationMode.DATA,n=ee.length>2?ee[2]:void 0,i=ee.length>3?ee[3]:void 0,s=[],u=[],l=[],c=new Map,p=new Map,m=y(t),e.prev=9,g=h().mark((function e(){var t;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=v.value,c.set(t,new Promise((function(e,r){p.set(t,e)})));case 2:case"end":return e.stop()}}),e)})),m.s();case 12:if((v=m.n()).done){e.next=16;break}return e.delegateYield(g(),"t0",14);case 14:e.next=12;break;case 16:e.next=21;break;case 18:e.prev=18,e.t1=e.catch(9),m.e(e.t1);case 21:return e.prev=21,m.f(),e.finish(21);case 24:b=y(t);try{for(b.s();!(_=b.n()).done;)(w=_.value).fontId&&""!==w.fontId?"TkD-"===w.fontId.substring(0,4)?u.push(w.fontId):l.push(w.fontId):w.postscriptName&&""!==w.postscriptName&&s.push(w.postscriptName),""===n&&w.fontAccessToken&&(n=w.fontAccessToken),""===i&&w.documentId&&(i=w.documentId)}catch(e){b.e(e)}finally{b.f()}return!0!==this._scheduler._nonBlockingTokenCallStatus&&(this.initTokenIfNeeded(),this._scheduler._nonBlockingTokenCallStatus=!0),s=s.filter((function(e){return""!==e})),u=u.filter((function(e){return""!==e})),e.next=31,this.checkFonts(s,u);case 31:E=e.sent,S=0,T=l;case 33:if(!(S<T.length)){e.next=42;break}return k=T[S],e.next=37,this._scheduler.getFontFromLocalInfo("",k);case 37:(A=e.sent)&&""!==A.postscriptName?E.fontIds.set(k,{font:A,error:new a.l0.Error}):E.fontIds.set(k,{font:new a.K1(a.l0.FontType.BYOF,"",k),error:new a.l0.Error});case 39:S++,e.next=33;break;case 42:return e.next=44,this._postProcessCheckFonts(E,t);case 44:if(N=e.sent,O=N.notFoundPsNames,I=N.notFoundFontIds,L=N.psNameFoundArray,x=N.fontIdFoundArray,C=new Map,F=new o.L(this._scheduler),!O.length&&!I.length){e.next=57;break}return P=new Map(O.map((function(e){return[e.font.postscriptName,e.font]}))),R=new Map(I.map((function(e){return[e.font.fontId,e.font]}))),e.next=56,F.getFontMetadataUsingCollabAuthAPI(P,R,n,i);case 56:C=e.sent;case 57:t.forEach((function(e){e.unicodes&&"string"==typeof e.unicodes&&(e.unicodes=e.unicodes.split("").map((function(e){return e.charCodeAt(0)})),e.unicodes=Array.from(f(new Set(e.unicodes))))})),D=new Map,U=y(t);try{for(U.s();!(M=U.n()).done;)(B=M.value).fontId&&""!==B.fontId?D.set(B.fontId,{unicodes:B.unicodes,isExactSubset:!0===B.exactSubset}):B.postscriptName&&""!==B.postscriptName&&D.set(B.postscriptName,{unicodes:B.unicodes,isExactSubset:!0===B.exactSubset})}catch(e){U.e(e)}finally{U.f()}j=function(){var e=d(h().mark((function e(t,n,o){var i,s,u;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=new a.l0.Error(a.l0.ErrorCode.FONT_NOT_FOUND),s=void 0,""!==n?s=C.get(n):""!==t&&(s=C.get(t)),u=new a.K1(o,t,n),!s){e.next=15;break}if(u=s.fontInfo,i=s.error,r!==a.l0.OperationMode.DATA||i.errCode!==a.l0.ErrorCode.NONE){e.next=15;break}return e.next=10,Z._scheduler.foundFontsHandler.populateFontBufferFromCache(u,!1);case 10:if(!0===e.sent){e.next=15;break}return e.next=14,F.downloadCollabFont(s);case 14:i=e.sent;case 15:return Z._matchAndResolvePromises(u,p,void 0,""!==n,i),e.abrupt("return",!0);case 17:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),G=y(L);try{for(G.s();!(K=G.n()).done;)H=K.value,this._getCachedOrDownloadFoundFonts(H.font,"",H.font.postscriptName,D,p)}catch(e){G.e(e)}finally{G.f()}V=y(x);try{for(V.s();!(W=V.n()).done;)Y=W.value,this._getCachedOrDownloadFoundFonts(Y.font,Y.font.fontId,"",D,p)}catch(e){V.e(e)}finally{V.f()}J=y(O.values());try{for(J.s();!(z=J.n()).done;)$=z.value,j($.font.postscriptName,"",a.l0.FontType.DEFAULT)}catch(e){J.e(e)}finally{J.f()}q=y(I.values());try{for(q.s();!(X=q.n()).done;)"TkD-"===(Q=X.value).font.fontId.substring(0,4)?j("",Q.font.fontId,a.l0.FontType.DEFAULT):j("",Q.font.fontId,a.l0.FontType.BYOF)}catch(e){q.e(e)}finally{q.f()}return e.abrupt("return",c);case 71:case"end":return e.stop()}}),e,this,[[9,18,21,24]])}))),function(e){return B.apply(this,arguments)})},{key:"findFonts",value:(M=d(h().mark((function e(t){var r,n,o,i,s,u,c,p,m,v,g,b=this,_=arguments;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=_.length>1&&void 0!==_[1]?_[1]:a.l0.OperationMode.CHECK,o=_.length>3?_[3]:void 0,"string"==typeof(n=_.length>2?_[2]:void 0)&&(n=n.split("").map((function(e){return e.charCodeAt(0)}))),n=Array.from(f(new Set(n))),t=t.filter((function(e){return null!=e})),(i=this._scheduler.initParams.fontFetchStrategy)!==a.l0.FontFetchStrategy.ALL&&i!==a.l0.FontFetchStrategy.SYSTEM){e.next=22;break}return e.next=10,l.p.findSystemFonts(t,!1,!1);case 10:if(s=e.sent,u=s.remainingFonts,c=s.foundSystemFonts,t=u,this.notifySystemFonts(c,o),0!==t.length){e.next=17;break}return e.abrupt("return");case 17:if(i!==a.l0.FontFetchStrategy.SYSTEM||!t.length){e.next=20;break}return this.notifyErrorSystemFonts(t,o),e.abrupt("return");case 20:e.next=22;break;case 22:return!0!==this._scheduler._nonBlockingTokenCallStatus&&(this.initTokenIfNeeded(),this._scheduler._nonBlockingTokenCallStatus=!0),t=t.filter((function(e){return""!==e})),e.t0=Array,e.next=27,this.checkFonts(t);case 27:e.t1=e.sent.psNames.values(),p=(p=e.t0.from.call(e.t0,e.t1).map((function(e){return e.font}))).filter((function(e){return""!==e.fontId||(t.filter((function(t){return e.postscriptName===t})).forEach((function(){d(h().mark((function t(){return h().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o(e,new a.l0.Error(a.l0.ErrorCode.FONT_NOT_FOUND,"Font not found"));case 2:case"end":return t.stop()}}),t)})))().catch((function(){}))})),!1)})),m=y(p),e.prev=31,g=h().mark((function e(){var i,s,u,l,c;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=v.value,s=t.filter((function(e){return i.postscriptName===e})),u=y(s),e.prev=3,u.s();case 5:if((l=u.n()).done){e.next=22;break}if(l.value,r!==a.l0.OperationMode.CHECK){e.next=12;break}o(i,new a.l0.Error(a.l0.ErrorCode.NONE,"")),e.next=20;break;case 12:return e.next=14,b._scheduler.foundFontsHandler.populateFontBufferFromCache(i,!1);case 14:if(!e.sent){e.next=18;break}return o(i,new a.l0.Error(a.l0.ErrorCode.NONE,"")),e.abrupt("continue",20);case 18:c={root:{downloadCB:o,fontsList:[i.fontId],fontsIds:[],unicodesList:n,fontInfo:i},retryCount:b._retryCount},b._scheduler.scheduleTask(a.l0.TaskType.FONT_DOWNLOAD,c);case 20:e.next=5;break;case 22:e.next=27;break;case 24:e.prev=24,e.t0=e.catch(3),u.e(e.t0);case 27:return e.prev=27,u.f(),e.finish(27);case 30:case"end":return e.stop()}}),e,null,[[3,24,27,30]])})),m.s();case 34:if((v=m.n()).done){e.next=38;break}return e.delegateYield(g(),"t2",36);case 36:e.next=34;break;case 38:e.next=43;break;case 40:e.prev=40,e.t3=e.catch(31),m.e(e.t3);case 43:return e.prev=43,m.f(),e.finish(43);case 46:case"end":return e.stop()}}),e,this,[[31,40,43,46]])}))),function(e){return M.apply(this,arguments)})},{key:"_fetchFreshCollection",value:function(e){var t={aggregation:new a.mP,error:new a.l0.Error};return this._scheduler.performByofValidationScope()?this._scheduler.scheduleTask(e,{root:{page:1,perPage:100,isRequested:!0},retryCount:2}):t}},{key:"getFontCollection",value:(U=d(h().mark((function e(t){var r,o,i,s,u,c,f,p,d,m,v,g,b,_,w,E,S=this,T=arguments;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=T.length>1&&void 0!==T[1]?T[1]:[],o=T.length>2&&void 0!==T[2]?T[2]:[],i=new a.mP,s={root:{page:1,perPage:100,isRequested:!0},retryCount:2},u={aggregation:new a.mP,error:new a.l0.Error},!0!==this._scheduler._nonBlockingTokenCallStatus&&(this.initTokenIfNeeded(),this._scheduler._nonBlockingTokenCallStatus=!0),c=performance.now(),t!==a.l0.FontType.SYSTEM){e.next=12;break}return e.next=10,this._scheduler.foundFontsHandler.getSystemFontsCollection([]);case 10:return f=e.sent,e.abrupt("return",{aggregation:f.aggregation,error:f.error});case 12:if(t!==a.l0.FontType.ACTIVATED){e.next=25;break}if(!1!==l.p.isValidAccessToken(this._scheduler.initParams.authParams.accessToken)){e.next=15;break}return e.abrupt("return",u);case 15:return p=function(){return S._scheduler.scheduleTask(a.l0.TaskType.ACTIVATED_FONTS_COUNT,s)},e.next=18,this._scheduler.getCachedActivated("",i,!0);case 18:if(!e.sent){e.next=24;break}return s.root.isRequested=!1,setTimeout(p,5e3),n.X.Logger.logMessage(a.ds.DEBUG,"cached ACTIVATED done. Took ".concat(Math.round(performance.now()-c)," milliseconds.")),e.abrupt("return",{aggregation:i,error:new a.l0.Error});case 24:return e.abrupt("return",p());case 25:if(t!==a.l0.FontType.BYOF){e.next=38;break}if(!1!==this._scheduler.performByofValidationScope()){e.next=28;break}return e.abrupt("return",u);case 28:return d=function(){return S._scheduler.scheduleTask(a.l0.TaskType.BYOF_COUNT,s)},e.next=31,this._scheduler.getCachedByof("",i,!0);case 31:if(!e.sent){e.next=37;break}return s.root.isRequested=!1,setTimeout(d,5e3),n.X.Logger.logMessage(a.ds.DEBUG,"cached BYOF done. Took ".concat(Math.round(performance.now()-c)," milliseconds.")),e.abrupt("return",{aggregation:i,error:new a.l0.Error});case 37:return e.abrupt("return",d());case 38:if(t!==a.l0.FontType.DEMO){e.next=40;break}return e.abrupt("return",this._scheduler.getDemoFontsCollection());case 40:if(t!==a.l0.FontType.APPLICATION){e.next=42;break}return e.abrupt("return",this._scheduler.fetchAndprocessCustomCatalog());case 42:if(t!==a.l0.FontType.DEFAULT){e.next=46;break}return m=this._scheduler,v=function(e){return new Promise((function(t,r){m.getFamiliesFromSlugsOnceAvailable((function(e){return n.X.Logger.logMessage(a.ds.DEBUG,"cached DEFAULT done. Took ".concat(Math.round(performance.now()-c)," milliseconds.")),t(e),!0}),e,!0)}))},e.abrupt("return",v(r));case 46:if(t!==a.l0.FontType.LOCAL){e.next=54;break}g=[],b=y(o);try{for(b.s();!(_=b.n()).done;)".DS_Store"!==(w=_.value).name&&(w.name.endsWith(".ttf")||w.name.endsWith(".otf"))&&g.push(w)}catch(e){b.e(e)}finally{b.f()}return e.next=52,this._scheduler.foundFontsHandler.getLocalFontsCollection(g);case 52:return E=e.sent,e.abrupt("return",{aggregation:E.aggregation,error:E.error});case 54:return e.abrupt("return",Promise.resolve(u));case 55:case"end":return e.stop()}}),e,this)}))),function(e){return U.apply(this,arguments)})},{key:"searchFonts",value:function(e){var t=this;return E(h().mark((function r(){var n,o,i,s,l,c,p,d,m,v,g,b,_,E,S,T,A,N,O,I,L,x,C,F,P,R,D;return h().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e=e.trim().replace(/ +/g," "),n=new a.mP,""===e){r.next=110;break}return o=e.split(" "),i=new u.Z,r.next=7,w(i.getDBAggregationsFromFuzzySearch(t._scheduler,n,o));case 7:if(t._scheduler.initParams.fontFetchStrategy!==a.l0.FontFetchStrategy.ALL&&t._scheduler.initParams.fontFetchStrategy!==a.l0.FontFetchStrategy.SYSTEM){r.next=12;break}return r.next=10,w(i.getSystemAggregationFiltered(t._scheduler,o));case 10:s=r.sent,n.merge(s);case 12:l=0,c=i.getCachedAggregations(t._scheduler,o),p=y(c.getRawMap());try{for(p.s();!(d=p.n()).done;)m=d.value,l+=m[1].getRawUnorderedMap().size}catch(e){p.e(e)}finally{p.f()}if(0!==n.getEntries().size||!(t._scheduler.initParams.advancedServiceSearch||l<5)){r.next=92;break}return r.next=19,w(i.getSlugsFromServiceSearch(t._scheduler,o));case 19:if(0!==(v=r.sent).querySet.size||!t._scheduler.initParams.advancedServiceSearch||!v.error.errCode){r.next=22;break}throw v.error;case 22:return r.next=24,w(i.getDBAggregationsFromSlugs(t._scheduler,[],v.querySet));case 24:if(0!==(n=r.sent).getEntries().size){r.next=92;break}g=y(c.getRawMap()),r.prev=27,g.s();case 29:if((b=g.n()).done){r.next=35;break}return _=b.value,r.next=33,_[1];case 33:r.next=29;break;case 35:r.next=40;break;case 37:r.prev=37,r.t0=r.catch(27),g.e(r.t0);case 40:return r.prev=40,g.f(),r.finish(40);case 43:return r.next=45,w(t._scheduler.serverQueryGetSlugPromises(new Set(f(v.querySet.keys()))));case 45:E=r.sent,S=!1,T=!1,r.prev=48,N=k(E);case 50:return r.next=52,w(N.next());case 52:if(!(S=!(O=r.sent).done)){r.next=75;break}I=O.value,L=i.getAggregationPerSlugData(I,t._scheduler),x=y(L.getRawMap()),r.prev=56,x.s();case 58:if((C=x.n()).done){r.next=64;break}return F=C.value,r.next=62,F[1];case 62:r.next=58;break;case 64:r.next=69;break;case 66:r.prev=66,r.t1=r.catch(56),x.e(r.t1);case 69:return r.prev=69,x.f(),r.finish(69);case 72:S=!1,r.next=50;break;case 75:r.next=81;break;case 77:r.prev=77,r.t2=r.catch(48),T=!0,A=r.t2;case 81:if(r.prev=81,r.prev=82,!S||null==N.return){r.next=86;break}return r.next=86,w(N.return());case 86:if(r.prev=86,!T){r.next=89;break}throw A;case 89:return r.finish(86);case 90:return r.finish(81);case 91:return r.abrupt("return");case 92:n.merge(c),P=y(n.getRawMap()),r.prev=94,P.s();case 96:if((R=P.n()).done){r.next=102;break}return D=R.value,r.next=100,D[1];case 100:r.next=96;break;case 102:r.next=107;break;case 104:r.prev=104,r.t3=r.catch(94),P.e(r.t3);case 107:return r.prev=107,P.f(),r.finish(107);case 110:case"end":return r.stop()}}),r,null,[[27,37,40,43],[48,77,81,91],[56,66,69,72],[82,,86,90],[94,104,107,110]])})))()}},{key:"getSearchQueryUrlForAdobeFonts",value:function(e){return this._scheduler.getSearchQueryUrlForAdobeFonts(e)}},{key:"reportUseFonts",value:(D=d(h().mark((function e(t,r,n){var o,i,s,u,c,p,d,m,v,g,b,_,w,E,S,T,k,A,N,O,I,L,x,C,F,P,R,D,U=arguments;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s=!(U.length>3&&void 0!==U[3])||U[3],u=U.length>4&&void 0!==U[4]?U[4]:a.l0.InstallState.CC,c=U.length>5&&void 0!==U[5]&&U[5],t=t.filter((function(e){return null!==e&&(""!==e.fontId||""!==e.postscriptName)})),p=[],d=[],m=[],v=y(t),e.prev=8,v.s();case 10:if((g=v.n()).done){e.next=33;break}if(!(b=g.value).fontId||""===b.fontId){e.next=30;break}if("TkD-"!==b.fontId.substring(0,4)){e.next=17;break}d.push(b.fontId),e.next=28;break;case 17:return e.next=19,this._scheduler.getFontFromLocalInfo("",b.fontId);case 19:if(!(_=e.sent)){e.next=28;break}if(!_.isVariableFont||!b.postscriptName||_.postscriptName===b.postscriptName){e.next=27;break}return e.next=24,this.checkFonts([b.postscriptName],[]);case 24:w=e.sent,!(E=w.psNames.get(b.postscriptName))||E.font.postscriptName!==b.postscriptName||E.font.fontId!==b.fontId&&l.p.getVariationIdFromTkId(E.font.fontId)!==l.p.getVariationIdFromTkId(b.fontId)||(_=E.font);case 27:m.push(_);case 28:e.next=31;break;case 30:b.postscriptName&&""!==b.postscriptName&&p.push(b.postscriptName);case 31:e.next=10;break;case 33:e.next=38;break;case 35:e.prev=35,e.t0=e.catch(8),v.e(e.t0);case 38:return e.prev=38,v.f(),e.finish(38);case 41:if((S=this._scheduler.initParams.fontFetchStrategy)!==a.l0.FontFetchStrategy.ALL&&S!==a.l0.FontFetchStrategy.SYSTEM){e.next=52;break}return e.next=45,l.p.findSystemFonts(p,!1,!1);case 45:k=e.sent,A=k.remainingFonts,N=k.foundSystemFonts,p=A,(T=m).push.apply(T,f(N)),e.next=52;break;case 52:return O=[],p=p.filter((function(e){return""!==e})),d=d.filter((function(e){return""!==e})),e.next=57,this.checkFonts(p,d);case 57:return I=e.sent,e.next=60,this._postProcessCheckFonts(I,t);case 60:L=e.sent,x=L.psNameFoundArray,C=L.fontIdFoundArray,(o=m).push.apply(o,f(x.map((function(e){return e.font})))),C=C.filter((function(e){return""!==e.font.postscriptName})),(i=m).push.apply(i,f(C.map((function(e){return e.font})))),e.t1=this._scheduler.initParams.recentsUpdatePreference,e.next=e.t1===a.l0.RecentsUpdatePreference.ONLY_APPLY?69:e.t1===a.l0.RecentsUpdatePreference.BOTH_OPEN_AND_APPLY?71:e.t1===a.l0.RecentsUpdatePreference.ONLY_OPEN?73:75;break;case 69:return n!==a.l0.FontUsageOperation.APPLY&&n!==a.l0.FontUsageOperation.PREVIEW||this._scheduler.updateRecentsListAndBroadcastMessage(m),e.abrupt("break",75);case 71:return this._scheduler.updateRecentsListAndBroadcastMessage(m),e.abrupt("break",75);case 73:return n!==a.l0.FontUsageOperation.OPEN&&n!==a.l0.FontUsageOperation.COLLABORATION_USE||this._scheduler.updateRecentsListAndBroadcastMessage(m),e.abrupt("break",75);case 75:m=m.filter((function(e){return""!==e.fontId&&e.type!==a.l0.FontType.BYOF})),F=y(m);try{for(F.s();!(P=F.n()).done;)(R=P.value)&&""!==R.fontId&&R.type!==a.l0.FontType.BYOF&&R.type!==a.l0.FontType.APPLICATION&&O.push(R.fontId)}catch(e){F.e(e)}finally{F.f()}O.length&&(D={root:{documentId:r,fontsList:O,operation:n,autoActivate:s,installState:u,readonly:c},retryCount:this._retryCount},this._scheduler.scheduleTask(a.l0.TaskType.USAGE_REPORT,D));case 79:case"end":return e.stop()}}),e,this,[[8,35,38,41]])}))),function(e,t,r){return D.apply(this,arguments)})},{key:"getSupportedLanguages",value:(R=d(h().mark((function e(){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._scheduler.getLangNames();case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)}))),function(){return R.apply(this,arguments)})},{key:"getFontsByLanguage",value:(P=d(h().mark((function e(t){var r,n,a;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=this._scheduler,n=function(e){return new Promise((function(t,n){r.getFontsByLanguageOnceAvailable((function(e){return t(e),!0}),e)}))},e.next=4,n(t);case 4:return a=e.sent,e.abrupt("return",a);case 6:case"end":return e.stop()}}),e,this)}))),function(e){return P.apply(this,arguments)})},{key:"getMoreFonts",value:(F=d(h().mark((function e(t){var r,n;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=function(e){return new Promise((function(e,t){e([])}))},e.next=3,r();case 3:return n=e.sent,e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)}))),function(e){return F.apply(this,arguments)})},{key:"getVariationTags",value:(C=d(h().mark((function e(){var t,r,n,a,o=arguments;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=(t=o.length>0&&void 0!==o[0]?o[0]:"").trim().replace(/ +/g," "),r=""===t?[]:t.split(" "),n=this._scheduler,a=function(){return new Promise((function(e,t){n.getTagCatalogsOnceAvailable((function(t,r){return e({tags:t,error:r}),!0}),!1,r)}))},e.next=7,a();case 7:return e.abrupt("return",e.sent);case 8:case"end":return e.stop()}}),e,this)}))),function(){return C.apply(this,arguments)})},{key:"getVariationTagsV2",value:(x=d(h().mark((function e(){var t,r,n,a,o=arguments;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=(t=o.length>0&&void 0!==o[0]?o[0]:"").trim().replace(/ +/g," "),r=""===t?[]:t.split(" "),n=this._scheduler,a=function(){return new Promise((function(e,t){n.getTagCatalogsOnceAvailable((function(t,r){return e({tags:t,error:r}),!0}),!0,r)}))},e.next=7,a();case 7:return e.abrupt("return",e.sent);case 8:case"end":return e.stop()}}),e,this)}))),function(){return x.apply(this,arguments)})},{key:"getAggregationFromTagId",value:(L=d(h().mark((function e(t){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._scheduler.getAggregationFromTagId(t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)}))),function(e){return L.apply(this,arguments)})},{key:"getAggregationFromTagIdV2",value:function(e){var t=this;return E(h().mark((function r(){return h().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.delegateYield(_(k(t._scheduler.getAggregationFromTagIdV2(e))),"t0",1);case 1:case"end":return r.stop()}}),r)})))()}},{key:"toggleSelectionsPolling",value:(I=d(h().mark((function e(t){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._scheduler.togglePollTimers(t);case 2:case"end":return e.stop()}}),e,this)}))),function(e){return I.apply(this,arguments)})},{key:"getFamilyFromFontIdentifier",value:(O=d(h().mark((function e(t){var r,n;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=this._scheduler,n=function(e){return new Promise((function(t,n){r.getFamilyOnceAvailable((function(e){return t(e),!0}),e)}))},e.next=4,n(t);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e,this)}))),function(e){return O.apply(this,arguments)})},{key:"prevalidateByofFont",value:(N=d(h().mark((function e(t){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._scheduler.prevalidateByofFont(t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)}))),function(e){return N.apply(this,arguments)})},{key:"uploadByofFont",value:(A=d(h().mark((function e(t){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._scheduler.uploadByofFont(t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)}))),function(e){return A.apply(this,arguments)})},{key:"generateCustomOTVarInstance",value:(T=d(h().mark((function e(t,r){var n,o,i,s=this;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=function(e){return new Promise((function(e){s.findFonts([t],a.l0.OperationMode.DATA,[],(function(t,r){return e(t),!0}))}))},e.next=3,n();case 3:return""!==(o=e.sent).fontId&&(o.varAxisValues=new Map(f(r)),(i=o.generateCustomOTVarInstance(r))&&(o.fontName="".concat(o.variableFamilyPrefix," Custom"),o.postscriptName=i)),e.abrupt("return",o);case 6:case"end":return e.stop()}}),e)}))),function(e,t){return T.apply(this,arguments)})},{key:"hasUserAccessForByofUpload",value:(S=d(h().mark((function e(){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._scheduler.hasUserAccessForByofUpload();case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)}))),function(){return S.apply(this,arguments)})},{key:"deleteByofAuth",value:(g=d(h().mark((function e(t){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._scheduler.deleteByofAuth([t]);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)}))),function(e){return g.apply(this,arguments)})},{key:"preFetchAdobeFontsMetadata",value:(v=d(h().mark((function e(t){var r,n,o,i,s,u,l,c,f,p,d,m,v,g,b,_,w,E,S,T,k,A,N,O,I,L,x,C,F,P;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=[],n=[],o=y(t);try{for(o.s();!(i=o.n()).done;)(s=i.value).fontId&&""!==s.fontId?n.push(s.fontId):s.postscriptName&&""!==s.postscriptName&&r.push(s.postscriptName)}catch(e){o.e(e)}finally{o.f()}u=new Map,l=new Map,c=y(t),e.prev=7,p=h().mark((function e(){var t;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=f.value,u.set(t,new Promise((function(e,r){l.set(t,e)})));case 2:case"end":return e.stop()}}),e)})),c.s();case 10:if((f=c.n()).done){e.next=14;break}return e.delegateYield(p(),"t0",12);case 12:e.next=10;break;case 14:e.next=19;break;case 16:e.prev=16,e.t1=e.catch(7),c.e(e.t1);case 19:return e.prev=19,c.f(),e.finish(19);case 22:return r=r.filter((function(e){return""!==e})),n=n.filter((function(e){return""!==e})),e.next=26,this._scheduler.foundFontsHandler.checkFonts(r,n,a.l0.Entitlement.ANONYMOUS,!0);case 26:return d=e.sent,e.next=29,this._postProcessCheckFonts(d,t);case 29:if(m=e.sent,v=m.notFoundPsNames,g=m.notFoundFontIds,b=m.psNameFoundArray,_=m.fontIdFoundArray,v.length||g.length){w=new a.l0.Error(a.l0.ErrorCode.FONT_NOT_FOUND,"Font not found"),E=y(v);try{for(E.s();!(S=E.n()).done;)T=S.value,this._matchAndResolvePromises(T.font,l,void 0,!1,T.error.errCode?T.error:w)}catch(e){E.e(e)}finally{E.f()}k=y(g);try{for(k.s();!(A=k.n()).done;)N=A.value,this._matchAndResolvePromises(N.font,l,void 0,!0,N.error.errCode?N.error:w)}catch(e){k.e(e)}finally{k.f()}}O=new a.l0.Error,I=y(b);try{for(I.s();!(L=I.n()).done;)x=L.value,this._matchAndResolvePromises(x.font,l,void 0,!1,x.error.errCode?x.error:O)}catch(e){I.e(e)}finally{I.f()}C=y(_);try{for(C.s();!(F=C.n()).done;)P=F.value,this._matchAndResolvePromises(P.font,l,void 0,!0,P.error.errCode?P.error:O)}catch(e){C.e(e)}finally{C.f()}return e.abrupt("return",u);case 41:case"end":return e.stop()}}),e,this,[[7,16,19,22]])}))),function(e){return v.apply(this,arguments)})},{key:"healthCheck",value:(p=d(h().mark((function e(){var t;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t={retryCount:1,root:[]},e.next=3,this._scheduler.scheduleTask(a.l0.TaskType.HEALTHCHECK_API,t);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)}))),function(){return p.apply(this,arguments)})},{key:"localFontsPermissionCheck",value:(c=d(h().mark((function e(){var t,r,n=arguments;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]&&n[0],r=n.length>1&&void 0!==n[1]?n[1]:void 0,e.next=4,l.p.localFontsPermissionCheck(t,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)}))),function(){return c.apply(this,arguments)})},{key:"unicodeRangeMatch",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return E(h().mark((function a(){var o,i;return h().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return o=new u.Z,"string"==typeof e&&(e=e.split("").map((function(e){return e.charCodeAt(0)})),e=Array.from(f(new Set(e)))),i=l.p.convertToUnicodeString(e),a.delegateYield(_(k(o.searchUsingUnicodeRanges(t._scheduler,i,r,n))),"t0",4);case 4:case"end":return a.stop()}}),a)})))()}}],r&&b(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}()},206069:(e,t,r)=>{"use strict";r.d(t,{V:()=>n,p:()=>g});var n,a=r(413097),o=r(372482),i=r(811604),s=r(660234),u=r(51939);function l(e){return l="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},l(e)}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,s=[],u=!0,l=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){l=!0,a=e}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw a}}return s}}(e,t)||h(e,t)||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.")}()}function f(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=h(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function h(e,t){if(e){if("string"==typeof e)return p(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)?p(e,t):void 0}}function p(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 d(){d=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,i=Object.create(o.prototype),s=new C(n||[]);return a(i,"_invoke",{value:O(e,r,s)}),i}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var p="suspendedStart",m="suspendedYield",y="executing",v="completed",g={};function b(){}function _(){}function w(){}var E={};c(E,i,(function(){return this}));var S=Object.getPrototypeOf,T=S&&S(S(F([])));T&&T!==r&&n.call(T,i)&&(E=T);var k=w.prototype=b.prototype=Object.create(E);function A(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function N(e,t){function r(a,o,i,s){var u=h(e[a],e,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==l(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,i,s)}),(function(e){r("throw",e,i,s)})):t.resolve(f).then((function(e){c.value=e,i(c)}),(function(e){return r("throw",e,i,s)}))}s(u.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function O(t,r,n){var a=p;return function(o,i){if(a===y)throw new Error("Generator is already running");if(a===v){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var s=n.delegate;if(s){var u=I(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=y;var l=h(t,r,n);if("normal"===l.type){if(a=n.done?v:m,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(a=v,n.method="throw",n.arg=l.arg)}}}function I(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,I(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function F(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(l(t)+" is not iterable")}return _.prototype=w,a(k,"constructor",{value:w,configurable:!0}),a(w,"constructor",{value:_,configurable:!0}),_.displayName=c(w,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,c(e,u,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},A(N.prototype),c(N.prototype,s,(function(){return this})),t.AsyncIterator=N,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new N(f(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},A(k),c(k,u,"Generator"),c(k,i,(function(){return this})),c(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=F,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(x),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return s.type="throw",s.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;x(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:F(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}function m(e,t,r,n,a,o,i){try{var s=e[o](i),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,a)}function y(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){m(o,n,a,i,s,"next",e)}function s(e){m(o,n,a,i,s,"throw",e)}i(void 0)}))}}function v(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,(void 0,a=function(e,t){if("object"!==l(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===l(a)?a:String(a)),n)}var a}!function(e){e.SHA1="SHA-1",e.SHA256="SHA-256",e.SHA384="SHA-384",e.SHA512="SHA-512"}(n||(n={}));var g=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,n,m,g,b,_,w,E,S;return t=e,null,r=[{key:"reversePartArray",value:function(e,t,r){var n=e.slice(0,t),a=e.slice(t,r).reverse(),o=e.slice(r),i=new Uint8Array(n.length+a.length+o.length);return i.set(n),i.set(a,n.length),i.set(o,a.length),i}},{key:"checkIfValidFontStream",value:(S=y(d().mark((function e(t){var r,n,a,o;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=!1,n="",!(t instanceof File)){e.next=9;break}return e.next=5,t.arrayBuffer();case 5:o=e.sent.slice(0,4),a=new Uint8Array(o),e.next=10;break;case 9:a=t;case 10:return a.length>=4&&("OTTO"!==(n=String.fromCharCode.apply(null,a.subarray(0,4)))&&"true"!==n&&n!==String.fromCharCode(0,1,0,0)||(r=!0)),e.abrupt("return",r);case 12:case"end":return e.stop()}}),e)}))),function(e){return S.apply(this,arguments)})},{key:"getSystemFonts",value:(E=y(d().mark((function t(r,n){var a,o,l,m,y,v,g,b,_,w,E,S,T,k,A=arguments;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=A.length>2&&void 0!==A[2]?A[2]:[],l=new u.mP,m=new Map,y=[],v=performance.now(),g=function(e){return"undefined"==typeof window||void 0===window?{aggregation:l,fontsJSON:y,error:new u.l0.Error(u.l0.ErrorCode.SYSTEM_FONTS_API_NOT_AVAILABLE_FOR_WORKER_THREAD)}:window&&void 0===window.queryLocalFonts?{aggregation:l,fontsJSON:y,error:new u.l0.Error(u.l0.ErrorCode.SYSTEM_FONTS_API_NOT_AVAILABLE)}:e&&"SecurityError"===e.name?{aggregation:l,fontsJSON:y,error:new u.l0.Error(u.l0.ErrorCode.SYSTEM_FONTS_SECURITY_ERROR)}:{aggregation:l,fontsJSON:y,error:new u.l0.Error(u.l0.ErrorCode.SYSTEM_FONTS_UNKNOWN)}},t.prev=7,m.size,b=[],0!==e._fontDataMap.size){t.next=16;break}return t.next=13,window.queryLocalFonts();case 13:b=t.sent,t.next=17;break;case 16:N=e._fontDataMap.values(),b=function(e){if(Array.isArray(e))return p(e)}(N)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(N)||h(N)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();case 17:_=f(b),t.prev=18,E=d().mark((function t(){var c,h,p,m,v,g,b,_,E,S,T,k,A,N;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(c=w.value,t.prev=1,e._fontDataMap.set(c.postscriptName,c),h=void 0,p=void 0,!r.has(c.postscriptName)){t.next=9;break}p=r.get(c.postscriptName),t.next=20;break;case 9:if(!1!==n){t.next=20;break}return t.next=12,c.blob();case 12:return m=t.sent,t.t0=Uint8Array,t.next=16,m.arrayBuffer();case 16:t.t1=t.sent,h=new t.t0(t.t1),(v=new i.w(h)).font&&""!==(p=v.getTQFont()).postscriptName&&(!v.isCOLR()&&v.isOTSVG()?p.colorTechnology=u.D2.OT_SVG:v.isCOLR()?p.colorTechnology=u.D2.COLR:v.isSBIX()?p.colorTechnology=u.D2.SBIX:v.isTTC()&&p.otherTechnologies.push(u.nl.TTC),p.addSupportedLanguage(p.script),p.defaultPostscriptName=c.postscriptName,p.fontBuffer=h,p.isVariableFont&&(g=e._instanceOrderingMap.get(p.postscriptName),b=e._fvarOrderingMap.get(p.postscriptName),void 0===g&&(g=v.getFVarInstances(),e._instanceOrderingMap.set(p.postscriptName,g),b=v.getFVarOrdering(),e._fvarOrderingMap.set(p.postscriptName,b)),void 0!==g&&void 0!==b&&(_=0,null===(o=g.get(c.style))||void 0===o||o.forEach((function(e){null==b||b.forEach((function(t,r){t===_&&(null==p||p.varAxisValues.set(r,e))})),_+=1})))));case 20:if(!p){t.next=46;break}if("LastResort"!==p.postscriptName){t.next=23;break}return t.abrupt("return",0);case 23:if(p.type=u.l0.FontType.SYSTEM,E=!0,!a.length){t.next=44;break}S=f(a),t.prev=27,S.s();case 29:if((T=S.n()).done){t.next=36;break}if(k=T.value,-1!==p.fontName.toLowerCase().indexOf(k.toLowerCase())){t.next=34;break}return E=!1,t.abrupt("break",36);case 34:t.next=29;break;case 36:t.next=41;break;case 38:t.prev=38,t.t2=t.catch(27),S.e(t.t2);case 41:return t.prev=41,S.f(),t.finish(41);case 44:if(!1!==E){t.next=46;break}return t.abrupt("return",0);case 46:if(!1!==n||!p||""===p.postscriptName){t.next=63;break}if(0!==a.length||!p.isVariableFont||0!==p.fontBuffer.length){t.next=58;break}if(void 0!==h){t.next=57;break}return t.next=51,c.blob();case 51:return A=t.sent,t.t3=Uint8Array,t.next=55,A.arrayBuffer();case 55:t.t4=t.sent,h=new t.t3(t.t4);case 57:p.fontBuffer=h;case 58:p.isVariableFont&&(p.postscriptName=c.postscriptName,p.fontName=c.fullName,p.familyName=c.family,p.styleName=c.style),null==(N=l.getFamilyFromName(p.familyName))&&(N=new u.FX(p.familyName),l.addFamily(p.familyName,N)),N.addFont(p.postscriptName,p),y.push(p.toJSON());case 63:t.next=68;break;case 65:t.prev=65,t.t5=t.catch(1);try{s.X.Logger.logMessage(u.ds.DEBUG,"An unknown error encountered for fontData = ".concat(c.postscriptName)),console.log(t.t5)}finally{}case 68:case"end":return t.stop()}}),t,null,[[1,65],[27,38,41,44]])})),_.s();case 21:if((w=_.n()).done){t.next=28;break}return t.delegateYield(E(),"t0",23);case 23:if(0!==t.t0){t.next=26;break}return t.abrupt("continue",26);case 26:t.next=21;break;case 28:t.next=33;break;case 30:t.prev=30,t.t1=t.catch(18),_.e(t.t1);case 33:return t.prev=33,_.f(),t.finish(33);case 36:if(!1!==n){t.next=54;break}e._systemFamilyMap.clear(),S=f(l.getRawMap()),t.prev=39,k=d().mark((function t(){var r,n,a,o;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=c(T.value,2),n=r[0],a=r[1],o=[],a.getEntries().forEach((function(e){return o.push(e.defaultPostscriptName)})),o.length&&e._systemFamilyMap.set(n,o);case 4:case"end":return t.stop()}}),t)})),S.s();case 42:if((T=S.n()).done){t.next=46;break}return t.delegateYield(k(),"t2",44);case 44:t.next=42;break;case 46:t.next=51;break;case 48:t.prev=48,t.t3=t.catch(39),S.e(t.t3);case 51:return t.prev=51,S.f(),t.finish(51);case 54:t.next=61;break;case 56:return t.prev=56,t.t4=t.catch(7),console.trace(t.t4),s.X.Logger.logMessage(u.ds.DEBUG,"An unknown error encountered for name = ".concat(t.t4.name," and message = ").concat(t.t4.message)),t.abrupt("return",g(t.t4));case 61:return s.X.Logger.logMessage(u.ds.DEBUG,"Time taken for system fonts parsing is ".concat(Math.round(performance.now()-v)," milliseconds")),l.getRawMap().size&&(l=e.setDisplayFontForEachFamilyIfNeeded(l)),t.abrupt("return",{aggregation:l,fontsJSON:y,error:new u.l0.Error});case 64:case"end":return t.stop()}var N}),t,null,[[7,56],[18,30,33,36],[39,48,51,54]])}))),function(e,t){return E.apply(this,arguments)})},{key:"findSystemFonts",value:(w=y(d().mark((function t(r,n,a){var o,l,c,h,p,m,y,v,g,b,_,w,E;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve();case 2:if(o=new Map,l=performance.now(),t.prev=4,"undefined"!=typeof window){t.next=7;break}return t.abrupt("return",{remainingFonts:r,foundSystemFonts:[]});case 7:if(window&&void 0!==window.queryLocalFonts){t.next=9;break}return t.abrupt("return",{remainingFonts:r,foundSystemFonts:[]});case 9:if(0!==e._fontDataMap.size||!1!==a){t.next=11;break}return t.abrupt("return",{remainingFonts:r,foundSystemFonts:[]});case 11:if(c=[],0!==e._fontDataMap.size){t.next=16;break}return t.next=15,window.queryLocalFonts({postscriptNames:r});case 15:c=t.sent;case 16:h=f(r);try{for(h.s();!(p=h.n()).done;)m=p.value,e._fontDataMap.get(m)&&c.push(e._fontDataMap.get(m))}catch(e){h.e(e)}finally{h.f()}y=f(c),t.prev=19,y.s();case 21:if((v=y.n()).done){t.next=41;break}return g=v.value,t.prev=23,t.next=26,g.blob();case 26:return b=t.sent,t.t0=Uint8Array,t.next=30,b.arrayBuffer();case 30:t.t1=t.sent,_=new t.t0(t.t1),(w=new i.w(_)).font&&(""!==(E=w.getTQFont()).postscriptName&&(E.type=u.l0.FontType.SYSTEM,E.script=w.computeFontScript(E.postscriptName),E.addSupportedLanguage(E.script),E.fontBuffer=_,E.defaultPostscriptName=g.postscriptName),s.X.Logger.logMessage(u.ds.DEBUG,E),o.set(E.postscriptName,E)),t.next=39;break;case 36:t.prev=36,t.t2=t.catch(23);try{s.X.Logger.logMessage(u.ds.DEBUG,"An unknown error encountered for fontData = ".concat(g.postscriptName))}finally{}case 39:t.next=21;break;case 41:t.next=46;break;case 43:t.prev=43,t.t3=t.catch(19),y.e(t.t3);case 46:return t.prev=46,y.f(),t.finish(46);case 49:t.next=55;break;case 51:t.prev=51,t.t4=t.catch(4),console.trace(t.t4),s.X.Logger.logMessage(u.ds.DEBUG,"An unknown error encountered for name = ".concat(t.t4.name," and message = ").concat(t.t4.message));case 55:return s.X.Logger.logMessage(u.ds.DEBUG,"Time taken for system fonts parsing is ".concat(Math.round(performance.now()-l)," milliseconds")),r=r.filter((function(e){return!1===o.has(e)})),t.abrupt("return",{remainingFonts:r,foundSystemFonts:Array.from(o.values())});case 58:case"end":return t.stop()}}),t,null,[[4,51],[19,43,46,49],[23,36]])}))),function(e,t,r){return w.apply(this,arguments)})},{key:"getAppropriateRegion",value:function(){var t=s.X.getAppLanguage();if(void 0!==t)return t;var r=new Map([["zh-TW",u.l0.Language.TraditionalChinese],["zh-Hant",u.l0.Language.TraditionalChinese]]),n=u.l0.Language.Default;return-1!==(n=void 0!==navigator.languages?navigator.languages[0]:navigator.language).indexOf("zh")?r.get(n)||u.l0.Language.SimplifiedChinese:(n=n.split("-")[0],e.getLanguageFromString(n))}},{key:"getAppropriateLocale",value:function(){u.l0.Locale.Default;var t=e.getAppropriateRegion();return u.l0.RegionToLocale.get(t)||u.l0.Locale.Default}},{key:"setDisplayFontForEachFamilyIfNeeded",value:function(e){return e.getRawMap().forEach((function(e){if(""===e.displayFont.postscriptName){var t=function(t){var r,n=f(t);try{var a=function(){var t=r.value;if(e.getEntries().some((function(r){if(-1!==r.styleName.toLowerCase().indexOf(t))return e.displayFont=r,!0})),""!==e.displayFont.postscriptName)return 1};for(n.s();!(r=n.n()).done&&!a(););}catch(e){n.e(e)}finally{n.f()}};""===e.displayFont.postscriptName&&t(["regular"]),""===e.displayFont.postscriptName&&e.getEntries().some((function(t){if(-1!==t.postscriptName.toLowerCase().indexOf("regular"))return e.displayFont=t,!0})),""===e.displayFont.postscriptName&&t(["default","medium","mid","book"]),""===e.displayFont.postscriptName&&(e.displayFont=e.getEntries()[0])}})),e}},{key:"checkIfSystemFontApplicable",value:function(e,t){if(e.colorTechnology===u.D2.NONE)return!0;if(t.has(u.l0.AdditionalFontTechnologies.TTC)&&-1!==e.otherTechnologies.indexOf(u.nl.TTC))return!0;for(var r=0,n=[u.l0.AdditionalFontTechnologies.OT_SVG,u.l0.AdditionalFontTechnologies.COLR,u.l0.AdditionalFontTechnologies.SBIX];r<n.length;r++){var a=n[r];if(t.has(a)&&e.colorTechnology.toString()===a.toString())return!0}return!1}},{key:"getFamiliesFromFontsArrayJSON",value:function(t,r,n,a,o,i,s,l){var c,h=arguments.length>8&&void 0!==arguments[8]?arguments[8]:[],p=f(t);try{for(p.s();!(c=p.n()).done;){var d,m=c.value,y=f(e.createFontFromJSONData(m,r,n,s));try{for(y.s();!(d=y.n()).done;){var v=d.value;if((v.type===u.l0.FontType.APPLICATION||s.additionalFontTechnologies.has(u.l0.AdditionalFontTechnologies.VARIABLE)||!v.isVariableFont)&&(v.type!==u.l0.FontType.SYSTEM||!1!==e.checkIfSystemFontApplicable(v,s.additionalFontTechnologies))){v.isActiveForUser=l,i&&i(v.postscriptName,m);var g=!0,b=v.fontName.toLowerCase();if(s.appEntitlement===u.l0.AppEntitlement.PAID&&n!==u.l0.Entitlement.FULL&&v.isPremiumFont&&(g=!1),s.appEntitlement===u.l0.AppEntitlement.FREE&&v.isPremiumFont&&(g=!1),g&&h.length){var _,w=f(h);try{for(w.s();!(_=w.n()).done;){var E=_.value.toLowerCase();if(-1===b.indexOf(E)){g=!1;break}}}catch(e){w.e(e)}finally{w.f()}}if(g&&""!==v.familyName){var S=a.getFamilyFromName(v.familyName);void 0===S&&(S=new u.FX(v.familyName),a.addFamily(v.familyName,S));var T="";""===T&&m.family&&(T=m.family.slug),""!==T&&(S.familySlug=T,S.familyLinkUrl=u.l0.SlugIntroductionURL(S.familySlug,s.authParams.clientKey,s.authParams.isStaging,s.introductionURLEnabled)),S.addFont(v.postscriptName,v),""!==o&&o===v.postscriptName&&(S.displayFont=v),v.family=S}}}}catch(e){y.e(e)}finally{y.f()}}}catch(e){p.e(e)}finally{p.f()}return e.setDisplayFontForEachFamilyIfNeeded(a)}},{key:"getAggregationFromFonts",value:function(t){var r,n,a,o,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],s=new u.mP,l=new Map,c=f(t);try{for(c.s();!(o=c.n()).done;){var h,p=o.value,d=!0,m=f(i);try{for(m.s();!(h=m.n()).done;){var y=h.value;if(p.type===u.l0.FontType.APPLICATION&&p._subtype&&-1!==p._subtype.toString().toLowerCase().indexOf(y.toLowerCase()))break;if(-1===p.fontName.toLowerCase().indexOf(y.toLowerCase())){d=!1;break}}}catch(e){m.e(e)}finally{m.f()}if(d){var v=s.getFamilyFromName(p.familyName);void 0===v&&(v=new u.FX(p.familyName),s.addFamily(p.familyName,v),l.set(v.familyName,new Map));var g=!0;if(p.isVariableFont&&l.get(v.familyName)){var b=null===(r=l.get(v.familyName))||void 0===r?void 0:r.get(p.styleName);b&&p.isCurrentFontPreferredOver(b)?(v.removeFont(b.postscriptName),null===(n=l.get(v.familyName))||void 0===n||n.delete(p.styleName)):b&&(g=!1)}g&&(v.addFont(p.postscriptName,p),null===(a=l.get(v.familyName))||void 0===a||a.set(p.styleName,p)),p.family=v}}}catch(e){c.e(e)}finally{c.f()}return e.setDisplayFontForEachFamilyIfNeeded(s)}},{key:"getFamiliesFromBulkDBData",value:function(t,r,n,a,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[];n.appEntitlement===u.l0.AppEntitlement.PAID&&(t=t.filter((function(e){return a===u.l0.Entitlement.FULL||!0!==e.premium}))),n.appEntitlement===u.l0.AppEntitlement.FREE&&(t=t.filter((function(e){return!0!==e.premium})));var s,l=f(t=t.filter((function(e){return Boolean(e)})));try{for(l.s();!(s=l.n()).done;){var c=s.value,h=e.createFontFromDBData(c,n.appEntitlement);if(h.type===u.l0.FontType.APPLICATION||n.additionalFontTechnologies.has(u.l0.AdditionalFontTechnologies.VARIABLE)||!h.isVariableFont){h.isActiveForUser=o;var p=!0;if(p&&i.length){var d,m=h.fontName.toLowerCase(),y=f(i);try{for(y.s();!(d=y.n()).done;){var v=d.value.toLowerCase();if(m.indexOf(v)){p=!1;break}}}catch(e){y.e(e)}finally{y.f()}}if((!n.advancedServiceSearch||!h.isVariableFont||h.postscriptName===h.defaultPostscriptName)&&p&&""!==h.familyName){var g=r.getFamilyFromName(h.familyName),b=c.display;void 0===g&&(g=new u.FX(h.familyName),c.familySlug&&(g.familySlug=c.familySlug,g.familyLinkUrl=u.l0.SlugIntroductionURL(g.familySlug,n.authParams.clientKey,n.authParams.isStaging,n.introductionURLEnabled)),r.addFamily(h.familyName,g)),h.isVariableFont||!0!==b||""!==g.displayFont.postscriptName||(g.displayFont=h),g.addFont(h.postscriptName,h),h.family=g}}}}catch(e){l.e(e)}finally{l.f()}return e.setDisplayFontForEachFamilyIfNeeded(r),r}},{key:"getFamiliesFromByofData",value:function(t,r){var n,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=f(t);try{for(o.s();!(n=o.n()).done;){var i=n.value,s=!0;if(s&&a.length){var l,c=i.fontName.toLowerCase(),h=f(a);try{for(h.s();!(l=h.n()).done;){var p=l.value.toLowerCase();if(c.indexOf(p)){s=!1;break}}}catch(e){h.e(e)}finally{h.f()}}if(s&&""!==i.familyName){var d=r.getFamilyFromName(i.familyName);void 0===d&&(d=new u.FX(i.familyName),r.addFamily(i.familyName,d)),d.addFont(i.postscriptName,i),i.family=d}}}catch(e){o.e(e)}finally{o.f()}return e.setDisplayFontForEachFamilyIfNeeded(r),r}},{key:"getFontsFromByofData",value:function(t){var r,n=[],a=f(t);try{for(a.s();!(r=a.n()).done;){var o=r.value,i=e.createFontFromBYOFResult(o);n.push(i)}}catch(e){a.e(e)}finally{a.f()}return n}},{key:"createFontFromDBData",value:function(t,r){var n,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.l0.FontType.DEFAULT,o=e.getAppropriateRegion(),i=t.psName,l=t.alternatePsName,h=t.familyName,p="",d=new Map,m=new Map,y=f(h);try{for(y.s();!(n=y.n()).done;){var v=n.value.split("##"),g=v.pop();if(g){var b=e.getLanguageFromString(g);d.set(b,v.join(" "))}(g===o.valueOf()||0===p.length&&g===u.l0.Language.Default.valueOf())&&(p=v.join(" "))}}catch(e){y.e(e)}finally{y.f()}var _,w=t.tkId,E="",S=f(t.styleName);try{for(S.s();!(_=S.n()).done;){var T=_.value.split("##"),k=T.pop();if(k){var A=e.getLanguageFromString(k);m.set(A,T.join(" "))}(k===o.valueOf()||0===E.length&&k===u.l0.Language.Default.valueOf())&&(E=T.join(" "))}}catch(e){S.e(e)}finally{S.f()}var N=t.sortIndex,O=new u.K1(a,i,w);if(O.generatedPostscriptName=l,O.localizedFamilyNames=d,O.localizedStyleNames=m,a===u.l0.FontType.ACTIVATED&&(O.isActiveForUser=!0),O.isVariableFont=t.isVariableFont,O.isVariableFont){O.variableFamilyPrefix=t.variationPrefix;var I,L=f(t.otherData.split("||"));try{for(L.s();!(I=L.n()).done;){var x=c(I.value.split("##"),2),C=x[0],F=x[1];if("axisValues"===C){var P,R=f(F.split(","));try{for(R.s();!(P=R.n()).done;){var D=P.value;if(2===D.split("=").length)try{var U=D.split("=")[0],M=Number(D.split("=")[1]);""===U||Number.isNaN(M)||O.varAxisValues.set(U,M)}catch(e){}}}catch(e){R.e(e)}finally{R.f()}}else"defaultPsName"===C&&(O.defaultPostscriptName=F)}}catch(e){L.e(e)}finally{L.f()}}O.fontName="".concat(p," ").concat(E),O.styleName=E,O.sortIndex=N,O.familyName=p,O.isPremiumFont=t.premium,(!1===O.isPremiumFont||s.X.cachedEntitlement===u.l0.Entitlement.FULL&&r!==u.l0.AppEntitlement.FREE)&&(O.accessLevel=u.l0.AccessLevel.READ_WRITE);var B,j=t.lang,G=f(t.supportedLangs);try{for(G.s();!(B=G.n()).done;){var K=B.value;O.addSupportedLanguage(e.getLanguageFromString(K))}}catch(e){G.e(e)}finally{G.f()}return O.addSupportedLanguage(e.getLanguageFromString(j)),O.script=e.getLanguageFromString(j),O}},{key:"createFontFromJSONData",value:function(t,r,n,a){var o=e.getAppropriateRegion(),i=t,s=i.name,l=[],c=i.postscript_name,h=i.preferred_family_name;if(null==h&&i.family.name?h=i.family.name:null==h&&(h=c.split("-")[0]),!i.font.sync)return l;var p=i.font.sync.font_id,d=i.preferred_subfamily_name,m=i.default_language,y=i.sort_order,v=new u.K1(r,c,p);r===u.l0.FontType.ACTIVATED&&(v.isActiveForUser=!0),v.fontName=s,v.styleName=d,v.sortIndex=y,v.familyName=h,""===v.fontName&&(v.fontName="".concat(h," ").concat(d));var g,b=f(i.font.sync.language_support);try{for(b.s();!(g=b.n()).done;){var _=g.value;v.addSupportedLanguage(e.getLanguageFromString(_))}}catch(e){b.e(e)}finally{b.f()}var w=i.font.sync.library_availability;if(w){var E=w[u.l0.Entitlement.TRIAL];v.isPremiumFont=!1===E}(!1===v.isPremiumFont||n===u.l0.Entitlement.FULL&&a.appEntitlement!==u.l0.AppEntitlement.FREE)&&(v.accessLevel=u.l0.AccessLevel.READ_WRITE),v.isVariableFont=i.is_variable_font;var S="";i.variations_postscript_name_prefix&&(S=i.variations_postscript_name_prefix);var T=v.familyName;if(!1===e.isAlphaNum(T)&&(T=i.family.name?i.family.name:c.split("-")[0]),""===S&&(S=T.replace(/\W/g,"")),v.variableFamilyPrefix=S,v.script=e.getLanguageFromString(m),v.defaultPostscriptName=v.postscriptName,l.push(v),a.advancedServiceSearch)return l;var k=!0;if(i.instances&&i.instances.length){var A,N=new Set,O=f(i.instances);try{for(O.s();!(A=O.n()).done;){var I=A.value;if(I.postscript_name&&N.has(I.postscript_name)){k=!1;break}I.postscript_name&&N.add(I.postscript_name)}}catch(e){O.e(e)}finally{O.f()}}var L=0;if(i.instances&&i.instances.length){var x,C=f(i.instances);try{for(C.s();!(x=C.n()).done;){var F=x.value,P=new u.K1(r,"",p),R="";for(var D in F.localized_subfamily_names)if(F.localized_subfamily_names[D]){var U=F.localized_subfamily_names[D].trim().replace(/\s+/g," ");D===o.valueOf()&&(P.styleName=U),""!==R&&D!==u.l0.Language.Default.valueOf()||(R=U)}for(var M in""===P.styleName&&(P.styleName=R),F.axis_values)P.varAxisValues.set(M,Number(String(F.axis_values[M])));var B,j="".concat(S,"-").concat(R.replace(/\W/g,""));B=F.postscript_name&&k?F.postscript_name:j,P.fontName="".concat(h," ").concat(d),P.isVariableFont=!0,P.postscriptName=B,P.generatedPostscriptName=j,P.supportedLanguages=v.supportedLanguages,P.script=v.script,P.familyName=v.familyName,P.variableFamilyPrefix=v.variableFamilyPrefix,P.isPremiumFont=v.isPremiumFont,P.isActiveForUser=v.isActiveForUser,P.defaultPostscriptName=v.postscriptName,P.sortIndex=L++,P.variableFamilyPrefix=S,(!1===P.isPremiumFont||n===u.l0.Entitlement.FULL&&a.appEntitlement!==u.l0.AppEntitlement.FREE)&&(P.accessLevel=u.l0.AccessLevel.READ_WRITE),l.push(P)}}catch(e){C.e(e)}finally{C.f()}}return l}},{key:"createFontFromFindFontResult",value:function(e,t){var r=e,n=r.found,a="";r.postscript_name&&(a=r.postscript_name);var o=new u.K1(t,a,""),i=r.tk_font_id;if(i&&(o.fontId=i),t===u.l0.FontType.ACTIVATED&&(o.isActiveForUser=!0),n){var s=r.preferred_family_name,l=r.preferred_subfamily_name;o.familyName=s,o.styleName=l,o.fontName="".concat(s," ").concat(l),o.isPremiumFont=!1;var c=r.entitlement;c&&(!1===c.entitled?o.isPremiumFont=!0:o.accessLevel=u.l0.AccessLevel.READ_WRITE)}return o}},{key:"createFontFromBYOFResult",value:function(e){var t=e,r=t.postscript_name,n=new u.K1(u.l0.FontType.BYOF,r,""),a=t.file_checksum,o=t.family_name,i=t.subfamily_name;n.familyName=o,n.styleName=i,n.fontId=a,n.fontName="".concat(o," ").concat(i),n.isPremiumFont=!1,n.accessLevel=u.l0.AccessLevel.READ_WRITE,n.isActiveForUser=!0;try{if(t.created_at){var s=t.created_at.split(/[^0-9]/),l=new Date(s[0],s[1]-1,s[2],s[3],s[4],s[5]);n.serverTimestamp=l.getTime()}}catch(e){}return n}},{key:"parseTagCatalogResponse",value:function(e,t){var r=new Map,n=new Map,a=void 0,o=e.links;for(var i in o){var s=o[i],l=i,c={tagUrl:s.tags,tagAssignmentUrl:s.tag_assignments,tagNamespaceUrl:s.tag_namespaces,tagSynonymsUrl:s.tag_synonyms};l===u.l0.RegionToLocale.get(u.l0.Language.Default)&&(a=c),r.set(l,c),n.set(l.slice(0,2),c)}var f=r.get(t);return null==f&&null==(f=n.get(t.slice(0,2)))&&a&&(f=a),f}},{key:"arrayUnique",value:function(e){var t=new Map;try{var r,n=f(e);try{for(n.s();!(r=n.n()).done;){var a=r.value;t.set(a.psName,a)}}catch(e){n.e(e)}finally{n.f()}}catch(e){}return Array.from(t.values())}},{key:"mapStatusNumberToErrorCode",value:function(e){switch(e){case o.t.ResponseStatus.OK:case o.t.ResponseStatus.NO_CONTENT:case o.t.ResponseStatus.PARTIAL_CONTENT:case o.t.ResponseStatus.FOUND:case o.t.ResponseStatus.NOT_MODIFIED:return u.l0.ErrorCode.NONE;case o.t.ResponseStatus.REDIRECTED:case o.t.ResponseStatus.USE_PROXY:case o.t.ResponseStatus.REDIRECT_TEMP:case o.t.ResponseStatus.REDIRECT_PERMANENTLY:return u.l0.ErrorCode.UNKNOWN;case o.t.ResponseStatus.BAD_REQUEST:case o.t.ResponseStatus.METHOD_NOT_ALLOWED:return u.l0.ErrorCode.BAD_REQUEST;case o.t.ResponseStatus.UNAUTHORIZED:return u.l0.ErrorCode.AUTH_FAILURE;case o.t.ResponseStatus.FORBIDDEN:case o.t.ResponseStatus.NOT_FOUND:return u.l0.ErrorCode.FORBIDDEN;case o.t.ResponseStatus.PROXY_REQUIRED:return u.l0.ErrorCode.PROXY_FAILURE;case o.t.ResponseStatus.REQUEST_TIMEOUT:return u.l0.ErrorCode.SERVER_UNREACHABLE;case o.t.ResponseStatus.OFFLINE:return u.l0.ErrorCode.OFFLINE;case o.t.ResponseStatus.RETRY_WITH:case o.t.ResponseStatus.SERVER_ERROR:case o.t.ResponseStatus.NOT_IMPLMENTED:case o.t.ResponseStatus.BAD_GATEWAY:return u.l0.ErrorCode.UNKNOWN;case o.t.ResponseStatus.TOO_MANY_REQUESTS:return u.l0.ErrorCode.TOO_MANY_REQUESTS;case o.t.ResponseStatus.SERVICE_UNAVAILABLE:case o.t.ResponseStatus.GATEWAY_TIMEOUT:return u.l0.ErrorCode.SERVER_UNREACHABLE;case o.t.ResponseStatus.NETWORK_AUTH_NEEDED:return u.l0.ErrorCode.AUTH_FAILURE;case o.t.ResponseStatus.NETWORK_READ_TIMEOUT:case o.t.ResponseStatus.NETWORK_CONNECT_TIMEOUT:return u.l0.ErrorCode.SERVER_UNREACHABLE}return u.l0.ErrorCode.UNKNOWN}},{key:"mapLangToPrimaryScriptGroup",value:function(e){switch(e){case u.l0.Language.Armenian:case u.l0.Language.Belarusian:case u.l0.Language.Catalan:case u.l0.Language.Cherokee:case u.l0.Language.Croatian:case u.l0.Language.Czech:case u.l0.Language.Danish:case u.l0.Language.Dutch:case u.l0.Language.Filipino:case u.l0.Language.Finnish:case u.l0.Language.French:case u.l0.Language.German:case u.l0.Language.Greek:case u.l0.Language.Hungarian:case u.l0.Language.Indonesian:case u.l0.Language.Italian:case u.l0.Language.Kazakh:case u.l0.Language.Latvian:case u.l0.Language.Macedonian:case u.l0.Language.Maltese:case u.l0.Language.Mandarin:case u.l0.Language.Norwegian:case u.l0.Language.Polish:case u.l0.Language.Portuguese:case u.l0.Language.Romanian:case u.l0.Language.Russian:case u.l0.Language.Serbian:case u.l0.Language.Slovak:case u.l0.Language.Slovenian:case u.l0.Language.Spanish:case u.l0.Language.Swedish:case u.l0.Language.Turkish:case u.l0.Language.Ukrainian:case u.l0.Language.Vietnamese:return u.l0.PrimaryScriptGroups.WESTERN;case u.l0.Language.Japanese:return u.l0.PrimaryScriptGroups.JAPANESE;case u.l0.Language.SimplifiedChinese:return u.l0.PrimaryScriptGroups.SIMPLIFIED_CHINESE;case u.l0.Language.TraditionalChinese:case u.l0.Language.HongKongCh:return u.l0.PrimaryScriptGroups.TRAD_CHINESE;case u.l0.Language.Korean:return u.l0.PrimaryScriptGroups.KOREAN;case u.l0.Language.Arabic:case u.l0.Language.Persian:return u.l0.PrimaryScriptGroups.ARABIC;case u.l0.Language.Hebrew:return u.l0.PrimaryScriptGroups.HEBREW;case u.l0.Language.Bengali:case u.l0.Language.Devanagari:case u.l0.Language.Gujarati:case u.l0.Language.Gurmukhi:case u.l0.Language.Hindi:case u.l0.Language.Kannada:case u.l0.Language.Malayalam:case u.l0.Language.Tamil:case u.l0.Language.Telugu:case u.l0.Language.Thai:case u.l0.Language.Malay:case u.l0.Language.Myanmar:case u.l0.Language.Khmer:case u.l0.Language.Sinhalese:case u.l0.Language.Lao:case u.l0.Language.Urdu:return u.l0.PrimaryScriptGroups.INDIC;case u.l0.Language.Emoji:case u.l0.Language.Amharic:case u.l0.Language.Fula:case u.l0.Language.PanAfrican:case u.l0.Language.NKo:case u.l0.Language.Somali:case u.l0.Language.Tachelhit:case u.l0.Language.Vai:default:return u.l0.PrimaryScriptGroups.WESTERN}}},{key:"mapLangToInternalPrimaryScriptSubgroup",value:function(e){switch(e){case u.l0.Language.Amharic:return u.l0.InternalPrimaryScriptSubGroups.WESTERN_AMHARIC;case u.l0.Language.Arabic:return u.l0.InternalPrimaryScriptSubGroups.ARABIC_ARABIC;case u.l0.Language.Armenian:return u.l0.InternalPrimaryScriptSubGroups.WESTERN_ARMENIAN;case u.l0.Language.Belarusian:return u.l0.InternalPrimaryScriptSubGroups.WESTERN_BELARUSIAN;case u.l0.Language.Bengali:return u.l0.InternalPrimaryScriptSubGroups.INDIC_BENGALI;case u.l0.Language.Catalan:return u.l0.InternalPrimaryScriptSubGroups.WESTERN_CATALAN;case u.l0.Language.Cherokee:return u.l0.InternalPrimaryScriptSubGroups.WESTERN_CHEROKEE;case u.l0.Language.SimplifiedChinese:return u.l0.InternalPrimaryScriptSubGroups.SIMPLIFIED_CHINESE_SIMPLIFIEDCHINESE;case u.l0.Language.TraditionalChinese:return u.l0.InternalPrimaryScriptSubGroups.TRAD_CHINESE_TRADITIONALCHINESE;case u.l0.Language.Mandarin:return u.l0.InternalPrimaryScriptSubGroups.WESTERN_MANDARIN;case u.l0.Language.Croatian:return u.l0.InternalPrimaryScriptSubGroups.WESTERN_CROATIAN;case u.l0.Language.Czech:return u.l0.InternalPrimaryScriptSubGroups.WESTERN_CZECH;case u.l0.Language.Danish:return u.l0.InternalPrimaryScriptSubGroups.WESTERN_DANISH;case u.l0.Language.Devanagari:return u.l0.InternalPrimaryScriptSubGroups.INDIC_DEVANAGARI;case u.l0.Language.Dutch:return u.l0.InternalPrimaryScriptSubGroups.WESTERN_DUTCH;case u.l0.Language.Emoji:return u.l0.InternalPrimaryScriptSubGroups.EMOJI_EMOJI;case u.l0.Language.Filipino:return u.l0.InternalPrimaryScriptSubGroups.WESTERN_FILIPINO;case u.l0.Language.Finnish:return u.l0.InternalPrimaryScriptSubGroups.WESTERN_FINNISH;case u.l0.Language.French:return u.l0.InternalPrimaryScriptSubGroups.WESTERN_FRENCH;case u.l0.Language.Fula:return u.l0.InternalPrimaryScriptSubGroups.WESTERN_FULA;case u.l0.Language.German:return u.l0.InternalPrimaryScriptSubGroups.WESTERN_GERMAN;case u.l0.Language.Greek:return u.l0.InternalPrimaryScriptSubGroups.WESTERN_GREEK;case u.l0.Language.Gujarati:return u.l0.InternalPrimaryScriptSubGroups.INDIC_GUJARATI;case u.l0.Language.Gurmukhi:return u.l0.InternalPrimaryScriptSubGroups.INDIC_GURMUKHI;case u.l0.Language.Hebrew:return u.l0.InternalPrimaryScriptSubGroups.HEBREW_HEBREW;case u.l0.Language.Hindi:return u.l0.InternalPrimaryScriptSubGroups.INDIC_HINDI;case u.l0.Language.HongKongCh:return u.l0.InternalPrimaryScriptSubGroups.TRAD_CHINESE_HONGKONGCH;case u.l0.Language.Hungarian:return u.l0.InternalPrimaryScriptSubGroups.WESTERN_HUNGARIAN;case u.l0.Language.Indonesian:return u.l0.InternalPrimaryScriptSubGroups.WESTERN_INDONESIAN;case u.l0.Language.Italian:return u.l0.InternalPrimaryScriptSubGroups.WESTERN_ITALIAN;case u.l0.Language.Japanese:return u.l0.InternalPrimaryScriptSubGroups.JAPANESE_JAPANESE;case u.l0.Language.Kannada:return u.l0.InternalPrimaryScriptSubGroups.INDIC_KANNADA;case u.l0.Language.Kazakh:return u.l0.InternalPrimaryScriptSubGroups.WESTERN_KAZAKH;case u.l0.Language.Khmer:return u.l0.InternalPrimaryScriptSubGroups.INDIC_KHMER;case u.l0.Language.Korean:return u.l0.InternalPrimaryScriptSubGroups.KOREAN_KOREAN;case u.l0.Language.Lao:return u.l0.InternalPrimaryScriptSubGroups.INDIC_LAO;case u.l0.Language.Latvian:return u.l0.InternalPrimaryScriptSubGroups.WESTERN_LATVIAN;case u.l0.Language.Macedonian:return u.l0.InternalPrimaryScriptSubGroups.WESTERN_MACEDONIAN;case u.l0.Language.Malay:return u.l0.InternalPrimaryScriptSubGroups.INDIC_MALAY;case u.l0.Language.Malayalam:return u.l0.InternalPrimaryScriptSubGroups.INDIC_MALAYALAM;case u.l0.Language.Maltese:return u.l0.InternalPrimaryScriptSubGroups.WESTERN_MALTESE;case u.l0.Language.Myanmar:return u.l0.InternalPrimaryScriptSubGroups.INDIC_MYANMAR;case u.l0.Language.NKo:return u.l0.InternalPrimaryScriptSubGroups.WESTERN_NKO;case u.l0.Language.Norwegian:return u.l0.InternalPrimaryScriptSubGroups.WESTERN_NORWEGIAN;case u.l0.Language.PanAfrican:return u.l0.InternalPrimaryScriptSubGroups.WESTERN_PANAFRICAN;case u.l0.Language.Persian:return u.l0.InternalPrimaryScriptSubGroups.ARABIC_PERSIAN;case u.l0.Language.Polish:return u.l0.InternalPrimaryScriptSubGroups.WESTERN_POLISH;case u.l0.Language.Portuguese:return u.l0.InternalPrimaryScriptSubGroups.WESTERN_PORTUGUESE;case u.l0.Language.Romanian:return u.l0.InternalPrimaryScriptSubGroups.WESTERN_ROMANIAN;case u.l0.Language.Russian:return u.l0.InternalPrimaryScriptSubGroups.WESTERN_RUSSIAN;case u.l0.Language.Serbian:return u.l0.InternalPrimaryScriptSubGroups.WESTERN_SERBIAN;case u.l0.Language.Sinhalese:return u.l0.InternalPrimaryScriptSubGroups.INDIC_SINHALESE;case u.l0.Language.Slovak:return u.l0.InternalPrimaryScriptSubGroups.WESTERN_SLOVAK;case u.l0.Language.Slovenian:return u.l0.InternalPrimaryScriptSubGroups.WESTERN_SLOVENIAN;case u.l0.Language.Somali:return u.l0.InternalPrimaryScriptSubGroups.WESTERN_SOMALI;case u.l0.Language.Spanish:return u.l0.InternalPrimaryScriptSubGroups.WESTERN_SPANISH;case u.l0.Language.Swedish:return u.l0.InternalPrimaryScriptSubGroups.WESTERN_SWEDISH;case u.l0.Language.Tachelhit:return u.l0.InternalPrimaryScriptSubGroups.WESTERN_TACHELHIT;case u.l0.Language.Tamil:return u.l0.InternalPrimaryScriptSubGroups.INDIC_TAMIL;case u.l0.Language.Telugu:return u.l0.InternalPrimaryScriptSubGroups.INDIC_TELUGU;case u.l0.Language.Thai:return u.l0.InternalPrimaryScriptSubGroups.INDIC_THAI;case u.l0.Language.Turkish:return u.l0.InternalPrimaryScriptSubGroups.WESTERN_TURKISH;case u.l0.Language.Ukrainian:return u.l0.InternalPrimaryScriptSubGroups.WESTERN_UKRAINIAN;case u.l0.Language.Urdu:return u.l0.InternalPrimaryScriptSubGroups.INDIC_URDU;case u.l0.Language.Vai:return u.l0.InternalPrimaryScriptSubGroups.WESTERN_VAI;case u.l0.Language.Vietnamese:return u.l0.InternalPrimaryScriptSubGroups.WESTERN_VIETNAMESE;default:return u.l0.InternalPrimaryScriptSubGroups.WESTERN_DEFAULT}}},{key:"convertToSha256",value:(_=y(d().mark((function e(t){var r,n,a,o;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=new TextEncoder,n=r.encode(t),e.next=4,crypto.subtle.digest("SHA-256",n);case 4:return a=e.sent,o=Array.from(new Uint8Array(a)),e.abrupt("return",o.map((function(e){return e.toString(16).padStart(2,"0")})).join(""));case 7:case"end":return e.stop()}}),e)}))),function(e){return _.apply(this,arguments)})},{key:"getHash",value:(b=y(d().mark((function e(t,r){var n,a,o,i,s;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=function(){var e=y(d().mark((function e(r){var n,a;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,crypto.subtle.digest(t,r);case 2:return n=e.sent,a=Array.from(new Uint8Array(n)),e.abrupt("return",a.map((function(e){return e.toString(16).padStart(2,"0")})).join(""));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),!(r instanceof Blob)){e.next=9;break}return e.next=4,r.arrayBuffer();case 4:return a=e.sent,o=new Uint8Array(a),e.next=8,n(o);case 8:case 13:return e.abrupt("return",e.sent);case 9:return i=new TextEncoder,s=i.encode(r),e.next=13,n(s);case 14:case"end":return e.stop()}}),e)}))),function(e,t){return b.apply(this,arguments)})},{key:"parseETagValue",value:function(e){var t=e.match('W/"(.*)"');return t&&t.length>=1?t[1]:e}},{key:"toBytesInt32",value:function(e){var t=new ArrayBuffer(4);return new DataView(t).setUint32(0,e,!1),new Uint8Array(t)}},{key:"copyAttributes",value:function(e,t,r){var n=function(n){e.length&&-1!==e.indexOf(n)||("object"===l(t[n])&&void 0!==t[n].clone?r[n]=t[n].clone():t[n]instanceof Map?(r[n]=new Map,t[n].forEach((function(e,t){r[n].set(t,e)}))):t[n]instanceof Set?(r[n]=new Set,t[n].forEach((function(e){r[n].add(e)}))):r[n]instanceof Map?r[n]=new Map(t[n].value):r[n]instanceof Set?r[n]=new Set(t[n].value):r[n]=t[n])};for(var a in t)n(a)}},{key:"generateCustomOTVarName",value:function(e,t){try{var r=e.variableFamilyPrefix;r&&(r=e.familyName),r=r.trim().replace(/\W/g,"");var n,a=f(new i.w(e.fontBuffer).getFVarOrdering());try{for(a.s();!(n=a.n()).done;){var o=n.value,s=t.get(o[0]);void 0!==s&&(r=(r="".concat(r,"_"))+(s%1==0||0===s?s.toFixed(0):Number(s.toFixed(3)))+o[0].trimRight(),t.delete(o[0]))}}catch(e){a.e(e)}finally{a.f()}var u,l=f(t);try{for(l.s();!(u=l.n()).done;){var c=u.value;r=(r="".concat(r,"_"))+c[1].toFixed(3)+c[0]}}catch(e){l.e(e)}finally{l.f()}return r}catch(e){}}},{key:"getAxisValuesFromPostscriptName",value:function(e){for(var t=new Map,r=e.substring(e.indexOf("_")+1);r.length;){var n=parseFloat(r),a=r.match(/[a-zA-Z]+/g);if(a&&a.length){var o=r=r.substring(r.indexOf(a[0]));-1!==r.indexOf("_")&&(o=r.substring(0,r.indexOf("_"))),r=r.substring(o.length+1),t.set(o,n)}}return t}},{key:"equalMaps",value:function(e,t){if(e.size!==t.size)return!1;var r,n=f(e.keys());try{for(n.s();!(r=n.n()).done;){var a=r.value;if(e.get(a)!==t.get(a))return!1}}catch(e){n.e(e)}finally{n.f()}return!0}},{key:"isAlphaNum",value:function(e){return/^[a-z0-9]+$/i.test(e)}},{key:"getLanguageFromString",value:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(null==t)return u.l0.Language.Default;0===e._langMap.length&&(e._langMap=Object.values(u.l0.Language));var n=t;if(!1===e._langMap.includes(n)){var a=new Map([["zh-CN",u.l0.Language.SimplifiedChinese],["zh-TW",u.l0.Language.TraditionalChinese]]);if(-1!==t.indexOf("zh"))n=a.get(t)||u.l0.Language.SimplifiedChinese;else if(-1!==t.indexOf("zxx-Zsye"))n=u.l0.Language.Emoji;else if(-1!==t.indexOf("nb"))n=u.l0.Language.Norwegian;else{var o=n.substring(0,2);!0===e._langMap.includes(o)?n=o:(s.X.Logger.logMessage(u.ds.DEBUG,"An unknown script encountered = ".concat(t)),r&&(n=u.l0.Language.Default))}}return n}},{key:"overrideFontScriptFromPostscriptName",value:function(e){var t=e.postscriptName.toLocaleLowerCase();-1!==t.indexOf("emoji")?e.script=u.l0.Language.Emoji:-1!==t.indexOf("khmer")?e.script=u.l0.Language.Khmer:-1!==t.indexOf("myanmar")?e.script=u.l0.Language.Myanmar:-1!==t.indexOf("sinhala")?e.script=u.l0.Language.Sinhalese:-1!==t.indexOf("sanslao")&&(e.script=u.l0.Language.Lao)}},{key:"isGivenScopePresent",value:function(e,t){try{var r=e.indexOf("."),n=e.indexOf(".",r+1),a=atob(e.substring(r+1,n));return-1!==JSON.parse(a).scope.indexOf(t)}catch(e){return!1}}},{key:"getVariationIdFromTkId",value:function(e){return e.split("-").slice(0,2).pop()}},{key:"isValidAccessToken",value:function(e){var t=!1;try{if(""!==e){var r=e.indexOf("."),n=e.indexOf(".",r+1);if(-1!==r&&-1!==n){var a=atob(e.substring(r+1,n)),o=JSON.parse(a).user_id;t=null!=o&&o.length>0}}}catch(e){}return t}},{key:"getXRequestId",value:function(){var e="";try{e=(0,a.Z)()}catch(e){}return e}},{key:"parseHeadersAndGetReqId",value:function(e){var t,r="",n=f(e);try{for(n.s();!(t=n.n()).done;){var a=t.value;a[0]===o.t.HeaderKey.X_REQUEST_ID&&(r=a[1])}}catch(e){n.e(e)}finally{n.f()}return r}},{key:"getPascalCaseString",value:function(e){return e.replace(/\w+/g,(function(e){return"".concat(e[0].toUpperCase()).concat(e.slice(1).toLowerCase())}))}},{key:"localFontsPermissionCheck",value:(g=y(d().mark((function t(){var r,n,a,o,i,s,l,c,f,h,p=arguments;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=p.length>0&&void 0!==p[0]&&p[0],n=p.length>1&&void 0!==p[1]?p[1]:void 0,a="local-fonts",o=new u.l0.Error,t.prev=4,t.next=7,navigator.permissions.query({name:a});case 7:if(i=t.sent,n&&i.addEventListener("change",n),(s=i.state).toString()!==u.GX.PROMPT.toString()||!r){t.next=32;break}if(t.prev=11,!(navigator&&navigator.userActivation&&navigator.userActivation.hasBeenActive)){t.next=24;break}return t.next=15,e.getSystemFonts(new Map,!0);case 15:return l=t.sent,c=l.error,o=c,t.next=20,navigator.permissions.query({name:a});case 20:i=t.sent,s=i.state,t.next=25;break;case 24:o.errCode=u.l0.ErrorCode.SYSTEM_FONTS_SECURITY_ERROR;case 25:t.next=30;break;case 27:t.prev=27,t.t0=t.catch(11),o.errCode=u.l0.ErrorCode.UNKNOWN;case 30:t.next=38;break;case 32:if(s.toString()!==u.GX.GRANTED.toString()||!r){t.next=38;break}return t.next=35,e.getSystemFonts(new Map,!0);case 35:f=t.sent,h=f.error,o=h;case 38:return t.abrupt("return",{state:s,error:o});case 41:return t.prev=41,t.t1=t.catch(4),t.abrupt("return",{state:u.GX.DENIED,error:new u.l0.Error(u.l0.ErrorCode.UNKNOWN)});case 44:case"end":return t.stop()}}),t,null,[[4,41],[11,27]])}))),function(){return g.apply(this,arguments)})},{key:"parseLocalFontFile",value:(m=y(d().mark((function e(t,r){var n,a;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.t0=i.w,e.t1=Uint8Array,e.next=5,t.arrayBuffer();case 5:if(e.t2=e.sent,e.t3=new e.t1(e.t2),n=new e.t0(e.t3),a=new u.K1(u.l0.FontType.LOCAL),!n.font){e.next=25;break}if((a=n.getTQFont()).type=u.l0.FontType.LOCAL,!r.has(a.postscriptName)){e.next=16;break}return e.abrupt("return",Promise.resolve(r.get(a.postscriptName)));case 16:if(""===a.postscriptName){e.next=25;break}return e.t4=Uint8Array,e.next=20,t.arrayBuffer();case 20:e.t5=e.sent,a.fontBuffer=new e.t4(e.t5),a.isActiveForUser=!0,a.script=n.computeFontScript(a.postscriptName),a.addSupportedLanguage(a.script);case 25:return""===a.postscriptName&&(a.fontName=t.name.split(".")[0].replace(/\W/g," ").substring(0,32),""===a.familyName&&(a.familyName=a.fontName)),e.abrupt("return",a);case 29:return e.prev=29,e.t6=e.catch(0),e.abrupt("return",new u.K1);case 32:case"end":return e.stop()}}),e,null,[[0,29]])}))),function(e,t){return m.apply(this,arguments)})},{key:"convertToUnicodeString",value:function(e){return e.map((function(e){return"U+".concat(e.toString(16).padStart(4,"0").toUpperCase())})).join(",")}},{key:"getLocalFonts",value:(n=y(d().mark((function t(r,n){var a,o,i,l,c,h,p,m,y,v,g,b,_;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=new u.mP,o=[],i=performance.now(),l=!1,n.length!==r.size&&(l=!0),c=n.map((function(t){return e.parseLocalFontFile(t,r)})),t.next=8,Promise.all(c);case 8:h=t.sent,m=f(p=h),t.prev=11,m.s();case 13:if((y=m.n()).done){t.next=20;break}if(v=y.value,l||!v||r.has(v.postscriptName)){t.next=18;break}return l=!0,t.abrupt("break",20);case 18:t.next=13;break;case 20:t.next=25;break;case 22:t.prev=22,t.t0=t.catch(11),m.e(t.t0);case 25:return t.prev=25,m.f(),t.finish(25);case 28:if(l){g=f(p);try{for(g.s();!(b=g.n()).done;)(_=b.value)&&o.push(_.toJSON())}catch(e){g.e(e)}finally{g.f()}}return p&&p.length&&(a=e.getAggregationFromFonts(p)),s.X.Logger.logMessage(u.ds.DEBUG,"Time taken for local fonts parsing is ".concat(Math.round(performance.now()-i)," milliseconds")),t.abrupt("return",{aggregation:a,fontsJSON:o,error:new u.l0.Error});case 32:case"end":return t.stop()}}),t,null,[[11,22,25,28]])}))),function(e,t){return n.apply(this,arguments)})}],r&&v(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();g._langMap=[],g._systemFamilyMap=new Map,g._fontDataMap=new Map,g._instanceOrderingMap=new Map,g._fvarOrderingMap=new Map,g.getSystemFamilyFromFontId=function(){var e=y(d().mark((function e(t){var r,n,a,o,i,s;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,g.localFontsPermissionCheck(!1);case 2:if(e.sent.state.toString()===u.GX.GRANTED.toString()){e.next=6;break}return e.abrupt("return",void 0);case 6:if(void 0!==t.postscriptName){e.next=8;break}return e.abrupt("return");case 8:return e.next=10,g.findSystemFonts([t.postscriptName],!0,!1);case 10:if(r=e.sent,!(n=r.foundSystemFonts).length){e.next=21;break}if(a=n[0],!(o=g._systemFamilyMap.get(a.familyName))){e.next=21;break}return e.next=18,g.findSystemFonts(o,!0,!1);case 18:return i=e.sent,s=g.getAggregationFromFonts(i.foundSystemFonts).getFamilyFromName(a.familyName),e.abrupt("return",s);case 21:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},159097:(e,t,r)=>{"use strict";function n(e){return n="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},n(e)}function a(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,(void 0,o=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,"string");if("object"!==n(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(a.key),"symbol"===n(o)?o:String(o)),a)}var o}r.d(t,{D:()=>o});var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r;return t=e,r=[{key:"encode",value:function(t){for(var r="",n=0,a=0,o=e.CHARS;t.charAt(0|a)||(o="=",a%1);r+=o.charAt(63&n>>8-a%1*8))n=n<<8|t.charCodeAt(a+=3/4);return r.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}},{key:"decode",value:function(t){t.length%4!=0&&(t+=new Array(5-t.length%4).join("="));for(var r,n=(t=t.replace(/-/g,"+").replace(/_/g,"/")).replace(/=+$/,""),a=0,o=0,i=0,s="";r=n.charAt(i++);~r&&(o=a%4?64*o+r:r,a++%4)?s+=String.fromCharCode(255&o>>(-2*a&6)):0)r=e.CHARS.indexOf(r);return s}}],null&&a(t.prototype,null),r&&a(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();o.CHARS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},456902:(e,t,r)=>{"use strict";r.d(t,{u:()=>i});var n=r(159097);function a(e){return a="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},a(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(void 0,o=function(e,t){if("object"!==a(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===a(o)?o:String(o)),n)}var o}var i=function(){function e(t,r){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.values=[],this.values=r||new Array(Math.ceil(t/32)),!r)for(var n=0;n<this.values.length;n++)this.values[n]=0}var t,r,a;return t=e,a=[{key:"fromBase64",value:function(t){for(var r=n.D.decode(t),a=[],o=0;o<r.length;o+=4){var i=r.charCodeAt(o)<<24|r.charCodeAt(o+1)<<16|r.charCodeAt(o+2)<<8|r.charCodeAt(o+3)<<0;a.push(i)}return new e(a.length,a)}}],(r=[{key:"set",value:function(e){if(Math.floor(e/32+1)>this.values.length)throw new Error("Index is out of bounds.");var t=Math.floor(e/32);this.values[t]|=1<<e-32*t}},{key:"has",value:function(e){if(Math.floor(e/32+1)>this.values.length)throw new Error("Index is out of bounds.");var t=Math.floor(e/32);return Boolean(this.values[t]&1<<e-32*t)}},{key:"getValues",value:function(){return this.values}},{key:"toBitString",value:function(){return this.values.map((function(e){return"00000000000000000000000000000000".concat((e>>>0).toString(2).slice(-32))})).join("")}},{key:"toBase64",value:function(){for(var e="",t=0;t<this.values.length;t++){var r=this.values[t];e+=String.fromCharCode((4278190080&r)>>>24)+String.fromCharCode((16711680&r)>>>16)+String.fromCharCode((65280&r)>>>8)+String.fromCharCode((255&r)>>>0)}return n.D.encode(e)}}])&&o(t.prototype,r),a&&o(t,a),Object.defineProperty(t,"prototype",{writable:!1}),e}()},809863:(e,t,r)=>{"use strict";r.d(t,{q:()=>u});var n=r(159097),a=r(456902),o=r(244788);function i(e){return i="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},i(e)}function s(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,(void 0,a=function(e,t){if("object"!==i(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===i(a)?a:String(a)),n)}var a}var u=function(){function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.murmur3=new o.c,this.size=0,this.numHashes=0,this.size=t,this.numHashes=r,0===n.length&&(n=new Array(t)),this.data=new a.u(t,n)}var t,r,i;return t=e,i=[{key:"fromBase64",value:function(t){for(var r=n.D.decode(t),a=[],o=0;o<r.length;o+=4){var i=r.charCodeAt(o)<<24|r.charCodeAt(o+1)<<16|r.charCodeAt(o+2)<<8|r.charCodeAt(o+3)<<0;a.push(i)}var s=a.shift(),u=a.shift(),l=0,c=0;return void 0!==s&&(l=s),void 0!==u&&(c=u),new e(l,c,a)}},{key:"calcSize",value:function(e,t){return e=e||1,Math.ceil(Math.log(t)*e/Math.log(1/Math.pow(2,Math.log(2))))}}],(r=[{key:"getSize",value:function(){return this.size}},{key:"getNumHashes",value:function(){return this.numHashes}},{key:"add",value:function(t){if("string"!=typeof t&&"number"!=typeof t)throw new Error("Value should be a string or number.");for(var r=0;r<this.numHashes;r++){var n;n="number"==typeof t?this.murmur3.hashNumber(t,e.SEEDS[r])%this.size:this.murmur3.hashString(t,e.SEEDS[r])%this.size,this.data.set(n)}}},{key:"has",value:function(t){if("string"!=typeof t&&"number"!=typeof t)throw new Error("Value should be a string or number.");for(var r=0;r<this.numHashes;r++){var n;if(n="number"==typeof t?this.murmur3.hashNumber(t,e.SEEDS[r])%this.size:this.murmur3.hashString(t,e.SEEDS[r])%this.size,!this.data.has(n))return!1}return!0}},{key:"toBase64",value:function(){for(var e=[this.size,this.numHashes].concat(this.data.getValues()),t="",r=0;r<e.length;r++){var a=e[r];t+=String.fromCharCode((4278190080&a)>>>24)+String.fromCharCode((16711680&a)>>>16)+String.fromCharCode((65280&a)>>>8)+String.fromCharCode((255&a)>>>0)}return n.D.encode(t)}}])&&s(t.prototype,r),i&&s(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();u.SEEDS=[2449897292,4218179547,2675077685,1031960064,1478620578,1386343184,3194259988,2656050674,3012733295,2193273665],u.calcHashes=function(e,t){return e=e||1,Math.max(Math.min(Math.round(Math.log(2)*t/e),u.SEEDS.length),1)}},244788:(e,t,r)=>{"use strict";function n(e){return n="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},n(e)}function a(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,(void 0,o=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,"string");if("object"!==n(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(a.key),"symbol"===n(o)?o:String(o)),a)}var o}r.d(t,{c:()=>o});var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r;return t=e,(r=[{key:"mult",value:function(e,t){return(65535&e)*t+(((e>>>16)*t&65535)<<16)}},{key:"rotl",value:function(e,t){return e<<t|e>>>32-t}},{key:"hashNumber",value:function(t,r){var n=r||0,a=4294967295&t;return a=this.mult(a,e.C1),a=this.rotl(a,e.R1),n^=a=this.mult(a,e.C2),n=this.rotl(n,e.R2),n=this.mult(n,e.M)+e.N,n^=4,n^=n>>>16,n=this.mult(n,2246822507),n^=n>>>13,n=this.mult(n,3266489909),(n^=n>>>16)>>>0}},{key:"hashString",value:function(t,r){var n=r||0,a=0,o=0,i=t.length%4,s=t.length-i;for(o=0;o<s;o+=4)a=(4294967295&t.charCodeAt(o+0))<<0|(4294967295&t.charCodeAt(o+1))<<8|(4294967295&t.charCodeAt(o+2))<<16|(4294967295&t.charCodeAt(o+3))<<24,a=this.mult(a,e.C1),a=this.rotl(a,e.R1),n^=a=this.mult(a,e.C2),n=this.rotl(n,e.R2),n=this.mult(n,e.M)+e.N;switch(a=0,i){case 3:a^=(4294967295&t.charCodeAt(o+2))<<16;case 2:a^=(4294967295&t.charCodeAt(o+1))<<8;case 1:a^=(4294967295&t.charCodeAt(o+0))<<0,a=this.mult(a,e.C1),a=this.rotl(a,e.R1),n^=a=this.mult(a,e.C2)}return n^=t.length,n^=n>>>16,n=this.mult(n,2246822507),n^=n>>>13,n=this.mult(n,3266489909),(n^=n>>>16)>>>0}}])&&a(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();o.C1=3432918353,o.C2=461845907,o.R1=15,o.R2=13,o.M=5,o.N=3864292196},818910:(e,t,r)=>{"use strict";function n(e){return n="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},n(e)}function a(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,(void 0,o=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,"string");if("object"!==n(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(a.key),"symbol"===n(o)?o:String(o)),a)}var o}r.d(t,{z:()=>o});var o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.mMap=new Map,this.mMaxCapacity=t,this.mCurCacheSize=0}var t,r;return t=e,(r=[{key:"isEmpty",value:function(){return 0===this.mMap.size}},{key:"get",value:function(e,t){var r=this.mMap.get(e);return r?(this.mMap.delete(e),this.mMap.set(e,r),r.value):t}},{key:"addToFront",value:function(e,t,r){if(this.find(e))return this.moveToFront(e),!0;if(!this.haveSpace(r))return!1;var n={key:e,value:t,size:r};return!!n&&(this.mMap.set(e,n),this.mCurCacheSize+=r,!0)}},{key:"remove",value:function(e){var t=this.mMap.get(e);t&&(this.mCurCacheSize-=t.size,this.mMap.delete(e))}},{key:"getRear",value:function(){if(!this.isEmpty()){var e=this.mMap.keys().next().value;return this.mMap.get(e)}}},{key:"maxCacheSize",value:function(){return this.mMaxCapacity}},{key:"find",value:function(e){return this.mMap.has(e)}},{key:"haveSpace",value:function(e){return this.mCurCacheSize+e<=this.mMaxCapacity}},{key:"getCacheSize",value:function(){return this.mCurCacheSize}},{key:"addToMaxCapacity",value:function(e){this.mMaxCapacity+=e}},{key:"getSize",value:function(e){var t=0,r=this.mMap.get(e);return void 0!==r&&(t=r.size),t}},{key:"moveToFront",value:function(e){var t=!1,r=this.mMap.get(e);return r&&(this.mMap.delete(e),this.mMap.set(e,r),t=!0),t}}])&&a(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}()},234174:(e,t,r)=>{"use strict";r.d(t,{p:()=>y});var n=r(818910),a=r(660234),o=r(51939),i=r(461660);function s(e){return s="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},s(e)}function u(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return l(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)?l(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function l(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 c(){c=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function h(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,i=Object.create(o.prototype),s=new C(n||[]);return a(i,"_invoke",{value:O(e,r,s)}),i}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=h;var d="suspendedStart",m="suspendedYield",y="executing",v="completed",g={};function b(){}function _(){}function w(){}var E={};f(E,i,(function(){return this}));var S=Object.getPrototypeOf,T=S&&S(S(F([])));T&&T!==r&&n.call(T,i)&&(E=T);var k=w.prototype=b.prototype=Object.create(E);function A(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function N(e,t){function r(a,o,i,u){var l=p(e[a],e,o);if("throw"!==l.type){var c=l.arg,f=c.value;return f&&"object"==s(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,i,u)}),(function(e){r("throw",e,i,u)})):t.resolve(f).then((function(e){c.value=e,i(c)}),(function(e){return r("throw",e,i,u)}))}u(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function O(t,r,n){var a=d;return function(o,i){if(a===y)throw new Error("Generator is already running");if(a===v){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var s=n.delegate;if(s){var u=I(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===d)throw a=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=y;var l=p(t,r,n);if("normal"===l.type){if(a=n.done?v:m,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(a=v,n.method="throw",n.arg=l.arg)}}}function I(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,I(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=p(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function F(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(s(t)+" is not iterable")}return _.prototype=w,a(k,"constructor",{value:w,configurable:!0}),a(w,"constructor",{value:_,configurable:!0}),_.displayName=f(w,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,f(e,l,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},A(N.prototype),f(N.prototype,u,(function(){return this})),t.AsyncIterator=N,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new N(h(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},A(k),f(k,l,"Generator"),f(k,i,(function(){return this})),f(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=F,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(x),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return s.type="throw",s.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;x(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:F(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}function f(e,t,r,n,a,o,i){try{var s=e[o](i),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,a)}function h(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){f(o,n,a,i,s,"next",e)}function s(e){f(o,n,a,i,s,"throw",e)}i(void 0)}))}}function p(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,(void 0,a=function(e,t){if("object"!==s(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===s(a)?a:String(a)),n)}var a}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(S,e);var t,r,n,l,f,y,v,g,b,_,w,E=(_=S,w=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,t=m(_);if(w){var r=m(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function S(e,t,r){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,S),(n=E.call(this,e)).mCacheDir=t,n.mMaxNumberOfFonts=r,n.mCurrentNumberOfFonts=0,n.mDiskWriteFailCount=0,a.X.Logger.logMessage(o.ds.TRACE,"DiskCache: Constructor called with capacity: ".concat(e,".")),i.Wd.isOPFSEnabled()&&n.addExistingFilesToDiskCache(t).then((function(e){})).catch((function(e){})),n}return t=S,r=[{key:"removeRequiredSpaceFromDisk",value:(b=h(c().mark((function e(t){var r,n;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=!0;case 1:if(!r||this.haveSpace(t)&&!(this.mCurrentNumberOfFonts>=this.mMaxNumberOfFonts)){e.next=10;break}if(void 0===(n=this.getRear())){e.next=8;break}return e.next=6,this.deleteFromDisk(n.key,n.value);case 6:(r=e.sent)&&this.mCurrentNumberOfFonts--;case 8:e.next=1;break;case 10:case"end":return e.stop()}}),e,this)}))),function(e){return b.apply(this,arguments)})},{key:"isFileTooBig",value:function(e,t,r){return t>r&&(a.X.Logger.logMessage(o.ds.WARN,"DiskCache: Failed adding fontID: ".concat(e," of size ").concat(t,".")),!0)}},{key:"regularFileHandler",value:function(e,t,r){this.find(e)||this.mCurrentNumberOfFonts++;var n=this.addToFront(e,t,r);return n||(this.deleteFromDisk(e,t).then((function(e){})).catch((function(e){})),this.mCurrentNumberOfFonts--),n}},{key:"addExistingFilesToDiskCache",value:(g=h(c().mark((function e(t){var r,n,a,o;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.Wd.EnumerateDir(t);case 2:r=e.sent,n=u(r),e.prev=4,n.s();case 6:if((a=n.n()).done){e.next=15;break}if(o=a.value,!this.isFileTooBig(o.fileName,o.fileSize,this.maxCacheSize())){e.next=10;break}return e.abrupt("continue",13);case 10:return e.next=12,this.removeRequiredSpaceFromDisk(o.fileSize);case 12:t===this.mCacheDir&&this.regularFileHandler(o.fileName,o.fileName,o.fileSize);case 13:e.next=6;break;case 15:e.next=20;break;case 17:e.prev=17,e.t0=e.catch(4),n.e(e.t0);case 20:return e.prev=20,n.f(),e.finish(20);case 23:case"end":return e.stop()}}),e,this,[[4,17,20,23]])}))),function(e){return g.apply(this,arguments)})},{key:"deleteFromDisk",value:(v=h(c().mark((function e(t,r){var n,s,u;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a.X.Logger.logMessage(o.ds.TRACE,"DiskCache::DeleteFromDisk deletion call for key ".concat(t," and filename is ").concat(r," !")),n=!1,e.next=4,i.Wd.RemoveFile(this.mCacheDir,r);case 4:return s=e.sent,e.next=7,i.Wd.FileExists(this.mCacheDir,r);case 7:return u=e.sent,(s||!s&&!u)&&(this.remove(t),n=!0),e.abrupt("return",n);case 10:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"getFile",value:function(e){return this.get(e,"")}},{key:"addFile",value:(y=h(c().mark((function e(t,r,n,s){var u,l,f,h,p,d,m=this;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.Wd.FileExists(this.mCacheDir,r);case 2:if(u=e.sent,l=this.find(t),f=!0,h=this.mCacheDir,p=this.maxCacheSize(),d=function(e){if(m.mDiskWriteFailCount++,m.mDiskWriteFailCount>5)return new o.l0.Error(o.l0.ErrorCode.DISK_WRITE_FAILED,"DiskCache::AddFile - Writing file to disk failed! fileName: ".concat(e),!0)},null!=s||u){e.next=11;break}return a.X.Logger.logMessage(o.ds.WARN,"DiskCache: File was not found and there is no data to write, return error : ".concat(t," of size ").concat(n,".")),e.abrupt("return",!1);case 11:if(!u||!l){e.next=16;break}if(!f||h!==this.mCacheDir){e.next=14;break}return e.abrupt("return",this.regularFileHandler(t,r,n));case 14:case 23:e.next=36;break;case 16:if(!u){e.next=25;break}if(!this.isFileTooBig(t,n,p)){e.next=19;break}return e.abrupt("return",!1);case 19:return e.next=21,this.removeRequiredSpaceFromDisk(n);case 21:if(!f||h!==this.mCacheDir){e.next=23;break}return e.abrupt("return",this.regularFileHandler(t,r,n));case 25:if(!this.isFileTooBig(t,n,p)){e.next=27;break}return e.abrupt("return",!1);case 27:return e.next=29,this.removeRequiredSpaceFromDisk(n);case 29:return a.X.Logger.logMessage(o.ds.INFO,"DiskCache: Adding fontID in cache : ".concat(t)),e.next=32,i.Wd.WriteFile(h,r,s,n);case 32:if((f=e.sent)||d(r),!f||h!==this.mCacheDir){e.next=36;break}return e.abrupt("return",this.regularFileHandler(t,r,n));case 36:return a.X.Logger.logMessage(o.ds.WARN,"DiskCache: Failed adding fontID : ".concat(t," of size ").concat(n,".")),e.abrupt("return",!1);case 38:case"end":return e.stop()}}),e,this)}))),function(e,t,r,n){return y.apply(this,arguments)})},{key:"removeFile",value:(f=h(c().mark((function e(t,r){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.Wd.FileExists(this.mCacheDir,r);case 2:return e.sent&&this.find(t)&&(this.deleteFromDisk(t,r).then((function(e){})).catch((function(e){})),this.mCurrentNumberOfFonts--),e.abrupt("return",!0);case 5:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"handleCacheSizeUpdate",value:function(e){var t=e-this.maxCacheSize();return this.addToMaxCapacity(t),t>0||this.updateApplicableCacheSize().then((function(e){})).catch((function(e){})),!0}},{key:"updateApplicableCacheSize",value:(l=h(c().mark((function e(){var t,r;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=!0;case 1:if(!(t&&this.getCacheSize()>this.maxCacheSize())){e.next=10;break}if(void 0===(r=this.getRear())){e.next=8;break}return e.next=6,this.deleteFromDisk(r.key,r.value);case 6:(t=e.sent)&&this.mCurrentNumberOfFonts--;case 8:e.next=1;break;case 10:case"end":return e.stop()}}),e,this)}))),function(){return l.apply(this,arguments)})},{key:"clearDiskCache",value:(n=h(c().mark((function e(){var t,r;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=!0,r=this.getRear();case 2:if(!t||void 0===r){e.next=10;break}return e.next=5,this.deleteFromDisk(r.key,r.value);case 5:(t=e.sent)&&this.mCurrentNumberOfFonts--,r=this.getRear(),e.next=2;break;case 10:return e.abrupt("return",0===this.mCurrentNumberOfFonts);case 11:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"isNumberOfFontsFull",value:function(){return this.mCurrentNumberOfFonts>=this.mMaxNumberOfFonts}},{key:"updateMaxNumFonts",value:function(e){this.mMaxNumberOfFonts=e}}],r&&p(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),S}(n.z)},921198:(e,t,r)=>{"use strict";r.d(t,{WM:()=>n,jD:()=>a,vV:()=>j});var n,a,o=r(455783),i=r(97802),s=r(177579),u=r(660234),l=r(51939),c=r(206069);function f(e){return f="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},f(e)}function h(e,t,r){return(t=E(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||m(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=m(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function m(e,t){if(e){if("string"==typeof e)return y(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)?y(e,t):void 0}}function y(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 v(){v=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function c(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,i=Object.create(o.prototype),s=new C(n||[]);return a(i,"_invoke",{value:O(e,r,s)}),i}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=c;var p="suspendedStart",d="suspendedYield",m="executing",y="completed",g={};function b(){}function _(){}function w(){}var E={};l(E,i,(function(){return this}));var S=Object.getPrototypeOf,T=S&&S(S(F([])));T&&T!==r&&n.call(T,i)&&(E=T);var k=w.prototype=b.prototype=Object.create(E);function A(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function N(e,t){function r(a,o,i,s){var u=h(e[a],e,o);if("throw"!==u.type){var l=u.arg,c=l.value;return c&&"object"==f(c)&&n.call(c,"__await")?t.resolve(c.__await).then((function(e){r("next",e,i,s)}),(function(e){r("throw",e,i,s)})):t.resolve(c).then((function(e){l.value=e,i(l)}),(function(e){return r("throw",e,i,s)}))}s(u.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function O(t,r,n){var a=p;return function(o,i){if(a===m)throw new Error("Generator is already running");if(a===y){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var s=n.delegate;if(s){var u=I(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=m;var l=h(t,r,n);if("normal"===l.type){if(a=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(a=y,n.method="throw",n.arg=l.arg)}}}function I(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,I(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function F(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(f(t)+" is not iterable")}return _.prototype=w,a(k,"constructor",{value:w,configurable:!0}),a(w,"constructor",{value:_,configurable:!0}),_.displayName=l(w,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,l(e,u,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},A(N.prototype),l(N.prototype,s,(function(){return this})),t.AsyncIterator=N,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new N(c(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},A(k),l(k,u,"Generator"),l(k,i,(function(){return this})),l(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=F,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(x),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return s.type="throw",s.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;x(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:F(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}function g(e,t,r,n,a,o,i){try{var s=e[o](i),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,a)}function b(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){g(o,n,a,i,s,"next",e)}function s(e){g(o,n,a,i,s,"throw",e)}i(void 0)}))}}function _(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,E(n.key),n)}}function w(e,t,r){return t&&_(e.prototype,t),r&&_(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function E(e){var t=function(e,t){if("object"!==f(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===f(t)?t:String(t)}function S(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function T(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&&k(e,t)}function k(e,t){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},k(e,t)}function A(e){var t=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}}();return function(){var r,n=N(e);if(t){var a=N(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===f(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function N(e){return N=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},N(e)}function O(e){var t={},r=!1;function n(t,n){return r=!0,n=new Promise((function(r){r(e[t](n))})),{done:!1,value:new P(n,1)}}return t["undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator"]=function(){return this},t.next=function(e){return r?(r=!1,e):n("next",e)},"function"==typeof e.throw&&(t.throw=function(e){if(r)throw r=!1,e;return n("throw",e)}),"function"==typeof e.return&&(t.return=function(e){return r?(r=!1,e):n("return",e)}),t}function I(e){var t,r,n,a=2;for("undefined"!=typeof Symbol&&(r=Symbol.asyncIterator,n=Symbol.iterator);a--;){if(r&&null!=(t=e[r]))return t.call(e);if(n&&null!=(t=e[n]))return new L(t.call(e));r="@@asyncIterator",n="@@iterator"}throw new TypeError("Object is not async iterable")}function L(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then((function(e){return{value:e,done:t}}))}return L=function(e){this.s=e,this.n=e.next},L.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var r=this.s.return;return void 0===r?Promise.resolve({value:e,done:!0}):t(r.apply(this.s,arguments))},throw:function(e){var r=this.s.return;return void 0===r?Promise.reject(e):t(r.apply(this.s,arguments))}},new L(e)}function x(e){return new P(e,0)}function C(e){return function(){return new F(e.apply(this,arguments))}}function F(e){var t,r;function n(t,r){try{var o=e[t](r),i=o.value,s=i instanceof P;Promise.resolve(s?i.v:i).then((function(r){if(s){var u="return"===t?"return":"next";if(!i.k||r.done)return n(u,r);r=e[u](r).value}a(o.done?"return":"normal",r)}),(function(e){n("throw",e)}))}catch(e){a("throw",e)}}function a(e,a){switch(e){case"return":t.resolve({value:a,done:!0});break;case"throw":t.reject(a);break;default:t.resolve({value:a,done:!1})}(t=t.next)?n(t.key,t.arg):r=null}this._invoke=function(e,a){return new Promise((function(o,i){var s={key:e,arg:a,resolve:o,reject:i,next:null};r?r=r.next=s:(t=r=s,n(e,a))}))},"function"!=typeof e.return&&(this.return=void 0)}function P(e,t){this.v=e,this.k=t}F.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},F.prototype.next=function(e){return this._invoke("next",e)},F.prototype.throw=function(e){return this._invoke("throw",e)},F.prototype.return=function(e){return this._invoke("return",e)},function(e){e.BROWSE="browseFonts",e.VARIATION_TAGS="tagData",e.LAST_FETCHED="lastFetchedMetadata"}(n||(n={})),function(e){e.RECENTS="recentFonts",e.INIT_DETAILS="initDetails",e.SELECTIONS="selections"}(a||(a={}));var R=void 0!==indexedDB;function D(){return R}function U(){return R}var M=function(e){T(r,e);var t=A(r);function r(){var e;return S(this,r),(e=t.call(this,"BrowseFontDatabase")).version(1).stores({browseFonts:"psName, tkId, lang, variationId, *familyName, familySlug, *locFamilyName, *locStyleName",tagData:"tagId",lastFetchedMetadata:"tableName"}),e.version(2).stores({browseFonts:"psName, tkId, lang, variationId, *familyName, familySlug, *locFamilyName, *locStyleName",tagData:"tagId",lastFetchedMetadata:"tableName"}).upgrade((function(e){return e.table("browseFonts").clear()})),e.version(3).stores({browseFonts:"psName, tkId, lang, *supportedLangs, variationId, *familyName, familySlug, *locFamilyName, *locStyleName",tagData:"tagId",lastFetchedMetadata:"tableName"}).upgrade((function(e){return e.table("browseFonts").clear()})),e.version(4).stores({browseFonts:"psName, tkId, lang, *supportedLangs, variationId, *familyName, familySlug, *locFamilyName, *locStyleName, alternatePsName, variationPrefix",tagData:"tagId",lastFetchedMetadata:"tableName"}).upgrade((function(e){return e.table("browseFonts").clear()})),e.browseFonts=e.table(n.BROWSE),e.tagData=e.table(n.VARIATION_TAGS),e.lastFetchedMetadata=e.table(n.LAST_FETCHED),e.open().catch((function(e){R=!1})),e}return w(r)}(o.ZP),B=function(e){T(r,e);var t=A(r);function r(){var e;return S(this,r),(e=t.call(this,"PreferenceDatabase")).version(1).stores({recentFonts:"psName, timestamp",initDetails:"userId"}),e.version(2).stores({recentFonts:"psName, timestamp",initDetails:"userId",selections:"etag"}).upgrade((function(e){})),e.version(4).stores({recentFonts:"psName, fontJson, timestamp",initDetails:"userId",selections:"etag"}).upgrade((function(e){return e.table("recentFonts").clear()})),e.recentFonts=e.table(a.RECENTS),e.initDetails=e.table(a.INIT_DETAILS),e.selections=e.table(a.SELECTIONS),e.open().catch((function(e){R=!1})),e}return w(r)}(o.ZP),j=function(){function e(){S(this,e),this._tagMap=new Map,this._tagUpdate=new Map,this._browseDBLastModTime="",this._browseDb=new M,this._prefsDB=new B,this._memBrowseDB=new i.ZP("browseDb"),this._memBrowseDB.addCollection(n.BROWSE),this._memBrowseDB.addCollection(n.VARIATION_TAGS),this._memBrowseDB.addCollection(n.LAST_FETCHED),this._memPrefsDB=new i.ZP("prefsDB"),this._memPrefsDB.addCollection(a.RECENTS),this._memPrefsDB.addCollection(a.INIT_DETAILS),this._memPrefsDB.addCollection(a.SELECTIONS)}var t,r,o,f,y,g,_,E,T,k,A,N,L,F,P,j,G,K,H,V,W,Y,J;return w(e,[{key:"browseDb",get:function(){return this._browseDb}},{key:"prefsDB",get:function(){return this._prefsDB}},{key:"getBrowseDBWithoutDexie",value:function(){var e=this;if(this._fastBrowseDB)return Promise.resolve(this._fastBrowseDB);var t=indexedDB.open("BrowseFontDatabase",40);return new Promise((function(r,n){t.onsuccess=function(t){var n;e._fastBrowseDB=t.target.result,null===(n=e._fastBrowseDB)||void 0===n||n.addEventListener("close",(function(){e._fastBrowseDB=void 0})),r(t.target.result)},t.onerror=function(e){n(e)}}))}},{key:"getBrowseDBLastModTime",value:(J=b(v().mark((function e(t){var r,a;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t!==n.BROWSE||""===this._browseDBLastModTime){e.next=2;break}return e.abrupt("return",this._browseDBLastModTime);case 2:if(r=[],e.prev=3,!(r=this._memBrowseDB.getCollection(n.LAST_FETCHED).find({tableName:{$eq:t}})).length){e.next=8;break}e.next=22;break;case 8:if(e.t0=!0===U(),!e.t0){e.next=13;break}return e.next=12,this.trySafeOpenDB(this.browseDb);case 12:e.t0=e.sent;case 13:if(!e.t0){e.next=22;break}if(this.browseDb.table(n.LAST_FETCHED)){e.next=16;break}return e.abrupt("return","");case 16:if(!(a=this.browseDb.lastFetchedMetadata.where("tableName").equals(t))){e.next=21;break}return e.next=20,a.toArray();case 20:r=e.sent;case 21:r.length&&t===n.BROWSE&&(this._browseDBLastModTime=r[0].tableLastModified);case 22:e.next=27;break;case 24:e.prev=24,e.t1=e.catch(3),console.log(e.t1);case 27:if(!r.length){e.next=29;break}return e.abrupt("return",r[0].tableLastModified);case 29:return e.abrupt("return","");case 30:case"end":return e.stop()}}),e,this,[[3,24]])}))),function(e){return J.apply(this,arguments)})},{key:"getBrowseDbTableSize",value:(Y=b(v().mark((function e(t){var r;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._memBrowseDB.getCollection(t).count();case 3:if(!(r=e.sent)&&!1!==U()){e.next=8;break}return e.abrupt("return",r);case 8:if(e.t0=!0===U(),!e.t0){e.next=13;break}return e.next=12,this.trySafeOpenDB(this.browseDb);case 12:e.t0=e.sent;case 13:if(!e.t0){e.next=19;break}if(this.browseDb.table(t)){e.next=16;break}return e.abrupt("return",0);case 16:return e.next=18,this.browseDb.table(t).count();case 18:return e.abrupt("return",e.sent);case 19:e.next=23;break;case 21:e.prev=21,e.t1=e.catch(0);case 23:return e.abrupt("return",0);case 24:case"end":return e.stop()}}),e,this,[[0,21]])}))),function(e){return Y.apply(this,arguments)})},{key:"clearBrowseDbTables",value:(W=b(v().mark((function e(){var t,r=arguments;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=r.length>0&&void 0!==r[0]?r[0]:"",e.prev=1,e.t0=!0===U(),!e.t0){e.next=7;break}return e.next=6,this.trySafeOpenDB(this._browseDb);case 6:e.t0=e.sent;case 7:if(!e.t0){e.next=21;break}if(""!==t){e.next=18;break}return this._browseDBLastModTime="",e.next=12,this._browseDb.table(n.BROWSE).clear();case 12:return e.next=14,this._browseDb.table(n.VARIATION_TAGS).clear();case 14:return e.next=16,this._browseDb.table(n.LAST_FETCHED).clear();case 16:e.next=21;break;case 18:return t!==n.LAST_FETCHED&&t!==n.BROWSE||(this._browseDBLastModTime=""),e.next=21,this._browseDb.table(t).clear();case 21:""===t?(this._memBrowseDB.getCollection(n.BROWSE).clear(),this._memBrowseDB.getCollection(n.VARIATION_TAGS).clear(),this._memBrowseDB.getCollection(n.LAST_FETCHED).clear()):this._memBrowseDB.getCollection(t).clear(),e.next=27;break;case 24:return e.prev=24,e.t1=e.catch(1),e.abrupt("return",!1);case 27:return e.abrupt("return",!0);case 28:case"end":return e.stop()}}),e,this,[[1,24]])}))),function(){return W.apply(this,arguments)})},{key:"clearPrefsDbTables",value:(V=b(v().mark((function e(){var t,r=arguments;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=r.length>0&&void 0!==r[0]?r[0]:"",e.prev=1,!1!==D()){e.next=6;break}""===t?(this._memPrefsDB.getCollection(a.RECENTS).clear(),this._memPrefsDB.getCollection(a.INIT_DETAILS).clear(),this._memPrefsDB.getCollection(a.SELECTIONS).clear()):this._memPrefsDB.getCollection(t).clear(),e.next=20;break;case 6:return e.next=8,this.trySafeOpenDB(this._prefsDB);case 8:if(!e.sent){e.next=20;break}if(""!==t){e.next=18;break}return e.next=12,this._prefsDB.initDetails.clear();case 12:return e.next=14,this._prefsDB.recentFonts.clear();case 14:return e.next=16,this._prefsDB.selections.clear();case 16:e.next=20;break;case 18:return e.next=20,this._prefsDB.table(t).clear();case 20:return e.abrupt("return",!0);case 23:return e.prev=23,e.t0=e.catch(1),e.abrupt("return",!1);case 26:case"end":return e.stop()}}),e,this,[[1,23]])}))),function(){return V.apply(this,arguments)})},{key:"trySafeOpenDB",value:(H=b(v().mark((function e(t){return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!R||!1!==t.isOpen()){e.next=4;break}return e.next=4,t.open();case 4:return e.abrupt("return",t.isOpen());case 7:return e.prev=7,e.t0=e.catch(0),e.abrupt("return",!1);case 10:case"end":return e.stop()}}),e,null,[[0,7]])}))),function(e){return H.apply(this,arguments)})},{key:"getPrefsDbInitData",value:(K=b(v().mark((function e(t,r){return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!1!==D()){e.next=5;break}return e.abrupt("return",this._memPrefsDB.getCollection(t).findOne({userId:{$eq:r}}));case 5:return e.next=7,this.trySafeOpenDB(this._prefsDB);case 7:if(!e.sent){e.next=13;break}if(this.prefsDB.table(t)){e.next=10;break}return e.abrupt("return",!1);case 10:return e.next=12,this.prefsDB.table(t).get(r);case 12:return e.abrupt("return",e.sent);case 13:e.next=18;break;case 15:return e.prev=15,e.t0=e.catch(0),e.abrupt("return",!1);case 18:return e.abrupt("return",!1);case 19:case"end":return e.stop()}}),e,this,[[0,15]])}))),function(e,t){return K.apply(this,arguments)})},{key:"bulkPutPrefsDbData",value:(G=b(v().mark((function e(t,r){var n;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.clearPrefsDbTables(t);case 3:if(n=e.sent,!1!==D()){e.next=8;break}return e.abrupt("return",this._memPrefsDB.getCollection(t).insert(r));case 8:if(e.t0=n,!e.t0){e.next=13;break}return e.next=12,this.trySafeOpenDB(this._prefsDB);case 12:e.t0=e.sent;case 13:if(!e.t0){e.next=19;break}if(this.prefsDB.table(t)){e.next=16;break}return e.abrupt("return",!1);case 16:return e.next=18,this.prefsDB.table(t).bulkPut(r);case 18:return e.abrupt("return",e.sent);case 19:e.next=23;break;case 21:e.prev=21,e.t1=e.catch(0);case 23:case"end":return e.stop()}}),e,this,[[0,21]])}))),function(e,t){return G.apply(this,arguments)})},{key:"bulkPutIDBBrowseDbData",value:(j=b(v().mark((function e(t,r){return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,e.t0=!0===U(),!e.t0){e.next=6;break}return e.next=5,this.trySafeOpenDB(this._browseDb);case 5:e.t0=e.sent;case 6:if(!e.t0){e.next=11;break}if(this.browseDb.table(t)){e.next=9;break}return e.abrupt("return");case 9:return e.next=11,this.browseDb.table(t).bulkPut(r);case 11:e.next=16;break;case 13:return e.prev=13,e.t1=e.catch(0),e.abrupt("return",!1);case 16:return e.abrupt("return",!0);case 17:case"end":return e.stop()}}),e,this,[[0,13]])}))),function(e,t){return j.apply(this,arguments)})},{key:"bulkPutBrowseMemDbData",value:(P=b(v().mark((function e(t,r){return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._memBrowseDB.getCollection(t).insert(r);case 3:e.next=7;break;case 5:e.prev=5,e.t0=e.catch(0);case 7:case"end":return e.stop()}}),e,this,[[0,5]])}))),function(e,t){return P.apply(this,arguments)})},{key:"commitIDBTime",value:(F=b(v().mark((function e(t,r){return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,e.t0=!0===U(),!e.t0){e.next=6;break}return e.next=5,this.trySafeOpenDB(this._browseDb);case 5:e.t0=e.sent;case 6:if(!e.t0){e.next=11;break}if(this.browseDb.table(n.LAST_FETCHED)){e.next=9;break}return e.abrupt("return");case 9:return e.next=11,this.browseDb.lastFetchedMetadata.put({tableLastModified:t,tableName:r});case 11:e.next=15;break;case 13:e.prev=13,e.t1=e.catch(0);case 15:case"end":return e.stop()}}),e,this,[[0,13]])}))),function(e,t){return F.apply(this,arguments)})},{key:"commitMemDBTime",value:function(e,t){try{var r=this._memBrowseDB.getCollection(n.LAST_FETCHED);r.removeWhere((function(e){return e.tableName===t})),r.insert({tableLastModified:e,tableName:t})}catch(e){}}},{key:"putSelectionsData",value:(L=b(v().mark((function e(t,r){return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!1!==D()){e.next=7;break}return e.next=4,this.clearPrefsDbTables(a.SELECTIONS);case 4:this._memPrefsDB.getCollection(a.SELECTIONS).insert({etag:t,psNames:r}),e.next=14;break;case 7:return e.next=9,this.trySafeOpenDB(this._prefsDB);case 9:if(!e.sent){e.next=14;break}return e.next=12,this.prefsDB.selections.clear();case 12:return e.next=14,this.prefsDB.selections.put({etag:t,psNames:r});case 14:e.next=18;break;case 16:e.prev=16,e.t0=e.catch(0);case 18:case"end":return e.stop()}}),e,this,[[0,16]])}))),function(e,t){return L.apply(this,arguments)})},{key:"getSelectionsData",value:(N=b(v().mark((function e(){var t,r,n;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!1!==D()){e.next=7;break}return t=this._memPrefsDB.getCollection(a.SELECTIONS),r=t.find()[0],e.abrupt("return",r);case 7:return e.next=9,this.trySafeOpenDB(this._prefsDB);case 9:if(!e.sent){e.next=14;break}return e.next=12,this.prefsDB.selections.toArray();case 12:return n=e.sent,e.abrupt("return",n.length?n[0]:void 0);case 14:e.next=18;break;case 16:e.prev=16,e.t0=e.catch(0);case 18:case"end":return e.stop()}}),e,this,[[0,16]])}))),function(){return N.apply(this,arguments)})},{key:"dbQueryUp",value:(A=b(v().mark((function t(r,n,a,o){var i,s,u,f,m,y,g,b,_,w,E,S,T,k,A,N,O,I,L,x,C,F,P,R,D,U,M,B,j,G,K;return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=r.filter((function(e){return null!=e})),i=[],t.prev=2,t.next=5,this.getBrowseDBLastModTime(a);case 5:s=t.sent,u=!1,f=r.join("").split("").map((function(e){return e.charCodeAt(0)})),m=d(f),t.prev=9,m.s();case 11:if((y=m.n()).done){t.next=18;break}if(g=y.value,!e.isCJKUnicode(g)){t.next=16;break}return u=!0,t.abrupt("break",18);case 16:t.next=11;break;case 18:t.next=23;break;case 20:t.prev=20,t.t0=t.catch(9),m.e(t.t0);case 23:return t.prev=23,m.f(),t.finish(23);case 26:return t.next=28,this._memBrowseDB.getCollection(a);case 28:return b=t.sent,t.next=31,b.count();case 31:if(_=t.sent,w=_>0,!1!==o||!0!==u||""===s){t.next=84;break}E=[l.l0.Language.SimplifiedChinese,l.l0.Language.TraditionalChinese,l.l0.Language.Japanese,l.l0.Language.Korean],S=void 0,T=d(n),t.prev=37,T.s();case 39:if((k=T.n()).done){t.next=75;break}A=k.value,t.t1=A,t.next="locFamilyName"===t.t1?44:"familyName"===t.t1?46:"locStyleName"===t.t1?48:50;break;case 44:return S=function(e){return-1!==e.locFamilyName.join("#").indexOf(r[0])||-1!==e.locFamilyName.join("#").indexOf(r[0])},t.abrupt("break",50);case 46:return S=function(e){return-1!==e.familyName.join("#").indexOf(r[0])||-1!==e.familyName.join("#").indexOf(r[0])},t.abrupt("break",50);case 48:return S=function(e){return-1!==e.locStyleName.join("#").indexOf(r[0])||-1!==e.locStyleName.join("#").indexOf(r[0])},t.abrupt("break",50);case 50:if(!S){t.next=73;break}if(!w){t.next=58;break}N=b.find({lang:{$in:E}}).filter(S),i=i.concat(N),O=b.find({supportedLangs:{$containsAny:E}}).filter(S),i=i.concat(O),t.next=73;break;case 58:return t.next=60,this.trySafeOpenDB(this.browseDb);case 60:if(!t.sent){t.next=73;break}if(this.browseDb.table(a)){t.next=63;break}return t.abrupt("continue",73);case 63:return t.t2=i,t.next=66,this.browseDb.table(a).where("lang").anyOf(E).filter(S).toArray();case 66:return t.t3=t.sent,i=t.t2.concat.call(t.t2,t.t3),t.t4=i,t.next=71,this.browseDb.table(a).where("supportedLangs").anyOf(E).filter(S).toArray();case 71:t.t5=t.sent,i=t.t4.concat.call(t.t4,t.t5);case 73:t.next=39;break;case 75:t.next=80;break;case 77:t.prev=77,t.t6=t.catch(37),T.e(t.t6);case 80:return t.prev=80,T.f(),t.finish(80);case 83:return t.abrupt("return",i);case 84:if(""===s){t.next=165;break}if(t.prev=85,0!==r.length||0!==n.length){t.next=96;break}if(!w){t.next=91;break}return t.abrupt("return",this._memBrowseDB.getCollection(a).find());case 91:if(this.browseDb.table(a)){t.next=93;break}return t.abrupt("return",i);case 93:return t.next=95,this.browseDb.table(a).toArray();case 95:return t.abrupt("return",t.sent);case 96:I=d(n),t.prev=97,I.s();case 99:if((L=I.n()).done){t.next=152;break}if(x=L.value,!o){t.next=137;break}if(!1!==w){t.next=134;break}return t.next=105,this.getBrowseDBWithoutDexie();case 105:F=t.sent,P=[],R=F.transaction(a,"readonly").objectStore(a),D=d(r),t.prev=109,M=v().mark((function e(){var t,r;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=U.value,r=x!==R.keyPath?R.index(x).getAll(t):R.getAll(t),P.push(new Promise((function(e,t){r.onsuccess=function(){try{e(r.result)}catch(t){e(null)}},r.onerror=function(){e(null)}})));case 3:case"end":return e.stop()}}),e)})),D.s();case 112:if((U=D.n()).done){t.next=116;break}return t.delegateYield(M(),"t7",114);case 114:t.next=112;break;case 116:t.next=121;break;case 118:t.prev=118,t.t8=t.catch(109),D.e(t.t8);case 121:return t.prev=121,D.f(),t.finish(121);case 124:return t.t9=(C=i).concat,t.t10=C,t.t11=p,t.next=129,Promise.all(P);case 129:t.t12=t.sent.filter((function(e){return null!==e})),t.t13=(0,t.t11)(t.t12),i=t.t9.apply.call(t.t9,t.t10,t.t13),t.next=135;break;case 134:if("psName"===x||"alternatePsName"===x||"familySlug"===x||"variationId"===x||"tkId"===x||"lang"===x)if("familySlug"!==x)i=i.concat(b.find(h({},x,{$in:r})));else{B=d(r);try{for(B.s();!(j=B.n()).done;)G=j.value,i=i.concat(b.find(h({},x,{$eq:G})))}catch(e){B.e(e)}finally{B.f()}}else i=i.concat(b.find(h({},x,{$containsAny:r})));case 135:t.next=150;break;case 137:if(!1!==w){t.next=148;break}return t.next=140,this.trySafeOpenDB(this.browseDb);case 140:if(!t.sent){t.next=146;break}return t.t14=i,t.next=144,this.browseDb.table(a).where(x).startsWithAnyOfIgnoreCase(r).distinct().toArray();case 144:t.t15=t.sent,i=t.t14.concat.call(t.t14,t.t15);case 146:t.next=150;break;case 148:K=new RegExp("^".concat(r.map((function(e){return"".concat(e,".*")})).join("")),"i"),i=i.concat(b.find(h({},x,{$regex:K})));case 150:t.next=99;break;case 152:t.next=157;break;case 154:t.prev=154,t.t16=t.catch(97),I.e(t.t16);case 157:return t.prev=157,I.f(),t.finish(157);case 160:t.next=165;break;case 162:t.prev=162,t.t17=t.catch(85),console.error(t.t17);case 165:n.length>1&&(i=c.p.arrayUnique(i)),t.next=170;break;case 168:t.prev=168,t.t18=t.catch(2);case 170:return t.abrupt("return",i);case 171:case"end":return t.stop()}}),t,this,[[2,168],[9,20,23,26],[37,77,80,83],[85,162],[97,154,157,160],[109,118,121,124]])}))),function(e,t,r,n){return A.apply(this,arguments)})},{key:"getRecentListSorted",value:(k=b(v().mark((function e(t){var r,n;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=[],e.prev=1,!1!==D()){e.next=6;break}r=this._memPrefsDB.getCollection(a.RECENTS).chain().find().sort((function(e,t){return t.timestamp-e.timestamp})).limit(t).data(),e.next=15;break;case 6:return e.next=8,this.trySafeOpenDB(this.prefsDB);case 8:if(!e.sent){e.next=15;break}return e.next=11,this.prefsDB.recentFonts.orderBy("timestamp").reverse().limit(t);case 11:return n=e.sent,e.next=14,n.toArray();case 14:r=e.sent;case 15:e.next=19;break;case 17:e.prev=17,e.t0=e.catch(1);case 19:return e.abrupt("return",r);case 20:case"end":return e.stop()}}),e,this,[[1,17]])}))),function(e){return k.apply(this,arguments)})},{key:"getRecentListRaw",value:(T=b(v().mark((function e(t){var r,n;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=[],e.prev=1,!1!==D()){e.next=6;break}r=this._memPrefsDB.getCollection(a.RECENTS).chain().find().sort((function(e,t){return t.timestamp-e.timestamp})).limit(t).data(),e.next=15;break;case 6:return e.next=8,this.trySafeOpenDB(this.prefsDB);case 8:if(!e.sent){e.next=15;break}return e.next=11,this.prefsDB.recentFonts.orderBy("timestamp").reverse().limit(t);case 11:return n=e.sent,e.next=14,n.toArray();case 14:r=e.sent;case 15:e.next=19;break;case 17:e.prev=17,e.t0=e.catch(1);case 19:return e.abrupt("return",r);case 20:case"end":return e.stop()}}),e,this,[[1,17]])}))),function(e){return T.apply(this,arguments)})},{key:"clearInitCacheIfNeeded",value:(E=b(v().mark((function e(t,r,o){var i,s,f,h;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=!1,e.prev=1,e.next=4,this.getPrefsDbInitData(a.INIT_DETAILS,t);case 4:return s=e.sent,e.next=7,c.p.getAppropriateLocale();case 7:if(f=e.sent,!s||!1===s){e.next=17;break}if(String(s.locale)===String(f)){e.next=15;break}return e.next=12,this.clearBrowseDbTables(n.VARIATION_TAGS);case 12:return e.next=14,this.bulkPutPrefsDbData(a.INIT_DETAILS,[{userId:t,clientId:r,locale:f}]);case 14:i=!0;case 15:e.next=36;break;case 17:if(u.X.Logger.logMessage(l.ds.INFO,"Clearing prefs as changed"),!o){e.next=27;break}return e.next=21,this.clearPrefsDbTables(a.INIT_DETAILS);case 21:if(!e.sent){e.next=25;break}return e.next=25,this.bulkPutPrefsDbData(a.INIT_DETAILS,[{userId:t,clientId:r,locale:f}]);case 25:e.next=35;break;case 27:return e.next=29,this.clearPrefsDbTables();case 29:return h=e.sent,e.next=32,this.clearBrowseDbTables(n.VARIATION_TAGS);case 32:if(!h){e.next=35;break}return e.next=35,this.bulkPutPrefsDbData(a.INIT_DETAILS,[{userId:t,clientId:r,locale:f}]);case 35:i=!0;case 36:e.next=40;break;case 38:e.prev=38,e.t0=e.catch(1);case 40:return e.abrupt("return",i);case 41:case"end":return e.stop()}}),e,this,[[1,38]])}))),function(e,t,r){return E.apply(this,arguments)})},{key:"updateColumnInTable",value:(_=b(v().mark((function e(t,r,n,a){var o;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,e.t0=!0===U(),!e.t0){e.next=6;break}return e.next=5,this.trySafeOpenDB(this.browseDb);case 5:e.t0=e.sent;case 6:if(!e.t0){e.next=15;break}if(this.browseDb.table(a)){e.next=9;break}return e.abrupt("return");case 9:return e.next=11,this.browseDb.table(a).get(t);case 11:if(o=e.sent,!(r in o)){e.next=15;break}return e.next=15,this.browseDb.table(a).update(t,h({},r,n));case 15:e.next=19;break;case 17:e.prev=17,e.t1=e.catch(0);case 19:case"end":return e.stop()}}),e,this,[[0,17]])}))),function(e,t,r,n){return _.apply(this,arguments)})},{key:"putTagDataInDB",value:(g=b(v().mark((function e(t,r){var a=this;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.clearBrowseDbTables(n.VARIATION_TAGS);case 3:return e.next=5,this.bulkPutBrowseMemDbData(n.VARIATION_TAGS,r);case 5:return e.next=7,this.commitMemDBTime(t,n.VARIATION_TAGS);case 7:this.bulkPutIDBBrowseDbData(n.VARIATION_TAGS,r).then((function(e){e&&a.commitIDBTime(t,n.VARIATION_TAGS).then((function(){})).catch((function(){}))})).catch((function(e){})),e.next=12;break;case 10:e.prev=10,e.t0=e.catch(0);case 12:case"end":return e.stop()}}),e,this,[[0,10]])}))),function(e,t){return g.apply(this,arguments)})},{key:"processTagCatalogFiles",value:(y=b(v().mark((function e(t){var r,n,a,o,i,s,u,l,c,f,h,p,m,y,g,b,_,w,E,S,T,k,A;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=new Map,n=0,a=d(t),e.prev=3,a.s();case 5:if((o=a.n()).done){e.next=51;break}if(i=o.value,n+=1,!i.file){e.next=49;break}return e.next=11,i.file.text();case 11:s=e.sent.split("\n"),u=d(s),e.prev=13,u.s();case 15:if((l=u.n()).done){e.next=41;break}c=l.value,e.prev=17,f=JSON.parse(c),e.t0=n,e.next=1===e.t0?22:2===e.t0?27:3===e.t0?31:35;break;case 22:return h=f.id,(p={tagId:h,tagName:f.name,displayFont:"",synonyms:new Set,namespaceId:f.ns_id,fontsList:[]}).tagId=h,r.set(h,p),e.abrupt("break",35);case 27:if(m=f.tag_id,y=r.get(m)){g=d(f.font_ids);try{for(g.s();!(b=g.n()).done;)_=b.value,y.fontsList.push(String(_))}catch(e){g.e(e)}finally{g.f()}y.displayFont=f.rep_font_id,y.fontsList.push(y.displayFont)}return e.abrupt("break",35);case 31:if(w=f.id,E=r.get(w)){S=f.synonyms,T=d(S);try{for(T.s();!(k=T.n()).done;)A=k.value,E.synonyms.add(A)}catch(e){T.e(e)}finally{T.f()}}return e.abrupt("break",35);case 35:e.next=39;break;case 37:e.prev=37,e.t1=e.catch(17);case 39:e.next=15;break;case 41:e.next=46;break;case 43:e.prev=43,e.t2=e.catch(13),u.e(e.t2);case 46:return e.prev=46,u.f(),e.finish(46);case 49:e.next=5;break;case 51:e.next=56;break;case 53:e.prev=53,e.t3=e.catch(3),a.e(e.t3);case 56:return e.prev=56,a.f(),e.finish(56);case 59:return e.abrupt("return",r);case 60:case"end":return e.stop()}}),e,null,[[3,53,56,59],[13,43,46,49],[17,37]])}))),function(e){return y.apply(this,arguments)})},{key:"getFontDataFromVariationId",value:(f=b(v().mark((function e(t,r){var a,o,i,u,f,h,p,m,y,g=arguments;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=g.length>2&&void 0!==g[2]?g[2]:l.l0.FontType.DEFAULT,o=new Map,e.prev=2,e.next=5,this.dbQueryUp(t,["variationId"],n.BROWSE,!0);case 5:i=e.sent,u=d(i),e.prev=7,u.s();case 9:if((f=u.n()).done){e.next=34;break}if(h=f.value,""===(p=c.p.createFontFromDBData(h,r,a)).postscriptName){e.next=32;break}o.set(p.postscriptName,p),m=d(s.yZ._schedulersList),e.prev=15,m.s();case 17:if((y=m.n()).done){e.next=24;break}if(!y.value.cachedFonts().has(p.postscriptName)){e.next=22;break}return p.isActiveForUser=!0,e.abrupt("break",24);case 22:e.next=17;break;case 24:e.next=29;break;case 26:e.prev=26,e.t0=e.catch(15),m.e(e.t0);case 29:return e.prev=29,m.f(),e.finish(29);case 32:e.next=9;break;case 34:e.next=39;break;case 36:e.prev=36,e.t1=e.catch(7),u.e(e.t1);case 39:return e.prev=39,u.f(),e.finish(39);case 42:e.next=46;break;case 44:e.prev=44,e.t2=e.catch(2);case 46:return e.abrupt("return",o);case 47:case"end":return e.stop()}}),e,this,[[2,44],[7,36,39,42],[15,26,29,32]])}))),function(e,t){return f.apply(this,arguments)})},{key:"executorDisplayFont",value:(o=b(v().mark((function e(t,r){var n,a;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getFontDataFromVariationId([t.displayFont],r);case 2:return n=e.sent,a=new l.K1,n.size&&(a=n.values().next().value),"ornaments"===t.tagId&&(a=new l.K1),e.abrupt("return",a);case 7:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"executorAggregation",value:(r=b(v().mark((function e(t,r,n){var a,o;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==t.length){e.next=2;break}return e.abrupt("return",new l.mP);case 2:return e.next=4,this.getFontDataFromVariationId(t,r);case 4:return a=e.sent,o=Array.from(a.values()),r===l.l0.AppEntitlement.PAID&&(o=o.filter((function(e){return n===l.l0.Entitlement.FULL||!0!==e.isPremiumFont}))),r===l.l0.AppEntitlement.FREE&&(o=o.filter((function(e){return!0!==e.isPremiumFont}))),e.abrupt("return",c.p.getAggregationFromFonts(o));case 9:case"end":return e.stop()}}),e,this)}))),function(e,t,n){return r.apply(this,arguments)})},{key:"getAggregationFromTagId",value:(t=b(v().mark((function e(t,r,n){var a,o;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=null!==(a=this._tagMap.get(t))&&void 0!==a?a:[],e.next=4,this.executorAggregation(o,r,n);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e,this)}))),function(e,r,n){return t.apply(this,arguments)})},{key:"yieldFamilyFromTagIDV2",value:function(e,t,r,n,a){var o=this;return C(v().mark((function i(){var s,u,f,h,p,m,y,g,b,_,w,E,S;return v().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(0!==e.length&&""!==n){i.next=2;break}return i.abrupt("return");case 2:return i.next=4,x(o.getFontDataFromVariationId(e,t));case 4:s=i.sent,u=new l.FX(n),f=d(s.values());try{for(f.s();!(h=f.n()).done;)p=h.value,u.addFont(p.postscriptName,p),p.family=u}catch(e){f.e(e)}finally{f.f()}if((m=new l.mP).addFamily(n,u),c.p.setDisplayFontForEachFamilyIfNeeded(m),y=m.getEntries(),r!==l.l0.Entitlement.FULL){i.next=32;break}g=d(y),i.prev=14,g.s();case 16:if((b=g.n()).done){i.next=22;break}return _=b.value,i.next=20,_[1];case 20:i.next=16;break;case 22:i.next=27;break;case 24:i.prev=24,i.t0=i.catch(14),g.e(i.t0);case 27:return i.prev=27,g.f(),i.finish(27);case 30:i.next=53;break;case 32:if(!1!==u.isPremium){i.next=52;break}w=d(y),i.prev=34,w.s();case 36:if((E=w.n()).done){i.next=42;break}return S=E.value,i.next=40,S[1];case 40:i.next=36;break;case 42:i.next=47;break;case 44:i.prev=44,i.t1=i.catch(34),w.e(i.t1);case 47:return i.prev=47,w.f(),i.finish(47);case 50:i.next=53;break;case 52:a.push(u);case 53:case"end":return i.stop()}}),i,null,[[14,24,27,30],[34,44,47,50]])})))()}},{key:"getAggregationFromTagIdV2",value:function(e,t,r){var a=this;return C(v().mark((function o(){var i,s,f,h,p,y,g,b,_,w,E,S,T,k,A,N,L,C,F;return v().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(s=[],0!==(s=null!==(i=a._tagMap.get(e))&&void 0!==i?i:[]).length){o.next=4;break}return o.abrupt("return");case 4:if(!s[0].includes("##")){o.next=48;break}f="",h="",p="",y=[],g=[],b=d(s),o.prev=11,b.s();case 13:if((_=b.n()).done){o.next=29;break}if(2!==(w=_.value).split("##").length){o.next=27;break}if(f=w.split("##")[0],h=w.split("##")[1],""!==p&&p!==f){o.next=23;break}y.push(h),p=f,o.next=27;break;case 23:return o.delegateYield(O(I(a.yieldFamilyFromTagIDV2(y,t,r,p,g))),"t0",24);case 24:p=f,(y=[]).push(h);case 27:o.next=13;break;case 29:o.next=34;break;case 31:o.prev=31,o.t1=o.catch(11),b.e(o.t1);case 34:return o.prev=34,b.f(),o.finish(34);case 37:return o.delegateYield(O(I(a.yieldFamilyFromTagIDV2(y,t,r,p,g))),"t2",38);case 38:E=0,S=g;case 39:if(!(E<S.length)){o.next=46;break}return T=S[E],o.next=43,T;case 43:E++,o.next=39;break;case 46:o.next=71;break;case 48:return o.next=50,x(a.executorAggregation(s,t,r));case 50:k=o.sent,A=function(){var t,o,i=performance.now(),s=[];if(!0!==a._tagUpdate.get(e)){var f,h=d(k.getEntries(l.l0.SortOrderPreference.ENTITLEMENT,r));try{for(h.s();!(f=h.n()).done;){var p,y=d((t=f.value,o=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,s=[],u=!0,l=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){l=!0,a=e}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw a}}return s}}(t,o)||m(t,o)||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.")}())[1].getEntries());try{for(y.s();!(p=y.n()).done;){var v=p.value,g=v.familyName,b=c.p.getVariationIdFromTkId(v.fontId);b&&s.push("".concat(g,"##").concat(b))}}catch(e){y.e(e)}finally{y.f()}}}catch(e){h.e(e)}finally{h.f()}a.updateColumnInTable(e,"fontsList",s,n.VARIATION_TAGS),a._tagUpdate.set(e,!0),u.X.Logger.logMessage(l.ds.DEBUG,"lazyUpdateTagTable operations done Took ".concat(Math.round(performance.now()-i)," milliseconds."))}},void 0!==a._tagUpdate.get(e)&&!1!==a._tagUpdate.get(e)||setTimeout(A,5e3),N=k.getEntries(l.l0.SortOrderPreference.ENTITLEMENT,r),L=d(N),o.prev=55,L.s();case 57:if((C=L.n()).done){o.next=63;break}return F=C.value,o.next=61,F[1];case 61:o.next=57;break;case 63:o.next=68;break;case 65:o.prev=65,o.t3=o.catch(55),L.e(o.t3);case 68:return o.prev=68,L.f(),o.finish(68);case 71:case"end":return o.stop()}}),o,null,[[11,31,34,37],[55,65,68,71]])})))()}},{key:"getVariationDataFromFetchedDBData",value:function(e,t,r){var n,a=this,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],s=new Map;!function(e){e[e.NAME=0]="NAME",e[e.SYNONYMS=1]="SYNONYMS",e[e.NAME_FUZZY=2]="NAME_FUZZY",e[e.SINGLE_LETTER_STARTS_WITH=3]="SINGLE_LETTER_STARTS_WITH",e[e.SINGLE_LETTER_FUZZY=4]="SINGLE_LETTER_FUZZY"}(n||(n={}));var u=function(i,u){var c,f=arguments.length>2&&void 0!==arguments[2]&&arguments[2],h=d(e);try{var p=function(){var e,h=c.value,p=!i.length,m=d(i);try{for(m.s();!(e=m.n()).done;){var y=e.value;if(0!==y.length){switch(u){case n.NAME:(h.tagName.toLowerCase()===y.toLowerCase()||h.tagName.toLowerCase().startsWith(y.toLowerCase()))&&(p=!0);break;case n.SYNONYMS:var g=Array.from(h.synonyms).join("##").toLowerCase(),_=f?"##".concat(y).toLowerCase():y.toLowerCase();y.length>2&&-1!==g.indexOf(_)&&(p=!0);break;case n.NAME_FUZZY:y.length>1&&-1!==h.tagName.toLowerCase().indexOf(y.toLowerCase())&&(p=!0);break;case n.SINGLE_LETTER_STARTS_WITH:1===y.length&&h.tagName.toLowerCase().startsWith(y.toLowerCase())&&(p=!0);break;case n.SINGLE_LETTER_FUZZY:1===y.length&&-1!==h.tagName.toLowerCase().indexOf(y.toLowerCase())&&(p=!0)}if(p)break}}}catch(e){m.e(e)}finally{m.f()}if(!1===p)return 1;var w=new l.l0.VariationTag(h.tagId,h.tagName);s.set(h.tagId,w);var E=function(){var e=b(v().mark((function e(){return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.executorDisplayFont(h,t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();if(w.executorDisplayFontInternal=E,o)a._tagMap.set(h.tagId,h.fontsList),w.executorAggregatorInternal=void 0;else{var S=function(){var e=b(v().mark((function e(){return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.executorAggregation(h.fontsList,t,r);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();w.executorAggregatorInternal=S}w.synonyms=h.synonyms};for(h.s();!(c=h.n()).done;)p()}catch(e){h.e(e)}finally{h.f()}};if(i.length){if(u(i,n.NAME),u(i,n.SYNONYMS),s.size<5)for(var c=0,f=[n.NAME_FUZZY,n.SINGLE_LETTER_STARTS_WITH];c<f.length;c++)u(i,f[c]);if(s.size<5)for(1===i.length&&u(i,n.SINGLE_LETTER_FUZZY);i[0].length&&s.size<2;){for(var h in i)i[h]=i[h].substring(0,i[h].length/2);u(i,n.NAME),u(i,n.SYNONYMS,!0),u(i,n.NAME_FUZZY),u(i,n.SINGLE_LETTER_STARTS_WITH)}}else u([],n.NAME);return new Map(i.length?p(s.entries()):p(s.entries()).sort((function(e,t){return e[1].tagName.localeCompare(t[1].tagName)})))}}],[{key:"isCJKUnicode",value:function(e){return e>=13056&&e<=13311||e>=65072&&e<=65103||e>=63744&&e<=64255||e>=12352&&e<=12447||e>=12448&&e<=12543||e>=11904&&e<=12031||e>=19968&&e<=40959||e>=13312&&e<=19903||e>=131072&&e<=173791||e>=173824&&e<=177983||e>=177984&&e<=178207||e>=178208&&e<=183983||e>=194560&&e<=195103}}]),e}()},950150:(e,t,r)=>{"use strict";r.d(t,{C:()=>n,d:()=>h});var n,a=r(372482);function o(e){return o="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},o(e)}function i(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return s(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)?s(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){u=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(u)throw o}}}}function s(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 u(){u=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},s=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function h(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,i=Object.create(o.prototype),s=new C(n||[]);return a(i,"_invoke",{value:O(e,r,s)}),i}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=h;var d="suspendedStart",m="suspendedYield",y="executing",v="completed",g={};function b(){}function _(){}function w(){}var E={};f(E,s,(function(){return this}));var S=Object.getPrototypeOf,T=S&&S(S(F([])));T&&T!==r&&n.call(T,s)&&(E=T);var k=w.prototype=b.prototype=Object.create(E);function A(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function N(e,t){function r(a,i,s,u){var l=p(e[a],e,i);if("throw"!==l.type){var c=l.arg,f=c.value;return f&&"object"==o(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(f).then((function(e){c.value=e,s(c)}),(function(e){return r("throw",e,s,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return i=i?i.then(a,a):a()}})}function O(t,r,n){var a=d;return function(o,i){if(a===y)throw new Error("Generator is already running");if(a===v){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var s=n.delegate;if(s){var u=I(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===d)throw a=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=y;var l=p(t,r,n);if("normal"===l.type){if(a=n.done?v:m,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(a=v,n.method="throw",n.arg=l.arg)}}}function I(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,I(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=p(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function F(t){if(t||""===t){var r=t[s];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,i=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(o(t)+" is not iterable")}return _.prototype=w,a(k,"constructor",{value:w,configurable:!0}),a(w,"constructor",{value:_,configurable:!0}),_.displayName=f(w,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,f(e,c,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},A(N.prototype),f(N.prototype,l,(function(){return this})),t.AsyncIterator=N,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new N(h(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},A(k),f(k,c,"Generator"),f(k,s,(function(){return this})),f(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=F,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(x),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return s.type="throw",s.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;x(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:F(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}function l(e,t,r,n,a,o,i){try{var s=e[o](i),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,a)}function c(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){l(o,n,a,i,s,"next",e)}function s(e){l(o,n,a,i,s,"throw",e)}i(void 0)}))}}function f(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,(void 0,a=function(e,t){if("object"!==o(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===o(a)?a:String(a)),n)}var a}!function(e){e.LANG_FILTER_DUMMY_ENDPOINT_PREFIX="/langFilter",e.LANG_FILTER_DUMMY_ENDPOINT_SUFFIX=".json",e.BYOF_LIST_ENDPOINT_PREFIX="/byof_list",e.BYOF_LIST_ENDPOINT_SUFFIX=".json",e.BYOF_SCRIPT_ENDPOINT_PREFIX="/byof_script",e.BYOF_SCRIPT_ENDPOINT_SUFFIX=".json",e.BYOF_ETAG_ENDPOINT_PREFIX="/byof_etag",e.BYOF_ETAG_ENDPOINT_SUFFIX=".json",e.SELECTIONS_LIST_ENDPOINT_PREFIX="/selections_list_",e.SELECTIONS_LIST_ENDPOINT_SUFFIX=".json",e.SELECTIONS_ETAG_ENDPOINT_PREFIX="/selections_etag",e.SELECTIONS_ETAG_ENDPOINT_SUFFIX=".json",e.VARIABLE_FONT_ENDPOINT_PREFIX="/variable/",e.VARIABLE_FONT_ENDPOINT_SUFFIX=".json",e.APP_FONT_ENDPOINT_PREFIX="/app/",e.APP_FONT_ENDPOINT_SUFFIX=".json",e.DEFAULT_FONT_ENDPOINT_PREFIX="/default/",e.DEFAULT_FONT_ENDPOINT_SUFFIX=".json",e.BYOF_FONT_ENDPOINT_PREFIX="/byof_buffer/",e.BYOF_FONT_ENDPOINT_SUFFIX=".json",e.ENTITLEMENT_ENDPOINT_PREFIX="/entitlement_",e.ENTITLEMENT_ENDPOINT_SUFFIX=".json",e.BYOF_ACCESS_ENDPOINT_PREFIX="/byof_access",e.BYOF_ACCESS_ENDPOINT_SUFFIX=".json",e.SYSTEM_FONTS_ENDPOINT_PREFIX="/system_fonts",e.SYSTEM_FONTS_ENDPOINT_SUFFIX=".json",e.LOCAL_ACCESS_ENDPOINT_PREFIX="/packaged_fonts",e.LOCAL_ACCESS_ENDPOINT_SUFFIX=".json"}(n||(n={}));var h=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._cacheName="tqweb-responsestorage",this._cacheObject=void 0,this._inMemoryCachedResponses=new Map,this.init().then((function(e){})).catch((function(e){}))}var t,r,n,o,s,l,h,p,d,m;return t=e,r=[{key:"init",value:(m=c(u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,caches.open(this._cacheName);case 3:this._cacheObject=e.sent,e.next=8;break;case 6:e.prev=6,e.t0=e.catch(0);case 8:case"end":return e.stop()}}),e,this,[[0,6]])}))),function(){return m.apply(this,arguments)})},{key:"getValue",value:(d=c(u().mark((function e(t){var r,n;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,void 0!==this._cacheObject){e.next=5;break}return e.next=4,caches.open(this._cacheName);case 4:this._cacheObject=e.sent;case 5:if(!this._cacheObject){e.next=14;break}return e.next=8,this._cacheObject.match(t);case 8:if(!(r=e.sent)||r.status!==a.t.ResponseStatus.OK){e.next=14;break}return e.next=12,r.json();case 12:return n=e.sent,e.abrupt("return",n);case 14:e.next=18;break;case 16:e.prev=16,e.t0=e.catch(0);case 18:return e.abrupt("return",void 0);case 19:case"end":return e.stop()}}),e,this,[[0,16]])}))),function(e){return d.apply(this,arguments)})},{key:"putValue",value:(p=c(u().mark((function e(t,r){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!this._cacheObject){e.next=4;break}return e.next=4,this._cacheObject.put(t,new Response(JSON.stringify(r)));case 4:e.next=8;break;case 6:e.prev=6,e.t0=e.catch(0);case 8:case"end":return e.stop()}}),e,this,[[0,6]])}))),function(e,t){return p.apply(this,arguments)})},{key:"matchKey",value:(h=c(u().mark((function e(t){var r,n,a,o,s;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r="",e.prev=1,!this._cacheObject){e.next=8;break}return e.next=5,this._cacheObject.keys();case 5:n=e.sent,a=i(n);try{for(a.s();!(o=a.n()).done;)-1!==(s=o.value).url.indexOf(t)&&(r=s.url.substring(s.url.indexOf(t)))}catch(e){a.e(e)}finally{a.f()}case 8:e.next=12;break;case 10:e.prev=10,e.t0=e.catch(1);case 12:return e.abrupt("return",r);case 13:case"end":return e.stop()}}),e,this,[[1,10]])}))),function(e){return h.apply(this,arguments)})},{key:"getBlobValue",value:(l=c(u().mark((function e(t){var r,n;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,void 0!==this._cacheObject){e.next=5;break}return e.next=4,caches.open(this._cacheName);case 4:this._cacheObject=e.sent;case 5:if(!this._cacheObject){e.next=14;break}return e.next=8,this._cacheObject.match(t);case 8:if(!(r=e.sent)||r.status!==a.t.ResponseStatus.OK){e.next=14;break}return e.next=12,r.blob();case 12:return n=e.sent,e.abrupt("return",n);case 14:e.next=18;break;case 16:e.prev=16,e.t0=e.catch(0);case 18:return e.abrupt("return",void 0);case 19:case"end":return e.stop()}}),e,this,[[0,16]])}))),function(e){return l.apply(this,arguments)})},{key:"putBlobValue",value:(s=c(u().mark((function e(t,r){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!this._cacheObject){e.next=4;break}return e.next=4,this._cacheObject.put(t,new Response(r));case 4:e.next=8;break;case 6:e.prev=6,e.t0=e.catch(0);case 8:case"end":return e.stop()}}),e,this,[[0,6]])}))),function(e,t){return s.apply(this,arguments)})},{key:"deleteValue",value:(o=c(u().mark((function e(t){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!this._cacheObject){e.next=4;break}return e.next=4,this._cacheObject.delete(t);case 4:e.next=8;break;case 6:e.prev=6,e.t0=e.catch(0);case 8:case"end":return e.stop()}}),e,this,[[0,6]])}))),function(e){return o.apply(this,arguments)})},{key:"getInMemoryOrFromResponseCache",value:(n=c(u().mark((function e(t){var r,n,a=arguments;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=a.length>1&&void 0!==a[1]&&a[1],null!=(n=this._inMemoryCachedResponses.get(t))){e.next=13;break}if(!r){e.next=9;break}return e.next=6,this.getBlobValue(t);case 6:n=e.sent,e.next=12;break;case 9:return e.next=11,this.getValue(t);case 11:n=e.sent;case 12:this._inMemoryCachedResponses.set(t,n);case 13:return e.abrupt("return",n);case 14:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})}],r&&f(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}()},372482:(e,t,r)=>{"use strict";var n;r.d(t,{t:()=>n}),function(e){var t,r,n,a,o,i,s,u;e.AF_CATALOG_VERSION="2.3.0",e.AF_COMPLETE_CATALOG_URL_PREFIX="/try/library/full/library-v",e.AF_COMPLETE_CATALOG_URL_SUFFIX=".json",e.VARIABLE_FONT_CUSTOM_STYLE_NAME="Custom",(u=e.RequestMethod||(e.RequestMethod={})).GET="GET",u.POST="POST",u.DELETE="DELETE",u.PUT="PUT",u.PATCH="PATCH",u.HEAD="HEAD",(s=e.HeaderKey||(e.HeaderKey={})).ACCESS_TOKEN="X-Access-Token",s.API_KEY="X-API-Key",s.ANS_APP_ID="x-adobe-app-id",s.X_REQUEST_ID="x-request-id",s.AUTHORIZARION="Authorization",s.USER_AUTHORIZARION="x-user-token",s.SUBSET_SERVICE_AUTHORIZATION="x-af-auth-token",s.COLLABORATION_AUTHORIZATION="x-af-collab-token",s.BYPASS_AUTHORIZARION="x-bypass-auth",s.CONTENT_TYPE="Content-Type",s.CONTENT_LEGTH="Content-Length",s.LOCATION="Location",s.IF_NONE_MATCH="If-None-Match",s.IF_MODIFIED_SINCE="If-Modified-Since",s.IF_MATCH="If-Match",s.ETAG="ETag",s.ACCEPT_ENCODING="Accept-Encoding",s.CONTENT_ENCODING="Content-Encoding",s.ACCEPT="Accept",s.RETRY_AFTER="Retry-After",s.USER_AGENT="User-Agent",s.SESSION_ID="Session-id",(i=e.HeaderValue||(e.HeaderValue={})).ACCEPT_JSON="application/json",i.BEARER="Bearer ",i.ALL="*/*",i.MULTIPART_FORM_DATA="multipart/form-data",(o=e.ServerUrl||(e.ServerUrl={})).TYPEKIT_PROD="https://cctypekit.adobe.io",o.TYPEKIT_STAGE="https://cctypekit-relstage.adobe.io",o.FASTER_PROD="https://faster.typekit.net",o.FASTER_STAGE="https://faster-staging.typekit.net",o.USE_FONTS_PROD="https://use.typekit.net",o.USE_FONTS_STAGE="https://use-staging.typekit.net",o.FONT_SERVICE_PROD="https://font-services.adobe.io",o.FONT_SERVICE_STAGE="https://font-services-stage.adobe.io",o.BYOF_PROD="https://byof.adobe.io",o.BYOF_STAGE="https://byof-stage.adobe.io",o.ANS_PROD="https://notify.adobe.io",o.ANS_STAGE="https://notify-stage.adobe.io",(a=e.ServerAPI||(e.ServerAPI={})).TYPEKIT_HEALTHCHECK="/healthcheck/all",a.TYPEKIT_SEARCH="/v1/variations/match",a.TYPEKIT_DOWNLOAD="/v1/variations/",a.TYPEKIT_TAG_CATALOGS="/v1/tag_catalog",a.TYPEKIT_CATALOG_URL="/v1/font_catalog",a.TYPEKIT_TOKEN="/v1/cdn/token",a.TYPEKIT_SELECTIONS="/v1/selections",a.TYPEKIT_GET_FAMILIES="/v1/families/",a.TYPEKIT_SEARCH_FAMILIES="/v1/families",a.TYPEKIT_RECOMMENDATION_URLS="/v1/recommendations/endpoints",a.USEFONT_USAGE="/v1/font_uses",a.TYPEKIT_LANG_NAMES="/v1/filters/languages",a.USEFONT_DOWNLOAD_PREFIX="/ff/",a.USEFONT_DOWNLOAD_SUFFIX_RAW_PROTECTED="/p/",a.USEFONT_DOWNLOAD_SUFFIX_RAW="/j/",a.USEFONT_DOWNLOAD_SUFFIX_WOFF="/d/",a.USEFONT_DOWNLOAD_SUFFIX_WOFF2="/l/",a.BYOF_LIST="/font_list",a.BYOF_DOWNLOAD="/download_auth",a.BYOF_UPLOAD_HANDSHAKE="/upload_url",a.BYOF_UPLOAD_ACCESS_CHECK="/access_level",a.BYOF_AUTH_DELETE="/authorization",a.BYOF_BLOCKLISTED_FONTS_CHECK="/blacklisted_fonts/postscript_names",a.ANS_QUERY_NOTIFICATIONS="/ans/v1/notifications",a.COLLABORATION_FONT_AUTH_URL="/v1/collaboration/font_auth",a.TYPEKIT_UNICODE_RANGE_MATCH="/unicode_range_match",(n=e.FontsWeb||(e.FontsWeb={})).PROD="https://fonts.adobe.com/",n.STAGE="https://fonts-relstage.adobe.com/",(r=e.ServerQueryParams||(e.ServerQueryParams={})).INSTALL_STATE_KEY="install_state=",r.INSTALL_STATE_VALUE="os,cc",r.LIBRARY_KEY="library=",r.LIBRARY_VALUE_TAGS="full",r.PAGE_ID_KEY="page=",r.PER_PAGE_ID_KEY="per_page=",r.LOCALE_KEY="locale=",r.CULTURAL_LOCALE_KEY="cultural_locale=",r.VERSION_KEY="v=",r.VERSION_VALUE_TAGS="1.0.0",r.SEARCH_KEY="q=",r.BROWSE_MODE_KEY="browse_mode=",r.BROWSE_MODE_VALUE_ALL="all",r.CHECKSUM_KEY="checksum=",r.CHECKSUMS_KEY="checksums=",r.PAGE_SIZE_KEY="page_size=",r.CONFIG_VERSION_KEY="config_version=",r.CURRENT_TIMESTAMP_KEY="from=",r.FUTURE_TIMESTAMP_KEY="to=",r.FONT_TECHNOLOGY_KEY="font_technology=",r.LIMIT_KEY="limit=",(t=e.ResponseStatus||(e.ResponseStatus={}))[t.OFFLINE=0]="OFFLINE",t[t.OK=200]="OK",t[t.NO_CONTENT=204]="NO_CONTENT",t[t.PARTIAL_CONTENT=206]="PARTIAL_CONTENT",t[t.REDIRECTED=301]="REDIRECTED",t[t.FOUND=302]="FOUND",t[t.NOT_MODIFIED=304]="NOT_MODIFIED",t[t.USE_PROXY=305]="USE_PROXY",t[t.REDIRECT_TEMP=307]="REDIRECT_TEMP",t[t.REDIRECT_PERMANENTLY=308]="REDIRECT_PERMANENTLY",t[t.BAD_REQUEST=400]="BAD_REQUEST",t[t.UNAUTHORIZED=401]="UNAUTHORIZED",t[t.FORBIDDEN=403]="FORBIDDEN",t[t.NOT_FOUND=404]="NOT_FOUND",t[t.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",t[t.PROXY_REQUIRED=407]="PROXY_REQUIRED",t[t.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",t[t.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",t[t.RETRY_WITH=449]="RETRY_WITH",t[t.SERVER_ERROR=500]="SERVER_ERROR",t[t.NOT_IMPLMENTED=501]="NOT_IMPLMENTED",t[t.BAD_GATEWAY=502]="BAD_GATEWAY",t[t.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",t[t.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",t[t.NETWORK_AUTH_NEEDED=511]="NETWORK_AUTH_NEEDED",t[t.NETWORK_READ_TIMEOUT=598]="NETWORK_READ_TIMEOUT",t[t.NETWORK_CONNECT_TIMEOUT=599]="NETWORK_CONNECT_TIMEOUT",e.defaultPollInterval=10,e.fontInfoMap=new Map([["AdobeClean-Regular","7180"],["AdobeClean-It","7181"],["AdobeClean-Bold","7182"],["AdobeClean-BoldIt","7183"],["AdobeClean-Light","7184"],["AdobeClean-ExtraBold","7185"],["AdobeClean-Black","22474"],["AdobeClean-BlackIt","22475"],["AdobeClean-ExtraBoldIt","22476"],["AdobeClean-LightIt","22477"],["AdobeClean-Medium","28180"],["AdobeClean-BoldCond","22148"],["AdobeClean-Cond","22149"],["AdobeClean-BoldCondIt","22480"],["AdobeClean-CondIt","22484"],["AdobeCleanHanHC-ExtraLight","43506"],["AdobeCleanHanHC-Light","43507"],["AdobeCleanHanHC-Normal","43508"],["AdobeCleanHanHC-Regular","43509"],["AdobeCleanHanHC-Bold","43510"],["AdobeCleanHanHC-ExtraBold","43511"],["AdobeCleanHanHC-Black","43512"],["AdobeCleanHan-Black","25526"],["AdobeCleanHan-Bold","25527"],["AdobeCleanHan-ExtraBold","25528"],["AdobeCleanHan-ExtraLight","25529"],["AdobeCleanHan-Light","25530"],["AdobeCleanHan-Normal","25531"],["AdobeCleanHan-Regular","25532"],["AdobeCleanHanK-Black","25533"],["AdobeCleanHanK-Bold","25534"],["AdobeCleanHanK-ExtraBold","25535"],["AdobeCleanHanK-ExtraLight","25536"],["AdobeCleanHanK-Light","25537"],["AdobeCleanHanK-Normal","25538"],["AdobeCleanHanK-Regular","25539"],["AdobeCleanHanSC-Black","25551"],["AdobeCleanHanSC-Bold","25552"],["AdobeCleanHanSC-ExtraBold","25553"],["AdobeCleanHanSC-ExtraLight","25554"],["AdobeCleanHanSC-Light","25555"],["AdobeCleanHanSC-Normal","25556"],["AdobeCleanHanSC-Regular","25557"],["AdobeCleanHanTC-Black","25558"],["AdobeCleanHanTC-Bold","25692"],["AdobeCleanHanTC-ExtraBold","25693"],["AdobeCleanHanTC-ExtraLight","25694"],["AdobeCleanHanTC-Light","25695"],["AdobeCleanHanTC-Normal","25696"],["AdobeCleanHanTC-Regular","25697"],["AdobeClean-SemiCn","22547"],["AdobeClean-SemiCnIt","22548"],["AdobeClean-BoldSemiCn","22549"],["AdobeClean-BoldSemiCnIt","22550"],["AdobeClean-SemiLight","22795"],["AdobeClean-SemiLightIt","22796"]])}(n||(n={}))},461660:(e,t,r)=>{"use strict";r.d(t,{Wd:()=>g,xB:()=>d});var n=r(660234),a=r(51939);function o(e){return o="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},o(e)}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,s=[],u=!0,l=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){l=!0,a=e}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw a}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return s(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)?s(e,t):void 0}}(e,t)||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.")}()}function s(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 u(){u=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},s=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function h(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,i=Object.create(o.prototype),s=new C(n||[]);return a(i,"_invoke",{value:O(e,r,s)}),i}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=h;var d="suspendedStart",m="suspendedYield",y="executing",v="completed",g={};function b(){}function _(){}function w(){}var E={};f(E,s,(function(){return this}));var S=Object.getPrototypeOf,T=S&&S(S(F([])));T&&T!==r&&n.call(T,s)&&(E=T);var k=w.prototype=b.prototype=Object.create(E);function A(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function N(e,t){function r(a,i,s,u){var l=p(e[a],e,i);if("throw"!==l.type){var c=l.arg,f=c.value;return f&&"object"==o(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(f).then((function(e){c.value=e,s(c)}),(function(e){return r("throw",e,s,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return i=i?i.then(a,a):a()}})}function O(t,r,n){var a=d;return function(o,i){if(a===y)throw new Error("Generator is already running");if(a===v){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var s=n.delegate;if(s){var u=I(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===d)throw a=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=y;var l=p(t,r,n);if("normal"===l.type){if(a=n.done?v:m,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(a=v,n.method="throw",n.arg=l.arg)}}}function I(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,I(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=p(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function F(t){if(t||""===t){var r=t[s];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,i=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(o(t)+" is not iterable")}return _.prototype=w,a(k,"constructor",{value:w,configurable:!0}),a(w,"constructor",{value:_,configurable:!0}),_.displayName=f(w,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,f(e,c,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},A(N.prototype),f(N.prototype,l,(function(){return this})),t.AsyncIterator=N,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new N(h(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},A(k),f(k,c,"Generator"),f(k,s,(function(){return this})),f(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=F,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(x),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return s.type="throw",s.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;x(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:F(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}function l(e,t,r,n,a,o,i){try{var s=e[o](i),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,a)}function c(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){l(o,n,a,i,s,"next",e)}function s(e){l(o,n,a,i,s,"throw",e)}i(void 0)}))}}function f(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,(void 0,a=function(e,t){if("object"!==o(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===o(a)?a:String(a)),n)}var a}function h(e){var t,r,n,a=2;for("undefined"!=typeof Symbol&&(r=Symbol.asyncIterator,n=Symbol.iterator);a--;){if(r&&null!=(t=e[r]))return t.call(e);if(n&&null!=(t=e[n]))return new p(t.call(e));r="@@asyncIterator",n="@@iterator"}throw new TypeError("Object is not async iterable")}function p(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then((function(e){return{value:e,done:t}}))}return p=function(e){this.s=e,this.n=e.next},p.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var r=this.s.return;return void 0===r?Promise.resolve({value:e,done:!0}):t(r.apply(this.s,arguments))},throw:function(e){var r=this.s.return;return void 0===r?Promise.reject(e):t(r.apply(this.s,arguments))}},new p(e)}var d="/persistent/fonts/",m="/fonts/",y=void 0!==navigator.storage&&void 0!==navigator.storage.estimate,v=void 0!==navigator.storage,g=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,o,s,l,p,g,b,_,w,E;return t=e,null,r=[{key:"detectOPFSEnabled",value:(E=c(u().mark((function e(){var t;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!v){e.next=15;break}return e.prev=1,e.next=4,navigator.storage.getDirectory();case 4:return t=e.sent,e.next=7,t.getFileHandle("access-handle-detect",{create:!0});case 7:return e.next=9,t.removeEntry("access-handle-detect");case 9:e.next=15;break;case 11:e.prev=11,e.t0=e.catch(1),n.X.Logger.logMessage(a.ds.INFO,"Attempt to use OPFS fails, falling back to MEMFS"),v=!1;case 15:return e.abrupt("return",v);case 16:case"end":return e.stop()}}),e,null,[[1,11]])}))),function(){return E.apply(this,arguments)})},{key:"isOPFSEnabled",value:function(){return v}},{key:"isEstimateEnabled",value:function(){return y}},{key:"getAvailableStorage",value:(w=c(u().mark((function t(){var r,o,i;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.detectOPFSEnabled();case 2:if(r=t.sent,t.prev=3,!(r&&navigator.storage&&navigator.storage.estimate)){t.next=11;break}return t.next=7,navigator.storage.estimate();case 7:if(!(o=t.sent).quota||!o.usage){t.next=11;break}return i=o.quota-o.usage,t.abrupt("return",i);case 11:t.next=17;break;case 13:return t.prev=13,t.t0=t.catch(3),n.X.Logger.logMessage(a.ds.INFO,"getAvailableStorage error: ".concat(t.t0)),t.abrupt("return",0);case 17:return t.abrupt("return",0);case 18:case"end":return t.stop()}}),t,null,[[3,13]])}))),function(){return w.apply(this,arguments)})},{key:"EnumerateDir",value:(_=c(u().mark((function t(r){var o,s,l,c,f,p,d,m,y,v,g,b,_,w,E,S,T,k,A;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.isOPFSEnabled()){t.next=74;break}return t.prev=1,t.next=4,navigator.storage.getDirectory();case 4:o=t.sent,s=r.split("/").filter((function(e){return""!==e})),l=[],c=!1,f=!1,t.prev=9,d=h(o.entries());case 11:return t.next=13,d.next();case 13:if(!(c=!(m=t.sent).done)){t.next=52;break}if(y=i(m.value,2),v=y[0],g=y[1],v!==s[s.length-1]){t.next=49;break}b=!1,_=!1,t.prev=18,E=h(g.values());case 20:return t.next=22,E.next();case 22:if(!(b=!(S=t.sent).done)){t.next=33;break}if("file"!==(T=S.value).kind){t.next=30;break}return t.next=27,T.getFile();case 27:k=t.sent,A={fileName:k.name,fileSize:k.size},l.push(A);case 30:b=!1,t.next=20;break;case 33:t.next=39;break;case 35:t.prev=35,t.t0=t.catch(18),_=!0,w=t.t0;case 39:if(t.prev=39,t.prev=40,!b||null==E.return){t.next=44;break}return t.next=44,E.return();case 44:if(t.prev=44,!_){t.next=47;break}throw w;case 47:return t.finish(44);case 48:return t.finish(39);case 49:c=!1,t.next=11;break;case 52:t.next=58;break;case 54:t.prev=54,t.t1=t.catch(9),f=!0,p=t.t1;case 58:if(t.prev=58,t.prev=59,!c||null==d.return){t.next=63;break}return t.next=63,d.return();case 63:if(t.prev=63,!f){t.next=66;break}throw p;case 66:return t.finish(63);case 67:return t.finish(58);case 68:return t.abrupt("return",l);case 71:t.prev=71,t.t2=t.catch(1),n.X.Logger.logMessage(a.ds.INFO,"OPFS EnumerateDir error: ".concat(t.t2));case 74:return t.prev=74,t.abrupt("return",FS.readdir(r));case 78:return t.prev=78,t.t3=t.catch(74),n.X.Logger.logMessage(a.ds.INFO,"MEMFS EnumerateDir error: ".concat(t.t3)),t.abrupt("return",[]);case 82:case"end":return t.stop()}}),t,null,[[1,71],[9,54,58,68],[18,35,39,49],[40,,44,48],[59,,63,67],[74,78]])}))),function(e){return _.apply(this,arguments)})},{key:"RemoveFile",value:(b=c(u().mark((function t(r,o){var s,l,c,f,p,d,y,v,g,b,_;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.isOPFSEnabled()){t.next=42;break}return t.prev=1,t.next=4,navigator.storage.getDirectory();case 4:s=t.sent,l=r.split("/").filter((function(e){return""!==e})),c=!1,f=!1,t.prev=8,d=h(s.entries());case 10:return t.next=12,d.next();case 12:if(!(c=!(y=t.sent).done)){t.next=21;break}if(v=i(y.value,2),g=v[0],b=v[1],g!==l[l.length-1]){t.next=18;break}return t.next=17,b.removeEntry(o,{recursive:!0});case 17:return t.abrupt("return",!0);case 18:c=!1,t.next=10;break;case 21:t.next=27;break;case 23:t.prev=23,t.t0=t.catch(8),f=!0,p=t.t0;case 27:if(t.prev=27,t.prev=28,!c||null==d.return){t.next=32;break}return t.next=32,d.return();case 32:if(t.prev=32,!f){t.next=35;break}throw p;case 35:return t.finish(32);case 36:return t.finish(27);case 37:t.next=42;break;case 39:t.prev=39,t.t1=t.catch(1),n.X.Logger.logMessage(a.ds.INFO,"OPFS RemoveFile error:: ".concat(t.t1));case 42:return t.prev=42,_=m+o,FS.unlink(_),t.abrupt("return",!0);case 48:return t.prev=48,t.t2=t.catch(42),n.X.Logger.logMessage(a.ds.INFO,"MEMFS RemoveFile error:: ".concat(t.t2)),t.abrupt("return",!1);case 52:case"end":return t.stop()}}),t,null,[[1,39],[8,23,27,37],[28,,32,36],[42,48]])}))),function(e,t){return b.apply(this,arguments)})},{key:"FileExists",value:(g=c(u().mark((function t(r,o){var s,l,c,f,p,d,y,v,g,b,_;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.isOPFSEnabled()){t.next=44;break}return t.prev=1,t.next=4,navigator.storage.getDirectory();case 4:s=t.sent,l=r.split("/").filter((function(e){return""!==e})),c=!1,f=!1,t.prev=8,d=h(s.entries());case 10:return t.next=12,d.next();case 12:if(!(c=!(y=t.sent).done)){t.next=23;break}if(v=i(y.value,2),g=v[0],b=v[1],g!==l[l.length-1]){t.next=20;break}return t.next=17,b.getFileHandle(o,{create:!1});case 17:if(!t.sent){t.next=20;break}return t.abrupt("return",!0);case 20:c=!1,t.next=10;break;case 23:t.next=29;break;case 25:t.prev=25,t.t0=t.catch(8),f=!0,p=t.t0;case 29:if(t.prev=29,t.prev=30,!c||null==d.return){t.next=34;break}return t.next=34,d.return();case 34:if(t.prev=34,!f){t.next=37;break}throw p;case 37:return t.finish(34);case 38:return t.finish(29);case 39:t.next=44;break;case 41:t.prev=41,t.t1=t.catch(1),n.X.Logger.logMessage(a.ds.INFO,"OPFS FileExists error: ".concat(t.t1));case 44:return _=m+o,t.prev=45,FS.stat(_),t.abrupt("return",!0);case 50:return t.prev=50,t.t2=t.catch(45),t.abrupt("return",!1);case 53:case"end":return t.stop()}}),t,null,[[1,41],[8,25,29,39],[30,,34,38],[45,50]])}))),function(e,t){return g.apply(this,arguments)})},{key:"AsyncWriteFile",value:(p=c(u().mark((function e(t,r,n,a){var o,s,l,c,f,p,d,m,y,v,g,b,_;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,navigator.storage.getDirectory();case 2:o=e.sent,s=t.split("/").filter((function(e){return""!==e})),c=!1,f=!1,e.prev=6,d=h(o.entries());case 8:return e.next=10,d.next();case 10:if(!(c=!(m=e.sent).done)){e.next=16;break}y=i(m.value,2),v=y[0],g=y[1],v===s[s.length-1]&&(l=g);case 13:c=!1,e.next=8;break;case 16:e.next=22;break;case 18:e.prev=18,e.t0=e.catch(6),f=!0,p=e.t0;case 22:if(e.prev=22,e.prev=23,!c||null==d.return){e.next=27;break}return e.next=27,d.return();case 27:if(e.prev=27,!f){e.next=30;break}throw p;case 30:return e.finish(27);case 31:return e.finish(22);case 32:if(l){e.next=36;break}return e.next=35,o.getDirectoryHandle(s[s.length-1],{create:!0});case 35:l=e.sent;case 36:if(!l){e.next=48;break}return e.next=39,l.getFileHandle(r,{create:!0});case 39:return b=e.sent,e.next=42,b.createWritable();case 42:return _=e.sent,e.next=45,_.write(n);case 45:return e.next=47,_.close();case 47:return e.abrupt("return",!0);case 48:return e.abrupt("return",!1);case 49:case"end":return e.stop()}}),e,null,[[6,18,22,32],[23,,27,31]])}))),function(e,t,r,n){return p.apply(this,arguments)})},{key:"WriteFile",value:(l=c(u().mark((function t(r,o,i,s){var l,c,f;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.isOPFSEnabled()){t.next=13;break}return t.prev=1,l=performance.now(),t.next=5,e.AsyncWriteFile(r,o,i,s);case 5:return c=t.sent,n.X.Logger.logMessage(a.ds.DEBUG,"OPFSWriteFile operations done. Took ".concat(Math.round(performance.now()-l)," milliseconds.")),t.abrupt("return",c);case 10:t.prev=10,t.t0=t.catch(1),n.X.Logger.logMessage(a.ds.INFO,"OPFS WriteFile error: ".concat(t.t0));case 13:return f=m+o,t.prev=14,FS.writeFile(f,new Uint8Array(i),{encoding:"binary",canOwn:!0,flags:"w+"}),t.abrupt("return",!0);case 19:return t.prev=19,t.t1=t.catch(14),n.X.Logger.logMessage(a.ds.INFO,"MEMFS WriteFile error: ".concat(t.t1)),t.abrupt("return",!1);case 23:case"end":return t.stop()}}),t,null,[[1,10],[14,19]])}))),function(e,t,r,n){return l.apply(this,arguments)})},{key:"AsyncReadFile",value:(s=c(u().mark((function e(t,r){var n,a,o,s,l,c,f,p,d,m,y,v,g;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,navigator.storage.getDirectory();case 2:n=e.sent,a=t.split("/").filter((function(e){return""!==e})),o=!1,s=!1,e.prev=6,c=h(n.entries());case 8:return e.next=10,c.next();case 10:if(!(o=!(f=e.sent).done)){e.next=26;break}if(p=i(f.value,2),d=p[0],m=p[1],d!==a[a.length-1]){e.next=23;break}return e.next=15,m.getFileHandle(r,{create:!1});case 15:return y=e.sent,e.next=18,y.getFile();case 18:return v=e.sent,e.next=21,v.arrayBuffer();case 21:return g=e.sent,e.abrupt("return",g);case 23:o=!1,e.next=8;break;case 26:e.next=32;break;case 28:e.prev=28,e.t0=e.catch(6),s=!0,l=e.t0;case 32:if(e.prev=32,e.prev=33,!o||null==c.return){e.next=37;break}return e.next=37,c.return();case 37:if(e.prev=37,!s){e.next=40;break}throw l;case 40:return e.finish(37);case 41:return e.finish(32);case 42:case"end":return e.stop()}}),e,null,[[6,28,32,42],[33,,37,41]])}))),function(e,t){return s.apply(this,arguments)})},{key:"ReadFile",value:(o=c(u().mark((function t(r,o){var i,s,l,c;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.isOPFSEnabled()){t.next=13;break}return t.prev=1,i=performance.now(),t.next=5,e.AsyncReadFile(d,o);case 5:return s=t.sent,n.X.Logger.logMessage(a.ds.DEBUG,"OPFSReadFile operations done. Took ".concat(Math.round(performance.now()-i)," milliseconds.")),t.abrupt("return",s);case 10:t.prev=10,t.t0=t.catch(1),n.X.Logger.logMessage(a.ds.INFO,"OPFS ReadFile error: ".concat(t.t0));case 13:return l=m+o,t.prev=14,c=FS.readFile(l,{encoding:"binary"}),t.abrupt("return",c);case 19:return t.prev=19,t.t1=t.catch(14),n.X.Logger.logMessage(a.ds.INFO,"MEMFS ReadFile error: ".concat(t.t1)),t.abrupt("return",new Uint8Array);case 23:case"end":return t.stop()}}),t,null,[[1,10],[14,19]])}))),function(e,t){return o.apply(this,arguments)})}],r&&f(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}()},811604:(e,t,r)=>{"use strict";r.d(t,{w:()=>p});var n,a=r(971745),o=r(51939),i=r(206069);function s(e){return s="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},s(e)}function u(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=l(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function l(e,t){if(e){if("string"==typeof e)return c(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)?c(e,t):void 0}}function c(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 f(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,(void 0,a=function(e,t){if("object"!==s(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===s(a)?a:String(a)),n)}var a}!function(e){e[e.ROMAN=0]="ROMAN",e[e.JAPANESE=1]="JAPANESE",e[e.TRADITIONAL_CHINESE=2]="TRADITIONAL_CHINESE",e[e.KOREAN=3]="KOREAN",e[e.ARABIC=4]="ARABIC",e[e.HEBREW=5]="HEBREW",e[e.GREEK=6]="GREEK",e[e.CYRILLIC=7]="CYRILLIC",e[e.RIGHT_LEFT=8]="RIGHT_LEFT",e[e.DEVANAGARI=9]="DEVANAGARI",e[e.GURMUKHI=10]="GURMUKHI",e[e.GUAJARATI=11]="GUAJARATI",e[e.ORIYA=12]="ORIYA",e[e.BENGALI=13]="BENGALI",e[e.TAMIL=14]="TAMIL",e[e.TELUGU=15]="TELUGU",e[e.KANNADA=16]="KANNADA",e[e.MALAYALAM=17]="MALAYALAM",e[e.SINHALESE=18]="SINHALESE",e[e.BURMESE=19]="BURMESE",e[e.KHMER=20]="KHMER",e[e.THAI=21]="THAI",e[e.LAOTIAN=22]="LAOTIAN",e[e.GEORGIAN=23]="GEORGIAN",e[e.ARMENIAN=24]="ARMENIAN",e[e.SIMPLIFIED_CHINESE=25]="SIMPLIFIED_CHINESE",e[e.TIBETAN=26]="TIBETAN",e[e.MONGOLIAN=27]="MONGOLIAN",e[e.GEEZ=28]="GEEZ",e[e.EAST_EUROPIAN=29]="EAST_EUROPIAN",e[e.VIETNAMESE=30]="VIETNAMESE",e[e.EXTENDED_ARABIC=31]="EXTENDED_ARABIC",e[e.KLINGON=32]="KLINGON",e[e.EMOJI=33]="EMOJI",e[e.SCRIPT_COUNT=34]="SCRIPT_COUNT",e[e.UNKNOWN=1073741824]="UNKNOWN"}(n||(n={}));var h=new Map([[n.KOREAN,44032],[n.JAPANESE,12450],[n.JAPANESE,12354],[n.ARABIC,1570],[n.HEBREW,1488],[n.EAST_EUROPIAN,268],[n.EAST_EUROPIAN,328],[n.EAST_EUROPIAN,371],[n.CYRILLIC,1071],[n.CYRILLIC,1105],[n.GREEK,971],[n.KANNADA,3205],[n.DEVANAGARI,2309],[n.DEVANAGARI,2318],[n.GURMUKHI,2565],[n.GUAJARATI,2693],[n.BENGALI,2437],[n.MALAYALAM,3333],[n.TAMIL,2949],[n.TELUGU,3077],[n.ORIYA,2821],[n.THAI,3585],[n.KHMER,6016],[n.SINHALESE,3461],[n.LAOTIAN,3713],[n.BURMESE,4096],[n.EMOJI,9786],[n.ROMAN,234],[n.UNKNOWN,0]]),p=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._font=void 0,this._charSet=new Set,this._nameTableLangs=new Set;try{this.font=(0,a.Ue)(t),this.font.fonts&&this.font.fonts.length&&(this.font=this.font.fonts[0])}catch(e){}}var t,r;return t=e,(r=[{key:"charSet",get:function(){return this.font&&0===this._charSet.size&&this.font.characterSet&&(this._charSet=new Set(this.font.characterSet)),this._charSet},set:function(e){this._charSet=e}},{key:"isOTSVG",value:function(){try{if(this.font&&this.font.directory.tables["SVG "])return!0}catch(e){}return!1}},{key:"isCOLR",value:function(){try{if(this.font&&this.font.directory.tables.COLR)return!0}catch(e){}return!1}},{key:"isSBIX",value:function(){try{if(this.font&&this.font.directory.tables.sbix)return!0}catch(e){}return!1}},{key:"isTTC",value:function(){try{if("TTC"===this.font.type)return!0}catch(e){}return!1}},{key:"font",get:function(){return this._font},set:function(e){this._font=e}},{key:"getTQFont",value:function(){var e=new o.K1;try{if(this.font){var t=this.font.name;this.font.postscriptName&&(e.postscriptName=this.font.postscriptName),t&&this.parseNameTableAttributes(t,e),this.charSet&&(e.characterSet=this.charSet),this.font.fvar&&(e.isVariableFont=!0),this.getInternalScriptSetFromNameTable(t),this.setOS2StyleBits(e)}}catch(e){}return e}},{key:"setOS2StyleBits",value:function(e){try{var t=this.font["OS/2"];!1===e.isVariableFont&&(!1===Number.isNaN(t.usWeightClass)&&e.varAxisValues.set("wght",t.usWeightClass),!1===Number.isNaN(t.usWidthClass)&&e.varAxisValues.set("wdth",t.usWidthClass),e.varAxisValues.set("slnt",t.fsSelection.oblique||t.fsSelection.italic))}catch(e){}}},{key:"parseNameTableAttributes",value:function(e,t){try{var r=function(t,r,n,a){if((""===t||null==t)&&e.records[r]&&(e.records[r][n]||n===a?t=e.records[r][n]:e.records[r][a]&&(t=e.records[r][a]),!t))for(var o in e.records[r])if((t=e.records[r][o])&&t.length)break;return t},n=i.p.getAppropriateRegion(),a=o.l0.Language.Default;if(e&&e.records){t.postscriptName=r(t.postscriptName,"postscriptName",n,a),t.familyName=r(t.familyName,"preferredFamily",n,a),t.familyName=r(t.familyName,"fontFamily",n,a),t.styleName=r(t.styleName,"preferredSubfamily",n,a),t.styleName=r(t.styleName,"fontSubfamily",n,a),t.cssStyleNames.push(t.postscriptName);var s="";(s=r(s,"fullName",n,a))&&s.length>0&&t.cssStyleNames.push(s),t.fontName="".concat(t.familyName," ").concat(t.styleName)}}catch(e){}}},{key:"getInternalScriptSetFromNameTable",value:function(e){try{for(var t in e.records)for(var r in e.records[t]){var n=r.substring(0,2);try{Number.isNaN(Number(n))&&"-"!==n[n.length-1]&&(this._nameTableLangs.add(i.p.getLanguageFromString(r)),this._nameTableLangs.add(i.p.getLanguageFromString(n)))}catch(e){}}}catch(e){}}},{key:"mapCmapToScript",value:function(e,t){var r=n.UNKNOWN,a=t;switch(e){case 1:a<n.SCRIPT_COUNT&&(r=t);break;case 3:switch(t){case 2:r=n.JAPANESE;break;case 3:r=n.SIMPLIFIED_CHINESE;break;case 4:r=n.TRADITIONAL_CHINESE;break;case 5:case 6:r=n.KOREAN}break;default:r=n.UNKNOWN}return r}},{key:"readUint32FromStream",value:function(e,t,r){var n,a=t+r,o=t+r+4,i=0;try{var s=null===(n=this._font)||void 0===n?void 0:n.stream.buffer.buffer.slice(a,o);i=new DataView(s,0).getUint32(0)}catch(e){}return i}},{key:"readUint16FromStream",value:function(e,t,r){var n,a=t+r,o=t+r+2,i=0;try{var s=null===(n=this._font)||void 0===n?void 0:n.stream.buffer.buffer.slice(a,o);i=new DataView(s,0).getUint16(0)}catch(e){}return i}},{key:"OS2IsCodePageRangeBitSet",value:function(e,t){if(e._length<82)return!1;var r=e._startOffset,n=78+4*Math.floor(t/32);return 0!=(this.readUint32FromStream(e,r,n)&1<<t%32)}},{key:"TestBit",value:function(e,t){return this.OS2IsCodePageRangeBitSet(e,t)}},{key:"_TestRoman",value:function(e){return this.TestBit(e,0)||this.TestBit(e,52)||this.TestBit(e,54)||this.TestBit(e,55)||this.TestBit(e,58)||this.TestBit(e,62)||this.TestBit(e,63)}},{key:"_TestEasternEurope",value:function(e){return this.TestBit(e,1)}},{key:"_TestCyrillic",value:function(e){return this.TestBit(e,2)||this.TestBit(e,49)||this.TestBit(e,57)}},{key:"_TestGreek",value:function(e){return this.TestBit(e,3)||this.TestBit(e,48)||this.TestBit(e,60)}},{key:"_TestHebrew",value:function(e){return this.TestBit(e,5)||this.TestBit(e,53)}},{key:"_TestArabic",value:function(e){return this.TestBit(e,6)||this.TestBit(e,51)||this.TestBit(e,61)}},{key:"_TestThai",value:function(e){return this.TestBit(e,16)}},{key:"_TestJapan",value:function(e){return this.TestBit(e,17)}},{key:"_TestChineseSimplified",value:function(e){return this.TestBit(e,18)}},{key:"_TestKorean",value:function(e){return this.TestBit(e,19)||this.TestBit(e,21)}},{key:"_TestChineseTraditional",value:function(e){return this.TestBit(e,20)}},{key:"OS2IsUnicodeRangeBitSet",value:function(e,t){if(e._length<46)return!1;var r=e._startOffset,n=42+4*Math.floor(t/32);return 0!=(this.readUint32FromStream(e,r,n)&1<<t%32)}},{key:"UniBit",value:function(e,t){return this.OS2IsUnicodeRangeBitSet(e,t)}},{key:"TEST_HANGUL_COMPATIBILITY_JAMO",value:function(e){return this.UniBit(e,52)}},{key:"TEST_HANGUL",value:function(e){return this.UniBit(e,56)}},{key:"TEST_BOPOMOFO",value:function(e){return this.UniBit(e,51)}},{key:"TEST_UNIFIED_IDEOGRAPHS",value:function(e){return this.UniBit(e,59)}},{key:"TEST_COMPATIBILITY_IDEOGRAPHS",value:function(e){return this.UniBit(e,61)}},{key:"TEST_CJK_COMPATIBILITY_FORMS",value:function(e){return this.UniBit(e,65)}},{key:"TEST_CJK_SYMBOLS_AND_PUNCTUATION",value:function(e){return this.UniBit(e,48)}},{key:"TEST_HIRAGANA",value:function(e){return this.UniBit(e,49)}},{key:"TEST_KATAKANA",value:function(e){return this.UniBit(e,50)}},{key:"IS_CJK",value:function(e){return e===n.JAPANESE||e===n.TRADITIONAL_CHINESE||e===n.SIMPLIFIED_CHINESE||e===n.KOREAN}},{key:"GetScriptUsingcmapTable",value:function(e){var t=void 0,r=n.UNKNOWN,a=n.UNKNOWN,o=n.UNKNOWN;if(e){var i=0,s=0,u=e.numSubtables;if(1===Number(u)){var l=e.tables[0];(r=this.mapCmapToScript(l.platformID,l.encodingID))===n.UNKNOWN&&(0===Number(l.platformID)||3===Number(l.platformID)&&1===Number(l.encodingID))&&(t||(t=e.tables[0]))}else{for(var c=!1,f=0;f<u;f++){var h=e.tables[f],p=h.platformID;1!==h.platformID||p!==n.JAPANESE&&p!==n.TRADITIONAL_CHINESE&&p!==n.KOREAN&&p!==n.HEBREW&&p!==n.ARABIC&&p!==n.SIMPLIFIED_CHINESE||(a=h.encodingID,i++),3===Number(h.platformID)?2===Number(h.encodingID)?(o=n.JAPANESE,c=!0,s++):4===Number(h.encodingID)?(o=n.TRADITIONAL_CHINESE,c=!0,s++):3===Number(h.encodingID)?(o=n.SIMPLIFIED_CHINESE,c=!0,s++):5===Number(h.encodingID)||6===Number(h.encodingID)?(o=n.KOREAN,c=!0,s++):1===Number(h.encodingID)&&(t||(t=e.tables[f])):0===Number(h.platformID)&&(t||(t=e.tables[f]))}i<=1&&s<=1&&(0===s?r=a:0!==i&&a!==o||(r=o)),c&&r===n.UNKNOWN&&(this.IS_CJK(a)?r=a:this.IS_CJK(o)&&(r=o))}}return{script:r,unicodeSubtable:t}}},{key:"GetWritingScriptFromCodePageRange",value:function(e){var t=n.UNKNOWN,r=0;return this._TestKorean(e)&&(r++,t===n.UNKNOWN&&(t=n.KOREAN)),this._TestJapan(e)&&(r++,t===n.UNKNOWN&&(t=n.JAPANESE)),this._TestChineseSimplified(e)&&(r++,t===n.UNKNOWN&&(t=n.SIMPLIFIED_CHINESE)),this._TestChineseTraditional(e)&&(r++,t===n.UNKNOWN&&(t=n.TRADITIONAL_CHINESE)),this._TestEasternEurope(e)&&(r++,t===n.UNKNOWN&&(t=n.EAST_EUROPIAN)),this._TestCyrillic(e)&&(r++,t===n.UNKNOWN&&(t=n.CYRILLIC)),this._TestGreek(e)&&(r++,t===n.UNKNOWN&&(t=n.GREEK)),this._TestHebrew(e)&&(r++,t===n.UNKNOWN&&(t=n.HEBREW)),this._TestArabic(e)&&(r++,t===n.UNKNOWN&&(t=n.ARABIC)),this._TestThai(e)&&(r++,t===n.UNKNOWN&&(t=n.THAI)),this._TestRoman(e)&&(r++,t===n.UNKNOWN&&(t=n.ROMAN)),t!==n.EAST_EUROPIAN&&t!==n.GREEK||(t=n.ROMAN),{script:t,numCodePages:r}}},{key:"GetWritingScriptFromUniCMap",value:function(e){var t=n.UNKNOWN;if(e){var r,a=u(h);try{for(a.s();!(r=a.n()).done;){var o=r.value,i=o[1];if(this.charSet.has(i))if(268===i)i=328,this.charSet.has(i)&&(i=234,t=this.charSet.has(i)?n.ROMAN:o[0]);else if((t=o[0])===n.EMOJI){for(var s=1,l=0,c=[9785,9748,9917,9851,9928];l<c.length;l++){var f=c[l];this.charSet.has(f)&&(s+=1)}if(s<2){t=n.UNKNOWN;continue}}if(t!==n.UNKNOWN){t===n.EAST_EUROPIAN&&(i=234,this.charSet.has(i)&&(t=n.ROMAN));break}}}catch(e){a.e(e)}finally{a.f()}}return t}},{key:"TestUnicodecmapSupportsScript",value:function(e,t){if(!e)return!0;var r,n=!1,a=!1,o=u(h);try{for(o.s();!(r=o.n()).done;){var i=r.value;if(i[0]===t){a=!0;var s=i[1];if(this.charSet.has(s)){n=!0;break}}}}catch(e){o.e(e)}finally{o.f()}return n||!a}},{key:"OS2GetNthCodePageRangeULong",value:function(e,t){if(t>=2)return 0;var r=e._startOffset;return this.readUint32FromStream(e,r,78+4*t)}},{key:"OS2GetVendorID",value:function(e){if(e._length<62)return 0;var t=e._startOffset;return this.readUint32FromStream(e,t,58)}},{key:"OS2GetFSSelection",value:function(e,t){if(e._length<64||null==t)return{status:!1,selection:t};var r=e._startOffset;return{status:!0,selection:t=this.readUint16FromStream(e,r,62)}}},{key:"GetScriptUsingOS2Table",value:function(e,t,r,a){var i=n.UNKNOWN;if(!t||0===r)return i;if(t){var s="A".charCodeAt(0)<<24|"D".charCodeAt(0)<<16|"B".charCodeAt(0)<<8|"E".charCodeAt(0),u="A".charCodeAt(0)<<24|"D".charCodeAt(0)<<16|"B".charCodeAt(0)<<8|"O".charCodeAt(0),l="M".charCodeAt(0)<<24|"S".charCodeAt(0)<<16|" ".charCodeAt(0)<<8|" ".charCodeAt(0),c=this.OS2GetVendorID(t);if(c!==s&&c!==l&&c!==u||(-1!==e.indexOf("Arabic")?i=n.ARABIC:-1!==e.indexOf("Hebrew")&&(i=n.HEBREW)),i===n.UNKNOWN){var f=this.GetWritingScriptFromCodePageRange(t),h=f.numCodePages;if((i=f.script)!==n.ROMAN||1!==this.OS2GetNthCodePageRangeULong(t,0)&&536870913!==this.OS2GetNthCodePageRangeULong(t,0)||0!==this.OS2GetNthCodePageRangeULong(t,1)||(i=n.UNKNOWN),536871185===this.OS2GetNthCodePageRangeULong(t,0)&&(i=n.UNKNOWN),i!==n.UNKNOWN&&h>1&&a&&(this.TestUnicodecmapSupportsScript(a,i)||(i=n.UNKNOWN)),this.IS_CJK(i)&&1===this._nameTableLangs.size&&this._nameTableLangs.has(o.l0.Language.Default));else if(i===n.UNKNOWN||i===n.JAPANESE&&!1===this._nameTableLangs.has(o.l0.Language.Japanese)||i===n.SIMPLIFIED_CHINESE&&!1===this._nameTableLangs.has(o.l0.Language.SimplifiedChinese)||i===n.TRADITIONAL_CHINESE&&!1===this._nameTableLangs.has(o.l0.Language.TraditionalChinese)||i===n.KOREAN&&!1===this._nameTableLangs.has(o.l0.Language.Korean))if(this.TEST_HANGUL(t))i=n.KOREAN;else if(this.TEST_BOPOMOFO(t)){var p=0;this.TEST_UNIFIED_IDEOGRAPHS(t)&&p++,this.TEST_COMPATIBILITY_IDEOGRAPHS(t)&&p++,this.TEST_CJK_COMPATIBILITY_FORMS(t)&&p++,i=p>=2?n.TRADITIONAL_CHINESE:n.SIMPLIFIED_CHINESE,!1===this._nameTableLangs.has(o.l0.Language.TraditionalChinese)&&!0===this._nameTableLangs.has(o.l0.Language.SimplifiedChinese)&&(i=n.SIMPLIFIED_CHINESE)}else(this.TEST_HIRAGANA(t)||this.TEST_KATAKANA(t))&&(i=n.JAPANESE);var d=0;if(i===n.UNKNOWN){var m=this.OS2GetFSSelection(t,d);if(m.status)switch(d=m.selection,d>>=8){case 178:case 179:i=n.ARABIC;break;case 177:i=n.HEBREW}}}}return i===n.UNKNOWN&&a&&(i=this.GetWritingScriptFromUniCMap(a)),i}},{key:"computeFontScriptInternal",value:function(e){if(""===e)return n.UNKNOWN;var t=e.toLocaleLowerCase();if(-1!==t.indexOf("color")&&-1!==t.indexOf("emoji"))return n.EMOJI;var r,a=n.UNKNOWN;if(a===n.UNKNOWN&&this.font&&this.font.cmap){var o=this.font.cmap,i=this.GetScriptUsingcmapTable(o);r=i.unicodeSubtable,a=i.script}if((a===n.UNKNOWN||a===n.ROMAN)&&this.font&&this.font["OS/2"]){var s=this.font["OS/2"],u=this.GetScriptUsingOS2Table(e,this.font["OS/2"],s._length,r);u!==n.UNKNOWN&&(a=u)}return a}},{key:"computeFontScript",value:function(e){try{return function(e){switch(e){case n.EMOJI:return o.l0.Language.Emoji;case n.JAPANESE:return o.l0.Language.Japanese;case n.TRADITIONAL_CHINESE:return o.l0.Language.TraditionalChinese;case n.SIMPLIFIED_CHINESE:return o.l0.Language.SimplifiedChinese;case n.KOREAN:return o.l0.Language.Korean;case n.ARABIC:case n.EXTENDED_ARABIC:return o.l0.Language.Arabic;case n.HEBREW:return o.l0.Language.Hebrew;case n.DEVANAGARI:return o.l0.Language.Devanagari;case n.GURMUKHI:return o.l0.Language.Gurmukhi;case n.GUAJARATI:return o.l0.Language.Gujarati;case n.ORIYA:return o.l0.Language.Default;case n.BENGALI:return o.l0.Language.Bengali;case n.TAMIL:return o.l0.Language.Tamil;case n.TELUGU:return o.l0.Language.Telugu;case n.KANNADA:return o.l0.Language.Kannada;case n.MALAYALAM:return o.l0.Language.Malayalam;case n.THAI:return o.l0.Language.Thai;case n.SINHALESE:case n.BURMESE:case n.KHMER:return o.l0.Language.Default;case n.ARMENIAN:return o.l0.Language.Armenian;case n.VIETNAMESE:return o.l0.Language.Vietnamese;case n.GREEK:return o.l0.Language.Greek;case n.TIBETAN:case n.GEORGIAN:case n.LAOTIAN:case n.MONGOLIAN:case n.GEEZ:case n.EAST_EUROPIAN:case n.KLINGON:case n.CYRILLIC:case n.RIGHT_LEFT:case n.ROMAN:return o.l0.Language.Default}return o.l0.Language.Default}(this.computeFontScriptInternal(e))}catch(e){return o.l0.Language.Default}}},{key:"getFVarOrdering",value:function(){var e=new Map;try{var t=0;if(this._font&&this._font.fvar&&this._font.fvar.axis){var r,n=u(this._font.fvar.axis);try{for(n.s();!(r=n.n()).done;){var a=r.value;e.set(a.axisTag,t),t+=1}}catch(e){n.e(e)}finally{n.f()}}}catch(e){}return e}},{key:"getFVarInstances",value:function(){var e=new Map;try{if(this._font&&this._font.fvar&&this._font.fvar.instance){var t,r=u(this._font.fvar.instance);try{for(r.s();!(t=r.n()).done;){var n=t.value;if(n.name&&n.name.en)e.set(n.name.en,n.coord);else if(n.name)for(var a in JSON.parse(n.name))if(n.name[a]){e.set(n.name[a],n.coord);break}}}catch(e){r.e(e)}finally{r.f()}}}catch(e){}return e}},{key:"parseStatTable",value:function(){var e,t=new Map;try{if(this._font&&this._font.directory.tables&&this._font.directory.tables.STAT)for(var r=this.readUint16FromStream(this._font.stream,this._font.directory.tables.STAT.offset,6),n=this.readUint32FromStream(this._font.stream,this._font.directory.tables.STAT.offset,8),a=0;a<r;a++){var o=this.readUint32FromStream(this._font.stream,this._font.directory.tables.STAT.offset,n),s=i.p.toBytesInt32(o),u=String.fromCharCode.apply(null,s);n+=6;var f=this.readUint16FromStream(this._font.stream,this._font.directory.tables.STAT.offset,n);n+=2,t.set(u,f)}}catch(e){}return new Map((e=t,function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||l(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).sort((function(e,t){return e[1]-t[1]})))}}])&&f(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}()},643716:(e,t,r)=>{"use strict";r.d(t,{n:()=>g});var n=r(177579),a=r(660234),o=r(51939),i=r(950150),s=r(461660),u=r(206069);function l(e){return l="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},l(e)}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,s=[],u=!0,l=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){l=!0,a=e}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw a}}return s}}(e,t)||h(e,t)||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.")}()}function f(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=h(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function h(e,t){if(e){if("string"==typeof e)return p(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)?p(e,t):void 0}}function p(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 d(){d=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,i=Object.create(o.prototype),s=new C(n||[]);return a(i,"_invoke",{value:O(e,r,s)}),i}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var p="suspendedStart",m="suspendedYield",y="executing",v="completed",g={};function b(){}function _(){}function w(){}var E={};c(E,i,(function(){return this}));var S=Object.getPrototypeOf,T=S&&S(S(F([])));T&&T!==r&&n.call(T,i)&&(E=T);var k=w.prototype=b.prototype=Object.create(E);function A(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function N(e,t){function r(a,o,i,s){var u=h(e[a],e,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==l(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,i,s)}),(function(e){r("throw",e,i,s)})):t.resolve(f).then((function(e){c.value=e,i(c)}),(function(e){return r("throw",e,i,s)}))}s(u.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function O(t,r,n){var a=p;return function(o,i){if(a===y)throw new Error("Generator is already running");if(a===v){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var s=n.delegate;if(s){var u=I(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=y;var l=h(t,r,n);if("normal"===l.type){if(a=n.done?v:m,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(a=v,n.method="throw",n.arg=l.arg)}}}function I(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,I(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function F(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(l(t)+" is not iterable")}return _.prototype=w,a(k,"constructor",{value:w,configurable:!0}),a(w,"constructor",{value:_,configurable:!0}),_.displayName=c(w,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,c(e,u,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},A(N.prototype),c(N.prototype,s,(function(){return this})),t.AsyncIterator=N,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new N(f(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},A(k),c(k,u,"Generator"),c(k,i,(function(){return this})),c(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=F,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(x),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return s.type="throw",s.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;x(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:F(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}function m(e,t,r,n,a,o,i){try{var s=e[o](i),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,a)}function y(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){m(o,n,a,i,s,"next",e)}function s(e){m(o,n,a,i,s,"throw",e)}i(void 0)}))}}function v(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,(void 0,a=function(e,t){if("object"!==l(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===l(a)?a:String(a)),n)}var a}var g=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._fontRetryCount=3,this._appFontsdownloaderVersion="_2",this._scheduler=t}var t,r,l,h,p,m,g,b;return t=e,r=[{key:"_getFontKeyForCache",value:function(e,t){var r=void 0;return e.isVariableFont,e.type===o.l0.FontType.BYOF?r=i.C.BYOF_FONT_ENDPOINT_PREFIX+e.fontId+n.uP+i.C.BYOF_FONT_ENDPOINT_SUFFIX:e.type===o.l0.FontType.APPLICATION?r=i.C.APP_FONT_ENDPOINT_PREFIX+e.fontId+this._appFontsdownloaderVersion+i.C.APP_FONT_ENDPOINT_SUFFIX:t&&(""!==e.postscriptName?r=i.C.DEFAULT_FONT_ENDPOINT_PREFIX+e.postscriptName+n.uP+i.C.DEFAULT_FONT_ENDPOINT_SUFFIX:""!==e.fontId&&(r=i.C.DEFAULT_FONT_ENDPOINT_PREFIX+e.fontId+n.uP+i.C.DEFAULT_FONT_ENDPOINT_SUFFIX)),r}},{key:"populateFontBufferFromCache",value:(b=y(d().mark((function e(t,r){var n,a;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._scheduler.initParams.diskCache!==o.l0.DiskCacheType.OPFS){e.next=9;break}return e.next=3,this._scheduler.getFontFromDisk(t.postscriptName);case 3:if(void 0===(n=e.sent)){e.next=9;break}return t.fontBuffer=n,this._scheduler.populateCharacterSet(t),t.filePath=s.xB+t.postscriptName,e.abrupt("return",!0);case 9:if(!r&&t.type!==o.l0.FontType.BYOF&&t.type!==o.l0.FontType.APPLICATION){e.next=24;break}return e.next=12,this.populateFontIfCached(t,r);case 12:if(!(a=e.sent)){e.next=24;break}return e.t0=Uint8Array,e.next=17,a.arrayBuffer();case 17:if(e.t1=e.sent,t.fontBuffer=new e.t0(e.t1),this._scheduler.populateCharacterSet(t),t.type!==o.l0.FontType.BYOF){e.next=23;break}return e.next=23,this._scheduler.populateByofScript(t);case 23:return e.abrupt("return",!0);case 24:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"populateFontIfCached",value:(g=y(d().mark((function e(t,r){var n;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=this._getFontKeyForCache(t,r))){e.next=7;break}return e.next=4,this._scheduler.responseCache.getBlobValue(n);case 4:return e.abrupt("return",e.sent);case 7:return e.abrupt("return",void 0);case 8:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"putFontBufferInCache",value:(m=y(d().mark((function e(t,r){var a;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._scheduler.initParams.diskCache!==o.l0.DiskCacheType.OPFS){e.next=5;break}return e.next=3,n.yZ._diskCache.addFile(t.postscriptName,t.postscriptName,t.fontBuffer.length,t.fontBuffer);case 3:e.sent&&(t.filePath=s.xB+t.postscriptName);case 5:if(!r&&t.type!==o.l0.FontType.BYOF&&t.type!==o.l0.FontType.APPLICATION){e.next=10;break}if(!(a=this._getFontKeyForCache(t,r))){e.next=10;break}return e.next=10,this._scheduler.responseCache.putBlobValue(a,t.fontBuffer);case 10:case"end":return e.stop()}}),e,this)}))),function(e,t){return m.apply(this,arguments)})},{key:"getSystemFontsCollection",value:(p=y(d().mark((function t(r){var n,a,i,s,l,c;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._scheduler.responseCache.getValue(e.systemFontsCacheKey);case 2:return n=t.sent,t.next=5,this._retrieveFonts(n,o.l0.FontType.SYSTEM);case 5:return a=t.sent,t.next=8,u.p.getSystemFonts(a,!1,r);case 8:return i=t.sent,s=i.aggregation,l=i.fontsJSON,c=i.error,0===r.length&&l&&this._scheduler.responseCache.putValue(e.systemFontsCacheKey,l),t.abrupt("return",{aggregation:s,error:c});case 14:case"end":return t.stop()}}),t,this)}))),function(e){return p.apply(this,arguments)})},{key:"getLocalFontsCollection",value:(h=y(d().mark((function t(r){var n,a,i,s,l,c,h,p,m,y=this;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._scheduler.responseCache.getValue(e.localFontsCacheKey);case 2:return n=t.sent,t.next=5,this._retrieveFonts(n,o.l0.FontType.LOCAL);case 5:a=t.sent,i=f(a);try{for(i.s();!(s=i.n()).done;)l=s.value,this._scheduler._cachedFonts.has(l[0])||this._scheduler._cachedFonts.set(l[0],l[1])}catch(e){i.e(e)}finally{i.f()}return t.next=10,u.p.getLocalFonts(a,r);case 10:return c=t.sent,h=c.aggregation,p=c.fontsJSON,m=c.error,h.getEntries().forEach((function(e){e.getEntries().forEach((function(e){y._scheduler._cachedFonts.has(e.postscriptName)||y._scheduler._cachedFonts.set(e.postscriptName,e)}))})),p&&0!==p.length&&this._scheduler.responseCache.putValue(e.localFontsCacheKey,p),t.abrupt("return",{aggregation:h,error:m});case 17:case"end":return t.stop()}}),t,this)}))),function(e){return h.apply(this,arguments)})},{key:"_retrieveFonts",value:function(e,t){var r=performance.now(),n=new Map;if(e){var i,s=f(e);try{for(s.s();!(i=s.n()).done;){var u=i.value;try{var l=o.K1.fromJSON(u);t===o.l0.FontType.SYSTEM?n.set(l.defaultPostscriptName,l):n.set(l.postscriptName,l)}catch(e){}}}catch(e){s.e(e)}finally{s.f()}}return a.X.Logger.logMessage(o.ds.DEBUG,"Total time taken for deserialization ".concat(Math.round(performance.now()-r))),n}},{key:"checkFonts",value:(l=y(d().mark((function e(t,r,i){var s,u,l,h,p,m,y,v,g,b,_,w,E,S,T,k,A,N,O,I,L,x,C,F,P,R,D,U,M,B,j,G,K,H,V,W,Y,J=arguments;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s=J.length>3&&void 0!==J[3]&&J[3],u=new Map,l=new Map,h=[],p=[],m=f(t);try{for(m.s();!(y=m.n()).done;)v=y.value,u.set(v,{font:new o.K1(o.l0.FontType.DEFAULT,v,""),error:new o.l0.Error})}catch(e){m.e(e)}finally{m.f()}g=f(r);try{for(g.s();!(b=g.n()).done;)_=b.value,l.set(_,{font:new o.K1(o.l0.FontType.DEFAULT,"",_),error:new o.l0.Error})}catch(e){g.e(e)}finally{g.f()}w=f(t),e.prev=10,w.s();case 12:if((E=w.n()).done){e.next=20;break}return S=E.value,e.next=16,this._scheduler.getFontFromLocalInfo(S,"",o.l0.FontType.DEFAULT,s);case 16:T=e.sent,this._scheduler._cachedNotFoundNonAdobeFonts.has(S)?(u.set(S,{font:T,error:new o.l0.Error(o.l0.ErrorCode.FONT_NOT_FOUND)}),T.postscriptName=S):""===T.fontId?h.push(S):u.set(S,{font:T,error:new o.l0.Error});case 18:e.next=12;break;case 20:e.next=25;break;case 22:e.prev=22,e.t0=e.catch(10),w.e(e.t0);case 25:return e.prev=25,w.f(),e.finish(25);case 28:k=f(r),e.prev=29,k.s();case 31:if((A=k.n()).done){e.next=39;break}return N=A.value,e.next=35,this._scheduler.getFontFromLocalInfo("",N,o.l0.FontType.DEFAULT,s);case 35:""===(O=e.sent).postscriptName?p.push(N):l.set(N,{font:O,error:new o.l0.Error});case 37:e.next=31;break;case 39:e.next=44;break;case 41:e.prev=41,e.t1=e.catch(29),k.e(e.t1);case 44:return e.prev=44,k.f(),e.finish(44);case 47:if(I=h.reduce((function(e,t,r){var n=Math.floor(r/30);return e[n]||(e[n]=[]),e[n].push(t),e}),[]),L=p.reduce((function(e,t,r){var n=Math.floor(r/30);return e[n]||(e[n]=[]),e[n].push(t),e}),[]),i!==o.l0.Entitlement.ANONYMOUS||this._scheduler.catalogStatus!==n.xp.DONE&&this._scheduler.catalogStatus!==n.xp.LOCAL_DONE||!1!==this._scheduler.initParams.anonymousUserFallbackServiceSearch){e.next=53;break}return a.X.Logger.logMessage(o.ds.DEBUG,"No go for service search. Fonts: ".concat(t,", ").concat(r)),e.abrupt("return",{psNames:u,fontIds:l});case 53:x=0,C=0;case 55:if(!(C<I.length)){e.next=66;break}return F={root:{downloadCB:null,fontsList:I[C],fontsIds:x<L.length?L[x]:[],unicodesList:[],fontInfo:new o.K1(o.l0.FontType.DEFAULT)},retryCount:this._fontRetryCount},e.next=59,this._scheduler.scheduleTask(o.l0.TaskType.FONT_SEARCH,F);case 59:P=e.sent,R=f(P);try{for(R.s();!(D=R.n()).done;)U=c(D.value,2),M=U[0],B=U[1],-1!==I[C].indexOf(M.postscriptName)&&u.set(M.postscriptName,{font:M,error:B}),x<L.length&&-1!==L[x].indexOf(M.fontId)&&l.set(M.fontId,{font:M,error:B})}catch(e){R.e(e)}finally{R.f()}x++;case 63:C++,e.next=55;break;case 66:if(!(x<L.length)){e.next=76;break}return j={root:{downloadCB:null,fontsList:[],fontsIds:L[x],unicodesList:[],fontInfo:new o.K1(o.l0.FontType.DEFAULT)},retryCount:this._fontRetryCount},e.next=70,this._scheduler.scheduleTask(o.l0.TaskType.FONT_SEARCH,j);case 70:G=e.sent,K=f(G);try{for(K.s();!(H=K.n()).done;)V=c(H.value,2),W=V[0],Y=V[1],-1!==L[x].indexOf(W.fontId)&&l.set(W.fontId,{font:W,error:Y})}catch(e){K.e(e)}finally{K.f()}case 73:x++,e.next=66;break;case 76:return e.abrupt("return",{psNames:u,fontIds:l});case 77:case"end":return e.stop()}}),e,this,[[10,22,25,28],[29,41,44,47]])}))),function(e,t,r){return l.apply(this,arguments)})}],r&&v(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();g.systemFontsCacheKey="".concat(i.C.SYSTEM_FONTS_ENDPOINT_PREFIX,"_2").concat(i.C.SYSTEM_FONTS_ENDPOINT_SUFFIX),g.localFontsCacheKey="".concat(i.C.LOCAL_ACCESS_ENDPOINT_PREFIX,"_1").concat(i.C.LOCAL_ACCESS_ENDPOINT_SUFFIX)},291689:(e,t,r)=>{"use strict";r.d(t,{e:()=>l});var n=r(51939);function a(e){return a="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},a(e)}function o(){o=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},s="function"==typeof Symbol?Symbol:{},u=s.iterator||"@@iterator",l=s.asyncIterator||"@@asyncIterator",c=s.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function h(e,t,r,n){var a=t&&t.prototype instanceof b?t:b,o=Object.create(a.prototype),s=new C(n||[]);return i(o,"_invoke",{value:O(e,r,s)}),o}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=h;var d="suspendedStart",m="suspendedYield",y="executing",v="completed",g={};function b(){}function _(){}function w(){}var E={};f(E,u,(function(){return this}));var S=Object.getPrototypeOf,T=S&&S(S(F([])));T&&T!==r&&n.call(T,u)&&(E=T);var k=w.prototype=b.prototype=Object.create(E);function A(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function N(e,t){function r(o,i,s,u){var l=p(e[o],e,i);if("throw"!==l.type){var c=l.arg,f=c.value;return f&&"object"==a(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(f).then((function(e){c.value=e,s(c)}),(function(e){return r("throw",e,s,u)}))}u(l.arg)}var o;i(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function O(t,r,n){var a=d;return function(o,i){if(a===y)throw new Error("Generator is already running");if(a===v){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var s=n.delegate;if(s){var u=I(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===d)throw a=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=y;var l=p(t,r,n);if("normal"===l.type){if(a=n.done?v:m,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(a=v,n.method="throw",n.arg=l.arg)}}}function I(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,I(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=p(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function F(t){if(t||""===t){var r=t[u];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(a(t)+" is not iterable")}return _.prototype=w,i(k,"constructor",{value:w,configurable:!0}),i(w,"constructor",{value:_,configurable:!0}),_.displayName=f(w,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,f(e,c,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},A(N.prototype),f(N.prototype,l,(function(){return this})),t.AsyncIterator=N,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new N(h(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},A(k),f(k,c,"Generator"),f(k,u,(function(){return this})),f(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=F,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(x),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return s.type="throw",s.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;x(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:F(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}function i(e,t,r,n,a,o,i){try{var s=e[o](i),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,a)}function s(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function s(e){i(o,n,a,s,u,"next",e)}function u(e){i(o,n,a,s,u,"throw",e)}s(void 0)}))}}function u(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,(void 0,o=function(e,t){if("object"!==a(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===a(o)?o:String(o)),n)}var o}var l=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._defaultLogLevel=n.ds.ERROR}var t,r,a,i;return t=e,r=[{key:"defaultLogLevel",get:function(){return this._defaultLogLevel},set:function(e){this._defaultLogLevel=e}},{key:"log",value:function(e,t){if(e>=this._defaultLogLevel){for(var r=arguments.length,a=new Array(r>2?r-2:0),o=2;o<r;o++)a[o-2]=arguments[o];switch(e){case n.ds.TRACE:console.trace(t,a);break;case n.ds.DEBUG:console.debug(t,a);break;case n.ds.INFO:console.info(t,a);break;case n.ds.WARN:console.warn(t,a);break;case n.ds.ERROR:console.error(t,a);case n.ds.NONE:}}}},{key:"logMessage",value:(i=s(o().mark((function e(t,r){var n,a,i,s=arguments;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(n=s.length,a=new Array(n>2?n-2:0),i=2;i<n;i++)a[i-2]=s[i];return e.next=3,this.log(t,r,a);case 3:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"logDefault",value:(a=s(o().mark((function e(t){var r,n,a,i=arguments;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(r=i.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=i[a];return e.next=3,this.log(this._defaultLogLevel,t,n);case 3:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})}],r&&u(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}()},971604:(e,t,r)=>{"use strict";r.d(t,{Z:()=>_});var n=r(177579),a=r(51939),o=r(921198),i=r(206069);function s(e){return s="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},s(e)}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,s=[],u=!0,l=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){l=!0,a=e}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw a}}return s}}(e,t)||d(e,t)||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.")}()}function l(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=d(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function c(){c=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function h(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,i=Object.create(o.prototype),s=new C(n||[]);return a(i,"_invoke",{value:O(e,r,s)}),i}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=h;var d="suspendedStart",m="suspendedYield",y="executing",v="completed",g={};function b(){}function _(){}function w(){}var E={};f(E,i,(function(){return this}));var S=Object.getPrototypeOf,T=S&&S(S(F([])));T&&T!==r&&n.call(T,i)&&(E=T);var k=w.prototype=b.prototype=Object.create(E);function A(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function N(e,t){function r(a,o,i,u){var l=p(e[a],e,o);if("throw"!==l.type){var c=l.arg,f=c.value;return f&&"object"==s(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,i,u)}),(function(e){r("throw",e,i,u)})):t.resolve(f).then((function(e){c.value=e,i(c)}),(function(e){return r("throw",e,i,u)}))}u(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function O(t,r,n){var a=d;return function(o,i){if(a===y)throw new Error("Generator is already running");if(a===v){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var s=n.delegate;if(s){var u=I(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===d)throw a=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=y;var l=p(t,r,n);if("normal"===l.type){if(a=n.done?v:m,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(a=v,n.method="throw",n.arg=l.arg)}}}function I(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,I(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=p(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function F(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(s(t)+" is not iterable")}return _.prototype=w,a(k,"constructor",{value:w,configurable:!0}),a(w,"constructor",{value:_,configurable:!0}),_.displayName=f(w,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,f(e,l,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},A(N.prototype),f(N.prototype,u,(function(){return this})),t.AsyncIterator=N,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new N(h(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},A(k),f(k,l,"Generator"),f(k,i,(function(){return this})),f(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=F,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(x),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return s.type="throw",s.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;x(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:F(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}function f(e,t,r,n,a,o,i){try{var s=e[o](i),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,a)}function h(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){f(o,n,a,i,s,"next",e)}function s(e){f(o,n,a,i,s,"throw",e)}i(void 0)}))}}function p(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||d(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){if(e){if("string"==typeof e)return m(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)?m(e,t):void 0}}function m(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 y(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,(void 0,a=function(e,t){if("object"!==s(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===s(a)?a:String(a)),n)}var a}function v(e){return new b(e,0)}function g(e){var t,r;function n(t,r){try{var o=e[t](r),i=o.value,s=i instanceof b;Promise.resolve(s?i.v:i).then((function(r){if(s){var u="return"===t?"return":"next";if(!i.k||r.done)return n(u,r);r=e[u](r).value}a(o.done?"return":"normal",r)}),(function(e){n("throw",e)}))}catch(e){a("throw",e)}}function a(e,a){switch(e){case"return":t.resolve({value:a,done:!0});break;case"throw":t.reject(a);break;default:t.resolve({value:a,done:!1})}(t=t.next)?n(t.key,t.arg):r=null}this._invoke=function(e,a){return new Promise((function(o,i){var s={key:e,arg:a,resolve:o,reject:i,next:null};r?r=r.next=s:(t=r=s,n(e,a))}))},"function"!=typeof e.return&&(this.return=void 0)}function b(e,t){this.v=e,this.k=t}g.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},g.prototype.next=function(e){return this._invoke("next",e)},g.prototype.throw=function(e){return this._invoke("throw",e)},g.prototype.return=function(e){return this._invoke("return",e)};var _=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,s,f,d,m,b,_,w;return t=e,r=[{key:"getCachedAggregations",value:function(e,t){var r=[],n=new a.mP;return!1===e.initParams.advancedServiceSearch&&(r=p(e.cachedFonts().values()).filter((function(t){return!(!t.isBrowsable||e.initParams.appEntitlement===a.l0.AppEntitlement.PAID&&e.obtainedTokenParams.entitlement!==a.l0.Entitlement.FULL&&!0===t.isPremiumFont||e.initParams.appEntitlement===a.l0.AppEntitlement.FREE&&!0===t.isPremiumFont)})),n=i.p.getAggregationFromFonts(r,t)),n}},{key:"getSystemAggregationFiltered",value:(w=h(c().mark((function e(t,r){var n,o;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.p.localFontsPermissionCheck(!1);case 2:if((n=e.sent).error.errCode!==a.l0.ErrorCode.NONE||n.state.toString()!==a.GX.GRANTED.toString()){e.next=10;break}return e.next=7,t.foundFontsHandler.getSystemFontsCollection(r);case 7:if((o=e.sent).error.errCode!==a.l0.ErrorCode.NONE){e.next=10;break}return e.abrupt("return",o.aggregation);case 10:return e.abrupt("return",new a.mP);case 11:case"end":return e.stop()}}),e)}))),function(e,t){return w.apply(this,arguments)})},{key:"getDBAggregationsFromFuzzySearch",value:(_=h(c().mark((function e(t,r,n){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!1!==t.initParams.advancedServiceSearch){e.next=3;break}return e.next=3,this.getAggregationFromFuzzySearch(t.dbWrapper,n,r,t.initParams,t.obtainedTokenParams.entitlement);case 3:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return _.apply(this,arguments)})},{key:"getSlugsFromServiceSearch",value:(b=h(c().mark((function e(t,r){var n,a,o,i,s,u,f,h,d,m,y,v;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.getSlugNames([r.join(" ")]);case 2:if(n=e.sent,a=n.querySet,o=n.error,i=[],0!==a.size){e.next=31;break}s=l(r),e.prev=8,s.s();case 10:if((u=s.n()).done){e.next=18;break}if(f=u.value,h=t.getSlugNames([f]),i.push(h),2!==i.length){e.next=16;break}return e.abrupt("break",18);case 16:e.next=10;break;case 18:e.next=23;break;case 20:e.prev=20,e.t0=e.catch(8),s.e(e.t0);case 23:return e.prev=23,s.f(),e.finish(23);case 26:return e.next=28,Promise.all(i);case 28:d=e.sent,m=l(d);try{for(m.s();!(y=m.n()).done;)v=y.value,a=new Map([].concat(p(a),p(v.querySet)))}catch(e){m.e(e)}finally{m.f()}case 31:return e.abrupt("return",{querySet:a,error:o});case 32:case"end":return e.stop()}}),e,null,[[8,20,23,26]])}))),function(e,t){return b.apply(this,arguments)})},{key:"getDBAggregationsFromSlugs",value:(m=h(c().mark((function t(r,n,a){var o,i,s,f,h,d;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r._fetchDefaultFamiliesData(p(a.keys()),!1,r.initParams.advancedServiceSearch?[]:n);case 2:o=t.sent,i=l(o.aggregation.getEntries());try{for(i.s();!(s=i.n()).done;)f=u(s.value,2),h=f[1],(d=a.get(h.familySlug))&&(h.creatorInfo=d,r.initParams.advancedServiceSearch&&d.familyName&&d.fontCount===h.getEntries().length?h.familyName=d.familyName:(d.familyName,h.familyName))}catch(e){i.e(e)}finally{i.f()}return e._setIsActiveForUserIfApplicable(o.aggregation),t.abrupt("return",o.aggregation);case 7:case"end":return t.stop()}}),t)}))),function(e,t,r){return m.apply(this,arguments)})},{key:"getAggregationPerSlugData",value:function(t,r){var n=new a.mP;if(!t.display_font||!t.fonts)return n;var o=t.fonts,s=t.display_font.postscript_name;return n=i.p.getFamiliesFromFontsArrayJSON(o,a.l0.FontType.DEFAULT,r.obtainedTokenParams.entitlement,n,s,null,r.initParams,!1,[]),e._setIsActiveForUserIfApplicable(n),n}},{key:"getAggregationFromFuzzySearch",value:(d=h(c().mark((function t(r,n,a,s,u){var l,f,h;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return f=["familyName","locFamilyName","locStyleName","psName","alternatePsName"],h=[],t.t0=(l=h).concat,t.t1=l,t.t2=p,t.next=7,Promise.all(f.map((function(e){return r.dbQueryUp(n.slice(0,1),[e],o.WM.BROWSE,!1)})));case 7:t.t3=t.sent,t.t4=(0,t.t2)(t.t3),h=t.t0.apply.call(t.t0,t.t1,t.t4),n.length>1&&(h=h.filter((function(e){return n.slice(1).every((function(t){return t=t.toLowerCase(),e.locFamilyName.join("#").includes(t)||e.locStyleName.join("#").includes(t)||e.psName.includes(t)}))}))),h=i.p.arrayUnique(h).slice(0,3e3),i.p.getFamiliesFromBulkDBData(h,a,s,u,!1),a.setRawMap(new Map(p(a.getRawMap().entries()).sort())),e._setIsActiveForUserIfApplicable(a);case 15:case"end":return t.stop()}}),t)}))),function(e,t,r,n,a){return d.apply(this,arguments)})},{key:"getAggregationFromLanguageSearch",value:(f=h(c().mark((function t(r,n,a,s,u){var l;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,r.dbQueryUp(n,["supportedLangs"],o.WM.BROWSE,!0);case 3:l=t.sent,i.p.getFamiliesFromBulkDBData(l,a,u,s,!1),e._setIsActiveForUserIfApplicable(a),t.next=10;break;case 8:t.prev=8,t.t0=t.catch(0);case 10:case"end":return t.stop()}}),t,null,[[0,8]])}))),function(e,t,r,n,a){return f.apply(this,arguments)})},{key:"searchUsingUnicodeRanges",value:function(e,t){var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5;return(r=c().mark((function r(){var s,f,h,p,d,m,y,g,b,_,w,E,S;return c().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:s=1;case 1:if(!(s<=o)){r.next=60;break}return f={retryCount:1,root:{page:s,perPage:n,unicodes:t}},h=new a.mP,r.next=6,v(e.scheduleTask(a.l0.TaskType.UNICODE_RANGE_MATCH_API,f));case 6:if((p=r.sent).error.errCode===a.l0.ErrorCode.NONE){r.next=11;break}return r.next=10,{family:new a.FX,error:p.error};case 10:return r.abrupt("continue",57);case 11:d=l(p.fonts),r.prev=12,d.s();case 14:if((m=d.n()).done){r.next=31;break}if(y=m.value,r.prev=16,y&&""!==y.postscriptName){r.next=19;break}return r.abrupt("continue",29);case 19:return r.next=21,v(e.getFontFromLocalInfo("",y.fontId,a.l0.FontType.DEFAULT,!0));case 21:g=r.sent,null==(b=h.getFamilyFromName(g.familyName))&&(b=new a.FX(g.familyName),h.addFamily(g.familyName,b)),b.addFont(g.postscriptName,g),r.next=29;break;case 27:r.prev=27,r.t0=r.catch(16);case 29:r.next=14;break;case 31:r.next=36;break;case 33:r.prev=33,r.t1=r.catch(12),d.e(r.t1);case 36:return r.prev=36,d.f(),r.finish(36);case 39:h=i.p.setDisplayFontForEachFamilyIfNeeded(h),_=l(h.getEntries()),r.prev=41,_.s();case 43:if((w=_.n()).done){r.next=49;break}return E=u(w.value,2),S=E[1],r.next=47,S;case 47:r.next=43;break;case 49:r.next=54;break;case 51:r.prev=51,r.t2=r.catch(41),_.e(r.t2);case 54:return r.prev=54,_.f(),r.finish(54);case 57:s++,r.next=1;break;case 60:case"end":return r.stop()}}),r,null,[[12,33,36,39],[16,27],[41,51,54,57]])})),function(){return new g(r.apply(this,arguments))})()}}],s=[{key:"_setIsActiveForUserIfApplicable",value:function(e){var t,r=l(e.getEntries());try{for(r.s();!(t=r.n()).done;){var a,o=l(u(t.value,2)[1].getEntries());try{for(o.s();!(a=o.n()).done;){var i,s=a.value,c=l(n.yZ._schedulersList);try{for(c.s();!(i=c.n()).done;)if(i.value.cachedFonts().has(s.postscriptName)){s.isActiveForUser=!0;break}}catch(e){c.e(e)}finally{c.f()}}}catch(e){o.e(e)}finally{o.f()}}}catch(e){r.e(e)}finally{r.f()}}}],r&&y(t.prototype,r),s&&y(t,s),Object.defineProperty(t,"prototype",{writable:!1}),e}()},108428:(e,t,r)=>{"use strict";function n(e){return n="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},n(e)}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,s=[],u=!0,l=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){l=!0,a=e}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw a}}return s}}(e,t)||i(e,t)||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.")}()}function o(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=i(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){u=!0,o=e},f:function(){try{s||null==r.return||r.return()}finally{if(u)throw o}}}}function i(e,t){if(e){if("string"==typeof e)return s(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)?s(e,t):void 0}}function s(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 u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,(void 0,o=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,"string");if("object"!==n(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(a.key),"symbol"===n(o)?o:String(o)),a)}var o}function c(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}r.d(t,{z:()=>h});var f=function(){function e(t,r,n){u(this,e),this._tickTime=0,this._counter=0,this._id=t,this._callback=r,this._tickTime=n}return c(e,[{key:"id",get:function(){return this._id},set:function(e){this._id=e}},{key:"callback",get:function(){return this._callback},set:function(e){this._callback=e}},{key:"tickTime",get:function(){return this._tickTime},set:function(e){this._tickTime=e}},{key:"counter",get:function(){return this._counter},set:function(e){this._counter=e}}]),e}(),h=function(){function e(t){var r=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;u(this,e),this._taskMap=new Map,this._criticalTaskMap=new Map,this._isPaused=!1,setTimeout((function(){setInterval((function(){Promise.resolve().then((function(){!1===r._isPaused?r.executeTasks(r._taskMap):r.executeTasks(r._criticalTaskMap)}))}),t)}),n)}return c(e,[{key:"executeTasks",value:function(e){var t,r=function(e){Promise.resolve().then((function(){e()}))},n=o(e);try{for(n.s();!(t=n.n()).done;){var i=a(t.value,2)[1];i.counter=i.counter+1,0!==i.tickTime&&i.counter>=i.tickTime&&(i.callback&&r(i.callback),i.counter=0)}}catch(e){n.e(e)}finally{n.f()}}},{key:"addTask",value:function(e,t,r,n){var a=new f(e,t,r);this._taskMap.set(e,a),n&&this._criticalTaskMap.set(e,a)}},{key:"pause",value:function(){this._isPaused=!0}},{key:"resume",value:function(){this._isPaused=!1;var e,t=function(e){Promise.resolve().then((function(){e()}))},r=o(this._taskMap);try{for(r.s();!(e=r.n()).done;){var n=a(e.value,2)[1];n.callback&&t(n.callback)}}catch(e){r.e(e)}finally{r.f()}}},{key:"isPaused",value:function(){return this._isPaused}},{key:"getTask",value:function(e){var t=this._taskMap.get(e);return t||(t=new f("",void 0,0)),t}}]),e}()},856101:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)}},719486:(e,t,r)=>{"use strict";var n;r.d(t,{Z:()=>o});var a=new Uint8Array(16);function o(){if(!n&&!(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(a)}},768812:(e,t,r)=>{"use strict";r.d(t,{S:()=>o});for(var n=[],a=0;a<256;++a)n.push((a+256).toString(16).slice(1));function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return n[e[t+0]]+n[e[t+1]]+n[e[t+2]]+n[e[t+3]]+"-"+n[e[t+4]]+n[e[t+5]]+"-"+n[e[t+6]]+n[e[t+7]]+"-"+n[e[t+8]]+n[e[t+9]]+"-"+n[e[t+10]]+n[e[t+11]]+n[e[t+12]]+n[e[t+13]]+n[e[t+14]]+n[e[t+15]]}},413097:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(856101),a=r(719486),o=r(768812);const i=function(e,t,r){if(n.Z.randomUUID&&!t&&!e)return n.Z.randomUUID();var i=(e=e||{}).random||(e.rng||a.Z)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){r=r||0;for(var s=0;s<16;++s)t[r+s]=i[s];return t}return(0,o.S)(i)}},398704:e=>{"use strict";function t(e){return t="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},t(e)}e.exports=function e(r,n){if(r===n)return!0;if(r&&n&&"object"==t(r)&&"object"==t(n)){if(r.constructor!==n.constructor)return!1;var a,o,i;if(Array.isArray(r)){if((a=r.length)!=n.length)return!1;for(o=a;0!=o--;)if(!e(r[o],n[o]))return!1;return!0}if(r.constructor===RegExp)return r.source===n.source&&r.flags===n.flags;if(r.valueOf!==Object.prototype.valueOf)return r.valueOf()===n.valueOf();if(r.toString!==Object.prototype.toString)return r.toString()===n.toString();if((a=(i=Object.keys(r)).length)!==Object.keys(n).length)return!1;for(o=a;0!=o--;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=a;0!=o--;){var s=i[o];if(!e(r[s],n[s]))return!1}return!0}return r!=r&&n!=n}},738377:e=>{function t(){this.table=new Uint16Array(16),this.trans=new Uint16Array(288)}function r(e,r){this.source=e,this.sourceIndex=0,this.tag=0,this.bitcount=0,this.dest=r,this.destLen=0,this.ltree=new t,this.dtree=new t}var n=new t,a=new t,o=new Uint8Array(30),i=new Uint16Array(30),s=new Uint8Array(30),u=new Uint16Array(30),l=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),c=new t,f=new Uint8Array(320);function h(e,t,r,n){var a,o;for(a=0;a<r;++a)e[a]=0;for(a=0;a<30-r;++a)e[a+r]=a/r|0;for(o=n,a=0;a<30;++a)t[a]=o,o+=1<<e[a]}var p=new Uint16Array(16);function d(e,t,r,n){var a,o;for(a=0;a<16;++a)e.table[a]=0;for(a=0;a<n;++a)e.table[t[r+a]]++;for(e.table[0]=0,o=0,a=0;a<16;++a)p[a]=o,o+=e.table[a];for(a=0;a<n;++a)t[r+a]&&(e.trans[p[t[r+a]]++]=a)}function m(e){e.bitcount--||(e.tag=e.source[e.sourceIndex++],e.bitcount=7);var t=1&e.tag;return e.tag>>>=1,t}function y(e,t,r){if(!t)return r;for(;e.bitcount<24;)e.tag|=e.source[e.sourceIndex++]<<e.bitcount,e.bitcount+=8;var n=e.tag&65535>>>16-t;return e.tag>>>=t,e.bitcount-=t,n+r}function v(e,t){for(;e.bitcount<24;)e.tag|=e.source[e.sourceIndex++]<<e.bitcount,e.bitcount+=8;var r=0,n=0,a=0,o=e.tag;do{n=2*n+(1&o),o>>>=1,++a,r+=t.table[a],n-=t.table[a]}while(n>=0);return e.tag=o,e.bitcount-=a,t.trans[r+n]}function g(e,t,r){var n,a,o,i,s,u;for(n=y(e,5,257),a=y(e,5,1),o=y(e,4,4),i=0;i<19;++i)f[i]=0;for(i=0;i<o;++i){var h=y(e,3,0);f[l[i]]=h}for(d(c,f,0,19),s=0;s<n+a;){var p=v(e,c);switch(p){case 16:var m=f[s-1];for(u=y(e,2,3);u;--u)f[s++]=m;break;case 17:for(u=y(e,3,3);u;--u)f[s++]=0;break;case 18:for(u=y(e,7,11);u;--u)f[s++]=0;break;default:f[s++]=p}}d(t,f,0,n),d(r,f,n,a)}function b(e,t,r){for(;;){var n,a,l,c,f=v(e,t);if(256===f)return 0;if(f<256)e.dest[e.destLen++]=f;else for(n=y(e,o[f-=257],i[f]),a=v(e,r),c=l=e.destLen-y(e,s[a],u[a]);c<l+n;++c)e.dest[e.destLen++]=e.dest[c]}}function _(e){for(var t,r;e.bitcount>8;)e.sourceIndex--,e.bitcount-=8;if((t=256*(t=e.source[e.sourceIndex+1])+e.source[e.sourceIndex])!==(65535&~(256*e.source[e.sourceIndex+3]+e.source[e.sourceIndex+2])))return-3;for(e.sourceIndex+=4,r=t;r;--r)e.dest[e.destLen++]=e.source[e.sourceIndex++];return e.bitcount=0,0}!function(e,t){var r;for(r=0;r<7;++r)e.table[r]=0;for(e.table[7]=24,e.table[8]=152,e.table[9]=112,r=0;r<24;++r)e.trans[r]=256+r;for(r=0;r<144;++r)e.trans[24+r]=r;for(r=0;r<8;++r)e.trans[168+r]=280+r;for(r=0;r<112;++r)e.trans[176+r]=144+r;for(r=0;r<5;++r)t.table[r]=0;for(t.table[5]=32,r=0;r<32;++r)t.trans[r]=r}(n,a),h(o,i,4,3),h(s,u,2,1),o[28]=0,i[28]=258,e.exports=function(e,t){var o,i,s=new r(e,t);do{switch(o=m(s),y(s,2,0)){case 0:i=_(s);break;case 1:i=b(s,n,a);break;case 2:g(s,s.ltree,s.dtree),i=b(s,s.ltree,s.dtree);break;default:i=-3}if(0!==i)throw new Error("Data error")}while(!o);return s.destLen<s.dest.length?"function"==typeof s.dest.slice?s.dest.slice(0,s.destLen):s.dest.subarray(0,s.destLen):s.dest}},455783:(e,t,r)=>{"use strict";r.d(t,{ZP:()=>Xr});const n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,a=Object.keys,o=Array.isArray;function i(e,t){return"object"!=typeof t||a(t).forEach((function(r){e[r]=t[r]})),e}"undefined"==typeof Promise||n.Promise||(n.Promise=Promise);const s=Object.getPrototypeOf,u={}.hasOwnProperty;function l(e,t){return u.call(e,t)}function c(e,t){"function"==typeof t&&(t=t(s(e))),("undefined"==typeof Reflect?a:Reflect.ownKeys)(t).forEach((r=>{h(e,r,t[r])}))}const f=Object.defineProperty;function h(e,t,r,n){f(e,t,i(r&&l(r,"get")&&"function"==typeof r.get?{get:r.get,set:r.set,configurable:!0}:{value:r,configurable:!0,writable:!0},n))}function p(e){return{from:function(t){return e.prototype=Object.create(t.prototype),h(e.prototype,"constructor",e),{extend:c.bind(null,e.prototype)}}}}const d=Object.getOwnPropertyDescriptor;function m(e,t){let r;return d(e,t)||(r=s(e))&&m(r,t)}const y=[].slice;function v(e,t,r){return y.call(e,t,r)}function g(e,t){return t(e)}function b(e){if(!e)throw new Error("Assertion Failed")}function _(e){n.setImmediate?setImmediate(e):setTimeout(e,0)}function w(e,t){return e.reduce(((e,r,n)=>{var a=t(r,n);return a&&(e[a[0]]=a[1]),e}),{})}function E(e,t){if(l(e,t))return e[t];if(!t)return e;if("string"!=typeof t){for(var r=[],n=0,a=t.length;n<a;++n){var o=E(e,t[n]);r.push(o)}return r}var i=t.indexOf(".");if(-1!==i){var s=e[t.substr(0,i)];return void 0===s?void 0:E(s,t.substr(i+1))}}function S(e,t,r){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){b("string"!=typeof r&&"length"in r);for(var n=0,a=t.length;n<a;++n)S(e,t[n],r[n])}else{var i=t.indexOf(".");if(-1!==i){var s=t.substr(0,i),u=t.substr(i+1);if(""===u)void 0===r?o(e)&&!isNaN(parseInt(s))?e.splice(s,1):delete e[s]:e[s]=r;else{var c=e[s];c&&l(e,s)||(c=e[s]={}),S(c,u,r)}}else void 0===r?o(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=r}}function T(e){var t={};for(var r in e)l(e,r)&&(t[r]=e[r]);return t}const k=[].concat;function A(e){return k.apply([],e)}const N="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(A([8,16,32,64].map((e=>["Int","Uint","Float"].map((t=>t+e+"Array")))))).filter((e=>n[e])),O=N.map((e=>n[e]));w(N,(e=>[e,!0]));let I=null;function L(e){I="undefined"!=typeof WeakMap&&new WeakMap;const t=x(e);return I=null,t}function x(e){if(!e||"object"!=typeof e)return e;let t=I&&I.get(e);if(t)return t;if(o(e)){t=[],I&&I.set(e,t);for(var r=0,n=e.length;r<n;++r)t.push(x(e[r]))}else if(O.indexOf(e.constructor)>=0)t=e;else{const r=s(e);for(var a in t=r===Object.prototype?{}:Object.create(r),I&&I.set(e,t),e)l(e,a)&&(t[a]=x(e[a]))}return t}const{toString:C}={};function F(e){return C.call(e).slice(8,-1)}const P="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",R="symbol"==typeof P?function(e){var t;return null!=e&&(t=e[P])&&t.apply(e)}:function(){return null},D={};function U(e){var t,r,n,a;if(1===arguments.length){if(o(e))return e.slice();if(this===D&&"string"==typeof e)return[e];if(a=R(e)){for(r=[];!(n=a.next()).done;)r.push(n.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 M="undefined"!=typeof Symbol?e=>"AsyncFunction"===e[Symbol.toStringTag]:()=>!1;var B="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function j(e,t){B=e,G=t}var G=()=>!0;const K=!new Error("").stack;function H(){if(K)try{throw H.arguments,new Error}catch(e){return e}return new Error}function V(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(G).map((e=>"\n"+e)).join("")):""}var W=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],Y=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(W),J={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=H(),this.name=e,this.message=t}function $(e,t){return e+". Errors: "+Object.keys(t).map((e=>t[e].toString())).filter(((e,t,r)=>r.indexOf(e)===t)).join("\n")}function q(e,t,r,n){this._e=H(),this.failures=t,this.failedKeys=n,this.successCount=r,this.message=$(e,t)}function X(e,t){this._e=H(),this.name="BulkError",this.failures=Object.keys(t).map((e=>t[e])),this.failuresByPos=t,this.message=$(e,t)}p(z).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+V(this._e,2))}},toString:function(){return this.name+": "+this.message}}),p(q).from(z),p(X).from(z);var Q=Y.reduce(((e,t)=>(e[t]=t+"Error",e)),{});const Z=z;var ee=Y.reduce(((e,t)=>{var r=t+"Error";function n(e,n){this._e=H(),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=J[t]||r,this.inner=null)}return p(n).from(Z),e[t]=n,e}),{});ee.Syntax=SyntaxError,ee.Type=TypeError,ee.Range=RangeError;var te=W.reduce(((e,t)=>(e[t+"Error"]=ee[t],e)),{}),re=Y.reduce(((e,t)=>(-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=ee[t]),e)),{});function ne(){}function ae(e){return e}function oe(e,t){return null==e||e===ae?t:function(r){return t(e(r))}}function ie(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function se(e,t){return e===ne?t:function(){var r=e.apply(this,arguments);void 0!==r&&(arguments[0]=r);var n=this.onsuccess,a=this.onerror;this.onsuccess=null,this.onerror=null;var o=t.apply(this,arguments);return n&&(this.onsuccess=this.onsuccess?ie(n,this.onsuccess):n),a&&(this.onerror=this.onerror?ie(a,this.onerror):a),void 0!==o?o:r}}function ue(e,t){return e===ne?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?ie(r,this.onsuccess):r),n&&(this.onerror=this.onerror?ie(n,this.onerror):n)}}function le(e,t){return e===ne?t:function(r){var n=e.apply(this,arguments);i(r,n);var a=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var s=t.apply(this,arguments);return a&&(this.onsuccess=this.onsuccess?ie(a,this.onsuccess):a),o&&(this.onerror=this.onerror?ie(o,this.onerror):o),void 0===n?void 0===s?void 0:s:i(n,s)}}function ce(e,t){return e===ne?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}}function fe(e,t){return e===ne?t:function(){var r=e.apply(this,arguments);if(r&&"function"==typeof r.then){for(var n=this,a=arguments.length,o=new Array(a);a--;)o[a]=arguments[a];return r.then((function(){return t.apply(n,o)}))}return t.apply(this,arguments)}}re.ModifyError=q,re.DexieError=z,re.BulkError=X;var he={};const pe=100,[de,me,ye]="undefined"==typeof Promise?[]:(()=>{let e=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[e,s(e),e];const t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,s(t),e]})(),ve=me&&me.then,ge=de&&de.constructor,be=!!ye;var _e=!1,we=ye?()=>{ye.then(Ve)}:n.setImmediate?setImmediate.bind(null,Ve):n.MutationObserver?()=>{var e=document.createElement("div");new MutationObserver((()=>{Ve(),e=null})).observe(e,{attributes:!0}),e.setAttribute("i","1")}:()=>{setTimeout(Ve,0)},Ee=function(e,t){xe.push([e,t]),Te&&(we(),Te=!1)},Se=!0,Te=!0,ke=[],Ae=[],Ne=null,Oe=ae,Ie={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:mt,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach((e=>{try{mt(e[0],e[1])}catch(e){}}))}},Le=Ie,xe=[],Ce=0,Fe=[];function Pe(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=ne,this._lib=!1;var t=this._PSD=Le;if(B&&(this._stackHolder=H(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==he)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&Me(this,this._value))}this._state=null,this._value=null,++t.ref,Ue(this,e)}const Re={get:function(){var e=Le,t=et;function r(r,n){var a=!e.global&&(e!==Le||t!==et);const o=a&&!at();var i=new Pe(((t,i)=>{je(this,new De(ht(r,e,a,o),ht(n,e,a,o),t,i,e))}));return B&&He(i,this),i}return r.prototype=he,r},set:function(e){h(this,"then",e&&e.prototype===he?Re:{get:function(){return e},set:Re.set})}};function De(e,t,r,n,a){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=r,this.reject=n,this.psd=a}function Ue(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&&We();t&&"function"==typeof t.then?Ue(e,((e,r)=>{t instanceof Pe?t._then(e,r):t.then(e,r)})):(e._state=!0,e._value=t,Be(e)),r&&Ye()}}),Me.bind(null,e))}catch(t){Me(null,e)}}function Me(e,t){if(Ae.push(t),null===e._state){var r=e._lib&&We();t=Oe(t),e._state=!1,e._value=t,B&&null!==t&&"object"==typeof t&&!t._promise&&function(e,t,r){try{e.apply(null,void 0)}catch(e){}}((()=>{var r=m(t,"stack");t._promise=e,h(t,"stack",{get:()=>_e?r&&(r.get?r.get.apply(t):r.value):e.stack})})),function(e){ke.some((t=>t._value===e._value))||ke.push(e)}(e),Be(e),r&&Ye()}}function Be(e){var t=e._listeners;e._listeners=[];for(var r=0,n=t.length;r<n;++r)je(e,t[r]);var a=e._PSD;--a.ref||a.finalize(),0===Ce&&(++Ce,Ee((()=>{0==--Ce&&Je()}),[]))}function je(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,++Ce,Ee(Ge,[r,e,t])}else e._listeners.push(t)}function Ge(e,t,r){try{Ne=t;var n,a=t._value;t._state?n=e(a):(Ae.length&&(Ae=[]),n=e(a),-1===Ae.indexOf(a)&&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{Ne=null,0==--Ce&&Je(),--r.psd.ref||r.psd.finalize()}}function Ke(e,t,r){if(t.length===r)return t;var n="";if(!1===e._state){var a,o,i=e._value;null!=i?(a=i.name||"Error",o=i.message||i,n=V(i,0)):(a=i,o=""),t.push(a+(o?": "+o:"")+n)}return B&&((n=V(e._stackHolder,2))&&-1===t.indexOf(n)&&t.push(n),e._prev&&Ke(e._prev,t,r)),t}function He(e,t){var r=t?t._numPrev+1:0;r<100&&(e._prev=t,e._numPrev=r)}function Ve(){We()&&Ye()}function We(){var e=Se;return Se=!1,Te=!1,e}function Ye(){var e,t,r;do{for(;xe.length>0;)for(e=xe,xe=[],r=e.length,t=0;t<r;++t){var n=e[t];n[0].apply(null,n[1])}}while(xe.length>0);Se=!0,Te=!0}function Je(){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 ze(e){return new Pe(he,!1,e)}function $e(e,t){var r=Le;return function(){var n=We(),a=Le;try{return ut(r,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{ut(a,!1),n&&Ye()}}}c(Pe.prototype,{then:Re,_then:function(e,t){je(this,new De(null,null,e,t,Le))},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):ze(e))):this.then(null,(e=>e&&e.name===t?r(e):ze(e)))},finally:function(e){return this.then((t=>(e(),t)),(t=>(e(),ze(t))))},stack:{get:function(){if(this._stack)return this._stack;try{_e=!0;var e=Ke(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{_e=!1}}},timeout:function(e,t){return e<1/0?new Pe(((r,n)=>{var a=setTimeout((()=>n(new ee.Timeout(t))),e);this.then(r,n).finally(clearTimeout.bind(null,a))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&h(Pe.prototype,Symbol.toStringTag,"Dexie.Promise"),Ie.env=lt(),c(Pe,{all:function(){var e=U.apply(null,arguments).map(ot);return new Pe((function(t,r){0===e.length&&t([]);var n=e.length;e.forEach(((a,o)=>Pe.resolve(a).then((r=>{e[o]=r,--n||t(e)}),r)))}))},resolve:e=>{if(e instanceof Pe)return e;if(e&&"function"==typeof e.then)return new Pe(((t,r)=>{e.then(t,r)}));var t=new Pe(he,!0,e);return He(t,Ne),t},reject:ze,race:function(){var e=U.apply(null,arguments).map(ot);return new Pe(((t,r)=>{e.map((e=>Pe.resolve(e).then(t,r)))}))},PSD:{get:()=>Le,set:e=>Le=e},totalEchoes:{get:()=>et},newPSD:rt,usePSD:ct,scheduler:{get:()=>Ee,set:e=>{Ee=e}},rejectionMapper:{get:()=>Oe,set:e=>{Oe=e}},follow:(e,t)=>new Pe(((r,n)=>rt(((t,r)=>{var n=Le;n.unhandleds=[],n.onunhandled=r,n.finalize=ie((function(){!function(e){Fe.push((function t(){e(),Fe.splice(Fe.indexOf(t),1)})),++Ce,Ee((()=>{0==--Ce&&Je()}),[])}((()=>{0===this.unhandleds.length?t():r(this.unhandleds[0])}))}),n.finalize),e()}),t,r,n)))}),ge&&(ge.allSettled&&h(Pe,"allSettled",(function(){const e=U.apply(null,arguments).map(ot);return new Pe((t=>{0===e.length&&t([]);let r=e.length;const n=new Array(r);e.forEach(((e,a)=>Pe.resolve(e).then((e=>n[a]={status:"fulfilled",value:e}),(e=>n[a]={status:"rejected",reason:e})).then((()=>--r||t(n)))))}))})),ge.any&&"undefined"!=typeof AggregateError&&h(Pe,"any",(function(){const e=U.apply(null,arguments).map(ot);return new Pe(((t,r)=>{0===e.length&&r(new AggregateError([]));let n=e.length;const a=new Array(n);e.forEach(((e,o)=>Pe.resolve(e).then((e=>t(e)),(e=>{a[o]=e,--n||r(new AggregateError(a))}))))}))})));const qe={awaits:0,echoes:0,id:0};var Xe=0,Qe=[],Ze=0,et=0,tt=0;function rt(e,t,r,n){var a=Le,o=Object.create(a);o.parent=a,o.ref=0,o.global=!1,o.id=++tt;var s=Ie.env;o.env=be?{Promise:Pe,PromiseProp:{value:Pe,configurable:!0,writable:!0},all:Pe.all,race:Pe.race,allSettled:Pe.allSettled,any:Pe.any,resolve:Pe.resolve,reject:Pe.reject,nthen:pt(s.nthen,o),gthen:pt(s.gthen,o)}:{},t&&i(o,t),++a.ref,o.finalize=function(){--this.parent.ref||this.parent.finalize()};var u=ct(o,e,r,n);return 0===o.ref&&o.finalize(),u}function nt(){return qe.id||(qe.id=++Xe),++qe.awaits,qe.echoes+=pe,qe.id}function at(){return!!qe.awaits&&(0==--qe.awaits&&(qe.id=0),qe.echoes=qe.awaits*pe,!0)}function ot(e){return qe.echoes&&e&&e.constructor===ge?(nt(),e.then((e=>(at(),e)),(e=>(at(),yt(e))))):e}function it(e){++et,qe.echoes&&0!=--qe.echoes||(qe.echoes=qe.id=0),Qe.push(Le),ut(e,!0)}function st(){var e=Qe[Qe.length-1];Qe.pop(),ut(e,!1)}function ut(e,t){var r=Le;if((t?!qe.echoes||Ze++&&e===Le:!Ze||--Ze&&e===Le)||ft(t?it.bind(null,e):st),e!==Le&&(Le=e,r===Ie&&(Ie.env=lt()),be)){var a=Ie.env.Promise,o=e.env;me.then=o.nthen,a.prototype.then=o.gthen,(r.global||e.global)&&(Object.defineProperty(n,"Promise",o.PromiseProp),a.all=o.all,a.race=o.race,a.resolve=o.resolve,a.reject=o.reject,o.allSettled&&(a.allSettled=o.allSettled),o.any&&(a.any=o.any))}}function lt(){var e=n.Promise;return be?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(n,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:me.then,gthen:e.prototype.then}:{}}function ct(e,t,r,n,a){var o=Le;try{return ut(e,!0),t(r,n,a)}finally{ut(o,!1)}}function ft(e){ve.call(de,e)}function ht(e,t,r,n){return"function"!=typeof e?e:function(){var a=Le;r&&nt(),ut(t,!0);try{return e.apply(this,arguments)}finally{ut(a,!1),n&&ft(at)}}}function pt(e,t){return function(r,n){return e.call(this,ht(r,t),ht(n,t))}}-1===(""+ve).indexOf("[native code]")&&(nt=at=ne);const dt="unhandledrejection";function mt(e,t){var r;try{r=t.onuncatched(e)}catch(e){}if(!1!==r)try{var a,o={promise:t,reason:e};n.document&&document.createEvent?((a=document.createEvent("Event")).initEvent(dt,!0,!0),i(a,o)):n.CustomEvent&&i(a=new CustomEvent(dt,{detail:o}),o),a&&n.dispatchEvent&&("unhandledrejection"!==a.type.toString()&&dispatchEvent(a),!n.PromiseRejectionEvent&&n.onunhandledrejection),B&&a&&!a.defaultPrevented&&console.warn(`Unhandled rejection: ${e.stack||e}`)}catch(e){}}var yt=Pe.reject;function vt(e,t,r,n){if(e.idbdb&&(e._state.openComplete||Le.letThrough||e._vip)){var a=e._createTransaction(t,r,e._dbSchema);try{a.create(),e._state.PR1398_maxLoop=3}catch(a){return a.name===Q.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((()=>vt(e,t,r,n)))):void 0}return a._promise(t,((e,t)=>rt((()=>(Le.trans=a,n(e,t,a)))))).then((e=>a._completion.then((()=>e))))}if(e._state.openComplete)return yt(new ee.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return yt(new ee.DatabaseClosed);e.open().catch(ne)}return e._state.dbReadyPromise.then((()=>vt(e,t,r,n)))}const gt="3.4.1",bt=String.fromCharCode(65535),_t=-1/0,wt="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",Et="String expected.",St=[],Tt="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),kt=Tt,At=Tt,Nt=e=>!/(dexie\.js|dexie\.min\.js)/.test(e),Ot="__dbnames",It="readonly",Lt="readwrite";function xt(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}const Ct={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function Ft(e){return"string"!=typeof e||/\./.test(e)?e=>e:t=>(void 0===t[e]&&e in t&&delete(t=L(t))[e],t)}class Pt{_trans(e,t,r){const n=this._tx||Le.trans,a=this.name;function o(e,r,n){if(n.schema[a])return t(n.idbtrans,n)}const i=We();try{return n&&n.db===this.db?n===Le.trans?n._promise(e,o,r):rt((()=>n._promise(e,o,r)),{trans:n,transless:Le.transless||Le}):vt(this.db,e,[this.name],o)}finally{i&&Ye()}}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(o(e))return new this.db.WhereClause(this,`[${e.join("+")}]`);const t=a(e);if(1===t.length)return this.where(t[0]).equals(e[t[0]]);const r=this.schema.indexes.concat(this.schema.primKey).filter((e=>e.compound&&t.every((t=>e.keyPath.indexOf(t)>=0))&&e.keyPath.every((e=>t.indexOf(e)>=0))))[0];if(r&&this.db._maxKey!==bt)return this.where(r.name).equals(r.keyPath.map((t=>e[t])));!r&&B&&console.warn(`The query ${JSON.stringify(e)} on ${this.name} would benefit of a compound index [${t.join("+")}]`);const{idxByName:n}=this.schema,i=this.db._deps.indexedDB;function s(e,t){try{return 0===i.cmp(e,t)}catch(e){return!1}}const[u,l]=t.reduce((([t,r],a)=>{const i=n[a],u=e[a];return[t||i,t||!i?xt(r,i&&i.multi?e=>{const t=E(e,a);return o(t)&&t.some((e=>s(u,e)))}:e=>s(u,E(e,a))):r]}),[null,null]);return u?this.where(u.name).equals(e[u.keyPath]).filter(l):r?this.filter(l):this.where(t).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,o(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(l(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){i(this,e)}))}add(e,t){const{auto:r,keyPath:n}=this.schema.primKey;let a=e;return n&&r&&(a=Ft(n)(e)),this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[a]}))).then((e=>e.numFailures?Pe.reject(e.failures[0]):e.lastResult)).then((t=>{if(n)try{S(e,n,t)}catch(e){}return t}))}update(e,t){if("object"!=typeof e||o(e))return this.where(":id").equals(e).modify(t);{const r=E(e,this.schema.primKey.keyPath);if(void 0===r)return yt(new ee.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof t?a(t).forEach((r=>{S(e,r,t[r])})):t(e,{value:e,primKey:r})}catch(e){}return this.where(":id").equals(r).modify(t)}}put(e,t){const{auto:r,keyPath:n}=this.schema.primKey;let a=e;return n&&r&&(a=Ft(n)(e)),this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"put",values:[a],keys:null!=t?[t]:null}))).then((e=>e.numFailures?Pe.reject(e.failures[0]):e.lastResult)).then((t=>{if(n)try{S(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?Pe.reject(e.failures[0]):void 0))}clear(){return this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"deleteRange",range:Ct}))).then((e=>e.numFailures?Pe.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,a=(r=r||(n?void 0:t))?r.allKeys:void 0;return this._trans("readwrite",(t=>{const{auto:r,keyPath:o}=this.schema.primKey;if(o&&n)throw new ee.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(n&&n.length!==e.length)throw new ee.InvalidArgument("Arguments objects and keys must have the same length");const i=e.length;let s=o&&r?e.map(Ft(o)):e;return this.core.mutate({trans:t,type:"add",keys:n,values:s,wantResults:a}).then((({numFailures:e,results:t,lastResult:r,failures:n})=>{if(0===e)return a?t:r;throw new X(`${this.name}.bulkAdd(): ${e} of ${i} operations failed`,n)}))}))}bulkPut(e,t,r){const n=Array.isArray(t)?t:void 0,a=(r=r||(n?void 0:t))?r.allKeys:void 0;return this._trans("readwrite",(t=>{const{auto:r,keyPath:o}=this.schema.primKey;if(o&&n)throw new ee.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(n&&n.length!==e.length)throw new ee.InvalidArgument("Arguments objects and keys must have the same length");const i=e.length;let s=o&&r?e.map(Ft(o)):e;return this.core.mutate({trans:t,type:"put",keys:n,values:s,wantResults:a}).then((({numFailures:e,results:t,lastResult:r,failures:n})=>{if(0===e)return a?t:r;throw new X(`${this.name}.bulkPut(): ${e} of ${i} 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 X(`${this.name}.bulkDelete(): ${e} of ${t} operations failed`,n)}))}}function Rt(e){var t={},r=function(r,n){if(n){for(var a=arguments.length,o=new Array(a-1);--a;)o[a-1]=arguments[a];return t[r].subscribe.apply(null,o),e}if("string"==typeof r)return t[r]};r.addEventType=s;for(var n=1,i=arguments.length;n<i;++n)s(arguments[n]);return r;function s(e,n,i){if("object"!=typeof e){var u;n||(n=ce),i||(i=ne);var l={subscribers:[],fire:i,subscribe:function(e){-1===l.subscribers.indexOf(e)&&(l.subscribers.push(e),l.fire=n(l.fire,e))},unsubscribe:function(e){l.subscribers=l.subscribers.filter((function(t){return t!==e})),l.fire=l.subscribers.reduce(n,i)}};return t[e]=r[e]=l,l}a(u=e).forEach((function(e){var t=u[e];if(o(t))s(e,u[e][0],u[e][1]);else{if("asap"!==t)throw new ee.InvalidArgument("Invalid event config");var r=s(e,ae,(function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];r.subscribers.forEach((function(e){_((function(){e.apply(null,t)}))}))}))}}))}}function Dt(e,t){return p(t).from({prototype:e}),t}function Ut(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function Mt(e,t){e.filter=xt(e.filter,t)}function Bt(e,t,r){var n=e.replayFilter;e.replayFilter=n?()=>xt(n(),t()):t,e.justLimit=r&&!n}function jt(e,t){if(e.isPrimKey)return t.primaryKey;const r=t.getIndexByKeyPath(e.index);if(!r)throw new ee.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return r}function Gt(e,t,r){const n=jt(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 Kt(e,t,r,n){const a=e.replayFilter?xt(e.filter,e.replayFilter()):e.filter;if(e.or){const o={},i=(e,r,n)=>{if(!a||a(r,n,(e=>r.stop(e)),(e=>r.fail(e)))){var i=r.primaryKey,s=""+i;"[object ArrayBuffer]"===s&&(s=""+new Uint8Array(i)),l(o,s)||(o[s]=!0,t(e,r,n))}};return Promise.all([e.or._iterate(i,r),Ht(Gt(e,n,r),e.algorithm,i,!e.keysOnly&&e.valueMapper)])}return Ht(Gt(e,n,r),xt(e.algorithm,a),t,!e.keysOnly&&e.valueMapper)}function Ht(e,t,r,n){var a=$e(n?(e,t,a)=>r(n(e),t,a):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=ne}),(t=>{e.fail(t),r=ne}))||a(e.value,e,(e=>r=e)),r()}))}))}function Vt(e,t){try{const r=Wt(e),n=Wt(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,a=r<n?r:n;for(let r=0;r<a;++r)if(e[r]!==t[r])return e[r]<t[r]?-1:1;return r===n?0:r<n?-1:1}(Yt(e),Yt(t));case"Array":return function(e,t){const r=e.length,n=t.length,a=r<n?r:n;for(let r=0;r<a;++r){const n=Vt(e[r],t[r]);if(0!==n)return n}return r===n?0:r<n?-1:1}(e,t)}}catch(e){}return NaN}function Wt(e){const t=typeof e;if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";const r=F(e);return"ArrayBuffer"===r?"binary":r}function Yt(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}class Jt{_read(e,t){var r=this._ctx;return r.error?r.table._trans(null,yt.bind(null,r.error)):r.table._trans("readonly",e).then(t)}_write(e){var t=this._ctx;return t.error?t.table._trans(null,yt.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 Kt(this._ctx,e,t,this._ctx.table.core)}clone(e){var t=Object.create(this.constructor.prototype),r=Object.create(this._ctx);return e&&i(r,e),t._ctx=r,t}raw(){return this._ctx.valueMapper=null,this}each(e){var t=this._ctx;return this._read((r=>Kt(t,e,r,t.table.core)))}count(e){return this._read((e=>{const t=this._ctx,r=t.table.core;if(Ut(t,!0))return r.count({trans:e,query:{index:jt(t,r.schema),range:t.range}}).then((e=>Math.min(e,t.limit)));var n=0;return Kt(t,(()=>(++n,!1)),e,r).then((()=>n))})).then(e)}sortBy(e,t){const r=e.split(".").reverse(),n=r[0],a=r.length-1;function o(e,t){return t?o(e[r[t]],t-1):e[n]}var i="next"===this._ctx.dir?1:-1;function s(e,t){var r=o(e,a),n=o(t,a);return r<n?-i:r>n?i: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&&Ut(t,!0)&&t.limit>0){const{valueMapper:r}=t,n=jt(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 Kt(t,(e=>r.push(e)),e,t.table.core).then((()=>r))}}),e)}offset(e){var t=this._ctx;return e<=0||(t.offset+=e,Ut(t)?Bt(t,(()=>{var t=e;return(e,r)=>0===t||(1===t?(--t,!1):(r((()=>{e.advance(t),t=0})),!1))})):Bt(t,(()=>{var t=e;return()=>--t<0}))),this}limit(e){return this._ctx.limit=Math.min(this._ctx.limit,e),Bt(this._ctx,(()=>{var t=e;return function(e,r,n){return--t<=0&&r(n),t>=0}}),!0),this}until(e,t){return Mt(this._ctx,(function(r,n,a){return!e(r.value)||(n(a),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 Mt(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&&Ut(t,!0)&&t.limit>0)return this._read((e=>{var r=jt(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 Mt(this._ctx,(function(e){var t=e.primaryKey.toString(),n=l(r,t);return r[t]=!0,!n})),this}modify(e){var t=this._ctx;return this._write((r=>{var n;if("function"==typeof e)n=e;else{var o=a(e),i=o.length;n=function(t){for(var r=!1,n=0;n<i;++n){var a=o[n],s=e[a];E(t,a)!==s&&(S(t,a,s),r=!0)}return r}}const s=t.table.core,{outbound:u,extractKey:l}=s.schema.primaryKey,c=this.db._options.modifyChunkSize||200,f=[];let h=0;const p=[],d=(e,t)=>{const{failures:r,numFailures:n}=t;h+=e-n;for(let e of a(r))f.push(r[e])};return this.clone().primaryKeys().then((a=>{const o=i=>{const f=Math.min(c,a.length-i);return s.getMany({trans:r,keys:a.slice(i,i+f),cache:"immutable"}).then((h=>{const p=[],m=[],y=u?[]:null,v=[];for(let e=0;e<f;++e){const t=h[e],r={value:L(t),primKey:a[i+e]};!1!==n.call(r,r.value,r)&&(null==r.value?v.push(a[i+e]):u||0===Vt(l(t),l(r.value))?(m.push(r.value),u&&y.push(a[i+e])):(v.push(a[i+e]),p.push(r.value)))}const g=Ut(t)&&t.limit===1/0&&("function"!=typeof e||e===zt)&&{index:t.index,range:t.range};return Promise.resolve(p.length>0&&s.mutate({trans:r,type:"add",values:p}).then((e=>{for(let t in e.failures)v.splice(parseInt(t),1);d(p.length,e)}))).then((()=>(m.length>0||g&&"object"==typeof e)&&s.mutate({trans:r,type:"put",keys:y,values:m,criteria:g,changeSpec:"function"!=typeof e&&e}).then((e=>d(m.length,e))))).then((()=>(v.length>0||g&&e===zt)&&s.mutate({trans:r,type:"delete",keys:v,criteria:g}).then((e=>d(v.length,e))))).then((()=>a.length>i+f&&o(i+c)))}))};return o(0).then((()=>{if(f.length>0)throw new q("Error modifying one or more objects",f,h,p);return a.length}))}))}))}delete(){var e=this._ctx,t=e.range;return Ut(e)&&(e.isPrimKey&&!At||3===t.type)?this._write((r=>{const{primaryKey:n}=e.table.core.schema,a=t;return e.table.core.count({trans:r,query:{index:n,range:a}}).then((t=>e.table.core.mutate({trans:r,type:"deleteRange",range:a}).then((({failures:e,lastResult:r,results:n,numFailures:a})=>{if(a)throw new q("Could not delete some values",Object.keys(e).map((t=>e[t])),t-a);return t-a}))))})):this.modify(zt)}}const zt=(e,t)=>t.value=null;function $t(e,t){return e<t?-1:e===t?0:1}function qt(e,t){return e>t?-1:e===t?0:1}function Xt(e,t,r){var n=e instanceof nr?new e.Collection(e):e;return n._ctx.error=r?new r(t):new TypeError(t),n}function Qt(e){return new e.Collection(e,(()=>rr(""))).limit(0)}function Zt(e,t,r,n,a,o){for(var i=Math.min(e.length,n.length),s=-1,u=0;u<i;++u){var l=t[u];if(l!==n[u])return a(e[u],r[u])<0?e.substr(0,u)+r[u]+r.substr(u+1):a(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;a(e[u],l)<0&&(s=u)}return i<n.length&&"next"===o?e+r.substr(e.length):i<e.length&&"prev"===o?e.substr(0,r.length):s<0?null:e.substr(0,s)+n[s]+r.substr(s+1)}function er(e,t,r,n){var a,o,i,s,u,l,c,f=r.length;if(!r.every((e=>"string"==typeof e)))return Xt(e,Et);function h(e){a=function(e){return"next"===e?e=>e.toUpperCase():e=>e.toLowerCase()}(e),o=function(e){return"next"===e?e=>e.toLowerCase():e=>e.toUpperCase()}(e),i="next"===e?$t:qt;var t=r.map((function(e){return{lower:o(e),upper:a(e)}})).sort((function(e,t){return i(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,(()=>tr(s[0],u[f-1]+n)));p._ondirectionchange=function(e){h(e)};var d=0;return p._addAlgorithm((function(e,r,n){var a=e.key;if("string"!=typeof a)return!1;var h=o(a);if(t(h,u,d))return!0;for(var p=null,m=d;m<f;++m){var y=Zt(a,h,s[m],u[m],i,l);null===y&&null===p?d=m+1:(null===p||i(p,y)>0)&&(p=y)}return r(null!==p?function(){e.continue(p+c)}:n),!1})),p}function tr(e,t,r,n){return{type:2,lower:e,upper:t,lowerOpen:r,upperOpen:n}}function rr(e){return{type:1,lower:e,upper:e}}class nr{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)?Qt(this):new this.Collection(this,(()=>tr(e,t,!r,!n)))}catch(e){return Xt(this,wt)}}equals(e){return null==e?Xt(this,wt):new this.Collection(this,(()=>rr(e)))}above(e){return null==e?Xt(this,wt):new this.Collection(this,(()=>tr(e,void 0,!0)))}aboveOrEqual(e){return null==e?Xt(this,wt):new this.Collection(this,(()=>tr(e,void 0,!1)))}below(e){return null==e?Xt(this,wt):new this.Collection(this,(()=>tr(void 0,e,!1,!0)))}belowOrEqual(e){return null==e?Xt(this,wt):new this.Collection(this,(()=>tr(void 0,e)))}startsWith(e){return"string"!=typeof e?Xt(this,Et):this.between(e,e+bt,!0,!0)}startsWithIgnoreCase(e){return""===e?this.startsWith(e):er(this,((e,t)=>0===e.indexOf(t[0])),[e],bt)}equalsIgnoreCase(e){return er(this,((e,t)=>e===t[0]),[e],"")}anyOfIgnoreCase(){var e=U.apply(D,arguments);return 0===e.length?Qt(this):er(this,((e,t)=>-1!==t.indexOf(e)),e,"")}startsWithAnyOfIgnoreCase(){var e=U.apply(D,arguments);return 0===e.length?Qt(this):er(this,((e,t)=>t.some((t=>0===e.indexOf(t)))),e,bt)}anyOf(){const e=U.apply(D,arguments);let t=this._cmp;try{e.sort(t)}catch(e){return Xt(this,wt)}if(0===e.length)return Qt(this);const r=new this.Collection(this,(()=>tr(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,a,o)=>{const i=r.key;for(;t(i,e[n])>0;)if(++n,n===e.length)return a(o),!1;return 0===t(i,e[n])||(a((()=>{r.continue(e[n])})),!1)})),r}notEqual(e){return this.inAnyRange([[_t,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){const e=U.apply(D,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return Xt(this,wt)}const t=e.reduce(((e,t)=>e?e.concat([[e[e.length-1][1],t]]):[[_t,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,a=this._descending,o=this._min,i=this._max;if(0===e.length)return Qt(this);if(!e.every((e=>void 0!==e[0]&&void 0!==e[1]&&n(e[0],e[1])<=0)))return Xt(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",ee.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,a=e.length;for(;n<a;++n){const a=e[n];if(r(t[0],a[1])<0&&r(t[1],a[0])>0){a[0]=o(a[0],t[0]),a[1]=i(a[1],t[1]);break}}return n===a&&e.push(t),e}),[]),l.sort(f)}catch(e){return Xt(this,wt)}let h=0;const p=u?e=>n(e,l[h][1])>0:e=>n(e,l[h][1])>=0,d=s?e=>a(e,l[h][0])>0:e=>a(e,l[h][0])>=0;let m=p;const y=new this.Collection(this,(()=>tr(l[0][0],l[l.length-1][1],!s,!u)));return y._ondirectionchange=e=>{"next"===e?(m=p,c=n):(m=d,c=a),l.sort(f)},y._addAlgorithm(((e,t,r)=>{for(var a=e.key;m(a);)if(++h,h===l.length)return t(r),!1;return!!function(e){return!p(e)&&!d(e)}(a)||(0===this._cmp(a,l[h][1])||0===this._cmp(a,l[h][0])||t((()=>{c===n?e.continue(l[h][0]):e.continue(l[h][1])})),!1)})),y}startsWithAnyOf(){const e=U.apply(D,arguments);return e.every((e=>"string"==typeof e))?0===e.length?Qt(this):this.inAnyRange(e.map((e=>[e,e+bt]))):Xt(this,"startsWithAnyOf() only works with strings")}}function ar(e){return $e((function(t){return or(t),e(t.target.error),!1}))}function or(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}const ir="storagemutated",sr="x-storagemutated-1",ur=Rt(null,ir);class lr{_lock(){return b(!Le.global),++this._reculock,1!==this._reculock||Le.global||(Le.lockOwnerFor=this),this}_unlock(){if(b(!Le.global),0==--this._reculock)for(Le.global||(Le.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{ct(e[1],e[0])}catch(e){}}return this}_locked(){return this._reculock&&Le.lockOwnerFor!==this}create(e){if(!this.mode)return this;const t=this.db.idbdb,r=this.db._state.dbOpenError;if(b(!this.idbtrans),!e&&!t)switch(r&&r.name){case"DatabaseClosedError":throw new ee.DatabaseClosed(r);case"MissingAPIError":throw new ee.MissingAPI(r.message,r);default:throw new ee.OpenFailed(r)}if(!this.active)throw new ee.TransactionInactive;return b(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=$e((e=>{or(e),this._resolve()})),e.onabort=$e((e=>{or(e),this._resolve()})),e.oncomplete=$e((()=>{this.active=!1,this._resolve(),"mutatedParts"in e&&ur.storagemutated.fire(e.mutatedParts)})),this}_promise(e,t,r){if("readwrite"===e&&"readwrite"!==this.mode)return yt(new ee.ReadOnly("Transaction is readonly"));if(!this.active)return yt(new ee.TransactionInactive);if(this._locked())return new Pe(((n,a)=>{this._blockedFuncs.push([()=>{this._promise(e,t,r).then(n,a)},Le])}));if(r)return rt((()=>{var e=new Pe(((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 Pe(((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=Pe.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 a=t._waitingFor;return new Pe(((e,n)=>{r.then((r=>t._waitingQueue.push($e(e.bind(null,r)))),(e=>t._waitingQueue.push($e(n.bind(null,e))))).finally((()=>{t._waitingFor===a&&(t._waitingFor=null)}))}))}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new ee.Abort))}table(e){const t=this._memoizedTables||(this._memoizedTables={});if(l(t,e))return t[e];const r=this.schema[e];if(!r)return;const n=new this.db.Table(e,r,this);return n.core=this.db.core.table(e),t[e]=n,n}}function cr(e,t,r,n,a,o,i){return{name:e,keyPath:t,unique:r,multi:n,auto:a,compound:o,src:(r&&!i?"&":"")+(n?"*":"")+(a?"++":"")+fr(t)}}function fr(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function hr(e,t,r){return{name:e,primKey:t,indexes:r,mappedClass:null,idxByName:w(r,(e=>[e.name,e]))}}let pr=e=>{try{return e.only([[]]),pr=()=>[[]],[[]]}catch(e){return pr=()=>bt,bt}};function dr(e){return null==e?()=>{}:"string"==typeof e?function(e){return 1===e.split(".").length?t=>t[e]:t=>E(t,e)}(e):t=>E(t,e)}function mr(e){return[].slice.call(e)}let yr=0;function vr(e){return null==e?":id":"string"==typeof e?e:`[${e.join("+")}]`}function gr(e,t,r){function n(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:a,upperOpen:o}=e;return void 0===r?void 0===n?null:t.upperBound(n,!!o):void 0===n?t.lowerBound(r,!!a):t.bound(r,n,!!a,!!o)}const{schema:a,hasGetAll:i}=function(e,t){const r=mr(e.objectStoreNames);return{schema:{name:e.name,tables:r.map((e=>t.objectStore(e))).map((e=>{const{keyPath:t,autoIncrement:r}=e,n=o(t),a=null==t,i={},s={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:a,compound:n,keyPath:t,autoIncrement:r,unique:!0,extractKey:dr(t)},indexes:mr(e.indexNames).map((t=>e.index(t))).map((e=>{const{name:t,unique:r,multiEntry:n,keyPath:a}=e,s={name:t,compound:o(a),keyPath:a,unique:r,multiEntry:n,extractKey:dr(a)};return i[vr(a)]=s,s})),getIndexByKeyPath:e=>i[vr(e)]};return i[":id"]=s.primaryKey,null!=t&&(i[vr(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=a.tables.map((e=>function(e){const t=e.name;return{name:t,schema:e,mutate:function({trans:e,type:r,keys:a,values:o,range:i}){return new Promise(((s,u)=>{s=$e(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}=a||o||{length:1};if(a&&o&&a.length!==o.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=[],m=[];let y=0;const v=e=>{++y,or(e)};if("deleteRange"===r){if(4===i.type)return s({numFailures:y,failures:m,results:[],lastResult:void 0});3===i.type?d.push(p=l.clear()):d.push(p=l.delete(n(i)))}else{const[e,t]=f?c?[o,a]:[o,null]:[a,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=v;else for(let t=0;t<h;++t)d.push(p=l[r](e[t])),p.onerror=v}const g=e=>{const t=e.target.result;d.forEach(((e,t)=>null!=e.error&&(m[t]=e.error))),s({numFailures:y,failures:m,results:"delete"===r?a:d.map((e=>e.result)),lastResult:t})};p.onerror=e=>{v(e),g(e)},p.onsuccess=g}))},getMany:({trans:e,keys:r})=>new Promise(((n,a)=>{n=$e(n);const o=e.objectStore(t),i=r.length,s=new Array(i);let u,l=0,c=0;const f=e=>{const t=e.target;s[t._pos]=t.result,++c===l&&n(s)},h=ar(a);for(let e=0;e<i;++e)null!=r[e]&&(u=o.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,a)=>{n=$e(n);const o=e.objectStore(t).get(r);o.onsuccess=e=>n(e.target.result),o.onerror=ar(a)})),query:function(e){return r=>new Promise(((a,o)=>{a=$e(a);const{trans:i,values:s,limit:u,query:l}=r,c=u===1/0?void 0:u,{index:f,range:h}=l,p=i.objectStore(t),d=f.isPrimaryKey?p:p.index(f.name),m=n(h);if(0===u)return a({result:[]});if(e){const e=s?d.getAll(m,c):d.getAllKeys(m,c);e.onsuccess=e=>a({result:e.target.result}),e.onerror=ar(o)}else{let e=0;const t=s||!("openKeyCursor"in d)?d.openCursor(m):d.openKeyCursor(m),r=[];t.onsuccess=n=>{const o=t.result;return o?(r.push(s?o.value:o.primaryKey),++e===u?a({result:r}):void o.continue()):a({result:r})},t.onerror=ar(o)}}))}(i),openCursor:function({trans:e,values:r,query:a,reverse:o,unique:i}){return new Promise(((s,u)=>{s=$e(s);const{index:l,range:c}=a,f=e.objectStore(t),h=l.isPrimaryKey?f:f.index(l.name),p=o?i?"prevunique":"prev":i?"nextunique":"next",d=r||!("openKeyCursor"in h)?h.openCursor(n(c),p):h.openKeyCursor(n(c),p);d.onerror=ar(u),d.onsuccess=$e((t=>{const r=d.result;if(!r)return void s(null);r.___id=++yr,r.done=!1;const n=r.continue.bind(r);let a=r.continuePrimaryKey;a&&(a=a.bind(r));const o=r.advance.bind(r),i=()=>{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=$e(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=$e(e),d.onerror=ar(t),r.fail=t,r.stop=t=>{r.stop=r.continue=r.continuePrimaryKey=r.advance=i,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=$e((e=>{d.onsuccess=s,s()})),r.continue=n,r.continuePrimaryKey=a,r.advance=o,s(),t},s(r)}),u)}))},count({query:e,trans:r}){const{index:a,range:o}=e;return new Promise(((e,i)=>{const s=r.objectStore(t),u=a.isPrimaryKey?s:s.index(a.name),l=n(o),c=l?u.count(l):u.count();c.onsuccess=$e((t=>e(t.target.result))),c.onerror=ar(i)}))}}}(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:pr(t),schema:a}}function br({_novip:e},t){const r=t.db,n=function(e,t,{IDBKeyRange:r,indexedDB:n},a){const o=function(e,t){return t.reduce(((e,{create:t})=>({...e,...t(e)})),e)}(gr(t,r,a),e.dbcore);return{dbcore:o}}(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 _r({_novip:e},t,r,n){r.forEach((r=>{const a=n[r];t.forEach((t=>{const n=m(t,r);(!n||"value"in n&&void 0===n.value)&&(t===e.Transaction.prototype||t instanceof e.Transaction?h(t,r,{get(){return this.table(r)},set(e){f(this,r,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):t[r]=new e.Table(r,a))}))}))}function wr({_novip:e},t){t.forEach((t=>{for(let r in t)t[r]instanceof e.Table&&delete t[r]}))}function Er(e,t){return e._cfg.version-t._cfg.version}function Sr(e,t,r,n){const o=e._dbSchema,i=e._createTransaction("readwrite",e._storeNames,o);i.create(r),i._completion.catch(n);const s=i._reject.bind(i),u=Le.transless||Le;rt((()=>{Le.trans=i,Le.transless=u,0===t?(a(o).forEach((e=>{kr(r,e,o[e].primKey,o[e].indexes)})),br(e,r),Pe.follow((()=>e.on.populate.fire(i))).catch(s)):function({_novip:e},t,r,n){const o=[],i=e._versions;let s=e._dbSchema=Nr(0,e.idbdb,n),u=!1;const l=i.filter((e=>e._cfg.version>=t));return l.forEach((i=>{o.push((()=>{const o=s,l=i._cfg.dbschema;Or(e,o,n),Or(e,l,n),s=e._dbSchema=l;const c=Tr(o,l);c.add.forEach((e=>{kr(n,e[0],e[1].primKey,e[1].indexes)})),c.change.forEach((e=>{if(e.recreate)throw new ee.Upgrade("Not yet support for changing primary key");{const t=n.objectStore(e.name);e.add.forEach((e=>Ar(t,e))),e.change.forEach((e=>{t.deleteIndex(e.name),Ar(t,e)})),e.del.forEach((e=>t.deleteIndex(e)))}}));const f=i._cfg.contentUpgrade;if(f&&i._cfg.version>t){br(e,n),r._memoizedTables={},u=!0;let t=T(l);c.del.forEach((e=>{t[e]=o[e]})),wr(e,[e.Transaction.prototype]),_r(e,[e.Transaction.prototype],a(t),t),r.schema=t;const i=M(f);let s;i&&nt();const h=Pe.follow((()=>{if(s=f(r),s&&i){var e=at.bind(null,null);s.then(e,e)}}));return s&&"function"==typeof s.then?Pe.resolve(s):h.then((()=>s))}})),o.push((t=>{u&&kt||function(e,t){[].slice.call(t.db.objectStoreNames).forEach((r=>null==e[r]&&t.db.deleteObjectStore(r)))}(i._cfg.dbschema,t),wr(e,[e.Transaction.prototype]),_r(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),r.schema=e._dbSchema}))})),function e(){return o.length?Pe.resolve(o.shift()(r.idbtrans)).then(e):Pe.resolve()}().then((()=>{var e,t;t=n,a(e=s).forEach((r=>{t.db.objectStoreNames.contains(r)||kr(t,r,e[r].primKey,e[r].indexes)}))}))}(e,t,i,r).catch(s)}))}function Tr(e,t){const r={del:[],add:[],change:[]};let n;for(n in e)t[n]||r.del.push(n);for(n in t){const a=e[n],o=t[n];if(a){const e={name:n,def:o,recreate:!1,del:[],add:[],change:[]};if(""+(a.primKey.keyPath||"")!=""+(o.primKey.keyPath||"")||a.primKey.auto!==o.primKey.auto&&!Tt)e.recreate=!0,r.change.push(e);else{const t=a.idxByName,n=o.idxByName;let i;for(i in t)n[i]||e.del.push(i);for(i in n){const r=t[i],a=n[i];r?r.src!==a.src&&e.change.push(a):e.add.push(a)}(e.del.length>0||e.add.length>0||e.change.length>0)&&r.change.push(e)}}else r.add.push([n,o])}return r}function kr(e,t,r,n){const a=e.db.createObjectStore(t,r.keyPath?{keyPath:r.keyPath,autoIncrement:r.auto}:{autoIncrement:r.auto});return n.forEach((e=>Ar(a,e))),a}function Ar(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function Nr(e,t,r){const n={};return v(t.objectStoreNames,0).forEach((e=>{const t=r.objectStore(e);let a=t.keyPath;const o=cr(fr(a),a||"",!1,!1,!!t.autoIncrement,a&&"string"!=typeof a,!0),i=[];for(let e=0;e<t.indexNames.length;++e){const r=t.index(t.indexNames[e]);a=r.keyPath;var s=cr(r.name,a,!!r.unique,!!r.multiEntry,!1,a&&"string"!=typeof a,!1);i.push(s)}n[e]=hr(e,o,i)})),n}function Or({_novip:e},t,r){const a=r.db.objectStoreNames;for(let n=0;n<a.length;++n){const o=a[n],i=r.objectStore(o);e._hasGetAll="getAll"in i;for(let e=0;e<i.indexNames.length;++e){const r=i.indexNames[e],n=i.index(r).keyPath,a="string"==typeof n?n:"["+v(n).join("+")+"]";if(t[o]){const e=t[o].idxByName[a];e&&(e.name=r,delete t[o].idxByName[a],t[o].idxByName[r]=e)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&n.WorkerGlobalScope&&n instanceof n.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}class Ir{_parseStoresSpec(e,t){a(e).forEach((r=>{if(null!==e[r]){var n=e[r].split(",").map(((e,t)=>{const r=(e=e.trim()).replace(/([&*]|\+\+)/g,""),n=/^\[/.test(r)?r.match(/^\[(.*)\]$/)[1].split("+"):r;return cr(r,n||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),o(n),0===t)})),a=n.shift();if(a.multi)throw new ee.Schema("Primary key cannot be multi-valued");n.forEach((e=>{if(e.auto)throw new ee.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new ee.Schema("Index must have a name and cannot be an empty string")})),t[r]=hr(r,a,n)}}))}stores(e){const t=this.db;this._cfg.storesSource=this._cfg.storesSource?i(this._cfg.storesSource,e):e;const r=t._versions,n={};let o={};return r.forEach((e=>{i(n,e._cfg.storesSource),o=e._cfg.dbschema={},e._parseStoresSpec(n,o)})),t._dbSchema=o,wr(t,[t._allTables,t,t.Transaction.prototype]),_r(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],a(o),o),t._storeNames=a(o),this}upgrade(e){return this._cfg.contentUpgrade=fe(this._cfg.contentUpgrade||ne,e),this}}function Lr(e,t){let r=e._dbNamesDB;return r||(r=e._dbNamesDB=new Xr(Ot,{addons:[],indexedDB:e,IDBKeyRange:t}),r.version(1).stores({dbnames:"name"})),r.table("dbnames")}function xr(e){return e&&"function"==typeof e.databases}function Cr(e){return rt((function(){return Le.letThrough=!0,e()}))}function Fr(){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 Pr(e){var t=t=>e.next(t),r=a(t),n=a((t=>e.throw(t)));function a(e){return t=>{var a=e(t),i=a.value;return a.done?i:i&&"function"==typeof i.then?i.then(r,n):o(i)?Promise.all(i).then(r,n):r(i)}}return a(t)()}function Rr(e,t,r){var n=arguments.length;if(n<2)throw new ee.InvalidArgument("Too few arguments");for(var a=new Array(n-1);--n;)a[n-1]=arguments[n];return r=a.pop(),[e,A(a),r]}function Dr(e,t,r,n,a){return Pe.resolve().then((()=>{const o=Le.transless||Le,i=e._createTransaction(t,r,e._dbSchema,n),s={trans:i,transless:o};if(n)i.idbtrans=n.idbtrans;else try{i.create(),e._state.PR1398_maxLoop=3}catch(n){return n.name===Q.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((()=>Dr(e,t,r,null,a)))):void 0}const u=M(a);let l;u&&nt();const c=Pe.follow((()=>{if(l=a.call(i,i),l)if(u){var e=at.bind(null,null);l.then(e,e)}else"function"==typeof l.next&&"function"==typeof l.throw&&(l=Pr(l))}),s);return(l&&"function"==typeof l.then?Pe.resolve(l).then((e=>i.active?e:yt(new ee.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn")))):c.then((()=>l))).then((e=>(n&&i._resolve(),i._completion.then((()=>e))))).catch((e=>(i._reject(e),yt(e))))}))}function Ur(e,t,r){const n=o(e)?e.slice():[e];for(let e=0;e<r;++e)n.push(t);return n}const Mr={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return{...e,table(t){const r=e.table(t),{schema:n}=r,a={},o=[];function i(e,t,r){const n=vr(e),s=a[n]=a[n]||[],u=null==e?0:"string"==typeof e?1:e.length,l=t>0,c={...r,isVirtual:l,keyTail:t,keyLength:u,extractKey:dr(e),unique:!l&&r.unique};return s.push(c),c.isPrimaryKey||o.push(c),u>1&&i(2===u?e[0]:e.slice(0,u-1),t+1,r),s.sort(((e,t)=>e.keyTail-t.keyTail)),c}const s=i(n.primaryKey.keyPath,0,n.primaryKey);a[":id"]=[s];for(const e of n.indexes)i(e.keyPath,0,e);function u(t){const r=t.query.index;return r.isVirtual?{...t,query:{index:r,range:(n=t.query.range,a=r.keyTail,{type:1===n.type?2:n.type,lower:Ur(n.lower,n.lowerOpen?e.MAX_KEY:e.MIN_KEY,a),lowerOpen:!0,upper:Ur(n.upper,n.upperOpen?e.MIN_KEY:e.MAX_KEY,a),upperOpen:!0})}}:t;var n,a}const l={...r,schema:{...n,primaryKey:s,indexes:o,getIndexByKeyPath:function(e){const t=a[vr(e)];return t&&t[0]}},count:e=>r.count(u(e)),query:e=>r.query(u(e)),openCursor(t){const{keyTail:n,isVirtual:a,keyLength:o}=t.query.index;return a?r.openCursor(u(t)).then((r=>r&&function(r){const a=Object.create(r,{continue:{value:function(a){null!=a?r.continue(Ur(a,t.reverse?e.MAX_KEY:e.MIN_KEY,n)):t.unique?r.continue(r.key.slice(0,o).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,n)):r.continue()}},continuePrimaryKey:{value(t,a){r.continuePrimaryKey(Ur(t,e.MAX_KEY,n),a)}},primaryKey:{get:()=>r.primaryKey},key:{get(){const e=r.key;return 1===o?e[0]:e.slice(0,o)}},value:{get:()=>r.value}});return a}(r))):r.openCursor(t)}};return l}}}};function Br(e,t,r,n){return r=r||{},n=n||"",a(e).forEach((a=>{if(l(t,a)){var o=e[a],i=t[a];if("object"==typeof o&&"object"==typeof i&&o&&i){const e=F(o);e!==F(i)?r[n+a]=t[a]:"Object"===e?Br(o,i,r,n+a+"."):o!==i&&(r[n+a]=t[a])}else o!==i&&(r[n+a]=t[a])}else r[n+a]=void 0})),a(t).forEach((a=>{l(e,a)||(r[n+a]=t[a])})),r}const jr={stack:"dbcore",name:"HooksMiddleware",level:2,create:e=>({...e,table(t){const r=e.table(t),{primaryKey:n}=r.schema,a={...r,mutate(e){const a=Le.trans,{deleting:o,creating:i,updating:s}=a.table(t).hook;switch(e.type){case"add":if(i.fire===ne)break;return a._promise("readwrite",(()=>u(e)),!0);case"put":if(i.fire===ne&&s.fire===ne)break;return a._promise("readwrite",(()=>u(e)),!0);case"delete":if(o.fire===ne)break;return a._promise("readwrite",(()=>u(e)),!0);case"deleteRange":if(o.fire===ne)break;return a._promise("readwrite",(()=>function(e){return c(e.trans,e.range,1e4)}(e)),!0)}return r.mutate(e);function u(e){const t=Le.trans,a=e.keys||function(e,t){return"delete"===t.type?t.keys:t.keys||t.values.map(e.extractKey)}(n,e);if(!a)throw new Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?{...e,keys:a}:{...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,a).then((u=>{const c=a.map(((r,a)=>{const c=u[a],f={onerror:null,onsuccess:null};if("delete"===e.type)o.fire.call(f,r,c,t);else if("add"===e.type||void 0===c){const o=i.fire.call(f,r,e.values[a],t);null==r&&null!=o&&(r=o,e.keys[a]=r,n.outbound||S(e.values[a],n.keyPath,r))}else{const n=Br(c,e.values[a]),o=s.fire.call(f,n,r,c,t);if(o){const t=e.values[a];Object.keys(o).forEach((e=>{l(t,e)?t[e]=o[e]:S(t,e,o[e])}))}}return f}));return r.mutate(e).then((({failures:t,results:r,numFailures:n,lastResult:o})=>{for(let n=0;n<a.length;++n){const o=r?r[n]:a[n],i=c[n];null==o?i.onerror&&i.onerror(t[n]):i.onsuccess&&i.onsuccess("put"===e.type&&u[n]?e.values[n]:o)}return{failures:t,results:r,numFailures:n,lastResult:o}})).catch((e=>(c.forEach((t=>t.onerror&&t.onerror(e))),Promise.reject(e))))}))}function c(e,t,a){return r.query({trans:e,values:!1,query:{index:n,range:t},limit:a}).then((({result:r})=>u({type:"delete",keys:r,trans:e}).then((n=>n.numFailures>0?Promise.reject(n.failures[0]):r.length<a?{failures:[],numFailures:0,lastResult:void 0}:c(e,{...t,lower:r[r.length-1],lowerOpen:!0},a)))))}}};return a}})};function Gr(e,t,r){try{if(!t)return null;if(t.keys.length<e.length)return null;const n=[];for(let a=0,o=0;a<t.keys.length&&o<e.length;++a)0===Vt(t.keys[a],e[o])&&(n.push(r?L(t.values[a]):t.values[a]),++o);return n.length===e.length?n:null}catch(e){return null}}const Kr={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=Gr(e.keys,e.trans._cache,"clone"===e.cache);return t?Pe.resolve(t):r.getMany(e).then((t=>(e.trans._cache={keys:e.keys,values:"clone"===e.cache?L(t):t},t)))},mutate:e=>("add"!==e.type&&(e.trans._cache=null),r.mutate(e))}}})};function Hr(e){return!("from"in e)}const Vr=function(e,t){if(!this){const t=new Vr;return e&&"d"in e&&i(t,e),t}i(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function Wr(e,t,r){const n=Vt(t,r);if(isNaN(n))return;if(n>0)throw RangeError();if(Hr(e))return i(e,{from:t,to:r,d:1});const a=e.l,o=e.r;if(Vt(r,e.from)<0)return a?Wr(a,t,r):e.l={from:t,to:r,d:1,l:null,r:null},zr(e);if(Vt(t,e.to)>0)return o?Wr(o,t,r):e.r={from:t,to:r,d:1,l:null,r:null},zr(e);Vt(t,e.from)<0&&(e.from=t,e.l=null,e.d=o?o.d+1:1),Vt(r,e.to)>0&&(e.to=r,e.r=null,e.d=e.l?e.l.d+1:1);const s=!e.r;a&&!e.l&&Yr(e,a),o&&s&&Yr(e,o)}function Yr(e,t){Hr(t)||function e(t,{from:r,to:n,l:a,r:o}){Wr(t,r,n),a&&e(t,a),o&&e(t,o)}(e,t)}function Jr(e){let t=Hr(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&&Vt(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||Vt(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 zr(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),a=n>1?"r":n<-1?"l":"";if(a){const t="r"===a?"l":"r",r={...e},n=e[a];e.from=n.from,e.to=n.to,e[a]=n[a],r[a]=n[t],e[t]=r,r.d=$r(r)}e.d=$r(e)}function $r({r:e,l:t}){return(e?t?Math.max(e.d,t.d):e.d:t?t.d:0)+1}c(Vr.prototype,{add(e){return Yr(this,e),this},addKey(e){return Wr(this,e,e),this},addKeys(e){return e.forEach((e=>Wr(this,e,e))),this},[P](){return Jr(this)}});const qr={stack:"dbcore",level:0,create:e=>{const t=e.schema.name,r=new Vr(e.MIN_KEY,e.MAX_KEY);return{...e,table:n=>{const i=e.table(n),{schema:s}=i,{primaryKey:u}=s,{extractKey:l,outbound:c}=u,f={...i,mutate:e=>{const a=e.trans,u=a.mutatedParts||(a.mutatedParts={}),l=e=>{const r=`idb://${t}/${n}/${e}`;return u[r]||(u[r]=new Vr)},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 m=e.trans._cache;return i.mutate(e).then((e=>{if(o(p)){"delete"!==h&&(p=e.results),c.addKeys(p);const t=Gr(p,m);t||"add"===h||f.addKeys(p),(t||d)&&function(e,t,r,n){t.indexes.forEach((function(t){const a=e(t.name||"");function i(e){return null!=e?t.extractKey(e):null}const s=e=>t.multiEntry&&o(e)?e.forEach((e=>a.addKey(e))):a.addKey(e);(r||n).forEach(((e,t)=>{const a=r&&i(r[t]),o=n&&i(n[t]);0!==Vt(a,o)&&(null!=a&&s(a),null!=o&&s(o))}))}))}(l,s,t,d)}else if(p){const e={from:p.lower,to:p.upper};f.add(e),c.add(e)}else c.add(r),f.add(r),s.indexes.forEach((e=>l(e.name).add(r)));return e}))}},h=({query:{index:t,range:r}})=>{var n,a;return[t,new Vr(null!==(n=r.lower)&&void 0!==n?n:e.MIN_KEY,null!==(a=r.upper)&&void 0!==a?a:e.MAX_KEY)]},p={get:e=>[u,new Vr(e.key)],getMany:e=>[u,(new Vr).addKeys(e.keys)],count:h,query:h,openCursor:h};return a(p).forEach((e=>{f[e]=function(a){const{subscr:o}=Le;if(o){const s=e=>{const r=`idb://${t}/${n}/${e}`;return o[r]||(o[r]=new Vr)},u=s(""),f=s(":dels"),[h,d]=p[e](a);if(s(h.name||"").add(d),!h.isPrimaryKey){if("count"!==e){const t="query"===e&&c&&a.values&&i.query({...a,values:!1});return i[e].apply(this,arguments).then((r=>{if("query"===e){if(c&&a.values)return t.then((({result:e})=>(u.addKeys(e),r)));const e=a.values?r.result.map(l):r.result;a.values?u.addKeys(e):f.addKeys(e)}else if("openCursor"===e){const e=r,t=a.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:()=>(t&&u.addKey(e.primaryKey),e.value)}})}return r}))}f.add(r)}}return i[e].apply(this,arguments)}})),f}}}};class Xr{constructor(e,t){this._middlewares={},this.verno=0;const r=Xr.dependencies;this._options=t={addons:Xr.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 a={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:ne,dbReadyPromise:null,cancelOpen:ne,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};var o;a.dbReadyPromise=new Pe((e=>{a.dbReadyResolve=e})),a.openCanceller=new Pe(((e,t)=>{a.cancelOpen=t})),this._state=a,this.name=e,this.on=Rt(this,"populate","blocked","versionchange","close",{ready:[fe,ne]}),this.on.ready.subscribe=g(this.on.ready.subscribe,(e=>(t,r)=>{Xr.vip((()=>{const n=this._state;if(n.openComplete)n.dbOpenError||Pe.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=(o=this,Dt(Jt.prototype,(function(e,t){this.db=o;let r=Ct,n=null;if(t)try{r=t()}catch(e){n=e}const a=e._ctx,i=a.table,s=i.hook.reading.fire;this._ctx={table:i,index:a.index,isPrimKey:!a.index||i.schema.primKey.keyPath&&a.index===i.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:a.or,valueMapper:s!==ae?s:null}}))),this.Table=function(e){return Dt(Pt.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:Rt(null,{creating:[se,ne],reading:[oe,ae],updating:[le,ne],deleting:[ue,ne]})}))}(this),this.Transaction=function(e){return Dt(lr.prototype,(function(t,r,n,a,o){this.db=e,this.mode=t,this.storeNames=r,this.schema=n,this.chromeTransactionDurability=a,this.idbtrans=null,this.on=Rt(this,"complete","error","abort"),this.parent=o||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 Pe(((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(),yt(e)}))}))}(this),this.Version=function(e){return Dt(Ir.prototype,(function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}(this),this.WhereClause=function(e){return Dt(nr.prototype,(function(t,r,n){this.db=e,this._ctx={table:t,index:":id"===r?null:r,or:n};const a=e._deps.indexedDB;if(!a)throw new ee.MissingAPI;this._cmp=this._ascending=a.cmp.bind(a),this._descending=(e,t)=>a.cmp(t,e),this._max=(e,t)=>a.cmp(e,t)>0?e:t,this._min=(e,t)=>a.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=pr(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),St.filter((e=>e.name===this.name&&e!==this&&!e._state.vcFired)).map((t=>t.on("versionchange").fire(e)))},this.use(Mr),this.use(jr),this.use(qr),this.use(Kr),this.vip=Object.create(this,{_vip:{value:!0}}),n.forEach((e=>e(this)))}version(e){if(isNaN(e)||e<.1)throw new ee.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new ee.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(Er),r.stores({}),this._state.autoSchema=!1,r)}_whenReady(e){return this.idbdb&&(this._state.openComplete||Le.letThrough||this._vip)?e():new Pe(((e,t)=>{if(this._state.openComplete)return t(new ee.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void t(new ee.DatabaseClosed);this.open().catch(ne)}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 a=this._middlewares[e]||(this._middlewares[e]=[]);return a.push({stack:e,create:t,level:null==r?10:r,name:n}),a.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 t=e._state,{indexedDB:r}=e._deps;if(t.isBeingOpened||e.idbdb)return t.dbReadyPromise.then((()=>t.dbOpenError?yt(t.dbOpenError):e));B&&(t.openCanceller._stackHolder=H()),t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;const n=t.openCanceller;function o(){if(t.openCanceller!==n)throw new ee.DatabaseClosed("db.open() was cancelled")}let i=t.dbReadyResolve,s=null,u=!1;return Pe.race([n,("undefined"==typeof navigator?Pe.resolve():Fr()).then((()=>new Pe(((n,i)=>{if(o(),!r)throw new ee.MissingAPI;const l=e.name,c=t.autoSchema?r.open(l):r.open(l,Math.round(10*e.verno));if(!c)throw new ee.MissingAPI;c.onerror=ar(i),c.onblocked=$e(e._fireOnBlocked),c.onupgradeneeded=$e((n=>{if(s=c.transaction,t.autoSchema&&!e._options.allowEmptyDB){c.onerror=or,s.abort(),c.result.close();const e=r.deleteDatabase(l);e.onsuccess=e.onerror=$e((()=>{i(new ee.NoSuchDatabase(`Database ${l} doesnt exist`))}))}else{s.onerror=ar(i);var a=n.oldVersion>Math.pow(2,62)?0:n.oldVersion;u=a<1,e._novip.idbdb=c.result,Sr(e,a/10,s,i)}}),i),c.onsuccess=$e((()=>{s=null;const r=e._novip.idbdb=c.result,o=v(r.objectStoreNames);if(o.length>0)try{const n=r.transaction(1===(i=o).length?i[0]:i,"readonly");t.autoSchema?function({_novip:e},t,r){e.verno=t.version/10;const n=e._dbSchema=Nr(0,t,r);e._storeNames=v(t.objectStoreNames,0),_r(e,[e._allTables],a(n),n)}(e,r,n):(Or(e,e._dbSchema,n),function(e,t){const r=Tr(Nr(0,e.idbdb,t),e._dbSchema);return!(r.add.length||r.change.some((e=>e.add.length||e.change.length)))}(e,n)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),br(e,n)}catch(e){}var i;St.push(e),r.onversionchange=$e((r=>{t.vcFired=!0,e.on("versionchange").fire(r)})),r.onclose=$e((t=>{e.on("close").fire(t)})),u&&function({indexedDB:e,IDBKeyRange:t},r){!xr(e)&&r!==Ot&&Lr(e,t).put({name:r}).catch(ne)}(e._deps,l),n()}),i)}))))]).then((()=>(o(),t.onReadyBeingFired=[],Pe.resolve(Cr((()=>e.on.ready.fire(e.vip)))).then((function r(){if(t.onReadyBeingFired.length>0){let n=t.onReadyBeingFired.reduce(fe,ne);return t.onReadyBeingFired=[],Pe.resolve(Cr((()=>n(e.vip)))).then(r)}}))))).finally((()=>{t.onReadyBeingFired=null,t.isBeingOpened=!1})).then((()=>e)).catch((r=>{t.dbOpenError=r;try{s&&s.abort()}catch(e){}return n===t.openCanceller&&e._close(),yt(r)})).finally((()=>{t.openComplete=!0,i()}))}(this)}_close(){const e=this._state,t=St.indexOf(this);if(t>=0&&St.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new Pe((t=>{e.dbReadyResolve=t})),e.openCanceller=new Pe(((t,r)=>{e.cancelOpen=r}))}close(){this._close();const e=this._state;this._options.autoOpen=!1,e.dbOpenError=new ee.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}delete(){const e=arguments.length>0,t=this._state;return new Pe(((r,n)=>{const a=()=>{this.close();var e=this._deps.indexedDB.deleteDatabase(this.name);e.onsuccess=$e((()=>{!function({indexedDB:e,IDBKeyRange:t},r){!xr(e)&&r!==Ot&&Lr(e,t).delete(r).catch(ne)}(this._deps,this.name),r()})),e.onerror=ar(n),e.onblocked=this._fireOnBlocked};if(e)throw new ee.InvalidArgument("Arguments not allowed in db.delete()");t.isBeingOpened?t.dbReadyPromise.then(a):a()}))}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 a(this._allTables).map((e=>this._allTables[e]))}transaction(){const e=Rr.apply(this,arguments);return this._transaction.apply(this,e)}_transaction(e,t,r){let n=Le.trans;n&&n.db===this&&-1===e.indexOf("!")||(n=null);const a=-1!==e.indexOf("?");let o,i;e=e.replace("!","").replace("?","");try{if(i=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||e===It)o=It;else{if("rw"!=e&&e!=Lt)throw new ee.InvalidArgument("Invalid transaction mode: "+e);o=Lt}if(n){if(n.mode===It&&o===Lt){if(!a)throw new ee.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");n=null}n&&i.forEach((e=>{if(n&&-1===n.storeNames.indexOf(e)){if(!a)throw new ee.SubTransaction("Table "+e+" not included in parent transaction.");n=null}})),a&&n&&!n.active&&(n=null)}}catch(e){return n?n._promise(null,((t,r)=>{r(e)})):yt(e)}const s=Dr.bind(null,this,o,i,n,r);return n?n._promise(o,s,"lock"):Le.trans?ct(Le.transless,(()=>this._whenReady(s))):this._whenReady(s)}table(e){if(l(this._allTables,e))return this._allTables[e]}}const Qr="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable";class Zr{constructor(e){this._subscribe=e}subscribe(e,t,r){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:r})}[Qr](){return this}}function en(e,t){return a(t).forEach((r=>{Yr(e[r]||(e[r]=new Vr),t[r])})),e}let tn;try{tn={indexedDB:n.indexedDB||n.mozIndexedDB||n.webkitIndexedDB||n.msIndexedDB,IDBKeyRange:n.IDBKeyRange||n.webkitIDBKeyRange}}catch(n){tn={indexedDB:null,IDBKeyRange:null}}const rn=Xr;function nn(e){let t=an;try{an=!0,ur.storagemutated.fire(e)}finally{an=t}}c(rn,{...re,delete:e=>new rn(e,{addons:[]}).delete(),exists:e=>new rn(e,{addons:[]}).open().then((e=>(e.close(),!0))).catch("NoSuchDatabaseError",(()=>!1)),getDatabaseNames(e){try{return function({indexedDB:e,IDBKeyRange:t}){return xr(e)?Promise.resolve(e.databases()).then((e=>e.map((e=>e.name)).filter((e=>e!==Ot)))):Lr(e,t).toCollection().primaryKeys()}(rn.dependencies).then(e)}catch(e){return yt(new ee.MissingAPI)}},defineClass:()=>function(e){i(this,e)},ignoreTransaction:e=>Le.trans?ct(Le.transless,e):e(),vip:Cr,async:function(e){return function(){try{var t=Pr(e.apply(this,arguments));return t&&"function"==typeof t.then?t:Pe.resolve(t)}catch(e){return yt(e)}}},spawn:function(e,t,r){try{var n=Pr(e.apply(r,t||[]));return n&&"function"==typeof n.then?n:Pe.resolve(n)}catch(e){return yt(e)}},currentTransaction:{get:()=>Le.trans||null},waitFor:function(e,t){const r=Pe.resolve("function"==typeof e?rn.ignoreTransaction(e):e).timeout(t||6e4);return Le.trans?Le.trans.waitFor(r):r},Promise:Pe,debug:{get:()=>B,set:e=>{j(e,"dexie"===e?()=>!0:Nt)}},derive:p,extend:i,props:c,override:g,Events:Rt,on:ur,liveQuery:function(e){let t,r=!1;const n=new Zr((n=>{const o=M(e);let i=!1,s={},u={};const l={get closed(){return i},unsubscribe:()=>{i=!0,ur.storagemutated.unsubscribe(p)}};n.start&&n.start(l);let c=!1,f=!1;function h(){return a(u).some((e=>s[e]&&function(e,t){const r=Jr(t);let n=r.next();if(n.done)return!1;let a=n.value;const o=Jr(e);let i=o.next(a.from),s=i.value;for(;!n.done&&!i.done;){if(Vt(s.from,a.to)<=0&&Vt(s.to,a.from)>=0)return!0;Vt(a.from,s.from)<0?a=(n=r.next(s.from)).value:s=(i=o.next(a.from)).value}return!1}(s[e],u[e])))}const p=e=>{en(s,e),h()&&d()},d=()=>{if(c||i)return;s={};const a={},m=function(t){o&&nt();const r=()=>rt(e,{subscr:t,trans:null}),n=Le.trans?ct(Le.transless,r):r();return o&&n.then(at,at),n}(a);f||(ur(ir,p),f=!0),c=!0,Promise.resolve(m).then((e=>{r=!0,t=e,c=!1,i||(h()?d():(s={},u=a,n.next&&n.next(e)))}),(e=>{c=!1,r=!1,n.error&&n.error(e),l.unsubscribe()}))};return d(),l}));return n.hasValue=()=>r,n.getValue=()=>t,n},extendObservabilitySet:en,getByKeyPath:E,setByKeyPath:S,delByKeyPath:function(e,t){"string"==typeof t?S(e,t,void 0):"length"in t&&[].map.call(t,(function(t){S(e,t,void 0)}))},shallowClone:T,deepClone:L,getObjectDiff:Br,cmp:Vt,asap:_,minKey:_t,addons:[],connections:St,errnames:Q,dependencies:tn,semVer:gt,version:gt.split(".").map((e=>parseInt(e))).reduce(((e,t,r)=>e+t/Math.pow(10,2*r)))}),rn.maxKey=pr(rn.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(ur(ir,(e=>{if(!an){let t;Tt?(t=document.createEvent("CustomEvent"),t.initCustomEvent(sr,!0,!0,e)):t=new CustomEvent(sr,{detail:e}),an=!0,dispatchEvent(t),an=!1}})),addEventListener(sr,(({detail:e})=>{an||nn(e)})));let an=!1;if("undefined"!=typeof BroadcastChannel){const e=new BroadcastChannel(sr);"function"==typeof e.unref&&e.unref(),ur(ir,(t=>{an||e.postMessage(t)})),e.onmessage=e=>{e.data&&nn(e.data)}}else if("undefined"!=typeof self&&"undefined"!=typeof navigator){ur(ir,(e=>{try{an||("undefined"!=typeof localStorage&&localStorage.setItem(sr,JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach((t=>t.postMessage({type:sr,changedParts:e}))))}catch(e){}})),"undefined"!=typeof addEventListener&&addEventListener("storage",(e=>{if(e.key===sr){const t=JSON.parse(e.newValue);t&&nn(t.changedParts)}}));const e=self.document&&navigator.serviceWorker;e&&e.addEventListener("message",(function({data:e}){e&&e.type===sr&&nn(e.changedParts)}))}Pe.rejectionMapper=function(e,t){if(!e||e instanceof z||e instanceof TypeError||e instanceof SyntaxError||!e.name||!te[e.name])return e;var r=new te[e.name](t||e.message,e);return"stack"in e&&h(r,"stack",{get:function(){return this.inner.stack}}),r},j(B,Nt)},971745:(e,t,r)=>{"use strict";r.d(t,{Ue:()=>p});var n=r(674804),a=r(818282),o=r(197582),i=r(398704),s=r(738377);function u(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var l={};u(l,"logErrors",(()=>c)),u(l,"registerFormat",(()=>h)),u(l,"create",(()=>p)),u(l,"defaultLanguage",(()=>d)),u(l,"setDefaultLanguage",(()=>m));let c=!1,f=[];function h(e){f.push(e)}function p(e,t){for(let r=0;r<f.length;r++){let a=f[r];if(a.probe(e)){let r=new a(new(0,n.fT)(e));return t?r.getFont(t):r}}throw new Error("Unknown font format")}let d="en";function m(e="en"){d=e}function y(e,t,r){if(r.get){let e=r.get;r.get=function(){let r=e.call(this);return Object.defineProperty(this,t,{value:r}),r}}else if("function"==typeof r.value){let e=r.value;return{get(){let r=new Map;function n(...t){let n=t.length>0?t[0]:"value";if(r.has(n))return r.get(n);let a=e.apply(this,t);return r.set(n,a),a}return Object.defineProperty(this,t,{value:n}),n}}}}let v=new n.AU({firstCode:n.mL,entryCount:n.mL,idDelta:n.Af,idRangeOffset:n.mL}),g=new n.AU({startCharCode:n.U7,endCharCode:n.U7,glyphID:n.U7}),b=new n.AU({startUnicodeValue:n.Un,additionalCount:n.w_}),_=new n.AU({unicodeValue:n.Un,glyphID:n.mL}),w=new n.mJ(b,n.U7),E=new n.mJ(_,n.U7),S=new n.AU({varSelector:n.Un,defaultUVS:new n.$J(n.U7,w,{type:"parent"}),nonDefaultUVS:new n.$J(n.U7,E,{type:"parent"})}),T=new n.bS(n.mL,{0:{length:n.mL,language:n.mL,codeMap:new n.pW(n.w_,256)},2:{length:n.mL,language:n.mL,subHeaderKeys:new n.mJ(n.mL,256),subHeaderCount:e=>Math.max.apply(Math,e.subHeaderKeys),subHeaders:new n.pW(v,"subHeaderCount"),glyphIndexArray:new n.pW(n.mL,"subHeaderCount")},4:{length:n.mL,language:n.mL,segCountX2:n.mL,segCount:e=>e.segCountX2>>1,searchRange:n.mL,entrySelector:n.mL,rangeShift:n.mL,endCode:new n.pW(n.mL,"segCount"),reservedPad:new n.kV(n.mL),startCode:new n.pW(n.mL,"segCount"),idDelta:new n.pW(n.Af,"segCount"),idRangeOffset:new n.pW(n.mL,"segCount"),glyphIndexArray:new n.pW(n.mL,(e=>(e.length-e._currentOffset)/2))},6:{length:n.mL,language:n.mL,firstCode:n.mL,entryCount:n.mL,glyphIndices:new n.pW(n.mL,"entryCount")},8:{reserved:new n.kV(n.mL),length:n.U7,language:n.mL,is32:new n.pW(n.w_,8192),nGroups:n.U7,groups:new n.pW(g,"nGroups")},10:{reserved:new n.kV(n.mL),length:n.U7,language:n.U7,firstCode:n.U7,entryCount:n.U7,glyphIndices:new n.pW(n.mL,"numChars")},12:{reserved:new n.kV(n.mL),length:n.U7,language:n.U7,nGroups:n.U7,groups:new n.pW(g,"nGroups")},13:{reserved:new n.kV(n.mL),length:n.U7,language:n.U7,nGroups:n.U7,groups:new n.pW(g,"nGroups")},14:{length:n.U7,numRecords:n.U7,varSelectors:new n.pW(S,"numRecords")}}),k=new n.AU({platformID:n.mL,encodingID:n.mL,table:new n.$J(n.U7,T,{type:"parent",lazy:!0})});var A=new n.AU({version:n.mL,numSubtables:n.mL,tables:new n.mJ(k,"numSubtables")}),N=new n.AU({version:n.LB,revision:n.LB,checkSumAdjustment:n.U7,magicNumber:n.U7,flags:n.mL,unitsPerEm:n.mL,created:new n.mJ(n.LB,2),modified:new n.mJ(n.LB,2),xMin:n.Af,yMin:n.Af,xMax:n.Af,yMax:n.Af,macStyle:new n.DL(n.mL,["bold","italic","underline","outline","shadow","condensed","extended"]),lowestRecPPEM:n.mL,fontDirectionHint:n.Af,indexToLocFormat:n.Af,glyphDataFormat:n.Af}),O=new n.AU({version:n.LB,ascent:n.Af,descent:n.Af,lineGap:n.Af,advanceWidthMax:n.mL,minLeftSideBearing:n.Af,minRightSideBearing:n.Af,xMaxExtent:n.Af,caretSlopeRise:n.Af,caretSlopeRun:n.Af,caretOffset:n.Af,reserved:new n.kV(n.Af,4),metricDataFormat:n.Af,numberOfMetrics:n.mL});let I=new n.AU({advance:n.mL,bearing:n.Af});var L=new n.AU({metrics:new n.pW(I,(e=>e.parent.hhea.numberOfMetrics)),bearings:new n.pW(n.Af,(e=>e.parent.maxp.numGlyphs-e.parent.hhea.numberOfMetrics))}),x=new n.AU({version:n.LB,numGlyphs:n.mL,maxPoints:n.mL,maxContours:n.mL,maxComponentPoints:n.mL,maxComponentContours:n.mL,maxZones:n.mL,maxTwilightPoints:n.mL,maxStorage:n.mL,maxFunctionDefs:n.mL,maxInstructionDefs:n.mL,maxStackElements:n.mL,maxSizeOfInstructions:n.mL,maxComponentElements:n.mL,maxComponentDepth:n.mL});function C(e,t,r=0){return 1===e&&M[r]?M[r]:U[e][t]}const F=new Set(["x-mac-roman","x-mac-cyrillic","iso-8859-6","iso-8859-8"]),P={"x-mac-croatian":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈ƫȅ ÀÃÕŒœĐ—“”‘’÷◊©⁄€‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ","x-mac-gaelic":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØḂ±≤≥ḃĊċḊḋḞḟĠġṀæøṁṖṗɼƒſṠ«»… ÀÃÕŒœ–—“”‘’ṡẛÿŸṪ€‹›Ŷŷṫ·Ỳỳ⁊ÂÊÁËÈÍÎÏÌÓÔ♣ÒÚÛÙıÝýŴŵẄẅẀẁẂẃ","x-mac-greek":"Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦€ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ","x-mac-icelandic":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüݰ¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-inuit":"ᐃᐄᐅᐆᐊᐋᐱᐲᐳᐴᐸᐹᑉᑎᑏᑐᑑᑕᑖᑦᑭᑮᑯᑰᑲᑳᒃᒋᒌᒍᒎᒐᒑ°ᒡᒥᒦ•¶ᒧ®©™ᒨᒪᒫᒻᓂᓃᓄᓅᓇᓈᓐᓯᓰᓱᓲᓴᓵᔅᓕᓖᓗᓘᓚᓛᓪᔨᔩᔪᔫᔭ… ᔮᔾᕕᕖᕗ–—“”‘’ᕘᕙᕚᕝᕆᕇᕈᕉᕋᕌᕐᕿᖀᖁᖂᖃᖄᖅᖏᖐᖑᖒᖓᖔᖕᙱᙲᙳᙴᙵᙶᖖᖠᖡᖢᖣᖤᖥᖦᕼŁł","x-mac-ce":"ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ","x-mac-romanian":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂȘ∞±≤≥¥µ∂∑∏π∫ªºΩăș¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›Țț‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-turkish":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙˆ˜¯˘˙˚¸˝˛ˇ"},R=new Map;function D(e){let t=R.get(e);if(t)return t;let r=P[e];if(r){let t=new Map;for(let e=0;e<r.length;e++)t.set(r.charCodeAt(e),128+e);return R.set(e,t),t}if(F.has(e)){let t=new TextDecoder(e),r=new Uint8Array(128);for(let e=0;e<128;e++)r[e]=128+e;let n=new Map,a=t.decode(r);for(let e=0;e<128;e++)n.set(a.charCodeAt(e),128+e);return R.set(e,n),n}}const U=[["utf16be","utf16be","utf16be","utf16be","utf16be","utf16be"],["x-mac-roman","shift-jis","big5","euc-kr","iso-8859-6","iso-8859-8","x-mac-greek","x-mac-cyrillic","x-mac-symbol","x-mac-devanagari","x-mac-gurmukhi","x-mac-gujarati","Oriya","Bengali","Tamil","Telugu","Kannada","Malayalam","Sinhalese","Burmese","Khmer","iso-8859-11","Laotian","Georgian","Armenian","hz-gb-2312","Tibetan","Mongolian","Geez","x-mac-ce","Vietnamese","Sindhi"],["ascii"],["symbol","utf16be","shift-jis","gb18030","big5","x-cp20949","johab",null,null,null,"utf16be"]],M={15:"x-mac-icelandic",17:"x-mac-turkish",18:"x-mac-croatian",24:"x-mac-ce",25:"x-mac-ce",26:"x-mac-ce",27:"x-mac-ce",28:"x-mac-ce",30:"x-mac-icelandic",37:"x-mac-romanian",38:"x-mac-ce",39:"x-mac-ce",40:"x-mac-ce",143:"x-mac-inuit",146:"x-mac-gaelic"},B=[[],{0:"en",30:"fo",60:"ks",90:"rw",1:"fr",31:"fa",61:"ku",91:"rn",2:"de",32:"ru",62:"sd",92:"ny",3:"it",33:"zh",63:"bo",93:"mg",4:"nl",34:"nl-BE",64:"ne",94:"eo",5:"sv",35:"ga",65:"sa",128:"cy",6:"es",36:"sq",66:"mr",129:"eu",7:"da",37:"ro",67:"bn",130:"ca",8:"pt",38:"cz",68:"as",131:"la",9:"no",39:"sk",69:"gu",132:"qu",10:"he",40:"si",70:"pa",133:"gn",11:"ja",41:"yi",71:"or",134:"ay",12:"ar",42:"sr",72:"ml",135:"tt",13:"fi",43:"mk",73:"kn",136:"ug",14:"el",44:"bg",74:"ta",137:"dz",15:"is",45:"uk",75:"te",138:"jv",16:"mt",46:"be",76:"si",139:"su",17:"tr",47:"uz",77:"my",140:"gl",18:"hr",48:"kk",78:"km",141:"af",19:"zh-Hant",49:"az-Cyrl",79:"lo",142:"br",20:"ur",50:"az-Arab",80:"vi",143:"iu",21:"hi",51:"hy",81:"id",144:"gd",22:"th",52:"ka",82:"tl",145:"gv",23:"ko",53:"mo",83:"ms",146:"ga",24:"lt",54:"ky",84:"ms-Arab",147:"to",25:"pl",55:"tg",85:"am",148:"el-polyton",26:"hu",56:"tk",86:"ti",149:"kl",27:"es",57:"mn-CN",87:"om",150:"az",28:"lv",58:"mn",88:"so",151:"nn",29:"se",59:"ps",89:"sw"},[],{1078:"af",16393:"en-IN",1159:"rw",1074:"tn",1052:"sq",6153:"en-IE",1089:"sw",1115:"si",1156:"gsw",8201:"en-JM",1111:"kok",1051:"sk",1118:"am",17417:"en-MY",1042:"ko",1060:"sl",5121:"ar-DZ",5129:"en-NZ",1088:"ky",11274:"es-AR",15361:"ar-BH",13321:"en-PH",1108:"lo",16394:"es-BO",3073:"ar",18441:"en-SG",1062:"lv",13322:"es-CL",2049:"ar-IQ",7177:"en-ZA",1063:"lt",9226:"es-CO",11265:"ar-JO",11273:"en-TT",2094:"dsb",5130:"es-CR",13313:"ar-KW",2057:"en-GB",1134:"lb",7178:"es-DO",12289:"ar-LB",1033:"en",1071:"mk",12298:"es-EC",4097:"ar-LY",12297:"en-ZW",2110:"ms-BN",17418:"es-SV",6145:"ary",1061:"et",1086:"ms",4106:"es-GT",8193:"ar-OM",1080:"fo",1100:"ml",18442:"es-HN",16385:"ar-QA",1124:"fil",1082:"mt",2058:"es-MX",1025:"ar-SA",1035:"fi",1153:"mi",19466:"es-NI",10241:"ar-SY",2060:"fr-BE",1146:"arn",6154:"es-PA",7169:"aeb",3084:"fr-CA",1102:"mr",15370:"es-PY",14337:"ar-AE",1036:"fr",1148:"moh",10250:"es-PE",9217:"ar-YE",5132:"fr-LU",1104:"mn",20490:"es-PR",1067:"hy",6156:"fr-MC",2128:"mn-CN",3082:"es",1101:"as",4108:"fr-CH",1121:"ne",1034:"es",2092:"az-Cyrl",1122:"fy",1044:"nb",21514:"es-US",1068:"az",1110:"gl",2068:"nn",14346:"es-UY",1133:"ba",1079:"ka",1154:"oc",8202:"es-VE",1069:"eu",3079:"de-AT",1096:"or",2077:"sv-FI",1059:"be",1031:"de",1123:"ps",1053:"sv",2117:"bn",5127:"de-LI",1045:"pl",1114:"syr",1093:"bn-IN",4103:"de-LU",1046:"pt",1064:"tg",8218:"bs-Cyrl",2055:"de-CH",2070:"pt-PT",2143:"tzm",5146:"bs",1032:"el",1094:"pa",1097:"ta",1150:"br",1135:"kl",1131:"qu-BO",1092:"tt",1026:"bg",1095:"gu",2155:"qu-EC",1098:"te",1027:"ca",1128:"ha",3179:"qu",1054:"th",3076:"zh-HK",1037:"he",1048:"ro",1105:"bo",5124:"zh-MO",1081:"hi",1047:"rm",1055:"tr",2052:"zh",1038:"hu",1049:"ru",1090:"tk",4100:"zh-SG",1039:"is",9275:"smn",1152:"ug",1028:"zh-TW",1136:"ig",4155:"smj-NO",1058:"uk",1155:"co",1057:"id",5179:"smj",1070:"hsb",1050:"hr",1117:"iu",3131:"se-FI",1056:"ur",4122:"hr-BA",2141:"iu-Latn",1083:"se",2115:"uz-Cyrl",1029:"cs",2108:"ga",2107:"se-SE",1091:"uz",1030:"da",1076:"xh",8251:"sms",1066:"vi",1164:"prs",1077:"zu",6203:"sma-NO",1106:"cy",1125:"dv",1040:"it",7227:"sms",1160:"wo",2067:"nl-BE",2064:"it-CH",1103:"sa",1157:"sah",1043:"nl",1041:"ja",7194:"sr-Cyrl-BA",1144:"ii",3081:"en-AU",1099:"kn",3098:"sr",1130:"yo",10249:"en-BZ",1087:"kk",6170:"sr-Latn-BA",4105:"en-CA",1107:"km",2074:"sr-Latn",9225:"en-029",1158:"quc",1132:"nso"}];let j=new n.AU({platformID:n.mL,encodingID:n.mL,languageID:n.mL,nameID:n.mL,length:n.mL,string:new n.$J(n.mL,new n.Ld("length",(e=>C(e.platformID,e.encodingID,e.languageID))),{type:"parent",relativeTo:e=>e.parent.stringOffset,allowNull:!1})}),G=new n.AU({length:n.mL,tag:new n.$J(n.mL,new n.Ld("length","utf16be"),{type:"parent",relativeTo:e=>e.stringOffset})});var K=new n.bS(n.mL,{0:{count:n.mL,stringOffset:n.mL,records:new n.mJ(j,"count")},1:{count:n.mL,stringOffset:n.mL,records:new n.mJ(j,"count"),langTagCount:n.mL,langTags:new n.mJ(G,"langTagCount")}}),H=K;const V=["copyright","fontFamily","fontSubfamily","uniqueSubfamily","fullName","version","postscriptName","trademark","manufacturer","designer","description","vendorURL","designerURL","license","licenseURL",null,"preferredFamily","preferredSubfamily","compatibleFull","sampleText","postscriptCIDFontName","wwsFamilyName","wwsSubfamilyName"];K.process=function(e){var t={};for(let e of this.records){let r=B[e.platformID][e.languageID];null==r&&null!=this.langTags&&e.languageID>=32768&&(r=this.langTags[e.languageID-32768].tag),null==r&&(r=e.platformID+"-"+e.languageID);let n=e.nameID>=256?"fontFeatures":V[e.nameID]||e.nameID;null==t[n]&&(t[n]={});let a=t[n];e.nameID>=256&&(a=a[e.nameID]||(a[e.nameID]={})),"string"!=typeof e.string&&"string"==typeof a[r]||(a[r]=e.string)}this.records=t},K.preEncode=function(){if(Array.isArray(this.records))return;this.version=0;let e=[];for(let t in this.records){let r=this.records[t];"fontFeatures"!==t&&(e.push({platformID:3,encodingID:1,languageID:1033,nameID:V.indexOf(t),length:2*r.en.length,string:r.en}),"postscriptName"===t&&e.push({platformID:1,encodingID:0,languageID:0,nameID:V.indexOf(t),length:r.en.length,string:r.en}))}this.records=e,this.count=e.length,this.stringOffset=K.size(this,null,!1)};var W=new n.bS(n.mL,{header:{xAvgCharWidth:n.Af,usWeightClass:n.mL,usWidthClass:n.mL,fsType:new n.DL(n.mL,[null,"noEmbedding","viewOnly","editable",null,null,null,null,"noSubsetting","bitmapOnly"]),ySubscriptXSize:n.Af,ySubscriptYSize:n.Af,ySubscriptXOffset:n.Af,ySubscriptYOffset:n.Af,ySuperscriptXSize:n.Af,ySuperscriptYSize:n.Af,ySuperscriptXOffset:n.Af,ySuperscriptYOffset:n.Af,yStrikeoutSize:n.Af,yStrikeoutPosition:n.Af,sFamilyClass:n.Af,panose:new n.mJ(n.w_,10),ulCharRange:new n.mJ(n.U7,4),vendorID:new n.Ld(4),fsSelection:new n.DL(n.mL,["italic","underscore","negative","outlined","strikeout","bold","regular","useTypoMetrics","wws","oblique"]),usFirstCharIndex:n.mL,usLastCharIndex:n.mL},0:{},1:{typoAscender:n.Af,typoDescender:n.Af,typoLineGap:n.Af,winAscent:n.mL,winDescent:n.mL,codePageRange:new n.mJ(n.U7,2)},2:{typoAscender:n.Af,typoDescender:n.Af,typoLineGap:n.Af,winAscent:n.mL,winDescent:n.mL,codePageRange:new n.mJ(n.U7,2),xHeight:n.Af,capHeight:n.Af,defaultChar:n.mL,breakChar:n.mL,maxContent:n.mL},5:{typoAscender:n.Af,typoDescender:n.Af,typoLineGap:n.Af,winAscent:n.mL,winDescent:n.mL,codePageRange:new n.mJ(n.U7,2),xHeight:n.Af,capHeight:n.Af,defaultChar:n.mL,breakChar:n.mL,maxContent:n.mL,usLowerOpticalPointSize:n.mL,usUpperOpticalPointSize:n.mL}});let Y=W.versions;Y[3]=Y[4]=Y[2];var J=W,z=new n.bS(n.E2,{header:{italicAngle:n.E2,underlinePosition:n.Af,underlineThickness:n.Af,isFixedPitch:n.U7,minMemType42:n.U7,maxMemType42:n.U7,minMemType1:n.U7,maxMemType1:n.U7},1:{},2:{numberOfGlyphs:n.mL,glyphNameIndex:new n.mJ(n.mL,"numberOfGlyphs"),names:new n.mJ(new n.Ld(n.w_))},2.5:{numberOfGlyphs:n.mL,offsets:new n.mJ(n.w_,"numberOfGlyphs")},3:{},4:{map:new n.mJ(n.U7,(e=>e.parent.maxp.numGlyphs))}}),$=new n.AU({controlValues:new n.mJ(n.Af)}),q=new n.AU({instructions:new n.mJ(n.w_)});let X=new n.bS("head.indexToLocFormat",{0:{offsets:new n.mJ(n.mL)},1:{offsets:new n.mJ(n.U7)}});X.process=function(){if(0===this.version&&!this._processed){for(let e=0;e<this.offsets.length;e++)this.offsets[e]<<=1;this._processed=!0}},X.preEncode=function(){if(0===this.version&&!1!==this._processed){for(let e=0;e<this.offsets.length;e++)this.offsets[e]>>>=1;this._processed=!1}};var Q=X,Z=new n.AU({controlValueProgram:new n.mJ(n.w_)}),ee=new n.mJ(new n.lW);class te{getCFFVersion(e){for(;e&&!e.hdrSize;)e=e.parent;return e?e.version:-1}decode(e,t){let r=this.getCFFVersion(t)>=2?e.readUInt32BE():e.readUInt16BE();if(0===r)return[];let a,o=e.readUInt8();if(1===o)a=n.w_;else if(2===o)a=n.mL;else if(3===o)a=n.Un;else{if(4!==o)throw new Error(`Bad offset size in CFFIndex: ${o} ${e.pos}`);a=n.U7}let i=[],s=e.pos+(r+1)*o-1,u=a.decode(e);for(let n=0;n<r;n++){let r=a.decode(e);if(null!=this.type){let n=e.pos;e.pos=s+u,t.length=r-u,i.push(this.type.decode(e,t)),e.pos=n}else i.push({offset:s+u,length:r-u});u=r}return e.pos=s+u,i}size(e,t){let r=2;if(0===e.length)return r;let a,o=this.type||new n.lW,i=1;for(let r=0;r<e.length;r++){let n=e[r];i+=o.size(n,t)}if(i<=255)a=n.w_;else if(i<=65535)a=n.mL;else if(i<=16777215)a=n.Un;else{if(!(i<=4294967295))throw new Error("Bad offset in CFFIndex");a=n.U7}return r+=1+a.size()*(e.length+1),r+=i-1,r}encode(e,t,r){if(e.writeUInt16BE(t.length),0===t.length)return;let a,o=this.type||new n.lW,i=[],s=1;for(let e of t){let t=o.size(e,r);i.push(t),s+=t}if(s<=255)a=n.w_;else if(s<=65535)a=n.mL;else if(s<=16777215)a=n.Un;else{if(!(s<=4294967295))throw new Error("Bad offset in CFFIndex");a=n.U7}e.writeUInt8(a.size()),s=1,a.encode(e,s);for(let t of i)s+=t,a.encode(e,s);for(let n of t)o.encode(e,n,r)}constructor(e){this.type=e}}const re=["0","1","2","3","4","5","6","7","8","9",".","E","E-",null,"-"],ne={".":10,E:11,"E-":12,"-":14};class ae{static decode(e,t){if(32<=t&&t<=246)return t-139;if(247<=t&&t<=250)return 256*(t-247)+e.readUInt8()+108;if(251<=t&&t<=254)return 256*-(t-251)-e.readUInt8()-108;if(28===t)return e.readInt16BE();if(29===t)return e.readInt32BE();if(30===t){let t="";for(;;){let r=e.readUInt8(),n=r>>4;if(15===n)break;t+=re[n];let a=15&r;if(15===a)break;t+=re[a]}return parseFloat(t)}return null}static size(e){if(e.forceLarge&&(e=32768),(0|e)!==e){let t=""+e;return 1+Math.ceil((t.length+1)/2)}return-107<=e&&e<=107?1:108<=e&&e<=1131||-1131<=e&&e<=-108?2:-32768<=e&&e<=32767?3:5}static encode(e,t){let r=Number(t);if(t.forceLarge)return e.writeUInt8(29),e.writeInt32BE(r);if((0|r)===r)return-107<=r&&r<=107?e.writeUInt8(r+139):108<=r&&r<=1131?(r-=108,e.writeUInt8(247+(r>>8)),e.writeUInt8(255&r)):-1131<=r&&r<=-108?(r=-r-108,e.writeUInt8(251+(r>>8)),e.writeUInt8(255&r)):-32768<=r&&r<=32767?(e.writeUInt8(28),e.writeInt16BE(r)):(e.writeUInt8(29),e.writeInt32BE(r));{e.writeUInt8(30);let t=""+r;for(let r=0;r<t.length;r+=2){let a=t[r],o=ne[a]||+a;if(r===t.length-1)var n=15;else{let e=t[r+1];n=ne[e]||+e}e.writeUInt8(o<<4|15&n)}if(15!==n)return e.writeUInt8(240)}}}class oe{decodeOperands(e,t,r,n){if(Array.isArray(e))return n.map(((n,a)=>this.decodeOperands(e[a],t,r,[n])));if(null!=e.decode)return e.decode(t,r,n);switch(e){case"number":case"offset":case"sid":return n[0];case"boolean":return!!n[0];default:return n}}encodeOperands(e,t,r,n){return Array.isArray(e)?n.map(((n,a)=>this.encodeOperands(e[a],t,r,n)[0])):null!=e.encode?e.encode(t,n,r):"number"==typeof n?[n]:"boolean"==typeof n?[+n]:Array.isArray(n)?n:[n]}decode(e,t){let r=e.pos+t.length,a={},o=[];Object.defineProperties(a,{parent:{value:t},_startOffset:{value:e.pos}});for(let e in this.fields){let t=this.fields[e];a[t[1]]=t[3]}for(;e.pos<r;){let t=e.readUInt8();if(t<28){12===t&&(t=t<<8|e.readUInt8());let r=this.fields[t];if(!r)throw new Error(`Unknown operator ${t}`);let i=this.decodeOperands(r[2],e,a,o);null!=i&&(i instanceof n.c5?Object.defineProperty(a,r[1],i):a[r[1]]=i),o=[]}else o.push(ae.decode(e,t))}return a}size(e,t,r=!0){let n={parent:t,val:e,pointerSize:0,startOffset:t.startOffset||0},a=0;for(let t in this.fields){let r=this.fields[t],o=e[r[1]];if(null==o||i(o,r[3]))continue;let s=this.encodeOperands(r[2],null,n,o);for(let e of s)a+=ae.size(e);a+=(Array.isArray(r[0])?r[0]:[r[0]]).length}return r&&(a+=n.pointerSize),a}encode(e,t,r){let n={pointers:[],startOffset:e.pos,parent:r,val:t,pointerSize:0};n.pointerOffset=e.pos+this.size(t,n,!1);for(let r of this.ops){let a=t[r[1]];if(null==a||i(a,r[3]))continue;let o=this.encodeOperands(r[2],e,n,a);for(let t of o)ae.encode(e,t);let s=Array.isArray(r[0])?r[0]:[r[0]];for(let t of s)e.writeUInt8(t)}let a=0;for(;a<n.pointers.length;){let t=n.pointers[a++];t.type.encode(e,t.val,t.parent)}}constructor(e=[]){this.ops=e,this.fields={};for(let t of e){let e=Array.isArray(t[0])?t[0][0]<<8|t[0][1]:t[0];this.fields[e]=t}}}class ie extends n.$J{decode(e,t,r){return this.offsetType={decode:()=>r[0]},super.decode(e,t,r)}encode(e,t,r){if(!e)return this.offsetType={size:()=>0},this.size(t,r),[new se(0)];let n=null;return this.offsetType={encode:(e,t)=>n=t},super.encode(e,t,r),[new se(n)]}constructor(e,t={}){null==t.type&&(t.type="global"),super(null,e,t)}}class se{valueOf(){return this.val}constructor(e){this.val=e,this.forceLarge=!0}}var ue=new oe([[6,"BlueValues","delta",null],[7,"OtherBlues","delta",null],[8,"FamilyBlues","delta",null],[9,"FamilyOtherBlues","delta",null],[[12,9],"BlueScale","number",.039625],[[12,10],"BlueShift","number",7],[[12,11],"BlueFuzz","number",1],[10,"StdHW","number",null],[11,"StdVW","number",null],[[12,12],"StemSnapH","delta",null],[[12,13],"StemSnapV","delta",null],[[12,14],"ForceBold","boolean",!1],[[12,17],"LanguageGroup","number",0],[[12,18],"ExpansionFactor","number",.06],[[12,19],"initialRandomSeed","number",0],[20,"defaultWidthX","number",0],[21,"nominalWidthX","number",0],[22,"vsindex","number",0],[23,"blend",class{static decode(e,t,r){let n=r.pop();for(;r.length>n;)r.pop()}},null],[19,"Subrs",new ie(new te,{type:"local"}),null]]),le=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall","001.000","001.001","001.002","001.003","Black","Bold","Book","Light","Medium","Regular","Roman","Semibold"];let ce=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","","endash","dagger","daggerdbl","periodcentered","","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","","questiondown","","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","","ring","cedilla","","hungarumlaut","ogonek","caron","emdash","","","","","","","","","","","","","","","","","AE","","ordfeminine","","","","","Lslash","Oslash","OE","ordmasculine","","","","","","ae","","","","dotlessi","","","lslash","oslash","oe","germandbls"],fe=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron"],he=new n.AU({reserved:new n.kV(n.mL),reqFeatureIndex:n.mL,featureCount:n.mL,featureIndexes:new n.mJ(n.mL,"featureCount")}),pe=new n.AU({tag:new n.Ld(4),langSys:new n.$J(n.mL,he,{type:"parent"})}),de=new n.AU({defaultLangSys:new n.$J(n.mL,he),count:n.mL,langSysRecords:new n.mJ(pe,"count")}),me=new n.AU({tag:new n.Ld(4),script:new n.$J(n.mL,de,{type:"parent"})}),ye=new n.mJ(me,n.mL),ve=new n.AU({version:n.mL,nameID:n.mL}),ge=new n.AU({featureParams:new n.$J(n.mL,ve),lookupCount:n.mL,lookupListIndexes:new n.mJ(n.mL,"lookupCount")}),be=new n.AU({tag:new n.Ld(4),feature:new n.$J(n.mL,ge,{type:"parent"})}),_e=new n.mJ(be,n.mL),we=new n.AU({markAttachmentType:n.w_,flags:new n.DL(n.w_,["rightToLeft","ignoreBaseGlyphs","ignoreLigatures","ignoreMarks","useMarkFilteringSet"])});function Ee(e){let t=new n.AU({lookupType:n.mL,flags:we,subTableCount:n.mL,subTables:new n.mJ(new n.$J(n.mL,e),"subTableCount"),markFilteringSet:new n.Fi(n.mL,(e=>e.flags.flags.useMarkFilteringSet))});return new n.pW(new n.$J(n.mL,t),n.mL)}let Se=new n.AU({start:n.mL,end:n.mL,startCoverageIndex:n.mL}),Te=new n.bS(n.mL,{1:{glyphCount:n.mL,glyphs:new n.mJ(n.mL,"glyphCount")},2:{rangeCount:n.mL,rangeRecords:new n.mJ(Se,"rangeCount")}}),ke=new n.AU({start:n.mL,end:n.mL,class:n.mL}),Ae=new n.bS(n.mL,{1:{startGlyph:n.mL,glyphCount:n.mL,classValueArray:new n.mJ(n.mL,"glyphCount")},2:{classRangeCount:n.mL,classRangeRecord:new n.mJ(ke,"classRangeCount")}}),Ne=new n.AU({a:n.mL,b:n.mL,deltaFormat:n.mL}),Oe=new n.AU({sequenceIndex:n.mL,lookupListIndex:n.mL}),Ie=new n.AU({glyphCount:n.mL,lookupCount:n.mL,input:new n.mJ(n.mL,(e=>e.glyphCount-1)),lookupRecords:new n.mJ(Oe,"lookupCount")}),Le=new n.mJ(new n.$J(n.mL,Ie),n.mL),xe=new n.AU({glyphCount:n.mL,lookupCount:n.mL,classes:new n.mJ(n.mL,(e=>e.glyphCount-1)),lookupRecords:new n.mJ(Oe,"lookupCount")}),Ce=new n.mJ(new n.$J(n.mL,xe),n.mL),Fe=new n.bS(n.mL,{1:{coverage:new n.$J(n.mL,Te),ruleSetCount:n.mL,ruleSets:new n.mJ(new n.$J(n.mL,Le),"ruleSetCount")},2:{coverage:new n.$J(n.mL,Te),classDef:new n.$J(n.mL,Ae),classSetCnt:n.mL,classSet:new n.mJ(new n.$J(n.mL,Ce),"classSetCnt")},3:{glyphCount:n.mL,lookupCount:n.mL,coverages:new n.mJ(new n.$J(n.mL,Te),"glyphCount"),lookupRecords:new n.mJ(Oe,"lookupCount")}}),Pe=new n.AU({backtrackGlyphCount:n.mL,backtrack:new n.mJ(n.mL,"backtrackGlyphCount"),inputGlyphCount:n.mL,input:new n.mJ(n.mL,(e=>e.inputGlyphCount-1)),lookaheadGlyphCount:n.mL,lookahead:new n.mJ(n.mL,"lookaheadGlyphCount"),lookupCount:n.mL,lookupRecords:new n.mJ(Oe,"lookupCount")}),Re=new n.mJ(new n.$J(n.mL,Pe),n.mL),De=new n.bS(n.mL,{1:{coverage:new n.$J(n.mL,Te),chainCount:n.mL,chainRuleSets:new n.mJ(new n.$J(n.mL,Re),"chainCount")},2:{coverage:new n.$J(n.mL,Te),backtrackClassDef:new n.$J(n.mL,Ae),inputClassDef:new n.$J(n.mL,Ae),lookaheadClassDef:new n.$J(n.mL,Ae),chainCount:n.mL,chainClassSet:new n.mJ(new n.$J(n.mL,Re),"chainCount")},3:{backtrackGlyphCount:n.mL,backtrackCoverage:new n.mJ(new n.$J(n.mL,Te),"backtrackGlyphCount"),inputGlyphCount:n.mL,inputCoverage:new n.mJ(new n.$J(n.mL,Te),"inputGlyphCount"),lookaheadGlyphCount:n.mL,lookaheadCoverage:new n.mJ(new n.$J(n.mL,Te),"lookaheadGlyphCount"),lookupCount:n.mL,lookupRecords:new n.mJ(Oe,"lookupCount")}}),Ue=new n.gb(16,"BE",14),Me=new n.AU({startCoord:Ue,peakCoord:Ue,endCoord:Ue}),Be=new n.AU({axisCount:n.mL,regionCount:n.mL,variationRegions:new n.mJ(new n.mJ(Me,"axisCount"),"regionCount")}),je=new n.AU({shortDeltas:new n.mJ(n.Af,(e=>e.parent.shortDeltaCount)),regionDeltas:new n.mJ(n.cS,(e=>e.parent.regionIndexCount-e.parent.shortDeltaCount)),deltas:e=>e.shortDeltas.concat(e.regionDeltas)}),Ge=new n.AU({itemCount:n.mL,shortDeltaCount:n.mL,regionIndexCount:n.mL,regionIndexes:new n.mJ(n.mL,"regionIndexCount"),deltaSets:new n.mJ(je,"itemCount")}),Ke=new n.AU({format:n.mL,variationRegionList:new n.$J(n.U7,Be),variationDataCount:n.mL,itemVariationData:new n.mJ(new n.$J(n.U7,Ge),"variationDataCount")}),He=new n.bS(n.mL,{1:{axisIndex:n.mL,axisIndex:n.mL,filterRangeMinValue:Ue,filterRangeMaxValue:Ue}}),Ve=new n.AU({conditionCount:n.mL,conditionTable:new n.mJ(new n.$J(n.U7,He),"conditionCount")}),We=new n.AU({featureIndex:n.mL,alternateFeatureTable:new n.$J(n.U7,ge,{type:"parent"})}),Ye=new n.AU({version:n.E2,substitutionCount:n.mL,substitutions:new n.mJ(We,"substitutionCount")}),Je=new n.AU({conditionSet:new n.$J(n.U7,Ve,{type:"parent"}),featureTableSubstitution:new n.$J(n.U7,Ye,{type:"parent"})}),ze=new n.AU({majorVersion:n.mL,minorVersion:n.mL,featureVariationRecordCount:n.U7,featureVariationRecords:new n.mJ(Je,"featureVariationRecordCount")});class $e{decode(e,t,r){return this.predefinedOps[r[0]]?this.predefinedOps[r[0]]:this.type.decode(e,t,r)}size(e,t){return this.type.size(e,t)}encode(e,t,r){let n=this.predefinedOps.indexOf(t);return-1!==n?n:this.type.encode(e,t,r)}constructor(e,t){this.predefinedOps=e,this.type=t}}class qe extends n.Mr{decode(e){return 127&n.w_.decode(e)}constructor(){super("UInt8")}}let Xe=new n.AU({first:n.mL,nLeft:n.w_}),Qe=new n.AU({first:n.mL,nLeft:n.mL}),Ze=new $e([ce,["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclamsmall","Hungarumlautsmall","","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","","asuperior","bsuperior","centsuperior","dsuperior","esuperior","","","isuperior","","","lsuperior","msuperior","nsuperior","osuperior","","","rsuperior","ssuperior","tsuperior","","ff","fi","fl","ffi","ffl","parenleftinferior","","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdownsmall","centoldstyle","Lslashsmall","","","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","","Dotaccentsmall","","","Macronsmall","","","figuredash","hypheninferior","","","Ogoneksmall","Ringsmall","Cedillasmall","","","","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","","","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall"]],new ie(new n.bS(new qe,{0:{nCodes:n.w_,codes:new n.mJ(n.w_,"nCodes")},1:{nRanges:n.w_,ranges:new n.mJ(Xe,"nRanges")}}),{lazy:!0}));class et extends n.mJ{decode(e,t){let r=(0,n.dB)(this.length,e,t),a=0,o=[];for(;a<r;){let r=this.type.decode(e,t);r.offset=a,a+=r.nLeft+1,o.push(r)}return o}}let tt=new $e([fe,[".notdef","space","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","fi","fl","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall"],[".notdef","space","dollaroldstyle","dollarsuperior","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","fi","fl","ffi","ffl","parenleftinferior","parenrightinferior","hyphensuperior","colonmonetary","onefitted","rupiah","centoldstyle","figuredash","hypheninferior","onequarter","onehalf","threequarters","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior"]],new ie(new n.bS(n.w_,{0:{glyphs:new n.mJ(n.mL,(e=>e.parent.CharStrings.length-1))},1:{ranges:new et(Xe,(e=>e.parent.CharStrings.length-1))},2:{ranges:new et(Qe,(e=>e.parent.CharStrings.length-1))}}),{lazy:!0})),rt=new n.AU({first:n.mL,fd:n.w_}),nt=new n.AU({first:n.U7,fd:n.mL}),at=new n.bS(n.w_,{0:{fds:new n.mJ(n.w_,(e=>e.parent.CharStrings.length))},3:{nRanges:n.mL,ranges:new n.mJ(rt,"nRanges"),sentinel:n.mL},4:{nRanges:n.U7,ranges:new n.mJ(nt,"nRanges"),sentinel:n.U7}}),ot=new ie(ue);class it{decode(e,t,r){return t.length=r[0],ot.decode(e,t,[r[1]])}size(e,t){return[ue.size(e,t,!1),ot.size(e,t)[0]]}encode(e,t,r){return[ue.size(t,r,!1),ot.encode(e,t,r)[0]]}}let st=new oe([[18,"Private",new it,null],[[12,38],"FontName","sid",null],[[12,7],"FontMatrix","array",[.001,0,0,.001,0,0]],[[12,5],"PaintType","number",0]]),ut=new oe([[[12,30],"ROS",["sid","sid","number"],null],[0,"version","sid",null],[1,"Notice","sid",null],[[12,0],"Copyright","sid",null],[2,"FullName","sid",null],[3,"FamilyName","sid",null],[4,"Weight","sid",null],[[12,1],"isFixedPitch","boolean",!1],[[12,2],"ItalicAngle","number",0],[[12,3],"UnderlinePosition","number",-100],[[12,4],"UnderlineThickness","number",50],[[12,5],"PaintType","number",0],[[12,6],"CharstringType","number",2],[[12,7],"FontMatrix","array",[.001,0,0,.001,0,0]],[13,"UniqueID","number",null],[5,"FontBBox","array",[0,0,0,0]],[[12,8],"StrokeWidth","number",0],[14,"XUID","array",null],[15,"charset",tt,fe],[16,"Encoding",Ze,ce],[17,"CharStrings",new ie(new te),null],[18,"Private",new it,null],[[12,20],"SyntheticBase","number",null],[[12,21],"PostScript","sid",null],[[12,22],"BaseFontName","sid",null],[[12,23],"BaseFontBlend","delta",null],[[12,31],"CIDFontVersion","number",0],[[12,32],"CIDFontRevision","number",0],[[12,33],"CIDFontType","number",0],[[12,34],"CIDCount","number",8720],[[12,35],"UIDBase","number",null],[[12,37],"FDSelect",new ie(at),null],[[12,36],"FDArray",new ie(new te(st)),null],[[12,38],"FontName","sid",null]]),lt=new n.AU({length:n.mL,itemVariationStore:Ke}),ct=new oe([[[12,7],"FontMatrix","array",[.001,0,0,.001,0,0]],[17,"CharStrings",new ie(new te),null],[[12,37],"FDSelect",new ie(at),null],[[12,36],"FDArray",new ie(new te(st)),null],[24,"vstore",new ie(lt),null],[25,"maxstack","number",193]]);var ft=new n.bS(n.gl,{1:{hdrSize:n.w_,offSize:n.w_,nameIndex:new te(new n.Ld("length")),topDictIndex:new te(ut),stringIndex:new te(new n.Ld("length")),globalSubrIndex:new te},2:{hdrSize:n.w_,length:n.mL,topDict:ct,globalSubrIndex:new te}});class ht{static decode(e){return new ht(e)}decode(){this.stream.pos;let e=ft.decode(this.stream);for(let t in e){let r=e[t];this[t]=r}if(this.version<2){if(1!==this.topDictIndex.length)throw new Error("Only a single font is allowed in CFF");this.topDict=this.topDictIndex[0]}return this.isCIDFont=null!=this.topDict.ROS,this}string(e){return this.version>=2?null:e<le.length?le[e]:this.stringIndex[e-le.length]}get postscriptName(){return this.version<2?this.nameIndex[0]:null}get fullName(){return this.string(this.topDict.FullName)}get familyName(){return this.string(this.topDict.FamilyName)}getCharString(e){return this.stream.pos=this.topDict.CharStrings[e].offset,this.stream.readBuffer(this.topDict.CharStrings[e].length)}getGlyphName(e){if(this.version>=2)return null;if(this.isCIDFont)return null;let{charset:t}=this.topDict;if(Array.isArray(t))return t[e];if(0===e)return".notdef";switch(e-=1,t.version){case 0:return this.string(t.glyphs[e]);case 1:case 2:for(let r=0;r<t.ranges.length;r++){let n=t.ranges[r];if(n.offset<=e&&e<=n.offset+n.nLeft)return this.string(n.first+(e-n.offset))}}return null}fdForGlyph(e){if(!this.topDict.FDSelect)return null;switch(this.topDict.FDSelect.version){case 0:return this.topDict.FDSelect.fds[e];case 3:case 4:let{ranges:t}=this.topDict.FDSelect,r=0,n=t.length-1;for(;r<=n;){let a=r+n>>1;if(e<t[a].first)n=a-1;else{if(!(a<n&&e>=t[a+1].first))return t[a].fd;r=a+1}}default:throw new Error(`Unknown FDSelect version: ${this.topDict.FDSelect.version}`)}}privateDictForGlyph(e){if(this.topDict.FDSelect){let t=this.fdForGlyph(e);return this.topDict.FDArray[t]?this.topDict.FDArray[t].Private:null}return this.version<2?this.topDict.Private:this.topDict.FDArray[0].Private}constructor(e){this.stream=e,this.decode()}}var pt=ht;let dt=new n.AU({glyphIndex:n.mL,vertOriginY:n.Af});var mt=new n.AU({majorVersion:n.mL,minorVersion:n.mL,defaultVertOriginY:n.Af,numVertOriginYMetrics:n.mL,metrics:new n.mJ(dt,"numVertOriginYMetrics")});let yt=new n.AU({height:n.w_,width:n.w_,horiBearingX:n.cS,horiBearingY:n.cS,horiAdvance:n.w_,vertBearingX:n.cS,vertBearingY:n.cS,vertAdvance:n.w_}),vt=new n.AU({height:n.w_,width:n.w_,bearingX:n.cS,bearingY:n.cS,advance:n.w_}),gt=new n.AU({glyph:n.mL,xOffset:n.cS,yOffset:n.cS});class bt{}class _t{}new n.bS("version",{1:{metrics:vt,data:bt},2:{metrics:vt,data:_t},5:{data:_t},6:{metrics:yt,data:bt},7:{metrics:yt,data:_t},8:{metrics:vt,pad:new n.kV(n.w_),numComponents:n.mL,components:new n.mJ(gt,"numComponents")},9:{metrics:yt,pad:new n.kV(n.w_),numComponents:n.mL,components:new n.mJ(gt,"numComponents")},17:{metrics:vt,dataLen:n.U7,data:new n.lW("dataLen")},18:{metrics:yt,dataLen:n.U7,data:new n.lW("dataLen")},19:{dataLen:n.U7,data:new n.lW("dataLen")}});let wt=new n.AU({ascender:n.cS,descender:n.cS,widthMax:n.w_,caretSlopeNumerator:n.cS,caretSlopeDenominator:n.cS,caretOffset:n.cS,minOriginSB:n.cS,minAdvanceSB:n.cS,maxBeforeBL:n.cS,minAfterBL:n.cS,pad:new n.kV(n.cS,2)}),Et=new n.AU({glyphCode:n.mL,offset:n.mL}),St=new n.bS(n.mL,{header:{imageFormat:n.mL,imageDataOffset:n.U7},1:{offsetArray:new n.mJ(n.U7,(e=>e.parent.lastGlyphIndex-e.parent.firstGlyphIndex+1))},2:{imageSize:n.U7,bigMetrics:yt},3:{offsetArray:new n.mJ(n.mL,(e=>e.parent.lastGlyphIndex-e.parent.firstGlyphIndex+1))},4:{numGlyphs:n.U7,glyphArray:new n.mJ(Et,(e=>e.numGlyphs+1))},5:{imageSize:n.U7,bigMetrics:yt,numGlyphs:n.U7,glyphCodeArray:new n.mJ(n.mL,"numGlyphs")}}),Tt=new n.AU({firstGlyphIndex:n.mL,lastGlyphIndex:n.mL,subtable:new n.$J(n.U7,St)}),kt=new n.AU({indexSubTableArray:new n.$J(n.U7,new n.mJ(Tt,1),{type:"parent"}),indexTablesSize:n.U7,numberOfIndexSubTables:n.U7,colorRef:n.U7,hori:wt,vert:wt,startGlyphIndex:n.mL,endGlyphIndex:n.mL,ppemX:n.w_,ppemY:n.w_,bitDepth:n.w_,flags:new n.DL(n.w_,["horizontal","vertical"])});var At=new n.AU({version:n.U7,numSizes:n.U7,sizes:new n.mJ(kt,"numSizes")});let Nt=new n.AU({ppem:n.mL,resolution:n.mL,imageOffsets:new n.mJ(new n.$J(n.U7,"void"),(e=>e.parent.parent.maxp.numGlyphs+1))});var Ot=new n.AU({version:n.mL,flags:new n.DL(n.mL,["renderOutlines"]),numImgTables:n.U7,imageTables:new n.mJ(new n.$J(n.U7,Nt),"numImgTables")});let It=new n.AU({gid:n.mL,paletteIndex:n.mL}),Lt=new n.AU({gid:n.mL,firstLayerIndex:n.mL,numLayers:n.mL});var xt=new n.AU({version:n.mL,numBaseGlyphRecords:n.mL,baseGlyphRecord:new n.$J(n.U7,new n.mJ(Lt,"numBaseGlyphRecords")),layerRecords:new n.$J(n.U7,new n.mJ(It,"numLayerRecords"),{lazy:!0}),numLayerRecords:n.mL});let Ct=new n.AU({blue:n.w_,green:n.w_,red:n.w_,alpha:n.w_});var Ft=new n.bS(n.mL,{header:{numPaletteEntries:n.mL,numPalettes:n.mL,numColorRecords:n.mL,colorRecords:new n.$J(n.U7,new n.mJ(Ct,"numColorRecords")),colorRecordIndices:new n.mJ(n.mL,"numPalettes")},0:{},1:{offsetPaletteTypeArray:new n.$J(n.U7,new n.mJ(n.U7,"numPalettes")),offsetPaletteLabelArray:new n.$J(n.U7,new n.mJ(n.mL,"numPalettes")),offsetPaletteEntryLabelArray:new n.$J(n.U7,new n.mJ(n.mL,"numPaletteEntries"))}});let Pt=new n.bS(n.mL,{1:{coordinate:n.Af},2:{coordinate:n.Af,referenceGlyph:n.mL,baseCoordPoint:n.mL},3:{coordinate:n.Af,deviceTable:new n.$J(n.mL,Ne)}}),Rt=new n.AU({defaultIndex:n.mL,baseCoordCount:n.mL,baseCoords:new n.mJ(new n.$J(n.mL,Pt),"baseCoordCount")}),Dt=new n.AU({tag:new n.Ld(4),minCoord:new n.$J(n.mL,Pt,{type:"parent"}),maxCoord:new n.$J(n.mL,Pt,{type:"parent"})}),Ut=new n.AU({minCoord:new n.$J(n.mL,Pt),maxCoord:new n.$J(n.mL,Pt),featMinMaxCount:n.mL,featMinMaxRecords:new n.mJ(Dt,"featMinMaxCount")}),Mt=new n.AU({tag:new n.Ld(4),minMax:new n.$J(n.mL,Ut,{type:"parent"})}),Bt=new n.AU({baseValues:new n.$J(n.mL,Rt),defaultMinMax:new n.$J(n.mL,Ut),baseLangSysCount:n.mL,baseLangSysRecords:new n.mJ(Mt,"baseLangSysCount")}),jt=new n.AU({tag:new n.Ld(4),script:new n.$J(n.mL,Bt,{type:"parent"})}),Gt=new n.mJ(jt,n.mL),Kt=new n.mJ(new n.Ld(4),n.mL),Ht=new n.AU({baseTagList:new n.$J(n.mL,Kt),baseScriptList:new n.$J(n.mL,Gt)});var Vt=new n.bS(n.U7,{header:{horizAxis:new n.$J(n.mL,Ht),vertAxis:new n.$J(n.mL,Ht)},65536:{},65537:{itemVariationStore:new n.$J(n.U7,Ke)}});let Wt=new n.mJ(n.mL,n.mL),Yt=new n.AU({coverage:new n.$J(n.mL,Te),glyphCount:n.mL,attachPoints:new n.mJ(new n.$J(n.mL,Wt),"glyphCount")}),Jt=new n.bS(n.mL,{1:{coordinate:n.Af},2:{caretValuePoint:n.mL},3:{coordinate:n.Af,deviceTable:new n.$J(n.mL,Ne)}}),zt=new n.mJ(new n.$J(n.mL,Jt),n.mL),$t=new n.AU({coverage:new n.$J(n.mL,Te),ligGlyphCount:n.mL,ligGlyphs:new n.mJ(new n.$J(n.mL,zt),"ligGlyphCount")}),qt=new n.AU({markSetTableFormat:n.mL,markSetCount:n.mL,coverage:new n.mJ(new n.$J(n.U7,Te),"markSetCount")});var Xt=new n.bS(n.U7,{header:{glyphClassDef:new n.$J(n.mL,Ae),attachList:new n.$J(n.mL,Yt),ligCaretList:new n.$J(n.mL,$t),markAttachClassDef:new n.$J(n.mL,Ae)},65536:{},65538:{markGlyphSetsDef:new n.$J(n.mL,qt)},65539:{markGlyphSetsDef:new n.$J(n.mL,qt),itemVariationStore:new n.$J(n.U7,Ke)}});let Qt=new n.DL(n.mL,["xPlacement","yPlacement","xAdvance","yAdvance","xPlaDevice","yPlaDevice","xAdvDevice","yAdvDevice"]),Zt={xPlacement:n.Af,yPlacement:n.Af,xAdvance:n.Af,yAdvance:n.Af,xPlaDevice:new n.$J(n.mL,Ne,{type:"global",relativeTo:e=>e.rel}),yPlaDevice:new n.$J(n.mL,Ne,{type:"global",relativeTo:e=>e.rel}),xAdvDevice:new n.$J(n.mL,Ne,{type:"global",relativeTo:e=>e.rel}),yAdvDevice:new n.$J(n.mL,Ne,{type:"global",relativeTo:e=>e.rel})};class er{buildStruct(e){let t=e;for(;!t[this.key]&&t.parent;)t=t.parent;if(!t[this.key])return;let r={rel:()=>t._startOffset},a=t[this.key];for(let e in a)a[e]&&(r[e]=Zt[e]);return new n.AU(r)}size(e,t){return this.buildStruct(t).size(e,t)}decode(e,t){let r=this.buildStruct(t).decode(e,t);return delete r.rel,r}constructor(e="valueFormat"){this.key=e}}let tr=new n.AU({secondGlyph:n.mL,value1:new er("valueFormat1"),value2:new er("valueFormat2")}),rr=new n.mJ(tr,n.mL),nr=new n.AU({value1:new er("valueFormat1"),value2:new er("valueFormat2")}),ar=new n.bS(n.mL,{1:{xCoordinate:n.Af,yCoordinate:n.Af},2:{xCoordinate:n.Af,yCoordinate:n.Af,anchorPoint:n.mL},3:{xCoordinate:n.Af,yCoordinate:n.Af,xDeviceTable:new n.$J(n.mL,Ne),yDeviceTable:new n.$J(n.mL,Ne)}}),or=new n.AU({entryAnchor:new n.$J(n.mL,ar,{type:"parent"}),exitAnchor:new n.$J(n.mL,ar,{type:"parent"})}),ir=new n.AU({class:n.mL,markAnchor:new n.$J(n.mL,ar,{type:"parent"})}),sr=new n.mJ(ir,n.mL),ur=new n.mJ(new n.$J(n.mL,ar),(e=>e.parent.classCount)),lr=new n.mJ(ur,n.mL),cr=new n.mJ(new n.$J(n.mL,ar),(e=>e.parent.parent.classCount)),fr=new n.mJ(cr,n.mL),hr=new n.mJ(new n.$J(n.mL,fr),n.mL),pr=new n.bS("lookupType",{1:new n.bS(n.mL,{1:{coverage:new n.$J(n.mL,Te),valueFormat:Qt,value:new er},2:{coverage:new n.$J(n.mL,Te),valueFormat:Qt,valueCount:n.mL,values:new n.pW(new er,"valueCount")}}),2:new n.bS(n.mL,{1:{coverage:new n.$J(n.mL,Te),valueFormat1:Qt,valueFormat2:Qt,pairSetCount:n.mL,pairSets:new n.pW(new n.$J(n.mL,rr),"pairSetCount")},2:{coverage:new n.$J(n.mL,Te),valueFormat1:Qt,valueFormat2:Qt,classDef1:new n.$J(n.mL,Ae),classDef2:new n.$J(n.mL,Ae),class1Count:n.mL,class2Count:n.mL,classRecords:new n.pW(new n.pW(nr,"class2Count"),"class1Count")}}),3:{format:n.mL,coverage:new n.$J(n.mL,Te),entryExitCount:n.mL,entryExitRecords:new n.mJ(or,"entryExitCount")},4:{format:n.mL,markCoverage:new n.$J(n.mL,Te),baseCoverage:new n.$J(n.mL,Te),classCount:n.mL,markArray:new n.$J(n.mL,sr),baseArray:new n.$J(n.mL,lr)},5:{format:n.mL,markCoverage:new n.$J(n.mL,Te),ligatureCoverage:new n.$J(n.mL,Te),classCount:n.mL,markArray:new n.$J(n.mL,sr),ligatureArray:new n.$J(n.mL,hr)},6:{format:n.mL,mark1Coverage:new n.$J(n.mL,Te),mark2Coverage:new n.$J(n.mL,Te),classCount:n.mL,mark1Array:new n.$J(n.mL,sr),mark2Array:new n.$J(n.mL,lr)},7:Fe,8:De,9:{posFormat:n.mL,lookupType:n.mL,extension:new n.$J(n.U7,null)}});pr.versions[9].extension.type=pr;var dr=new n.bS(n.U7,{header:{scriptList:new n.$J(n.mL,ye),featureList:new n.$J(n.mL,_e),lookupList:new n.$J(n.mL,new Ee(pr))},65536:{},65537:{featureVariations:new n.$J(n.U7,ze)}});let mr=new n.mJ(n.mL,n.mL),yr=mr,vr=new n.AU({glyph:n.mL,compCount:n.mL,components:new n.mJ(n.mL,(e=>e.compCount-1))}),gr=new n.mJ(new n.$J(n.mL,vr),n.mL),br=new n.bS("lookupType",{1:new n.bS(n.mL,{1:{coverage:new n.$J(n.mL,Te),deltaGlyphID:n.Af},2:{coverage:new n.$J(n.mL,Te),glyphCount:n.mL,substitute:new n.pW(n.mL,"glyphCount")}}),2:{substFormat:n.mL,coverage:new n.$J(n.mL,Te),count:n.mL,sequences:new n.pW(new n.$J(n.mL,mr),"count")},3:{substFormat:n.mL,coverage:new n.$J(n.mL,Te),count:n.mL,alternateSet:new n.pW(new n.$J(n.mL,yr),"count")},4:{substFormat:n.mL,coverage:new n.$J(n.mL,Te),count:n.mL,ligatureSets:new n.pW(new n.$J(n.mL,gr),"count")},5:Fe,6:De,7:{substFormat:n.mL,lookupType:n.mL,extension:new n.$J(n.U7,null)},8:{substFormat:n.mL,coverage:new n.$J(n.mL,Te),backtrackCoverage:new n.mJ(new n.$J(n.mL,Te),"backtrackGlyphCount"),lookaheadGlyphCount:n.mL,lookaheadCoverage:new n.mJ(new n.$J(n.mL,Te),"lookaheadGlyphCount"),glyphCount:n.mL,substitutes:new n.mJ(n.mL,"glyphCount")}});br.versions[7].extension.type=br;var _r=new n.bS(n.U7,{header:{scriptList:new n.$J(n.mL,ye),featureList:new n.$J(n.mL,_e),lookupList:new n.$J(n.mL,new Ee(br))},65536:{},65537:{featureVariations:new n.$J(n.U7,ze)}});let wr=new n.mJ(n.mL,n.mL),Er=new n.AU({shrinkageEnableGSUB:new n.$J(n.mL,wr),shrinkageDisableGSUB:new n.$J(n.mL,wr),shrinkageEnableGPOS:new n.$J(n.mL,wr),shrinkageDisableGPOS:new n.$J(n.mL,wr),shrinkageJstfMax:new n.$J(n.mL,new Ee(pr)),extensionEnableGSUB:new n.$J(n.mL,wr),extensionDisableGSUB:new n.$J(n.mL,wr),extensionEnableGPOS:new n.$J(n.mL,wr),extensionDisableGPOS:new n.$J(n.mL,wr),extensionJstfMax:new n.$J(n.mL,new Ee(pr))}),Sr=new n.mJ(new n.$J(n.mL,Er),n.mL),Tr=new n.AU({tag:new n.Ld(4),jstfLangSys:new n.$J(n.mL,Sr)}),kr=new n.AU({extenderGlyphs:new n.$J(n.mL,new n.mJ(n.mL,n.mL)),defaultLangSys:new n.$J(n.mL,Sr),langSysCount:n.mL,langSysRecords:new n.mJ(Tr,"langSysCount")}),Ar=new n.AU({tag:new n.Ld(4),script:new n.$J(n.mL,kr,{type:"parent"})});var Nr=new n.AU({version:n.U7,scriptCount:n.mL,scriptList:new n.mJ(Ar,"scriptCount")});let Or=new n.AU({entry:new class{decode(e,t){switch(this.size(0,t)){case 1:return e.readUInt8();case 2:return e.readUInt16BE();case 3:return e.readUInt24BE();case 4:return e.readUInt32BE()}}size(e,t){return(0,n.dB)(this._size,null,t)}constructor(e){this._size=e}}((e=>1+((48&e.parent.entryFormat)>>4))),outerIndex:e=>e.entry>>1+(15&e.parent.entryFormat),innerIndex:e=>e.entry&(1<<1+(15&e.parent.entryFormat))-1}),Ir=new n.AU({entryFormat:n.mL,mapCount:n.mL,mapData:new n.mJ(Or,"mapCount")});var Lr=new n.AU({majorVersion:n.mL,minorVersion:n.mL,itemVariationStore:new n.$J(n.U7,Ke),advanceWidthMapping:new n.$J(n.U7,Ir),LSBMapping:new n.$J(n.U7,Ir),RSBMapping:new n.$J(n.U7,Ir)});let xr=new n.AU({format:n.U7,length:n.U7,offset:n.U7}),Cr=new n.AU({reserved:new n.kV(n.mL,2),cbSignature:n.U7,signature:new n.lW("cbSignature")});var Fr=new n.AU({ulVersion:n.U7,usNumSigs:n.mL,usFlag:n.mL,signatures:new n.mJ(xr,"usNumSigs"),signatureBlocks:new n.mJ(Cr,"usNumSigs")});let Pr=new n.AU({rangeMaxPPEM:n.mL,rangeGaspBehavior:new n.DL(n.mL,["grayscale","gridfit","symmetricSmoothing","symmetricGridfit"])});var Rr=new n.AU({version:n.mL,numRanges:n.mL,gaspRanges:new n.mJ(Pr,"numRanges")});let Dr=new n.AU({pixelSize:n.w_,maximumWidth:n.w_,widths:new n.mJ(n.w_,(e=>e.parent.parent.maxp.numGlyphs))});var Ur=new n.AU({version:n.mL,numRecords:n.Af,sizeDeviceRecord:n.LB,records:new n.mJ(Dr,"numRecords")});let Mr=new n.AU({left:n.mL,right:n.mL,value:n.Af}),Br=new n.AU({firstGlyph:n.mL,nGlyphs:n.mL,offsets:new n.mJ(n.mL,"nGlyphs"),max:e=>e.offsets.length&&Math.max.apply(Math,e.offsets)}),jr=new n.AU({off:e=>e._startOffset-e.parent.parent._startOffset,len:e=>((e.parent.leftTable.max-e.off)/e.parent.rowWidth+1)*(e.parent.rowWidth/2),values:new n.pW(n.Af,"len")}),Gr=new n.bS("format",{0:{nPairs:n.mL,searchRange:n.mL,entrySelector:n.mL,rangeShift:n.mL,pairs:new n.mJ(Mr,"nPairs")},2:{rowWidth:n.mL,leftTable:new n.$J(n.mL,Br,{type:"parent"}),rightTable:new n.$J(n.mL,Br,{type:"parent"}),array:new n.$J(n.mL,jr,{type:"parent"})},3:{glyphCount:n.mL,kernValueCount:n.w_,leftClassCount:n.w_,rightClassCount:n.w_,flags:n.w_,kernValue:new n.mJ(n.Af,"kernValueCount"),leftClass:new n.mJ(n.w_,"glyphCount"),rightClass:new n.mJ(n.w_,"glyphCount"),kernIndex:new n.mJ(n.w_,(e=>e.leftClassCount*e.rightClassCount))}}),Kr=new n.bS("version",{0:{subVersion:n.mL,length:n.mL,format:n.w_,coverage:new n.DL(n.w_,["horizontal","minimum","crossStream","override"]),subtable:Gr,padding:new n.kV(n.w_,(e=>e.length-e._currentOffset))},1:{length:n.U7,coverage:new n.DL(n.w_,[null,null,null,null,null,"variation","crossStream","vertical"]),format:n.w_,tupleIndex:n.mL,subtable:Gr,padding:new n.kV(n.w_,(e=>e.length-e._currentOffset))}});var Hr=new n.bS(n.mL,{0:{nTables:n.mL,tables:new n.mJ(Kr,"nTables")},1:{reserved:new n.kV(n.mL),nTables:n.U7,tables:new n.mJ(Kr,"nTables")}}),Vr=new n.AU({version:n.mL,numGlyphs:n.mL,yPels:new n.mJ(n.w_,"numGlyphs")}),Wr=new n.AU({version:n.mL,fontNumber:n.U7,pitch:n.mL,xHeight:n.mL,style:n.mL,typeFamily:n.mL,capHeight:n.mL,symbolSet:n.mL,typeface:new n.Ld(16),characterComplement:new n.Ld(8),fileName:new n.Ld(6),strokeWeight:new n.Ld(1),widthType:new n.Ld(1),serifStyle:n.w_,reserved:new n.kV(n.w_)});let Yr=new n.AU({bCharSet:n.w_,xRatio:n.w_,yStartRatio:n.w_,yEndRatio:n.w_}),Jr=new n.AU({yPelHeight:n.mL,yMax:n.Af,yMin:n.Af}),zr=new n.AU({recs:n.mL,startsz:n.w_,endsz:n.w_,entries:new n.mJ(Jr,"recs")});var $r=new n.AU({version:n.mL,numRecs:n.mL,numRatios:n.mL,ratioRanges:new n.mJ(Yr,"numRatios"),offsets:new n.mJ(n.mL,"numRatios"),groups:new n.mJ(zr,"numRecs")}),qr=new n.AU({version:n.mL,ascent:n.Af,descent:n.Af,lineGap:n.Af,advanceHeightMax:n.Af,minTopSideBearing:n.Af,minBottomSideBearing:n.Af,yMaxExtent:n.Af,caretSlopeRise:n.Af,caretSlopeRun:n.Af,caretOffset:n.Af,reserved:new n.kV(n.Af,4),metricDataFormat:n.Af,numberOfMetrics:n.mL});let Xr=new n.AU({advance:n.mL,bearing:n.Af});var Qr=new n.AU({metrics:new n.pW(Xr,(e=>e.parent.vhea.numberOfMetrics)),bearings:new n.pW(n.Af,(e=>e.parent.maxp.numGlyphs-e.parent.vhea.numberOfMetrics))});let Zr=new n.gb(16,"BE",14),en=new n.AU({fromCoord:Zr,toCoord:Zr}),tn=new n.AU({pairCount:n.mL,correspondence:new n.mJ(en,"pairCount")});var rn=new n.AU({version:n.E2,axisCount:n.U7,segment:new n.mJ(tn,"axisCount")});class nn{getItem(e){if(null==this._items[e]){let t=this.stream.pos;this.stream.pos=this.base+this.type.size(null,this.parent)*e,this._items[e]=this.type.decode(this.stream,this.parent),this.stream.pos=t}return this._items[e]}inspect(){return`[UnboundedArray ${this.type.constructor.name}]`}constructor(e,t,r){this.type=e,this.stream=t,this.parent=r,this.base=this.stream.pos,this._items=[]}}class an extends n.mJ{decode(e,t){return new nn(this.type,e,t)}constructor(e){super(e,0)}}let on=function(e=n.mL){e=new class{decode(e,t){return t=t.parent.parent,this.type.decode(e,t)}size(e,t){return t=t.parent.parent,this.type.size(e,t)}encode(e,t,r){return r=r.parent.parent,this.type.encode(e,t,r)}constructor(e){this.type=e}}(e);let t=new n.AU({unitSize:n.mL,nUnits:n.mL,searchRange:n.mL,entrySelector:n.mL,rangeShift:n.mL}),r=new n.AU({lastGlyph:n.mL,firstGlyph:n.mL,value:e}),a=new n.AU({lastGlyph:n.mL,firstGlyph:n.mL,values:new n.$J(n.mL,new n.mJ(e,(e=>e.lastGlyph-e.firstGlyph+1)),{type:"parent"})}),o=new n.AU({glyph:n.mL,value:e});return new n.bS(n.mL,{0:{values:new an(e)},2:{binarySearchHeader:t,segments:new n.mJ(r,(e=>e.binarySearchHeader.nUnits))},4:{binarySearchHeader:t,segments:new n.mJ(a,(e=>e.binarySearchHeader.nUnits))},6:{binarySearchHeader:t,segments:new n.mJ(o,(e=>e.binarySearchHeader.nUnits))},8:{firstGlyph:n.mL,count:n.mL,values:new n.mJ(e,"count")}})};function sn(e={},t=n.mL){let r=Object.assign({newState:n.mL,flags:n.mL},e),a=new n.AU(r),o=new an(new n.mJ(n.mL,(e=>e.nClasses)));return new n.AU({nClasses:n.U7,classTable:new n.$J(n.U7,new on(t)),stateArray:new n.$J(n.U7,o),entryTable:new n.$J(n.U7,new an(a))})}let un=new n.bS("format",{0:{deltas:new n.mJ(n.Af,32)},1:{deltas:new n.mJ(n.Af,32),mappingData:new on(n.mL)},2:{standardGlyph:n.mL,controlPoints:new n.mJ(n.mL,32)},3:{standardGlyph:n.mL,controlPoints:new n.mJ(n.mL,32),mappingData:new on(n.mL)}});var ln=new n.AU({version:n.E2,format:n.mL,defaultBaseline:n.mL,subtable:un});let cn=new n.AU({setting:n.mL,nameIndex:n.Af,name:e=>e.parent.parent.parent.name.records.fontFeatures[e.nameIndex]}),fn=new n.AU({feature:n.mL,nSettings:n.mL,settingTable:new n.$J(n.U7,new n.mJ(cn,"nSettings"),{type:"parent"}),featureFlags:new n.DL(n.w_,[null,null,null,null,null,null,"hasDefault","exclusive"]),defaultSetting:n.w_,nameIndex:n.Af,name:e=>e.parent.parent.name.records.fontFeatures[e.nameIndex]});var hn=new n.AU({version:n.E2,featureNameCount:n.mL,reserved1:new n.kV(n.mL),reserved2:new n.kV(n.U7),featureNames:new n.mJ(fn,"featureNameCount")});let pn=new n.AU({axisTag:new n.Ld(4),minValue:n.E2,defaultValue:n.E2,maxValue:n.E2,flags:n.mL,nameID:n.mL,name:e=>e.parent.parent.name.records.fontFeatures[e.nameID]}),dn=new n.AU({nameID:n.mL,name:e=>e.parent.parent.name.records.fontFeatures[e.nameID],flags:n.mL,coord:new n.mJ(n.E2,(e=>e.parent.axisCount)),postscriptNameID:new n.Fi(n.mL,(e=>e.parent.instanceSize-e._currentOffset>0))});var mn=new n.AU({version:n.E2,offsetToData:n.mL,countSizePairs:n.mL,axisCount:n.mL,axisSize:n.mL,instanceCount:n.mL,instanceSize:n.mL,axis:new n.mJ(pn,"axisCount"),instance:new n.mJ(dn,"instanceCount")});let yn=new n.gb(16,"BE",14);var vn=new n.AU({version:n.mL,reserved:new n.kV(n.mL),axisCount:n.mL,globalCoordCount:n.mL,globalCoords:new n.$J(n.U7,new n.mJ(new n.mJ(yn,"axisCount"),"globalCoordCount")),glyphCount:n.mL,flags:n.mL,offsetToData:n.U7,offsets:new n.mJ(new n.$J(class{static decode(e,t){return t.flags?e.readUInt32BE():2*e.readUInt16BE()}},"void",{relativeTo:e=>e.offsetToData,allowNull:!1}),(e=>e.glyphCount+1))});let gn=new n.AU({length:n.mL,coverage:n.mL,subFeatureFlags:n.U7,stateTable:new function(e={},t=n.mL){let r=new n.AU({version:()=>8,firstGlyph:n.mL,values:new n.mJ(n.w_,n.mL)}),a=Object.assign({newStateOffset:n.mL,newState:e=>(e.newStateOffset-(e.parent.stateArray.base-e.parent._startOffset))/e.parent.nClasses,flags:n.mL},e),o=new n.AU(a),i=new an(new n.mJ(n.w_,(e=>e.nClasses)));return new n.AU({nClasses:n.mL,classTable:new n.$J(n.mL,r),stateArray:new n.$J(n.mL,i),entryTable:new n.$J(n.mL,new an(o))})}}),bn=new n.AU({justClass:n.U7,beforeGrowLimit:n.E2,beforeShrinkLimit:n.E2,afterGrowLimit:n.E2,afterShrinkLimit:n.E2,growFlags:n.mL,shrinkFlags:n.mL}),_n=new n.mJ(bn,n.U7),wn=new n.bS("actionType",{0:{lowerLimit:n.E2,upperLimit:n.E2,order:n.mL,glyphs:new n.mJ(n.mL,n.mL)},1:{addGlyph:n.mL},2:{substThreshold:n.E2,addGlyph:n.mL,substGlyph:n.mL},3:{},4:{variationAxis:n.U7,minimumLimit:n.E2,noStretchValue:n.E2,maximumLimit:n.E2},5:{flags:n.mL,glyph:n.mL}}),En=new n.AU({actionClass:n.mL,actionType:n.mL,actionLength:n.U7,actionData:wn,padding:new n.kV(n.w_,(e=>e.actionLength-e._currentOffset))}),Sn=new n.mJ(En,n.U7),Tn=new n.AU({lookupTable:new on(new n.$J(n.mL,Sn))}),kn=new n.AU({classTable:new n.$J(n.mL,gn,{type:"parent"}),wdcOffset:n.mL,postCompensationTable:new n.$J(n.mL,Tn,{type:"parent"}),widthDeltaClusters:new on(new n.$J(n.mL,_n,{type:"parent",relativeTo:e=>e.wdcOffset}))});var An=new n.AU({version:n.U7,format:n.mL,horizontal:new n.$J(n.mL,kn),vertical:new n.$J(n.mL,kn)});let Nn={action:n.mL},On={markIndex:n.mL,currentIndex:n.mL},In={currentInsertIndex:n.mL,markedInsertIndex:n.mL},Ln=new n.AU({items:new an(new n.$J(n.U7,new on))}),xn=new n.bS("type",{0:{stateTable:new sn},1:{stateTable:new sn(On),substitutionTable:new n.$J(n.U7,Ln)},2:{stateTable:new sn(Nn),ligatureActions:new n.$J(n.U7,new an(n.U7)),components:new n.$J(n.U7,new an(n.mL)),ligatureList:new n.$J(n.U7,new an(n.mL))},4:{lookupTable:new on},5:{stateTable:new sn(In),insertionActions:new n.$J(n.U7,new an(n.mL))}}),Cn=new n.AU({length:n.U7,coverage:n.Un,type:n.w_,subFeatureFlags:n.U7,table:xn,padding:new n.kV(n.w_,(e=>e.length-e._currentOffset))}),Fn=new n.AU({featureType:n.mL,featureSetting:n.mL,enableFlags:n.U7,disableFlags:n.U7}),Pn=new n.AU({defaultFlags:n.U7,chainLength:n.U7,nFeatureEntries:n.U7,nSubtables:n.U7,features:new n.mJ(Fn,"nFeatureEntries"),subtables:new n.mJ(Cn,"nSubtables")});var Rn=new n.AU({version:n.mL,unused:new n.kV(n.mL),nChains:n.U7,chains:new n.mJ(Pn,"nChains")});let Dn=new n.AU({left:n.Af,top:n.Af,right:n.Af,bottom:n.Af});var Un=new n.AU({version:n.E2,format:n.mL,lookupTable:new on(Dn)});let Mn={};var Bn=Mn;Mn.cmap=A,Mn.head=N,Mn.hhea=O,Mn.hmtx=L,Mn.maxp=x,Mn.name=H,Mn["OS/2"]=J,Mn.post=z,Mn.fpgm=q,Mn.loca=Q,Mn.prep=Z,Mn["cvt "]=$,Mn.glyf=ee,Mn["CFF "]=pt,Mn.CFF2=pt,Mn.VORG=mt,Mn.EBLC=At,Mn.CBLC=Mn.EBLC,Mn.sbix=Ot,Mn.COLR=xt,Mn.CPAL=Ft,Mn.BASE=Vt,Mn.GDEF=Xt,Mn.GPOS=dr,Mn.GSUB=_r,Mn.JSTF=Nr,Mn.HVAR=Lr,Mn.DSIG=Fr,Mn.gasp=Rr,Mn.hdmx=Ur,Mn.kern=Hr,Mn.LTSH=Vr,Mn.PCLT=Wr,Mn.VDMX=$r,Mn.vhea=qr,Mn.vmtx=Qr,Mn.avar=rn,Mn.bsln=ln,Mn.feat=hn,Mn.fvar=mn,Mn.gvar=vn,Mn.just=An,Mn.morx=Rn,Mn.opbd=Un;let jn=new n.AU({tag:new n.Ld(4),checkSum:n.U7,offset:new n.$J(n.U7,"void",{type:"global"}),length:n.U7}),Gn=new n.AU({tag:new n.Ld(4),numTables:n.mL,searchRange:n.mL,entrySelector:n.mL,rangeShift:n.mL,tables:new n.mJ(jn,"numTables")});Gn.process=function(){let e={};for(let t of this.tables)e[t.tag]=t;this.tables=e},Gn.preEncode=function(){if(!Array.isArray(this.tables)){let e=[];for(let t in this.tables){let r=this.tables[t];r&&e.push({tag:t,checkSum:0,offset:new n.ox(Bn[t],r),length:Bn[t].size(r)})}this.tables=e}this.tag="true",this.numTables=this.tables.length;let e=Math.floor(Math.log(this.numTables)/Math.LN2),t=Math.pow(2,e);this.searchRange=16*t,this.entrySelector=Math.log(t)/Math.LN2,this.rangeShift=16*this.numTables-this.searchRange};var Kn=Gn;function Hn(e,t){let r=0,n=e.length-1;for(;r<=n;){let a=r+n>>1,o=t(e[a]);if(o<0)n=a-1;else{if(!(o>0))return a;r=a+1}}return-1}function Vn(e,t){let r=[];for(;e<t;)r.push(e++);return r}const Wn=new TextDecoder("ascii"),Yn=new Uint8Array(256);for(let e=0;e<64;e++)Yn["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(e)]=e;class Jn{findSubtable(e,t){for(let[r,n]of t)for(let t of e.tables)if(t.platformID===r&&t.encodingID===n)return t.table;return null}lookup(e,t){if(this.encoding)e=this.encoding.get(e)||e;else if(t){let r=this.getVariationSelector(e,t);if(r)return r}let r=this.cmap;switch(r.version){case 0:return r.codeMap.get(e)||0;case 4:{let t=0,n=r.segCount-1;for(;t<=n;){let a=t+n>>1;if(e<r.startCode.get(a))n=a-1;else{if(!(e>r.endCode.get(a))){let t,n=r.idRangeOffset.get(a);if(0===n)t=e+r.idDelta.get(a);else{let o=n/2+(e-r.startCode.get(a))-(r.segCount-a);t=r.glyphIndexArray.get(o)||0,0!==t&&(t+=r.idDelta.get(a))}return 65535&t}t=a+1}}return 0}case 8:throw new Error("TODO: cmap format 8");case 6:case 10:return r.glyphIndices.get(e-r.firstCode)||0;case 12:case 13:{let t=0,n=r.nGroups-1;for(;t<=n;){let a=t+n>>1,o=r.groups.get(a);if(e<o.startCharCode)n=a-1;else{if(!(e>o.endCharCode))return 12===r.version?o.glyphID+(e-o.startCharCode):o.glyphID;t=a+1}}return 0}case 14:throw new Error("TODO: cmap format 14");default:throw new Error(`Unknown cmap format ${r.version}`)}}getVariationSelector(e,t){if(!this.uvs)return 0;let r=this.uvs.varSelectors.toArray(),n=Hn(r,(e=>t-e.varSelector)),a=r[n];return-1!==n&&a.defaultUVS&&(n=Hn(a.defaultUVS,(t=>e<t.startUnicodeValue?-1:e>t.startUnicodeValue+t.additionalCount?1:0))),-1!==n&&a.nonDefaultUVS&&(n=Hn(a.nonDefaultUVS,(t=>e-t.unicodeValue)),-1!==n)?a.nonDefaultUVS[n].glyphID:0}getCharacterSet(){let e=this.cmap;switch(e.version){case 0:return Vn(0,e.codeMap.length);case 4:{let t=[],r=e.endCode.toArray();for(let n=0;n<r.length;n++){let a=r[n]+1,o=e.startCode.get(n);t.push(...Vn(o,a))}return t}case 8:throw new Error("TODO: cmap format 8");case 6:case 10:return Vn(e.firstCode,e.firstCode+e.glyphIndices.length);case 12:case 13:{let t=[];for(let r of e.groups.toArray())t.push(...Vn(r.startCharCode,r.endCharCode+1));return t}case 14:throw new Error("TODO: cmap format 14");default:throw new Error(`Unknown cmap format ${e.version}`)}}codePointsForGlyph(e){let t=this.cmap;switch(t.version){case 0:{let r=[];for(let n=0;n<256;n++)t.codeMap.get(n)===e&&r.push(n);return r}case 4:{let n=[];for(let a=0;a<t.segCount;a++){let o=t.endCode.get(a),i=t.startCode.get(a),s=t.idRangeOffset.get(a),u=t.idDelta.get(a);for(var r=i;r<=o;r++){let o=0;if(0===s)o=r+u;else{let e=s/2+(r-i)-(t.segCount-a);o=t.glyphIndexArray.get(e)||0,0!==o&&(o+=u)}o===e&&n.push(r)}}return n}case 12:{let r=[];for(let n of t.groups.toArray())e>=n.glyphID&&e<=n.glyphID+(n.endCharCode-n.startCharCode)&&r.push(n.startCharCode+(e-n.glyphID));return r}case 13:{let r=[];for(let n of t.groups.toArray())e===n.glyphID&&r.push(...Vn(n.startCharCode,n.endCharCode+1));return r}default:throw new Error(`Unknown cmap format ${t.version}`)}}constructor(e){if(this.encoding=null,this.cmap=this.findSubtable(e,[[3,10],[0,6],[0,4],[3,1],[0,3],[0,2],[0,1],[0,0]]),!this.cmap)for(let t of e.tables){let e=D(C(t.platformID,t.encodingID,t.table.language-1));e&&(this.cmap=t.table,this.encoding=e)}if(!this.cmap)throw new Error("Could not find a supported cmap table");this.uvs=this.findSubtable(e,[[0,5]]),this.uvs&&14!==this.uvs.version&&(this.uvs=null)}}(0,o.__decorate)([y],Jn.prototype,"getCharacterSet",null),(0,o.__decorate)([y],Jn.prototype,"codePointsForGlyph",null);class zn{normalizeCoords(e){let t=[];for(var r=0;r<this.font.fvar.axis.length;r++){let n=this.font.fvar.axis[r];e[r]<n.defaultValue?t.push((e[r]-n.defaultValue+Number.EPSILON)/(n.defaultValue-n.minValue+Number.EPSILON)):t.push((e[r]-n.defaultValue+Number.EPSILON)/(n.maxValue-n.defaultValue+Number.EPSILON))}if(this.font.avar)for(r=0;r<this.font.avar.segment.length;r++){let e=this.font.avar.segment[r];for(let n=0;n<e.correspondence.length;n++){let a=e.correspondence[n];if(n>=1&&t[r]<a.fromCoord){let o=e.correspondence[n-1];t[r]=((t[r]-o.fromCoord)*(a.toCoord-o.toCoord)+Number.EPSILON)/(a.fromCoord-o.fromCoord+Number.EPSILON)+o.toCoord;break}}}return t}transformPoints(e,t){if(!this.font.fvar||!this.font.gvar)return;let{gvar:r}=this.font;if(e>=r.glyphCount)return;let n=r.offsets[e];if(n===r.offsets[e+1])return;let{stream:a}=this.font;if(a.pos=n,a.pos>=a.length)return;let o=a.readUInt16BE(),i=n+a.readUInt16BE();if(32768&o){var s=a.pos;a.pos=i;var u=this.decodePoints();i=a.pos,a.pos=s}let l=t.map((e=>e.copy()));o&=4095;for(let e=0;e<o;e++){let e=a.readUInt16BE(),n=a.readUInt16BE();if(32768&n){var c=[];for(let e=0;e<r.axisCount;e++)c.push(a.readInt16BE()/16384)}else{if((4095&n)>=r.globalCoordCount)throw new Error("Invalid gvar table");c=r.globalCoords[4095&n]}if(16384&n){var f=[];for(let e=0;e<r.axisCount;e++)f.push(a.readInt16BE()/16384);var h=[];for(let e=0;e<r.axisCount;e++)h.push(a.readInt16BE()/16384)}let o=this.tupleFactor(n,c,f,h);if(0===o){i+=e;continue}if(s=a.pos,a.pos=i,8192&n)var p=this.decodePoints();else p=u;let m=0===p.length?t.length:p.length,y=this.decodeDeltas(m),v=this.decodeDeltas(m);if(0===p.length)for(let e=0;e<t.length;e++){var d=t[e];d.x+=Math.round(y[e]*o),d.y+=Math.round(v[e]*o)}else{let e=l.map((e=>e.copy())),r=t.map((()=>!1));for(let n=0;n<p.length;n++){let a=p[n];if(a<t.length){let t=e[a];r[a]=!0,t.x+=Math.round(y[n]*o),t.y+=Math.round(v[n]*o)}}this.interpolateMissingDeltas(e,l,r);for(let r=0;r<t.length;r++){let n=e[r].x-l[r].x,a=e[r].y-l[r].y;t[r].x+=n,t[r].y+=a}}i+=e,a.pos=s}}decodePoints(){let e=this.font.stream,t=e.readUInt8();128&t&&(t=(127&t)<<8|e.readUInt8());let r=new Uint16Array(t),n=0,a=0;for(;n<t;){let o=e.readUInt8(),i=1+(127&o),s=128&o?e.readUInt16:e.readUInt8;for(let o=0;o<i&&n<t;o++)a+=s.call(e),r[n++]=a}return r}decodeDeltas(e){let t=this.font.stream,r=0,n=new Int16Array(e);for(;r<e;){let a=t.readUInt8(),o=1+(63&a);if(128&a)r+=o;else{let i=64&a?t.readInt16BE:t.readInt8;for(let a=0;a<o&&r<e;a++)n[r++]=i.call(t)}}return n}tupleFactor(e,t,r,n){let a=this.normalizedCoords,{gvar:o}=this.font,i=1;for(let s=0;s<o.axisCount;s++)if(0!==t[s]){if(0===a[s])return 0;if(0==(16384&e)){if(a[s]<Math.min(0,t[s])||a[s]>Math.max(0,t[s]))return 0;i=(i*a[s]+Number.EPSILON)/(t[s]+Number.EPSILON)}else{if(a[s]<r[s]||a[s]>n[s])return 0;i=a[s]<t[s]?i*(a[s]-r[s]+Number.EPSILON)/(t[s]-r[s]+Number.EPSILON):i*(n[s]-a[s]+Number.EPSILON)/(n[s]-t[s]+Number.EPSILON)}}return i}interpolateMissingDeltas(e,t,r){if(0===e.length)return;let n=0;for(;n<e.length;){let a=n,o=n,i=e[o];for(;!i.endContour;)i=e[++o];for(;n<=o&&!r[n];)n++;if(n>o)continue;let s=n,u=n;for(n++;n<=o;)r[n]&&(this.deltaInterpolate(u+1,n-1,u,n,t,e),u=n),n++;u===s?this.deltaShift(a,o,u,t,e):(this.deltaInterpolate(u+1,o,u,s,t,e),s>0&&this.deltaInterpolate(a,s-1,u,s,t,e)),n=o+1}}deltaInterpolate(e,t,r,n,a,o){if(e>t)return;let i=["x","y"];for(let u=0;u<i.length;u++){let l=i[u];if(a[r][l]>a[n][l]){var s=r;r=n,n=s}let c=a[r][l],f=a[n][l],h=o[r][l],p=o[n][l];if(c!==f||h===p){let r=c===f?0:(p-h)/(f-c);for(let n=e;n<=t;n++){let e=a[n][l];e<=c?e+=h-c:e>=f?e+=p-f:e=h+(e-c)*r,o[n][l]=e}}}}deltaShift(e,t,r,n,a){let o=a[r].x-n[r].x,i=a[r].y-n[r].y;if(0!==o||0!==i)for(let n=e;n<=t;n++)n!==r&&(a[n].x+=o,a[n].y+=i)}getAdvanceAdjustment(e,t){let r,n;if(t.advanceWidthMapping){let a=e;a>=t.advanceWidthMapping.mapCount&&(a=t.advanceWidthMapping.mapCount-1),t.advanceWidthMapping.entryFormat,({outerIndex:r,innerIndex:n}=t.advanceWidthMapping.mapData[a])}else r=0,n=e;return this.getDelta(t.itemVariationStore,r,n)}getDelta(e,t,r){if(t>=e.itemVariationData.length)return 0;let n=e.itemVariationData[t];if(r>=n.deltaSets.length)return 0;let a=n.deltaSets[r],o=this.getBlendVector(e,t),i=0;for(let e=0;e<n.regionIndexCount;e++)i+=a.deltas[e]*o[e];return i}getBlendVector(e,t){let r=e.itemVariationData[t];if(this.blendVectors.has(r))return this.blendVectors.get(r);let n=this.normalizedCoords,a=[];for(let t=0;t<r.regionIndexCount;t++){let o=1,i=r.regionIndexes[t],s=e.variationRegionList.variationRegions[i];for(let e=0;e<s.length;e++){let t,r=s[e];t=r.startCoord>r.peakCoord||r.peakCoord>r.endCoord||r.startCoord<0&&r.endCoord>0&&0!==r.peakCoord||0===r.peakCoord?1:n[e]<r.startCoord||n[e]>r.endCoord?0:n[e]===r.peakCoord?1:n[e]<r.peakCoord?(n[e]-r.startCoord+Number.EPSILON)/(r.peakCoord-r.startCoord+Number.EPSILON):(r.endCoord-n[e]+Number.EPSILON)/(r.endCoord-r.peakCoord+Number.EPSILON),o*=t}a[t]=o}return this.blendVectors.set(r,a),a}constructor(e,t){this.font=e,this.normalizedCoords=this.normalizeCoords(t),this.blendVectors=new Map}}class $n{static probe(e){let t=Wn.decode(e.slice(0,4));return"true"===t||"OTTO"===t||t===String.fromCharCode(0,1,0,0)}setDefaultLanguage(e=null){this.defaultLanguage=e}_getTable(e){if(!(e.tag in this._tables))try{this._tables[e.tag]=this._decodeTable(e)}catch(t){c&&(console.error(`Error decoding table ${e.tag}`),console.error(t.stack))}return this._tables[e.tag]}_getTableStream(e){let t=this.directory.tables[e];return t?(this.stream.pos=t.offset,this.stream):null}_decodeDirectory(){return this.directory=Kn.decode(this.stream,{_startOffset:0})}_decodeTable(e){let t=this.stream.pos,r=this._getTableStream(e.tag),n=Bn[e.tag].decode(r,this,e.length);return this.stream.pos=t,n}getName(e,t=this.defaultLanguage||d){let r=this.name&&this.name.records[e];return r&&(r[t]||r[this.defaultLanguage]||r[d]||r.en||r[Object.keys(r)[0]])||null}get postscriptName(){return this.getName("postscriptName")}get fullName(){return this.getName("fullName")}get familyName(){return this.getName("fontFamily")}get subfamilyName(){return this.getName("fontSubfamily")}get copyright(){return this.getName("copyright")}get version(){return this.getName("version")}get ascent(){return this.hhea.ascent}get descent(){return this.hhea.descent}get lineGap(){return this.hhea.lineGap}get underlinePosition(){return this.post.underlinePosition}get underlineThickness(){return this.post.underlineThickness}get italicAngle(){return this.post.italicAngle}get capHeight(){let e=this["OS/2"];return e?e.capHeight:this.ascent}get xHeight(){let e=this["OS/2"];return e?e.xHeight:0}get numGlyphs(){return this.maxp.numGlyphs}get unitsPerEm(){return this.head.unitsPerEm}get bbox(){return Object.freeze(new BBox(this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax))}get _cmapProcessor(){return new Jn(this.cmap)}get characterSet(){return this._cmapProcessor.getCharacterSet()}hasGlyphForCodePoint(e){return!!this._cmapProcessor.lookup(e)}glyphForCodePoint(e){return this.getGlyph(this._cmapProcessor.lookup(e),[e])}glyphsForString(e){let t=[],r=e.length,n=0,a=-1,o=-1;for(;n<=r;){let i=0,s=0;if(n<r){if(i=e.charCodeAt(n++),55296<=i&&i<=56319&&n<r){let t=e.charCodeAt(n);56320<=t&&t<=57343&&(n++,i=((1023&i)<<10)+(1023&t)+65536)}s=65024<=i&&i<=65039||917760<=i&&i<=917999?1:0}else n++;0===o&&1===s?t.push(this.getGlyph(this._cmapProcessor.lookup(a,i),[a,i])):0===o&&0===s&&t.push(this.glyphForCodePoint(a)),a=i,o=s}return t}get availableFeatures(){return this._layoutEngine.getAvailableFeatures()}getAvailableFeatures(e,t){return this._layoutEngine.getAvailableFeatures(e,t)}get variationAxes(){let e={};if(!this.fvar)return e;for(let t of this.fvar.axis)e[t.axisTag.trim()]={name:t.name.en,min:t.minValue,default:t.defaultValue,max:t.maxValue};return e}get namedVariations(){let e={};if(!this.fvar)return e;for(let t of this.fvar.instance){let r={};for(let e=0;e<this.fvar.axis.length;e++)r[this.fvar.axis[e].axisTag.trim()]=t.coord[e];e[t.name.en]=r}return e}getVariation(e){if(!this.directory.tables.fvar||!(this.directory.tables.gvar&&this.directory.tables.glyf||this.directory.tables.CFF2))throw new Error("Variations require a font with the fvar, gvar and glyf, or CFF2 tables.");if("string"==typeof e&&(e=this.namedVariations[e]),"object"!=typeof e)throw new Error("Variation settings must be either a variation name or settings object.");let t=this.fvar.axis.map(((t,r)=>{let n=t.axisTag.trim();return n in e?Math.max(t.minValue,Math.min(t.maxValue,e[n])):t.defaultValue})),r=new n.fT(this.stream.buffer);r.pos=this._directoryPos;let a=new $n(r,t);return a._tables=this._tables,a}get _variationProcessor(){if(!this.fvar)return null;let e=this.variationCoords;return e||this.CFF2?(e||(e=this.fvar.axis.map((e=>e.defaultValue))),new zn(this,e)):null}getFont(e){return this.getVariation(e)}constructor(e,t=null){(0,a._)(this,"type","TTF"),this.defaultLanguage=null,this.stream=e,this.variationCoords=t,this._directoryPos=this.stream.pos,this._tables={},this._glyphs={},this._decodeDirectory();for(let e in this.directory.tables){let t=this.directory.tables[e];Bn[e]&&t.length>0&&Object.defineProperty(this,e,{get:this._getTable.bind(this,t)})}}}(0,o.__decorate)([y],$n.prototype,"bbox",null),(0,o.__decorate)([y],$n.prototype,"_cmapProcessor",null),(0,o.__decorate)([y],$n.prototype,"characterSet",null),(0,o.__decorate)([y],$n.prototype,"variationAxes",null),(0,o.__decorate)([y],$n.prototype,"namedVariations",null),(0,o.__decorate)([y],$n.prototype,"_variationProcessor",null);let qn=new n.AU({tag:new n.Ld(4),offset:new n.$J(n.U7,"void",{type:"global"}),compLength:n.U7,length:n.U7,origChecksum:n.U7}),Xn=new n.AU({tag:new n.Ld(4),flavor:n.U7,length:n.U7,numTables:n.mL,reserved:new n.kV(n.mL),totalSfntSize:n.U7,majorVersion:n.mL,minorVersion:n.mL,metaOffset:n.U7,metaLength:n.U7,metaOrigLength:n.U7,privOffset:n.U7,privLength:n.U7,tables:new n.mJ(qn,"numTables")});Xn.process=function(){let e={};for(let t of this.tables)e[t.tag]=t;this.tables=e};var Qn=Xn;let Zn=new n.bS(n.U7,{65536:{numFonts:n.U7,offsets:new n.mJ(n.U7,"numFonts")},131072:{numFonts:n.U7,offsets:new n.mJ(n.U7,"numFonts"),dsigTag:n.U7,dsigLength:n.U7,dsigOffset:n.U7}});h($n),h(class extends $n{static probe(e){return"wOFF"===Wn.decode(e.slice(0,4))}_decodeDirectory(){this.directory=Qn.decode(this.stream,{_startOffset:0})}_getTableStream(e){let t=this.directory.tables[e];if(t){if(this.stream.pos=t.offset,t.compLength<t.length){this.stream.pos+=2;let e=new Uint8Array(t.length),r=s(this.stream.readBuffer(t.compLength-2),e);return new n.fT(r)}return this.stream}return null}constructor(...e){super(...e),(0,a._)(this,"type","WOFF")}}),h(class{static probe(e){return"ttcf"===Wn.decode(e.slice(0,4))}getFont(e){for(let t of this.header.offsets){let r=new n.fT(this.stream.buffer);r.pos=t;let a=new $n(r);if(a.postscriptName===e||a.postscriptName instanceof Uint8Array&&e instanceof Uint8Array&&a.postscriptName.every(((t,r)=>e[r]===t)))return a}return null}get fonts(){let e=[];for(let t of this.header.offsets){let r=new n.fT(this.stream.buffer);r.pos=t,e.push(new $n(r))}return e}constructor(e){if((0,a._)(this,"type","TTC"),this.stream=e,"ttcf"!==e.readString(4))throw new Error("Not a TrueType collection");this.header=Zn.decode(e)}})},818282:(e,t,r)=>{"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,{_:()=>n})},674804:(e,t,r)=>{"use strict";r.d(t,{$J:()=>m.g,AU:()=>f.A,Af:()=>d.Af,DL:()=>i.D,E2:()=>d.E2,Fi:()=>u.F,LB:()=>d.LB,Ld:()=>c.L,Mr:()=>d.Mr,U7:()=>d.U7,Un:()=>d.Un,bS:()=>h.b,c5:()=>p.c,cS:()=>d.cS,dB:()=>p.d,fT:()=>n.f,gb:()=>d.gb,gl:()=>d.gl,kV:()=>l.k,lW:()=>s.l,mJ:()=>a.m,mL:()=>d.mL,ox:()=>m.o,pW:()=>o.p,w_:()=>d.w_}),r(211422);var n=r(271901),a=r(62370),o=r(184910),i=r(638276),s=(r(65995),r(514187)),u=(r(616168),r(29390)),l=r(486317),c=r(830914),f=r(307209),h=r(29362),p=r(340603),d=r(602537),m=r(138386)},62370:(e,t,r)=>{"use strict";r.d(t,{m:()=>h});var n=r(740528),a=r(602537),o=r(340603);function i(e){return i="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},i(e)}function s(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return u(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)?u(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function u(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 l(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,(void 0,a=function(e,t){if("object"!==i(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===i(a)?a:String(a)),n)}var a}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}var h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(p,e);var t,r,n,u,h=(n=p,u=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,t=f(n);if(u){var r=f(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function p(e,t){var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"count";return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p),(r=h.call(this)).type=e,r.length=t,r.lengthType=n,r}return t=p,r=[{key:"decode",value:function(e,t){var r,n=e.pos,i=[],s=t;if(null!=this.length&&(r=o.d(this.length,e,t)),this.length instanceof a.Mr&&(Object.defineProperties(i,{parent:{value:t},_startOffset:{value:n},_currentOffset:{value:0,writable:!0},_length:{value:r}}),s=i),null==r||"bytes"===this.lengthType)for(var u=null!=r?e.pos+r:(null!=t?t._length:void 0)?t._startOffset+t._length:e.length;e.pos<u;)i.push(this.type.decode(e,s));else for(var l=0,c=r;l<c;l++)i.push(this.type.decode(e,s));return i}},{key:"size",value:function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e)return this.type.size(null,t)*o.d(this.length,null,t);var n=0;this.length instanceof a.Mr&&(n+=this.length.size(),t={parent:t,pointerSize:0});var i,u=s(e);try{for(u.s();!(i=u.n()).done;){var l=i.value;n+=this.type.size(l,t)}}catch(e){u.e(e)}finally{u.f()}return t&&r&&this.length instanceof a.Mr&&(n+=t.pointerSize),n}},{key:"encode",value:function(e,t,r){var n=r;this.length instanceof a.Mr&&((n={pointers:[],startOffset:e.pos,parent:r}).pointerOffset=e.pos+this.size(t,n,!1),this.length.encode(e,t.length));var o,i=s(t);try{for(i.s();!(o=i.n()).done;){var u=o.value;this.type.encode(e,u,n)}}catch(e){i.e(e)}finally{i.f()}if(this.length instanceof a.Mr)for(var l=0;l<n.pointers.length;){var c=n.pointers[l++];c.type.encode(e,c.val,c.parent)}}}],r&&l(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),p}(n.X)},740528:(e,t,r)=>{"use strict";r.d(t,{X:()=>s});var n=r(271901),a=r(211422);function o(e){return o="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},o(e)}function i(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,(void 0,a=function(e,t){if("object"!==o(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===o(a)?a:String(a)),n)}var a}var s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r;return t=e,(r=[{key:"fromBuffer",value:function(e){var t=new n.f(e);return this.decode(t)}},{key:"toBuffer",value:function(e){var t=this.size(e),r=new Uint8Array(t),n=new a.y(r);return this.encode(n,e),r}}])&&i(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}()},638276:(e,t,r)=>{"use strict";function n(e){return n="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},n(e)}function a(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,(void 0,o=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,"string");if("object"!==n(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(a.key),"symbol"===n(o)?o:String(o)),a)}var o}function o(e,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},o(e,t)}function i(e){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},i(e)}r.d(t,{D:()=>s});var s=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&o(e,t)}(c,e);var t,r,s,u,l=(s=c,u=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,t=i(s);if(u){var r=i(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function c(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(t=l.call(this)).type=e,t.flags=r,t}return t=c,(r=[{key:"decode",value:function(e){for(var t=this.type.decode(e),r={},n=0;n<this.flags.length;n++){var a=this.flags[n];null!=a&&(r[a]=!!(t&1<<n))}return r}},{key:"size",value:function(){return this.type.size()}},{key:"encode",value:function(e,t){for(var r=0,n=0;n<this.flags.length;n++){var a=this.flags[n];null!=a&&t[a]&&(r|=1<<n)}return this.type.encode(e,r)}}])&&a(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(r(740528).X)},65995:(e,t,r)=>{"use strict";r(740528)},514187:(e,t,r)=>{"use strict";r.d(t,{l:()=>c});var n=r(740528),a=r(602537),o=r(340603);function i(e){return i="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},i(e)}function s(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,(void 0,a=function(e,t){if("object"!==i(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===i(a)?a:String(a)),n)}var a}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}var c=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(h,e);var t,r,n,c,f=(n=h,c=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,t=l(n);if(c){var r=l(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function h(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,h),(t=f.call(this)).length=e,t}return t=h,(r=[{key:"decode",value:function(e,t){var r=o.d(this.length,e,t);return e.readBuffer(r)}},{key:"size",value:function(e,t){if(!e)return o.d(this.length,null,t);var r=e.length;return this.length instanceof a.Mr&&(r+=this.length.size()),r}},{key:"encode",value:function(e,t,r){return this.length instanceof a.Mr&&this.length.encode(e,t.length),e.writeBuffer(t)}}])&&s(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),h}(n.X)},271901:(e,t,r)=>{"use strict";function n(e){return n="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},n(e)}function a(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 o(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,(void 0,o=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,"string");if("object"!==n(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(a.key),"symbol"===n(o)?o:String(o)),a)}var o}r.d(t,{f:()=>s});var i={utf16le:"utf-16le",ucs2:"utf-16le",utf16be:"utf-16be"},s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.buffer=t,this.view=new DataView(t.buffer,t.byteOffset,t.byteLength),this.pos=0,this.length=this.buffer.length}var t,r;return t=e,r=[{key:"readString",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ascii";t=i[t]||t;var r=this.readBuffer(e);try{return new TextDecoder(t).decode(r)}catch(e){return r}}},{key:"readBuffer",value:function(e){return this.buffer.slice(this.pos,this.pos+=e)}},{key:"readUInt24BE",value:function(){return(this.readUInt16BE()<<8)+this.readUInt8()}},{key:"readUInt24LE",value:function(){return this.readUInt16LE()+(this.readUInt8()<<16)}},{key:"readInt24BE",value:function(){return(this.readInt16BE()<<8)+this.readUInt8()}},{key:"readInt24LE",value:function(){return this.readUInt16LE()+(this.readInt8()<<16)}}],r&&o(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();s.TYPES={UInt8:1,UInt16:2,UInt24:3,UInt32:4,Int8:1,Int16:2,Int24:3,Int32:4,Float:4,Double:8};var u,l=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return a(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)?a(e,t):void 0}}(e))){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){u=!0,i=e},f:function(){try{s||null==r.return||r.return()}finally{if(u)throw i}}}}(Object.getOwnPropertyNames(DataView.prototype));try{var c=function(){var e=u.value;if("get"===e.slice(0,3)){var t=e.slice(3).replace("Ui","UI");"Float32"===t?t="Float":"Float64"===t&&(t="Double");var r=s.TYPES[t];s.prototype["read"+t+(1===r?"":"BE")]=function(){var t=this.view[e](this.pos,!1);return this.pos+=r,t},1!==r&&(s.prototype["read"+t+"LE"]=function(){var t=this.view[e](this.pos,!0);return this.pos+=r,t})}};for(l.s();!(u=l.n()).done;)c()}catch(e){l.e(e)}finally{l.f()}},211422:(e,t,r)=>{"use strict";r.d(t,{y:()=>l});var n=r(271901);function a(e){return a="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},a(e)}function o(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 i(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,(void 0,o=function(e,t){if("object"!==a(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===a(o)?o:String(o)),n)}var o}var s=new TextEncoder,u=18==new Uint8Array(new Uint16Array([4660]).buffer)[0],l=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.buffer=t,this.view=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),this.pos=0}var t,r;return t=e,r=[{key:"writeBuffer",value:function(e){this.buffer.set(e,this.pos),this.pos+=e.length}},{key:"writeString",value:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ascii";switch(r){case"utf16le":case"utf16-le":case"ucs2":t=c(e,u);break;case"utf16be":case"utf16-be":t=c(e,!u);break;case"utf8":t=s.encode(e);break;case"ascii":t=function(e){for(var t=new Uint8Array(e.length),r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t}(e);break;default:throw new Error("Unsupported encoding: ".concat(r))}this.writeBuffer(t)}},{key:"writeUInt24BE",value:function(e){this.buffer[this.pos++]=e>>>16&255,this.buffer[this.pos++]=e>>>8&255,this.buffer[this.pos++]=255&e}},{key:"writeUInt24LE",value:function(e){this.buffer[this.pos++]=255&e,this.buffer[this.pos++]=e>>>8&255,this.buffer[this.pos++]=e>>>16&255}},{key:"writeInt24BE",value:function(e){e>=0?this.writeUInt24BE(e):this.writeUInt24BE(e+16777215+1)}},{key:"writeInt24LE",value:function(e){e>=0?this.writeUInt24LE(e):this.writeUInt24LE(e+16777215+1)}},{key:"fill",value:function(e,t){if(t<this.buffer.length)this.buffer.fill(e,this.pos,this.pos+t),this.pos+=t;else{var r=new Uint8Array(t);r.fill(e),this.writeBuffer(r)}}}],r&&i(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function c(e,t){for(var r=new Uint16Array(e.length),n=0;n<e.length;n++){var a=e.charCodeAt(n);t&&(a=a>>8|(255&a)<<8),r[n]=a}return new Uint8Array(r.buffer)}var f,h=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return o(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)?o(e,t):void 0}}(e))){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){u=!0,i=e},f:function(){try{s||null==r.return||r.return()}finally{if(u)throw i}}}}(Object.getOwnPropertyNames(DataView.prototype));try{var p=function(){var e=f.value;if("set"===e.slice(0,3)){var t=e.slice(3).replace("Ui","UI");"Float32"===t?t="Float":"Float64"===t&&(t="Double");var r=n.f.TYPES[t];l.prototype["write"+t+(1===r?"":"BE")]=function(t){this.view[e](this.pos,t,!1),this.pos+=r},1!==r&&(l.prototype["write"+t+"LE"]=function(t){this.view[e](this.pos,t,!0),this.pos+=r})}};for(h.s();!(f=h.n()).done;)p()}catch(e){h.e(e)}finally{h.f()}},616168:(e,t,r)=>{"use strict";r(740528)},184910:(e,t,r)=>{"use strict";r.d(t,{p:()=>p});var n=r(62370),a=r(602537),o=r(340603);function i(e){return i="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},i(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(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,(void 0,a=function(e,t){if("object"!==i(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===i(a)?a:String(a)),n)}var a}function l(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(){return c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=h(e)););return e}(e,t);if(n){var a=Object.getOwnPropertyDescriptor(n,t);return a.get?a.get.call(arguments.length<3?e:r):a.value}},c.apply(this,arguments)}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(u,e);var t,r,n=(t=u,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=h(t);if(r){var a=h(this).constructor;e=Reflect.construct(n,arguments,a)}else e=n.apply(this,arguments);return function(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function u(){return s(this,u),n.apply(this,arguments)}return l(u,[{key:"decode",value:function(e,t){var r=e.pos,n=o.d(this.length,e,t);this.length instanceof a.Mr&&(t={parent:t,_startOffset:r,_currentOffset:0,_length:n});var i=new d(this.type,n,e,t);return e.pos+=n*this.type.size(null,t),i}},{key:"size",value:function(e,t){return e instanceof d&&(e=e.toArray()),c(h(u.prototype),"size",this).call(this,e,t)}},{key:"encode",value:function(e,t,r){return t instanceof d&&(t=t.toArray()),c(h(u.prototype),"encode",this).call(this,e,t,r)}}]),u}(n.m),d=function(){function e(t,r,n,a){s(this,e),this.type=t,this.length=r,this.stream=n,this.ctx=a,this.base=this.stream.pos,this.items=[]}return l(e,[{key:"get",value:function(e){if(!(e<0||e>=this.length)){if(null==this.items[e]){var t=this.stream.pos;this.stream.pos=this.base+this.type.size(null,this.ctx)*e,this.items[e]=this.type.decode(this.stream,this.ctx),this.stream.pos=t}return this.items[e]}}},{key:"toArray",value:function(){for(var e=[],t=0,r=this.length;t<r;t++)e.push(this.get(t));return e}}]),e}()},602537:(e,t,r)=>{"use strict";r.d(t,{Af:()=>b,E2:()=>S,LB:()=>_,Mr:()=>p,U7:()=>v,Un:()=>y,cS:()=>g,gb:()=>w,gl:()=>E,mL:()=>m,w_:()=>d});var n=r(271901);function a(e){return a="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},a(e)}function o(){return o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=h(e)););return e}(e,t);if(n){var a=Object.getOwnPropertyDescriptor(n,t);return a.get?a.get.call(arguments.length<3?e:r):a.value}},o.apply(this,arguments)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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,(void 0,o=function(e,t){if("object"!==a(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===a(o)?o:String(o)),n)}var o}function u(e,t,r){return t&&s(e.prototype,t),r&&s(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(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&&c(e,t)}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}function f(e){var t=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}}();return function(){var r,n=h(e);if(t){var o=h(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}var p=function(e){l(r,e);var t=f(r);function r(e){var n,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"BE";return i(this,r),(n=t.call(this)).type=e,n.endian=a,n.fn=n.type,"8"!==n.type[n.type.length-1]&&(n.fn+=n.endian),n}return u(r,[{key:"size",value:function(){return n.f.TYPES[this.type]}},{key:"decode",value:function(e){return e["read".concat(this.fn)]()}},{key:"encode",value:function(e,t){return e["write".concat(this.fn)](t)}}]),r}(r(740528).X),d=new p("UInt8"),m=new p("UInt16","BE"),y=(new p("UInt16","LE"),new p("UInt24","BE")),v=(new p("UInt24","LE"),new p("UInt32","BE")),g=(new p("UInt32","LE"),new p("Int8")),b=new p("Int16","BE"),_=(new p("Int16","LE"),new p("Int24","BE"),new p("Int24","LE"),new p("Int32","BE")),w=(new p("Int32","LE"),new p("Float","BE"),new p("Float","LE"),new p("Double","BE"),new p("Double","LE"),function(e){l(r,e);var t=f(r);function r(e,n){var a,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e>>1;return i(this,r),(a=t.call(this,"Int".concat(e),n))._point=1<<o,a}return u(r,[{key:"decode",value:function(e){return o(h(r.prototype),"decode",this).call(this,e)/this._point}},{key:"encode",value:function(e,t){return o(h(r.prototype),"encode",this).call(this,e,t*this._point|0)}}]),r}(p)),E=new w(16,"BE"),S=(new w(16,"LE"),new w(32,"BE"));new w(32,"LE")},29390:(e,t,r)=>{"use strict";function n(e){return n="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},n(e)}function a(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,(void 0,o=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,"string");if("object"!==n(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(a.key),"symbol"===n(o)?o:String(o)),a)}var o}function o(e,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},o(e,t)}function i(e){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},i(e)}r.d(t,{F:()=>s});var s=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&o(e,t)}(c,e);var t,r,s,u,l=(s=c,u=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,t=i(s);if(u){var r=i(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function c(e){var t,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(t=l.call(this)).type=e,t.condition=r,t}return t=c,(r=[{key:"decode",value:function(e,t){var r=this.condition;if("function"==typeof r&&(r=r.call(t,t)),r)return this.type.decode(e,t)}},{key:"size",value:function(e,t){var r=this.condition;return"function"==typeof r&&(r=r.call(t,t)),r?this.type.size(e,t):0}},{key:"encode",value:function(e,t,r){var n=this.condition;if("function"==typeof n&&(n=n.call(r,r)),n)return this.type.encode(e,t,r)}}])&&a(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(r(740528).X)},138386:(e,t,r)=>{"use strict";r.d(t,{g:()=>c,o:()=>f});var n=r(340603);function a(e){return a="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},a(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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,(void 0,o=function(e,t){if("object"!==a(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===a(o)?o:String(o)),n)}var o}function s(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}var c=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(c,e);var t,r,i=(t=c,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=l(t);if(r){var o=l(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return function(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function c(e,t){var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(o(this,c),(r=i.call(this)).offsetType=e,r.type=t,r.options=n,"void"===r.type&&(r.type=null),null==r.options.type&&(r.options.type="local"),null==r.options.allowNull&&(r.options.allowNull=!0),null==r.options.nullValue&&(r.options.nullValue=0),null==r.options.lazy&&(r.options.lazy=!1),r.options.relativeTo){if("function"!=typeof r.options.relativeTo)throw new Error("relativeTo option must be a function");r.relativeToGetter=n.relativeTo}return r}return s(c,[{key:"decode",value:function(e,t){var r,a=this,o=this.offsetType.decode(e,t);if(o===this.options.nullValue&&this.options.allowNull)return null;switch(this.options.type){case"local":r=t._startOffset;break;case"immediate":r=e.pos-this.offsetType.size();break;case"parent":r=t.parent._startOffset;break;default:for(var i=t;i.parent;)i=i.parent;r=i._startOffset||0}this.options.relativeTo&&(r+=this.relativeToGetter(t));var s=o+r;if(null!=this.type){var u=null,l=function(){if(null!=u)return u;var r=e.pos;return e.pos=s,u=a.type.decode(e,t),e.pos=r,u};return this.options.lazy?new n.c({get:l}):l()}return s}},{key:"size",value:function(e,t){var r=t;switch(this.options.type){case"local":case"immediate":break;case"parent":t=t.parent;break;default:for(;t.parent;)t=t.parent}var n=this.type;if(null==n){if(!(e instanceof f))throw new Error("Must be a VoidPointer");n=e.type,e=e.value}if(e&&t){var a=n.size(e,r);t.pointerSize+=a}return this.offsetType.size()}},{key:"encode",value:function(e,t,r){var n,a=r;if(null!=t){switch(this.options.type){case"local":n=r.startOffset;break;case"immediate":n=e.pos+this.offsetType.size(t,a);break;case"parent":n=(r=r.parent).startOffset;break;default:for(n=0;r.parent;)r=r.parent}this.options.relativeTo&&(n+=this.relativeToGetter(a.val)),this.offsetType.encode(e,r.pointerOffset-n);var o=this.type;if(null==o){if(!(t instanceof f))throw new Error("Must be a VoidPointer");o=t.type,t=t.value}return r.pointers.push({type:o,val:t,parent:a}),r.pointerOffset+=o.size(t,a)}this.offsetType.encode(e,this.options.nullValue)}}]),c}(r(740528).X),f=s((function e(t,r){o(this,e),this.type=t,this.value=r}))},486317:(e,t,r)=>{"use strict";r.d(t,{k:()=>l});var n=r(740528),a=r(340603);function o(e){return o="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},o(e)}function i(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,(void 0,a=function(e,t){if("object"!==o(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===o(a)?a:String(a)),n)}var a}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}var l=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(f,e);var t,r,n,l,c=(n=f,l=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,t=u(n);if(l){var r=u(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function f(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),(t=c.call(this)).type=e,t.count=r,t}return t=f,(r=[{key:"decode",value:function(e,t){e.pos+=this.size(null,t)}},{key:"size",value:function(e,t){var r=a.d(this.count,null,t);return this.type.size()*r}},{key:"encode",value:function(e,t,r){return e.fill(0,this.size(t,r))}}])&&i(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),f}(n.X)},830914:(e,t,r)=>{"use strict";r.d(t,{L:()=>c});var n=r(740528),a=r(602537),o=r(340603);function i(e){return i="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},i(e)}function s(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,(void 0,a=function(e,t){if("object"!==i(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===i(a)?a:String(a)),n)}var a}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}var c=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(p,e);var t,r,n,c,h=(n=p,c=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,t=l(n);if(c){var r=l(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function p(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ascii";return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p),(t=h.call(this)).length=e,t.encoding=r,t}return t=p,(r=[{key:"decode",value:function(e,t){var r,n;if(null!=this.length)r=o.d(this.length,e,t);else{var a;for(a=e.buffer,r=e.length,n=e.pos;n<r&&0!==a[n];)++n;r=n-e.pos}var i=this.encoding;"function"==typeof i&&(i=i.call(t,t)||"ascii");var s=e.readString(r,i);return null==this.length&&e.pos<e.length&&e.pos++,s}},{key:"size",value:function(e,t){if(!e)return o.d(this.length,null,t);var r=this.encoding;"function"==typeof r&&(r=r.call(null!=t?t.val:void 0,null!=t?t.val:void 0)||"ascii"),"utf16be"===r&&(r="utf16le");var n=f(e,r);return this.length instanceof a.Mr&&(n+=this.length.size()),null==this.length&&n++,n}},{key:"encode",value:function(e,t,r){var n=this.encoding;if("function"==typeof n&&(n=n.call(null!=r?r.val:void 0,null!=r?r.val:void 0)||"ascii"),this.length instanceof a.Mr&&this.length.encode(e,f(t,n)),e.writeString(t,n),null==this.length)return e.writeUInt8(0)}}])&&s(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),p}(n.X);function f(e,t){switch(t){case"ascii":return e.length;case"utf8":for(var r=0,n=0;n<e.length;n++){var a=e.charCodeAt(n);if(a>=55296&&a<=56319&&n<e.length-1){var o=e.charCodeAt(++n);56320==(64512&o)?a=((1023&a)<<10)+(1023&o)+65536:n--}0==(4294967168&a)?r++:0==(4294965248&a)?r+=2:0==(4294901760&a)?r+=3:0==(4292870144&a)&&(r+=4)}return r;case"utf16le":case"utf16-le":case"utf16be":case"utf16-be":case"ucs2":return 2*e.length;default:throw new Error("Unknown encoding "+t)}}},307209:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var n=r(740528),a=r(340603);function o(e){return o="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},o(e)}function i(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,(void 0,a=function(e,t){if("object"!==o(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===o(a)?a:String(a)),n)}var a}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}var l=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(f,e);var t,r,n,l,c=(n=f,l=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,t=u(n);if(l){var r=u(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function f(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),(e=c.call(this)).fields=t,e}return t=f,r=[{key:"decode",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=this._setup(e,t,r);return this._parseFields(e,n,this.fields),null!=this.process&&this.process.call(n,e),n}},{key:"_setup",value:function(e,t,r){var n={};return Object.defineProperties(n,{parent:{value:t},_startOffset:{value:e.pos},_currentOffset:{value:0,writable:!0},_length:{value:r}}),n}},{key:"_parseFields",value:function(e,t,r){for(var n in r){var o,i=r[n];void 0!==(o="function"==typeof i?i.call(t,t):i.decode(e,t))&&(o instanceof a.c?Object.defineProperty(t,n,o):t[n]=o),t._currentOffset=e.pos-t._startOffset}}},{key:"size",value:function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];null==e&&(e={});var n={parent:t,val:e,pointerSize:0};null!=this.preEncode&&this.preEncode.call(e);var a=0;for(var o in this.fields){var i=this.fields[o];null!=i.size&&(a+=i.size(e[o],n))}return r&&(a+=n.pointerSize),a}},{key:"encode",value:function(e,t,r){var n;null!=this.preEncode&&this.preEncode.call(t,e);var a={pointers:[],startOffset:e.pos,parent:r,val:t,pointerSize:0};for(var o in a.pointerOffset=e.pos+this.size(t,a,!1),this.fields)null!=(n=this.fields[o]).encode&&n.encode(e,t[o],a);for(var i=0;i<a.pointers.length;){var s=a.pointers[i++];s.type.encode(e,s.val,s.parent)}}}],r&&i(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),f}(n.X)},29362:(e,t,r)=>{"use strict";function n(e){return n="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},n(e)}function a(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,(void 0,o=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,"string");if("object"!==n(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(a.key),"symbol"===n(o)?o:String(o)),a)}var o}function o(e,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},o(e,t)}function i(e){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},i(e)}r.d(t,{b:()=>s});var s=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&o(e,t)}(c,e);var t,r,s,u,l=(s=c,u=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,t=i(s);if(u){var r=i(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function c(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(t=l.call(this)).type=e,t.versions=r,"string"==typeof e&&(t.versionPath=e.split(".")),t}return t=c,r=[{key:"decode",value:function(e,t){var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=this._setup(e,t,n);"string"==typeof this.type?a.version=(r=t,this.versionPath.reduce((function(e,t){return e&&e[t]}),r)):a.version=this.type.decode(e),this.versions.header&&this._parseFields(e,a,this.versions.header);var o=this.versions[a.version];if(null==o)throw new Error("Unknown version ".concat(a.version));return o instanceof c?o.decode(e,t):(this._parseFields(e,a,o),null!=this.process&&this.process.call(a,e),a)}},{key:"size",value:function(e,t){var r,n,a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e)throw new Error("Not a fixed size");null!=this.preEncode&&this.preEncode.call(e);var o={parent:t,val:e,pointerSize:0},i=0;if("string"!=typeof this.type&&(i+=this.type.size(e.version,o)),this.versions.header)for(r in this.versions.header)null!=(n=this.versions.header[r]).size&&(i+=n.size(e[r],o));var s=this.versions[e.version];if(null==s)throw new Error("Unknown version ".concat(e.version));for(r in s)null!=(n=s[r]).size&&(i+=n.size(e[r],o));return a&&(i+=o.pointerSize),i}},{key:"encode",value:function(e,t,r){var n,a;null!=this.preEncode&&this.preEncode.call(t,e);var o={pointers:[],startOffset:e.pos,parent:r,val:t,pointerSize:0};if(o.pointerOffset=e.pos+this.size(t,o,!1),"string"!=typeof this.type&&this.type.encode(e,t.version),this.versions.header)for(n in this.versions.header)null!=(a=this.versions.header[n]).encode&&a.encode(e,t[n],o);var i=this.versions[t.version];for(n in i)null!=(a=i[n]).encode&&a.encode(e,t[n],o);for(var s=0;s<o.pointers.length;){var u=o.pointers[s++];u.type.encode(e,u.val,u.parent)}}}],r&&a(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(r(307209).A)},340603:(e,t,r)=>{"use strict";r.d(t,{c:()=>u,d:()=>s});var n=r(602537);function a(e){return a="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},a(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(void 0,o=function(e,t){if("object"!==a(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===a(o)?o:String(o)),n)}var o}function i(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e,t,r){var a;if("number"==typeof e?a=e:"function"==typeof e?a=e.call(r,r):r&&"string"==typeof e?a=r[e]:t&&e instanceof n.Mr&&(a=e.decode(t)),isNaN(a))throw new Error("Not a fixed size");return a}var u=i((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var r in function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.enumerable=!0,this.configurable=!0,t){var n=t[r];this[r]=n}}))}}]);