/*! pacakge version: 3.6.6 */ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Logger=t():e.Logger=t()}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="./build",n(n.s=5)}([function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return i}));var r=n(2),o={};function i(){return Object(r.a)()?e:"undefined"!=typeof window?window:"undefined"!=typeof self?self:o}}).call(this,n(6))},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=i)throw new Error("lowerIndex should be less than upperIndex");o&&i&&s.paramChecker(a,s.ParamCheckerEnum.Boolean,"indexRange's lowerExclusive",!0),s.paramChecker(u,s.ParamCheckerEnum.Boolean,"indexRange's upperExclusive",!0)}}function l(){try{return a.default(),!0}catch(e){return!1}}t.idbIsSupported=l;var f=function(){function e(e){a.default(),function(e){s.paramChecker(e,s.ParamCheckerEnum.NotNullObject,"dbConfig",!1),s.paramChecker(e.dbName,s.ParamCheckerEnum.String,"dbName",!1),s.paramChecker(e.dbVersion,s.ParamCheckerEnum.NonNegativeInteger,"dbVersion",!0),s.paramChecker(e.itemDuration,s.ParamCheckerEnum.NonNegativeInteger,"itemDuration of dbConfig",!0),s.paramChecker(e.tables,s.ParamCheckerEnum.NotNullObject,"tables",!0),Object.keys(e.tables||{}).forEach((function(t){var n=e.tables[t];s.paramChecker(n.primaryKey,s.ParamCheckerEnum.String,"primaryKey",!0),s.paramChecker(n.itemDuration,s.ParamCheckerEnum.NonNegativeInteger,"itemDuration of table",!0),s.paramChecker(n.indexList,s.ParamCheckerEnum.Array,"indexList",!0),(n.indexList||[]).forEach((function(e){s.paramChecker(e.indexName,s.ParamCheckerEnum.String,"indexName",!1),s.paramChecker(e.unique,s.ParamCheckerEnum.Boolean,"unique",!0)}))}))}(e),this.name=e.dbName,this.version=s.optionWithBackup(e.dbVersion,1),this.tableList=Object.keys(e.tables||{}).map((function(t){return r({tableName:t},e.tables[t])})),this.itemDuration=e.itemDuration}return e.prototype.addItems=function(e){return o(this,void 0,void 0,(function(){var t,n,o=this;return i(this,(function(i){switch(i.label){case 0:return t=function(e,t,n){return void 0!==n?n:void 0!==t?t:e},a=e,c=this.tableList,s.paramChecker(a,s.ParamCheckerEnum.Array,"items",!1),a.forEach((function(e){s.paramChecker(e.tableName,s.ParamCheckerEnum.String,"item's tableName",!1),s.paramChecker(e.itemDuration,s.ParamCheckerEnum.NonNegativeInteger,"item's itemDuration",!0);var t=c.filter((function(t){return t.tableName===e.tableName}))[0];if(!t)throw new Error("Table "+e.tableName+" does not exist");if(void 0!==t.primaryKey&&Object.getOwnPropertyNames(e.item).indexOf(t.primaryKey)<0)throw new Error("primaryKey is needed for item in table "+e.tableName)})),n=e.map((function(e){var n=o.tableList.filter((function(t){return t.tableName===e.tableName}))[0];return r({itemDuration:t(o.itemDuration,n.itemDuration,e.itemDuration)},e)})),[4,u.default.addItems({name:this.name,tableList:this.tableList,version:this.version},n)];case 1:return i.sent(),[2]}var a,c}))}))},e.prototype.getItem=function(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,d(this.name,e,t)];case 1:return[2,n.sent()]}}))}))},e.prototype.getItemsInRange=function(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,h(this.name,e)];case 1:return[2,t.sent()]}}))}))},e.prototype.deleteItemsInRange=function(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return s.paramChecker(e,s.ParamCheckerEnum.Array,"tableIndexRanges",!1),e.forEach((function(e){c(e)})),[4,u.default.deleteItems(this.name,e)];case 1:return t.sent(),[2]}}))}))},e}();function p(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return a.default(),s.paramChecker(e,s.ParamCheckerEnum.String,"dbName",!1),[4,u.default.deleteDB(e)];case 1:return t.sent(),[2]}}))}))}function d(e,t,n){return o(this,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return s.paramChecker(e,s.ParamCheckerEnum.String,"dbName",!1),s.paramChecker(t,s.ParamCheckerEnum.String,"tableName",!1),[4,u.default.getItem(e,t,n)];case 1:return[2,r.sent()]}}))}))}function h(e,t){return o(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return s.paramChecker(e,s.ParamCheckerEnum.String,"dbName",!1),c(t),[4,u.default.getItemsInRange(e,t)];case 1:return[2,n.sent()]}}))}))}t.CustomDB=f,t.deleteDB=p,t.getItemFromDB=d,t.getItemsInRangeFromDB=h,t.default={idbIsSupported:l,CustomDB:f,deleteDB:p,getItemFromDB:d,getItemsInRangeFromDB:h}},function(e,t,n){"use strict";(function(e){function r(){return"[object process]"===Object.prototype.toString.call(void 0!==e?e:0)}n.d(t,"a",(function(){return r}))}).call(this,n(7))},function(e,t,n){"use strict";function r(e){return!isNaN(e)&&e>=0}Object.defineProperty(t,"__esModule",{value:!0}),t.ParamCheckerEnum={NonNegativeInteger:{rule:r,desc:"needs to be a non-negative integer"},NotNullObject:{rule:function(e){return e&&"object"==typeof e},desc:"needs to be a not-null object"},String:{rule:function(e){return"string"==typeof e},desc:"needs to be a string"},Array:{rule:function(e){return e instanceof Array},desc:"needs to be an Array"},Boolean:{rule:function(e){return"boolean"==typeof e},desc:"needs to be a boolean"}},t.isNonNegativeInteger=r,t.optionWithBackup=function(e,t){return void 0!==e?e:t},t.paramChecker=function(e,t,n,r){var o=n+" "+t.desc;if(r){if(void 0!==e&&!t.rule(e))throw new Error(o+" if defined")}else if(!t.rule(e))throw new Error(o)},t.deduplicateList=function(e){return e.reduce((function(e,t){return e.indexOf(t)<0?e.concat(t):e}),[])}},function(e){e.exports=JSON.parse('{"name":"@bigo/logger","version":"3.6.6","description":"","main":"build/src/node-index.js","module":"build/src/index.js","types":"build/src/index.d.ts","scripts":{"test":"jest --coverage","build":"rm -rf build && tsc && cp -r src/lib/*.js build/src/lib/ && webpack","dev":"TEST_ENV=dev rm -rf demo/dist & parcel demo/dev.html --port 1234 -d demo/dist","allready":"npm run test && npm run demo","publish:beta":"standard-version --release-as patch --prerelease beta && npm run build && npm publish --tag beta","publish:prod":"standard-version && npm run build && git push --follow-tags origin master && npm publish","publish:prod-patch":"standard-version --release-as patch && npm run build && git push --follow-tags origin master && npm publish"},"keywords":["Web","SDK"],"author":"sylvia","license":"MIT","devDependencies":{"@types/jest":"^24.0.22","@typescript-eslint/eslint-plugin":"^2.24.0","@typescript-eslint/parser":"^2.24.0","cross-env":"^7.0.3","eslint":"^6.6.0","fake-indexeddb":"^2.1.1","jest":"^24.9.0","parcel":"^1.12.4","rc-config-loader":"^4.0.0","serialize-javascript":"^2.1.1","source-map-loader":"^0.2.4","standard-version":"^9.3.2","ts-jest":"^26.0.0","typescript":"^3.7.2","webpack":"^4.41.2","webpack-cli":"^3.3.9","webpack-dev-server":"^3.11.0"},"dependencies":{"crypto-js":"^3.1.9-1","es6-promise":"^4.2.8","idb-managed":"^1.0.9"},"files":["/build","/src"]}')},function(e,t,n){e.exports=n(11)},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var s,c=[],l=!1,f=-1;function p(){l&&s&&(l=!1,s.length?c=s.concat(c):f=-1,c.length&&d())}function d(){if(!l){var e=u(p);l=!0;for(var t=c.length;t;){for(s=c,c=[];++f1)for(var n=1;n0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&e.expireTimen.version?(r=t.transaction("IDB_MANAGER_STORE","readwrite"),o=r.objectStore("IDB_MANAGER_STORE"),a={dbName:e.name,tableList:e.tableList,version:e.version},o.put(c({item:a,tableName:"IDB_MANAGER_STORE"})),[4,r.complete]):[3,4];case 3:i.sent(),t.close(),i.label=4;case 4:return[2]}}))}))}function p(e){return o(this,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return[4,h()];case 1:return t=r.sent(),n=t.transaction("IDB_MANAGER_STORE","readwrite"),n.objectStore("IDB_MANAGER_STORE").delete(e),[4,n.complete];case 2:return r.sent(),t.close(),[2]}}))}))}function d(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,f(e)];case 1:return t.sent(),[4,u.open(e.name,e.version,(function(t){v(t,e.tableList)}))];case 2:return[2,t.sent()]}}))}))}function h(){return o(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,u.open("IDB_MANAGER_DB",1,(function(e){!function(e){e.createObjectStore("IDB_MANAGER_STORE",{keyPath:"dbName"})}(e)}))];case 1:return[2,e.sent()]}}))}))}function g(e){return o(this,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return[4,h()];case 1:return[4,m(t=r.sent(),"IDB_MANAGER_STORE",e)];case 2:return n=r.sent(),t.close(),n?[4,u.open(n.dbName,n.version,(function(e){v(e,n.tableList||[])}))]:[3,4];case 3:return[2,r.sent()];case 4:return[2,null]}}))}))}function m(e,t,n){return o(this,void 0,void 0,(function(){var r;return i(this,(function(o){switch(o.label){case 0:return e.objectStoreNames.contains(t)?(r=e.transaction(t,"readonly"),[4,r.objectStore(t).get(n)]):[3,2];case 1:return[2,l(o.sent())];case 2:return[2,null]}}))}))}function v(e,t){try{t.forEach((function(t){if(e.objectStoreNames.contains(t.tableName)){var n=e.transaction(t.tableName).objectStore(t.tableName);(t.indexList||[]).forEach((function(e){n.indexNames.contains(e.indexName)||n.createIndex(e.indexName,e.indexName,{unique:e.unique})}))}else{var o=t.primaryKey||"id",i=e.createObjectStore(t.tableName,r({keyPath:o},"id"===o?{autoIncrement:!0}:{}));i.createIndex(o,o,{unique:!0}),(t.indexList||[]).forEach((function(e){i.createIndex(e.indexName,e.indexName,{unique:e.unique})})),i.createIndex("updateTime","updateTime",{unique:!1}),i.createIndex("expireTime","expireTime",{unique:!1})}}))}catch(t){e.close()}}function y(e,t,n){return o(this,void 0,void 0,(function(){var r;return i(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,8,9]),[4,n()];case 1:return o.sent(),[4,e.complete];case 2:return o.sent(),[3,9];case 3:r=o.sent();try{e.abort()}catch(e){}o.label=4;case 4:return o.trys.push([4,6,,7]),[4,e.complete];case 5:return o.sent(),[3,7];case 6:return o.sent(),[3,7];case 7:throw r;case 8:return t.close(),[7];case 9:return[2]}}))}))}function b(e,t){return o(this,void 0,void 0,(function(){var n,r,u,c=this;return i(this,(function(l){switch(l.label){case 0:return n=t.filter((function(t){return e.objectStoreNames.contains(t.tableName)})),r=a.deduplicateList(n.map((function(e){return e.tableName}))),[4,y(u=e.transaction(r,"readwrite"),e,(function(){return o(c,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,Promise.all(n.map((function(e){var t=e.tableName,n=e.indexRange,r=u.objectStore(t);return n?new Promise((function(e){r.index(n.indexName).iterateCursor(s(n),(function(t){t?(r.delete(t.primaryKey),t.continue()):e()}))})):r.clear()})))];case 1:return e.sent(),[2]}}))}))}))];case 1:return l.sent(),[2]}}))}))}function _(e,t){return o(this,void 0,void 0,(function(){var n,r,u,s=this;return i(this,(function(l){switch(l.label){case 0:return n=a.deduplicateList(t.map((function(e){return e.tableName}))),[4,E(e.name,n.map((function(e){return{tableName:e,indexRange:{indexName:"expireTime",upperIndex:+new Date,upperExclusive:!1}}})))];case 1:return l.sent(),[4,d(e)];case 2:return r=l.sent(),[4,y(u=r.transaction(n,"readwrite"),r,(function(){return o(s,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,Promise.all(t.map((function(e){return u.objectStore(e.tableName).put(c(e))})))];case 1:return e.sent(),[2]}}))}))}))];case 3:return l.sent(),[2]}}))}))}function w(e,t,n){return o(this,void 0,void 0,(function(){var r;return i(this,(function(o){switch(o.label){case 0:return[4,g(e)];case 1:if(!(r=o.sent()))return[3,7];o.label=2;case 2:return o.trys.push([2,4,5,6]),[4,m(r,t,n)];case 3:return[2,o.sent()];case 4:throw o.sent();case 5:return r.close(),[7];case 6:return[3,8];case 7:return[2,null];case 8:return[2]}}))}))}function I(e,t){return o(this,void 0,void 0,(function(){var n,r,o,a,u,c,f;return i(this,(function(i){switch(i.label){case 0:return n=t.tableName,r=t.indexRange,[4,g(e)];case 1:if(!(o=i.sent()))return[3,11];i.label=2;case 2:return i.trys.push([2,8,9,10]),a=[],o.objectStoreNames.contains(n)?[3,3]:[3,7];case 3:return u=o.transaction(n,"readonly"),c=u.objectStore(n),r?[3,5]:[4,c.getAll()];case 4:return f=i.sent(),a=(f||[]).map(l).filter((function(e){return null!==e})),[3,7];case 5:return[4,new Promise((function(e){c.index(r.indexName).iterateCursor(s(r),(function(t){if(t){var n=l(t.value);n&&a.push(n),t.continue()}else e()}))}))];case 6:i.sent(),i.label=7;case 7:return[2,a];case 8:throw i.sent();case 9:return o.close(),[7];case 10:return[3,12];case 11:return[2,[]];case 12:return[2]}}))}))}function T(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,p(e)];case 1:return t.sent(),[4,u.delete(e)];case 2:return t.sent(),[2]}}))}))}function E(e,t){return o(this,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return[4,g(e)];case 1:return(n=r.sent())?[4,b(n,t)]:[3,3];case 2:return r.sent(),[3,4];case 3:case 4:return[2]}}))}))}t.addItems=_,t.getItem=w,t.getItemsInRange=I,t.deleteDB=T,t.deleteItems=E,t.default={addItems:_,getItem:w,getItemsInRange:I,deleteDB:T,deleteItems:E}},function(e,t){function n(e){return Array.prototype.slice.call(e)}function r(e){return new Promise((function(t,n){e.onsuccess=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function o(e,t,n){var o,i=new Promise((function(i,a){r(o=e[t].apply(e,n)).then(i,a)}));return i.request=o,i}function i(e,t,n){var r=o(e,t,n);return r.then((function(e){if(e)return new f(e,r.request)}))}function a(e,t,n){n.forEach((function(n){Object.defineProperty(e.prototype,n,{get:function(){return this[t][n]},set:function(e){this[t][n]=e}})}))}function u(e,t,n,r){r.forEach((function(r){r in n.prototype&&(e.prototype[r]=function(){return o(this[t],r,arguments)})}))}function s(e,t,n,r){r.forEach((function(r){r in n.prototype&&(e.prototype[r]=function(){return this[t][r].apply(this[t],arguments)})}))}function c(e,t,n,r){r.forEach((function(r){r in n.prototype&&(e.prototype[r]=function(){return i(this[t],r,arguments)})}))}function l(e){this._index=e}function f(e,t){this._cursor=e,this._request=t}function p(e){this._store=e}function d(e){this._tx=e,this.complete=new Promise((function(t,n){e.oncomplete=function(){t()},e.onerror=function(){n(e.error)},e.onabort=function(){n(e.error)}}))}function h(e,t,n){this._db=e,this.oldVersion=t,this.transaction=new d(n)}function g(e){this._db=e}var m;if(p.prototype.createIndex=function(){return new l(this._store.createIndex.apply(this._store,arguments))},p.prototype.index=function(){return new l(this._store.index.apply(this._store,arguments))},d.prototype.objectStore=function(){return new p(this._tx.objectStore.apply(this._tx,arguments))},h.prototype.createObjectStore=function(){return new p(this._db.createObjectStore.apply(this._db,arguments))},g.prototype.transaction=function(){return new d(this._db.transaction.apply(this._db,arguments))},function(){try{return["IDBIndex","IDBCursor","IDBObjectStore","IDBTransaction","IDBDatabase"].forEach((function(e){if(window&&(!window[e]||!window.hasOwnProperty(e)))throw new Error(e)})),!0}catch(e){return!1}}())a(l,"_index",["name","keyPath","multiEntry","unique"]),u(l,"_index",IDBIndex,["get","getKey","getAll","getAllKeys","count"]),c(l,"_index",IDBIndex,["openCursor","openKeyCursor"]),a(f,"_cursor",["direction","key","primaryKey","value"]),u(f,"_cursor",IDBCursor,["update","delete"]),["advance","continue","continuePrimaryKey"].forEach((function(e){e in IDBCursor.prototype&&(f.prototype[e]=function(){var t=this,n=arguments;return Promise.resolve().then((function(){return t._cursor[e].apply(t._cursor,n),r(t._request).then((function(e){if(e)return new f(e,t._request)}))}))})})),a(p,"_store",["name","keyPath","indexNames","autoIncrement"]),u(p,"_store",IDBObjectStore,["put","add","delete","clear","get","getAll","getKey","getAllKeys","count"]),c(p,"_store",IDBObjectStore,["openCursor","openKeyCursor"]),s(p,"_store",IDBObjectStore,["deleteIndex"]),a(d,"_tx",["objectStoreNames","mode"]),s(d,"_tx",IDBTransaction,["abort"]),a(h,"_db",["name","version","objectStoreNames"]),s(h,"_db",IDBDatabase,["deleteObjectStore","close"]),a(g,"_db",["name","version","objectStoreNames"]),s(g,"_db",IDBDatabase,["close"]),["openCursor","openKeyCursor"].forEach((function(e){[p,l].forEach((function(t){e in t.prototype&&(t.prototype[e.replace("open","iterate")]=function(){var t=n(arguments),r=t[t.length-1],o=this._store||this._index,i=o[e].apply(o,t.slice(0,-1));i.onsuccess=function(){r(i.result)}})}))})),[l,p].forEach((function(e){e.prototype.getAll||(e.prototype.getAll=function(e,t){var n=this,r=[];return new Promise((function(o){n.iterateCursor(e,(function(e){e?(r.push(e.value),void 0===t||r.length!=t?e.continue():o(r)):o(r)}))}))})})),m={open:function(e,t,n){var r=o(indexedDB,"open",[e,t]),i=r.request;return i&&(i.onupgradeneeded=function(e){n&&n(new h(i.result,e.oldVersion,i.transaction))}),r.then((function(e){return new g(e)}))},delete:function(e){return o(indexedDB,"deleteDatabase",[e])}};else{var v="indexedDB is not supported";m={open:function(){return Promise.reject(new Error(v))},delete:function(){return Promise.reject(new Error(v))}}}e.exports=m},function(e,t,n){"use strict";var r,o,i,a,u;n.r(t),function(e){e.DB_NOT_SUPPORT="IndexedDB is not supported",e.NO_LOG="No log exists",e.REPORT_LOG_SUCC="Report succ",e.REPORT_LOG_FAIL="Report fail",e.REPORT_LOG_PART_FAIL="Report part fail",e.DELETE_LOG_FAIL="delete log fail",e.EXCEED_TRY_TIMES="Exceed try times",e.EXCEED_LOG_SIZE_LIMIT="Exceed log size day limit",e.EXCEED_SINGLE_LOG_SIZE_LIMIT="Single log is too large"}(r||(r={})),function(e){e[e.PLAIN=0]="PLAIN",e[e.RSA=1]="RSA"}(o||(o={})),function(e){e[e.LEVEL1=1]="LEVEL1",e[e.LEVEL2=2]="LEVEL2",e[e.LEVEL3=3]="LEVEL3",e[e.LEVEL4=4]="LEVEL4",e[e.LEVEL5=5]="LEVEL5",e[e.TRACK=6]="TRACK",e[e.XHR=7]="XHR",e[e.FETCH=8]="FETCH",e[e.HISTORY=9]="HISTORY",e[e.DOM=10]="DOM",e[e.INIT=11]="INIT",e[e.CONSOLE=12]="CONSOLE",e[e.CRASH=13]="CRASH",e[e.NATIVEAPI=14]="NATIVEAPI",e[e.UNHANDLEDREJECTION=15]="UNHANDLEDREJECTION",e[e.ERROR=16]="ERROR"}(i||(i={})),function(e){e.likee="likee",e.pay="pay",e.helloyo="helloyo",e.hello="hello",e.imo="imo",e.bigolive="bigolive",e.tiki="tiki"}(a||(a={})),function(e){e.likee="//support-json.like.video/json",e.pay="//support-json.bdesk.tech/json",e.helloyo="//support-json.helloyo.sg/json",e.hello="//support-json.ppx520.com/json",e.imo="//support-json.imoim.net/json",e.bigolive="//support-json.ukyuh.tech/json",e.tiki="//bflow.tiki.video/json"}(u||(u={}));function s(e){if("string"!=typeof e)return!1;var t=e.split("-"),n=parseInt(t[1]),r=parseInt(t[2]);return n>0&&n<=12&&r>0&&r<=31&&"Invalid Date"!==new Date(e).toString()}function c(e){var t=e.getFullYear(),n=e.getMonth()+1,r=e.getDate();return t+"-"+(n<10?"0"+n:n)+"-"+(r<10?"0"+r:r)}function l(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()}function f(e){var t=(e.match(/(\d+)/g)||[]).map((function(e){return parseInt(e)})),n=t[0],r=t[1],o=t[2];if(n<1e3)throw new Error("Invalid dayString: "+e);return new Date(n,r-1,o)}function p(e,t){return{t:t,c:e,d:Date.now()}}function d(e){if(0===e.length)return Promise.resolve([]);var t=e.map((function(e){return e instanceof Promise?e:Promise.resolve(e)}));return new Promise((function(e,n){var r=[],o=t.length;t.forEach((function(t,n){t.then((function(t){r[n]={status:"fulfilled",value:t},0===(o-=1)&&e(r)}),(function(t){r[n]={status:"rejected",reason:t},0===(o-=1)&&e(r)}))}))}))}function h(e){return Number(Math.random().toString().substr(2,e)+Date.now()).toString(36)}var g=function(e,t){var n=[];return Object.keys(t).forEach((function(e){return t[e]&&n.push(e+"="+t[e])})),-1===e.search(/\?/)?e+="?"+n.join("&"):e+="&"+n.join("&"),e},m=(navigator.userAgent.match(/(bigo-baiguoyuan).*(_like_|_bigolike_)/i),navigator.userAgent.match(/(bigo-baiguoyuan).*(_bigolive_)/i),"?uri=26348&aid=60"),v="?uri=26348&aid=18",y=function(){return(y=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&R--},canSave:function(){return R>0},resetQuota:function(){R=x("logTryTimes")}};function O(e){return"[object String]"===Object.prototype.toString.call(e)}function C(e,t){try{return e instanceof t}catch(e){return!1}}function k(e,t){try{for(var n=e,r=[],o=0,i=0,a=" > ".length,u=void 0;n&&o++<5&&!("html"===(u=j(n,t))||o>1&&i+r.length*a+u.length>=80);)r.push(u),i+=u.length,n=n.parentNode;return r.reverse().join(" > ")}catch(e){return""}}function j(e,t){var n,r,o,i,a,u=e,s=[];if(!u||!u.tagName)return"";s.push(u.tagName.toLowerCase());var c=t&&t.length?t.filter((function(e){return u.getAttribute(e)})).map((function(e){return[e,u.getAttribute(e)]})):null;if(c&&c.length)c.forEach((function(e){s.push("["+e[0]+'="'+e[1]+'"]')}));else if(u.id&&s.push("#"+u.id),(n=u.className)&&O(n))for(r=n.split(/\s+/),a=0;a"}catch(e){return""}}var B=function(){return(B=Object.assign||function(e){for(var t,n=1,r=arguments.length;n2?t[2]:void 0;if(r){var o=J,i=String(r);J=i,V("history",{from:o,to:i})}return e.apply(this,t)}}G.onpopstate=function(){for(var e=[],t=0;t0}var oe=function(){return(oe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"}0!==n.length&&this._options.logHandler("target: "+n+", category: "+e.name+", ",i.DOM)}},e.prototype._historyHandler=function(e){x("stop")||this._options.logHandler(e.from+" -> "+e.to,i.HISTORY)},e.prototype._consoleHandler=function(e){x("stop")||this._options.logHandler({content:e.args,level:e.level},i.CONSOLE)},e.prototype._nativeapiHandler=function(e){x("stop")||this._options.logHandler(e,i.NATIVEAPI)},e.prototype._unhandledrejectionHandler=function(e){var t=e;try{"reason"in e?t=e.reason:"detail"in e&&"reason"in e.detail&&(t=e.detail.reason)}catch(e){}this._options.errorHandler(t,i.UNHANDLEDREJECTION)},e.prototype._errorHandler=function(e){this._options.errorHandler(JSON.stringify(e),i.ERROR)},e.id="GlobalHandlers",e}(),le=n(1),fe=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function u(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))},pe=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0)||he)return[3,5];t=de.shift(),he=!0,o.label=1;case 1:return o.trys.push([1,3,,4]),[4,t.asyncF()];case 2:return n=o.sent(),t.resolution(n),[3,4];case 3:return r=o.sent(),t.rejection(r),[3,4];case 4:return he=!1,e(),[3,0];case 5:return[2]}}))}))}()}))}var me,ve=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function u(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))},ye=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]30720?[4,x("errorHandler")(new Error(r.EXCEED_SINGLE_LOG_SIZE_LIMIT))]:[3,2];case 1:return E.sent(),[2];case 2:return n=new Date,o=c(n),[4,this.getLogDayInfo(o)];case 3:if((i=E.sent()||((w={}).logDay=o,w.totalSize=0,w.reportPagesInfo={pageSizes:[0],pageIds:[Ee],failTimes:[0]},w)).totalSize+t>7340032)throw new Error(r.EXCEED_LOG_SIZE_LIMIT);return i.reportPagesInfo&&i.reportPagesInfo.pageSizes||(i.reportPagesInfo={pageSizes:[0],pageIds:[Ee],failTimes:[0]}),a=i.reportPagesInfo.pageSizes,u=i.reportPagesInfo.pageIds,s=i.reportPagesInfo.failTimes||[],f=a.length-1,p=u[u.length-1],d=a[f],h=p!==Ee||d>0&&d+t>30720,N=a.slice(),h?N.push(t):N[f]+=t,g=N,m=function(){var e=u.slice();return h&&e.push(Ee),e}(),v=function(){var e=s.slice();return h&&e.push(0),e}(),(I={}).logReportName=this.logReportNameFormatter(o,h?f+1:f),I.logCreateTime=+n,I.logSize=t,I.logString=e,y=I,(T={}).logDay=o,T.totalSize=i.totalSize+t,T.reportPagesInfo={pageSizes:g,pageIds:m,failTimes:v},b=T,_=6048e5-(+new Date-l(new Date)),[4,this.DB.addItems([{tableName:"log_day_table",item:b,itemDuration:_},{tableName:"log_detail_table",item:y,itemDuration:_}])];case 4:return E.sent(),[2]}var N}))}))},e.prototype.incrementalDelete=function(e,t){return Ie(this,void 0,void 0,(function(){var n,r,i,a,u,s,c,d,h,g,m,v,y,b;return Te(this,(function(_){switch(_.label){case 0:return[4,this.getLogDayInfo(e)];case 1:return(n=_.sent())&&n.reportPagesInfo&&n.reportPagesInfo.pageSizes instanceof Array?(r=n.reportPagesInfo.pageIds,i=n.reportPagesInfo.pageSizes,a=n.reportPagesInfo.failTimes||[],u=n.totalSize,s=i.reduce((function(e,n,r){return t.indexOf(r)>=0?e+n:e}),0),c=[],d=[],h=i.reduce((function(e,n,i){return t.indexOf(i)>=0?(d.push(i),e.concat([0])):a[i]>=2?(d.push(i),_e({pid:Ee,logContent:p("[bigo-log]: reported fail, currentpageId: "+r[i]+", currentSize: "+n,2),encryptVersion:o.PLAIN}),e.concat([0])):(n>0&&c.push(i),e.concat([n]))}),[]),g={},g=c.length>0?we(we({},n),{reportPagesInfo:{pageSizes:h,pageIds:r,failTimes:h.map((function(e,t){var n=a[t]||0;return c.includes(t)?n+1:n}))},totalSize:Math.max(u-s,0)}):we(we({},n),{reportPagesInfo:{pageSizes:[],pageIds:[],failTimes:[]},totalSize:Math.max(u-s,0)}),m=6048e5-(+new Date-l(new Date))-(l(new Date)-f(e).getTime()),[4,this.DB.addItems([{tableName:"log_day_table",item:g,itemDuration:m}])]):[3,6];case 2:_.sent(),v=0,y=d,_.label=3;case 3:return v-1)return null;var o={},i=n;if(He){var a=window.performance.getEntriesByName(r);a.length&&(i=(o=je(a[a.length-1])).duration)}return{url:r,success:t,cost_time:i,resource_type:ke(e),page_url:window.location.href,success_performance:Ce(o||{})}}(e,t,n);if(u){if(u.resource_type===Se&&u.url.includes("data:image/png;base64"))return;if(u.resource_type!==De&&Me.includes(u.url))return;Me.push(u.url),u.resource_type===De&&(u.error_type=r||0,u.error_msg=o||"",u.status_code=i||"",u=Ae(Ae({},u),a||{})),Fe.push(u)}}catch(e){console.error(e)}}function Ke(){if(Ue){var e={attributes:!1,childList:!0,subtree:!1},t=new MutationObserver((function(e){Array.from(e).forEach((function(e){"childList"===e.type&&Array.from(e.addedNodes).forEach((function(e){var t=e.tagName;t&&Oe.includes(t.toLowerCase())&&function(e){e.addEventListener("load",(function(){return Ve(e,Be)})),e.addEventListener("error",(function(){return Ve(e,Ge)}))}(e)}))}))}));t.observe(document.head,e),document.onreadystatechange=function(){"interactive"===document.readyState&&t.observe(document.body,e)}}}function ze(){if(!He)return{};var e=Array.from(performance.getEntriesByType("paint")),t=e.length?e:[{},{}],n=t[0],r=t[1],o={FP:n?parseInt(n.duration+n.startTime,10):null,FCP:r?parseInt(r.duration+r.startTime,10):null},i={},a=performance.getEntriesByType("navigation");if(a&&a.length)i=je(a[0]);else{var u=window.performance.timing;for(var s in u)i[s]=Math.max(+u[s]-u.navigationStart,0)}var c,l=i.connectEnd-i.domainLookupStart,f=i.responseEnd-i.requestStart,p=i.loadEventEnd||i.loadEventStart||i.domComplete||i.domInteractive;return{dns_cost_time:l,html_cost_time:f,js_cost_time:(c=Fe.map((function(e){return e.resource_type===xe?e.cost_time:0})),Math.max.apply(Math,qe(c,[0]))),load_cost_time:p,paint_time:o,performance:i}}function Xe(e){try{He&&Ke();var t=function(){setTimeout((function(){(function e(t){var n=1;if(n>=10)return 0;if(t.hasChildNodes())for(var r=t.childNodes,o=0;o=10);o++)1===r.item(o).nodeType&&(n+=e(r.item(o)));return n})(document.body)<10&&kt({type:2,log_type:i.CRASH})}),3e3);setTimeout((function(){var t={};He&&(document.body&&Array.from(document.body.childNodes).forEach((function(e){var t=e.tagName;if(t&&Oe.includes(t.toLowerCase())){var n=Pe(e);He&&Ve(e,!!window.performance.getEntriesByName(n)[0])}})),t=ze()),kt(Ae(Ae({},e),{type:2,log_type:i.INIT,extra:{performaceDataObj:Ce(t)}}))}))};!document.readyState||document.readyState&&"complete"===document.readyState?t():window.addEventListener("load",t),window.addEventListener("beforeunload",Ot)}catch(e){console.error(e)}}var Je,Ye,Ze=function(){},We=function(){return(We=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=200?e.success&&e.success(n.responseText):e.fail&&e.fail("Request failed, status: "+t+", responseText: "+n.responseText)}},"POST"===e.type){if(e.headers&&!t)for(var r in e.headers)n.setRequestHeader(r,e.headers[r]);n.send(e.data)}else n.send()}({url:e,type:r||"GET",data:t,withCredentials:!!n,headers:o,success:function(e){i(e)},fail:function(e){a(We({message:e||"Request failed"},{__logger_own_request__:!0}))}})}))]}))}))};function tt(e){return"[object Array]"===Object.prototype.toString.call(e)}!function(e){e[e.UINT8=1]="UINT8",e[e.UINT16=2]="UINT16",e[e.UINT32=3]="UINT32",e[e.UINT64=4]="UINT64",e[e.STRING=5]="STRING",e[e.VECTOR_STRING=6]="VECTOR_STRING",e[e.MAP_STRING=7]="MAP_STRING",e[e.VECTOR_STRUCT=8]="VECTOR_STRUCT"}(Ye||(Ye={}));var nt,rt=((Je={})[Ye.UINT8]=0,Je[Ye.UINT16]=0,Je[Ye.UINT32]=0,Je[Ye.UINT64]=0,Je[Ye.STRING]="",Je[Ye.VECTOR_STRING]="",Je[Ye.MAP_STRING]="",Je[Ye.VECTOR_STRUCT]="",Je),ot=function(){function e(e){var t=e.uri,n=e.aid,r=e.model;this.params={},this.uri=String(t),this.aid=String(n),this.model=r}return e.prototype.processVal=function(e,t){switch(t){case Ye.UINT8:case Ye.UINT16:case Ye.UINT32:case Ye.UINT64:e=parseInt(e,10);break;case Ye.STRING:e=""+e;break;case Ye.VECTOR_STRING:var n=[];if(!tt(e))throw new Error("invalid data type of array");for(var r=0,o=e.length;r0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0))return[3,12];v.label=3;case 3:return v.trys.push([3,10,,11]),[4,d(n[s].map((function(t){var n=t.split("_");return function(e,t){var n,o;return dt(this,void 0,void 0,(function(){var i,a,u,s,c,l;return ht(this,(function(f){switch(f.label){case 0:return[4,lt.getLogsByReportName(e)];case 1:return(i=f.sent()).length>0?(a=lt.logReportNameParser(e).pageIndex,u=i.map((function(e){return e.logString})),s=lt.logReportNameParser(e),c="function"==typeof t.xhrOptsFormatter?t.xhrOptsFormatter(u,s.pageIndex+1,s.logDay):{},l=(null===(n=i[0])||void 0===n?void 0:n.logString)&&JSON.parse(i[0].logString).p,[4,et(c.reportUrl||t.reportUrl||x("reportUrl"),JSON.stringify(ct(c.data||pt(pt({os:navigator.platform,country_code:navigator.language},t),{log_content:i.map((function(e){return e.logString})),pid:l,url:window.location.href,extra:pt(pt({},t.extra),{version:gt}),time:(new Date).getTime()}))),(o=c.withCredentials,null!=o&&o),"POST",c.headers||{"Content-Type":"application/json",Accept:"application/json,text/javascript"}).then((function(e){var t,n,o;if("function"==typeof c.responseDealer){var i=c.responseDealer(e);if(i.resultMsg===r.REPORT_LOG_SUCC)return a;throw new Error(i.desc)}var u=void 0;try{u=JSON.parse(e)}catch(t){throw new Error("Try to parse response failed, responseText: "+e)}if(console.log("response",u),void 0===(null===(t=u)||void 0===t?void 0:t.code)||200===(null===(n=u)||void 0===n?void 0:n.code))return a;throw new Error("Server error, code: "+(null===(o=u)||void 0===o?void 0:o.code))}))]):[3,3];case 2:return[2,f.sent()];case 3:return[2,Promise.resolve(null)]}}))}))}(lt.logReportNameFormatter(n[0],+n[1]),e)})))];case 4:l=v.sent(),(p=l.filter((function(e){return"rejected"===e.status}))).length>0?o[s]={msg:r.REPORT_LOG_PART_FAIL,desc:JSON.stringify(p)}:o[s]={msg:r.REPORT_LOG_SUCC},v.label=5;case 5:return v.trys.push([5,8,,9]),(h=l.filter((function(e){return null!==e.value})).map((function(e){return e.value}))).length>0&&x("incrementalReport")?[4,lt.incrementalDelete(s,h)]:[3,7];case 6:v.sent(),v.label=7;case 7:return[3,9];case 8:return g=v.sent(),o[s]={msg:r.DELETE_LOG_FAIL,desc:g.message||g.stack||JSON.stringify(g)},[3,9];case 9:return[3,11];case 10:return m=v.sent(),o[s]={msg:r.REPORT_LOG_FAIL,desc:m.message||m.stack||JSON.stringify(m)},[3,11];case 11:return[3,13];case 12:o[s]={msg:r.NO_LOG},v.label=13;case 13:return u+=864e5,[3,2];case 14:return[2,o]}}))}))}))];case 2:return[2,n.sent()]}}))}))}n.d(t,"initConfig",(function(){return Nt})),n.d(t,"setConfig",(function(){return St})),n.d(t,"setConfigByKey",(function(){return xt})),n.d(t,"log",(function(){return Rt})),n.d(t,"track",(function(){return Dt})),n.d(t,"reportAll",(function(){return Ot})),n.d(t,"report",(function(){return Ct})),n.d(t,"immediateSend",(function(){return kt})),n.d(t,"stop",(function(){return jt})),n.d(t,"resume",(function(){return Pt})),n.d(t,"destroy",(function(){return Lt}));var yt=function(){return(yt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=x("autoReportCount")?[4,Ot()]:[3,5];case 4:n.sent(),n.label=5;case 5:return[3,8];case 6:return t=n.sent(),D.errorTrigger(),[4,x("errorHandler")(t)];case 7:return n.sent(),[3,8];case 8:return[3,11];case 9:return[4,x("errorHandler")(new Error(r.EXCEED_TRY_TIMES))];case 10:n.sent(),n.label=11;case 11:return[2]}}))}))}function Et(e,t,n){if(!x("stop")){var r;x("_devSend");0,r={logContent:p(e,t),pid:Ne.pageId,encryptVersion:n},(!document.readyState||document.readyState&&"complete"===document.readyState)&&wt?Tt(r):It.push(r)}}function Nt(e){var t,n;e.globalReportConfig&&(e.globalReportConfig=Object.assign({langCode:navigator.language,environment:navigator&&navigator.userAgent},e.globalReportConfig),e.globalReportConfig.userId||("string"==typeof e.globalReportConfig.uid?(e.globalReportConfig.userId=e.globalReportConfig.uid,e.globalReportConfig.uid=0):e.globalReportConfig.userId=String(e.globalReportConfig.uid))),N(e);var r=x("hooks");new ce({onxhr:r.xhr,onfetch:r.fetch,ondom:r.dom,onconsole:r.console,onhistory:r.history,onnativeapi:r.nativeapi,onerror:r.error,onunhandledrejection:r.unhandledrejection,logHandler:Rt,errorHandler:function(e,t){x("_devSend");kt({log_type:t,log_content:e,type:2}),Ot()}}).setupOnce(),Ot();var o=x("globalReportConfig");if((null===(t=o)||void 0===t?void 0:t.device_id)||(null===(n=o)||void 0===n?void 0:n.userId)){x("_devSend");0,Xe(o)}wt=!0}function St(e){N(e)}function xt(e,t){S(e,t)}function Rt(e,t){void 0===t&&(t=1),x("stop")||Et(e,t,o.PLAIN)}function Dt(e){return bt(this,void 0,void 0,(function(){return _t(this,(function(t){switch(t.label){case 0:return x("stop")?[2]:x("globalReportConfig").act_id||e.act_id?(e.isCN&&S("isCN",e.isCN),"number"==typeof e.log_action&&(e.log_action=String(e.log_action)),x("_devSend"),[4,kt(yt(yt({},e),{log_type:i.TRACK,type:2}))]):(console.error("%cbigo-log","border:1px solid #aaa;padding: 10px 5px;color: #f99418;font-weight: 500;","请在initConfig的globalReportConfig中传入act_id 或 track中传入act_id"),[2]);case 1:return[2,t.sent()]}}))}))}function Ot(){return bt(this,void 0,void 0,(function(){var e;return _t(this,(function(t){switch(t.label){case 0:return e=new Date,[4,Ct({fromDayString:c(new Date(+e-5184e5)),toDayString:c(e)})];case 1:return[2,t.sent()]}}))}))}function Ct(e){return bt(this,void 0,void 0,(function(){return _t(this,(function(t){switch(t.label){case 0:return x("stop")?[2]:(function(e){if(!e)throw new Error("reportConfig needs to be an object");var t="is not valid, needs to be YYYY-MM-DD format";if(!s(e.fromDayString))throw new Error("fromDayString "+t);if(!s(e.toDayString))throw new Error("toDayString "+t);if(e.fromDayString>e.toDayString)throw new Error("fromDayString needs to be no bigger than toDayString")}(e),[4,vt(yt(yt({},x("globalReportConfig")),e))]);case 1:return[2,t.sent()]}}))}))}function kt(e){return bt(this,void 0,void 0,(function(){var t;return _t(this,(function(n){switch(n.label){case 0:return t=x("globalReportConfig"),[4,mt(yt(yt({},t),e))];case 1:return[2,n.sent()]}}))}))}function jt(){xt("stop",!0)}function Pt(){xt("stop",!1)}function Lt(){return bt(this,void 0,void 0,(function(){return _t(this,(function(e){switch(e.label){case 0:return jt(),[4,Ne.deleteAll()];case 1:return e.sent(),[2]}}))}))}window.addEventListener("load",(function e(){It.forEach((function(e){Tt(e)})),It=[],window.removeEventListener("load",e)}))}])}));