!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).firebase=t()}(this,function(){"use strict";var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function e(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var p=function(){return(p=Object.assign||function(e){for(var t,n=1,r=arguments.length;na[0]&&t[1]=e.length?void 0:e)&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||0>6|192:(55296==(64512&i)&&r+1>18|240,t[n++]=i>>12&63|128):t[n++]=i>>12|224,t[n++]=i>>6&63|128),t[n++]=63&i|128)}return t},i={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray:function(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();for(var n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[],i=0;i>6,u=63&u;c||(u=64,a||(l=64)),r.push(n[o>>2],n[(3&o)<<4|s>>4],n[l],n[u])}return r.join("")},encodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(n(e),t)},decodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):function(e){for(var t=[],n=0,r=0;n>10)),t[r++]=String.fromCharCode(56320+(1023&i))):(o=e[n++],a=e[n++],t[r++]=String.fromCharCode((15&s)<<12|(63&o)<<6|63&a))}return t.join("")}(this.decodeStringToByteArray(e,t))},decodeStringToByteArray:function(e,t){this.init_();for(var n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[],i=0;i>4),64!==s&&(r.push(a<<4&240|s>>2),64!==c&&r.push(s<<6&192|c))}return r},init_:function(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(var e=0;e=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}},u=(e(o,t=Error),o);function o(){var e=null!==t&&t.apply(this,arguments)||this;return e.name="DecodeBase64StringError",e}var s=function(e){return t=n(e),i.encodeByteArray(t,!0).replace(/\./g,"");var t};function c(e,t){if(!(t instanceof Object))return t;switch(t.constructor){case Date:return new Date(t.getTime());case Object:void 0===e&&(e={});break;case Array:e=[];break;default:return t}for(var n in t)t.hasOwnProperty(n)&&"__proto__"!==n&&(e[n]=c(e[n],t[n]));return e}function l(){return function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("Unable to locate global object.")}().__FIREBASE_DEFAULTS__}function g(){if("undefined"!=typeof document){try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch(e){return}var e=e&&function(e){try{return i.decodeString(e,!0)}catch(e){console.error("base64Decode failed: ",e)}return null}(e[1]);return e&&JSON.parse(e)}}var m=function(){try{return l()||function(){if("undefined"!=typeof process&&void 0!==process.env){var e=process.env.__FIREBASE_DEFAULTS__;return e?JSON.parse(e):void 0}}()||g()}catch(e){return void console.info("Unable to get __FIREBASE_DEFAULTS__ due to: ".concat(e))}},b=function(){var e;return null===(e=m())||void 0===e?void 0:e.config},y=(_.prototype.wrapCallback=function(n){var r=this;return function(e,t){e?r.reject(e):r.resolve(t),"function"==typeof n&&(r.promise.catch(function(){}),1===n.length?n(e):n(e,t))}},_);function _(){var n=this;this.reject=function(){},this.resolve=function(){},this.promise=new Promise(function(e,t){n.resolve=e,n.reject=t})}function w(){try{return"object"==typeof indexedDB}catch(e){return}}function E(){return new Promise(function(e,t){try{var n=!0,r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=function(){i.result.close(),n||self.indexedDB.deleteDatabase(r),e(!0)},i.onupgradeneeded=function(){n=!1},i.onerror=function(){var e;t((null===(e=i.error)||void 0===e?void 0:e.message)||"")}}catch(e){t(e)}})}var I,S=(e(C,I=Error),C);function C(e,t,n){var r=I.call(this,t)||this;return r.code=e,r.customData=n,r.name="FirebaseError",Object.setPrototypeOf(r,C.prototype),Error.captureStackTrace&&Error.captureStackTrace(r,T.prototype.create),r}var T=(A.prototype.create=function(e){for(var t=[],n=1;n")})):"Error",a="".concat(this.serviceName,": ").concat(a," (").concat(o,").");return new S(o,a,i)},A);function A(e,t,n){this.service=e,this.serviceName=t,this.errors=n}var O=/\{\$([^}]+)}/g;function D(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function N(e,t){if(e===t)return 1;for(var n=Object.keys(e),r=Object.keys(t),i=0,o=n;i=(null!=o?o:e.logLevel)&&a({level:z[t].toLowerCase(),message:i,args:n,type:e.name})}}(n[e])}const Q=(t,e)=>e.some(e=>t instanceof e);let ee,te;const ne=new WeakMap,re=new WeakMap,ie=new WeakMap,oe=new WeakMap,ae=new WeakMap;let se={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return re.get(e);if("objectStoreNames"===t)return e.objectStoreNames||ie.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return le(e[t])},set(e,t,n){return e[t]=n,!0},has(e,t){return e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e}};function ce(r){return r!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(te=te||[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey]).includes(r)?function(...e){return r.apply(fe(this),e),le(ne.get(this))}:function(...e){return le(r.apply(fe(this),e))}:function(e,...t){var n=r.call(fe(this),e,...t);return ie.set(n,e.sort?e.sort():[e]),le(n)}}function ue(e){return"function"==typeof e?ce(e):(e instanceof IDBTransaction&&(o=e,re.has(o)||(t=new Promise((e,t)=>{const n=()=>{o.removeEventListener("complete",r),o.removeEventListener("error",i),o.removeEventListener("abort",i)},r=()=>{e(),n()},i=()=>{t(o.error||new DOMException("AbortError","AbortError")),n()};o.addEventListener("complete",r),o.addEventListener("error",i),o.addEventListener("abort",i)}),re.set(o,t))),Q(e,ee=ee||[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])?new Proxy(e,se):e);var o,t}function le(e){if(e instanceof IDBRequest)return function(o){const e=new Promise((e,t)=>{const n=()=>{o.removeEventListener("success",r),o.removeEventListener("error",i)},r=()=>{e(le(o.result)),n()},i=()=>{t(o.error),n()};o.addEventListener("success",r),o.addEventListener("error",i)});return e.then(e=>{e instanceof IDBCursor&&ne.set(e,o)}).catch(()=>{}),ae.set(e,o),e}(e);if(oe.has(e))return oe.get(e);var t=ue(e);return t!==e&&(oe.set(e,t),ae.set(t,e)),t}const fe=e=>ae.get(e);function pe(e,t,{blocked:n,upgrade:r,blocking:i,terminated:o}={}){const a=indexedDB.open(e,t),s=le(a);return r&&a.addEventListener("upgradeneeded",e=>{r(le(a.result),e.oldVersion,e.newVersion,le(a.transaction),e)}),n&&a.addEventListener("blocked",e=>n(e.oldVersion,e.newVersion,e)),s.then(e=>{o&&e.addEventListener("close",()=>o()),i&&e.addEventListener("versionchange",e=>i(e.oldVersion,e.newVersion,e))}).catch(()=>{}),s}const he=["get","getKey","getAll","getAllKeys","count"],de=["put","add","delete","clear"],ve=new Map;function ge(e,t){if(e instanceof IDBDatabase&&!(t in e)&&"string"==typeof t){if(ve.get(t))return ve.get(t);const i=t.replace(/FromIndex$/,""),o=t!==i,a=de.includes(i);if(i in(o?IDBIndex:IDBObjectStore).prototype&&(a||he.includes(i))){var n=async function(e,...t){var n=this.transaction(e,a?"readwrite":"readonly");let r=n.store;return o&&(r=r.index(t.shift())),(await Promise.all([r[i](...t),a&&n.done]))[0]};return ve.set(t,n),n}}}se={...$=se,get:(e,t,n)=>ge(e,t)||$.get(e,t,n),has:(e,t)=>!!ge(e,t)||$.has(e,t)};var me=(be.prototype.getPlatformInfoString=function(){return this.container.getProviders().map(function(e){if("VERSION"!==(null==(t=e.getComponent())?void 0:t.type))return null;var t,t=e.getImmediate();return"".concat(t.library,"/").concat(t.version)}).filter(function(e){return e}).join(" ")},be);function be(e){this.container=e}var ye="@firebase/app",_e=new Y("@firebase/app"),we="[DEFAULT]",Ee=((De={})[ye]="fire-core",De["@firebase/app-compat"]="fire-core-compat",De["@firebase/analytics"]="fire-analytics",De["@firebase/analytics-compat"]="fire-analytics-compat",De["@firebase/app-check"]="fire-app-check",De["@firebase/app-check-compat"]="fire-app-check-compat",De["@firebase/auth"]="fire-auth",De["@firebase/auth-compat"]="fire-auth-compat",De["@firebase/database"]="fire-rtdb",De["@firebase/database-compat"]="fire-rtdb-compat",De["@firebase/functions"]="fire-fn",De["@firebase/functions-compat"]="fire-fn-compat",De["@firebase/installations"]="fire-iid",De["@firebase/installations-compat"]="fire-iid-compat",De["@firebase/messaging"]="fire-fcm",De["@firebase/messaging-compat"]="fire-fcm-compat",De["@firebase/performance"]="fire-perf",De["@firebase/performance-compat"]="fire-perf-compat",De["@firebase/remote-config"]="fire-rc",De["@firebase/remote-config-compat"]="fire-rc-compat",De["@firebase/storage"]="fire-gcs",De["@firebase/storage-compat"]="fire-gcs-compat",De["@firebase/firestore"]="fire-fst",De["@firebase/firestore-compat"]="fire-fst-compat",De["fire-js"]="fire-js",De.firebase="fire-js-all",De),Ie=new Map,Se=new Map;function Ce(t,n){try{t.container.addComponent(n)}catch(e){_e.debug("Component ".concat(n.name," failed to register with FirebaseApp ").concat(t.name),e)}}function Te(e,t){e.container.addOrOverwriteComponent(t)}function Ae(e){var t,n,r=e.name;if(Se.has(r))return _e.debug("There were multiple attempts to register component ".concat(r,".")),!1;Se.set(r,e);try{for(var i=d(Ie.values()),o=i.next();!o.done;o=i.next())Ce(o.value,e)}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return!0}function Oe(e,t){var n=e.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),e.container.getProvider(t)}var De=((it={})["no-app"]="No Firebase App '{$appName}' has been created - call initializeApp() first",it["bad-app-name"]="Illegal App name: '{$appName}",it["duplicate-app"]="Firebase App named '{$appName}' already exists with different options or config",it["app-deleted"]="Firebase App named '{$appName}' already deleted",it["no-options"]="Need to provide options, when not being deployed to hosting via source.",it["invalid-app-argument"]="firebase.{$appName}() takes either no argument or a Firebase App instance.",it["invalid-log-argument"]="First argument to `onLog` must be null or a function.",it["idb-open"]="Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.",it["idb-get"]="Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.",it["idb-set"]="Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.",it["idb-delete"]="Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.",it),Ne=new T("app","Firebase",De),Pe=(Object.defineProperty(ke.prototype,"automaticDataCollectionEnabled",{get:function(){return this.checkDestroyed(),this._automaticDataCollectionEnabled},set:function(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e},enumerable:!1,configurable:!0}),Object.defineProperty(ke.prototype,"name",{get:function(){return this.checkDestroyed(),this._name},enumerable:!1,configurable:!0}),Object.defineProperty(ke.prototype,"options",{get:function(){return this.checkDestroyed(),this._options},enumerable:!1,configurable:!0}),Object.defineProperty(ke.prototype,"config",{get:function(){return this.checkDestroyed(),this._config},enumerable:!1,configurable:!0}),Object.defineProperty(ke.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(ke.prototype,"isDeleted",{get:function(){return this._isDeleted},set:function(e){this._isDeleted=e},enumerable:!1,configurable:!0}),ke.prototype.checkDestroyed=function(){if(this.isDeleted)throw Ne.create("app-deleted",{appName:this._name})},ke);function ke(e,t,n){var r=this;this._isDeleted=!1,this._options=p({},e),this._config=p({},t),this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=n,this.container.addComponent(new R("app",function(){return r},"PUBLIC"))}var Me="10.8.0";function Le(e,t){var n,r,i=e,o=p({name:we,automaticDataCollectionEnabled:!1},t="object"!=typeof(t=void 0===t?{}:t)?{name:t}:t),a=o.name;if("string"!=typeof a||!a)throw Ne.create("bad-app-name",{appName:String(a)});if(!(i=i||b()))throw Ne.create("no-options");var s=Ie.get(a);if(s){if(N(i,s.options)&&N(o,s.config))return s;throw Ne.create("duplicate-app",{appName:a})}var c=new V(a);try{for(var u=d(Se.values()),l=u.next();!l.done;l=u.next()){var f=l.value;c.addComponent(f)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}o=new Pe(i,o,c);return Ie.set(a,o),o}function Be(n){return f(this,void 0,void 0,function(){var t;return h(this,function(e){switch(e.label){case 0:return(t=n.name,Ie.has(t))?(Ie.delete(t),[4,Promise.all(n.container.getProviders().map(function(e){return e.delete()}))]):[3,2];case 1:e.sent(),n.isDeleted=!0,e.label=2;case 2:return[2]}})})}function Re(e,t,n){var r=null!==(a=Ee[e])&&void 0!==a?a:e;n&&(r+="-".concat(n));var i=r.match(/\s|\//),o=t.match(/\s|\//);if(i||o){var a=['Unable to register library "'.concat(r,'" with version "').concat(t,'":')];return i&&a.push('library name "'.concat(r,'" contains illegal characters (whitespace or "/")')),i&&o&&a.push("and"),o&&a.push('version name "'.concat(t,'" contains illegal characters (whitespace or "/")')),void _e.warn(a.join(" "))}Ae(new R("".concat(r,"-version"),function(){return{library:r,version:t}},"VERSION"))}function je(e,t){if(null!==e&&"function"!=typeof e)throw Ne.create("invalid-log-argument");Z(e,t)}function Fe(e){var t;t=e,q.forEach(function(e){e.setLogLevel(t)})}var xe="firebase-heartbeat-database",Ue=1,Ve="firebase-heartbeat-store",He=null;function ze(){return He=He||pe(xe,Ue,{upgrade:function(e,t){if(0===t)try{e.createObjectStore(Ve)}catch(e){console.warn(e)}}}).catch(function(e){throw Ne.create("idb-open",{originalErrorMessage:e.message})})}function qe(r,i){return f(this,void 0,void 0,function(){var t,n;return h(this,function(e){switch(e.label){case 0:return e.trys.push([0,4,,5]),[4,ze()];case 1:return n=e.sent(),t=n.transaction(Ve,"readwrite"),[4,t.objectStore(Ve).put(i,We(r))];case 2:return e.sent(),[4,t.done];case 3:return e.sent(),[3,5];case 4:return(n=e.sent())instanceof S?_e.warn(n.message):(n=Ne.create("idb-set",{originalErrorMessage:null==n?void 0:n.message}),_e.warn(n.message)),[3,5];case 5:return[2]}})})}function We(e){return"".concat(e.name,"!").concat(e.options.appId)}var $e=(Ke.prototype.triggerHeartbeat=function(){var i;return f(this,void 0,void 0,function(){var t,n,r;return h(this,function(e){switch(e.label){case 0:return(t=this.container.getProvider("platform-logger").getImmediate(),t=t.getPlatformInfoString(),n=Je(),null!=(null===(i=this._heartbeatsCache)||void 0===i?void 0:i.heartbeats))?[3,2]:[4,(r=this)._heartbeatsCachePromise];case 1:if(r._heartbeatsCache=e.sent(),null==(null===(i=this._heartbeatsCache)||void 0===i?void 0:i.heartbeats))return[2];e.label=2;case 2:return this._heartbeatsCache.lastSentHeartbeatDate===n||this._heartbeatsCache.heartbeats.some(function(e){return e.date===n})?[2]:(this._heartbeatsCache.heartbeats.push({date:n,agent:t}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(function(e){var t=new Date(e.date).valueOf();return Date.now()-t<=2592e6}),[2,this._storage.overwrite(this._heartbeatsCache)])}})})},Ke.prototype.getHeartbeatsHeader=function(){var i;return f(this,void 0,void 0,function(){var t,n,r;return h(this,function(e){switch(e.label){case 0:return null!==this._heartbeatsCache?[3,2]:[4,this._heartbeatsCachePromise];case 1:e.sent(),e.label=2;case 2:return null==(null===(i=this._heartbeatsCache)||void 0===i?void 0:i.heartbeats)||0===this._heartbeatsCache.heartbeats.length?[2,""]:(t=Je(),n=function(e,n){var t,r;void 0===n&&(n=1024);var i=[],o=e.slice();try{for(var a=d(e),s=a.next();!s.done;s=a.next())if("break"===function(t){var e=i.find(function(e){return e.agent===t.agent});if(e){if(e.dates.push(t.date),Ze(i)>n)return e.dates.pop(),"break"}else if(i.push({agent:t.agent,dates:[t.date]}),Ze(i)>n)return i.pop(),"break";o=o.slice(1)}(s.value))break}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}return{heartbeatsToSend:i,unsentEntries:o}}(this._heartbeatsCache.heartbeats),r=n.heartbeatsToSend,n=n.unsentEntries,r=s(JSON.stringify({version:2,heartbeats:r})),this._heartbeatsCache.lastSentHeartbeatDate=t,0i&&r.push(t.charAt(i));return r.join("")}var cn,un,ln=(fn.prototype.getFlTransportFullUrl=function(){return this.flTransportEndpointUrl.concat("?key=",this.transportKey)},fn.getInstance=function(){return rn=void 0===rn?new fn:rn},fn);function fn(){this.instrumentationEnabled=!0,this.dataCollectionEnabled=!0,this.loggingEnabled=!1,this.tracesSamplingRate=1,this.networkRequestsSamplingRate=1,this.logEndPointUrl="https://firebaselogging.googleapis.com/v0cc/log?format=json_proto",this.flTransportEndpointUrl=sn("hts/frbslgigp.ogepscmv/ieo/eaylg","tp:/ieaeogn-agolai.o/1frlglgc/o"),this.transportKey=sn("AzSC8r6ReiGqFMyfvgow","Iayx0u-XT3vksVM-pIV"),this.logSource=462,this.logTraceAfterSampling=!1,this.logNetworkAfterSampling=!1,this.configTimeToLive=12}(un=cn=cn||{})[un.UNKNOWN=0]="UNKNOWN",un[un.VISIBLE=1]="VISIBLE",un[un.HIDDEN=2]="HIDDEN";var pn=["firebase_","google_","ga_"],hn=new RegExp("^[a-zA-Z]\\w*$");function dn(){switch(on.getInstance().document.visibilityState){case"visible":return cn.VISIBLE;case"hidden":return cn.HIDDEN;default:return cn.UNKNOWN}}function vn(e){var t=null===(t=e.options)||void 0===t?void 0:t.appId;if(!t)throw en.create("no app id");return t}var gn="0.0.1",mn={loggingEnabled:!0},bn="FIREBASE_INSTALLATIONS_AUTH";function yn(e,t){var r,i,n=function(){var e=on.getInstance().localStorage;if(e){var t=e.getItem(Qt);if(t&&function(e){return Number(e)>Date.now()}(t)){e=e.getItem(Zt);if(e)try{return JSON.parse(e)}catch(e){return}}}}();return n?(wn(n),Promise.resolve()):(i=t,function(e){var t=e.getToken();return t.then(function(e){}),t}((r=e).installations).then(function(e){var t=function(e){var t=null===(t=e.options)||void 0===t?void 0:t.projectId;if(!t)throw en.create("no project id");return t}(r.app),n=function(e){var t=null===(t=e.options)||void 0===t?void 0:t.apiKey;if(!t)throw en.create("no api key");return t}(r.app),n="https://firebaseremoteconfig.googleapis.com/v1/projects/".concat(t,"/namespaces/fireperf:fetch?key=").concat(n),n=new Request(n,{method:"POST",headers:{Authorization:"".concat(bn," ").concat(e)},body:JSON.stringify({app_instance_id:i,app_instance_id_token:e,app_id:vn(r.app),app_version:Yt,sdk_version:gn})});return fetch(n).then(function(e){if(e.ok)return e.json();throw en.create("RC response not ok")})}).catch(function(){tn.info(_n)}).then(wn).then(function(e){var t;e=e,t=on.getInstance().localStorage,e&&t&&(t.setItem(Zt,JSON.stringify(e)),t.setItem(Qt,String(Date.now()+60*ln.getInstance().configTimeToLive*60*1e3)))},function(){}))}var _n="Could not fetch config, will use default configs";function wn(e){if(!e)return e;var t=ln.getInstance(),n=e.entries||{};return void 0!==n.fpr_enabled?t.loggingEnabled="true"===String(n.fpr_enabled):t.loggingEnabled=mn.loggingEnabled,n.fpr_log_source?t.logSource=Number(n.fpr_log_source):mn.logSource&&(t.logSource=mn.logSource),n.fpr_log_endpoint_url?t.logEndPointUrl=n.fpr_log_endpoint_url:mn.logEndPointUrl&&(t.logEndPointUrl=mn.logEndPointUrl),n.fpr_log_transport_key?t.transportKey=n.fpr_log_transport_key:mn.transportKey&&(t.transportKey=mn.transportKey),void 0!==n.fpr_vc_network_request_sampling_rate?t.networkRequestsSamplingRate=Number(n.fpr_vc_network_request_sampling_rate):void 0!==mn.networkRequestsSamplingRate&&(t.networkRequestsSamplingRate=mn.networkRequestsSamplingRate),void 0!==n.fpr_vc_trace_sampling_rate?t.tracesSamplingRate=Number(n.fpr_vc_trace_sampling_rate):void 0!==mn.tracesSamplingRate&&(t.tracesSamplingRate=mn.tracesSamplingRate),t.logTraceAfterSampling=En(t.tracesSamplingRate),t.logNetworkAfterSampling=En(t.networkRequestsSamplingRate),e}function En(e){return Math.random()<=e}var In,Sn=1;function Cn(e){var n;return Sn=2,In=In||(n=e,function(){var n=on.getInstance().document;return new Promise(function(e){var t;n&&"complete"!==n.readyState?(t=function(){"complete"===n.readyState&&(n.removeEventListener("readystatechange",t),e())},n.addEventListener("readystatechange",t)):e()})}().then(function(){return e=n.installations,(t=e.getId()).then(function(e){nn=e}),t;var e,t}).then(function(e){return yn(n,e)}).then(Tn,Tn))}function Tn(){Sn=3}var An,On=1e4,Dn=3,Nn=1e3,Pn=Dn,kn=[],Mn=!1;function Ln(e){setTimeout(function(){var e,t;if(0!==Pn)return kn.length?(e=kn.splice(0,Nn),t=e.map(function(e){return{source_extension_json_proto3:e.message,event_time_ms:String(e.eventTime)}}),void function(e,r){return function(e){var t=ln.getInstance().getFlTransportFullUrl();return fetch(t,{method:"POST",body:JSON.stringify(e)})}(e).then(function(e){return e.ok||tn.info("Call to Firebase backend failed."),e.json()}).then(function(e){var t=Number(e.nextRequestWaitMillis),n=On;isNaN(t)||(n=Math.max(t,n));t=e.logResponseDetails;Array.isArray(t)&&0