PageSourceSearch

https://bronirui-online.ru/service-worker.js

js bronirui-online.ru collected 2026-10-04 20:06:59 UTC 170,099 bytes, 2 lines download raw bytes

1/*! Commit hash: f68f169 */
2(()=>{var e={47:(e,t)=>{"use strict";var n;n={value:true};t["default"]=r;n=i;function r(e,t){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:new Map;var i=n.get(e);if(i)return i;if(Array.isArray(e)){var o=[];n.set(e,o);for(var a=0;a<e.length;a++){o[a]=r(e[a],t,n)}return o}if(e instanceof Date)return new Date(e.valueOf());if(!(e instanceof Object))return e;var s={};n.set(e,s);var c=Object.keys(e);for(var u=0;u<c.length;u++){var f=t?t(c[u]):c[u];s[f]=r(e[c[u]],t,n)}return s}function i(e){return function(t){return r(t,e)}}r.formatKeys=i},63:e=>{"use strict";e.exports=function e(t,n){n=n.split(":")[0];t=+t;if(!t)return false;switch(n){case"http":case"ws":return t!==80;case"https":case"wss":return t!==443;case"ftp":return t!==21;case"gopher":return t!==70;case"file":return false}return t!==0}},160:(e,t,n)=>{"use strict";var r=n(63),i=n(992),o=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,a=/[\n\r\t]/g,s=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,c=/:\d+$/,u=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,f=/^[a-zA-Z]:/;function l(e){return(e?e:"").toString().replace(o,"")}var d=[["#","hash"],["?","query"],function e(t,n){return g(n.protocol)?t.replace(/\\/g,"/"):t},["/","pathname"],["@","auth",1],[NaN,"host",undefined,1,1],[/:(\d*)$/,"port",undefined,1],[NaN,"hostname",undefined,1,1]];var h={hash:1,query:1};function p(e){var t;if(typeof window!=="undefined")t=window;else if(typeof n.g!=="undefined")t=n.g;else if(typeof self!=="undefined")t=self;else t={};var r=t.location||{};e=e||r;var i={},o=typeof e,a;if("blob:"===e.protocol){i=new m(unescape(e.pathname),{})}else if("string"===o){i=new m(e,{});for(a in h)delete i[a]}else if("object"===o){for(a in e){if(a in h)continue;i[a]=e[a]}if(i.slashes===undefined){i.slashes=s.test(e.href)}}return i}function g(e){return e==="file:"||e==="ftp:"||e==="http:"||e==="https:"||e==="ws:"||e==="wss:"}function v(e,t){e=l(e);e=e.replace(a,"");t=t||{};var n=u.exec(e);var r=n[1]?n[1].toLowerCase():"";var i=!!n[2];var o=!!n[3];var s=0;var c;if(i){if(o){c=n[2]+n[3]+n[4];s=n[2].length+n[3].length}else{c=n[2]+n[4];s=n[2].length}}else{if(o){c=n[3]+n[4];s=n[3].length}else{c=n[4]}}if(r==="file:"){if(s>=2){c=c.slice(2)}}else if(g(r)){c=n[4]}else if(r){if(i){c=c.slice(2)}}else if(s>=2&&g(t.protocol)){c=n[4]}return{protocol:r,slashes:i||g(r),slashesCount:s,rest:c}}function b(e,t){if(e==="")return t;var n=(t||"/").split("/").slice(0,-1).concat(e.split("/")),r=n.length,i=n[r-1],o=false,a=0;while(r--){if(n[r]==="."){n.splice(r,1)}else if(n[r]===".."){n.splice(r,1);a++}else if(a){if(r===0)o=true;n.splice(r,1);a--}}if(o)n.unshift("");if(i==="."||i==="..")n.push("");return n.join("/")}function m(e,t,n){e=l(e);e=e.replace(a,"");if(!(this instanceof m)){return new m(e,t,n)}var o,s,c,u,h,w,y=d.slice(),_=typeof t,S=this,k=0;if("object"!==_&&"string"!==_){n=t;t=null}if(n&&"function"!==typeof n)n=i.parse;t=p(t);s=v(e||"",t);o=!s.protocol&&!s.slashes;S.slashes=s.slashes||o&&t.slashes;S.protocol=s.protocol||t.protocol||"";e=s.rest;if(s.protocol==="file:"&&(s.slashesCount!==2||f.test(e))||!s.slashes&&(s.protocol||s.slashesCount<2||!g(S.protocol))){y[3]=[/(.*)/,"pathname"]}for(;k<y.length;k++){u=y[k];if(typeof u==="function"){e=u(e,S);continue}c=u[0];w=u[1];if(c!==c){S[w]=e}else if("string"===typeof c){h=c==="@"?e.lastIndexOf(c):e.indexOf(c);if(~h){if("number"===typeof u[2]){S[w]=e.slice(0,h);e=e.slice(h+u[2])}else{S[w]=e.slice(h);e=e.slice(0,h)}}}else if(h=c.exec(e)){S[w]=h[1];e=e.slice(0,h.index)}S[w]=S[w]||(o&&u[3]?t[w]||"":"");
2if(u[4])S[w]=S[w].toLowerCase()}if(n)S.query=n(S.query);if(o&&t.slashes&&S.pathname.charAt(0)!=="/"&&(S.pathname!==""||t.pathname!=="")){S.pathname=b(S.pathname,t.pathname)}if(S.pathname.charAt(0)!=="/"&&g(S.protocol)){S.pathname="/"+S.pathname}if(!r(S.port,S.protocol)){S.host=S.hostname;S.port=""}S.username=S.password="";if(S.auth){h=S.auth.indexOf(":");if(~h){S.username=S.auth.slice(0,h);S.username=encodeURIComponent(decodeURIComponent(S.username));S.password=S.auth.slice(h+1);S.password=encodeURIComponent(decodeURIComponent(S.password))}else{S.username=encodeURIComponent(decodeURIComponent(S.auth))}S.auth=S.password?S.username+":"+S.password:S.username}S.origin=S.protocol!=="file:"&&g(S.protocol)&&S.host?S.protocol+"//"+S.host:"null";S.href=S.toString()}function w(e,t,n){var o=this;switch(e){case"query":if("string"===typeof t&&t.length){t=(n||i.parse)(t)}o[e]=t;break;case"port":o[e]=t;if(!r(t,o.protocol)){o.host=o.hostname;o[e]=""}else if(t){o.host=o.hostname+":"+t}break;case"hostname":o[e]=t;if(o.port)t+=":"+o.port;o.host=t;break;case"host":o[e]=t;if(c.test(t)){t=t.split(":");o.port=t.pop();o.hostname=t.join(":")}else{o.hostname=t;o.port=""}break;case"protocol":o.protocol=t.toLowerCase();o.slashes=!n;break;case"pathname":case"hash":if(t){var a=e==="pathname"?"/":"#";o[e]=t.charAt(0)!==a?a+t:t}else{o[e]=t}break;case"username":case"password":o[e]=encodeURIComponent(t);break;case"auth":var s=t.indexOf(":");if(~s){o.username=t.slice(0,s);o.username=encodeURIComponent(decodeURIComponent(o.username));o.password=t.slice(s+1);o.password=encodeURIComponent(decodeURIComponent(o.password))}else{o.username=encodeURIComponent(decodeURIComponent(t))}}for(var u=0;u<d.length;u++){var f=d[u];if(f[4])o[f[1]]=o[f[1]].toLowerCase()}o.auth=o.password?o.username+":"+o.password:o.username;o.origin=o.protocol!=="file:"&&g(o.protocol)&&o.host?o.protocol+"//"+o.host:"null";o.href=o.toString();return o}function y(e){if(!e||"function"!==typeof e)e=i.stringify;var t,n=this,r=n.host,o=n.protocol;if(o&&o.charAt(o.length-1)!==":")o+=":";var a=o+(n.protocol&&n.slashes||g(n.protocol)?"//":"");if(n.username){a+=n.username;if(n.password)a+=":"+n.password;a+="@"}else if(n.password){a+=":"+n.password;a+="@"}else if(n.protocol!=="file:"&&g(n.protocol)&&!r&&n.pathname!=="/"){a+="@"}if(r[r.length-1]===":"||c.test(n.hostname)&&!n.port){r+=":"}a+=r+n.pathname;t="object"===typeof n.query?e(n.query):n.query;if(t)a+="?"!==t.charAt(0)?"?"+t:t;if(n.hash)a+=n.hash;return a}m.prototype={set:w,toString:y};m.extractProtocol=v;m.location=p;m.trimLeft=l;m.qs=i;e.exports=m},790:(e,t,n)=>{(function(t){if(true){e.exports=t()}else{var n}})((function(){var e,t,r;return function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){var c=undefined;if(!s&&c)return require(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var f=n[a]={exports:{}};t[a][0].call(f.exports,(function(e){var n=t[a][1][e];return i(n?n:e)}),f,f.exports,e,t,n,r)}return n[a].exports}var o=undefined;for(var a=0;a<r.length;a++)i(r[a]);return i}({1:[function(e,t,r){(function(e){"use strict";var n=e.MutationObserver||e.WebKitMutationObserver;var r;{if(n){var i=0;var o=new n(f);var a=e.document.createTextNode("");o.observe(a,{characterData:true});r=function(){a.data=i=++i%2}}else if(!e.setImmediate&&typeof e.MessageChannel!=="undefined"){var s=new e.MessageChannel;s.port1.onmessage=f;r=function(){s.port2.postMessage(0)}}else if("document"in e&&"onreadystatechange"in e.document.createElement("script")){r=function(){var t=e.document.createElement("script");t.onreadystatechange=function(){f();t.onreadystatechange=null;t.parentNode.removeChild(t);t=null};e.document.documentElement.appendChild(t)}}else{r=function(){setTimeout(f,0)}}}var c;var u=[];function f(){c=true;var e,t;var n=u.length;while(n){t=u;u=[];e=-1;while(++e<n){t[e]()}n=u.length}c=false}t.exports=l;function l(e){if(u.push(e)===1&&!c){r()}}}).call(this,typeof n.g!=="undefined"?n.g:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],2:[function(e,t,n){"use strict";var r=e(1);function i(){}var o={};var a=["REJECTED"];var s=["FULFILLED"];var c=["PENDING"];t.exports=u;function u(e){if(typeof e!=="function"){throw new TypeError("resolver must be a function")}this.state=c;this.queue=[];this.outcome=void 0;if(e!==i){h(this,e)}}u.prototype["catch"]=function(e){return this.then(null,e)};u.prototype.then=function(e,t){if(typeof e!=="function"&&this.state===s||t
vendor: 27,253 bytes, line 2
2ypeof t!=="function"&&this.state===a){return this}var n=new this.constructor(i);if(this.state!==c){var r=this.state===s?e:t;l(n,r,this.outcome)}else{this.queue.push(new f(n,e,t))}return n};function f(e,t,n){this.promise=e;if(typeof t==="function"){this.onFulfilled=t;this.callFulfilled=this.otherCallFulfilled}if(typeof n==="function"){this.onRejected=n;this.callRejected=this.otherCallRejected}}f.prototype.callFulfilled=function(e){o.resolve(this.promise,e)};f.prototype.otherCallFulfilled=function(e){l(this.promise,this.onFulfilled,e)};f.prototype.callRejected=function(e){o.reject(this.promise,e)};f.prototype.otherCallRejected=function(e){l(this.promise,this.onRejected,e)};function l(e,t,n){r((function(){var r;try{r=t(n)}catch(t){return o.reject(e,t)}if(r===e){o.reject(e,new TypeError("Cannot resolve promise with itself"))}else{o.resolve(e,r)}}))}o.resolve=function(e,t){var n=p(d,t);if(n.status==="error"){return o.reject(e,n.value)}var r=n.value;if(r){h(e,r)}else{e.state=s;e.outcome=t;var i=-1;var a=e.queue.length;while(++i<a){e.queue[i].callFulfilled(t)}}return e};o.reject=function(e,t){e.state=a;e.outcome=t;var n=-1;var r=e.queue.length;while(++n<r){e.queue[n].callRejected(t)}return e};function d(e){var t=e&&e.then;if(e&&(typeof e==="object"||typeof e==="function")&&typeof t==="function"){return function n(){t.apply(e,arguments)}}}function h(e,t){var n=false;function r(t){if(n){return}n=true;o.reject(e,t)}function i(t){if(n){return}n=true;o.resolve(e,t)}function a(){t(i,r)}var s=p(a);if(s.status==="error"){r(s.value)}}function p(e,t){var n={};try{n.value=e(t);n.status="success"}catch(e){n.status="error";n.value=e}return n}u.resolve=g;function g(e){if(e instanceof this){return e}return o.resolve(new this(i),e)}u.reject=v;function v(e){var t=new this(i);return o.reject(t,e)}u.all=b;function b(e){var t=this;if(Object.prototype.toString.call(e)!=="[object Array]"){return this.reject(new TypeError("must be an array"))}var n=e.length;var r=false;if(!n){return this.resolve([])}var a=new Array(n);var s=0;var c=-1;var u=new this(i);while(++c<n){f(e[c],c)}return u;function f(e,i){t.resolve(e).then(c,(function(e){if(!r){r=true;o.reject(u,e)}}));function c(e){a[i]=e;if(++s===n&&!r){r=true;o.resolve(u,a)}}}}u.race=m;function m(e){var t=this;if(Object.prototype.toString.call(e)!=="[object Array]"){return this.reject(new TypeError("must be an array"))}var n=e.length;var r=false;if(!n){return this.resolve([])}var a=-1;var s=new this(i);while(++a<n){c(e[a])}return s;function c(e){t.resolve(e).then((function(e){if(!r){r=true;o.resolve(s,e)}}),(function(e){if(!r){r=true;o.reject(s,e)}}))}}},{1:1}],3:[function(e,t,r){(function(t){"use strict";if(typeof t.Promise!=="function"){t.Promise=e(2)}}).call(this,typeof n.g!=="undefined"?n.g:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{2:2}],4:[function(e,t,n){"use strict";var r=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol==="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function i(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}function o(){try{if(typeof indexedDB!=="undefined"){return indexedDB}if(typeof webkitIndexedDB!=="undefined"){return webkitIndexedDB}if(typeof mozIndexedDB!=="undefined"){return mozIndexedDB}if(typeof OIndexedDB!=="undefined"){return OIndexedDB}if(typeof msIndexedDB!=="undefined"){return msIndexedDB}}catch(e){return}}var a=o();function s(){try{if(!a||!a.open){return false}var e=typeof openDatabase!=="undefined"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform);var t=typeof fetch==="function"&&fetch.toString().indexOf("[native code")!==-1;return(!e||t)&&typeof indexedDB!=="undefined"&&typeof IDBKeyRange!=="undefined"}catch(e){return false}}function c(e,t){e=e||[];t=t||{};try{return new Blob(e,t)}catch(o){if(o.name!=="TypeError"){throw o}var n=typeof BlobBuilder!=="undefined"?BlobBuilder:typeof MSBlobBuilder!=="undefined"?MSBlobBuilder:typeof MozBlobBuilder!=="undefined"?MozBlobBuilder:WebKitBlobBuilder;var r=new n;for(var i=0;i<e.length;i+=1){r.append(e[i])}return r.getBlob(t.type)}}if(typeof Promise==="undefined"){e(3)}var u=Promise;function f(e,t){if(t){e.then((function(e){t(null,e)}),(function(e){t(e)}))}}function l(e,t,n){if(typeof t==="function"){e.then(t)}if(typeof n==="function"){e["catch"](n)}}function d(e){if(typeof e!=="string"){console.warn(e+" used as a key, but it is not a string.");e=String(e)}return e}function h(){if(arguments.length&&typeof arguments[arguments.length-1]==="function"){return arguments[arguments.length-1]}}var p="local-forage-detect-blob-support";var g=void 0;var v={};var b=Object.prototype.toString;var m="readonly";var w="readwrite";function y(e){var t=e.length;var n=new ArrayBuffer(t);var r=new Uint8Array(n);for(var i=0;i<t;i++){r[i]=e.charCodeAt(i)}return n}function _(e){return new u((function(t){var n=e.transaction(p,w);var r=c([""]);n.objectStore(p).put(r,"key");n.onabort=function(e){e.preventDefault();e.stopPropagation();t(false)};n.oncomplete=function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/);var n=navigator.userAgent.match(/Edge\//);t(n||!e||parseInt(e[1],10)>=43)}}))["catch"]((function(){return false}))}function S(e){if(typeof g==="boolean"){return u.resolve(g)}return _(e).then((function(e){g=e;return g}))}function k(e){var t=v[e.name];var n={};n.promise=new u((function(e,t){n.resolve=e;n.reject=t}));t.deferredOperations.push(n);if(!t.dbReady){t.dbReady=n.promise}else{t.dbReady=t.dbReady.then((function(){return n.promise}))}}function I(e){var t=v[e.name];var n=t.deferredOperations.pop();if(n){n.resolve();return n.promise}}function O(e,t){var n=v[e.name];var r=n.deferredOperations.pop();if(r){r.reject(t);return r.promise}}function E(e,t){return new u((function(n,r){v[e.name]=v[e.name]||x();if(e.db){if(t){k(e);e.db.close()}else{return n(e.db)}}var i=[e.name];if(t){i.push(e.version)}var o=a.open.apply(a,i);if(t){o.onupgradeneeded=function(t){var n=o.result;try{n.createObjectStore(e.storeName);if(t.oldVersion<=1){n.createObjectStore(p)}}catch(n){if(n.name==="ConstraintError"){console.warn('The database "'+e.name+'"'+" has been upgraded from version "+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}else{throw n}}}}o.onerror=function(e){e.preventDefault();r(o.error)};o.onsuccess=function(){var t=o.result;t.onversionchange=function(e){e.target.close()};n(t);I(e)}}))}function C(e){return E(e,false)}function M(e){return E(e,true)}function A(e,t){if(!e.db){return true}var n=!e.db.objectStoreNames.contains(e.storeName);var r=e.version<e.db.version;var i=e.version>e.db.version;if(r){if(e.version!==t){console.warn('The database "'+e.name+'"'+" can't be downgraded from version "+e.db.version+" to version "+e.version+".")}e.version=e.db.version}if(i||n){if(n){var o=e.db.version+1;if(o>e.version){e.version=o}}return true}return false}function P(e){return new u((function(t,n){var r=new FileReader;r.onerror=n;r.onloadend=function(n){var r=btoa(n.target.result||"");t({__local_forage_encoded_blob:true,data:r,type:e.type})};r.readAsBinaryString(e)}))}function T(e){var t=y(atob(e.data));return c([t],{type:e.type})}function N(e){return e&&e.__local_forage_encoded_blob}function D(e){var t=this;var n=t._initReady().then((function(){var e=v[t._dbInfo.name];if(e&&e.dbReady){return e.dbReady}}));l(n,e,e);return n}function R(e){k(e);var t=v[e.name];var n=t.forages;for(var r=0;r<n.length;r++){var i=n[r];if(i._dbInfo.db){i._dbInfo.db.close();i._dbInfo.db=null}}e.db=null;return C(e).then((function(t){e.db=t;if(A(e)){return M(e)}return t})).then((function(r){e.db=t.db=r;for(var i=0;i<n.length;i++){n[i]._dbInfo.db=r}}))["catch"]((function(t){O(e,t);throw t}))}function j(e,t,n,r){if(r===undefined){r=1}try{var i=e.db.transaction(e.storeName,t);n(null,i)}catch(i){if(r>0&&(!e.db||i.name==="InvalidStateError"||i.name==="NotFoundError")){return u.resolve().then((function(){if(!e.db||i.name==="NotFoundError"&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version){if(e.db){e.version=e.db.version+1}return M(e)}})).then((function(){return R(e).then((function(){j(e,t,n,r-1)}))}))["catch"](n)}n(i)}}function x(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function F(e){var t=this;var n={db:null};if(e){for(var r in e){n[r]=e[r]}}var i=v[n.name];if(!i){i=x();v[n.name]=i}i.forages.push(t);if(!t._initReady){t._initReady=t.ready;t.ready=D}var o=[];function a(){return u.resolve()}for(var s=0;s<i.forages.length;s++){var c=i.forages[s];if(c!==t){o.push(c._initReady()["catch"](a))}}var f=i.forages.slice(0);return u.all(o).then((function(){n.db=i.db;return C(n)})).then((function(e){n.db=e;if(A(n,t._defaultConfig.version)){return M(n)}return e})).then((function(e){n.db=i.db=e;t._dbInfo=n;for(var r=0;r<f.length;r++){var o=f[r];if(o!==t){o._dbInfo.db=n.db;o._dbInfo.version=n.version}}}))}function B(e,t){var n=this;e=d(e);var r=new u((function(t,r){n.ready().then((function(){j(n._dbInfo,m,(function(i,o){if(i){return r(i)}try{var a=o.objectStore(n._dbInfo.storeName);var s=a.get(e);s.onsuccess=function(){var e=s.result;if(e===undefined){e=null}if(N(e)){e=T(e)}t(e)};s.onerror=function(){r(s.error)}}catch(e){r(e)}}))}))["catch"](r)}));f(r,t);return r}function L(e,t){var n=this;var r=new u((function(t,r){n.ready().then((function(){j(n._dbInfo,m,(function(i,o){if(i){return r(i)}try{var a=o.objectStore(n._dbInfo.storeName);var s=a.openCursor();var c=1;s.onsuccess=function(){var n=s.result;if(n){var r=n.value;if(N(r)){r=T(r)}var i=e(r,n.key,c++);if(i!==void 0){t(i)}else{n["continue"]()}}else{t()}};s.onerror=function(){r(s.error)}}catch(e){r(e)}}))}))["catch"](r)}));f(r,t);return r}function W(e,t,n){var r=this;e=d(e);var i=new u((function(n,i){var o;r.ready().then((function(){o=r._dbInfo;if(b.call(t)==="[object Blob]"){return S(o.db).then((function(e){if(e){return t}return P(t)}))}return t})).then((function(t){j(r._dbInfo,w,(function(o,a){if(o){return i(o)}try{var s=a.objectStore(r._dbInfo.storeName);if(t===null){t=undefined}var c=s.put(t,e);a.oncomplete=function(){if(t===undefined){t=null}n(t)};a.onabort=a.onerror=function(){var e=c.error?c.error:c.transaction.error;i(e)}}catch(e){i(e)}}))}))["catch"](i)}));f(i,n);return i}function U(e,t){var n=this;e=d(e);var r=new u((function(t,r){n.ready().then((function(){j(n._dbInfo,w,(function(i,o){if(i){return r(i)}try{var a=o.objectStore(n._dbInfo.storeName);var s=a["delete"](e);o.oncomplete=function(){t()};o.onerror=function(){r(s.error)};o.onabort=function(){var e=s.error?s.error:s.transaction.error;r(e)}}catch(e){r(e)}}))}))["catch"](r)}));f(r,t);return r}function z(e){var t=this;var n=new u((function(e,n){t.ready().then((function(){j(t._dbInfo,w,(function(r,i){if(r){return n(r)}try{var o=i.objectStore(t._dbInfo.storeName);var a=o.clear();i.oncomplete=function(){e()};i.onabort=i.onerror=function(){var e=a.error?a.error:a.transaction.error;n(e)}}catch(e){n(e)}}))}))["catch"](n)}));f(n,e);return n}function K(e){var t=this;var n=new u((function(e,n){t.ready().then((function(){j(t._dbInfo,m,(function(r,i){if(r){return n(r)}try{var o=i.objectStore(t._dbInfo.storeName);var a=o.count();a.onsuccess=function(){e(a.result)};a.onerror=function(){n(a.error)}}catch(e){n(e)}}))}))["catch"](n)}));f(n,e);return n}function H(e,t){var n=this;var r=new u((function(t,r){if(e<0){t(null);return}n.ready().then((function(){j(n._dbInfo,m,(function(i,o){if(i){return r(i)}try{var a=o.objectStore(n._dbInfo.storeName);var s=false;var c=a.openKeyCursor();c.onsuccess=function(){var n=c.result;if(!n){t(null);return}if(e===0){t(n.key)}else{if(!s){s=true;n.advance(e)}else{t(n.key)}}};c.onerror=function(){r(c.error)}}catch(e){r(e)}}))}))["catch"](r)}));f(r,t);return r}function $(e){var t=this;var n=new u((function(e,n){t.ready().then((function(){j(t._dbInfo,m,(function(r,i){if(r){return n(r)}try{var o=i.objectStore(t._dbInfo.storeName);var a=o.openKeyCursor();var s=[];a.onsuccess=function(){var t=a.result;if(!t){e(s);return}s.push(t.key);t["continue"]()};a.onerror=function(){n(a.error)}}catch(e){n(e)}}))}))["catch"](n)}));f(n,e);return n}function V(e,t){t=h.apply(this,arguments);var n=this.config();e=typeof e!=="function"&&e||{};if(!e.name){e.name=e.name||n.name;e.storeName=e.storeName||n.storeName}var r=this;var i;if(!e.name){i=u.reject("Invalid arguments")}else{var o=e.name===n.name&&r._dbInfo.db;var s=o?u.resolve(r._dbInfo.db):C(e).then((function(t){var n=v[e.name];var r=n.forages;n.db=t;for(var i=0;i<r.length;i++){r[i]._dbInfo.db=t}return t}));if(!e.storeName){i=s.then((function(t){k(e);var n=v[e.name];var r=n.forages;t.close();for(var i=0;i<r.length;i++){var o=r[i];o._dbInfo.db=null}var s=new u((function(t,n){var r=a.deleteDatabase(e.name);r.onerror=function(){var e=r.result;if(e){e.close()}n(r.error)};r.onblocked=function(){console.warn('dropInstance blocked for database "'+e.name+'" until all open connections are closed')};r.onsuccess=function(){var e=r.result;if(e){e.close()}t(e)}}));return s.then((function(e){n.db=e;for(var t=0;t<r.length;t++){var i=r[t];I(i._dbInfo)}}))["catch"]((function(t){(O(e,t)||u.resolve())["catch"]((function(){}));throw t}))}))}else{i=s.then((function(t){if(!t.objectStoreNames.contains(e.storeName)){return}var n=t.version+1;k(e);var r=v[e.name];var i=r.forages;t.close();for(var o=0;o<i.length;o++){var s=i[o];s._dbInfo.db=null;s._dbInfo.version=n}var c=new u((function(t,r){var i=a.open(e.name,n);i.onerror=function(e){var t=i.result;t.close();r(e)};i.onupgradeneeded=function(){var t=i.result;t.deleteObjectStore(e.storeName)};i.onsuccess=function(){var e=i.result;e.close();t(e)}}));return c.then((function(e){r.db=e;for(var t=0;t<i.length;t++){var n=i[t];n._dbInfo.db=e;I(n._dbInfo)}}))["catch"]((function(t){(O(e,t)||u.resolve())["catch"]((function(){}));throw t}))}))}}f(i,t);return i}var q={_driver:"asyncStorage",_initStorage:F,_support:s(),iterate:L,getItem:B,setItem:W,removeItem:U,clear:z,length:K,key:H,keys:$,dropInstance:V};function G(){return typeof openDatabase==="function"}var J="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var X="~~local_forage_type~";var Q=/^~~local_forage_type~([^~]+)~/;var Y="__lfsc__:";var Z=Y.length;var ee="arbf";var te="blob";var ne="si08";var re="ui08";var ie="uic8";var oe="si16";var ae="si32";var se="ur16";var ce="ui32";var ue="fl32";var fe="fl64";var le=Z+ee.length;var de=Object.prototype.toString;function he(e){var t=e.length*.75;var n=e.length;var r;var i=0;var o,a,s,c;if(e[e.length-1]==="="){t--;if(e[e.length-2]==="="){t--}}var u=new ArrayBuffer(t);var f=new Uint8Array(u);for(r=0;r<n;r+=4){o=J.indexOf(e[r]);a=J.indexOf(e[r+1]);s=J.indexOf(e[r+2]);c=J.indexOf(e[r+3]);f[i++]=o<<2|a>>4;f[i++]=(a&15)<<4|s>>2;f[i++]=(s&3)<<6|c&63}return u}function pe(e){var t=new Uint8Array(e);var n="";var r;for(r=0;r<t.length;r+=3){n+=J[t[r]>>2];n+=J[(t[r]&3)<<4|t[r+1]>>4];n+=J[(t[r+1]&15)<<2|t[r+2]>>6];n+=J[t[r+2]&63]}if(t.length%3===2){n=n.substring(0,n.length-1)+"="}else if(t.length%3===1){n=n.substring(0,n.length-2)+"=="}return n}function ge(e,t){var n="";if(e){n=de.call(e)}if(e&&(n==="[object ArrayBuffer]"||e.buffer&&de.call(e.buffer)==="[object ArrayBuffer]")){var r;var i=Y;if(e instanceof ArrayBuffer){r=e;i+=ee}else{r=e.buffer;if(n==="[object Int8Array]"){i+=ne}else if(n==="[object Uint8Array]"){i+=re}else if(n==="[object Uint8ClampedArray]"){i+=ie}else if(n==="[object Int16Array]"){i+=oe}else if(n==="[object Uint16Array]"){i+=se}else if(n==="[object Int32Array]"){i+=ae}else if(n==="[object Uint32Array]"){i+=ce}else if(n==="[object Float32Array]"){i+=ue}else if(n==="[object Float64Array]"){i+=fe}else{t(new Error("Failed to get type for BinaryArray"))}}t(i+pe(r))}else if(n==="[object Blob]"){var o=new FileReader;o.onload=function(){var n=X+e.type+"~"+pe(this.result);t(Y+te+n)};o.readAsArrayBuffer(e)}else{try{t(JSON.stringify(e))}catch(n){console.error("Couldn't convert value into a JSON string: ",e);t(null,n)}}}function ve(e){if(e.substring(0,Z)!==Y){return JSON.parse(e)}var t=e.substring(le);var n=e.substring(Z,le);var r;if(n===te&&Q.test(t)){var i=t.match(Q);r=i[1];t=t.substring(i[0].length)}var o=he(t);switch(n){case ee:return o;case te:return c([o],{type:r});case ne:return new Int8Array(o);case re:return new Uint8Array(o);case ie:return new Uint8ClampedArray(o);case oe:return new Int16Array(o);case se:return new Uint16Array(o);case ae:return new Int32Array(o);case ce:return new Uint32Array(o);case ue:return new Float32Array(o);case fe:return new Float64Array(o);default:throw new Error("Unkown type: "+n)}}var be={serialize:ge,deserialize:ve,stringToBuffer:he,bufferToString:pe};function me(e,t,n,r){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" "+"(id INTEGER PRIMARY KEY, key unique, value)",[],n,r)}function we(e){var t=this;var n={db:null};if(e){for(var r in e){n[r]=typeof e[r]!=="string"?e[r].toString():e[r]}}var i=new u((function(e,r){try{n.db=openDatabase(n.name,String(n.version),n.description,n.size)}catch(e){return r(e)}n.db.transaction((function(i){me(i,n,(function(){t._dbInfo=n;e()}),(function(e,t){r(t)}))}),r)}));n.serializer=be;return i}function ye(e,t,n,r,i,o){e.executeSql(n,r,i,(function(e,a){if(a.code===a.SYNTAX_ERR){e.executeSql("SELECT name FROM sqlite_master "+"WHERE type='table' AND name = ?",[t.storeName],(function(e,s){if(!s.rows.length){me(e,t,(function(){e.executeSql(n,r,i,o)}),o)}else{o(e,a)}}),o)}else{o(e,a)}}),o)}function _e(e,t){var n=this;e=d(e);var r=new u((function(t,r){n.ready().then((function(){var i=n._dbInfo;i.db.transaction((function(n){ye(n,i,"SELECT * FROM "+i.storeName+" WHERE key = ? LIMIT 1",[e],(function(e,n){var r=n.rows.length?n.rows.item(0).value:null;if(r){r=i.serializer.deserialize(r)}t(r)}),(function(e,t){r(t)}))}))}))["catch"](r)}));f(r,t);return r}function Se(e,t){var n=this;var r=new u((function(t,r){n.ready().then((function(){var i=n._dbInfo;i.db.transaction((function(n){ye(n,i,"SELECT * FROM "+i.storeName,[],(function(n,r){var o=r.rows;var a=o.length;for(var s=0;s<a;s++){var c=o.item(s);var u=c.value;if(u){u=i.serializer.deserialize(u)}u=e(u,c.key,s+1);if(u!==void 0){t(u);return}}t()}),(function(e,t){r(t)}))}))}))["catch"](r)}));f(r,t);return r}function ke(e,t,n,r){var i=this;e=d(e);var o=new u((function(o,a){i.ready().then((function(){if(t===undefined){t=null}var s=t;var c=i._dbInfo;c.serializer.serialize(t,(function(t,u){if(u){a(u)}else{c.db.transaction((function(n){ye(n,c,"INSERT OR REPLACE INTO "+c.storeName+" "+"(key, value) VALUES (?, ?)",[e,t],(function(){o(s)}),(function(e,t){a(t)}))}),(function(t){if(t.code===t.QUOTA_ERR){if(r>0){o(ke.apply(i,[e,s,n,r-1]));return}a(t)}}))}}))}))["catch"](a)}));f(o,n);return o}function Ie(e,t,n){return ke.apply(this,[e,t,n,1])}function Oe(e,t){var n=this;e=d(e);var r=new u((function(t,r){n.ready().then((function(){var i=n._dbInfo;i.db.transaction((function(n){ye(n,i,"DELETE FROM "+i.storeName+" WHERE key = ?",[e],(function(){t()}),(function(e,t){r(t)}))}))}))["catch"](r)}));f(r,t);return r}function Ee(e){var t=this;var n=new u((function(e,n){t.ready().then((function(){var r=t._dbInfo;r.db.transaction((function(t){ye(t,r,"DELETE FROM "+r.storeName,[],(function(){e()}),(function(e,t){n(t)}))}))}))["catch"](n)}));f(n,e);return n}function Ce(e){var t=this;var n=new u((function(e,n){t.ready().then((function(){var r=t._dbInfo;r.db.transaction((function(t){ye(t,r,"SELECT COUNT(key) as c FROM "+r.storeName,[],(function(t,n){var r=n.rows.item(0).c;e(r)}),(function(e,t){n(t)}))}))}))["catch"](n)}));f(n,e);return n}function Me(e,t){var n=this;var r=new u((function(t,r){n.ready().then((function(){var i=n._dbInfo;i.db.transaction((function(n){ye(n,i,"SELECT key FROM "+i.storeName+" WHERE id = ? LIMIT 1",[e+1],(function(e,n){var r=n.rows.length?n.rows.item(0).key:null;t(r)}),(function(e,t){r(t)}))}))}))["catch"](r)}));f(r,t);return r}function Ae(e){var t=this;var n=new u((function(e,n){t.ready().then((function(){var r=t._dbInfo;r.db.transaction((function(t){ye(t,r,"SELECT key FROM "+r.storeName,[],(function(t,n){var r=[];for(var i=0;i<n.rows.length;i++){r.push(n.rows.item(i).key)}e(r)}),(function(e,t){n(t)}))}))}))["catch"](n)}));f(n,e);return n}function Pe(e){return new u((function(t,n){e.transaction((function(r){r.executeSql("SELECT name FROM sqlite_master "+"WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],(function(n,r){var i=[];for(var o=0;o<r.rows.length;o++){i.push(r.rows.item(o).name)}t({db:e,storeNames:i})}),(function(e,t){n(t)}))}),(function(e){n(e)}))}))}function Te(e,t){t=h.apply(this,arguments);var n=this.config();e=typeof e!=="function"&&e||{};if(!e.name){e.name=e.name||n.name;e.storeName=e.storeName||n.storeName}var r=this;var i;if(!e.name){i=u.reject("Invalid arguments")}else{i=new u((function(t){var i;if(e.name===n.name){i=r._dbInfo.db}else{i=openDatabase(e.name,"","",0)}if(!e.storeName){t(Pe(i))}else{t({db:i,storeNames:[e.storeName]})}})).then((function(e){return new u((function(t,n){e.db.transaction((function(r){function i(e){return new u((function(t,n){r.executeSql("DROP TABLE IF EXISTS "+e,[],(function(){t()}),(function(e,t){n(t)}))}))}var o=[];for(var a=0,s=e.storeNames.length;a<s;a++){o.push(i(e.storeNames[a]))}u.all(o).then((function(){t()}))["catch"]((function(e){n(e)}))}),(function(e){n(e)}))}))}))}f(i,t);return i}var Ne={_driver:"webSQLStorage",_initStorage:we,_support:G(),iterate:Se,getItem:_e,setItem:Ie,removeItem:Oe,clear:Ee,length:Ce,key:Me,keys:Ae,dropInstance:Te};function De(){try{return typeof localStorage!=="undefined"&&"setItem"in localStorage&&!!localStorage.setItem}catch(e){return false}}function Re(e,t){var n=e.name+"/";if(e.storeName!==t.storeName){n+=e.storeName+"/"}return n}function je(){var e="_localforage_support_test";try{localStorage.setItem(e,true);localStorage.removeItem(e);return false}catch(e){return true}}function xe(){return!je()||localStorage.length>0}function Fe(e){var t=this;var n={};if(e){for(var r in e){n[r]=e[r]}}n.keyPrefix=Re(e,t._defaultConfig);if(!xe()){return u.reject()}t._dbInfo=n;n.serializer=be;return u.resolve()}function Be(e){var t=this;var n=t.ready().then((function(){var e=t._dbInfo.keyPrefix;for(var n=localStorage.length-1;n>=0;n--){var r=localStorage.key(n);if(r.indexOf(e)===0){localStorage.removeItem(r)}}}));f(n,e);return n}function Le(e,t){var n=this;e=d(e);var r=n.ready().then((function(){var t=n._dbInfo;var r=localStorage.getItem(t.keyPrefix+e);if(r){r=t.serializer.deserialize(r)}return r}));f(r,t);return r}function We(e,t){var n=this;var r=n.ready().then((function(){var t=n._dbInfo;var r=t.keyPrefix;var i=r.length;var o=localStorage.length;var a=1;for(var s=0;s<o;s++){var c=localStorage.key(s);if(c.indexOf(r)!==0){continue}var u=localStorage.getItem(c);if(u){u=t.serializer.deserialize(u)}u=e(u,c.substring(i),a++);if(u!==void 0){return u}}}));f(r,t);return r}function Ue(e,t){var n=this;var r=n.ready().then((function(){var t=n._dbInfo;var r;try{r=localStorage.key(e)}catch(e){r=null}if(r){r=r.substring(t.keyPrefix.length)}return r}));f(r,t);return r}function ze(e){var t=this;var n=t.ready().then((function(){var e=t._dbInfo;var n=localStorage.length;var r=[];for(var i=0;i<n;i++){var o=localStorage.key(i);if(o.indexOf(e.keyPrefix)===0){r.push(o.substring(e.keyPrefix.length))}}return r}));f(n,e);return n}function Ke(e){var t=this;var n=t.keys().then((function(e){return e.length}));f(n,e);return n}function He(e,t){var n=this;e=d(e);var r=n.ready().then((function(){var t=n._dbInfo;localStorage.removeItem(t.keyPrefix+e)}));f(r,t);return r}function $e(e,t,n){var r=this;e=d(e);var i=r.ready().then((function(){if(t===undefined){t=null}var n=t;return new u((function(i,o){var a=r._dbInfo;a.serializer.serialize(t,(function(t,r){if(r){o(r)}else{try{localStorage.setItem(a.keyPrefix+e,t);i(n)}catch(e){if(e.name==="QuotaExceededError"||e.name==="NS_ERROR_DOM_QUOTA_REACHED"){o(e)}o(e)}}}))}))}));f(i,n);return i}function Ve(e,t){t=h.apply(this,arguments);e=typeof e!=="function"&&e||{};if(!e.name){var n=this.config();e.name=e.name||n.name;e.storeName=e.storeName||n.storeName}var r=this;var i;if(!e.name){i=u.reject("Invalid arguments")}else{i=new u((function(t){if(!e.storeName){t(e.name+"/")}else{t(Re(e,r._defaultConfig))}})).then((function(e){for(var t=localStorage.length-1;t>=0;t--){var n=localStorage.key(t);if(n.indexOf(e)===0){localStorage.removeItem(n)}}}))}f(i,t);return i}var qe={_driver:"localStorageWrapper",_initStorage:Fe,_support:De(),iterate:We,getItem:Le,setItem:$e,removeItem:He,clear:Be,length:Ke,key:Ue,keys:ze,dropInstance:Ve};var Ge=function e(t,n){return t===n||typeof t==="number"&&typeof n==="number"&&isNaN(t)&&isNaN(n)};var Je=function e(t,n){var r=t.length;var i=0;while(i<r){if(Ge(t[i],n)){return true}i++}return false};var Xe=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"};var Qe={};var Ye={};var Ze={INDEXEDDB:q,WEBSQL:Ne,LOCALSTORAGE:qe};var et=[Ze.INDEXEDDB._driver,Ze.WEBSQL._driver,Ze.LOCALSTORAGE._driver];var tt=["dropInstance"];var nt=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(tt);var rt={description:"",driver:et.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function it(e,t){e[t]=function(){var n=arguments;return e.ready().then((function(){return e[t].apply(e,n)}))}}function ot(){for(var e=1;e<arguments.length;e++){var t=arguments[e];if(t){for(var n in t){if(t.hasOwnProperty(n)){if(Xe(t[n])){arguments[0][n]=t[n].slice()}else{arguments[0][n]=t[n]}}}}}return arguments[0]}var at=function(){function e(t){i(this,e);for(var n in Ze){if(Ze.hasOwnProperty(n)){var r=Ze[n];var o=r._driver;this[n]=o;if(!Qe[o]){this.defineDriver(r)}}}this._defaultConfig=ot({},rt);this._config=ot({},this._defaultConfig,t);this._driverSet=null;this._initDriver=null;this._ready=false;this._dbInfo=null;this._wrapLibraryMethodsWithReady();this.setDriver(this._config.driver)["catch"]((function(){}))}e.prototype.config=function e(t){if((typeof t==="undefined"?"undefined":r(t))==="object"){if(this._ready){return new Error("Can't call config() after localforage "+"has been used.")}for(var n in t){if(n==="storeName"){t[n]=t[n].replace(/\W/g,"_")}if(n==="version"&&typeof t[n]!=="number"){return new Error("Database version must be a number.")}this._config[n]=t[n]}if("driver"in t&&t.driver){return this.setDriver(this._config.driver)}return true}else if(typeof t==="string"){return this._config[t]}else{return this._config}};e.prototype.defineDriver=function e(t,n,r){var i=new u((function(e,n){try{var r=t._driver;var i=new Error("Custom driver not compliant; see "+"https://mozilla.github.io/localForage/#definedriver");if(!t._driver){n(i);return}var o=nt.concat("_initStorage");for(var a=0,s=o.length;a<s;a++){var c=o[a];var l=!Je(tt,c);if((l||t[c])&&typeof t[c]!=="function"){n(i);return}}var d=function e(){var n=function e(t){return function(){var e=new Error("Method "+t+" is not implemented by the current driver");var n=u.reject(e);f(n,arguments[arguments.length-1]);return n}};for(var r=0,i=tt.length;r<i;r++){var o=tt[r];if(!t[o]){t[o]=n(o)}}};d();var h=function n(i){if(Qe[r]){console.info("Redefining LocalForage driver: "+r)}Qe[r]=t;Ye[r]=i;
2e()};if("_support"in t){if(t._support&&typeof t._support==="function"){t._support().then(h,n)}else{h(!!t._support)}}else{h(true)}}catch(e){n(e)}}));l(i,n,r);return i};e.prototype.driver=function e(){return this._driver||null};e.prototype.getDriver=function e(t,n,r){var i=Qe[t]?u.resolve(Qe[t]):u.reject(new Error("Driver not found."));l(i,n,r);return i};e.prototype.getSerializer=function e(t){var n=u.resolve(be);l(n,t);return n};e.prototype.ready=function e(t){var n=this;var r=n._driverSet.then((function(){if(n._ready===null){n._ready=n._initDriver()}return n._ready}));l(r,t,t);return r};e.prototype.setDriver=function e(t,n,r){var i=this;if(!Xe(t)){t=[t]}var o=this._getSupportedDrivers(t);function a(){i._config.driver=i.driver()}function s(e){i._extend(e);a();i._ready=i._initStorage(i._config);return i._ready}function c(e){return function(){var t=0;function n(){while(t<e.length){var r=e[t];t++;i._dbInfo=null;i._ready=null;return i.getDriver(r).then(s)["catch"](n)}a();var o=new Error("No available storage method found.");i._driverSet=u.reject(o);return i._driverSet}return n()}}var f=this._driverSet!==null?this._driverSet["catch"]((function(){return u.resolve()})):u.resolve();this._driverSet=f.then((function(){var e=o[0];i._dbInfo=null;i._ready=null;return i.getDriver(e).then((function(e){i._driver=e._driver;a();i._wrapLibraryMethodsWithReady();i._initDriver=c(o)}))}))["catch"]((function(){a();var e=new Error("No available storage method found.");i._driverSet=u.reject(e);return i._driverSet}));l(this._driverSet,n,r);return this._driverSet};e.prototype.supports=function e(t){return!!Ye[t]};e.prototype._extend=function e(t){ot(this,t)};e.prototype._getSupportedDrivers=function e(t){var n=[];for(var r=0,i=t.length;r<i;r++){var o=t[r];if(this.supports(o)){n.push(o)}}return n};e.prototype._wrapLibraryMethodsWithReady=function e(){for(var t=0,n=nt.length;t<n;t++){it(this,nt[t])}};e.prototype.createInstance=function t(n){return new e(n)};return e}();var st=new at;t.exports=st},{3:3}]},{},[4])(4)}))},880:function(e){!function(t,n){true?e.exports=n():0}(this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.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 i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));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="",n(n.s=90)}({17:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(18),i=function(){function e(){}return e.getFirstMatch=function(e,t){var n=t.match(e);return n&&n.length>0&&n[1]||""},e.getSecondMatch=function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||""},e.matchAndReturnConst=function(e,t,n){if(e.test(t))return n},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,n,r){void 0===r&&(r=!1);var i=e.getVersionPrecision(t),o=e.getVersionPrecision(n),a=Math.max(i,o),s=0,c=e.map([t,n],(function(t){var n=a-e.getVersionPrecision(t),r=t+new Array(n+1).join(".0");return e.map(r.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(r&&(s=a-Math.min(i,o)),a-=1;a>=s;){if(c[0][a]>c[1][a])return 1;if(c[0][a]===c[1][a]){if(a===s)return 0;a-=1}else if(c[0][a]<c[1][a])return-1}},e.map=function(e,t){var n,r=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)r.push(t(e[n]));return r},e.find=function(e,t){var n,r;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,r=e.length;n<r;n+=1){var i=e[n];if(t(i,n))return i}},e.assign=function(e){for(var t,n,r=e,i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];if(Object.assign)return Object.assign.apply(Object,[e].concat(o));var s=function(){var e=o[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){r[t]=e[t]}))};for(t=0,n=o.length;t<n;t+=1)s();return e},e.getBrowserAlias=function(e){return r.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return r.BROWSER_MAP[e]||""},e}();t.default=i,e.exports=t.default},18:function(e,t,n){"use strict";t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0;t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"};t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"};t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"};t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"};t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(91))&&r.__esModule?r:{default:r},o=n(18);function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var s=function(){function e(){}var t,n,r;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new i.default(e,t)},e.parse=function(e){return new i.default(e).getResult()},t=e,r=[{key:"BROWSER_MAP",get:function(){return o.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return o.ENGINE_MAP}},{key:"OS_MAP",get:function(){return o.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return o.PLATFORMS_MAP}}],(n=null)&&a(t.prototype,n),r&&a(t,r),e}();t.default=s,e.exports=t.default},91:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=c(n(92)),i=c(n(93)),o=c(n(94)),a=c(n(95)),s=c(n(17));
vendor: 7,013 bytes, line 2
2function c(e){return e&&e.__esModule?e:{default:e}}var u=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=s.default.find(r.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=s.default.find(i.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=s.default.find(o.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=s.default.find(a.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return s.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,n={},r=0,i={},o=0;if(Object.keys(e).forEach((function(t){var a=e[t];"string"==typeof a?(i[t]=a,o+=1):"object"==typeof a&&(n[t]=a,r+=1)})),r>0){var a=Object.keys(n),c=s.default.find(a,(function(e){return t.isOS(e)}));if(c){var u=this.satisfies(n[c]);if(void 0!==u)return u}var f=s.default.find(a,(function(e){return t.isPlatform(e)}));if(f){var l=this.satisfies(n[f]);if(void 0!==l)return l}}if(o>0){var d=Object.keys(i),h=s.default.find(d,(function(e){return t.isBrowser(e,!0)}));if(void 0!==h)return this.compareVersion(i[h])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),i=s.default.getBrowserTypeByAlias(r);return t&&i&&(r=i.toLowerCase()),r===n},t.compareVersion=function(e){var t=[0],n=e,r=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(r=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(r=!0,n=e.substr(1)),t.indexOf(s.default.compareVersions(i,n,r))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=u,e.exports=t.default},92:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r};var o=/version\/(\d+(\.?_?\d+)+)/i,a=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},n=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},n=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"}
vendor: 7,822 bytes, line 2
2,n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},n=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},n=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},n=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},n=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},n=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},n=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},n=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:"Android Browser"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}];t.default=a,e.exports=t.default},93:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18);var a=[{test:[/Roku\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:o.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=i.default.getWindowsVersionName(t);return{name:o.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:o.OS_MAP.iOS},n=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=i.default.getMacOSVersionName(t),r={name:o.OS_MAP.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:o.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=i.default.getAndroidVersionName(t),r={name:o.OS_MAP.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:o.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||i.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:o.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:o.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:o.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);
2return{name:o.OS_MAP.PlayStation4,version:t}}}];t.default=a,e.exports=t.default},94:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18);var a=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:o.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:o.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}}];t.default=a,e.exports=t.default},95:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18);var a=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:o.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:o.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:o.ENGINE_MAP.Trident},n=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:o.ENGINE_MAP.Presto},n=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:o.ENGINE_MAP.Gecko},n=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:o.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:o.ENGINE_MAP.WebKit},n=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=a,e.exports=t.default}})}))},935:(e,t,n)=>{e.exports=n(47)["default"]},992:(e,t)=>{"use strict";var n=Object.prototype.hasOwnProperty,r;function i(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function o(e){try{return encodeURIComponent(e)}catch(e){return null}}function a(e){var t=/([^=?#&]+)=?([^&]*)/g,n={},r;while(r=t.exec(e)){var o=i(r[1]),a=i(r[2]);if(o===null||a===null||o in n)continue;n[o]=a}return n}
2function s(e,t){t=t||"";var i=[],a,s;if("string"!==typeof t)t="?";for(s in e){if(n.call(e,s)){a=e[s];if(!a&&(a===null||a===r||isNaN(a))){a=""}s=o(s);a=o(a);if(s===null||a===null)continue;i.push(s+"="+a)}}return i.length?t+i.join("&"):""}t.stringify=s;t.parse=a}};var t={};function n(r){var i=t[r];if(i!==undefined){return i.exports}var o=t[r]={exports:{}};e[r].call(o.exports,o,o.exports,n);return o.exports}(()=>{n.n=e=>{var t=e&&e.__esModule?()=>e["default"]:()=>e;n.d(t,{a:t});return t}})();(()=>{n.d=(e,t)=>{for(var r in t){if(n.o(t,r)&&!n.o(e,r)){Object.defineProperty(e,r,{enumerable:true,get:t[r]})}}}})();(()=>{n.g=function(){if(typeof globalThis==="object")return globalThis;try{return this||new Function("return this")()}catch(e){if(typeof window==="object")return window}}()})();(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})();var r={};(()=>{"use strict";var e=n(935);var t=n.n(e);const r={NODE_CLIENT:false,NODE_ADMIN:false,SDK_VERSION:"${JSCORE_VERSION}"};const i=function(e,t){if(!e){throw o(t)}};const o=function(e){return new Error("Firebase Database ("+r.SDK_VERSION+") INTERNAL ASSERT FAILED: "+e)};const a=function(e){const t=[];let n=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);if(i<128){t[n++]=i}else if(i<2048){t[n++]=i>>6|192;t[n++]=i&63|128}else if((i&64512)===55296&&r+1<e.length&&(e.charCodeAt(r+1)&64512)===56320){i=65536+((i&1023)<<10)+(e.charCodeAt(++r)&1023);t[n++]=i>>18|240;t[n++]=i>>12&63|128;t[n++]=i>>6&63|128;t[n++]=i&63|128}else{t[n++]=i>>12|224;t[n++]=i>>6&63|128;t[n++]=i&63|128}}return t};const s=function(e){const t=[];let n=0,r=0;while(n<e.length){const i=e[n++];if(i<128){t[r++]=String.fromCharCode(i)}else if(i>191&&i<224){const o=e[n++];t[r++]=String.fromCharCode((i&31)<<6|o&63)}else if(i>239&&i<365){const o=e[n++];const a=e[n++];const s=e[n++];const c=((i&7)<<18|(o&63)<<12|(a&63)<<6|s&63)-65536;t[r++]=String.fromCharCode(55296+(c>>10));t[r++]=String.fromCharCode(56320+(c&1023))}else{const o=e[n++];const a=e[n++];t[r++]=String.fromCharCode((i&15)<<12|(o&63)<<6|a&63)}}return t.join("")};const c={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZ"+"abcdefghijklmnopqrstuvwxyz"+"0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob==="function",encodeByteArray(e,t){if(!Array.isArray(e)){throw Error("encodeByteArray takes an array as a parameter")}this.init_();const n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_;const r=[];for(let t=0;t<e.length;t+=3){const i=e[t];const o=t+1<e.length;const a=o?e[t+1]:0;const s=t+2<e.length;const c=s?e[t+2]:0;const u=i>>2;const f=(i&3)<<4|a>>4;let l=(a&15)<<2|c>>6;let d=c&63;if(!s){d=64;if(!o){l=64}}r.push(n[u],n[f],n[l],n[d])}return r.join("")},encodeString(e,t){if(this.HAS_NATIVE_SUPPORT&&!t){return btoa(e)}return this.encodeByteArray(a(e),t)},decodeString(e,t){if(this.HAS_NATIVE_SUPPORT&&!t){return atob(e)}return s(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();const n=t?this.charToByteMapWebSafe_:this.charToByteMap_;const r=[];for(let t=0;t<e.length;){const i=n[e.charAt(t++)];const o=t<e.length;const a=o?n[e.charAt(t)]:0;++t;const s=t<e.length;const c=s?n[e.charAt(t)]:64;++t;const f=t<e.length;const l=f?n[e.charAt(t)]:64;++t;if(i==null||a==null||c==null||l==null){throw new u}const d=i<<2|a>>4;r.push(d);if(c!==64){const e=a<<4&240|c>>2;r.push(e);if(l!==64){const e=c<<6&192|l;r.push(e)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={};this.charToByteMap_={};this.byteToCharMapWebSafe_={};this.charToByteMapWebSafe_={};for(let e=0;e<this.ENCODED_VALS.length;e++){this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e);this.charToByteMap_[this.byteToCharMap_[e]]=e;this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e);this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e;if(e>=this.ENCODED_VALS_BASE.length){this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e;this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e}}}}};
2class u extends Error{constructor(){super(...arguments);this.name="DecodeBase64StringError"}}const f=function(e){const t=a(e);return c.encodeByteArray(t,true)};const l=function(e){return f(e).replace(/\./g,"")};const d=function(e){try{return c.decodeString(e,true)}catch(e){console.error("base64Decode failed: ",e)}return null};function h(e){return p(undefined,e)}function p(e,t){if(!(t instanceof Object)){return t}switch(t.constructor){case Date:const n=t;return new Date(n.getTime());case Object:if(e===undefined){e={}}break;case Array:e=[];break;default:return t}for(const n in t){if(!t.hasOwnProperty(n)||!g(n)){continue}e[n]=p(e[n],t[n])}return e}function g(e){return e!=="__proto__"}function v(){if(typeof self!=="undefined"){return self}if(typeof window!=="undefined"){return window}if(typeof n.g!=="undefined"){return n.g}throw new Error("Unable to locate global object.")}const b=()=>v().__FIREBASE_DEFAULTS__;const m=()=>{if(typeof process==="undefined"||typeof process.env==="undefined"){return}const e=process.env.__FIREBASE_DEFAULTS__;if(e){return JSON.parse(e)}};const w=()=>{if(typeof document==="undefined"){return}let e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch(e){return}const t=e&&d(e[1]);return t&&JSON.parse(t)};const y=()=>{try{return b()||m()||w()}catch(e){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`);return}};const _=e=>{var t,n;return(n=(t=y())===null||t===void 0?void 0:t.emulatorHosts)===null||n===void 0?void 0:n[e]};const S=e=>{const t=_(e);if(!t){return undefined}const n=t.lastIndexOf(":");if(n<=0||n+1===t.length){throw new Error(`Invalid host ${t} with no separate hostname and port!`)}const r=parseInt(t.substring(n+1),10);if(t[0]==="["){return[t.substring(1,n-1),r]}else{return[t.substring(0,n),r]}};const k=()=>{var e;return(e=y())===null||e===void 0?void 0:e.config};const I=e=>{var t;return(t=y())===null||t===void 0?void 0:t[`_${e}`]};class O{constructor(){this.reject=()=>{};this.resolve=()=>{};this.promise=new Promise(((e,t)=>{this.resolve=e;this.reject=t}))}wrapCallback(e){return(t,n)=>{if(t){this.reject(t)}else{this.resolve(n)}if(typeof e==="function"){this.promise.catch((()=>{}));if(e.length===1){e(t)}else{e(t,n)}}}}}function E(e,t){if(e.uid){throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.')}const n={alg:"none",type:"JWT"};const r=t||"demo-project";const i=e.iat||0;const o=e.sub||e.user_id;if(!o){throw new Error("mockUserToken must contain 'sub' or 'user_id' field!")}const a=Object.assign({iss:`https://securetoken.google.com/${r}`,aud:r,iat:i,exp:i+3600,auth_time:i,sub:o,user_id:o,firebase:{sign_in_provider:"custom",identities:{}}},e);const s="";return[l(JSON.stringify(n)),l(JSON.stringify(a)),s].join(".")}function C(){if(typeof navigator!=="undefined"&&typeof navigator["userAgent"]==="string"){return navigator["userAgent"]}else{return""}}function M(){return typeof window!=="undefined"&&!!(window["cordova"]||window["ph
2onegap"]||window["PhoneGap"])&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(C())}function A(){var e;const t=(e=y())===null||e===void 0?void 0:e.forceEnvironment;if(t==="node"){return true}else if(t==="browser"){return false}try{return Object.prototype.toString.call(n.g.process)==="[object process]"}catch(e){return false}}function P(){return typeof window!=="undefined"||T()}function T(){return typeof WorkerGlobalScope!=="undefined"&&typeof self!=="undefined"&&self instanceof WorkerGlobalScope}function N(){return typeof navigator!=="undefined"&&navigator.userAgent==="Cloudflare-Workers"}function D(){const e=typeof chrome==="object"?chrome.runtime:typeof browser==="object"?browser.runtime:undefined;return typeof e==="object"&&e.id!==undefined}function R(){return typeof navigator==="object"&&navigator["product"]==="ReactNative"}function j(){return C().indexOf("Electron/")>=0}function x(){const e=C();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0}function F(){return C().indexOf("MSAppHost/")>=0}function B(){return r.NODE_CLIENT===true||r.NODE_ADMIN===true}function L(){return!A()&&!!navigator.userAgent&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}function W(){try{return typeof indexedDB==="object"}catch(e){return false}}function U(){return new Promise(((e,t)=>{try{let n=true;const r="validate-browser-context-for-indexeddb-analytics-module";const i=self.indexedDB.open(r);i.onsuccess=()=>{i.result.close();if(!n){self.indexedDB.deleteDatabase(r)}e(true)};i.onupgradeneeded=()=>{n=false};i.onerror=()=>{var e;t(((e=i.error)===null||e===void 0?void 0:e.message)||"")}}catch(e){t(e)}}))}function z(){if(typeof navigator==="undefined"||!navigator.cookieEnabled){return false}return true}const K="FirebaseError";
2class H extends Error{constructor(e,t,n){super(t);this.code=e;this.customData=n;this.name=K;Object.setPrototypeOf(this,H.prototype);if(Error.captureStackTrace){Error.captureStackTrace(this,$.prototype.create)}}}class ${constructor(e,t,n){this.service=e;this.serviceName=t;this.errors=n}create(e,...t){const n=t[0]||{};const r=`${this.service}/${e}`;const i=this.errors[e];const o=i?V(i,n):"Error";const a=`${this.serviceName}: ${o} (${r}).`;const s=new H(r,a,n);return s}}function V(e,t){return e.replace(q,((e,n)=>{const r=t[n];return r!=null?String(r):`<${n}?>`}))}const q=/\{\$([^}]+)}/g;function G(e){return JSON.parse(e)}function J(e){return JSON.stringify(e)}const X=function(e){let t={},n={},r={},i="";try{const o=e.split(".");t=G(d(o[0])||"");n=G(d(o[1])||"");i=o[2];r=n["d"]||{};delete n["d"]}catch(e){}return{header:t,claims:n,data:r,signature:i}};const Q=function(e){const t=X(e).claims;const n=Math.floor((new Date).getTime()/1e3);let r=0,i=0;if(typeof t==="object"){if(t.hasOwnProperty("nbf")){r=t["nbf"]}else if(t.hasOwnProperty("iat")){r=t["iat"]}if(t.hasOwnProperty("exp")){i=t["exp"]}else{i=r+86400}}return!!n&&!!r&&!!i&&n>=r&&n<=i};const Y=function(e){const t=X(e).claims;if(typeof t==="object"&&t.hasOwnProperty("iat")){return t["iat"]}return null};const Z=function(e){const t=X(e),n=t.claims;return!!n&&typeof n==="object"&&n.hasOwnProperty("iat")};const ee=function(e){const t=X(e).claims;return typeof t==="object"&&t["admin"]===true};function te(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function ne(e,t){if(Object.prototype.hasOwnProperty.call(e,t)){return e[t]}else{return undefined}}function re(e){for(const t in e){if(Object.prototype.hasOwnProperty.call(e,t)){return false}}return true}function ie(e,t,n){const r={};for(const i in e){if(Object.prototype.hasOwnProperty.call(e,i)){r[i]=t.call(n,e[i],i,e)}}return r}function oe(e,t){if(e===t){return true}const n=Object.keys(e);const r=Object.keys(t);for(const i of n){if(!r.includes(i)){return false}const n=e[i];const o=t[i];if(ae(n)&&ae(o)){if(!oe(n,o)){return false}}else if(n!==o){return false}}for(const e of r){if(!n.includes(e)){return false}}return true}function ae(e){return e!==null&&typeof e==="object"}function se(e,t=2e3){const n=new O;setTimeout((()=>n.reject("timeout!")),t);e.then(n.resolve,n.reject);return n.promise}function ce(e){const t=[];for(const[n,r]of Object.entries(e)){if(Array.isArray(r)){r.forEach((e=>{t.push(encodeURIComponent(n)+"="+encodeURIComponent(e))}))}else{t.push(encodeURIComponent(n)+"="+encodeURIComponent(r))}}return t.length?"&"+t.join("&"):""}function ue(e){const t={};const n=e.replace(/^\?/,"").split("&");n.forEach((e=>{if(e){const[n,r]=e.split("=");
2t[decodeURIComponent(n)]=decodeURIComponent(r)}}));return t}function fe(e){const t=e.indexOf("?");if(!t){return""}const n=e.indexOf("#",t);return e.substring(t,n>0?n:undefined)}class le{constructor(){this.chain_=[];this.buf_=[];this.W_=[];this.pad_=[];this.inbuf_=0;this.total_=0;this.blockSize=512/8;this.pad_[0]=128;for(let e=1;e<this.blockSize;++e){this.pad_[e]=0}this.reset()}reset(){this.chain_[0]=1732584193;this.chain_[1]=4023233417;this.chain_[2]=2562383102;this.chain_[3]=271733878;this.chain_[4]=3285377520;this.inbuf_=0;this.total_=0}compress_(e,t){if(!t){t=0}const n=this.W_;if(typeof e==="string"){for(let r=0;r<16;r++){n[r]=e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|e.charCodeAt(t+3);t+=4}}else{for(let r=0;r<16;r++){n[r]=e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3];t+=4}}for(let e=16;e<80;e++){const t=n[e-3]^n[e-8]^n[e-14]^n[e-16];n[e]=(t<<1|t>>>31)&4294967295}let r=this.chain_[0];let i=this.chain_[1];let o=this.chain_[2];let a=this.chain_[3];let s=this.chain_[4];let c,u;for(let e=0;e<80;e++){if(e<40){if(e<20){c=a^i&(o^a);u=1518500249}else{c=i^o^a;u=1859775393}}else{if(e<60){c=i&o|a&(i|o);u=2400959708}else{c=i^o^a;u=3395469782}}const t=(r<<5|r>>>27)+c+s+u+n[e]&4294967295;s=a;a=o;o=(i<<30|i>>>2)&4294967295;i=r;r=t}this.chain_[0]=this.chain_[0]+r&4294967295;this.chain_[1]=this.chain_[1]+i&4294967295;this.chain_[2]=this.chain_[2]+o&4294967295;this.chain_[3]=this.chain_[3]+a&4294967295;this.chain_[4]=this.chain_[4]+s&4294967295}update(e,t){if(e==null){return}if(t===undefined){t=e.length}const n=t-this.blockSize;let r=0;const i=this.buf_;let o=this.inbuf_;while(r<t){if(o===0){while(r<=n){this.compress_(e,r);r+=this.blockSize}}if(typeof e==="string"){while(r<t){i[o]=e.charCodeAt(r);++o;++r;if(o===this.blockSize){this.compress_(i);o=0;break}}}else{while(r<t){i[o]=e[r];++o;++r;if(o===this.blockSize){this.compress_(i);o=0;break}}}}this.inbuf_=o;this.total_+=t}digest(){const e=[];let t=this.total_*8;if(this.inbuf_<56){this.update(this.pad_,56-this.inbuf_)}else{this.update(this.pad_,this.blockSize-(this.inbuf_-56))}for(let e=this.blockSize-1;e>=56;e--){this.buf_[e]=t&255;t/=256}this.compress_(this.buf_);let n=0;for(let t=0;t<5;t++){for(let r=24;r>=0;r-=8){e[n]=this.chain_[t]>>r&255;++n}}return e}}function de(e,t){const n=new he(e,t);return n.subscribe.bind(n)}class he{constructor(e,t){this.observers=[];this.unsubscribes=[];this.observerCount=0;this.task=Promise.resolve();this.finalized=false;this.onNoObservers=t;this.task.then((()=>{e(this)})).catch((e=>{this.error(e)}))}next(e){this.forEachObserver((t=>{t.next(e)}))}error(e){this.forEachObserver((t=>{t.error(e)}));this.close(e)}complete(){this.forEachObserver((e=>{e.complete()}));this.close()}subscribe(e,t,n){let r;if(e===undefined&&t===undefined&&n===undefined){throw new Error("Missing Observer.")}if(ge(e,["next","error","complete"])){r=e}else{r={next:e,error:t,complete:n}}if(r.next===undefined){r.next=ve}if(r.error===undefined){r.error=ve}if(r.complete===undefined){r.complete=ve}const i=this.unsubscribeOne.bind(this,this.observers.length);if(this.finalized){this.task.then((()=>{try{if(this.finalError){r.error(this.finalError)}else{r.complete()}}catch(e){}return}))}this.observers.push(r);return i}unsubscribeOne(e){if(this.observers===undefined||this.observers[e]===undefined){return}delete this.observers[e];this.observerCount-=1;if(this.observerCount===0&&this.onNoObservers!==undefined){this.onNoObservers(this)}}forEachObserver(e){if(this.finalized){return}for(let t=0;t<this.observers.length;t++){this.sendOne(t,e)}}sendOne(e,t){this.task.then((()=>
2{if(this.observers!==undefined&&this.observers[e]!==undefined){try{t(this.observers[e])}catch(e){if(typeof console!=="undefined"&&console.error){console.error(e)}}}}))}close(e){if(this.finalized){return}this.finalized=true;if(e!==undefined){this.finalError=e}this.task.then((()=>{this.observers=undefined;this.onNoObservers=undefined}))}}function pe(e,t){return(...n)=>{Promise.resolve(true).then((()=>{e(...n)})).catch((e=>{if(t){t(e)}}))}}function ge(e,t){if(typeof e!=="object"||e===null){return false}for(const n of t){if(n in e&&typeof e[n]==="function"){return true}}return false}function ve(){}const be=function(e,t,n,r){let i;if(r<t){i="at least "+t}else if(r>n){i=n===0?"none":"no more than "+n}if(i){const t=e+" failed: Was called with "+r+(r===1?" argument.":" arguments.")+" Expects "+i+".";throw new Error(t)}};function me(e,t){return`${e} failed: ${t} argument `}function we(e,t,n){if(n&&!t){return}if(typeof t!=="string"){throw new Error(me(e,"namespace")+"must be a valid firebase namespace.")}}function ye(e,t,n,r){if(r&&!n){return}if(typeof n!=="function"){throw new Error(me(e,t)+"must be a valid function.")}}function _e(e,t,n,r){if(r&&!n){return}if(typeof n!=="object"||n===null){throw new Error(me(e,t)+"must be a valid context object.")}}const Se=function(e){const t=[];let n=0;for(let r=0;r<e.length;r++){let o=e.charCodeAt(r);if(o>=55296&&o<=56319){const t=o-55296;r++;i(r<e.length,"Surrogate pair missing trail surrogate.");const n=e.charCodeAt(r)-56320;o=65536+(t<<10)+n}if(o<128){t[n++]=o}else if(o<2048){t[n++]=o>>6|192;t[n++]=o&63|128}else if(o<65536){t[n++]=o>>12|224;t[n++]=o>>6&63|128;t[n++]=o&63|128}else{t[n++]=o>>18|240;t[n++]=o>>12&63|128;t[n++]=o>>6&63|128;t[n++]=o&63|128}}return t};const ke=function(e){let t=0;for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);if(r<128){t++}else if(r<2048){t+=2}else if(r>=55296&&r<=56319){t+=4;n++}else{t+=3}}return t};const Ie=1e3;const Oe=2;const Ee=null&&4*60*60*1e3;const Ce=.5;function Me(e,t=Ie,n=Oe){const r=t*Math.pow(n,e);const i=Math.round(Ce*r*(Math.random()-.5)*2);return Math.min(Ee,r+i)}function Ae(e){if(!Number.isFinite(e)){return`${e}`}return e+Pe(e)}function Pe(e){e=Math.abs(e);const t=e%100;if(t>=10&&t<=20){return"th"}const n=e%10;if(n===1){return"st"}if(n===2){return"nd"}if(n===3){return"rd"}return"th"}function Te(e){if(e&&e._delegate){return e._delegate}else{return e}}class Ne{constructor(e,t,n){this.name=e;this.instanceFactory=t;this.type=n;this.multipleInstances=false;this.serviceProps={};this.instantiationMode="LAZY";this.onInstanceCreated=null}setInstantiationMode(e){this.instantiationMode=e;return this}setMultipleInstances(e){this.multipleInstances=e;return this}setServiceProps(e){this.serviceProps=e;return this}setInstanceCreatedCallback(e){this.onInstanceCreated=e;return this}}const De="[DEFAULT]";class Re{constructor(e,t){this.name=e;this.container=t;this.component=null;this.instances=new Map;this.instancesDeferred=new Map;this.instancesOptions=new Map;this.onInitCallbacks=new Map}get(e){const t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){const e=new O;this.instancesDeferred.set(t,e);if(this.isInitialized(t)||this.shouldAutoInitialize()){try{const n=this.getOrInitializeService({instanceIdentifier:t});if(n){e.resolve(n)}}catch(e){}}}return this.instancesDeferred.get(t).promise}getImmediate(e){var t;const n=this.normalizeInstanceIdentifier(e===null||e===void 0?void 0:e.identifier);const r=(t=e===null||e===void 0?void 0:e.optional)!==null&&t!==void 0?t:false;if(this.isInitialized(n)||this.shouldAutoInitialize()){try{return this.getOrInitializeService({instanceIdentifier:n})}catch(e){if(r){return null}else{throw e}}}else{if(r){return null}else{throw Error(`Service ${this.name} is not available`)}}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name){throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`)}if(this.component){throw Error(`Component for ${this.name} has already been provided`)}this.component=e;if(!this.shouldAutoInitialize()){return}if(xe(e)){try{this.getOrInitializeService({instanceIdentifier:De})}catch(e){}}for(const[e,t]of this.instancesDeferred.entries()){const n=this.normalizeInstanceIdentifier(e);try{const e=this.getOrInitializeService({instanceIdentifier:n});t.resolve(e)}catch(e){}}}clearInstance(e=De){this.instancesDeferred.delete(e);this.instancesOptions.delete(e);this.instances.delete(e)}async delete(){const e=Array.from(this.instances.values());await Promise.all([...e.filter((e=>"INTERNAL"in e)).map((e=>e.INTERNAL.delete())),...e.filter((e=>"_delete"in e)).map((e=>e._delete()))])}isComponentSet(){return this.component!=null}isInitialized(e=De){return this.instances.has(e)}getOptions(e=De){return this.instancesOptions.get(e)||{}}initialize(e={}){const{options:t={}}=e;const n=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(n)){throw Error(`${this.name}(${n}) has already been initialized`)}if(!this.isComponentSet()){throw Error(`Component ${this.name} has not been registered yet`)}const r=this.getOrInitializeService({instanceIdentifier:n,options:t});for(const[e,t]of this.instancesDeferred.entries()){const i=this.normalizeInstanceIdentifier(e);if(n===i){t.resolve(r)}}return r}onInit(e,t){var n;const r=this.normalizeInstanceIdentifier(t);const i=(n=this.onInitCallbacks.get(r))!==null&&n!==void 0?n:new Set;i.add(e);this.onInitCallbacks.set(r,i);const o=this.instances.get(r);if(o){e(o,r)}return()=>{i.delete(e)}}invokeOnInitCallbacks(e,t){const n=this.onInitCallbacks.get(t);if(!n){return}for(const r of n){try{r(e,t)}catch(e){}}}getOrInitializeService({instanceIdentifier:e,options:t={}}){let n=this.instances.get(e);if(!n&&this.component){n=this.component.instanceFactory(this.container,{instanceIdentifier:je(e),options:t});this.instances.set(e,n);this.instancesOptions.set(e,t);this.invokeOnInitCallbacks(n,e);if(this.component.onInstanceCreated){try{this.component.onInstanceCreated(this.container,e,n)}catch(e){}}}return n||null}normalizeInstanceIdentifier(e=De){if(this.component){return this.component.multipleInstances?e:De}else{return e}}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}}function je(e){return e===De?undefined:e}function xe(e){return e.instantiationMode==="EAGER"}class Fe{constructor(e){this.name=e;this.providers=new Map}addComponent(e){const t=this.getProvider(e.name);if(t.isComponentSet()){throw new Error(`Component ${e.name} has already been registered with ${this.name}`)}t.setComponent(e)}addOrOverwriteComponent(e){const t=this.getProvider(e.name);if(t.isComponentSet()){this.providers.delete(e.name)}
2this.addComponent(e)}getProvider(e){if(this.providers.has(e)){return this.providers.get(e)}const t=new Re(e,this);this.providers.set(e,t);return t}getProviders(){return Array.from(this.providers.values())}}const Be=[];var Le;(function(e){e[e["DEBUG"]=0]="DEBUG";e[e["VERBOSE"]=1]="VERBOSE";e[e["INFO"]=2]="INFO";e[e["WARN"]=3]="WARN";e[e["ERROR"]=4]="ERROR";e[e["SILENT"]=5]="SILENT"})(Le||(Le={}));const We={debug:Le.DEBUG,verbose:Le.VERBOSE,info:Le.INFO,warn:Le.WARN,error:Le.ERROR,silent:Le.SILENT};const Ue=Le.INFO;const ze={[Le.DEBUG]:"log",[Le.VERBOSE]:"log",[Le.INFO]:"info",[Le.WARN]:"warn",[Le.ERROR]:"error"};const Ke=(e,t,...n)=>{if(t<e.logLevel){return}const r=(new Date).toISOString();const i=ze[t];if(i){console[i](`[${r}]  ${e.name}:`,...n)}else{throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`)}};class He{constructor(e){this.name=e;this._logLevel=Ue;this._logHandler=Ke;this._userLogHandler=null;Be.push(this)}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in Le)){throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``)}this._logLevel=e}setLogLevel(e){this._logLevel=typeof e==="string"?We[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if(typeof e!=="function"){throw new TypeError("Value assigned to `logHandler` must be a function")}this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,Le.DEBUG,...e);this._logHandler(this,Le.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,Le.VERBOSE,...e);this._logHandler(this,Le.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,Le.INFO,...e);this._logHandler(this,Le.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,Le.WARN,...e);this._logHandler(this,Le.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,Le.ERROR,...e);this._logHandler(this,Le.ERROR,...e)}}function $e(e){Be.forEach((t=>{t.setLogLevel(e)}))}function Ve(e,t){for(const n of Be){let r=null;if(t&&t.level){r=We[t.level]}if(e===null){n.userLogHandler=null}else{n.userLogHandler=(t,n,...i)=>{const o=i.map((e=>{if(e==null){return null}else if(typeof e==="string"){return e}else if(typeof e==="number"||typeof e==="boolean"){return e.toString()}else if(e instanceof Error){return e.message}else{try{return JSON.stringify(e)}catch(e){return null}}})).filter((e=>e)).join(" ");if(n>=(r!==null&&r!==void 0?r:t.logLevel)){e({level:Le[n].toLowerCase(),message:o,args:i,type:t.name})}}}}}const qe=(e,t)=>t.some((t=>e instanceof t));let Ge;let Je;function Xe(){return Ge||(Ge=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Qe(){return Je||(Je=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Ye=new WeakMap;const Ze=new WeakMap;const et=new WeakMap;const tt=new WeakMap;const nt=new WeakMap;function rt(e){const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("success",i);e.removeEventListener("error",o)};const i=()=>{t(ut(e.result));r()};const o=()=>{n(e.error);r()};e.addEventListener("success",i);e.addEventListener("error",o)}));t.then((t=>{if(t instanceof IDBCursor){Ye.set(t,e)}})).catch((()=>{}));nt.set(t,e);return t}function it(e){if(Ze.has(e))return;const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("complete",i);e.removeEventListener("error",o);e.removeEventListener("abort",o)};const i=()=>{t();r()};const o=()=>{n(e.error||new DOMException("AbortError","AbortError"));r()};e.addEventListener("complete",i);e.addEventListener("error",o);e.addEventListener("abort",o)}));Ze.set(e,t)}let ot={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return Ze.get(e);if(t==="objectStoreNames"){return e.objectStoreNames||et.get(e)}if(t==="store"){return n.objectStoreNames[1]?undefined:n.objectStore(n.objectStoreNames[0])}}return ut(e[t])},set(e,t,n){e[t]=n;return true},has(e,t){if(e instanceof IDBTransaction&&(t==="done"||t==="store")){return true}return t in e}};function at(e){ot=e(ot)}function st(e){if(e===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)){return function(t,...n){const r=e.call(ft(this),t,...n);et.set(r,t.sort?t.sort():[t]);return ut(r)}}if(Qe().includes(e)){return function(...t){e.apply(ft(this),t);return ut(Ye.get(this))}}return function(...t){return ut(e.apply(ft(this),t))}}function ct(e){if(typeof e==="function")return st(e);
2if(e instanceof IDBTransaction)it(e);if(qe(e,Xe()))return new Proxy(e,ot);return e}function ut(e){if(e instanceof IDBRequest)return rt(e);if(tt.has(e))return tt.get(e);const t=ct(e);if(t!==e){tt.set(e,t);nt.set(t,e)}return t}const ft=e=>nt.get(e);function lt(e,t,{blocked:n,upgrade:r,blocking:i,terminated:o}={}){const a=indexedDB.open(e,t);const s=ut(a);if(r){a.addEventListener("upgradeneeded",(e=>{r(ut(a.result),e.oldVersion,e.newVersion,ut(a.transaction),e)}))}if(n){a.addEventListener("blocked",(e=>n(e.oldVersion,e.newVersion,e)))}s.then((e=>{if(o)e.addEventListener("close",(()=>o()));if(i){e.addEventListener("versionchange",(e=>i(e.oldVersion,e.newVersion,e)))}})).catch((()=>{}));return s}function dt(e,{blocked:t}={}){const n=indexedDB.deleteDatabase(e);if(t){n.addEventListener("blocked",(e=>t(e.oldVersion,e)))}return ut(n).then((()=>undefined))}const ht=["get","getKey","getAll","getAllKeys","count"];const pt=["put","add","delete","clear"];const gt=new Map;function vt(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t==="string")){return}if(gt.get(t))return gt.get(t);const n=t.replace(/FromIndex$/,"");const r=t!==n;const i=pt.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||ht.includes(n))){return}const o=async function(e,...t){const o=this.transaction(e,i?"readwrite":"readonly");let a=o.store;if(r)a=a.index(t.shift());return(await Promise.all([a[n](...t),i&&o.done]))[0]};gt.set(t,o);return o}at((e=>({...e,get:(t,n,r)=>vt(t,n)||e.get(t,n,r),has:(t,n)=>!!vt(t,n)||e.has(t,n)})));class bt{constructor(e){this.container=e}getPlatformInfoString(){const e=this.container.getProviders();return e.map((e=>{if(mt(e)){const t=e.getImmediate();return`${t.library}/${t.version}`}else{return null}})).filter((e=>e)).join(" ")}}function mt(e){const t=e.getComponent();return(t===null||t===void 0?void 0:t.type)==="VERSION"}const wt="@firebase/app";const yt="0.11.1";const _t=new He("@firebase/app");const St="@firebase/app-compat";const kt="@firebase/analytics-compat";const It="@firebase/analytics";const Ot="@firebase/app-check-compat";const Et="@firebase/app-check";const Ct="@firebase/auth";const Mt="@firebase/auth-compat";const At="@firebase/database";const Pt="@firebase/data-connect";const Tt="@firebase/database-compat";const Nt="@firebase/functions";const Dt="@firebase/functions-compat";const Rt="@firebase/installations";const jt="@firebase/installations-compat";const xt="@firebase/messaging";const Ft="@firebase/messaging-compat";const Bt="@firebase/performance";const Lt="@firebase/performance-compat";const Wt="@firebase/remote-config";const Ut="@firebase/remote-config-compat";const zt="@firebase/storage";const Kt="@firebase/storage-compat";const Ht="@firebase/firestore";const $t="@firebase/vertexai";const Vt="@firebase/firestore-compat";const qt="firebase";const Gt="11.3.1";const Jt="[DEFAULT]";const Xt={[wt]:"fire-core",[St]:"fire-core-compat",[It]:"fire-analytics",[kt]:"fire-analytics-compat",[Et]:"fire-app-check",[Ot]:"fire-app-check-compat",[Ct]:"fire-auth",[Mt]:"fire-auth-compat",[At]:"fire-rtdb",[Pt]:"fire-data-connect",[Tt]:"fire-rtdb-compat",[Nt]:"fire-fn",[Dt]:"fire-fn-compat",[Rt]:"fire-iid",[jt]:"fire-iid-compat",[xt]:"fire-fcm",[Ft]:"fire-fcm-compat",[Bt]:"fire-perf",[Lt]:"fire-perf-compat",[Wt]:"fire-rc",[Ut]:"fire-rc-compat",[zt]:"fire-gcs",[Kt]:"fire-g
2cs-compat",[Ht]:"fire-fst",[Vt]:"fire-fst-compat",[$t]:"fire-vertex","fire-js":"fire-js",[qt]:"fire-js-all"};const Qt=new Map;const Yt=new Map;const Zt=new Map;function en(e,t){try{e.container.addComponent(t)}catch(n){_t.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,n)}}function tn(e,t){e.container.addOrOverwriteComponent(t)}function nn(e){const t=e.name;if(Zt.has(t)){_t.debug(`There were multiple attempts to register component ${t}.`);return false}Zt.set(t,e);for(const t of Qt.values()){en(t,e)}for(const t of Yt.values()){en(t,e)}return true}function rn(e,t){const n=e.container.getProvider("heartbeat").getImmediate({optional:true});if(n){void n.triggerHeartbeat()}return e.container.getProvider(t)}function on(e,t,n=Jt){rn(e,t).clearInstance(n)}function an(e){return e.options!==undefined}function sn(e){if(e===null||e===undefined){return false}return e.settings!==undefined}function cn(){Zt.clear()}const un={["no-app"]:"No Firebase App '{$appName}' has been created - "+"call initializeApp() first",["bad-app-name"]:"Illegal App name: '{$appName}'",["duplicate-app"]:"Firebase App named '{$appName}' already exists with different options or config",["app-deleted"]:"Firebase App named '{$appName}' already deleted",["server-app-deleted"]:"Firebase Server App has been deleted",["no-options"]:"Need to provide options, when not being deployed to hosting via source.",["invalid-app-argument"]:"firebase.{$appName}() takes either no argument or a "+"Firebase App instance.",["invalid-log-argument"]:"First argument to `onLog` must be null or a function.",["idb-open"]:"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.",["idb-get"]:"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.",["idb-set"]:"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.",["idb-delete"]:"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.",["finalization-registry-not-supported"]:"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.",["invalid-server-app-environment"]:"FirebaseServerApp is not for use in browser environments."};const fn=new $("app","Firebase",un);class ln{constructor(e,t,n){this._isDeleted=false;this._options=Object.assign({},e);this._config=Object.assign({},t);this._name=t.name;this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled;this._container=n;this.container.addComponent(new Ne("app",(()=>this),"PUBLIC"))}get automaticDataCollectionEnabled(){this.checkDestroyed();return this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed();this._automaticDataCollectionEnabled=e}get name(){this.checkDestroyed();return this._name}get options(){this.checkDestroyed();return this._options}get config(){this.checkDestroyed();return this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted){throw fn.create("app-deleted",{appName:this._name})}}}function dn(e,t){const n=d(e.split(".")[1]);if(n===null){console.error(`FirebaseServerApp ${t} is invalid: second part could not be parsed.`);return}const r=JSON.parse(n).exp;if(r===undefined){console.error(`FirebaseServerApp ${t} is invalid: expiration claim could not be parsed`);return}const i=JSON.parse(n).exp*1e3;const o=(new Date).getTime();const a=i-o;if(a<=0){console.error(`FirebaseServerApp ${t} is invalid: the token has expired.`)}}class hn extends ln{constructor(e,t,n,r){const i=t.automaticDataCollectionEnabled!==undefined?t.automaticDataCollectionEnabled:false;const o={name:n,automaticDataCollectionEnabled:i};if(e.apiKey!==undefined){super(e,o,r)}else{const t=e;super(t.options,o,r)}this._serverConfig=Object.assign({automaticDataCollectionEnabled:i},t);if(this._serverConfig.authIdToken){dn(this._serverConfig.authIdToken,"authIdToken")}if(this._serverConfig.appCheckToken){dn(this._serverConfig.appCheckToken,"appCheckToken")}this._finalizationRegistry=null;if(typeof FinalizationRegistry!=="undefined"){this._finalizationRegistry=new FinalizationRegistry((()=>{this.automaticCleanup()}))}this._refCount=0;this.incRefCount(this._serverConfig.releaseOnDeref);this._serverConfig.releaseOnDeref=undefined;t.releaseOnDeref=undefined;yn(wt,yt,"serverapp")}toJSON(){return undefined}get refCount(){return this._refCount}incRefCount(e){if(this.isDeleted){return}this._refCount++;
2if(e!==undefined&&this._finalizationRegistry!==null){this._finalizationRegistry.register(e,this)}}decRefCount(){if(this.isDeleted){return 0}return--this._refCount}automaticCleanup(){void wn(this)}get settings(){this.checkDestroyed();return this._serverConfig}checkDestroyed(){if(this.isDeleted){throw fn.create("server-app-deleted")}}}const pn=null&&Gt;function gn(e,t={}){let n=e;if(typeof t!=="object"){const e=t;t={name:e}}const r=Object.assign({name:Jt,automaticDataCollectionEnabled:false},t);const i=r.name;if(typeof i!=="string"||!i){throw fn.create("bad-app-name",{appName:String(i)})}n||(n=k());if(!n){throw fn.create("no-options")}const o=Qt.get(i);if(o){if(oe(n,o.options)&&oe(r,o.config)){return o}else{throw fn.create("duplicate-app",{appName:i})}}const a=new Fe(i);for(const e of Zt.values()){a.addComponent(e)}const s=new ln(n,r,a);Qt.set(i,s);return s}function vn(e,t){if(isBrowser()&&!isWebWorker()){throw fn.create("invalid-server-app-environment")}if(t.automaticDataCollectionEnabled===undefined){t.automaticDataCollectionEnabled=false}let n;if(an(e)){n=e.options}else{n=e}const r=Object.assign(Object.assign({},t),n);if(r.releaseOnDeref!==undefined){delete r.releaseOnDeref}const i=e=>[...e].reduce(((e,t)=>Math.imul(31,e)+t.charCodeAt(0)|0),0);if(t.releaseOnDeref!==undefined){if(typeof FinalizationRegistry==="undefined"){throw fn.create("finalization-registry-not-supported",{})}}const o=""+i(JSON.stringify(r));const a=Yt.get(o);if(a){a.incRefCount(t.releaseOnDeref);return a}const s=new ComponentContainer(o);for(const e of Zt.values()){s.addComponent(e)}const c=new hn(n,t,o,s);Yt.set(o,c);return c}function bn(e=Jt){const t=Qt.get(e);if(!t&&e===Jt&&k()){return gn()}if(!t){throw fn.create("no-app",{appName:e})}return t}function mn(){return Array.from(Qt.values())}async function wn(e){let t=false;const n=e.name;if(Qt.has(n)){t=true;Qt.delete(n)}else if(Yt.has(n)){const r=e;if(r.decRefCount()<=0){Yt.delete(n);t=true}}if(t){await Promise.all(e.container.getProviders().map((e=>e.delete())));e.isDeleted=true}}function yn(e,t,n){var r;let i=(r=Xt[e])!==null&&r!==void 0?r:e;if(n){i+=`-${n}`}const o=i.match(/\s|\//);const a=t.match(/\s|\//);if(o||a){const e=[`Unable to register library "${i}" with version "${t}":`];if(o){e.push(`library name "${i}" contains illegal characters (whitespace or "/")`)}if(o&&a){e.push("and")}if(a){e.push(`version name "${t}" contains illegal characters (whitespace or "/")`)}_t.warn(e.join(" "));return}nn(new Ne(`${i}-version`,(()=>({library:i,version:t})),"VERSION"))}function _n(e,t){if(e!==null&&typeof e!=="function"){throw fn.create("invalid-log-argument")}setUserLogHandler(e,t)}function Sn(e){setLogLevel$1(e)}const kn="firebase-heartbeat-database";const In=1;const On="firebase-heartbeat-store";let En=null;function Cn(){if(!En){En=lt(kn,In,{upgrade:(e,t)=>{switch(t){case 0:try{e.createObjectStore(On)}catch(e){console.warn(e)}}}}).catch((e=>{throw fn.create("idb-open",{originalErrorMessage:e.message})}))}return En}async function Mn(e){try{const t=await Cn();const n=t.transaction(On);const r=await n.objectStore(On).get(Pn(e));await n.done;return r}catch(e){if(e instanceof H){_t.warn(e.message)}else{const t=fn.create("idb-get",{originalErrorMessage:e===null||e===void 0?void 0:e.message});_t.warn(t.message)}}}async function An(e,t){try{const n=await Cn();const r=n.transaction(On,"readwrite");const i=r.objectStore(On);await i.put(t,Pn(e));await r.done}catch(e){if(e instanceof H){_t.warn(e.message)}else{const t=fn.create("idb-set",{originalErrorMessage:e===null||e===void 0?void 0:e.message});_t.warn(t.message)}}}function Pn(e){return`${e.name}!${e.options.appId}`}const Tn=1024;const Nn=30;class Dn{constructor(e){this.container=e;this._heartbeatsCache=null;const t=this.container.getProvider("app").getImmediate();this._storage=new xn(t);this._heartbeatsCachePromise=this._storage.read().then((e=>{this._heartbeatsCache=e;return e}))}async triggerHeartbeat(){var e,t;try{const n=this.container.getProvider("platform-logger").getImmediate();const r=n.getPlatformInfoString();const i=Rn();if(((e=this._heartbeatsCache)===null||e===void 0?void 0:e.heartbeats)==null){this._heartbeatsCache=await this._heartbeatsCachePromise;if(((t=this._heartbeatsCache)===null||t===void 0?void 0:t.heartbeats)==null){return}}if(this._heartbeatsCache.lastSentHeartbeatDate===i||this._heartbeatsCache.heartbeats.some((e=>e.date===i))){return}else{this._heartbeatsCache.heartbeats.push({date:i,agent:r});if(this._heartbeatsCache.heartbeats.length>Nn){const e=Bn(this._heartbeatsCache.heartbeats);this._heartbeatsCache.heartbeats.splice(e,1)}}return this._storage.overwrite(this._heartbeatsCache)}catch(e){_t.warn(e)}}async getHeartbeatsHeader(){var e;try{if(this._heartbeatsCache===null){await this._heartbeatsCachePromise}if(((e=this._heartbeatsCache)===null||e===void 0?void 0:e.heartbeats)==null||this._heartbeatsCache.heartbeats.length===0){return""}const t=Rn();const{heartbeatsToSend:n,unsentEntries:r}=jn(this._heartbeatsCache.heartbeats);const i=l(JSON.stringify({version:2,heartbeats:n}));this._heartbeatsCache.lastSentHeartbeatDate=t;if(r.length>0){this._heartbeatsCache.heartbeats=r;await this._storage.overwrite(this._heartbeatsCache)}else{this._heartbeatsCache.heartbeats=[];void this._storage.overwrite(this._heartbeatsCache)}return i}catch(e){_t.warn(e);return""}}}function Rn(){const e=new Date;return e.toISOString().substring(0,10)}function jn(e,t=Tn){const n=[];let r=e.slice();for(const i of e){const e=n.find((e=>e.agent===i.agent));if(!e){n.push({agent:i.agent,dates:[i.date]});if(Fn(n)>t){n.pop();break}}else{e.dates.push(i.date);if(Fn(n)>t){e.dates.pop();break}}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}class xn{constructor(e){this.app=e;this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){if(!W()){return false}else{return U().then((()=>true)).catch((()=>false))}}async read(){const e=await this._canUseIndexedDBPromise;if(!e){return{heartbeats:[]}}else{const e=await Mn(this.app);if(e===null||e===void 0?void 0:e.heartbeats){return e}else{return{heartbeats:[]}}}}async overwrite(e){var t;const n=await this._canUseIndexedDBPromise;if(!n){return}else{const n=await this.read();return An(this.app,{lastSentHeartbeatDate:(t=e.lastSentHeartbeatDate)!==null&&t!==void 0?t:n.lastSentHeartbeatDate,heartbeats:e.heartbeats})}}async add(e){var t;const n=await this._canUseIndexedDBPromise;if(!n){return}else{const n=await this.read();return An(this.app,{lastSentHeartbeatDate:(t=e.lastSentHeartbeatDate)!==null&&t!==void 0?t:n.lastSentHeartbeatDate,heartbeats:[...n.heartbeats,...e.heartbeats]})}}}function Fn(e){return l(JSON.stringify({version:2,heartbeats:e})).length}function Bn(e){if(e.length===0){return-1}let t=0;let n=e[0].date;for(let r=1;r<e.length;r++){if(e[r].date<n){n=e[r].date;t=r}}return t}function Ln(e){nn(new Ne("platform-logger",(e=>new bt(e)),"PRIVATE"));nn(new Ne("heartbeat",(e=>new Dn(e)),"PRIVATE"));yn(wt,yt,e);yn(wt,yt,"esm2017");yn("fire-js","")}Ln("");const Wn="@firebase/installations";const Un="0.6.12";const zn=1e4;const Kn=`w:${Un}`;const Hn="FIS_v2";const $n="https://firebaseinstallations.googleapis.com/v1";const Vn=60*60*1e3;const qn="installations";const Gn="Installations";const Jn={["missing-app-config-values"]:'Missing App configuration value: "{$valueName}"',["not-registered"]:"Firebase Installation is not registered.",["installation-not-found"]:"Firebase Installation not found.",["request-failed"]:'{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',["app-offline"]:"Could not process request. Application offline.",["delete-pending-registration"]:"Can't delete installation while there is a pending registration request."};const Xn=new $(qn,Gn,Jn);function Qn(e){return e instanceof H&&e.code.includes("request-failed")}function Yn({projectId:e}){return`${$n}/projects/${e}/installations`}
2function Zn(e){return{token:e.token,requestStatus:2,expiresIn:ir(e.expiresIn),creationTime:Date.now()}}async function er(e,t){const n=await t.json();const r=n.error;return Xn.create("request-failed",{requestName:e,serverCode:r.code,serverMessage:r.message,serverStatus:r.status})}function tr({apiKey:e}){return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e})}function nr(e,{refreshToken:t}){const n=tr(e);n.append("Authorization",or(t));return n}async function rr(e){const t=await e();if(t.status>=500&&t.status<600){return e()}return t}function ir(e){return Number(e.replace("s","000"))}function or(e){return`${Hn} ${e}`}async function ar({appConfig:e,heartbeatServiceProvider:t},{fid:n}){const r=Yn(e);const i=tr(e);const o=t.getImmediate({optional:true});if(o){const e=await o.getHeartbeatsHeader();if(e){i.append("x-firebase-client",e)}}const a={fid:n,authVersion:Hn,appId:e.appId,sdkVersion:Kn};const s={method:"POST",headers:i,body:JSON.stringify(a)};const c=await rr((()=>fetch(r,s)));if(c.ok){const e=await c.json();const t={fid:e.fid||n,registrationStatus:2,refreshToken:e.refreshToken,authToken:Zn(e.authToken)};return t}else{throw await er("Create Installation",c)}}function sr(e){return new Promise((t=>{setTimeout(t,e)}))}function cr(e){const t=btoa(String.fromCharCode(...e));return t.replace(/\+/g,"-").replace(/\//g,"_")}const ur=/^[cdef][\w-]{21}$/;const fr="";function lr(){try{const e=new Uint8Array(17);const t=self.crypto||self.msCrypto;t.getRandomValues(e);e[0]=112+e[0]%16;const n=dr(e);return ur.test(n)?n:fr}catch(e){return fr}}function dr(e){const t=cr(e);return t.substr(0,22)}function hr(e){return`${e.appName}!${e.appId}`}const pr=new Map;function gr(e,t){const n=hr(e);mr(n,t);wr(n,t)}function vr(e,t){_r();const n=hr(e);let r=pr.get(n);if(!r){r=new Set;pr.set(n,r)}r.add(t)}function br(e,t){const n=hr(e);const r=pr.get(n);if(!r){return}r.delete(t);if(r.size===0){pr.delete(n)}Sr()}function mr(e,t){const n=pr.get(e);if(!n){return}for(const e of n){e(t)}}function wr(e,t){const n=_r();if(n){n.postMessage({key:e,fid:t})}Sr()}let yr=null;function _r(){if(!yr&&"BroadcastChannel"in self){yr=new BroadcastChannel("[Firebase] FID Change");yr.onmessage=e=>{mr(e.data.key,e.data.fid)}}return yr}function Sr(){if(pr.size===0&&yr){yr.close();yr=null}}const kr="firebase-installations-database";const Ir=1;const Or="firebase-installations-store";let Er=null;function Cr(){if(!Er){Er=lt(kr,Ir,{upgrade:(e,t)=>{switch(t){case 0:e.createObjectStore(Or)}}})}return Er}async function Mr(e,t){const n=hr(e);const r=await Cr();const i=r.transaction(Or,"readwrite");const o=i.objectStore(Or);const a=await o.get(n);await o.put(t,n);await i.done;if(!a||a.fid!==t.fid){gr(e,t.fid)}return t}async function Ar(e){const t=hr(e);const n=await Cr();const r=n.transaction(Or,"readwrite");await r.objectStore(Or).delete(t);await r.done}async function Pr(e,t){const n=hr(e);const r=await Cr();const i=r.transaction(Or,"readwrite");const o=i.objectStore(Or);const a=await o.get(n);const s=t(a);if(s===undefined){await o.delete(n)}else{await o.put(s,n)}await i.done;if(s&&(!a||a.fid!==s.fid)){gr(e,s.fid)}return s}async function Tr(e){let t;const n=await Pr(e.appConfig,(n=>{const r=Nr(n);const i=Dr(e,r);t=i.registrationPromise;return i.installationEntry}));if(n.fid===fr){return{installationEntry:await t}}return{installationEntry:n,registrationPromise:t}}function Nr(e){const t=e||{fid:lr(),registrationStatus:0};return Fr(t)}function Dr(e,t){if(t.registrationStatus===0){if(!navigator.onLine){const e=Promise.reject(Xn.create("app-offline"));return{installationEntry:t,registrationPromise:e}}const n={fid:t.fid,registrationStatus:1,registrationTime:Date.now()};const r=Rr(e,n);return{installationEntry:n,registrationPromise:r}}else if(t.registrationStatus===1){return{installationEntry:t,registrationPromise:jr(e)}}else{return{installationEntry:t}}}async function Rr(e,t){try{const n=await ar(e,t);return Mr(e.appConfig,n)}catch(n){if(Qn(n)&&n.customData.serverCode===409){await Ar(e.appConfig)}else{await Mr(e.appConfig,{fid:t.fid,registrationStatus:0})}throw n}}async function jr(e){let t=await xr(e.appConfig);while(t.registrationStatus===1){await sr(100);t=await xr(e.appConfig)}
2if(t.registrationStatus===0){const{installationEntry:t,registrationPromise:n}=await Tr(e);if(n){return n}else{return t}}return t}function xr(e){return Pr(e,(e=>{if(!e){throw Xn.create("installation-not-found")}return Fr(e)}))}function Fr(e){if(Br(e)){return{fid:e.fid,registrationStatus:0}}return e}function Br(e){return e.registrationStatus===1&&e.registrationTime+zn<Date.now()}async function Lr({appConfig:e,heartbeatServiceProvider:t},n){const r=Wr(e,n);const i=nr(e,n);const o=t.getImmediate({optional:true});if(o){const e=await o.getHeartbeatsHeader();if(e){i.append("x-firebase-client",e)}}const a={installation:{sdkVersion:Kn,appId:e.appId}};const s={method:"POST",headers:i,body:JSON.stringify(a)};const c=await rr((()=>fetch(r,s)));if(c.ok){const e=await c.json();const t=Zn(e);return t}else{throw await er("Generate Auth Token",c)}}function Wr(e,{fid:t}){return`${Yn(e)}/${t}/authTokens:generate`}async function Ur(e,t=false){let n;const r=await Pr(e.appConfig,(r=>{if(!$r(r)){throw Xn.create("not-registered")}const i=r.authToken;if(!t&&Vr(i)){return r}else if(i.requestStatus===1){n=zr(e,t);return r}else{if(!navigator.onLine){throw Xn.create("app-offline")}const t=Gr(r);n=Hr(e,t);return t}}));const i=n?await n:r.authToken;return i}async function zr(e,t){let n=await Kr(e.appConfig);while(n.authToken.requestStatus===1){await sr(100);n=await Kr(e.appConfig)}const r=n.authToken;if(r.requestStatus===0){return Ur(e,t)}else{return r}}function Kr(e){return Pr(e,(e=>{if(!$r(e)){throw Xn.create("not-registered")}const t=e.authToken;if(Jr(t)){return Object.assign(Object.assign({},e),{authToken:{requestStatus:0}})}return e}))}async function Hr(e,t){try{const n=await Lr(e,t);const r=Object.assign(Object.assign({},t),{authToken:n});await Mr(e.appConfig,r);return n}catch(n){if(Qn(n)&&(n.customData.serverCode===401||n.customData.serverCode===404)){await Ar(e.appConfig)}else{const n=Object.assign(Object.assign({},t),{authToken:{requestStatus:0}});await Mr(e.appConfig,n)}throw n}}function $r(e){return e!==undefined&&e.registrationStatus===2}function Vr(e){return e.requestStatus===2&&!qr(e)}function qr(e){const t=Date.now();return t<e.creationTime||e.creationTime+e.expiresIn<t+Vn}function Gr(e){const t={requestStatus:1,requestTime:Date.now()};return Object.assign(Object.assign({},e),{authToken:t})}function Jr(e){return e.requestStatus===1&&e.requestTime+zn<Date.now()}async function Xr(e){const t=e;const{installationEntry:n,registrationPromise:r}=await Tr(t);if(r){r.catch(console.error)}else{Ur(t).catch(console.error)}return n.fid}async function Qr(e,t=false){const n=e;await Yr(n);const r=await Ur(n,t);return r.token}async function Yr(e){const{registrationPromise:t}=await Tr(e);if(t){await t}}async function Zr(e,t){const n=ei(e,t);const r=nr(e,t);const i={method:"DELETE",headers:r};const o=await rr((()=>fetch(n,i)));if(!o.ok){throw await er("Delete Installation",o)}}function ei(e,{fid:t}){return`${Yn(e)}/${t}`}async function ti(e){const{appConfig:t}=e;const n=await Pr(t,(e=>{if(e&&e.registrationStatus===0){return undefined}return e}));if(n){if(n.registrationStatus===1){throw Xn.create("delete-pending-registration")}else if(n.registrationStatus===2){if(!navigator.onLine){throw Xn.create("app-offline")}else{await Zr(t,n);await Ar(t)}}}}function ni(e,t){const{appConfig:n}=e;vr(n,t);return()=>{br(n,t)}}function ri(e=getApp()){const t=_getProvider(e,"installations").getImmediate();return t}function ii(e){if(!e||!e.options){throw oi("App Configuration")}if(!e.name){throw oi("App Name")}const t=["projectId","apiKey","appId"];for(const n of t){if(!e.options[n]){throw oi(n)}}return{appName:e.name,projectId:e.options.projectId,apiKey:e.options.apiKey,appId:e.options.appId}}function oi(e){return Xn.create("missing-app-config-values",{valueName:e})}const ai="installations";const si="installations-internal";const ci=e=>{const t=e.getProvider("app").getImmediate();const n=ii(t);const r=rn(t,"heartbeat");const i={app:t,appConfig:n,heartbeatServiceProvider:r,_delete:()=>Promise.resolve()};return i};const ui=e=>{const t=e.getProvider("app").getImmediate();const n=rn(t,ai).getImmediate();const r={getId:()=>Xr(n),getToken:e=>Qr(n,e)};return r};function fi(){nn(new Ne(ai,ci,"PUBLIC"));nn(new Ne(si,ui,"PRIVATE"))}fi();yn(Wn,Un);yn(Wn,Un,"esm2017");const li="BDOU99-h67HcA6JeFXHbSNMu7e2yNNu3RzoMj8TM4W88jITfq7ZmPvIM1Iv-4_l2LxQcYwhqby2xGpWwzjfAnG4";const di="https://fcmregistrations.googleapis.com/v1";const hi="FCM_MSG";const pi="google.c.a.c_id";const gi=3;const vi=1;var bi;(function(e){e[e["DATA_MESSAGE"]=1]="DATA_MESSAGE";e[e["DISPLAY_NOTIFICATION"]=3]="DISPLAY_NOTIFICATION"})(bi||(bi={}));var mi;(function(e){e["PUSH_RECEIVED"]="push-received";e["NOTIFICATION_CLICKED"]="notification-clicked"})(mi||(mi={}));function wi(e){const t=new Uint8Array(e);const n=btoa(String.fromCharCode(...t));return n.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function yi(e){const t="=".repeat((4-e.length%4)%4);const n=(e+t).replace(/\-/g,"+").replace(/_/g,"/");const r=atob(n);const i=new Uint8Array(r.length);for(let e=0;e<r.length;++e){i[e]=r.charCodeAt(e)}return i}const _i="fcm_token_details_db";const Si=5;const ki="fcm_token_object_Store";async function Ii(e){if("databases"in indexedDB){const e=await indexedDB.databases();const t=e.map((e=>e.name));if(!t.includes(_i)){return null}}let t=null;const n=await lt(_i,Si,{upgrade:async(n,r,i,o)=>{var a;if(r<2){return}if(!n.objectStoreNames.contains(ki)){return}const s=o.objectStore(ki);const c=await s.index("fcmSenderId").get(e);await s.clear();if(!c){return}if(r===2){const e=c;if(!e.auth||!e.p256dh||!e.endpoint){return}t={token:e.fcmToken,createTime:(a=e.createTime)!==null&&a!==void 0?a:Date.now(),subscriptionOptions:{auth:e.auth,p256dh:e.p256dh,endpoint:e.endpoint,swScope:e.swScope,vapidKey:typeof e.vapidKey==="str
2ing"?e.vapidKey:wi(e.vapidKey)}}}else if(r===3){const e=c;t={token:e.fcmToken,createTime:e.createTime,subscriptionOptions:{auth:wi(e.auth),p256dh:wi(e.p256dh),endpoint:e.endpoint,swScope:e.swScope,vapidKey:wi(e.vapidKey)}}}else if(r===4){const e=c;t={token:e.fcmToken,createTime:e.createTime,subscriptionOptions:{auth:wi(e.auth),p256dh:wi(e.p256dh),endpoint:e.endpoint,swScope:e.swScope,vapidKey:wi(e.vapidKey)}}}}});n.close();await dt(_i);await dt("fcm_vapid_details_db");await dt("undefined");return Oi(t)?t:null}function Oi(e){if(!e||!e.subscriptionOptions){return false}const{subscriptionOptions:t}=e;return typeof e.createTime==="number"&&e.createTime>0&&typeof e.token==="string"&&e.token.length>0&&typeof t.auth==="string"&&t.auth.length>0&&typeof t.p256dh==="string"&&t.p256dh.length>0&&typeof t.endpoint==="string"&&t.endpoint.length>0&&typeof t.swScope==="string"&&t.swScope.length>0&&typeof t.vapidKey==="string"&&t.vapidKey.length>0}const Ei="firebase-messaging-database";const Ci=1;const Mi="firebase-messaging-store";let Ai=null;function Pi(){if(!Ai){Ai=lt(Ei,Ci,{upgrade:(e,t)=>{switch(t){case 0:e.createObjectStore(Mi)}}})}return Ai}async function Ti(e){const t=Ri(e);const n=await Pi();const r=await n.transaction(Mi).objectStore(Mi).get(t);if(r){return r}else{const t=await Ii(e.appConfig.senderId);if(t){await Ni(e,t);return t}}}async function Ni(e,t){const n=Ri(e);const r=await Pi();const i=r.transaction(Mi,"readwrite");await i.objectStore(Mi).put(t,n);await i.done;return t}async function Di(e){const t=Ri(e);const n=await Pi();const r=n.transaction(Mi,"readwrite");await r.objectStore(Mi).delete(t);await r.done}function Ri({appConfig:e}){return e.appId}const ji={["missing-app-config-values"]:'Missing App configuration value: "{$valueName}"',["only-available-in-window"]:"This method is available in a Window context.",["only-available-in-sw"]:"This method is available in a service worker context.",["permission-default"]:"The notification permission was not granted and dismissed instead.",["permission-blocked"]:"The notification permission was not granted and blocked instead.",["unsupported-browser"]:"This browser doesn't support the API's required to use the Firebase SDK.",["indexed-db-unsupported"]:"This browser doesn't support indexedDb.open() (ex. Safari iFrame, Firefox Private Browsing, etc)",["failed-service-worker-registration"]:"We are unable to register the default service worker. {$browserErrorMessage}",["token-subscribe-failed"]:"A problem occurred while subscribing the user to FCM: {$errorInfo}",["token-subscribe-no-token"]:"FCM returned no token when subscribing the user to push.",["token-unsubscribe-failed"]:"A problem occurred while unsubscribing the "+"user from FCM: {$errorInfo}",["token-update-failed"]:"A problem occurred while updating the user from FCM: {$errorInfo}",["token-update-no-token"]:"FCM returned no token when updating the user to push.",["use-sw-after-get-token"]:"The useServiceWorker() method may only be called once and must be "+"called before calling getToken() to ensure your service worker is used.",["invalid-sw-registration"]:"The input to useServiceWorker() must be a ServiceWorkerRegistration.",["invalid-bg-handler"]:"The input to setBackgroundMessageHandler() must be a function.",["invalid-vapid-key"]:"The public VAPID key must be a string.",["use-vapid-key-after-get-token"]:"The usePublicVapidKey() method may only be called once and must be "+"called before calling getToken() to ensure your VAPID key is used."};const xi=new $("messaging","Messaging",ji);async function Fi(e,t){const n=await Ui(e);const r=zi(t);const i={method:"POST",headers:n,body:JSON.stringify(r)};let o;try{const t=await fetch(Wi(e.appConfig),i);o=await t.json()}catch(e){throw xi.create("token-subscribe-failed",{errorInfo:e===null||e===void 0?void 0:e.toString()})}if(o.error){const e=o.error.message;throw xi.create("token-subscribe-failed",{errorInfo:e})}if(!o.token){throw xi.create("token-subscribe-no-token")}return o.token}async function Bi(e,t){const n=await Ui(e);const r=zi(t.subscriptionOptions);const i={method:"PATCH",headers:n,body:JSON.stringify(r)};let o;try{const n=await fetch(`${Wi(e.appConfig)}
2/${t.token}`,i);o=await n.json()}catch(e){throw xi.create("token-update-failed",{errorInfo:e===null||e===void 0?void 0:e.toString()})}if(o.error){const e=o.error.message;throw xi.create("token-update-failed",{errorInfo:e})}if(!o.token){throw xi.create("token-update-no-token")}return o.token}async function Li(e,t){const n=await Ui(e);const r={method:"DELETE",headers:n};try{const n=await fetch(`${Wi(e.appConfig)}/${t}`,r);const i=await n.json();if(i.error){const e=i.error.message;throw xi.create("token-unsubscribe-failed",{errorInfo:e})}}catch(e){throw xi.create("token-unsubscribe-failed",{errorInfo:e===null||e===void 0?void 0:e.toString()})}}function Wi({projectId:e}){return`${di}/projects/${e}/registrations`}async function Ui({appConfig:e,installations:t}){const n=await t.getToken();return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e.apiKey,"x-goog-firebase-installations-auth":`FIS ${n}`})}function zi({p256dh:e,auth:t,endpoint:n,vapidKey:r}){const i={web:{endpoint:n,auth:t,p256dh:e}};if(r!==li){i.web.applicationPubKey=r}return i}const Ki=7*24*60*60*1e3;async function Hi(e){const t=await Gi(e.swRegistration,e.vapidKey);const n={vapidKey:e.vapidKey,swScope:e.swRegistration.scope,endpoint:t.endpoint,auth:wi(t.getKey("auth")),p256dh:wi(t.getKey("p256dh"))};const r=await Ti(e.firebaseDependencies);if(!r){return qi(e.firebaseDependencies,n)}
2else if(!Ji(r.subscriptionOptions,n)){try{await Li(e.firebaseDependencies,r.token)}catch(e){console.warn(e)}return qi(e.firebaseDependencies,n)}else if(Date.now()>=r.createTime+Ki){return Vi(e,{token:r.token,createTime:Date.now(),subscriptionOptions:n})}else{return r.token}}async function $i(e){const t=await Ti(e.firebaseDependencies);if(t){await Li(e.firebaseDependencies,t.token);await Di(e.firebaseDependencies)}const n=await e.swRegistration.pushManager.getSubscription();if(n){return n.unsubscribe()}return true}async function Vi(e,t){try{const n=await Bi(e.firebaseDependencies,t);const r=Object.assign(Object.assign({},t),{token:n,createTime:Date.now()});await Ni(e.firebaseDependencies,r);return n}catch(e){throw e}}async function qi(e,t){const n=await Fi(e,t);const r={token:n,createTime:Date.now(),subscriptionOptions:t};await Ni(e,r);return r.token}async function Gi(e,t){const n=await e.pushManager.getSubscription();if(n){return n}return e.pushManager.subscribe({userVisibleOnly:true,applicationServerKey:yi(t)})}function Ji(e,t){const n=t.vapidKey===e.vapidKey;const r=t.endpoint===e.endpoint;const i=t.auth===e.auth;const o=t.p256dh===e.p256dh;return n&&r&&i&&o}function Xi(e){const t={from:e.from,collapseKey:e.collapse_key,messageId:e.fcmMessageId};Qi(t,e);Yi(t,e);Zi(t,e);return t}function Qi(e,t){if(!t.notification){return}e.notification={};const n=t.notification.title;if(!!n){e.notification.title=n}const r=t.notification.body;if(!!r){e.notification.body=r}const i=t.notification.image;if(!!i){e.notification.image=i}const o=t.notification.icon;if(!!o){e.notification.icon=o}}function Yi(e,t){if(!t.data){return}e.data=t.data}function Zi(e,t){var n,r,i,o,a;if(!t.fcmOptions&&!((n=t.notification)===null||n===void 0?void 0:n.click_action)){return}e.fcmOptions={};const s=(i=(r=t.fcmOptions)===null||r===void 0?void 0:r.link)!==null&&i!==void 0?i:(o=t.notification)===null||o===void 0?void 0:o.click_action;if(!!s){e.fcmOptions.link=s}const c=(a=t.fcmOptions)===null||a===void 0?void 0:a.analytics_label;if(!!c){e.fcmOptions.analyticsLabel=c}}function eo(e){return typeof e==="object"&&!!e&&pi in e}function to(e){return new Promise((t=>{setTimeout(t,e)}))}ao("AzSCbw63g1R0nCw85jG8","Iaya3yLKwmgvh7cF0q4");async function no(e,t){const n=ro(t,await e.firebaseDependencies.installations.getId());io(e,n,t.productId)}function ro(e,t){var n,r;const i={};if(!!e.from){i.project_number=e.from}if(!!e.fcmMessageId){i.message_id=e.fcmMessageId}i.instance_id=t;if(!!e.notification){i.message_type=bi.DISPLAY_NOTIFICATION.toString()}else{i.message_type=bi.DATA_MESSAGE.toString()}i.sdk_platform=gi.toString();i.package_name=self.origin.replace(/(^\w+:|^)\/\//,"");if(!!e.collapse_key){i.collapse_key=e.collapse_key}i.event=vi.toString();if(!!((n=e.fcmOptions)===null||n===void 0?void 0:n.analytics_label)){i.analytics_label=(r=e.fcmOptions)===null||r===void 0?void 0:r.analytics_label}return i}function io(e,t,n){const r={};r.event_time_ms=Math.floor(Date.now()).toString();r.source_extension_json_proto3=JSON.stringify({messaging_client_event:t});if(!!n){r.compliance_data=oo(n)}e.logEvents.push(r)}function oo(e){const t={privacy_context:{prequest:{origin_associated_product_id:e}}};return t}function ao(e,t){const n=[];for(let r=0;r<e.length;r++){n.push(e.charAt(r));if(r<t.length){n.push(t.charAt(r))}}return n.join("")}async function so(e,t){var n,r;const{newSubscription:i}=e;if(!i){await $i(t);return}const o=await Ti(t.firebaseDependencies);await $i(t);t.vapidKey=(r=(n=o===null||o===void 0?void 0:o.subscriptionOptions)===null||n===void 0?void 0:n.vapidKey)!==null&&r!==void 0?r:li;await Hi(t)}async function co(e,t){const n=lo(e);if(!n){return}if(t.deliveryMetricsExportedToBigQueryEnabled){await no(t,n)}const r=await vo();if(po(r)){return go(r,n)}if(!!n.notification){await bo(fo(n))}if(!t){return}if(!!t.onBackgroundMessageHandler){const e=Xi(n);if(typeof t.onBackgroundMessageHandler==="function"){await t.onBackgroundMessageHandler(e)}else{t.onBackgroundMessageHandler.next(e)}}}async function uo(e){var t,n;const r=(n=(t=e.notification)===null||t===void 0?void 0:t.data)===null||n===void 0?void 0:n[hi];if(!r){return}else if(e.action){return}e.stopImmediatePropagation();e.notification.close();const i=mo(r);if(!i){return}const o=new URL(i,self.location.href);const a=new URL(self.location.origin);if(o.host!==a.host){return}let s=await ho(o);if(!s){s=await self.clients.openWindow(i);await to(3e3)}else{s=await s.focus()}if(!s){return}r.messageType=mi.NOTIFICATION_CLICKED;r.isFirebaseMessaging=true;return s.postMessage(r)}function fo(e){const t=Object.assign({},e.notification);t.data={[hi]:e};return t}function lo({data:e}){if(!e){return null}try{return e.json()}catch(e){return null}}async function ho(e){const t=await vo();for(const n of t){const t=new URL(n.url,self.location.href);if(e.host===t.host){return n}}return null}function po(e){return e.some((e=>e.visibilityState==="visible"&&!e.url.startsWith("chrome-extension://")))}function go(e,t){t.isFirebaseMessaging=true;t.messageType=mi.PUSH_RECEIVED;for(const n of e){n.postMessage(t)}}function vo(){return self.clients.matchAll({type:"window",includeUncontrolled:true})}function bo(e){var t;const{actions:n}=e;const{maxActions:r}=Notification;if(n&&r&&n.length>r){console.warn(`This browser only supports ${r} actions. The remaining actions will not be displayed.`)}return self.registration.showNotification((t=e.title)!==null&&t!==void 0?t:"",e)}function mo(e){var t,n,r;const i=(n=(t=e.fcmOptions)===null||t===void 0?void 0:t.link)!==null&&n!==void 0?n:(r=e.notification)===null||r===void 0?void 0:r.click_action;if(i){return i}if(eo(e.data)){return self.location.origin}else{return null}}function wo(e){if(!e||!e.options){throw yo("App Configuration Object")}if(!e.name){throw yo("App Name")}const t=["projectId","apiKey","appId","messagingSenderId"];const{options:n}=e;for(const e of t){if(!n[e]){throw yo(e)}}
2return{appName:e.name,projectId:n.projectId,apiKey:n.apiKey,appId:n.appId,senderId:n.messagingSenderId}}function yo(e){return xi.create("missing-app-config-values",{valueName:e})}class _o{constructor(e,t,n){this.deliveryMetricsExportedToBigQueryEnabled=false;this.onBackgroundMessageHandler=null;this.onMessageHandler=null;this.logEvents=[];this.isLogServiceStarted=false;const r=wo(e);this.firebaseDependencies={app:e,appConfig:r,installations:t,analyticsProvider:n}}_delete(){return Promise.resolve()}}const So=e=>{const t=new _o(e.getProvider("app").getImmediate(),e.getProvider("installations-internal").getImmediate(),e.getProvider("analytics-internal"));self.addEventListener("push",(e=>{e.waitUntil(co(e,t))}));self.addEventListener("pushsubscriptionchange",(e=>{e.waitUntil(so(e,t))}));self.addEventListener("notificationclick",(e=>{e.waitUntil(uo(e))}));return t};function ko(){nn(new Ne("messaging-sw",So,"PUBLIC"))}async function Io(){return W()&&await U()&&"PushManager"in self&&"Notification"in self&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey")}function Oo(e,t){if(self.document!==undefined){throw xi.create("only-available-in-sw")}e.onBackgroundMessageHandler=t;return()=>{e.onBackgroundMessageHandler=null}}function Eo(e,t){e.deliveryMetricsExportedToBigQueryEnabled=t}function Co(e=bn()){Io().then((e=>{if(!e){throw xi.create("unsupported-browser")}}),(e=>{throw xi.create("indexed-db-unsupported")}));return rn(Te(e),"messaging-sw").getImmediate()}function Mo(e,t){e=Te(e);return Oo(e,t)}function Ao(e,t){e=getModularInstance(e);return Eo(e,t)}ko();var Po=undefined&&undefined.__assign||function(){Po=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i))e[i]=t[i]}return e};return Po.apply(this,arguments)};var To="https://";var No={debug:"false"==="true",isTest:"false"==="true",resourceToken:"292rcGMUFYrM-2adccd19eb06ea5e",apiServerHost:"pxl.ru.altkraft.com",swPath:"/service-worker.js",vapidKey:"",firebase:{apiKey:"AIzaSyBKBRKZOHHzv5C7Q9LhrmzB-2AUgvopUp4",projectId:"bronirui-online-304e6",messagingSenderId:"27576536300",appId:"1:27576536300:web:9fbe62f87827de168029c9"},browsers:{Chrome:{isFirebase:"true"==="true"},Firefox:{isFirebase:"true"==="true"},Opera:{isFirebase:"true"==="true"},"Yandex Browser":{isFirebase:"true"==="true"},"Samsung Internet for Android":{isFirebase:"true"==="true"},Safari:{websitePushID:"",websitePushAPI:"https://pxl.ru.altkraft.com/ap"}},expirationSWChrome:"900"};var Do={randomPrefix:"Shahkoop2aeleiv8Ierief_",serverPrefix:To,serverActionHandlers:{save:"/pixel?_push_pix=/push/subscription/save",delete:"/pixel?_push_pix=/push/subscription/delete",update:"/pixel?_push_pix=/push/subscription/update",suspend:"/pixel?_push_pix=/push/subscription/suspend"},serverCookiePath:"/pixel?_push_pix=/set_cookie_only",serverPushContentPath:"/pixel?_push_pix=/push/content/get",serverURL:(To+No.apiServerHost).replace(/\/+$/,""),swPath:"/service-worker.js",isTest:false,cookieID:"",browser:undefined,firebase:{authSubdomain:"firebaseapp.com",bucketSubdomain:"appspot.com",dbSubdomain:"firebaseio.com"},allFirebase:undefined};var Ro=Po(Po(Po({},Do),No),{firebase:Po(Po({},Do.firebase),No.firebase),expirationSWChrome:parseInt(No.expirationSWChrome,10)||0});const jo=Ro;var xo=n(160);var Fo=n.n(xo);var Bo=n(880);var Lo=n(790);const Wo="/firebase-messaging-sw.js";const Uo="/firebase-cloud-messaging-push-scope";const zo="BDOU99-h67HcA6JeFXHbSNMu7e2yNNu3RzoMj8TM4W88jITfq7ZmPvIM1Iv-4_l2LxQcYwhqby2xGpWwzjfAnG4";const Ko="https://fcmregistrations.googleapis.com/v1";const Ho="google.c.a.c_id";const $o="google.c.a.c_l";const Vo="google.c.a.ts";const qo="google.c.a.e";const Go=1e4;var Jo;(function(e){e[e["DATA_MESSAGE"]=1]="DATA_MESSAGE";e[e["DISPLAY_NOTIFICATION"]=3]="DISPLAY_NOTIFICATION"})(Jo||(Jo={}));var Xo;(function(e){e["PUSH_RECEIVED"]="push-received";e["NOTIFICATION_CLICKED"]="notification-clicked"})(Xo||(Xo={}));function Qo(e){const t=new Uint8Array(e);const n=btoa(String.fromCharCode(...t));return n.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function Yo(e){const t="=".repeat((4-e.length%4)%4);const n=(e+t).replace(/\-/g,"+").replace(/_/g,"/");const r=atob(n);const i=new Uint8Array(r.length);for(let e=0;e<r.length;++e){i[e]=r.charCodeAt(e)}return i}const Zo="fcm_token_details_db";const ea=5;const ta="fcm_token_object_Store";async function na(e){if("databases"in indexedDB){const e=await indexedDB.databases();const t=e.map((e=>e.name));if(!t.includes(Zo)){return null}}let t=null;const n=await lt(Zo,ea,{upgrade:async(n,r,i,o)=>{var a;if(r<2){return}if(!n.objectStoreNames.contains(ta)){return}const s=o.objectStore(ta);const c=await s.index("fcmSenderId").get(e);await s.clear();if(!c){return}if(r===2){const e=c;if(!e.auth||!e.p256dh||!e.endpoint){return}t={token:e.fcmToken,createTime:(a=e.createTime)!==null&&a!==void 0?a:Date.now(),subscriptionOptions:{auth:e.auth,p256dh:e.p256dh,endpoint:e.endpoint,swScope:e.swScope,vapidKey:typeof e.vapidKey==="str
2ing"?e.vapidKey:Qo(e.vapidKey)}}}else if(r===3){const e=c;t={token:e.fcmToken,createTime:e.createTime,subscriptionOptions:{auth:Qo(e.auth),p256dh:Qo(e.p256dh),endpoint:e.endpoint,swScope:e.swScope,vapidKey:Qo(e.vapidKey)}}}else if(r===4){const e=c;t={token:e.fcmToken,createTime:e.createTime,subscriptionOptions:{auth:Qo(e.auth),p256dh:Qo(e.p256dh),endpoint:e.endpoint,swScope:e.swScope,vapidKey:Qo(e.vapidKey)}}}}});n.close();await dt(Zo);await dt("fcm_vapid_details_db");await dt("undefined");return ra(t)?t:null}function ra(e){if(!e||!e.subscriptionOptions){return false}const{subscriptionOptions:t}=e;return typeof e.createTime==="number"&&e.createTime>0&&typeof e.token==="string"&&e.token.length>0&&typeof t.auth==="string"&&t.auth.length>0&&typeof t.p256dh==="string"&&t.p256dh.length>0&&typeof t.endpoint==="string"&&t.endpoint.length>0&&typeof t.swScope==="string"&&t.swScope.length>0&&typeof t.vapidKey==="string"&&t.vapidKey.length>0}const ia="firebase-messaging-database";const oa=1;const aa="firebase-messaging-store";let sa=null;function ca(){if(!sa){sa=lt(ia,oa,{upgrade:(e,t)=>{switch(t){case 0:e.createObjectStore(aa)}}})}return sa}async function ua(e){const t=da(e);const n=await ca();const r=await n.transaction(aa).objectStore(aa).get(t);if(r){return r}else{const t=await na(e.appConfig.senderId);if(t){await fa(e,t);return t}}}async function fa(e,t){const n=da(e);const r=await ca();const i=r.transaction(aa,"readwrite");await i.objectStore(aa).put(t,n);await i.done;return t}async function la(e){const t=da(e);const n=await ca();const r=n.transaction(aa,"readwrite");await r.objectStore(aa).delete(t);await r.done}function da({appConfig:e}){return e.appId}const ha={["missing-app-config-values"]:'Missing App configuration value: "{$valueName}"',["only-available-in-window"]:"This method is available in a Window context.",["only-available-in-sw"]:"This method is available in a service worker context.",["permission-default"]:"The notification permission was not granted and dismissed instead.",["permission-blocked"]:"The notification permission was not granted and blocked instead.",["unsupported-browser"]:"This browser doesn't support the API's required to use the Firebase SDK.",["indexed-db-unsupported"]:"This browser doesn't support indexedDb.open() (ex. Safari iFrame, Firefox Private Browsing, etc)",["failed-service-worker-registration"]:"We are unable to register the default service worker. {$browserErrorMessage}",["token-subscribe-failed"]:"A problem occurred while subscribing the user to FCM: {$errorInfo}",["token-subscribe-no-token"]:"FCM returned no token when subscribing the user to push.",["token-unsubscribe-failed"]:"A problem occurred while unsubscribing the "+"user from FCM: {$errorInfo}",["token-update-failed"]:"A problem occurred while updating the user from FCM: {$errorInfo}",["token-update-no-token"]:"FCM returned no token when updating the user to push.",["use-sw-after-get-token"]:"The useServiceWorker() method may only be called once and must be "+"called before calling getToken() to ensure your service worker is used.",["invalid-sw-registration"]:"The input to useServiceWorker() must be a ServiceWorkerRegistration.",["invalid-bg-handler"]:"The input to setBackgroundMessageHandler() must be a function.",["invalid-vapid-key"]:"The public VAPID key must be a string.",["use-vapid-key-after-get-token"]:"The usePublicVapidKey() method may only be called once and must be "+"called before calling getToken() to ensure your VAPID key is used."};const pa=new $("messaging","Messaging",ha);async function ga(e,t){const n=await wa(e);const r=ya(t);const i={method:"POST",headers:n,body:JSON.stringify(r)};let o;try{const t=await fetch(ma(e.appConfig),i);o=await t.json()}catch(e){throw pa.create("token-subscribe-failed",{errorInfo:e===null||e===void 0?void 0:e.toString()})}if(o.error){const e=o.error.message;throw pa.create("token-subscribe-failed",{errorInfo:e})}if(!o.token){throw pa.create("token-subscribe-no-token")}return o.token}async function va(e,t){const n=await wa(e);const r=ya(t.subscriptionOptions);const i={method:"PATCH",headers:n,body:JSON.stringify(r)};let o;try{const n=await fetch(`${ma(e.appConfig)}
2/${t.token}`,i);o=await n.json()}catch(e){throw pa.create("token-update-failed",{errorInfo:e===null||e===void 0?void 0:e.toString()})}if(o.error){const e=o.error.message;throw pa.create("token-update-failed",{errorInfo:e})}if(!o.token){throw pa.create("token-update-no-token")}return o.token}async function ba(e,t){const n=await wa(e);const r={method:"DELETE",headers:n};try{const n=await fetch(`${ma(e.appConfig)}/${t}`,r);const i=await n.json();if(i.error){const e=i.error.message;throw pa.create("token-unsubscribe-failed",{errorInfo:e})}}catch(e){throw pa.create("token-unsubscribe-failed",{errorInfo:e===null||e===void 0?void 0:e.toString()})}}function ma({projectId:e}){return`${Ko}/projects/${e}/registrations`}async function wa({appConfig:e,installations:t}){const n=await t.getToken();return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e.apiKey,"x-goog-firebase-installations-auth":`FIS ${n}`})}function ya({p256dh:e,auth:t,endpoint:n,vapidKey:r}){const i={web:{endpoint:n,auth:t,p256dh:e}};if(r!==zo){i.web.applicationPubKey=r}return i}const _a=7*24*60*60*1e3;async function Sa(e){const t=await Ea(e.swRegistration,e.vapidKey);const n={vapidKey:e.vapidKey,swScope:e.swRegistration.scope,endpoint:t.endpoint,auth:Qo(t.getKey("auth")),p256dh:Qo(t.getKey("p256dh"))};const r=await ua(e.firebaseDependencies);if(!r){return Oa(e.firebaseDependencies,n)}else if(!Ca(r.subscriptionOptions,n)){try{await ba(e.firebaseDependencies,r.token)}catch(e){console.warn(e)}return Oa(e.firebaseDependencies,n)}else if(Date.now()>=r.createTime+_a){return Ia(e,{token:r.token,createTime:Date.now(),subscriptionOptions:n})}else{return r.token}}async function ka(e){const t=await ua(e.firebaseDependencies);if(t){await ba(e.firebaseDependencies,t.token);await la(e.firebaseDependencies)}const n=await e.swRegistration.pushManager.getSubscription();if(n){return n.unsubscribe()}return true}async function Ia(e,t){try{const n=await va(e.firebaseDependencies,t);const r=Object.assign(Object.assign({},t),{token:n,createTime:Date.now()});await fa(e.firebaseDependencies,r);return n}catch(e){throw e}}async function Oa(e,t){const n=await ga(e,t);const r={token:n,createTime:Date.now(),subscriptionOptions:t};await fa(e,r);return r.token}async function Ea(e,t){const n=await e.pushManager.getSubscription();if(n){return n}return e.pushManager.subscribe({userVisibleOnly:true,applicationServerKey:Yo(t)})}function Ca(e,t){const n=t.vapidKey===e.vapidKey;const r=t.endpoint===e.endpoint;const i=t.auth===e.auth;const o=t.p256dh===e.p256dh;return n&&r&&i&&o}function Ma(e){const t={from:e.from,collapseKey:e.collapse_key,messageId:e.fcmMessageId};Aa(t,e);Pa(t,e);Ta(t,e);return t}function Aa(e,t){if(!t.notification){return}e.notification={};const n=t.notification.title;if(!!n){e.notification.title=n}const r=t.notification.body;if(!!r){e.notification.body=r}const i=t.notification.image;if(!!i){e.notification.image=i}const o=t.notification.icon;if(!!o){e.notification.icon=o}}function Pa(e,t){if(!t.data){return}e.data=t.data}function Ta(e,t){var n,r,i,o,a;if(!t.fcmOptions&&!((n=t.notification)===null||n===void 0?void 0:n.click_action)){return}e.fcmOptions={};const s=(i=(r=t.fcmOptions)===null||r===void 0?void 0:r.link)!==null&&i!==void 0?i:(o=t.notification)===null||o===void 0?void 0:o.click_action;if(!!s){e.fcmOptions.link=s}const c=(a=t.fcmOptions)===null||a===void 0?void 0:a.analytics_label;if(!!c){e.fcmOptions.analyticsLabel=c}}function Na(e){return typeof e==="object"&&!!e&&Ho in e}Da("AzSCbw63g1R0nCw85jG8","Iaya3yLKwmgvh7cF0q4");function Da(e,t){const n=[];for(let r=0;r<e.length;r++){n.push(e.charAt(r));if(r<t.length){n.push(t.charAt(r))}}return n.join("")}function Ra(e){if(!e||!e.options){throw ja("App Configuration Object")}if(!e.name){throw ja("App Name")}const t=["projectId","apiKey","appId","messagingSenderId"];const{options:n}=e;for(const e of t){if(!n[e]){throw ja(e)}}return{appName:e.name,projectId:n.projectId,apiKey:n.apiKey,appId:n.appId,senderId:n.messagingSenderId}}function ja(e){return pa.create("missing-app-config-values",{valueName:e})}class xa{constructor(e,t,n){this.deliveryMetricsExportedToBigQueryEnabled=false;
2this.onBackgroundMessageHandler=null;this.onMessageHandler=null;this.logEvents=[];this.isLogServiceStarted=false;const r=Ra(e);this.firebaseDependencies={app:e,appConfig:r,installations:t,analyticsProvider:n}}_delete(){return Promise.resolve()}}async function Fa(e){try{e.swRegistration=await navigator.serviceWorker.register(Wo,{scope:Uo});e.swRegistration.update().catch((()=>{}));await Ba(e.swRegistration)}catch(e){throw pa.create("failed-service-worker-registration",{browserErrorMessage:e===null||e===void 0?void 0:e.message})}}async function Ba(e){return new Promise(((t,n)=>{const r=setTimeout((()=>n(new Error(`Service worker not registered after ${Go} ms`))),Go);const i=e.installing||e.waiting;if(e.active){clearTimeout(r);t()}else if(i){i.onstatechange=e=>{var n;if(((n=e.target)===null||n===void 0?void 0:n.state)==="activated"){i.onstatechange=null;clearTimeout(r);t()}}}else{clearTimeout(r);n(new Error("No incoming service worker found."))}}))}async function La(e,t){if(!t&&!e.swRegistration){await Fa(e)}if(!t&&!!e.swRegistration){return}if(!(t instanceof ServiceWorkerRegistration)){throw pa.create("invalid-sw-registration")}e.swRegistration=t}async function Wa(e,t){if(!!t){e.vapidKey=t}else if(!e.vapidKey){e.vapidKey=zo}}async function Ua(e,t){if(!navigator){throw pa.create("only-available-in-window")}if(Notification.permission==="default"){await Notification.requestPermission()}if(Notification.permission!=="granted"){throw pa.create("permission-blocked")}await Wa(e,t===null||t===void 0?void 0:t.vapidKey);await La(e,t===null||t===void 0?void 0:t.serviceWorkerRegistration);return Sa(e)}async function za(e,t,n){const r=Ka(t);const i=await e.firebaseDependencies.analyticsProvider.get();i.logEvent(r,{message_id:n[Ho],message_name:n[$o],message_time:n[Vo],message_device_time:Math.floor(Date.now()/1e3)})}function Ka(e){switch(e){case Xo.NOTIFICATION_CLICKED:return"notification_open";case Xo.PUSH_RECEIVED:return"notification_foreground";default:throw new Error}}async function Ha(e,t){const n=t.data;if(!n.isFirebaseMessaging){return}if(e.onMessageHandler&&n.messageType===Xo.PUSH_RECEIVED){if(typeof e.onMessageHandler==="function"){e.onMessageHandler(Ma(n))}else{e.onMessageHandler.next(Ma(n))}}const r=n.data;if(Na(r)&&r[qo]==="1"){await za(e,n.messageType,r)}}const $a="@firebase/messaging";const Va="0.12.16";const qa=e=>{const t=new xa(e.getProvider("app").getImmediate(),e.getProvider("installations-internal").getImmediate(),e.getProvider("analytics-internal"));navigator.serviceWorker.addEventListener("message",(e=>Ha(t,e)));return t};const Ga=e=>{const t=e.getProvider("messaging").getImmediate();const n={getToken:e=>Ua(t,e)};return n};function Ja(){nn(new Ne("messaging",qa,"PUBLIC"));nn(new Ne("messaging-internal",Ga,"PRIVATE"));yn($a,Va);yn($a,Va,"esm2017")}async function Xa(){try{await validateIndexedDBOpenable()}catch(e){return false}return typeof window!=="undefined"&&isIndexedDBAvailable()&&areCookiesEnabled()&&"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window&&"fetch"in window&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey")}async function Qa(e){if(!navigator){throw pa.create("only-available-in-window")}if(!e.swRegistration){await Fa(e)}return ka(e)}function Ya(e,t){if(!navigator){throw pa.create("only-available-in-window")}e.onMessageHandler=t;return()=>{e.onMessageHandler=null}}function Za(e=getApp()){Xa().then((e=>{if(!e){throw pa.create("unsupported-browser")}}),(e=>{throw pa.create("indexed-db-unsupported")}));return _getProvider(getModularInstance(e),"messaging").getImmediate()}async function es(e,t){e=getModularInstance(e);return Ua(e,t)}function ts(e){e=getModularInstance(e);return Qa(e)}function ns(e,t){e=getModularInstance(e);return Ya(e,t)}Ja();var rs;(function(e){e["Granted"]="granted";e["Denied"]="denied";e["Default"]="default"})(rs||(rs={}));var is;(function(e){e["subscribe"]="subscribe";e["updateSubscription"]="update_subscription";e["suspendSubscription"]="suspend_subscription"})(is||(is={}));var os=Object.prototype.hasOwnProperty;function as(e,t){return typeof e==="object"&&os.call(e,t)}function ss(e){return function(){var t=[];for(var n=0;n<arguments.length;n++){t[n]=arguments[n]}if(e){console.info.apply(null,t)}}}var cs=ys(jo.debug);
2var us=undefined&&undefined.__assign||function(){us=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i))e[i]=t[i]}return e};return us.apply(this,arguments)};var fs=undefined&&undefined.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r["throw"](e))}catch(e){o(e)}}function c(e){e.done?n(e.value):i(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};var ls=undefined&&undefined.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return c([e,t])}}function c(a){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,i&&(o=a[0]&2?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;if(i=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;i=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){n.label=a[1];break}if(a[0]===6&&n.label<o[1]){n.label=o[1];o=a;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(a);break}if(o[2])n.ops.pop();n.trys.pop();continue}a=t.call(e,n)}catch(e){a=[6,e];i=0}finally{r=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var ds=function(){return"safari"in window&&"pushNotification"in window.safari};var hs={};function ps(){return"serviceWorker"in window.navigator}function gs(){return fs(this,void 0,void 0,(function(){return ls(this,(function(e){if(ps()){return[2,navigator.serviceWorker.getRegistrations().then((function(e){return e.find((function(e){var t=e.active,n=e.waiting,r=e.installing;var i=t||n||r;return i&&i.scriptURL.includes("/service-worker.js?browser")}))}))]}console.log("can`t use service worker");return[2,undefined]}))}))}function vs(e){return e.split(" ").join("")}function bs(e){if(e.allFirebase)return true;var t=e.browser;if(t){var n=e.browsers[t];if(as(n,"isFirebase")){return n.isFirebase}return false}throw new Error("Invalid config")}function ms(e){return fs(this,void 0,void 0,(function(){var t,n,r,i,o,a,s,c,u;return ls(this,(function(f){switch(f.label){case 0:t=e.serverURL,n=e.serverCookiePath,r=e.resourceToken;f.label=1;case 1:f.trys.push([1,9,,10]);return[4,localforage.getItem("_ak_cookie")];case 2:i=f.sent()||"";return[4,fetch(t+n,{method:"post",credentials:"include",headers:i?{"X-Cookie":i}:undefined,body:JSON.stringify({resource_token:r})}).then((function(e){return{body:e.json(),headers:e.headers}}))];case 3:o=f.sent();a={cookie_id:"","X-Cookie":""};s="cookie_id";return[4,o.body];case 4:if(!(s in f.sent()))return[3,6];c=a;return[4,o.body];case 5:c.cookie_id=f.sent().cookie_id;f.label=6;case 6:debug("X-Cookie:",o===null||o===void 0?void 0:o.headers.has("X-Cookie"),o===null||o===void 0?void 0:o.headers.get("X-Cookie"));if(!o.headers.has("X-Cookie"))return[3,8];a["X-Cookie"]=o.headers.get("X-Cookie")||"";if(!a["X-Cookie"])return[3,8];return[4,localforage.setItem("_ak_cookie",a["X-Cookie"])];case 7:f.sent();f.label=8;case 8:if(a["X-Cookie"]||a.cookie_id){return[2,a]}console.error("Invalid response for set cookie:",o.body);return[3,10];case 9:u=f.sent();console.error("Unable to set cookie",u);return[3,10];case 10:return[2,undefined]}}))}))}function ws(e,t){var n=new RegExp(t+"=(\\w*);?","g");var r=Array.from(e.matchAll(n));return r.length?r[0][1]:""}function ys(e){return function(){var t=[];for(var n=0;n<arguments.length;n++){t[n]=arguments[n]}if(e){console.info.apply(null,t)}}}function _s(e){return new(Fo())(e,true).query.browser}function Ss(e){if(!e.browser&&"userAgent"in window.navigator){return bowser.getParser(window.navigator.userAgent).getBrowser().name}return undefined}function ks(e,t){return fs(this,void 0,void 0,(function(){return ls(this,(function(n){switch(n.label){case 0:return[4,localforage.setItem(e+"current_token",t)];case 1:n.sent();return[2]}}
2))}))}function Is(e){return fs(this,void 0,void 0,(function(){var t;return ls(this,(function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);return[4,localforage.getItem(e+"current_token")];case 1:return[2,n.sent()];case 2:t=n.sent();console.log("error on getToken",t);return[2,null];case 3:return[2]}}))}))}function Os(e){if(e===void 0){e=CONFIG.randomPrefix}return fs(this,void 0,void 0,(function(){var t,n,r,i,o,a,s,c;return ls(this,(function(u){switch(u.label){case 0:t=Es(e);return[4,Is(e)];case 1:n=u.sent();r=Es(e+"_endpoint_");return[4,Is(e+"_endpoint_")];case 2:i=u.sent();return[4,Is(e+"_keys_")];case 3:o=u.sent();debug("Founded tokens",{tokenLS:t,token:n,endpointLS:r,endpoint:i,keys:o});if(t){Cs(e)}if(r){Cs(e+"_endpoint_")}if(!o)return[3,7];u.label=4;case 4:u.trys.push([4,6,,7]);return[4,localforage.removeItem(e+"_keys_current_token")];case 5:u.sent();debug({result:"success"});return[3,7];case 6:a=u.sent();debug({result:"error",error:a});return[3,7];case 7:if(!n)return[3,11];u.label=8;case 8:u.trys.push([8,10,,11]);return[4,localforage.removeItem(e+"current_token")];case 9:u.sent();return[2,{result:"success"}];case 10:s=u.sent();return[2,{result:"error",error:s}];case 11:if(!i)return[3,15];u.label=12;case 12:u.trys.push([12,14,,15]);return[4,localforage.removeItem(e+"_endpoint_")];case 13:u.sent();return[2,{result:"success"}];case 14:c=u.sent();return[2,{result:"error",error:c}];case 15:return[2,{result:"not-found"}]}}))}))}function Es(e){return localStorage.getItem(e+"current_token")}function Cs(e){localStorage.removeItem(e+"current_token")}function Ms(e,t){var n,r,i,o,a;return fs(this,void 0,void 0,(function(){var s,c,u,f,l;return ls(this,(function(d){switch(d.label){case 0:return[4,Notification.requestPermission()];case 1:s=d.sent();if(!(s===NotificationPermissionStatus.Granted))return[3,4];return[4,gs().then((function(e){return e&&e.active?e:undefined}))];case 2:c=d.sent();u=(n=t.data)===null||n===void 0?void 0:n.ak_actions;f=void 0;if(u){try{debug("push firebase parse ak_actions start");f=JSON.parse(u);debug("push firebase parse ak_actions complete")}catch(e){debug("push firebase parse ak_actions error: ",e)}}l={body:(r=t.notification)===null||r===void 0?void 0:r.body,icon:(i=t.notification)===null||i===void 0?void 0:i.icon,image:(o=t.notification)===null||o===void 0?void 0:o.image,data:{click_action:(a=t.fcmOptions)===null||a===void 0?void 0:a.link},actions:f};if(!c)return[3,4];return[4,c.showNotification(e,l)];case 3:d.sent();d.label=4;case 4:return[2]}}
2))}))}function As(e){var t=e.browser,n=e.expirationSWChrome,r=e.swPath;if(t==="Chrome"){var i=n!==0?n:900;return r+"?browser="+t+"&expiration="+Math.floor(Date.now()/(i*1e3))}return r+"?browser="+t}function Ps(){return fs(this,void 0,void 0,(function(){var e,t,n,r;return ls(this,(function(i){switch(i.label){case 0:if(!("showNotification"in ServiceWorkerRegistration.prototype)){console.error("Notifications is not supported");return[2,false]}if(!(Notification.permission!==NotificationPermissionStatus.Denied))return[3,10];if(!("PushManager"in window))return[3,8];debug("getPushServiceWorker","start");return[4,gs()];case 1:e=i.sent();debug("getPushServiceWorker","complete");debug("serviceWorkerRegistration",e);i.label=2;case 2:i.trys.push([2,6,,7]);debug("serviceWorkerRegistration.pushManager.getSubscription","start");if(!e)return[3,4];return[4,e.pushManager.getSubscription()];case 3:n=i.sent();return[3,5];case 4:n=undefined;i.label=5;case 5:t=n;debug("serviceWorkerRegistration.pushManager.getSubscription","complete");debug("subscription",t);return[2,true];case 6:r=i.sent();console.error("Error on getting subscription data",r);return[2,false];case 7:return[3,9];case 8:console.error("Push-notification is not supported by the browser");return[2,false];case 9:return[3,11];case 10:console.log("User denied notifications");return[2,false];case 11:return[2]}}
2))}))}function Ts(e,t){return fs(this,void 0,void 0,(function(){var n,r,i,o,a,s,c,u;return ls(this,(function(f){switch(f.label){case 0:if(!(Notification.permission===NotificationPermissionStatus.Granted))return[3,24];n=e.browser;switch(n){case"Chrome":return[3,1];case"Firefox":return[3,1];case"Yandex Browser":return[3,1];case"Samsung Internet for Android":return[3,1];case"Opera":return[3,1];case"Safari":return[3,17]}return[3,23];case 1:if(!ps())return[3,15];debug("can use service worker");if(!bs(e))return[3,12];r=void 0;debug("> getPushServiceWorker","start");f.label=2;case 2:f.trys.push([2,4,,5]);return[4,gs()];case 3:r=f.sent();debug("< getPushServiceWorker","complete");debug(">> registration",r);return[3,5];case 4:i=f.sent();debug("err get registration",i);return[3,5];case 5:debug("should use firebase");debug("firebase.initializeApp","start");o={appId:e.firebase.appId,apiKey:e.firebase.apiKey,projectId:e.firebase.projectId,messagingSenderId:e.firebase.messagingSenderId,storageBucket:[e.firebase.projectId,e.firebase.bucketSubdomain].join("."),authDomain:[e.firebase.projectId,e.firebase.authSubdomain].join("."),databaseURL:[e.firebase.projectId,e.firebase.dbSubdomain].join(".")};initializeApp(o);debug("firebase.initializeApp","complete");a=getMessaging();if(!r)return[3,7];debug("updateFirebaseToken","start");return[4,Fs(e,t)];case 6:f.sent();debug("updateFirebaseToken","complete");f.label=7;case 7:debug("firebase.messaging().getToken","start");s=void 0;f.label=8;case 8:f.trys.push([8,10,,11]);return[4,getToken(a,{serviceWorkerRegistration:r})];case 9:s=f.sent();return[3,11];case 10:c=f.sent();console.error("Error occurred: ",c);return[3,11];case 11:debug("firebase.messaging().getToken","complete");if(s&&!hs[s]){debug("added firebase.messaging().onMessage handler");hs[s]=onMessage(a,(function(e){var t,n;debug("Message received:",e);Ms((n=(t=e.notification)===null||t===void 0?void 0:t.title)!==null&&n!==void 0?n:"",e)}))}return[3,14];case 12:debug("should not use firebase");debug("updateDefaultSubscription","start");return[4,Ls(e,t)];case 13:f.sent();debug("updateDefaultSubscription","complete");f.label=14;case 14:return[3,16];case 15:debug("can`t use service worker");console.error("There is no serviceWorker");f.label=16;case 16:return[3,24];case 17:if(!ds())return[3,20];u=window.safari.pushNotification.permission(e.browsers.Safari.websitePushID).deviceToken;if(!u)return[3,19];return[4,ks(e.randomPrefix,u)];case 18:f.sent();debug("added token to cache:",u);f.label=19;case 19:return[3,22];case 20:return[4,Bs(e,t)];case 21:f.sent();f.label=22;case 22:return[3,24];case 23:return[2,undefined];case 24:return[2,undefined]}}))}))}function Ns(e){return fs(this,void 0,void 0,(function(){var t,n,r,i;return ls(this,(function(o){switch(o.label){case 0:t=e.browser,n=e.expirationSWChrome,r=e.swPath;debug("navigator.serviceWorker.register","start");return[4,navigator.serviceWorker.register(As({browser:t,expirationSWChrome:n,swPath:r}))];case 1:i=o.sent();debug("navigator.serviceWorker.register","complete");debug("serviceWorkerRegistration.update","start");return[4,i.update()];case 2:o.sent();debug("serviceWorkerRegistration.update","complete");debug(i);return[2,i]}}))}))}function Ds(e){return fs(this,void 0,void 0,(function(){var t,n,r,i,o;return ls(this,(function(a){switch(a.label){case 0:t=e.browser,n=e.expirationSWChrome,r=e.swPath;debug("replace service worker",{browser:t,expirationSWChrome:n,swPath:r});if(!(Notification.permission===NotificationPermissionStatus.Granted))return[3,7];debug("Notification permission is granted.");return[4,gs()];case 1:i=a.sent();console.log("Push SW status: ",Boolean(i));if(!i)return[3,2];debug("service worker is our. Aborting replace service worker.");return[3,6];case 2:debug("navigator.serviceWorker.controller, was cleaned");a.label=3;case 3:a.trys.push([3,5,,6]);debug("registerServiceWorker start");return[4,Ns({browser:t,expirationSWChrome:n,swPath:r})];case 4:a.sent();debug(" registerServiceWorker complete");return[3,6];case 5:o=a.sent();debug("err register service worker",o);return[3,6];case 6:return[3,8];case 7:debug("Notification permission is not a granted. Aborting replace service worker.");a.label=8;case 8:return[2]}}
2))}))}function Rs(e){return fs(this,void 0,void 0,(function(){var t,n,r,i,o,a,s,c,u,f,l,d,h,p,g;return ls(this,(function(v){switch(v.label){case 0:t=e.action,n=e.provider,r=e.subscription,i=e.match,o=e.update,a=e.customData,s=e.resourceToken,c=e.serverURL,u=e.endpointOld,f=e.keysOld,l=e.supOldSubscr,d=e.inexclusive;return[4,localforage.getItem("_ak_cookie")];case 1:h=v.sent()||"";g=CONFIG.serverActionHandlers;switch(t){case"save":p=c+g.save;break;case"delete":p=c+g.delete;break;case"update":p=c+g.update;break;case"suspend":p=c+g.suspend;break;default:throw new Error("Unknown "+t)}return[2,fetch(p,{method:"post",credentials:"include",headers:h?{"X-Cookie":h}:undefined,body:JSON.stringify(us(us(us(us(us(us({},a||{}),{provider:n,endpoint:r.endpoint,keys:r.keys,resource_token:s,match:JSON.stringify(i||{}),update:JSON.stringify(o||{})}),u?{endpoint_old:u}:{}),f?{keys_old:f}:{}),l&&u?{sup_old_subscr:true}:{}),d!==undefined?{inexclusive:d}:{}))}).then((function(e){debug("X-Cookie:",e===null||e===void 0?void 0:e.headers.has("X-Cookie"),e===null||e===void 0?void 0:e.headers.get("X-Cookie"));if(e===null||e===void 0?void 0:e.headers.has("X-Cookie")){localforage.setItem("_ak_cookie",(e===null||e===void 0?void 0:e.headers.get("X-Cookie"))||"")}return e})).catch((function(e){return console.error("Can't post",t,e)}))]}}))}))}function js(e){return fs(this,void 0,void 0,(function(){var t,n;return ls(this,(function(r){switch(r.label){case 0:t=Es(e);n=Es(e+"_endpoint_");if(!t)return[3,2];return[4,ks(e,t||"")];case 1:r.sent();Cs(e);return[2,t];case 2:if(!n)return[3,4];return[4,ks(e+"_endpoint_",n||"")];case 3:r.sent();Cs(e+"_endpoint_");return[2,t];case 4:return[2,null]}}))}))}function xs(e,t,n){return fs(this,void 0,void 0,(function(){var r,i,o,a,s,c,u,f;return ls(this,(function(l){switch(l.label){case 0:l.trys.push([0,2,,3]);r=EventType.updateSubscription;i=t.provider,o=t.tokenCached,a=t.token,s=t.keys;c={browser:e.browser||"",provider:i,tokenCached:o,token:a};u={endpoint:a||"",keys:s};debug("fetch subscription","start");return[4,Rs({action:"update",provider:i,subscription:u,match:{},update:{},customData:{},resourceToken:e.resourceToken,serverURL:e.serverURL,endpointOld:o||undefined,supOldSubscr:o?true:undefined})];case 1:l.sent();debug("fetch subscription","complete");debug("emit "+r,c);n.emit(r,c);return[3,3];case 2:f=l.sent();console.error("Unable to update subscription data",f);return[3,3];case 3:return[2]}}
2))}))}function Fs(e,t){return fs(this,void 0,void 0,(function(){var n,r,i,o,a,s,c;return ls(this,(function(u){switch(u.label){case 0:debug("firebase.messaging().getToken","start");debug("> getPushServiceWorker","start");u.label=1;case 1:u.trys.push([1,3,,4]);return[4,gs()];case 2:n=u.sent();debug("< getPushServiceWorker","complete");debug(">> serviceWorkerRegistration",n);return[3,4];case 3:i=u.sent();debug("err get registration",i);return[3,4];case 4:u.trys.push([4,6,,7]);return[4,getToken(getMessaging(),{serviceWorkerRegistration:n})];case 5:r=u.sent();return[3,7];case 6:o=u.sent();console.error("Error occurred: ",o);return[3,7];case 7:debug("firebase.messaging().getToken","complete",r);debug("get cached token","start");return[4,Is(e.randomPrefix)];case 8:a=u.sent();debug("get cached token","complete",a);if(!(r&&a!==r))return[3,14];debug("New token detected: ",r);u.label=9;case 9:u.trys.push([9,13,,14]);if(!a)return[3,11];s={provider:vs(e.browser||"")+"Firebase",tokenCached:a,token:r};return[4,xs(e,s,t)];case 10:u.sent();u.label=11;case 11:debug("saving firebase token to cache",r,"start");return[4,ks(e.randomPrefix,r||"")];case 12:u.sent();debug("saving firebase token to cache",r,"complete");return[3,14];case 13:c=u.sent();console.error("Failed to save firebase token to the cache",c);return[3,14];case 14:return[2]}}
2))}))}function Bs(e,t){return fs(this,void 0,void 0,(function(){var n,r,i,o,a,s,c,u,f,l;return ls(this,(function(d){switch(d.label){case 0:return[4,gs()];case 1:n=d.sent();d.label=2;case 2:d.trys.push([2,11,,12]);if(!n){debug("getPushServiceWorker has empty, exit updateSafariPWAToken");return[2]}debug("serviceWorkerRegistration.pushManager.getSubscription","start");return[4,n.pushManager.getSubscription()];case 3:r=d.sent();i=r===null||r===void 0?void 0:r.endpoint;debug("serviceWorkerRegistration.pushManager.getSubscription","complete");debug("subscription",r);s=(a=JSON).parse;return[4,Is(e.randomPrefix+"_keys_")];case 4:o=s.apply(a,[d.sent()||"null"]);return[4,Is(e.randomPrefix)];case 5:c=d.sent();debug("get cached token","complete",c,"and keys",o);if(!(i&&c!==i))return[3,10];debug("New token detected:",i);u=r===null||r===void 0?void 0:r.toJSON().keys;if(!c)return[3,7];f={provider:vs(e.browser||""),tokenCached:c,token:i,keys:u};return[4,xs(e,f,t)];case 6:d.sent();d.label=7;case 7:debug("saving token to cache",i,"and keys",u,"start");return[4,ks(e.randomPrefix,i||"")];case 8:d.sent();return[4,ks(e.randomPrefix+"_keys_",JSON.stringify(u)||"")];case 9:d.sent();debug("saving token to cache",i,"and keys",u,"complete");d.label=10;case 10:return[3,12];case 11:l=d.sent();console.error("Failed to save token and keys to the cache",l);return[3,12];case 12:return[2]}}
2))}))}function Ls(e,t){return fs(this,void 0,void 0,(function(){var n,r,i,o,a;return ls(this,(function(s){switch(s.label){case 0:debug("getPushServiceWorker","start");return[4,gs()];case 1:n=s.sent();if(!n){debug("getPushServiceWorker has empty, exit updateDefaultSubscription.");return[2]}debug("getPushServiceWorker","complete");debug("serviceWorkerRegistration.pushManager.subscribe","start");return[4,n.pushManager.getSubscription()];case 2:r=s.sent();debug("serviceWorkerRegistration.pushManager.subscribe","complete");debug("get cached endpoint","start");return[4,Is(e.randomPrefix+"_endpoint_")];case 3:i=s.sent();debug("get cached endpoint","complete",i);if(!(r&&i!==r.endpoint))return[3,9];s.label=4;case 4:s.trys.push([4,8,,9]);if(!i)return[3,6];o={provider:vs(e.browser||""),tokenCached:i,token:r.endpoint};return[4,xs(e,o,t)];case 5:s.sent();s.label=6;case 6:debug("saving subscription endpoint from push manager to cache",r.endpoint,"start");return[4,ks(e.randomPrefix+"_endpoint_",r.endpoint)];case 7:s.sent();debug("saving subscription endpoint from push manager to cache",r.endpoint,"complete");return[3,9];case 8:a=s.sent();console.error("Failed to save subscription endpoint from push manager to the cache",a);return[3,9];case 9:return[2]}}
2))}))}var Ws=undefined&&undefined.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r["throw"](e))}catch(e){o(e)}}function c(e){e.done?n(e.value):i(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};var Us=undefined&&undefined.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return c([e,t])}}function c(a){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,i&&(o=a[0]&2?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;if(i=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;i=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){n.label=a[1];break}if(a[0]===6&&n.label<o[1]){n.label=o[1];o=a;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(a);break}if(o[2])n.ops.pop();n.trys.pop();continue}a=t.call(e,n)}catch(e){a=[6,e];i=0}finally{r=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};(function(e){var n=t()(jo);function r(e){var t=this;var n=e.data?JSON.parse(e.data.json().data.hub_link).ack:"";var r=e.data?JSON.parse(e.data.json().data.hub_link).open:"";e.waitUntil(function(){return Ws(t,void 0,void 0,(function(){var e,t;return Us(this,(function(i){switch(i.label){case 0:i.trys.push([0,2,,3]);return[4,fetch(n,{method:"get",mode:"no-cors",credentials:"include"})];case 1:i.sent();return[3,3];case 2:e=i.sent();cs("Can't send deliv action ",e);return[3,3];case 3:i.trys.push([3,5,,6]);return[4,fetch(r,{method:"get",mode:"no-cors",credentials:"include"})];case 4:i.sent();return[3,6];case 5:t=i.sent();cs("Can't send open action ",t);return[3,6];case 6:return[2]}}
2))}))}())}function i(e){cs("background message handler firebase");cs("SW Received push: ");cs(e)}function o(t){var n=this;var r;cs("push safari ios handler");var i=(r=t.data)===null||r===void 0?void 0:r.json();if(i){var o=i.title,a=i.body,s=i.icon,c=i.tag,u=i.data;var f=JSON.parse(u);var l=f.hub_link.ack;var d=f.hub_link.open;cs("event data: ",i);t.waitUntil(function(){return Ws(n,void 0,void 0,(function(){var t,n;return Us(this,(function(r){switch(r.label){case 0:r.trys.push([0,2,,3]);return[4,fetch(l,{method:"get",mode:"no-cors",credentials:"include"})];case 1:r.sent();return[3,3];case 2:t=r.sent();cs("Can't send deliv action ",t);return[3,3];case 3:r.trys.push([3,5,,6]);return[4,fetch(d,{method:"get",mode:"no-cors",credentials:"include"})];case 4:r.sent();return[3,6];case 5:n=r.sent();cs("Can't send open action ",n);return[3,6];case 6:return[4,e.registration.showNotification(o,{body:a,icon:s,tag:c,data:f})];case 7:r.sent();return[2]}}))}))}())}}function a(t){return Ws(this,void 0,void 0,(function(){var n=this;return Us(this,(function(r){cs("SW Click: ",t);t.notification.close();t.waitUntil(function(){return Ws(n,void 0,void 0,(function(){var n;return Us(this,(function(r){switch(r.label){case 0:n=t.notification.data.url;return[4,e.clients.matchAll({type:"window"})];case 1:r.sent();if(!n)return[3,3];return[4,e.clients.openWindow(n)];case 2:r.sent();r.label=3;case 3:return[2]}}
2))}))}());return[2]}))}))}function s(t){cs("push basic handler");cs("SW Received push: ");cs(t);t.waitUntil(e.registration.pushManager.getSubscription().then((function(t){cs("fetch request");return fetch(n.serverURL+n.serverPushContentPath,{method:"post",credentials:"include",body:JSON.stringify({provider:vs(n.browser||""),endpoint:(t===null||t===void 0?void 0:t.endpoint)||"",resource_token:n.resourceToken})}).then((function(t){cs("fetch response: ",t);if(t.status!==200){throw new Error("Error on getting push content: "+t.status)}return t.json().then((function(t){cs("fetch parse json: ",t);if(t.error){throw new Error("The server returns an error: "+t.error)}var n=t.data.title;var r=t.data.body;var i=t.data.icon;var o=t.data.tag;var a=t.data.data;return e.registration.showNotification(n,{body:r,icon:i,tag:o,data:a})}))})).catch((function(e){console.error("Unable to receive data from server",e)}))})))}function c(t){cs("SW Click: ",t);if(t.notification.tag==="user_visible_auto_notification"||!t.notification.data){return}t.notification.close();t.waitUntil(e.clients.matchAll({type:"window"}).then((function(){var r,i;var o=t.notification.data;var a=(o===null||o===void 0?void 0:o.click_action)||((i=(r=o===null||o===void 0?void 0:o.FCM_MSG)===null||r===void 0?void 0:r.notification)===null||i===void 0?void 0:i.click_action);if(t.action!==""&&typeof t.action==="string"){a=t.action}if(a.indexOf("?provider=")===-1){if(bs(n)){a=a+"?provider="+vs(n.browser||"")+"Firebase"}else{a=a+"?provider="+vs(n.browser||"")}}cs("click URL: ",a);if(e.clients.openWindow){return e.clients.openWindow(a)}return undefined})))}try{cs("sw: start install handlers");e.addEventListener("install",(function(t){e.skipWaiting()}));n.browser=_s(e.location.href);if(!n.browser){cs("clickNotificationHandler. Location: ",e.location.href,"getBrowserNameFromURL:",_s(e.location.href));throw new Error("No browser submitted")}if(bs(n)){cs("sw: should use firebase");e.addEventListener("push",r);e.addEventListener("notificationclick",c);gn({appId:n.firebase.appId,apiKey:n.firebase.apiKey,projectId:n.firebase.projectId,messagingSenderId:n.firebase.messagingSenderId,storageBucket:[n.firebase.projectId,n.firebase.bucketSubdomain].join("."),authDomain:[n.firebase.projectId,n.firebase.authSubdomain].join("."),databaseURL:[n.firebase.projectId,n.firebase.dbSubdomain].join(".")});var u=Co();Mo(u,i)}else if(n.browser==="Safari"){cs("sw: setup safari ios handlers");e.addEventListener("push",o);e.addEventListener("notificationclick",a)}else{cs("sw: setup default handlers");e.addEventListener("push",s);e.addEventListener("notificationclick",c)}}catch(e){cs("SW setup error",e)}})(self)})()})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.