PageSourceSearch

https://sosparents.app/assets/web-CVsGV3c0.js

js sosparents.app collected 2026-09-24 14:32:52 UTC 74,039 bytes, 736 lines download raw bytes

1import{W as dt,l as ut,m as v}from"./index-CB9t5UQB.js";import"./lucide-DFHkm9UB.js";import"./react-vendor-BqAUNqH1.js";/**
2 * @license
3 * Copyright 2025 Google LLC
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 *   http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */const ft=()=>{};var le={};/**
17 * @license
18 * Copyright 2017 Google LLC
19 *
20 * Licensed under the Apache License, Version 2.0 (the "License");
21 * you may not use this file except in compliance with the License.
22 * You may obtain a copy of the License at
23 *
24 *   http://www.apache.org/licenses/LICENSE-2.0
25 *
26 * Unless required by applicable law or agreed to in writing, software
27 * distributed under the License is distributed on an "AS IS" BASIS,
28 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29 * See the License for the specific language governing permissions and
30 * limitations under the License.
31 */const ve=function(e){const t=[];let n=0;for(let r=0;r<e.length;r++){let a=e.charCodeAt(r);a<128?t[n++]=a:a<2048?(t[n++]=a>>6|192,t[n++]=a&63|128):(a&64512)===55296&&r+1<e.length&&(e.charCodeAt(r+1)&64512)===56320?(a=65536+((a&1023)<<10)+(e.charCodeAt(++r)&1023),t[n++]=a>>18|240,t[n++]=a>>12&63|128,t[n++]=a>>6&63|128,t[n++]=a&63|128):(t[n++]=a>>12|224,t[n++]=a>>6&63|128,t[n++]=a&63|128)}return t},ht=function(e){const t=[];let n=0,r=0;for(;n<e.length;){const a=e[n++];if(a<128)t[r++]=String.fromCharCode(a);else if(a>191&&a<224){const s=e[n++];t[r++]=String.fromCharCode((a&31)<<6|s&63)}else if(a>239&&a<365){const s=e[n++],i=e[n++],o=e[n++],c=((a&7)<<18|(s&63)<<12|(i&63)<<6|o&63)-65536;t[r++]=String.fromCharCode(55296+(c>>10)),t[r++]=String.fromCharCode(56320+(c&1023))}else{const s=e[n++],i=e[n++];t[r++]=String.fromCharCode((a&15)<<12|(s&63)<<6|i&63)}}return t.join("")},Re={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: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_,r=[];for(let a=0;a<e.length;a+=3){const s=e[a],i=a+1<e.length,o=i?e[a+1]:0,c=a+2<e.length,l=c?e[a+2]:0,h=s>>2,f=(s&3)<<4|o>>4;let p=(o&15)<<2|l>>6,$=l&63;c||($=64,i||(p=64)),r.push(n[h],n[f],n[p],n[$])}return r.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(ve(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):ht(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();const n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let a=0;a<e.length;){const s=n[e.charAt(a++)],o=a<e.length?n[e.charAt(a)]:0;++a;const l=a<e.length?n[e.charAt(a)]:64;++a;const f=a<e.length?n[e.charAt(a)]:64;if(++a,s==null||o==null||l==null||f==null)throw new pt;const p=s<<2|o>>4;if(r.push(p),l!==64){const $=o<<4&240|l>>2;if(r.push($),f!==64){const lt=l<<6&192|f;r.push(lt)}}}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,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}};
31class pt extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const mt=function(e){const t=ve(e);return Re.encodeByteArray(t,!0)},Oe=function(e){return mt(e).replace(/\./g,"")},gt=function(e){try{return Re.decodeString(e,!0)}catch(t){console.error("base64Decode failed: ",t)}return null};/**
32 * @license
33 * Copyright 2022 Google LLC
34 *
35 * Licensed under the Apache License, Version 2.0 (the "License");
36 * you may not use this file except in compliance with the License.
37 * You may obtain a copy of the License at
38 *
39 *   http://www.apache.org/licenses/LICENSE-2.0
40 *
41 * Unless required by applicable law or agreed to in writing, software
42 * distributed under the License is distributed on an "AS IS" BASIS,
43 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
44 * See the License for the specific language governing permissions and
45 * limitations under the License.
46 */function bt(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}/**
47 * @license
48 * Copyright 2022 Google LLC
49 *
50 * Licensed under the Apache License, Version 2.0 (the "License");
51 * you may not use this file except in compliance with the License.
52 * You may obtain a copy of the License at
53 *
54 *   http://www.apache.org/licenses/LICENSE-2.0
55 *
56 * Unless required by applicable law or agreed to in writing, software
57 * distributed under the License is distributed on an "AS IS" BASIS,
58 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
59 * See the License for the specific language governing permissions and
60 * limitations under the License.
61 */const yt=()=>bt().__FIREBASE_DEFAULTS__,wt=()=>{if(typeof process>"u"||typeof le>"u")return;const e=le.__FIREBASE_DEFAULTS__;if(e)return JSON.parse(e)},It=()=>{if(typeof document>"u")return;let e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const t=e&&gt(e[1]);return t&&JSON.parse(t)},Et=()=>{try{return ft()||yt()||wt()||It()}catch(e){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`);return}},Me=()=>{var e;return(e=Et())==null?void 0:e.config};/**
62 * @license
63 * Copyright 2017 Google LLC
64 *
65 * Licensed under the Apache License, Version 2.0 (the "License");
66 * you may not use this file except in compliance with the License.
67 * You may obtain a copy of the License at
68 *
69 *   http://www.apache.org/licenses/LICENSE-2.0
70 *
71 * Unless required by applicable law or agreed to in writing, software
72 * distributed under the License is distributed on an "AS IS" BASIS,
73 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
74 * See the License for the specific language governing permissions and
75 * limitations under the License.
76 */class _t{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((t,n)=>{this.resolve=t,this.reject=n})}wrapCallback(t){return(n,r)=>{n?this.reject(n):this.resolve(r),typeof t=="function"&&(this.promise.catch(()=>{}),t.length===1?t(n):t(n,r))}}}function At(){const e=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof e=="object"&&e.id!==void 0}function Be(){try{return typeof indexedDB=="object"}catch{return!1}}function $e(){return new Promise((e,t)=>{try{let n=!0;const r="validate-browser-context-for-indexeddb-analytics-module",a=self.indexedDB.open(r);a.onsuccess=()=>{a.result.close(),n||self.indexedDB.deleteDatabase(r),e(!0)},a.onupgradeneeded=()=>{n=!1},a.onerror=()=>{var s;t(((s=a.error)==null?void 0:s.message)||"")}}catch(n){t(n)}})}function St(){return!(typeof navigator>"u"||!navigator.cookieEnabled)}/**
77 * @license
78 * Copyright 2017 Google LLC
79 *
80 * Licensed under the Apache License, Version 2.0 (the "License");
81 * you may not use this file except in compliance with the License.
82 * You may obtain a copy of the License at
83 *
84 *   http://www.apache.org/licenses/LICENSE-2.0
85 *
86 * Unless required by applicable law or agreed to in writing, software
87 * distributed under the License is distributed on an "AS IS" BASIS,
88 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
89 * See the License for the specific language governing permissions and
90 * limitations under the License.
91 */const Tt="FirebaseError";
91class D extends Error{constructor(t,n,r){super(n),this.code=t,this.customData=r,this.name=Tt,Object.setPrototypeOf(this,D.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,L.prototype.create)}}class L{constructor(t,n,r){this.service=t,this.serviceName=n,this.errors=r}create(t,...n){const r=n[0]||{},a=`${this.service}/${t}`,s=this.errors[t],i=s?Ct(s,r):"Error",o=`${this.serviceName}: ${i} (${a}).`;return new D(a,o,r)}}function Ct(e,t){try{let n=0,r="";for(;n<e.length;){const a=e.indexOf("{$",n);if(a===-1){r+=e.substring(n);break}const s=e.indexOf("}",a+2);if(s===-1){r+=e.substring(n);break}const i=e.substring(a+2,s),o=t[i];r+=e.substring(n,a)+(o!=null?String(o):`<${i}?>`),n=s+1}return r}catch{return e}}function N(e,t){if(e===t)return!0;const n=Object.keys(e),r=Object.keys(t);for(const a of n){if(!r.includes(a))return!1;const s=e[a],i=t[a];if(de(s)&&de(i)){if(!N(s,i))return!1}else if(s!==i)return!1}for(const a of r)if(!n.includes(a))return!1;return!0}function de(e){return e!==null&&typeof e=="object"}/**
92 * @license
93 * Copyright 2019 Google LLC
94 *
95 * Licensed under the Apache License, Version 2.0 (the "License");
96 * you may not use this file except in compliance with the License.
97 * You may obtain a copy of the License at
98 *
99 *   http://www.apache.org/licenses/LICENSE-2.0
100 *
101 * Unless required by applicable law or agreed to in writing, software
102 * distributed under the License is distributed on an "AS IS" BASIS,
103 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
104 * See the License for the specific language governing permissions and
105 * limitations under the License.
106 */const Dt=1e3,vt=2,Rt=4*60*60*1e3,Ot=.5;function ue(e,t=Dt,n=vt){const r=t*Math.pow(n,e),a=Math.round(Ot*r*(Math.random()-.5)*2);return Math.min(Rt,r+a)}/**
107 * @license
108 * Copyright 2021 Google LLC
109 *
110 * Licensed under the Apache License, Version 2.0 (the "License");
111 * you may not use this file except in compliance with the License.
112 * You may obtain a copy of the License at
113 *
114 *   http://www.apache.org/licenses/LICENSE-2.0
115 *
116 * Unless required by applicable law or agreed to in writing, software
117 * distributed under the License is distributed on an "AS IS" BASIS,
118 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
119 * See the License for the specific language governing permissions and
120 * limitations under the License.
121 */function B(e){return e&&e._delegate?e._delegate:e}class I{constructor(t,n,r){this.name=t,this.instanceFactory=n,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(t){return this.instantiationMode=t,this}setMultipleInstances(t){return this.multipleInstances=t,this}setServiceProps(t){return this.serviceProps=t,this}setInstanceCreatedCallback(t){return this.onInstanceCreated=t,this}}/**
122 * @license
123 * Copyright 2019 Google LLC
124 *
125 * Licensed under the Apache License, Version 2.0 (the "License");
126 * you may not use this file except in compliance with the License.
127 * You may obtain a copy of the License at
128 *
129 *   http://www.apache.org/licenses/LICENSE-2.0
130 *
131 * Unless required by applicable law or agreed to in writing, software
132 * distributed under the License is distributed on an "AS IS" BASIS,
133 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
134 * See the License for the specific language governing permissions and
135 * limitations under the License.
136 */const E="[DEFAULT]";/**
137 * @license
138 * Copyright 2019 Google LLC
139 *
140 * Licensed under the Apache License, Version 2.0 (the "License");
141 * you may not use this file except in compliance with the License.
142 * You may obtain a copy of the License at
143 *
144 *   http://www.apache.org/licenses/LICENSE-2.0
145 *
146 * Unless required by applicable law or agreed to in writing, software
147 * distributed under the License is distributed on an "AS IS" BASIS,
148 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
149 * See the License for the specific language governing permissions and
150 * limitations under the License.
151 */class Mt{constructor(t,n){this.name=t,this.container=n,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(t){const n=this.normalizeInstanceIdentifier(t);if(!this.instancesDeferred.has(n)){const r=new _t;if(this.instancesDeferred.set(n,r),this.isInitialized(n)||this.shouldAutoInitialize())try{const a=this.getOrInitializeService({instanceIdentifier:n});a&&r.resolve(a)}catch{}}return this.instancesDeferred.get(n).promise}getImmediate(t){const n=this.normalizeInstanceIdentifier(t==null?void 0:t.identifier),r=(t==null?void 0:t.optional)??!1;if(this.isInitialized(n)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:n})}catch(a){if(r)return null;throw a}else{if(r)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(t){if(t.name!==this.name)throw Error(`Mismatching Component ${t.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=t,!!this.shouldAutoInitialize()){if($t(t))try{this.getOrInitializeService({instanceIdentifier:E})}catch{}for(const[n,r]of this.instancesDeferred.entries()){const a=this.normalizeInstanceIdentifier(n);try{const s=this.getOrInitializeService({instanceIdentifier:a});r.resolve(s)}catch{}}}}clearInstance(t=E){this.instancesDeferred.delete(t),this.instancesOptions.delete(t),this.instances.delete(t)}async delete(){const t=Array.from(this.instances.values());await Promise.all([...t.filter(n=>"INTERNAL"in n).map(n=>n.INTERNAL.delete()),...t.filter(n=>"_delete"in n).map(n=>n._delete())])}isComponentSet(){return this.component!=null}isInitialized(t=E){return this.instances.has(t)}getOptions(t=E){return this.instancesOptions.get(t)||{}}initialize(t={}){const{options:n={}}=t,r=this.normalizeInstanceIdentifier(t.instanceIdentifier);if(this.isInitialized(r))throw Error(`${this.name}(${r}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const a=this.getOrInitializeService({instanceIdentifier:r,options:n});for(const[s,i]of this.instancesDeferred.entries()){const o=this.normalizeInstanceIdentifier(s);r===o&&i.resolve(a)}return a}onInit(t,n){const r=this.normalizeInstanceIdentifier(n),a=this.onInitCallbacks.get(r)??new Set;a.add(t),this.onInitCallbacks.set(r,a);const s=this.instances.get(r);return s&&t(s,r),()=>{a.delete(t)}}invokeOnInitCallbacks(t,n){const r=this.onInitCallbacks.get(n);if(r)for(const a of r)try{a(t,n)}catch{}}getOrInitializeService({instanceIdentifier:t,options:n={}}){let r=this.instances.get(t);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:Bt(t),options:n}),this.instances.set(t,r),this.instancesOptions.set(t,n),this.invokeOnInitCallbacks(r,t),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,t,r)}catch{}return r||null}normalizeInstanceIdentifier(t=E){return this.component?this.component.multipleInstances?t:E:t}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}}function Bt(e){return e===E?void 0:e}function $t(e){return e.instantiationMode==="EAGER"}/**
152 * @license
153 * Copyright 2019 Google LLC
154 *
155 * Licensed under the Apache License, Version 2.0 (the "License");
156 * you may not use this file except in compliance with the License.
157 * You may obtain a copy of the License at
158 *
159 *   http://www.apache.org/licenses/LICENSE-2.0
160 *
161 * Unless required by applicable law or agreed to in writing, software
162 * distributed under the License is distributed on an "AS IS" BASIS,
163 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
164 * See the License for the specific language governing permissions and
165 * limitations under the License.
166 */class Nt{constructor(t){this.name=t,this.providers=new Map}addComponent(t){const n=this.getProvider(t.name);if(n.isComponentSet())throw new Error(`Component ${t.name} has already been registered with ${this.name}`);n.setComponent(t)}addOrOverwriteComponent(t){this.getProvider(t.name).isComponentSet()&&this.providers.delete(t.name),this.addComponent(t)}getProvider(t){if(this.providers.has(t))return this.providers.get(t);const n=new Mt(t,this);return this.providers.set(t,n),n}getProviders(){return Array.from(this.providers.values())}}/**
167 * @license
168 * Copyright 2017 Google LLC
169 *
170 * Licensed under the Apache License, Version 2.0 (the "License");
171 * you may not use this file except in compliance with the License.
172 * You may obtain a copy of the License at
173 *
174 *   http://www.apache.org/licenses/LICENSE-2.0
175 *
176 * Unless required by applicable law or agreed to in writing, software
177 * distributed under the License is distributed on an "AS IS" BASIS,
178 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
179 * See the License for the specific language governing permissions and
180 * limitations under the License.
181 */var d;(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"})(d||(d={}));const Pt={debug:d.DEBUG,verbose:d.VERBOSE,info:d.INFO,warn:d.WARN,error:d.ERROR,silent:d.SILENT},kt=d.INFO,Ft={[d.DEBUG]:"log",[d.VERBOSE]:"log",[d.INFO]:"info",[d.WARN]:"warn",[d.ERROR]:"error"},Lt=(e,t,...n)=>{if(t<e.logLevel)return;const r=new Date().toISOString(),a=Ft[t];if(a)console[a](`[${r}]  ${e.name}:`,...n);else throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`)};class Ne{constructor(t){this.name=t,this._logLevel=kt,this._logHandler=Lt,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(t){if(!(t in d))throw new TypeError(`Invalid value "${t}" assigned to \`logLevel\``);this._logLevel=t}setLogLevel(t){this._logLevel=typeof t=="string"?Pt[t]:t}get logHandler(){return this._logHandler}set logHandler(t){if(typeof t!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=t}get userLogHandler(){return this._userLogHandler}set userLogHandler(t){this._userLogHandler=t}debug(...t){this._userLogHandler&&this._userLogHandler(this,d.DEBUG,...t),this._logHandler(this,d.DEBUG,...t)}log(...t){this._userLogHandler&&this._userLogHandler(this,d.VERBOSE,...t),this._logHandler(this,d.VERBOSE,...t)}info(...t){this._userLogHandler&&this._userLogHandler(this,d.INFO,...t),this._logHandler(this,d.INFO,...t)}warn(...t){this._userLogHandler&&this._userLogHandler(this,d.WARN,...t),this._logHandler(this,d.WARN,...t)}error(...t){this._userLogHandler&&this._userLogHandler(this,d.ERROR,...t),this._logHandler(this,d.ERROR,...t)}}const xt=(e,t)=>
181t.some(n=>e instanceof n);let fe,he;function Ht(){return fe||(fe=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Vt(){return he||(he=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Pe=new WeakMap,J=new WeakMap,ke=new WeakMap,U=new WeakMap,re=new WeakMap;function Ut(e){const t=new Promise((n,r)=>{const a=()=>{e.removeEventListener("success",s),e.removeEventListener("error",i)},s=()=>{n(y(e.result)),a()},i=()=>{r(e.error),a()};e.addEventListener("success",s),e.addEventListener("error",i)});return t.then(n=>{n instanceof IDBCursor&&Pe.set(n,e)}).catch(()=>{}),re.set(t,e),t}function jt(e){if(J.has(e))return;const t=new Promise((n,r)=>{const a=()=>{e.removeEventListener("complete",s),e.removeEventListener("error",i),e.removeEventListener("abort",i)},s=()=>{n(),a()},i=()=>{r(e.error||new DOMException("AbortError","AbortError")),a()};e.addEventListener("complete",s),e.addEventListener("error",i),e.addEventListener("abort",i)});J.set(e,t)}let Y={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return J.get(e);if(t==="objectStoreNames")return e.objectStoreNames||ke.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return y(e[t])},set(e,t,n){return e[t]=n,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function zt(e){Y=e(Y)}function Wt(e){return e===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(t,...n){const r=e.call(j(this),t,...n);return ke.set(r,t.sort?t.sort():[t]),y(r)}:Vt().includes(e)?function(...t){return e.apply(j(this),t),y(Pe.get(this))}:function(...t){return y(e.apply(j(this),t))}}function qt(e){return typeof e=="function"?Wt(e):(e instanceof IDBTransaction&&jt(e),xt(e,Ht())?new Proxy(e,Y):e)}function y(e){if(e instanceof IDBRequest)return Ut(e);if(U.has(e))return U.get(e);const t=qt(e);return t!==e&&(U.set(e,t),re.set(t,e)),t}const j=e=>re.get(e);function Fe(e,t,{blocked:n,upgrade:r,blocking:a,terminated:s}={}){const i=indexedDB.open(e,t),o=y(i);return r&&i.addEventListener("upgradeneeded",c=>{r(y(i.result),c.oldVersion,c.newVersion,y(i.transaction),c)}),n&&i.addEventListener("blocked",c=>n(c.oldVersion,c.newVersion,c)),o.then(c=>{s&&c.addEventListener("close",()=>s()),a&&c.addEventListener("versionchange",l=>a(l.oldVersion,l.newVersion,l))}).catch(()=>{}),o}const Gt=["get","getKey","getAll","getAllKeys","count"],Kt=["put","add","delete","clear"],z=new Map;function pe(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(z.get(t))return z.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,a=Kt.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(a||Gt.includes(n)))return;const s=async function(i,...o){const c=this.transaction(i,a?"readwrite":"readonly");let l=c.store;return r&&(l=l.index(o.shift())),(await Promise.all([l[n](...o),a&&c.done]))[0]};return z.set(t,s),s}zt(e=>({...e,get:(t,n,r)=>pe(t,n)||e.get(t,n,r),has:(t,n)=>!!pe(t,n)||e.has(t,n)}));/**
182 * @license
183 * Copyright 2019 Google LLC
184 *
185 * Licensed under the Apache License, Version 2.0 (the "License");
186 * you may not use this file except in compliance with the License.
187 * You may obtain a copy of the License at
188 *
189 *   http://www.apache.org/licenses/LICENSE-2.0
190 *
191 * Unless required by applicable law or agreed to in writing, software
192 * distributed under the License is distributed on an "AS IS" BASIS,
193 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
194 * See the License for the specific language governing permissions and
195 * limitations under the License.
196 */class Jt{constructor(t){this.container=t}getPlatformInfoString(){return this.container.getProviders().map(n=>{if(Yt(n)){const r=n.getImmediate();return`${r.library}/${r.version}`}else return null}).filter(n=>n).join(" ")}}function Yt(e){const t=e.getComponent();return(t==null?void 0:t.type)==="VERSION"}const X="@firebase/app",me="0.16.2";/**
197 * @license
198 * Copyright 2019 Google LLC
199 *
200 * Licensed under the Apache License, Version 2.0 (the "License");
201 * you may not use this file except in compliance with the License.
202 * You may obtain a copy of the License at
203 *
204 *   http://www.apache.org/licenses/LICENSE-2.0
205 *
206 * Unless required by applicable law or agreed to in writing, software
207 * distributed under the License is distributed on an "AS IS" BASIS,
208 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
209 * See the License for the specific language governing permissions and
210 * limitations under the License.
211 */const b=new Ne("@firebase/app"),Xt="@firebase/app-compat",Zt="@firebase/analytics-compat",Qt="@firebase/analytics",en="@firebase/app-check-compat",tn="@firebase/app-check",nn="@firebase/auth",rn="@firebase/auth-compat",an="@firebase/database",sn="@firebase/data-connect",on="@firebase/database-compat",cn="@firebase/functions",ln="@firebase/functions-compat",dn="@firebase/installations",un="@firebase/installations-compat",fn="@firebase/messaging",hn="@firebase/messaging-compat",pn="@firebase/performance",mn="@firebase/performance-compat",gn="@firebase/remote-config",bn="@firebase/remote-config-compat",yn="@firebase/storage",wn="@firebase/storage-compat",In="@firebase/firestore",En="@firebase/ai",_n="@firebase/firestore-compat",An="firebase";/**
212 * @license
213 * Copyright 2019 Google LLC
214 *
215 * Licensed under the Apache License, Version 2.0 (the "License");
216 * you may not use this file except in compliance with the License.
217 * You may obtain a copy of the License at
218 *
219 *   http://www.apache.org/licenses/LICENSE-2.0
220 *
221 * Unless required by applicable law or agreed to in writing, software
222 * distributed under the License is distributed on an "AS IS" BASIS,
223 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
224 * See the License for the specific language governing permissions and
225 * limitations under the License.
226 */const Z="[DEFAULT]",Sn={[X]:"fire-core",[Xt]:"fire-core-compat",[Qt]:"fire-analytics",[Zt]:"fire-analytics-compat",[tn]:"fire-app-check",[en]:"fire-app-check-compat",[nn]:"fire-auth",[rn]:"fire-auth-compat",[an]:"fire-rtdb",[sn]:"fire-data-connect",[on]:"fire-rtdb-compat",[cn]:"fire-fn",[ln]:"fire-fn-compat",[dn]:"fire-iid",[un]:"fire-iid-compat",[fn]:"fire-fcm",[hn]:"fire-fcm-compat",[pn]:"fire-perf",[mn]:"fire-perf-compat",[gn]:"fire-rc",[bn]:"fire-rc-compat",[yn]:"fire-gcs",[wn]:"fire-gcs-compat",[In]:"fire-fst",[_n]:"fire-fst-compat",[En]:"fire-vertex","fire-js":"fire-js",[An]:"fire-js-all"};/**
227 * @license
228 * Copyright 2019 Google LLC
229 *
230 * Licensed under the Apache License, Version 2.0 (the "License");
231 * you may not use this file except in compliance with the License.
232 * You may obtain a copy of the License at
233 *
234 *   http://www.apache.org/licenses/LICENSE-2.0
235 *
236 * Unless required by applicable law or agreed to in writing, software
237 * distributed under the License is distributed on an "AS IS" BASIS,
238 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
239 * See the License for the specific language governing permissions and
240 * limitations under the License.
241 */const P=new Map,Tn=new Map,Q=new Map;function ge(e,t){try{e.container.addComponent(t)}catch(n){b.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,n)}}function S(e){const t=e.name;if(Q.has(t))return b.debug(`There were multiple attempts to register component ${t}.`),!1;Q.set(t,e);for(const n of P.values())ge(n,e);for(const n of Tn.values())ge(n,e);return!0}function x(e,t){const n=e.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),e.container.getProvider(t)}/**
242 * @license
243 * Copyright 2019 Google LLC
244 *
245 * Licensed under the Apache License, Version 2.0 (the "License");
246 * you may not use this file except in compliance with the License.
247 * You may obtain a copy of the License at
248 *
249 *   http://www.apache.org/licenses/LICENSE-2.0
250 *
251 * Unless required by applicable law or agreed to in writing, software
252 * distributed under the License is distributed on an "AS IS" BASIS,
253 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
254 * See the License for the specific language governing permissions and
255 * limitations under the License.
256 */const Cn={"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 {$mismatchedParam}. Existing: '{$oldValue}'. New: '{$newValue}'.","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.","invali
256d-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."},g=new L("app","Firebase",Cn);/**
257 * @license
258 * Copyright 2019 Google LLC
259 *
260 * Licensed under the Apache License, Version 2.0 (the "License");
261 * you may not use this file except in compliance with the License.
262 * You may obtain a copy of the License at
263 *
264 *   http://www.apache.org/licenses/LICENSE-2.0
265 *
266 * Unless required by applicable law or agreed to in writing, software
267 * distributed under the License is distributed on an "AS IS" BASIS,
268 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
269 * See the License for the specific language governing permissions and
270 * limitations under the License.
271 */class Dn{constructor(t,n,r){this._isDeleted=!1,this._options={...t},this._config={...n},this._name=n.name,this._automaticDataCollectionEnabled=n.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new I("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(t){this.checkDestroyed(),this._automaticDataCollectionEnabled=t}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(t){this._isDeleted=t}checkDestroyed(){if(this.isDeleted)throw g.create("app-deleted",{appName:this._name})}}function vn(e,t={}){let n=e;typeof t!="object"&&(t={name:t});const r={name:Z,automaticDataCollectionEnabled:!0,...t},a=r.name;if(typeof a!="string"||!a)throw g.create("bad-app-name",{appName:String(a)});if(n||(n=Me()),!n)throw g.create("no-options");const s=P.get(a);if(s)if(N(n,s.options)){if(N(r,s.config))return s;throw g.create("duplicate-app",{appName:a,mismatchedParam:"config",oldValue:JSON.stringify(s.config),newValue:JSON.stringify(r)})}else throw g.create("duplicate-app",{appName:a,mismatchedParam:"options",oldValue:JSON.stringify(s.options),newValue:JSON.stringify(n)});const i=new Nt(a);for(const c of Q.values())i.addComponent(c);const o=new Dn(n,r,i);return P.set(a,o),o}function Rn(e=Z){const t=P.get(e);if(!t&&e===Z&&Me())return vn();if(!t)throw g.create("no-app",{appName:e});return t}function A(e,t,n){let r=Sn[e]??e;n&&(r+=`-${n}`);const a=r.match(/\s|\//),s=t.match(/\s|\//);if(a||s){const i=[`Unable to register library "${r}" with version "${t}":`];a&&i.push(`library name "${r}" contains illegal characters (whitespace or "/")`),a&&s&&i.push("and"),s&&i.push(`version name "${t}" contains illegal characters (whitespace or "/")`),b.warn(i.join(" "));return}S(new I(`${r}-version`,()=>({library:r,version:t}),"VERSION"))}/**
272 * @license
273 * Copyright 2021 Google LLC
274 *
275 * Licensed under the Apache License, Version 2.0 (the "License");
276 * you may not use this file except in compliance with the License.
277 * You may obtain a copy of the License at
278 *
279 *   http://www.apache.org/licenses/LICENSE-2.0
280 *
281 * Unless required by applicable law or agreed to in writing, software
282 * distributed under the License is distributed on an "AS IS" BASIS,
283 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
284 * See the License for the specific language governing permissions and
285 * limitations under the License.
286 */const On="firebase-heartbeat-database",Mn=1,M="firebase-heartbeat-store";let W=null;function Le(){return W||(W=Fe(On,Mn,{upgrade:(e,t)=>{switch(t){case 0:try{e.createObjectStore(M)}catch(n){console.warn(n)}}}}).catch(e=>{throw g.create("idb-open",{originalErrorMessage:e.message})})),W}async function Bn(e){try{const n=(await Le()).transaction(M),r=await n.objectStore(M).get(xe(e));return await n.done,r}catch(t){if(t instanceof D)b.warn(t.message);else{const n=g.create("idb-get",{originalErrorMessage:t==null?void 0:t.message});b.warn(n.message)}}}async function be(e,t){try{const r=(await Le()).transaction(M,"readwrite");await r.objectStore(M).put(t,xe(e)),await r.done}catch(n){if(n instanceof D)b.warn(n.message);else{const r=g.create("idb-set",{originalErrorMessage:n==null?void 0:n.message});b.warn(r.message)}}}function xe(e){return`${e.name}!${e.options.appId}`}/**
287 * @license
288 * Copyright 2021 Google LLC
289 *
290 * Licensed under the Apache License, Version 2.0 (the "License");
291 * you may not use this file except in compliance with the License.
292 * You may obtain a copy of the License at
293 *
294 *   http://www.apache.org/licenses/LICENSE-2.0
295 *
296 * Unless required by applicable law or agreed to in writing, software
297 * distributed under the License is distributed on an "AS IS" BASIS,
298 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
299 * See the License for the specific language governing permissions and
300 * limitations under the License.
301 */const $n=1024,Nn=30;class Pn{constructor(t){this.container=t,this._heartbeatsCache=null;const n=this.container.getProvider("app").getImmediate();this._storage=new Fn(n),this._heartbeatsCachePromise=this._storage.read().then(r=>(this._heartbeatsCache=r,r))}async triggerHeartbeat(){var t,n;try{const a=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),s=ye();if(((t=this._heartbeatsCache)==null?void 0:t.heartbeats)==null&&(this._heartbeatsCache=await this._heartbeatsCachePromise,((n=this._heartbeatsCache)==null?void 0:n.heartbeats)==null)||this._heartbeatsCache.lastSentHeartbeatDate===s||this._heartbeatsCache.heartbeats.some(i=>i.date===s))return;if(this._heartbeatsCache.heartbeats.push({date:s,agent:a}),this._heartbeatsCache.heartbeats.length>Nn){const i=Ln(this._heartbeatsCache.heartbeats);this._heartbeatsCache.heartbeats.splice(i,1)}return this._storage.overwrite(this._heartbeatsCache)}catch(r){b.warn(r)}}async getHeartbeatsHeader(){var t;try{if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,((t=this._heartbeatsCache)==null?void 0:t.heartbeats)==null||this._heartbeatsCache.heartbeats.length===0)return"";const n=ye(),{heartbeatsToSend:r,unsentEntries:a}=kn(this._heartbeatsCache.heartbeats),s=Oe(JSON.stringify({version:2,heartbeats:r}));return this._heartbeatsCache.lastSentHeartbeatDate=n,a.length>0?(this._heartbeatsCache.heartbeats=a,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),s}catch(n){return b.warn(n),""}}}function ye(){return new Date().toISOString().substring(0,10)}function kn(e,t=$n){const n=[];let r=e.slice();for(const a of e){const s=n.find(i=>i.agent===a.agent);if(s){if(s.dates.push(a.date),we(n)>t){s.dates.pop();break}}else if(n.push({agent:a.agent,dates:[a.date]}),we(n)>t){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}class Fn{constructor(t){this.app=t,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return Be()?$e().then(()=>!0).catch(()=>!1):!1}async read(){if(await this._canUseIndexedDBPromise){const n=await Bn(this.app);return n!=null&&n.heartbeats?n:{heartbeats:[]}}else return{heartbeats:[]}}async overwrite(t){if(await this._canUseIndexedDBPromise){const r=await this.read();return be(this.app,{lastSentHeartbeatDate:t.lastSentHeartbeatDate??r.lastSentHeartbeatDate,heartbeats:t.heartbeats})}else return}async add(t){if(await this._canUseIndexedDBPromise){const r=await this.read();return be(this.app,{lastSentHeartbeatDate:t.lastSentHeartbeatDate??r.lastSentHeartbeatDate,heartbeats:[...r.heartbeats,...t.heartbeats]})}else return}}function we(e){return Oe(JSON.stringify({version:2,heartbeats:e})).length}function Ln(e){if(e.length===0)return-1;let t=0,n=e[0].date;for(let r=1;r<e.length;r++)e[r].date<n&&(n=e[r].date,t=r);return t}/**
302 * @license
303 * Copyright 2019 Google LLC
304 *
305 * Licensed under the Apache License, Version 2.0 (the "License");
306 * you may not use this file except in compliance with the License.
307 * You may obtain a copy of the License at
308 *
309 *   http://www.apache.org/licenses/LICENSE-2.0
310 *
311 * Unless required by applicable law or agreed to in writing, software
312 * distributed under the License is distributed on an "AS IS" BASIS,
313 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
314 * See the License for the specific language governing permissions and
315 * limitations under the License.
316 */function xn(e){S(new I("platform-logger",t=>new Jt(t),"PRIVATE")),S(new I("heartbeat",t=>new Pn(t),"PRIVATE")),A(X,me,e),A(X,me,"esm2020"),A("fire-js","")}/**
317 * @license
318 * Copyright 2019 Google LLC
319 *
320 * Licensed under the Apache License, Version 2.0 (the "License");
321 * you may not use this file except in compliance with the License.
322 * You may obtain a copy of the License at
323 *
324 *   http://www.apache.org/licenses/LICENSE-2.0
325 *
326 * Unless required by applicable law or agreed to in writing, software
327 * distributed under the License is distributed on an "AS IS" BASIS,
328 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
329 * See the License for the specific language governing permissions and
330 * limitations under the License.
331 */xn("");const He="@firebase/installations",ae="0.6.24";/**
332 * @license
333 * Copyright 2019 Google LLC
334 *
335 * Licensed under the Apache License, Version 2.0 (the "License");
336 * you may not use this file except in compliance with the License.
337 * You may obtain a copy of the License at
338 *
339 *   http://www.apache.org/licenses/LICENSE-2.0
340 *
341 * Unless required by applicable law or agreed to in writing, software
342 * distributed under the License is distributed on an "AS IS" BASIS,
343 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
344 * See the License for the specific language governing permissions and
345 * limitations under the License.
346 */const Ve=1e4,Ue=`w:${ae}`,je="FIS_v2",Hn="https://firebaseinstallations.googleapis.com/v1",Vn=60*60*1e3,Un="installations",jn="Installations";/**
347 * @license
348 * Copyright 2019 Google LLC
349 *
350 * Licensed under the Apache License, Version 2.0 (the "License");
351 * you may not use this file except in compliance with the License.
352 * You may obtain a copy of the License at
353 *
354 *   http://www.apache.org/licenses/LICENSE-2.0
355 *
356 * Unless required by applicable law or agreed to in writing, software
357 * distributed under the License is distributed on an "AS IS" BASIS,
358 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
359 * See the License for the specific language governing permissions and
360 * limitations under the License.
361 */const zn={"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."},T=new L(Un,jn,zn);function ze(e){return e instanceof D&&e.code.includes("request-failed")}/**
362 * @license
363 * Copyright 2019 Google LLC
364 *
365 * Licensed under the Apache License, Version 2.0 (the "License");
366 * you may not use this file except in compliance with the License.
367 * You may obtain a copy of the License at
368 *
369 *   http://www.apache.org/licenses/LICENSE-2.0
370 *
371 * Unless required by applicable law or agreed to in writing, software
372 * distributed under the License is distributed on an "AS IS" BASIS,
373 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
374 * See the License for the specific language governing permissions and
375 * limitations under the License.
376 */function We({projectId:e}){return`${Hn}/projects/${e}/installations`}function qe(e){return{token:e.token,requestStatus:2,expiresIn:qn(e.expiresIn),creationTime:Date.now()}}async function Ge(e,t){const r=(await t.json()).error;return T.create("request-failed",{requestName:e,serverCode:r.code,serverMessage:r.message,serverStatus:r.status})}function Ke({apiKey:e}){return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e})}function Wn(e,{refreshToken:t}){const n=Ke(e);return n.append("Authorization",Gn(t)),n}async function Je(e){const t=await e();return t.status>=500&&t.status<600?e():t}function qn(e){return Number(e.replace("s","000"))}function Gn(e){return`${je} ${e}`}/**
377 * @license
378 * Copyright 2019 Google LLC
379 *
380 * Licensed under the Apache License, Version 2.0 (the "License");
381 * you may not use this file except in compliance with the License.
382 * You may obtain a copy of the License at
383 *
384 *   http://www.apache.org/licenses/LICENSE-2.0
385 *
386 * Unless required by applicable law or agreed to in writing, software
387 * distributed under the License is distributed on an "AS IS" BASIS,
388 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
389 * See the License for the specific language governing permissions and
390 * limitations under the License.
391 */async function Kn({appConfig:e,heartbeatServiceProvider:t},{fid:n}){const r=We(e),a=Ke(e),s=t.getImmediate({optional:!0});if(s){const l=await s.getHeartbeatsHeader();l&&a.append("x-firebase-client",l)}const i={fid:n,authVersion:je,appId:e.appId,sdkVersion:Ue},o={method:"POST",headers:a,body:JSON.stringify(i)},c=await Je(()=>fetch(r,o));if(c.ok){const l=await c.json();return{fid:l.fid||n,registrationStatus:2,refreshToken:l.refreshToken,authToken:qe(l.authToken)}}else throw await Ge("Create Installation",c)}/**
392 * @license
393 * Copyright 2019 Google LLC
394 *
395 * Licensed under the Apache License, Version 2.0 (the "License");
396 * you may not use this file except in compliance with the License.
397 * You may obtain a copy of the License at
398 *
399 *   http://www.apache.org/licenses/LICENSE-2.0
400 *
401 * Unless required by applicable law or agreed to in writing, software
402 * distributed under the License is distributed on an "AS IS" BASIS,
403 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
404 * See the License for the specific language governing permissions and
405 * limitations under the License.
406 */function Ye(e){return new Promise(t=>{setTimeout(t,e)})}/**
407 * @license
408 * Copyright 2019 Google LLC
409 *
410 * Licensed under the Apache License, Version 2.0 (the "License");
411 * you may not use this file except in compliance with the License.
412 * You may obtain a copy of the License at
413 *
414 *   http://www.apache.org/licenses/LICENSE-2.0
415 *
416 * Unless required by applicable law or agreed to in writing, software
417 * distributed under the License is distributed on an "AS IS" BASIS,
418 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
419 * See the License for the specific language governing permissions and
420 * limitations under the License.
421 */function Jn(e){return btoa(String.fromCharCode(...e)).replace(/\+/g,"-").replace(/\//g,"_")}/**
422 * @license
423 * Copyright 2019 Google LLC
424 *
425 * Licensed under the Apache License, Version 2.0 (the "License");
426 * you may not use this file except in compliance with the License.
427 * You may obtain a copy of the License at
428 *
429 *   http://www.apache.org/licenses/LICENSE-2.0
430 *
431 * Unless required by applicable law or agreed to in writing, software
432 * distributed under the License is distributed on an "AS IS" BASIS,
433 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
434 * See the License for the specific language governing permissions and
435 * limitations under the License.
436 */const Yn=/^[cdef][\w-]{21}$/,ee="";function Xn(){try{const e=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(e),e[0]=112+e[0]%16;const n=Zn(e);return Yn.test(n)?n:ee}catch{return ee}}function Zn(e){return Jn(e).substr(0,22)}/**
437 * @license
438 * Copyright 2019 Google LLC
439 *
440 * Licensed under the Apache License, Version 2.0 (the "License");
441 * you may not use this file except in compliance with the License.
442 * You may obtain a copy of the License at
443 *
444 *   http://www.apache.org/licenses/LICENSE-2.0
445 *
446 * Unless required by applicable law or agreed to in writing, software
447 * distributed under the License is distributed on an "AS IS" BASIS,
448 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
449 * See the License for the specific language governing permissions and
450 * limitations under the License.
451 */function H(e){return`${e.appName}!${e.appId}`}/**
452 * @license
453 * Copyright 2019 Google LLC
454 *
455 * Licensed under the Apache License, Version 2.0 (the "License");
456 * you may not use this file except in compliance with the License.
457 * You may obtain a copy of the License at
458 *
459 *   http://www.apache.org/licenses/LICENSE-2.0
460 *
461 * Unless required by applicable law or agreed to in writing, softw
461are
462 * distributed under the License is distributed on an "AS IS" BASIS,
463 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
464 * See the License for the specific language governing permissions and
465 * limitations under the License.
466 */const Xe=new Map;function Ze(e,t){const n=H(e);Qe(n,t),Qn(n,t)}function Qe(e,t){const n=Xe.get(e);if(n)for(const r of n)r(t)}function Qn(e,t){const n=er();n&&n.postMessage({key:e,fid:t}),tr()}let _=null;function er(){return!_&&"BroadcastChannel"in self&&(_=new BroadcastChannel("[Firebase] FID Change"),_.onmessage=e=>{Qe(e.data.key,e.data.fid)}),_}function tr(){Xe.size===0&&_&&(_.close(),_=null)}/**
467 * @license
468 * Copyright 2019 Google LLC
469 *
470 * Licensed under the Apache License, Version 2.0 (the "License");
471 * you may not use this file except in compliance with the License.
472 * You may obtain a copy of the License at
473 *
474 *   http://www.apache.org/licenses/LICENSE-2.0
475 *
476 * Unless required by applicable law or agreed to in writing, software
477 * distributed under the License is distributed on an "AS IS" BASIS,
478 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
479 * See the License for the specific language governing permissions and
480 * limitations under the License.
481 */const nr="firebase-installations-database",rr=1,C="firebase-installations-store";let q=null;function se(){return q||(q=Fe(nr,rr,{upgrade:(e,t)=>{switch(t){case 0:e.createObjectStore(C)}}})),q}async function k(e,t){const n=H(e),a=(await se()).transaction(C,"readwrite"),s=a.objectStore(C),i=await s.get(n);return await s.put(t,n),await a.done,(!i||i.fid!==t.fid)&&Ze(e,t.fid),t}async function et(e){const t=H(e),r=(await se()).transaction(C,"readwrite");await r.objectStore(C).delete(t),await r.done}async function V(e,t){const n=H(e),a=(await se()).transaction(C,"readwrite"),s=a.objectStore(C),i=await s.get(n),o=t(i);return o===void 0?await s.delete(n):await s.put(o,n),await a.done,o&&(!i||i.fid!==o.fid)&&Ze(e,o.fid),o}/**
482 * @license
483 * Copyright 2019 Google LLC
484 *
485 * Licensed under the Apache License, Version 2.0 (the "License");
486 * you may not use this file except in compliance with the License.
487 * You may obtain a copy of the License at
488 *
489 *   http://www.apache.org/licenses/LICENSE-2.0
490 *
491 * Unless required by applicable law or agreed to in writing, software
492 * distributed under the License is distributed on an "AS IS" BASIS,
493 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
494 * See the License for the specific language governing permissions and
495 * limitations under the License.
496 */async function ie(e){let t;const n=await V(e.appConfig,r=>{const a=ar(r),s=sr(e,a);return t=s.registrationPromise,s.installationEntry});return n.fid===ee?{installationEntry:await t}:{installationEntry:n,registrationPromise:t}}function ar(e){const t=e||{fid:Xn(),registrationStatus:0};return tt(t)}function sr(e,t){if(t.registrationStatus===0){if(!navigator.onLine){const a=Promise.reject(T.create("app-offline"));return{installationEntry:t,registrationPromise:a}}const n={fid:t.fid,registrationStatus:1,registrationTime:Date.now()},r=ir(e,n);return{installationEntry:n,registrationPromise:r}}else return t.registrationStatus===1?{installationEntry:t,registrationPromise:or(e)}:{installationEntry:t}}async function ir(e,t){try{const n=await Kn(e,t);return k(e.appConfig,n)}catch(n){throw ze(n)&&n.customData.serverCode===409?await et(e.appConfig):await k(e.appConfig,{fid:t.fid,registrationStatus:0}),n}}async function or(e){let t=await Ie(e.appConfig);for(;t.registrationStatus===1;)await Ye(100),t=await Ie(e.appConfig);if(t.registrationStatus===0){const{installationEntry:n,registrationPromise:r}=await ie(e);return r||n}return t}function Ie(e){return V(e,t=>{if(!t)throw T.create("installation-not-found");return tt(t)})}function tt(e){return cr(e)?{fid:e.fid,registrationStatus:0}:e}function cr(e){return e.registrationStatus===1&&e.registrationTime+Ve<Date.now()}/**
497 * @license
498 * Copyright 2019 Google LLC
499 *
500 * Licensed under the Apache License, Version 2.0 (the "License");
501 * you may not use this file except in compliance with the License.
502 * You may obtain a copy of the License at
503 *
504 *   http://www.apache.org/licenses/LICENSE-2.0
505 *
506 * Unless required by applicable law or agreed to in writing, softw
506are
507 * distributed under the License is distributed on an "AS IS" BASIS,
508 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
509 * See the License for the specific language governing permissions and
510 * limitations under the License.
511 */async function lr({appConfig:e,heartbeatServiceProvider:t},n){const r=dr(e,n),a=Wn(e,n),s=t.getImmediate({optional:!0});if(s){const l=await s.getHeartbeatsHeader();l&&a.append("x-firebase-client",l)}const i={installation:{sdkVersion:Ue,appId:e.appId}},o={method:"POST",headers:a,body:JSON.stringify(i)},c=await Je(()=>fetch(r,o));if(c.ok){const l=await c.json();return qe(l)}else throw await Ge("Generate Auth Token",c)}function dr(e,{fid:t}){return`${We(e)}/${t}/authTokens:generate`}/**
512 * @license
513 * Copyright 2019 Google LLC
514 *
515 * Licensed under the Apache License, Version 2.0 (the "License");
516 * you may not use this file except in compliance with the License.
517 * You may obtain a copy of the License at
518 *
519 *   http://www.apache.org/licenses/LICENSE-2.0
520 *
521 * Unless required by applicable law or agreed to in writing, software
522 * distributed under the License is distributed on an "AS IS" BASIS,
523 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
524 * See the License for the specific language governing permissions and
525 * limitations under the License.
526 */async function oe(e,t=!1){let n;const r=await V(e.appConfig,s=>{if(!nt(s))throw T.create("not-registered");const i=s.authToken;if(!t&&hr(i))return s;if(i.requestStatus===1)return n=ur(e,t),s;{if(!navigator.onLine)throw T.create("app-offline");const o=mr(s);return n=fr(e,o),o}});return n?await n:r.authToken}async function ur(e,t){let n=await Ee(e.appConfig);for(;n.authToken.requestStatus===1;)await Ye(100),n=await Ee(e.appConfig);const r=n.authToken;return r.requestStatus===0?oe(e,t):r}function Ee(e){return V(e,t=>{if(!nt(t))throw T.create("not-registered");const n=t.authToken;return gr(n)?{...t,authToken:{requestStatus:0}}:t})}async function fr(e,t){try{const n=await lr(e,t),r={...t,authToken:n};return await k(e.appConfig,r),n}catch(n){if(ze(n)&&(n.customData.serverCode===401||n.customData.serverCode===404))await et(e.appConfig);else{const r={...t,authToken:{requestStatus:0}};await k(e.appConfig,r)}throw n}}function nt(e){return e!==void 0&&e.registrationStatus===2}function hr(e){return e.requestStatus===2&&!pr(e)}function pr(e){const t=Date.now();return t<e.creationTime||e.creationTime+e.expiresIn<t+Vn}function mr(e){const t={requestStatus:1,requestTime:Date.now()};return{...e,authToken:t}}function gr(e){return e.requestStatus===1&&e.requestTime+Ve<Date.now()}/**
527 * @license
528 * Copyright 2019 Google LLC
529 *
530 * Licensed under the Apache License, Version 2.0 (the "License");
531 * you may not use this file except in compliance with the License.
532 * You may obtain a copy of the License at
533 *
534 *   http://www.apache.org/licenses/LICENSE-2.0
535 *
536 * Unless required by applicable law or agreed to in writing, software
537 * distributed under the License is distributed on an "AS IS" BASIS,
538 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
539 * See the License for the specific language governing permissions and
540 * limitations under the License.
541 */async function br(e){const t=e,{installationEntry:n,registrationPromise:r}=await ie(t);return r?r.catch(console.error):oe(t).catch(console.error),n.fid}/**
542 * @license
543 * Copyright 2019 Google LLC
544 *
545 * Licensed under the Apache License, Version 2.0 (the "License");
546 * you may not use this file except in compliance with the License.
547 * You may obtain a copy of the License at
548 *
549 *   http://www.apache.org/licenses/LICENSE-2.0
550 *
551 * Unless required by applicable law or agreed to in writing, software
552 * distributed under the License is distributed on an "AS IS" BASIS,
553 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
554 * See the License for the specific language governing permissions and
555 * limitations under the License.
556 */async function yr(e,t=!1){const n=e;return await wr(n),(await oe(n,t)).token}async function wr(e){const{registrationPromise:t}=await ie(e);t&&await t}/**
557 * @license
558 * Copyright 2019 Google LLC
559 *
560 * Licensed under the Apache License, Version 2.0 (the "License");
561 * you may not use this file except in compliance with the License.
562 * You may obtain a copy of the License at
563 *
564 *   http://www.apache.org/licenses/LICENSE-2.0
565 *
566 * Unless required by applicable law or agreed to in writing, software
567 * distributed under the License is distributed on an "AS IS" BASIS,
568 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
569 * See the License for the specific language governing permissions and
570 * limitations under the License.
571 */function Ir(e){if(!e||!e.options)throw G("App Configuration");if(!e.name)throw G("App Name");const t=["projectId","apiKey","appId"];for(const n of t)if(!e.options[n])throw G(n);return{appName:e.name,projectId:e.options.projectId,apiKey:e.options.apiKey,appId:e.options.appId}}function G(e){return T.create("missing-app-config-values",{valueName:e})}/**
572 * @license
573 * Copyright 2020 Google LLC
574 *
575 * Licensed under the Apache License, Version 2.0 (the "License");
576 * you may not use this file except in compliance with the License.
577 * You may obtain a copy of the License at
578 *
579 *   http://www.apache.org/licenses/LICENSE-2.0
580 *
581 * Unless required by applicable law or agreed to in writing, software
582 * distributed under the License is distributed on an "AS IS" BASIS,
583 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
584 * See the License for the specific language governing permissions and
585 * limitations under the License.
586 */const rt="installations",Er="installations-internal",_r=e=>{const t=e.getProvider("app").getImmediate(),n=Ir(t),r=x(t,"heartbeat");return{app:t,appConfig:n,heartbeatServiceProvider:r,_delete:()=>Promise.resolve()}},Ar=e=>{const t=e.getProvider("app").getImmediate(),n=x(t,rt).getImmediate();return{getId:()=>br(n),getToken:a=>yr(n,a)}};function Sr(){S(new I(rt,_r,"PUBLIC")),S(new I(Er,Ar,"PRIVATE"))}/**
587 * @license
588 * Copyright 2019 Google LLC
589 *
590 * Licensed under the Apache License, Version 2.0 (the "License");
591 * you may not use this file except in compliance with the License.
592 * You may obtain a copy of the License at
593 *
594 *   http://www.apache.org/licenses/LICENSE-2.0
595 *
596 * Unless required by applicable law or agreed to in writing, software
597 * distributed under the License is distributed on an "AS IS" BASIS,
598 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
599 * See the License for the specific language governing permissions and
600 * limitations under the License.
601 */Sr();A(He,ae);A(He,ae,"esm2020");/**
602 * @license
603 * Copyright 2019 Google LLC
604 *
605 * Licensed under the Apache License, Version 2.0 (the "License");
606 * you may not use this file except in compliance with the License.
607 * You may obtain a copy of the License at
608 *
609 *   http://www.apache.org/licenses/LICENSE-2.0
610 *
611 * Unless required by applicable law or agreed to in writing, software
612 * distributed under the License is distributed on an "AS IS" BASIS,
613 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
614 * See the License for the specific language governing permissions and
615 * limitations under the License.
616 */const F="analytics",Tr="firebase_id",Cr="origin",Dr=60*1e3,vr="https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig",ce="https://www.googletagmanager.com/gtag/js";/**
617 * @license
618 * Copyright 2019 Google LLC
619 *
620 * Licensed under the Apache License, Version 2.0 (the "License");
621 * you may not use this file except in compliance with the License.
622 * You may obtain a copy of the License at
623 *
624 *   http://www.apache.org/licenses/LICENSE-2.0
625 *
626 * Unless required by applicable law or agreed to in writing, software
627 * distributed under the License is distributed on an "AS IS" BASIS,
628 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
629 * See the License for the specific language governing permissions and
630 * limitations under the License.
631 */const u=new Ne("@firebase/analytics");/**
632 * @license
633 * Copyright 2019 Google LLC
634 *
635 * Licensed under the Apache License, Version 2.0 (the "License");
636 * you may not use this file except in compliance with the License.
637 * You may obtain a copy of the License at
638 *
639 *   http://www.apache.org/licenses/LICENSE-2.0
640 *
641 * Unless required by applicable law or agreed to in writing, softw
641are
642 * distributed under the License is distributed on an "AS IS" BASIS,
643 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
644 * See the License for the specific language governing permissions and
645 * limitations under the License.
646 */const Rr={"already-exists":"A Firebase Analytics instance with the appId {$id}  already exists. Only one Firebase Analytics instance can be created for each appId.","already-initialized":"initializeAnalytics() cannot be called again with different options than those it was initially called with. It can be called again with the same options to return the existing instance, or getAnalytics() can be used to get a reference to the already-initialized instance.","already-initialized-settings":"Firebase Analytics has already been initialized.settings() must be called before initializing any Analytics instanceor it will have no effect.","interop-component-reg-failed":"Firebase Analytics Interop Component failed to instantiate: {$reason}","invalid-analytics-context":"Firebase Analytics is not supported in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}","indexeddb-unavailable":"IndexedDB unavailable or restricted in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}","fetch-throttle":"The config fetch request timed out while in an exponential backoff state. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.","config-fetch-failed":"Dynamic config fetch failed: [{$httpStatus}] {$responseMessage}","no-api-key":'The "apiKey" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid API key.',"no-app-id":'The "appId" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid app ID.',"no-client-id":'The "client_id" field is empty.',"invalid-gtag-resource":"Trusted Types detected an invalid gtag resource: {$gtagURL}."},m=new L("analytics","Analytics",Rr);/**
647 * @license
648 * Copyright 2019 Google LLC
649 *
650 * Licensed under the Apache License, Version 2.0 (the "License");
651 * you may not use this file except in compliance with the License.
652 * You may obtain a copy of the License at
653 *
654 *   http://www.apache.org/licenses/LICENSE-2.0
655 *
656 * Unless required by applicable law or agreed to in writing, software
657 * distributed under the License is distributed on an "AS IS" BASIS,
658 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
659 * See the License for the specific language governing permissions and
660 * limitations under the License.
661 */function Or(e){if(!e.startsWith(ce)){const t=m.create("invalid-gtag-resource",{gtagURL:e});return u.warn(t.message),""}return e}function at(e){return Promise.all(e.map(t=>t.catch(n=>n)))}function Mr(e,t){let n;return window.trustedTypes&&(n=window.trustedTypes.createPolicy(e,t)),n}function Br(e,t){const n=Mr("firebase-js-sdk-policy",{createScriptURL:Or}),r=document.createElement("script"),a=`${ce}?l=${e}&id=${t}`;r.src=n?n==null?void 0:n.createScriptURL(a):a,r.async=!0,document.head.appendChild(r)}function $r(e){let t=[];return Array.isArray(window[e])?t=window[e]:window[e]=t,t}async function Nr(e,t,n,r,a,s){const i=r[a];try{if(i)await t[i];else{const c=(await at(n)).find(l=>l.measurementId===a);c&&await t[c.appId]}}catch(o){u.error(o)}e("config",a,s)}async function Pr(e,t,n,r,a){try{let s=[];if(a&&a.send_to){let i=a.send_to;Array.isArray(i)||(i=[i]);const o=await at(n);for(const c of i){const l=o.find(f=>f.measurementId===c),h=l&&t[l.appId];if(h)s.push(h);else{s=[];break}}}s.length===0&&(s=Object.values(t)),await Promise.all(s),e("event",r,a||{})}catch(s){u.error(s)}}function kr(e,t,n,r){async function a(s,...i){try{if(s==="event"){const[o,c]=i;await Pr(e,t,n,o,c)}else if(s==="config"){const[o,c]=i;await Nr(e,t,n,r,o,c)}else if(s==="consent"){const[o,c]=i;e("consent",o,c)}else if(s==="get"){const[o,c,l]=i;e("get",o,c,l)}else if(s==="set"){const[o]=i;e("set",o)}else e(s,...i)}catch(o){u.error(o)}}return a}function Fr(e,t,n,r,a){let s=function(...i){window[r].push(arguments)};
661return window[a]&&typeof window[a]=="function"&&(s=window[a]),window[a]=kr(s,e,t,n),{gtagCore:s,wrappedGtag:window[a]}}function Lr(e){const t=window.document.getElementsByTagName("script");for(const n of Object.values(t))if(n.src&&n.src.includes(ce)&&n.src.includes(e))return n;return null}/**
662 * @license
663 * Copyright 2020 Google LLC
664 *
665 * Licensed under the Apache License, Version 2.0 (the "License");
666 * you may not use this file except in compliance with the License.
667 * You may obtain a copy of the License at
668 *
669 *   http://www.apache.org/licenses/LICENSE-2.0
670 *
671 * Unless required by applicable law or agreed to in writing, software
672 * distributed under the License is distributed on an "AS IS" BASIS,
673 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
674 * See the License for the specific language governing permissions and
675 * limitations under the License.
676 */const xr=30,Hr=1e3;class Vr{constructor(t={},n=Hr){this.throttleMetadata=t,this.intervalMillis=n}getThrottleMetadata(t){return this.throttleMetadata[t]}setThrottleMetadata(t,n){this.throttleMetadata[t]=n}deleteThrottleMetadata(t){delete this.throttleMetadata[t]}}const st=new Vr;function Ur(e){return new Headers({Accept:"application/json","x-goog-api-key":e})}async function jr(e){var i;const{appId:t,apiKey:n}=e,r={method:"GET",headers:Ur(n)},a=vr.replace("{app-id}",t),s=await fetch(a,r);if(s.status!==200&&s.status!==304){let o="";try{const c=await s.json();(i=c.error)!=null&&i.message&&(o=c.error.message)}catch{}throw m.create("config-fetch-failed",{httpStatus:s.status,responseMessage:o})}return s.json()}async function zr(e,t=st,n){const{appId:r,apiKey:a,measurementId:s}=e.options;if(!r)throw m.create("no-app-id");if(!a){if(s)return{measurementId:s,appId:r};throw m.create("no-api-key")}const i=t.getThrottleMetadata(r)||{backoffCount:0,throttleEndTimeMillis:Date.now()},o=new Gr;return setTimeout(async()=>{o.abort()},Dr),it({appId:r,apiKey:a,measurementId:s},i,o,t)}async function it(e,{throttleEndTimeMillis:t,backoffCount:n},r,a=st){var o;const{appId:s,measurementId:i}=e;try{await Wr(r,t)}catch(c){if(i)return u.warn(`Timed out fetching this Firebase app's measurement ID from the server. Falling back to the measurement ID ${i} provided in the "measurementId" field in the local Firebase config. [${c==null?void 0:c.message}]`),{appId:s,measurementId:i};throw c}try{const c=await jr(e);return a.deleteThrottleMetadata(s),c}catch(c){const l=c;if(!qr(l)){if(a.deleteThrottleMetadata(s),i)return u.warn(`Failed to fetch this Firebase app's measurement ID from the server. Falling back to the measurement ID ${i} provided in the "measurementId" field in the local Firebase config. [${l==null?void 0:l.message}]`),{appId:s,measurementId:i};throw c}const h=Number((o=l==null?void 0:l.customData)==null?void 0:o.httpStatus)===503?ue(n,a.intervalMillis,xr):ue(n,a.intervalMillis),f={throttleEndTimeMillis:Date.now()+h,backoffCount:n+1};return a.setThrottleMetadata(s,f),u.debug(`Calling attemptFetch again in ${h} millis`),it(e,f,r,a)}}function Wr(e,t){return new Promise((n,r)=>{const a=Math.max(t-Date.now(),0),s=setTimeout(n,a);e.addEventListener(()=>{clearTimeout(s),r(m.create("fetch-throttle",{throttleEndTimeMillis:t}))})})}function qr(e){if(!(e instanceof D)||!e.customData)return!1;const t=Number(e.customData.httpStatus);return t===429||t===500||t===503||t===504}class Gr{constructor(){this.listeners=[]}addEventListener(t){this.listeners.push(t)}abort(){this.listeners.forEach(t=>t())}}async function Kr(e,t,n,r,a){if(a&&a.global){e("event",n,r);return}else{const s=await t,i={...r,send_to:s};e("event",n,i)}}async function Jr(e,t,n,r){{const a=await t;e("config",a,{update:!0,user_id:n})}}async function Yr(e,t,n,r){if(r&&r.global){const a={};for(const s of Object.keys(n))a[`user_properties.${s}`]=n[s];return e("set",a),Promise.resolve()}else{const a=await t;e("config",a,{update:!0,user_properties:n})}}async function Xr(e,t){const n=await e;window[`ga-disable-${n}`]=!t}let te;function ot(e){te=e}/**
677 * @license
678 * Copyright 2020 Google LLC
679 *
680 * Licensed under the Apache License, Version 2.0 (the "License");
681 * you may not use this file except in compliance with the License.
682 * You may obtain a copy of the License at
683 *
684 *   http://www.apache.org/licenses/LICENSE-2.0
685 *
686 * Unless required by applicable law or agreed to in writing, software
687 * distributed under the License is distributed on an "AS IS" BASIS,
688 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
689 * See the License for the specific language governing permissions and
690 * limitations under the License.
691 */async function Zr(){if(Be())try{await $e()}catch(e){return u.warn(m.create("indexeddb-unavailable",{errorInfo:e==null?void 0:e.toString()}).message),!1}else return u.warn(m.create("indexeddb-unavailable",{errorInfo:"IndexedDB is not available in this environment."}).message),!1;return!0}async function Qr(e,t,n,r,a,s,i){const o=zr(e);o.then(p=>{n[p.measurementId]=p.appId,e.options.measurementId&&p.measurementId!==e.options.measurementId&&u.warn(`The measurement ID in the local Firebase config (${e.options.measurementId}) does not match the measurement ID fetched from the server (${p.measurementId}). To ensure analytics events are always sent to the correct Analytics property, update the measurement ID field in the local config or remove it from the local config.`)}).catch(p=>u.error(p)),t.push(o);const c=Zr().then(p=>{if(p)return r.getId()}),[l,h]=await Promise.all([o,c]);Lr(s)||Br(s,l.measurementId),te&&(a("consent","default",te),ot(void 0)),a("js",new Date);const f=(i==null?void 0:i.config)??{};return f[Cr]="firebase",f.update=!0,h!=null&&(f[Tr]=h),a("config",l.measurementId,f),l.measurementId}/**
692 * @license
693 * Copyright 2019 Google LLC
694 *
695 * Licensed under the Apache License, Version 2.0 (the "License");
696 * you may not use this file except in compliance with the License.
697 * You may obtain a copy of the License at
698 *
699 *   http://www.apache.org/licenses/LICENSE-2.0
700 *
701 * Unless required by applicable law or agreed to in writing, software
702 * distributed under the License is distributed on an "AS IS" BASIS,
703 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
704 * See the License for the specific language governing permissions and
705 * limitations under the License.
706 */class ea{constructor(t){this.app=t}_delete(){return delete w[this.app.options.appId],Promise.resolve()}}let w={},_e=[];const Ae={};let K="dataLayer",ta="gtag",Se,R,Te=!1;function na(){const e=[];if(At()&&e.push("This is a browser extension environment."),St()||e.push("Cookies are not available."),e.length>0){const t=e.map((r,a)=>`(${a+1}) ${r}`).join(" "),n=m.create("invalid-analytics-context",{errorInfo:t});u.warn(n.message)}}function ra(e,t,n){na();const r=e.options.appId;if(!r)throw m.create("no-app-id");if(!e.options.apiKey)if(e.options.measurementId)u.warn(`The "apiKey" field is empty in the local Firebase config. This is needed to fetch the latest measurement ID for this Firebase app. Falling back to the measurement ID ${e.options.measurementId} provided in the "measurementId" field in the local Firebase config.`);else throw m.create("no-api-key");if(w[r]!=null)throw m.create("already-exists",{id:r});if(!Te){$r(K);const{wrappedGtag:s,gtagCore:i}=Fr(w,_e,Ae,K,ta);R=s,Se=i,Te=!0}return w[r]=Qr(e,_e,Ae,t,Se,K,n),new ea(e)}/**
707 * @license
708 * Copyright 2020 Google LLC
709 *
710 * Licensed under the Apache License, Version 2.0 (the "License");
711 * you may not use this file except in compliance with the License.
712 * You may obtain a copy of the License at
713 *
714 *   http://www.apache.org/licenses/LICENSE-2.0
715 *
716 * Unless required by applicable law or agreed to in writing, software
717 * distributed under the License is distributed on an "AS IS" BASIS,
718 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
719 * See the License for the specific language governing permissions and
720 * limitations under the License.
721 */function O(e=Rn()){e=B(e);const t=x(e,F);return t.isInitialized()?t.getImmediate():aa(e)}function aa(e,t={}){const n=x(e,F);if(n.isInitialized()){const a=n.getImmediate();if(N(t,n.getOptions()))return a;throw m.create("already-initialized")}return n.initialize({options:t})}function sa(e,t,n){e=B(e),Jr(R,w[e.app.options.appId],t).catch(r=>u.error(r))}function ct(e,t,n){e=B(e),Yr(R,w[e.app.options.appId],t,n).catch(r=>u.error(r))}function ia(e,t){e=B(e),Xr(w[e.app.options.appId],t).catch(n=>u.error(n))}function ne(e,t,n,r){e=B(e),Kr(R,w[e.app.options.appId],t,n,r).catch(a=>u.error(a))}function oa(e){R?R("consent","update",e):ot(e)}const Ce="@firebase/analytics",De="0.10.25";/**
722 * @license
723 * Copyright 2019 Google LLC
724 *
725 * Licensed under the Apache License, Version 2.0 (the "License");
726 * you may not use this file except in compliance with the License.
727 * You may obtain a copy of the License at
728 *
729 *   http://www.apache.org/licenses/LICENSE-2.0
730 *
731 * Unless required by applicable law or agreed to in writing, software
732 * distributed under the License is distributed on an "AS IS" BASIS,
733 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
734 * See the License for the specific language governing permissions and
735 * limitations under the License.
736 */function ca(){S(new I(F,(t,{options:n})=>{const r=t.getProvider("app").getImmediate(),a=t.getProvider("installations-internal").getImmediate();return ra(r,a,n)},"PUBLIC")),S(new I("analytics-internal",e,"PRIVATE")),A(Ce,De),A(Ce,De,"esm2020");function e(t){try{const n=t.getProvider(F).getImmediate();return{logEvent:(r,a,s)=>ne(n,r,a,s),setUserProperties:(r,a)=>ct(n,r,a)}}catch(n){throw m.create("interop-component-reg-failed",{reason:n})}}}ca();class fa extends dt{async getAppInstanceId(){throw this.unimplemented("Not implemented on web.")}async setConsent(t){const n=t.status===ut.Granted?"granted":"denied",r={};switch(t.type){case v.AdPersonalization:r.ad_personalization=n;break;case v.AdStorage:r.ad_storage=n;break;case v.AdUserData:r.ad_user_data=n;break;case v.AnalyticsStorage:r.analytics_storage=n;break;case v.FunctionalityStorage:r.functionality_storage=n;break;case v.PersonalizationStorage:r.personalization_storage=n;break}oa(r)}async setUserId(t){const n=O();sa(n,t.userId)}async setUserProperty(t){const n=O();ct(n,{[t.key]:t.value})}async setCurrentScreen(t){const n=O();ne(n,"screen_view",{firebase_screen:t.screenName||void 0,firebase_screen_class:t.screenClassOverride||void 0})}async logEvent(t){const n=O();ne(n,t.name,t.params)}async logTransaction(t){throw this.unimplemented("Not implemented on web.")}async setSessionTimeoutDuration(t){throw this.unimplemented("Not implemented on web.")}async setEnabled(t){const n=O();ia(n,t.enabled)}async isEnabled(){return{enabled:window["ga-disable-analyticsId"]===!0}}async resetAnalyticsData(){throw this.unimplemented("Not implemented on web.")}async initiateOnDeviceConversionMeasurementWithEmailAddress(t){throw this.unimplemented("Not implemented on web.")}async initiateOnDeviceConversionMeasurementWithPhoneNumber(t){throw this.unimplemented("Not implemented on web.")}async initiateOnDeviceConversionMeasurementWithHashedEmailAddress(t){throw this.unimplemented("Not implemented on web.")}async initiateOnDeviceConversionMeasurementWithHashedPhoneNumber(t){throw this.unimplemented("Not implemented on web.")}}export{fa as FirebaseAnalyticsWeb};

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.