everest-npm-features 0.0.17 → 0.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. package/dist/CheckCircle-BiltyzEJ.js +8 -0
  2. package/dist/PlayArrow-BYMBg9J8.js +8 -0
  3. package/dist/assets/index10.css +1 -1
  4. package/dist/assets/index11.css +1 -1
  5. package/dist/assets/index2.css +1 -1
  6. package/dist/assets/index3.css +1 -1
  7. package/dist/assets/index4.css +1 -1
  8. package/dist/assets/index5.css +1 -1
  9. package/dist/assets/index6.css +1 -1
  10. package/dist/assets/index7.css +1 -1
  11. package/dist/assets/index8.css +1 -1
  12. package/dist/assets/index9.css +1 -1
  13. package/dist/assets/styles2.css +1 -1
  14. package/dist/assets/styles3.css +1 -0
  15. package/dist/{auth-PInt5Jrb.js → auth-RJ36qeYb.js} +1 -1
  16. package/dist/{bank-BDnnvwyk.js → bank-Dml7vXW5.js} +10 -10
  17. package/dist/components/RocketRamp/MinimalKyc/form.js +5 -5
  18. package/dist/components/RocketRamp/Player/Buy/cardPayment.js +3 -3
  19. package/dist/components/RocketRamp/Player/Buy/confirmTransaction.js +3 -3
  20. package/dist/components/RocketRamp/Player/Buy/form.js +5 -5
  21. package/dist/components/RocketRamp/Player/Buy/index.js +6 -6
  22. package/dist/components/RocketRamp/Player/Dashboard/index.js +13 -15
  23. package/dist/components/RocketRamp/Player/Sell/confirmTransaction.js +3 -3
  24. package/dist/components/RocketRamp/Player/Sell/form.js +5 -5
  25. package/dist/components/RocketRamp/Player/Sell/index.js +8 -8
  26. package/dist/components/RocketRamp/Player/SignIn/index.js +3 -3
  27. package/dist/components/RocketRamp/Player/SignIn/loginForm.js +2 -2
  28. package/dist/components/RocketRamp/Player/SignIn/otpForm.js +2 -2
  29. package/dist/components/RocketRamp/Player/SignUp/email.js +2 -2
  30. package/dist/components/RocketRamp/Player/SignUp/index.js +3 -3
  31. package/dist/components/RocketRamp/Player/SignUp/personalInfo.js +2 -2
  32. package/dist/components/RocketRamp/ResetPassword/index.js +3 -3
  33. package/dist/components/RocketRamp/Shared/Input/index.js +9 -9
  34. package/dist/components/RocketRamp/Store/SignUp/index.js +3 -3
  35. package/dist/components/RocketRamp/Store/SignUp/personalInfo.js +2 -2
  36. package/dist/components/RocketRamp/Store/SignUp/storeInfo.js +2 -2
  37. package/dist/components/RocketRamp/Transactions/index.js +7 -7
  38. package/dist/components/Shared/HistoryItem/index.js +40 -40
  39. package/dist/components/Shared/MinimalKyc/index.js +3 -3
  40. package/dist/components/Shared/tooltip.js +5 -2108
  41. package/dist/components/Wallet/Account/createIban.js +1 -1
  42. package/dist/components/Wallet/Account/iban.js +5 -5
  43. package/dist/components/Wallet/Account/index.js +17 -17
  44. package/dist/components/Wallet/Account/sendIban.js +16 -16
  45. package/dist/components/Wallet/Buy/confirmTransaction.d.ts +2 -2
  46. package/dist/components/Wallet/Buy/confirmTransaction.js +5 -4
  47. package/dist/components/Wallet/Buy/form.d.ts +2 -2
  48. package/dist/components/Wallet/Buy/form.js +9 -6
  49. package/dist/components/Wallet/Buy/index.d.ts +1 -1
  50. package/dist/components/Wallet/Buy/index.js +7 -7
  51. package/dist/components/Wallet/Deposit/index.d.ts +2 -0
  52. package/dist/components/Wallet/Deposit/index.js +110 -0
  53. package/dist/components/Wallet/EnterpriseKyc/edd.js +92 -80
  54. package/dist/components/Wallet/EnterpriseKyc/index.js +121 -108
  55. package/dist/components/Wallet/EnterpriseKyc/orgDetails.d.ts +1 -1
  56. package/dist/components/Wallet/EnterpriseKyc/orgDetails.js +110 -85
  57. package/dist/components/Wallet/EnterpriseKyc/orgInfo.js +2 -2
  58. package/dist/components/Wallet/EnterpriseKyc/types.d.ts +1 -0
  59. package/dist/components/Wallet/EnterpriseKyc/verify.js +2 -2
  60. package/dist/components/Wallet/History/index.js +4 -4
  61. package/dist/components/Wallet/MoveToEthereumOrEverChain/index.js +33 -33
  62. package/dist/components/Wallet/Portfolio/index.js +171 -138
  63. package/dist/components/Wallet/Profile/documents.js +4 -4
  64. package/dist/components/Wallet/Profile/index.js +4 -4
  65. package/dist/components/Wallet/Receive/index.js +8 -8
  66. package/dist/components/Wallet/Sell/confirmTransaction.d.ts +3 -0
  67. package/dist/components/Wallet/Sell/confirmTransaction.js +18 -0
  68. package/dist/components/Wallet/Sell/form.d.ts +3 -0
  69. package/dist/components/Wallet/Sell/form.js +32 -0
  70. package/dist/components/Wallet/Sell/index.d.ts +6 -0
  71. package/dist/components/Wallet/Sell/index.js +22 -0
  72. package/dist/components/Wallet/Send/index.js +6 -6
  73. package/dist/components/Wallet/Shared/Auth/otpForm.js +2 -2
  74. package/dist/components/Wallet/Shared/ConnectWallet/index.js +1 -1
  75. package/dist/components/Wallet/Shared/Container/index.js +1 -1
  76. package/dist/components/Wallet/Shared/Order/types.d.ts +51 -0
  77. package/dist/components/Wallet/Shared/TokenModal/index.d.ts +1 -1
  78. package/dist/components/Wallet/Shared/TokenModal/index.js +5 -5
  79. package/dist/components/Wallet/Shared/TokenModal/tokenGrid.js +4 -4
  80. package/dist/components/Wallet/Shared/addBank.js +6 -6
  81. package/dist/components/Wallet/Shared/connectPlaidBank.js +7 -7
  82. package/dist/components/Wallet/Shared/pin.js +1 -1
  83. package/dist/components/Wallet/SignIn/index.js +3 -3
  84. package/dist/components/Wallet/SignUp/index.js +3 -3
  85. package/dist/components/Wallet/Stake/gems/index.js +1 -1
  86. package/dist/components/Wallet/Stake/id/index.js +3 -3
  87. package/dist/components/Wallet/Stake/index.js +7 -7
  88. package/dist/components/Wallet/Swap/index.d.ts +3 -2
  89. package/dist/components/Wallet/Swap/index.js +327 -271
  90. package/dist/components/Wallet/SwapAndUniSwap/index.js +31 -35
  91. package/dist/components/Wallet/{Buy → SwapAndUniSwap}/types.d.ts +4 -13
  92. package/dist/components/Wallet/SwapAndUniSwap/types.js +1 -0
  93. package/dist/components/Wallet/Withdraw/bankSelect.d.ts +4 -0
  94. package/dist/components/Wallet/Withdraw/bankSelect.js +21 -0
  95. package/dist/components/Wallet/Withdraw/confirmTransaction.d.ts +3 -0
  96. package/dist/components/Wallet/Withdraw/confirmTransaction.js +19 -0
  97. package/dist/components/Wallet/Withdraw/form.d.ts +3 -0
  98. package/dist/components/Wallet/Withdraw/form.js +26 -0
  99. package/dist/components/Wallet/Withdraw/index.d.ts +7 -0
  100. package/dist/components/Wallet/Withdraw/index.js +22 -0
  101. package/dist/constants-QcvnheTz.js +5307 -0
  102. package/dist/cryptoAssets-DBfxll21.js +16 -0
  103. package/dist/{documents-b3tR38Qf.js → documents-Bd28UFLu.js} +3 -3
  104. package/dist/{fiatAssets-Di1Dvl51.js → fiatAssets-w5Lh-MSu.js} +1 -1
  105. package/dist/hooks/useDialog/index.js +22 -22
  106. package/dist/hooks/useRrDialog/index.js +1 -1
  107. package/dist/{iban-D3Y3E3cN.js → iban-CKaN4sIM.js} +6 -6
  108. package/dist/index-BEdISdN-.js +709 -0
  109. package/dist/{index-BhJeqQtm.js → index-BNaxzTKI.js} +164 -163
  110. package/dist/index-BvftsxV1.js +677 -0
  111. package/dist/index-DSHZv8ZQ.js +569 -0
  112. package/dist/{index-D2XCPzg3.js → index-_KAhqkWc.js} +144 -143
  113. package/dist/{index-DQaPU81n.js → index-f15o1nhn.js} +3 -3
  114. package/dist/{kyc-8mSMgUlU.js → kyc-V7cIa71M.js} +1 -1
  115. package/dist/main.d.ts +4 -0
  116. package/dist/main.js +47 -39
  117. package/dist/order-6L4LZOBs.js +41 -0
  118. package/dist/{react-redux-B4BZippc.js → react-redux-C7I9-1M6.js} +2 -2
  119. package/dist/{stake-Cf5t27F3.js → stake-r4KUlRcz.js} +1 -1
  120. package/dist/styles.module-BFHktEw2.js +30 -0
  121. package/dist/{styles.module-Ctfaq7f2.js → styles.module-DJk7Pf0F.js} +1 -1
  122. package/dist/tooltip-BVZ66d8C.js +2111 -0
  123. package/dist/util/constants.d.ts +1 -0
  124. package/dist/util/constants.js +84 -83
  125. package/dist/{wallet-Bghw0_Nm.js → wallet-D7MEPP5y.js} +1 -1
  126. package/package.json +2 -2
  127. package/dist/PlayArrow-Dent7shn.js +0 -21
  128. package/dist/assets/index12.css +0 -1
  129. package/dist/assets/index13.css +0 -1
  130. package/dist/constants-A8X7fywY.js +0 -3882
  131. package/dist/index-Bqxs_jIU.js +0 -709
  132. package/dist/order-DTnCUIx0.js +0 -34
  133. /package/dist/components/Wallet/{Buy → Shared/Order}/types.js +0 -0
@@ -1,3882 +0,0 @@
1
- const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", cs = new Uint8Array(256);
2
- for (let r = 0; r < $n.length; r++)
3
- cs[$n.charCodeAt(r)] = r;
4
- process.env.NODE_ENV !== "production" && typeof Proxy < "u";
5
- /**
6
- * @license
7
- * Copyright 2017 Google LLC
8
- *
9
- * Licensed under the Apache License, Version 2.0 (the "License");
10
- * you may not use this file except in compliance with the License.
11
- * You may obtain a copy of the License at
12
- *
13
- * http://www.apache.org/licenses/LICENSE-2.0
14
- *
15
- * Unless required by applicable law or agreed to in writing, software
16
- * distributed under the License is distributed on an "AS IS" BASIS,
17
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
- * See the License for the specific language governing permissions and
19
- * limitations under the License.
20
- */
21
- const gi = function(r) {
22
- const i = [];
23
- let o = 0;
24
- for (let u = 0; u < r.length; u++) {
25
- let d = r.charCodeAt(u);
26
- d < 128 ? i[o++] = d : d < 2048 ? (i[o++] = d >> 6 | 192, i[o++] = d & 63 | 128) : (d & 64512) === 55296 && u + 1 < r.length && (r.charCodeAt(u + 1) & 64512) === 56320 ? (d = 65536 + ((d & 1023) << 10) + (r.charCodeAt(++u) & 1023), i[o++] = d >> 18 | 240, i[o++] = d >> 12 & 63 | 128, i[o++] = d >> 6 & 63 | 128, i[o++] = d & 63 | 128) : (i[o++] = d >> 12 | 224, i[o++] = d >> 6 & 63 | 128, i[o++] = d & 63 | 128);
27
- }
28
- return i;
29
- }, us = function(r) {
30
- const i = [];
31
- let o = 0, u = 0;
32
- for (; o < r.length; ) {
33
- const d = r[o++];
34
- if (d < 128)
35
- i[u++] = String.fromCharCode(d);
36
- else if (d > 191 && d < 224) {
37
- const T = r[o++];
38
- i[u++] = String.fromCharCode((d & 31) << 6 | T & 63);
39
- } else if (d > 239 && d < 365) {
40
- const T = r[o++], m = r[o++], y = r[o++], A = ((d & 7) << 18 | (T & 63) << 12 | (m & 63) << 6 | y & 63) - 65536;
41
- i[u++] = String.fromCharCode(55296 + (A >> 10)), i[u++] = String.fromCharCode(56320 + (A & 1023));
42
- } else {
43
- const T = r[o++], m = r[o++];
44
- i[u++] = String.fromCharCode((d & 15) << 12 | (T & 63) << 6 | m & 63);
45
- }
46
- }
47
- return i.join("");
48
- }, fs = {
49
- /**
50
- * Maps bytes to characters.
51
- */
52
- byteToCharMap_: null,
53
- /**
54
- * Maps characters to bytes.
55
- */
56
- charToByteMap_: null,
57
- /**
58
- * Maps bytes to websafe characters.
59
- * @private
60
- */
61
- byteToCharMapWebSafe_: null,
62
- /**
63
- * Maps websafe characters to bytes.
64
- * @private
65
- */
66
- charToByteMapWebSafe_: null,
67
- /**
68
- * Our default alphabet, shared between
69
- * ENCODED_VALS and ENCODED_VALS_WEBSAFE
70
- */
71
- ENCODED_VALS_BASE: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
72
- /**
73
- * Our default alphabet. Value 64 (=) is special; it means "nothing."
74
- */
75
- get ENCODED_VALS() {
76
- return this.ENCODED_VALS_BASE + "+/=";
77
- },
78
- /**
79
- * Our websafe alphabet.
80
- */
81
- get ENCODED_VALS_WEBSAFE() {
82
- return this.ENCODED_VALS_BASE + "-_.";
83
- },
84
- /**
85
- * Whether this browser supports the atob and btoa functions. This extension
86
- * started at Mozilla but is now implemented by many browsers. We use the
87
- * ASSUME_* variables to avoid pulling in the full useragent detection library
88
- * but still allowing the standard per-browser compilations.
89
- *
90
- */
91
- HAS_NATIVE_SUPPORT: typeof atob == "function",
92
- /**
93
- * Base64-encode an array of bytes.
94
- *
95
- * @param input An array of bytes (numbers with
96
- * value in [0, 255]) to encode.
97
- * @param webSafe Boolean indicating we should use the
98
- * alternative alphabet.
99
- * @return The base64 encoded string.
100
- */
101
- encodeByteArray(r, i) {
102
- if (!Array.isArray(r))
103
- throw Error("encodeByteArray takes an array as a parameter");
104
- this.init_();
105
- const o = i ? this.byteToCharMapWebSafe_ : this.byteToCharMap_, u = [];
106
- for (let d = 0; d < r.length; d += 3) {
107
- const T = r[d], m = d + 1 < r.length, y = m ? r[d + 1] : 0, A = d + 2 < r.length, R = A ? r[d + 2] : 0, q = T >> 2, j = (T & 3) << 4 | y >> 4;
108
- let N = (y & 15) << 2 | R >> 6, Q = R & 63;
109
- A || (Q = 64, m || (N = 64)), u.push(o[q], o[j], o[N], o[Q]);
110
- }
111
- return u.join("");
112
- },
113
- /**
114
- * Base64-encode a string.
115
- *
116
- * @param input A string to encode.
117
- * @param webSafe If true, we should use the
118
- * alternative alphabet.
119
- * @return The base64 encoded string.
120
- */
121
- encodeString(r, i) {
122
- return this.HAS_NATIVE_SUPPORT && !i ? btoa(r) : this.encodeByteArray(gi(r), i);
123
- },
124
- /**
125
- * Base64-decode a string.
126
- *
127
- * @param input to decode.
128
- * @param webSafe True if we should use the
129
- * alternative alphabet.
130
- * @return string representing the decoded value.
131
- */
132
- decodeString(r, i) {
133
- return this.HAS_NATIVE_SUPPORT && !i ? atob(r) : us(this.decodeStringToByteArray(r, i));
134
- },
135
- /**
136
- * Base64-decode a string.
137
- *
138
- * In base-64 decoding, groups of four characters are converted into three
139
- * bytes. If the encoder did not apply padding, the input length may not
140
- * be a multiple of 4.
141
- *
142
- * In this case, the last group will have fewer than 4 characters, and
143
- * padding will be inferred. If the group has one or two characters, it decodes
144
- * to one byte. If the group has three characters, it decodes to two bytes.
145
- *
146
- * @param input Input to decode.
147
- * @param webSafe True if we should use the web-safe alphabet.
148
- * @return bytes representing the decoded value.
149
- */
150
- decodeStringToByteArray(r, i) {
151
- this.init_();
152
- const o = i ? this.charToByteMapWebSafe_ : this.charToByteMap_, u = [];
153
- for (let d = 0; d < r.length; ) {
154
- const T = o[r.charAt(d++)], y = d < r.length ? o[r.charAt(d)] : 0;
155
- ++d;
156
- const R = d < r.length ? o[r.charAt(d)] : 64;
157
- ++d;
158
- const j = d < r.length ? o[r.charAt(d)] : 64;
159
- if (++d, T == null || y == null || R == null || j == null)
160
- throw new ps();
161
- const N = T << 2 | y >> 4;
162
- if (u.push(N), R !== 64) {
163
- const Q = y << 4 & 240 | R >> 2;
164
- if (u.push(Q), j !== 64) {
165
- const D = R << 6 & 192 | j;
166
- u.push(D);
167
- }
168
- }
169
- }
170
- return u;
171
- },
172
- /**
173
- * Lazy static initialization function. Called before
174
- * accessing any of the static map variables.
175
- * @private
176
- */
177
- init_() {
178
- if (!this.byteToCharMap_) {
179
- this.byteToCharMap_ = {}, this.charToByteMap_ = {}, this.byteToCharMapWebSafe_ = {}, this.charToByteMapWebSafe_ = {};
180
- for (let r = 0; r < this.ENCODED_VALS.length; r++)
181
- this.byteToCharMap_[r] = this.ENCODED_VALS.charAt(r), this.charToByteMap_[this.byteToCharMap_[r]] = r, this.byteToCharMapWebSafe_[r] = this.ENCODED_VALS_WEBSAFE.charAt(r), this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[r]] = r, r >= this.ENCODED_VALS_BASE.length && (this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(r)] = r, this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(r)] = r);
182
- }
183
- }
184
- };
185
- class ps extends Error {
186
- constructor() {
187
- super(...arguments), this.name = "DecodeBase64StringError";
188
- }
189
- }
190
- const Es = function(r) {
191
- const i = gi(r);
192
- return fs.encodeByteArray(i, !0);
193
- }, di = function(r) {
194
- return Es(r).replace(/\./g, "");
195
- };
196
- function gs() {
197
- try {
198
- return typeof indexedDB == "object";
199
- } catch {
200
- return !1;
201
- }
202
- }
203
- function ds() {
204
- return new Promise((r, i) => {
205
- try {
206
- let o = !0;
207
- const u = "validate-browser-context-for-indexeddb-analytics-module", d = self.indexedDB.open(u);
208
- d.onsuccess = () => {
209
- d.result.close(), o || self.indexedDB.deleteDatabase(u), r(!0);
210
- }, d.onupgradeneeded = () => {
211
- o = !1;
212
- }, d.onerror = () => {
213
- var T;
214
- i(((T = d.error) === null || T === void 0 ? void 0 : T.message) || "");
215
- };
216
- } catch (o) {
217
- i(o);
218
- }
219
- });
220
- }
221
- /**
222
- * @license
223
- * Copyright 2017 Google LLC
224
- *
225
- * Licensed under the Apache License, Version 2.0 (the "License");
226
- * you may not use this file except in compliance with the License.
227
- * You may obtain a copy of the License at
228
- *
229
- * http://www.apache.org/licenses/LICENSE-2.0
230
- *
231
- * Unless required by applicable law or agreed to in writing, software
232
- * distributed under the License is distributed on an "AS IS" BASIS,
233
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
234
- * See the License for the specific language governing permissions and
235
- * limitations under the License.
236
- */
237
- const _s = "FirebaseError";
238
- class mt extends Error {
239
- constructor(i, o, u) {
240
- super(o), this.code = i, this.customData = u, this.name = _s, Object.setPrototypeOf(this, mt.prototype), Error.captureStackTrace && Error.captureStackTrace(this, _i.prototype.create);
241
- }
242
- }
243
- class _i {
244
- constructor(i, o, u) {
245
- this.service = i, this.serviceName = o, this.errors = u;
246
- }
247
- create(i, ...o) {
248
- const u = o[0] || {}, d = `${this.service}/${i}`, T = this.errors[i], m = T ? Ts(T, u) : "Error", y = `${this.serviceName}: ${m} (${d}).`;
249
- return new mt(d, y, u);
250
- }
251
- }
252
- function Ts(r, i) {
253
- return r.replace(ms, (o, u) => {
254
- const d = i[u];
255
- return d != null ? String(d) : `<${u}?>`;
256
- });
257
- }
258
- const ms = /\{\$([^}]+)}/g;
259
- class se {
260
- /**
261
- *
262
- * @param name The public service name, e.g. app, auth, firestore, database
263
- * @param instanceFactory Service factory responsible for creating the public interface
264
- * @param type whether the service provided by the component is public or private
265
- */
266
- constructor(i, o, u) {
267
- this.name = i, this.instanceFactory = o, this.type = u, this.multipleInstances = !1, this.serviceProps = {}, this.instantiationMode = "LAZY", this.onInstanceCreated = null;
268
- }
269
- setInstantiationMode(i) {
270
- return this.instantiationMode = i, this;
271
- }
272
- setMultipleInstances(i) {
273
- return this.multipleInstances = i, this;
274
- }
275
- setServiceProps(i) {
276
- return this.serviceProps = i, this;
277
- }
278
- setInstanceCreatedCallback(i) {
279
- return this.onInstanceCreated = i, this;
280
- }
281
- }
282
- /**
283
- * @license
284
- * Copyright 2017 Google LLC
285
- *
286
- * Licensed under the Apache License, Version 2.0 (the "License");
287
- * you may not use this file except in compliance with the License.
288
- * You may obtain a copy of the License at
289
- *
290
- * http://www.apache.org/licenses/LICENSE-2.0
291
- *
292
- * Unless required by applicable law or agreed to in writing, software
293
- * distributed under the License is distributed on an "AS IS" BASIS,
294
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
295
- * See the License for the specific language governing permissions and
296
- * limitations under the License.
297
- */
298
- var C;
299
- (function(r) {
300
- r[r.DEBUG = 0] = "DEBUG", r[r.VERBOSE = 1] = "VERBOSE", r[r.INFO = 2] = "INFO", r[r.WARN = 3] = "WARN", r[r.ERROR = 4] = "ERROR", r[r.SILENT = 5] = "SILENT";
301
- })(C || (C = {}));
302
- const Ss = {
303
- debug: C.DEBUG,
304
- verbose: C.VERBOSE,
305
- info: C.INFO,
306
- warn: C.WARN,
307
- error: C.ERROR,
308
- silent: C.SILENT
309
- }, ys = C.INFO, As = {
310
- [C.DEBUG]: "log",
311
- [C.VERBOSE]: "log",
312
- [C.INFO]: "info",
313
- [C.WARN]: "warn",
314
- [C.ERROR]: "error"
315
- }, Rs = (r, i, ...o) => {
316
- if (i < r.logLevel)
317
- return;
318
- const u = (/* @__PURE__ */ new Date()).toISOString(), d = As[i];
319
- if (d)
320
- console[d](`[${u}] ${r.name}:`, ...o);
321
- else
322
- throw new Error(`Attempted to log a message with an invalid logType (value: ${i})`);
323
- };
324
- class Ti {
325
- /**
326
- * Gives you an instance of a Logger to capture messages according to
327
- * Firebase's logging scheme.
328
- *
329
- * @param name The name that the logs will be associated with
330
- */
331
- constructor(i) {
332
- this.name = i, this._logLevel = ys, this._logHandler = Rs, this._userLogHandler = null;
333
- }
334
- get logLevel() {
335
- return this._logLevel;
336
- }
337
- set logLevel(i) {
338
- if (!(i in C))
339
- throw new TypeError(`Invalid value "${i}" assigned to \`logLevel\``);
340
- this._logLevel = i;
341
- }
342
- // Workaround for setter/getter having to be the same type.
343
- setLogLevel(i) {
344
- this._logLevel = typeof i == "string" ? Ss[i] : i;
345
- }
346
- get logHandler() {
347
- return this._logHandler;
348
- }
349
- set logHandler(i) {
350
- if (typeof i != "function")
351
- throw new TypeError("Value assigned to `logHandler` must be a function");
352
- this._logHandler = i;
353
- }
354
- get userLogHandler() {
355
- return this._userLogHandler;
356
- }
357
- set userLogHandler(i) {
358
- this._userLogHandler = i;
359
- }
360
- /**
361
- * The functions below are all based on the `console` interface
362
- */
363
- debug(...i) {
364
- this._userLogHandler && this._userLogHandler(this, C.DEBUG, ...i), this._logHandler(this, C.DEBUG, ...i);
365
- }
366
- log(...i) {
367
- this._userLogHandler && this._userLogHandler(this, C.VERBOSE, ...i), this._logHandler(this, C.VERBOSE, ...i);
368
- }
369
- info(...i) {
370
- this._userLogHandler && this._userLogHandler(this, C.INFO, ...i), this._logHandler(this, C.INFO, ...i);
371
- }
372
- warn(...i) {
373
- this._userLogHandler && this._userLogHandler(this, C.WARN, ...i), this._logHandler(this, C.WARN, ...i);
374
- }
375
- error(...i) {
376
- this._userLogHandler && this._userLogHandler(this, C.ERROR, ...i), this._logHandler(this, C.ERROR, ...i);
377
- }
378
- }
379
- const vs = (r, i) => i.some((o) => r instanceof o);
380
- let Yn, Kn;
381
- function Is() {
382
- return Yn || (Yn = [
383
- IDBDatabase,
384
- IDBObjectStore,
385
- IDBIndex,
386
- IDBCursor,
387
- IDBTransaction
388
- ]);
389
- }
390
- function Ds() {
391
- return Kn || (Kn = [
392
- IDBCursor.prototype.advance,
393
- IDBCursor.prototype.continue,
394
- IDBCursor.prototype.continuePrimaryKey
395
- ]);
396
- }
397
- const mi = /* @__PURE__ */ new WeakMap(), He = /* @__PURE__ */ new WeakMap(), Si = /* @__PURE__ */ new WeakMap(), Me = /* @__PURE__ */ new WeakMap(), Qe = /* @__PURE__ */ new WeakMap();
398
- function ws(r) {
399
- const i = new Promise((o, u) => {
400
- const d = () => {
401
- r.removeEventListener("success", T), r.removeEventListener("error", m);
402
- }, T = () => {
403
- o(at(r.result)), d();
404
- }, m = () => {
405
- u(r.error), d();
406
- };
407
- r.addEventListener("success", T), r.addEventListener("error", m);
408
- });
409
- return i.then((o) => {
410
- o instanceof IDBCursor && mi.set(o, r);
411
- }).catch(() => {
412
- }), Qe.set(i, r), i;
413
- }
414
- function Cs(r) {
415
- if (He.has(r))
416
- return;
417
- const i = new Promise((o, u) => {
418
- const d = () => {
419
- r.removeEventListener("complete", T), r.removeEventListener("error", m), r.removeEventListener("abort", m);
420
- }, T = () => {
421
- o(), d();
422
- }, m = () => {
423
- u(r.error || new DOMException("AbortError", "AbortError")), d();
424
- };
425
- r.addEventListener("complete", T), r.addEventListener("error", m), r.addEventListener("abort", m);
426
- });
427
- He.set(r, i);
428
- }
429
- let je = {
430
- get(r, i, o) {
431
- if (r instanceof IDBTransaction) {
432
- if (i === "done")
433
- return He.get(r);
434
- if (i === "objectStoreNames")
435
- return r.objectStoreNames || Si.get(r);
436
- if (i === "store")
437
- return o.objectStoreNames[1] ? void 0 : o.objectStore(o.objectStoreNames[0]);
438
- }
439
- return at(r[i]);
440
- },
441
- set(r, i, o) {
442
- return r[i] = o, !0;
443
- },
444
- has(r, i) {
445
- return r instanceof IDBTransaction && (i === "done" || i === "store") ? !0 : i in r;
446
- }
447
- };
448
- function Os(r) {
449
- je = r(je);
450
- }
451
- function Ns(r) {
452
- return r === IDBDatabase.prototype.transaction && !("objectStoreNames" in IDBTransaction.prototype) ? function(i, ...o) {
453
- const u = r.call(Be(this), i, ...o);
454
- return Si.set(u, i.sort ? i.sort() : [i]), at(u);
455
- } : Ds().includes(r) ? function(...i) {
456
- return r.apply(Be(this), i), at(mi.get(this));
457
- } : function(...i) {
458
- return at(r.apply(Be(this), i));
459
- };
460
- }
461
- function Us(r) {
462
- return typeof r == "function" ? Ns(r) : (r instanceof IDBTransaction && Cs(r), vs(r, Is()) ? new Proxy(r, je) : r);
463
- }
464
- function at(r) {
465
- if (r instanceof IDBRequest)
466
- return ws(r);
467
- if (Me.has(r))
468
- return Me.get(r);
469
- const i = Us(r);
470
- return i !== r && (Me.set(r, i), Qe.set(i, r)), i;
471
- }
472
- const Be = (r) => Qe.get(r);
473
- function Ls(r, i, { blocked: o, upgrade: u, blocking: d, terminated: T } = {}) {
474
- const m = indexedDB.open(r, i), y = at(m);
475
- return u && m.addEventListener("upgradeneeded", (A) => {
476
- u(at(m.result), A.oldVersion, A.newVersion, at(m.transaction), A);
477
- }), o && m.addEventListener("blocked", (A) => o(
478
- // Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405
479
- A.oldVersion,
480
- A.newVersion,
481
- A
482
- )), y.then((A) => {
483
- T && A.addEventListener("close", () => T()), d && A.addEventListener("versionchange", (R) => d(R.oldVersion, R.newVersion, R));
484
- }).catch(() => {
485
- }), y;
486
- }
487
- const Ps = ["get", "getKey", "getAll", "getAllKeys", "count"], bs = ["put", "add", "delete", "clear"], xe = /* @__PURE__ */ new Map();
488
- function Wn(r, i) {
489
- if (!(r instanceof IDBDatabase && !(i in r) && typeof i == "string"))
490
- return;
491
- if (xe.get(i))
492
- return xe.get(i);
493
- const o = i.replace(/FromIndex$/, ""), u = i !== o, d = bs.includes(o);
494
- if (
495
- // Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge.
496
- !(o in (u ? IDBIndex : IDBObjectStore).prototype) || !(d || Ps.includes(o))
497
- )
498
- return;
499
- const T = async function(m, ...y) {
500
- const A = this.transaction(m, d ? "readwrite" : "readonly");
501
- let R = A.store;
502
- return u && (R = R.index(y.shift())), (await Promise.all([
503
- R[o](...y),
504
- d && A.done
505
- ]))[0];
506
- };
507
- return xe.set(i, T), T;
508
- }
509
- Os((r) => ({
510
- ...r,
511
- get: (i, o, u) => Wn(i, o) || r.get(i, o, u),
512
- has: (i, o) => !!Wn(i, o) || r.has(i, o)
513
- }));
514
- /**
515
- * @license
516
- * Copyright 2019 Google LLC
517
- *
518
- * Licensed under the Apache License, Version 2.0 (the "License");
519
- * you may not use this file except in compliance with the License.
520
- * You may obtain a copy of the License at
521
- *
522
- * http://www.apache.org/licenses/LICENSE-2.0
523
- *
524
- * Unless required by applicable law or agreed to in writing, software
525
- * distributed under the License is distributed on an "AS IS" BASIS,
526
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
527
- * See the License for the specific language governing permissions and
528
- * limitations under the License.
529
- */
530
- class Ms {
531
- constructor(i) {
532
- this.container = i;
533
- }
534
- // In initial implementation, this will be called by installations on
535
- // auth token refresh, and installations will send this string.
536
- getPlatformInfoString() {
537
- return this.container.getProviders().map((o) => {
538
- if (Bs(o)) {
539
- const u = o.getImmediate();
540
- return `${u.library}/${u.version}`;
541
- } else
542
- return null;
543
- }).filter((o) => o).join(" ");
544
- }
545
- }
546
- function Bs(r) {
547
- const i = r.getComponent();
548
- return (i == null ? void 0 : i.type) === "VERSION";
549
- }
550
- const Ve = "@firebase/app", Xn = "0.13.1";
551
- /**
552
- * @license
553
- * Copyright 2019 Google LLC
554
- *
555
- * Licensed under the Apache License, Version 2.0 (the "License");
556
- * you may not use this file except in compliance with the License.
557
- * You may obtain a copy of the License at
558
- *
559
- * http://www.apache.org/licenses/LICENSE-2.0
560
- *
561
- * Unless required by applicable law or agreed to in writing, software
562
- * distributed under the License is distributed on an "AS IS" BASIS,
563
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
564
- * See the License for the specific language governing permissions and
565
- * limitations under the License.
566
- */
567
- const nt = new Ti("@firebase/app"), xs = "@firebase/app-compat", ks = "@firebase/analytics-compat", Fs = "@firebase/analytics", Hs = "@firebase/app-check-compat", js = "@firebase/app-check", Vs = "@firebase/auth", Qs = "@firebase/auth-compat", Gs = "@firebase/database", $s = "@firebase/data-connect", Ys = "@firebase/database-compat", Ks = "@firebase/functions", Ws = "@firebase/functions-compat", Xs = "@firebase/installations", zs = "@firebase/installations-compat", Js = "@firebase/messaging", qs = "@firebase/messaging-compat", Zs = "@firebase/performance", tr = "@firebase/performance-compat", er = "@firebase/remote-config", nr = "@firebase/remote-config-compat", ir = "@firebase/storage", sr = "@firebase/storage-compat", rr = "@firebase/firestore", or = "@firebase/ai", hr = "@firebase/firestore-compat", ar = "firebase", lr = "11.9.0", cr = {
568
- [Ve]: "fire-core",
569
- [xs]: "fire-core-compat",
570
- [Fs]: "fire-analytics",
571
- [ks]: "fire-analytics-compat",
572
- [js]: "fire-app-check",
573
- [Hs]: "fire-app-check-compat",
574
- [Vs]: "fire-auth",
575
- [Qs]: "fire-auth-compat",
576
- [Gs]: "fire-rtdb",
577
- [$s]: "fire-data-connect",
578
- [Ys]: "fire-rtdb-compat",
579
- [Ks]: "fire-fn",
580
- [Ws]: "fire-fn-compat",
581
- [Xs]: "fire-iid",
582
- [zs]: "fire-iid-compat",
583
- [Js]: "fire-fcm",
584
- [qs]: "fire-fcm-compat",
585
- [Zs]: "fire-perf",
586
- [tr]: "fire-perf-compat",
587
- [er]: "fire-rc",
588
- [nr]: "fire-rc-compat",
589
- [ir]: "fire-gcs",
590
- [sr]: "fire-gcs-compat",
591
- [rr]: "fire-fst",
592
- [hr]: "fire-fst-compat",
593
- [or]: "fire-vertex",
594
- "fire-js": "fire-js",
595
- // Platform identifier for JS SDK.
596
- [ar]: "fire-js-all"
597
- };
598
- /**
599
- * @license
600
- * Copyright 2019 Google LLC
601
- *
602
- * Licensed under the Apache License, Version 2.0 (the "License");
603
- * you may not use this file except in compliance with the License.
604
- * You may obtain a copy of the License at
605
- *
606
- * http://www.apache.org/licenses/LICENSE-2.0
607
- *
608
- * Unless required by applicable law or agreed to in writing, software
609
- * distributed under the License is distributed on an "AS IS" BASIS,
610
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
611
- * See the License for the specific language governing permissions and
612
- * limitations under the License.
613
- */
614
- const ur = /* @__PURE__ */ new Map(), fr = /* @__PURE__ */ new Map(), zn = /* @__PURE__ */ new Map();
615
- function Jn(r, i) {
616
- try {
617
- r.container.addComponent(i);
618
- } catch (o) {
619
- nt.debug(`Component ${i.name} failed to register with FirebaseApp ${r.name}`, o);
620
- }
621
- }
622
- function re(r) {
623
- const i = r.name;
624
- if (zn.has(i))
625
- return nt.debug(`There were multiple attempts to register component ${i}.`), !1;
626
- zn.set(i, r);
627
- for (const o of ur.values())
628
- Jn(o, r);
629
- for (const o of fr.values())
630
- Jn(o, r);
631
- return !0;
632
- }
633
- function pr(r) {
634
- return r == null ? !1 : r.settings !== void 0;
635
- }
636
- /**
637
- * @license
638
- * Copyright 2019 Google LLC
639
- *
640
- * Licensed under the Apache License, Version 2.0 (the "License");
641
- * you may not use this file except in compliance with the License.
642
- * You may obtain a copy of the License at
643
- *
644
- * http://www.apache.org/licenses/LICENSE-2.0
645
- *
646
- * Unless required by applicable law or agreed to in writing, software
647
- * distributed under the License is distributed on an "AS IS" BASIS,
648
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
649
- * See the License for the specific language governing permissions and
650
- * limitations under the License.
651
- */
652
- const Er = {
653
- "no-app": "No Firebase App '{$appName}' has been created - call initializeApp() first",
654
- "bad-app-name": "Illegal App name: '{$appName}'",
655
- "duplicate-app": "Firebase App named '{$appName}' already exists with different options or config",
656
- "app-deleted": "Firebase App named '{$appName}' already deleted",
657
- "server-app-deleted": "Firebase Server App has been deleted",
658
- "no-options": "Need to provide options, when not being deployed to hosting via source.",
659
- "invalid-app-argument": "firebase.{$appName}() takes either no argument or a Firebase App instance.",
660
- "invalid-log-argument": "First argument to `onLog` must be null or a function.",
661
- "idb-open": "Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.",
662
- "idb-get": "Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.",
663
- "idb-set": "Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.",
664
- "idb-delete": "Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.",
665
- "finalization-registry-not-supported": "FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.",
666
- "invalid-server-app-environment": "FirebaseServerApp is not for use in browser environments."
667
- }, Ge = new _i("app", "Firebase", Er);
668
- /**
669
- * @license
670
- * Copyright 2019 Google LLC
671
- *
672
- * Licensed under the Apache License, Version 2.0 (the "License");
673
- * you may not use this file except in compliance with the License.
674
- * You may obtain a copy of the License at
675
- *
676
- * http://www.apache.org/licenses/LICENSE-2.0
677
- *
678
- * Unless required by applicable law or agreed to in writing, software
679
- * distributed under the License is distributed on an "AS IS" BASIS,
680
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
681
- * See the License for the specific language governing permissions and
682
- * limitations under the License.
683
- */
684
- const gr = lr;
685
- function Tt(r, i, o) {
686
- var u;
687
- let d = (u = cr[r]) !== null && u !== void 0 ? u : r;
688
- o && (d += `-${o}`);
689
- const T = d.match(/\s|\//), m = i.match(/\s|\//);
690
- if (T || m) {
691
- const y = [
692
- `Unable to register library "${d}" with version "${i}":`
693
- ];
694
- T && y.push(`library name "${d}" contains illegal characters (whitespace or "/")`), T && m && y.push("and"), m && y.push(`version name "${i}" contains illegal characters (whitespace or "/")`), nt.warn(y.join(" "));
695
- return;
696
- }
697
- re(new se(
698
- `${d}-version`,
699
- () => ({ library: d, version: i }),
700
- "VERSION"
701
- /* ComponentType.VERSION */
702
- ));
703
- }
704
- /**
705
- * @license
706
- * Copyright 2021 Google LLC
707
- *
708
- * Licensed under the Apache License, Version 2.0 (the "License");
709
- * you may not use this file except in compliance with the License.
710
- * You may obtain a copy of the License at
711
- *
712
- * http://www.apache.org/licenses/LICENSE-2.0
713
- *
714
- * Unless required by applicable law or agreed to in writing, software
715
- * distributed under the License is distributed on an "AS IS" BASIS,
716
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
717
- * See the License for the specific language governing permissions and
718
- * limitations under the License.
719
- */
720
- const dr = "firebase-heartbeat-database", _r = 1, Ft = "firebase-heartbeat-store";
721
- let ke = null;
722
- function yi() {
723
- return ke || (ke = Ls(dr, _r, {
724
- upgrade: (r, i) => {
725
- switch (i) {
726
- case 0:
727
- try {
728
- r.createObjectStore(Ft);
729
- } catch (o) {
730
- console.warn(o);
731
- }
732
- }
733
- }
734
- }).catch((r) => {
735
- throw Ge.create("idb-open", {
736
- originalErrorMessage: r.message
737
- });
738
- })), ke;
739
- }
740
- async function Tr(r) {
741
- try {
742
- const o = (await yi()).transaction(Ft), u = await o.objectStore(Ft).get(Ai(r));
743
- return await o.done, u;
744
- } catch (i) {
745
- if (i instanceof mt)
746
- nt.warn(i.message);
747
- else {
748
- const o = Ge.create("idb-get", {
749
- originalErrorMessage: i == null ? void 0 : i.message
750
- });
751
- nt.warn(o.message);
752
- }
753
- }
754
- }
755
- async function qn(r, i) {
756
- try {
757
- const u = (await yi()).transaction(Ft, "readwrite");
758
- await u.objectStore(Ft).put(i, Ai(r)), await u.done;
759
- } catch (o) {
760
- if (o instanceof mt)
761
- nt.warn(o.message);
762
- else {
763
- const u = Ge.create("idb-set", {
764
- originalErrorMessage: o == null ? void 0 : o.message
765
- });
766
- nt.warn(u.message);
767
- }
768
- }
769
- }
770
- function Ai(r) {
771
- return `${r.name}!${r.options.appId}`;
772
- }
773
- /**
774
- * @license
775
- * Copyright 2021 Google LLC
776
- *
777
- * Licensed under the Apache License, Version 2.0 (the "License");
778
- * you may not use this file except in compliance with the License.
779
- * You may obtain a copy of the License at
780
- *
781
- * http://www.apache.org/licenses/LICENSE-2.0
782
- *
783
- * Unless required by applicable law or agreed to in writing, software
784
- * distributed under the License is distributed on an "AS IS" BASIS,
785
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
786
- * See the License for the specific language governing permissions and
787
- * limitations under the License.
788
- */
789
- const mr = 1024, Sr = 30;
790
- class yr {
791
- constructor(i) {
792
- this.container = i, this._heartbeatsCache = null;
793
- const o = this.container.getProvider("app").getImmediate();
794
- this._storage = new Rr(o), this._heartbeatsCachePromise = this._storage.read().then((u) => (this._heartbeatsCache = u, u));
795
- }
796
- /**
797
- * Called to report a heartbeat. The function will generate
798
- * a HeartbeatsByUserAgent object, update heartbeatsCache, and persist it
799
- * to IndexedDB.
800
- * Note that we only store one heartbeat per day. So if a heartbeat for today is
801
- * already logged, subsequent calls to this function in the same day will be ignored.
802
- */
803
- async triggerHeartbeat() {
804
- var i, o;
805
- try {
806
- const d = this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(), T = Zn();
807
- if (((i = this._heartbeatsCache) === null || i === void 0 ? void 0 : i.heartbeats) == null && (this._heartbeatsCache = await this._heartbeatsCachePromise, ((o = this._heartbeatsCache) === null || o === void 0 ? void 0 : o.heartbeats) == null) || this._heartbeatsCache.lastSentHeartbeatDate === T || this._heartbeatsCache.heartbeats.some((m) => m.date === T))
808
- return;
809
- if (this._heartbeatsCache.heartbeats.push({ date: T, agent: d }), this._heartbeatsCache.heartbeats.length > Sr) {
810
- const m = vr(this._heartbeatsCache.heartbeats);
811
- this._heartbeatsCache.heartbeats.splice(m, 1);
812
- }
813
- return this._storage.overwrite(this._heartbeatsCache);
814
- } catch (u) {
815
- nt.warn(u);
816
- }
817
- }
818
- /**
819
- * Returns a base64 encoded string which can be attached to the heartbeat-specific header directly.
820
- * It also clears all heartbeats from memory as well as in IndexedDB.
821
- *
822
- * NOTE: Consuming product SDKs should not send the header if this method
823
- * returns an empty string.
824
- */
825
- async getHeartbeatsHeader() {
826
- var i;
827
- try {
828
- if (this._heartbeatsCache === null && await this._heartbeatsCachePromise, ((i = this._heartbeatsCache) === null || i === void 0 ? void 0 : i.heartbeats) == null || this._heartbeatsCache.heartbeats.length === 0)
829
- return "";
830
- const o = Zn(), { heartbeatsToSend: u, unsentEntries: d } = Ar(this._heartbeatsCache.heartbeats), T = di(JSON.stringify({ version: 2, heartbeats: u }));
831
- return this._heartbeatsCache.lastSentHeartbeatDate = o, d.length > 0 ? (this._heartbeatsCache.heartbeats = d, await this._storage.overwrite(this._heartbeatsCache)) : (this._heartbeatsCache.heartbeats = [], this._storage.overwrite(this._heartbeatsCache)), T;
832
- } catch (o) {
833
- return nt.warn(o), "";
834
- }
835
- }
836
- }
837
- function Zn() {
838
- return (/* @__PURE__ */ new Date()).toISOString().substring(0, 10);
839
- }
840
- function Ar(r, i = mr) {
841
- const o = [];
842
- let u = r.slice();
843
- for (const d of r) {
844
- const T = o.find((m) => m.agent === d.agent);
845
- if (T) {
846
- if (T.dates.push(d.date), ti(o) > i) {
847
- T.dates.pop();
848
- break;
849
- }
850
- } else if (o.push({
851
- agent: d.agent,
852
- dates: [d.date]
853
- }), ti(o) > i) {
854
- o.pop();
855
- break;
856
- }
857
- u = u.slice(1);
858
- }
859
- return {
860
- heartbeatsToSend: o,
861
- unsentEntries: u
862
- };
863
- }
864
- class Rr {
865
- constructor(i) {
866
- this.app = i, this._canUseIndexedDBPromise = this.runIndexedDBEnvironmentCheck();
867
- }
868
- async runIndexedDBEnvironmentCheck() {
869
- return gs() ? ds().then(() => !0).catch(() => !1) : !1;
870
- }
871
- /**
872
- * Read all heartbeats.
873
- */
874
- async read() {
875
- if (await this._canUseIndexedDBPromise) {
876
- const o = await Tr(this.app);
877
- return o != null && o.heartbeats ? o : { heartbeats: [] };
878
- } else
879
- return { heartbeats: [] };
880
- }
881
- // overwrite the storage with the provided heartbeats
882
- async overwrite(i) {
883
- var o;
884
- if (await this._canUseIndexedDBPromise) {
885
- const d = await this.read();
886
- return qn(this.app, {
887
- lastSentHeartbeatDate: (o = i.lastSentHeartbeatDate) !== null && o !== void 0 ? o : d.lastSentHeartbeatDate,
888
- heartbeats: i.heartbeats
889
- });
890
- } else
891
- return;
892
- }
893
- // add heartbeats
894
- async add(i) {
895
- var o;
896
- if (await this._canUseIndexedDBPromise) {
897
- const d = await this.read();
898
- return qn(this.app, {
899
- lastSentHeartbeatDate: (o = i.lastSentHeartbeatDate) !== null && o !== void 0 ? o : d.lastSentHeartbeatDate,
900
- heartbeats: [
901
- ...d.heartbeats,
902
- ...i.heartbeats
903
- ]
904
- });
905
- } else
906
- return;
907
- }
908
- }
909
- function ti(r) {
910
- return di(
911
- // heartbeatsCache wrapper properties
912
- JSON.stringify({ version: 2, heartbeats: r })
913
- ).length;
914
- }
915
- function vr(r) {
916
- if (r.length === 0)
917
- return -1;
918
- let i = 0, o = r[0].date;
919
- for (let u = 1; u < r.length; u++)
920
- r[u].date < o && (o = r[u].date, i = u);
921
- return i;
922
- }
923
- /**
924
- * @license
925
- * Copyright 2019 Google LLC
926
- *
927
- * Licensed under the Apache License, Version 2.0 (the "License");
928
- * you may not use this file except in compliance with the License.
929
- * You may obtain a copy of the License at
930
- *
931
- * http://www.apache.org/licenses/LICENSE-2.0
932
- *
933
- * Unless required by applicable law or agreed to in writing, software
934
- * distributed under the License is distributed on an "AS IS" BASIS,
935
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
936
- * See the License for the specific language governing permissions and
937
- * limitations under the License.
938
- */
939
- function Ir(r) {
940
- re(new se(
941
- "platform-logger",
942
- (i) => new Ms(i),
943
- "PRIVATE"
944
- /* ComponentType.PRIVATE */
945
- )), re(new se(
946
- "heartbeat",
947
- (i) => new yr(i),
948
- "PRIVATE"
949
- /* ComponentType.PRIVATE */
950
- )), Tt(Ve, Xn, r), Tt(Ve, Xn, "esm2017"), Tt("fire-js", "");
951
- }
952
- Ir("");
953
- var Dr = "firebase", wr = "11.9.1";
954
- /**
955
- * @license
956
- * Copyright 2020 Google LLC
957
- *
958
- * Licensed under the Apache License, Version 2.0 (the "License");
959
- * you may not use this file except in compliance with the License.
960
- * You may obtain a copy of the License at
961
- *
962
- * http://www.apache.org/licenses/LICENSE-2.0
963
- *
964
- * Unless required by applicable law or agreed to in writing, software
965
- * distributed under the License is distributed on an "AS IS" BASIS,
966
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
967
- * See the License for the specific language governing permissions and
968
- * limitations under the License.
969
- */
970
- Tt(Dr, wr, "app");
971
- var ei = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
972
- /** @license
973
- Copyright The Closure Library Authors.
974
- SPDX-License-Identifier: Apache-2.0
975
- */
976
- var Ri;
977
- (function() {
978
- var r;
979
- /** @license
980
-
981
- Copyright The Closure Library Authors.
982
- SPDX-License-Identifier: Apache-2.0
983
- */
984
- function i(p, h) {
985
- function l() {
986
- }
987
- l.prototype = h.prototype, p.D = h.prototype, p.prototype = new l(), p.prototype.constructor = p, p.C = function(c, f, g) {
988
- for (var a = Array(arguments.length - 2), Z = 2; Z < arguments.length; Z++) a[Z - 2] = arguments[Z];
989
- return h.prototype[f].apply(c, a);
990
- };
991
- }
992
- function o() {
993
- this.blockSize = -1;
994
- }
995
- function u() {
996
- this.blockSize = -1, this.blockSize = 64, this.g = Array(4), this.B = Array(this.blockSize), this.o = this.h = 0, this.s();
997
- }
998
- i(u, o), u.prototype.s = function() {
999
- this.g[0] = 1732584193, this.g[1] = 4023233417, this.g[2] = 2562383102, this.g[3] = 271733878, this.o = this.h = 0;
1000
- };
1001
- function d(p, h, l) {
1002
- l || (l = 0);
1003
- var c = Array(16);
1004
- if (typeof h == "string") for (var f = 0; 16 > f; ++f) c[f] = h.charCodeAt(l++) | h.charCodeAt(l++) << 8 | h.charCodeAt(l++) << 16 | h.charCodeAt(l++) << 24;
1005
- else for (f = 0; 16 > f; ++f) c[f] = h[l++] | h[l++] << 8 | h[l++] << 16 | h[l++] << 24;
1006
- h = p.g[0], l = p.g[1], f = p.g[2];
1007
- var g = p.g[3], a = h + (g ^ l & (f ^ g)) + c[0] + 3614090360 & 4294967295;
1008
- h = l + (a << 7 & 4294967295 | a >>> 25), a = g + (f ^ h & (l ^ f)) + c[1] + 3905402710 & 4294967295, g = h + (a << 12 & 4294967295 | a >>> 20), a = f + (l ^ g & (h ^ l)) + c[2] + 606105819 & 4294967295, f = g + (a << 17 & 4294967295 | a >>> 15), a = l + (h ^ f & (g ^ h)) + c[3] + 3250441966 & 4294967295, l = f + (a << 22 & 4294967295 | a >>> 10), a = h + (g ^ l & (f ^ g)) + c[4] + 4118548399 & 4294967295, h = l + (a << 7 & 4294967295 | a >>> 25), a = g + (f ^ h & (l ^ f)) + c[5] + 1200080426 & 4294967295, g = h + (a << 12 & 4294967295 | a >>> 20), a = f + (l ^ g & (h ^ l)) + c[6] + 2821735955 & 4294967295, f = g + (a << 17 & 4294967295 | a >>> 15), a = l + (h ^ f & (g ^ h)) + c[7] + 4249261313 & 4294967295, l = f + (a << 22 & 4294967295 | a >>> 10), a = h + (g ^ l & (f ^ g)) + c[8] + 1770035416 & 4294967295, h = l + (a << 7 & 4294967295 | a >>> 25), a = g + (f ^ h & (l ^ f)) + c[9] + 2336552879 & 4294967295, g = h + (a << 12 & 4294967295 | a >>> 20), a = f + (l ^ g & (h ^ l)) + c[10] + 4294925233 & 4294967295, f = g + (a << 17 & 4294967295 | a >>> 15), a = l + (h ^ f & (g ^ h)) + c[11] + 2304563134 & 4294967295, l = f + (a << 22 & 4294967295 | a >>> 10), a = h + (g ^ l & (f ^ g)) + c[12] + 1804603682 & 4294967295, h = l + (a << 7 & 4294967295 | a >>> 25), a = g + (f ^ h & (l ^ f)) + c[13] + 4254626195 & 4294967295, g = h + (a << 12 & 4294967295 | a >>> 20), a = f + (l ^ g & (h ^ l)) + c[14] + 2792965006 & 4294967295, f = g + (a << 17 & 4294967295 | a >>> 15), a = l + (h ^ f & (g ^ h)) + c[15] + 1236535329 & 4294967295, l = f + (a << 22 & 4294967295 | a >>> 10), a = h + (f ^ g & (l ^ f)) + c[1] + 4129170786 & 4294967295, h = l + (a << 5 & 4294967295 | a >>> 27), a = g + (l ^ f & (h ^ l)) + c[6] + 3225465664 & 4294967295, g = h + (a << 9 & 4294967295 | a >>> 23), a = f + (h ^ l & (g ^ h)) + c[11] + 643717713 & 4294967295, f = g + (a << 14 & 4294967295 | a >>> 18), a = l + (g ^ h & (f ^ g)) + c[0] + 3921069994 & 4294967295, l = f + (a << 20 & 4294967295 | a >>> 12), a = h + (f ^ g & (l ^ f)) + c[5] + 3593408605 & 4294967295, h = l + (a << 5 & 4294967295 | a >>> 27), a = g + (l ^ f & (h ^ l)) + c[10] + 38016083 & 4294967295, g = h + (a << 9 & 4294967295 | a >>> 23), a = f + (h ^ l & (g ^ h)) + c[15] + 3634488961 & 4294967295, f = g + (a << 14 & 4294967295 | a >>> 18), a = l + (g ^ h & (f ^ g)) + c[4] + 3889429448 & 4294967295, l = f + (a << 20 & 4294967295 | a >>> 12), a = h + (f ^ g & (l ^ f)) + c[9] + 568446438 & 4294967295, h = l + (a << 5 & 4294967295 | a >>> 27), a = g + (l ^ f & (h ^ l)) + c[14] + 3275163606 & 4294967295, g = h + (a << 9 & 4294967295 | a >>> 23), a = f + (h ^ l & (g ^ h)) + c[3] + 4107603335 & 4294967295, f = g + (a << 14 & 4294967295 | a >>> 18), a = l + (g ^ h & (f ^ g)) + c[8] + 1163531501 & 4294967295, l = f + (a << 20 & 4294967295 | a >>> 12), a = h + (f ^ g & (l ^ f)) + c[13] + 2850285829 & 4294967295, h = l + (a << 5 & 4294967295 | a >>> 27), a = g + (l ^ f & (h ^ l)) + c[2] + 4243563512 & 4294967295, g = h + (a << 9 & 4294967295 | a >>> 23), a = f + (h ^ l & (g ^ h)) + c[7] + 1735328473 & 4294967295, f = g + (a << 14 & 4294967295 | a >>> 18), a = l + (g ^ h & (f ^ g)) + c[12] + 2368359562 & 4294967295, l = f + (a << 20 & 4294967295 | a >>> 12), a = h + (l ^ f ^ g) + c[5] + 4294588738 & 4294967295, h = l + (a << 4 & 4294967295 | a >>> 28), a = g + (h ^ l ^ f) + c[8] + 2272392833 & 4294967295, g = h + (a << 11 & 4294967295 | a >>> 21), a = f + (g ^ h ^ l) + c[11] + 1839030562 & 4294967295, f = g + (a << 16 & 4294967295 | a >>> 16), a = l + (f ^ g ^ h) + c[14] + 4259657740 & 4294967295, l = f + (a << 23 & 4294967295 | a >>> 9), a = h + (l ^ f ^ g) + c[1] + 2763975236 & 4294967295, h = l + (a << 4 & 4294967295 | a >>> 28), a = g + (h ^ l ^ f) + c[4] + 1272893353 & 4294967295, g = h + (a << 11 & 4294967295 | a >>> 21), a = f + (g ^ h ^ l) + c[7] + 4139469664 & 4294967295, f = g + (a << 16 & 4294967295 | a >>> 16), a = l + (f ^ g ^ h) + c[10] + 3200236656 & 4294967295, l = f + (a << 23 & 4294967295 | a >>> 9), a = h + (l ^ f ^ g) + c[13] + 681279174 & 4294967295, h = l + (a << 4 & 4294967295 | a >>> 28), a = g + (h ^ l ^ f) + c[0] + 3936430074 & 4294967295, g = h + (a << 11 & 4294967295 | a >>> 21), a = f + (g ^ h ^ l) + c[3] + 3572445317 & 4294967295, f = g + (a << 16 & 4294967295 | a >>> 16), a = l + (f ^ g ^ h) + c[6] + 76029189 & 4294967295, l = f + (a << 23 & 4294967295 | a >>> 9), a = h + (l ^ f ^ g) + c[9] + 3654602809 & 4294967295, h = l + (a << 4 & 4294967295 | a >>> 28), a = g + (h ^ l ^ f) + c[12] + 3873151461 & 4294967295, g = h + (a << 11 & 4294967295 | a >>> 21), a = f + (g ^ h ^ l) + c[15] + 530742520 & 4294967295, f = g + (a << 16 & 4294967295 | a >>> 16), a = l + (f ^ g ^ h) + c[2] + 3299628645 & 4294967295, l = f + (a << 23 & 4294967295 | a >>> 9), a = h + (f ^ (l | ~g)) + c[0] + 4096336452 & 4294967295, h = l + (a << 6 & 4294967295 | a >>> 26), a = g + (l ^ (h | ~f)) + c[7] + 1126891415 & 4294967295, g = h + (a << 10 & 4294967295 | a >>> 22), a = f + (h ^ (g | ~l)) + c[14] + 2878612391 & 4294967295, f = g + (a << 15 & 4294967295 | a >>> 17), a = l + (g ^ (f | ~h)) + c[5] + 4237533241 & 4294967295, l = f + (a << 21 & 4294967295 | a >>> 11), a = h + (f ^ (l | ~g)) + c[12] + 1700485571 & 4294967295, h = l + (a << 6 & 4294967295 | a >>> 26), a = g + (l ^ (h | ~f)) + c[3] + 2399980690 & 4294967295, g = h + (a << 10 & 4294967295 | a >>> 22), a = f + (h ^ (g | ~l)) + c[10] + 4293915773 & 4294967295, f = g + (a << 15 & 4294967295 | a >>> 17), a = l + (g ^ (f | ~h)) + c[1] + 2240044497 & 4294967295, l = f + (a << 21 & 4294967295 | a >>> 11), a = h + (f ^ (l | ~g)) + c[8] + 1873313359 & 4294967295, h = l + (a << 6 & 4294967295 | a >>> 26), a = g + (l ^ (h | ~f)) + c[15] + 4264355552 & 4294967295, g = h + (a << 10 & 4294967295 | a >>> 22), a = f + (h ^ (g | ~l)) + c[6] + 2734768916 & 4294967295, f = g + (a << 15 & 4294967295 | a >>> 17), a = l + (g ^ (f | ~h)) + c[13] + 1309151649 & 4294967295, l = f + (a << 21 & 4294967295 | a >>> 11), a = h + (f ^ (l | ~g)) + c[4] + 4149444226 & 4294967295, h = l + (a << 6 & 4294967295 | a >>> 26), a = g + (l ^ (h | ~f)) + c[11] + 3174756917 & 4294967295, g = h + (a << 10 & 4294967295 | a >>> 22), a = f + (h ^ (g | ~l)) + c[2] + 718787259 & 4294967295, f = g + (a << 15 & 4294967295 | a >>> 17), a = l + (g ^ (f | ~h)) + c[9] + 3951481745 & 4294967295, p.g[0] = p.g[0] + h & 4294967295, p.g[1] = p.g[1] + (f + (a << 21 & 4294967295 | a >>> 11)) & 4294967295, p.g[2] = p.g[2] + f & 4294967295, p.g[3] = p.g[3] + g & 4294967295;
1009
- }
1010
- u.prototype.u = function(p, h) {
1011
- h === void 0 && (h = p.length);
1012
- for (var l = h - this.blockSize, c = this.B, f = this.h, g = 0; g < h; ) {
1013
- if (f == 0) for (; g <= l; ) d(this, p, g), g += this.blockSize;
1014
- if (typeof p == "string") {
1015
- for (; g < h; )
1016
- if (c[f++] = p.charCodeAt(g++), f == this.blockSize) {
1017
- d(this, c), f = 0;
1018
- break;
1019
- }
1020
- } else for (; g < h; ) if (c[f++] = p[g++], f == this.blockSize) {
1021
- d(this, c), f = 0;
1022
- break;
1023
- }
1024
- }
1025
- this.h = f, this.o += h;
1026
- }, u.prototype.v = function() {
1027
- var p = Array((56 > this.h ? this.blockSize : 2 * this.blockSize) - this.h);
1028
- p[0] = 128;
1029
- for (var h = 1; h < p.length - 8; ++h) p[h] = 0;
1030
- var l = 8 * this.o;
1031
- for (h = p.length - 8; h < p.length; ++h) p[h] = l & 255, l /= 256;
1032
- for (this.u(p), p = Array(16), h = l = 0; 4 > h; ++h) for (var c = 0; 32 > c; c += 8) p[l++] = this.g[h] >>> c & 255;
1033
- return p;
1034
- };
1035
- function T(p, h) {
1036
- var l = y;
1037
- return Object.prototype.hasOwnProperty.call(l, p) ? l[p] : l[p] = h(p);
1038
- }
1039
- function m(p, h) {
1040
- this.h = h;
1041
- for (var l = [], c = !0, f = p.length - 1; 0 <= f; f--) {
1042
- var g = p[f] | 0;
1043
- c && g == h || (l[f] = g, c = !1);
1044
- }
1045
- this.g = l;
1046
- }
1047
- var y = {};
1048
- function A(p) {
1049
- return -128 <= p && 128 > p ? T(p, function(h) {
1050
- return new m([h | 0], 0 > h ? -1 : 0);
1051
- }) : new m([p | 0], 0 > p ? -1 : 0);
1052
- }
1053
- function R(p) {
1054
- if (isNaN(p) || !isFinite(p)) return j;
1055
- if (0 > p) return L(R(-p));
1056
- for (var h = [], l = 1, c = 0; p >= l; c++) h[c] = p / l | 0, l *= 4294967296;
1057
- return new m(h, 0);
1058
- }
1059
- function q(p, h) {
1060
- if (p.length == 0) throw Error("number format error: empty string");
1061
- if (h = h || 10, 2 > h || 36 < h) throw Error("radix out of range: " + h);
1062
- if (p.charAt(0) == "-") return L(q(p.substring(1), h));
1063
- if (0 <= p.indexOf("-")) throw Error('number format error: interior "-" character');
1064
- for (var l = R(Math.pow(h, 8)), c = j, f = 0; f < p.length; f += 8) {
1065
- var g = Math.min(8, p.length - f), a = parseInt(p.substring(f, f + g), h);
1066
- 8 > g ? (g = R(Math.pow(h, g)), c = c.j(g).add(R(a))) : (c = c.j(l), c = c.add(R(a)));
1067
- }
1068
- return c;
1069
- }
1070
- var j = A(0), N = A(1), Q = A(16777216);
1071
- r = m.prototype, r.m = function() {
1072
- if (b(this)) return -L(this).m();
1073
- for (var p = 0, h = 1, l = 0; l < this.g.length; l++) {
1074
- var c = this.i(l);
1075
- p += (0 <= c ? c : 4294967296 + c) * h, h *= 4294967296;
1076
- }
1077
- return p;
1078
- }, r.toString = function(p) {
1079
- if (p = p || 10, 2 > p || 36 < p) throw Error("radix out of range: " + p);
1080
- if (D(this)) return "0";
1081
- if (b(this)) return "-" + L(this).toString(p);
1082
- for (var h = R(Math.pow(p, 6)), l = this, c = ""; ; ) {
1083
- var f = it(l, h).g;
1084
- l = ft(l, f.j(h));
1085
- var g = ((0 < l.g.length ? l.g[0] : l.h) >>> 0).toString(p);
1086
- if (l = f, D(l)) return g + c;
1087
- for (; 6 > g.length; ) g = "0" + g;
1088
- c = g + c;
1089
- }
1090
- }, r.i = function(p) {
1091
- return 0 > p ? 0 : p < this.g.length ? this.g[p] : this.h;
1092
- };
1093
- function D(p) {
1094
- if (p.h != 0) return !1;
1095
- for (var h = 0; h < p.g.length; h++) if (p.g[h] != 0) return !1;
1096
- return !0;
1097
- }
1098
- function b(p) {
1099
- return p.h == -1;
1100
- }
1101
- r.l = function(p) {
1102
- return p = ft(this, p), b(p) ? -1 : D(p) ? 0 : 1;
1103
- };
1104
- function L(p) {
1105
- for (var h = p.g.length, l = [], c = 0; c < h; c++) l[c] = ~p.g[c];
1106
- return new m(l, ~p.h).add(N);
1107
- }
1108
- r.abs = function() {
1109
- return b(this) ? L(this) : this;
1110
- }, r.add = function(p) {
1111
- for (var h = Math.max(this.g.length, p.g.length), l = [], c = 0, f = 0; f <= h; f++) {
1112
- var g = c + (this.i(f) & 65535) + (p.i(f) & 65535), a = (g >>> 16) + (this.i(f) >>> 16) + (p.i(f) >>> 16);
1113
- c = a >>> 16, g &= 65535, a &= 65535, l[f] = a << 16 | g;
1114
- }
1115
- return new m(l, l[l.length - 1] & -2147483648 ? -1 : 0);
1116
- };
1117
- function ft(p, h) {
1118
- return p.add(L(h));
1119
- }
1120
- r.j = function(p) {
1121
- if (D(this) || D(p)) return j;
1122
- if (b(this)) return b(p) ? L(this).j(L(p)) : L(L(this).j(p));
1123
- if (b(p)) return L(this.j(L(p)));
1124
- if (0 > this.l(Q) && 0 > p.l(Q)) return R(this.m() * p.m());
1125
- for (var h = this.g.length + p.g.length, l = [], c = 0; c < 2 * h; c++) l[c] = 0;
1126
- for (c = 0; c < this.g.length; c++) for (var f = 0; f < p.g.length; f++) {
1127
- var g = this.i(c) >>> 16, a = this.i(c) & 65535, Z = p.i(f) >>> 16, St = p.i(f) & 65535;
1128
- l[2 * c + 2 * f] += a * St, z(l, 2 * c + 2 * f), l[2 * c + 2 * f + 1] += g * St, z(l, 2 * c + 2 * f + 1), l[2 * c + 2 * f + 1] += a * Z, z(l, 2 * c + 2 * f + 1), l[2 * c + 2 * f + 2] += g * Z, z(l, 2 * c + 2 * f + 2);
1129
- }
1130
- for (c = 0; c < h; c++) l[c] = l[2 * c + 1] << 16 | l[2 * c];
1131
- for (c = h; c < 2 * h; c++) l[c] = 0;
1132
- return new m(l, 0);
1133
- };
1134
- function z(p, h) {
1135
- for (; (p[h] & 65535) != p[h]; ) p[h + 1] += p[h] >>> 16, p[h] &= 65535, h++;
1136
- }
1137
- function G(p, h) {
1138
- this.g = p, this.h = h;
1139
- }
1140
- function it(p, h) {
1141
- if (D(h)) throw Error("division by zero");
1142
- if (D(p)) return new G(j, j);
1143
- if (b(p)) return h = it(L(p), h), new G(L(h.g), L(h.h));
1144
- if (b(h)) return h = it(p, L(h)), new G(L(h.g), h.h);
1145
- if (30 < p.g.length) {
1146
- if (b(p) || b(h)) throw Error("slowDivide_ only works with positive integers.");
1147
- for (var l = N, c = h; 0 >= c.l(p); ) l = Ht(l), c = Ht(c);
1148
- var f = J(l, 1), g = J(c, 1);
1149
- for (c = J(c, 2), l = J(l, 2); !D(c); ) {
1150
- var a = g.add(c);
1151
- 0 >= a.l(p) && (f = f.add(l), g = a), c = J(c, 1), l = J(l, 1);
1152
- }
1153
- return h = ft(p, f.j(h)), new G(f, h);
1154
- }
1155
- for (f = j; 0 <= p.l(h); ) {
1156
- for (l = Math.max(1, Math.floor(p.m() / h.m())), c = Math.ceil(Math.log(l) / Math.LN2), c = 48 >= c ? 1 : Math.pow(2, c - 48), g = R(l), a = g.j(h); b(a) || 0 < a.l(p); ) l -= c, g = R(l), a = g.j(h);
1157
- D(g) && (g = N), f = f.add(g), p = ft(p, a);
1158
- }
1159
- return new G(f, p);
1160
- }
1161
- r.A = function(p) {
1162
- return it(this, p).h;
1163
- }, r.and = function(p) {
1164
- for (var h = Math.max(this.g.length, p.g.length), l = [], c = 0; c < h; c++) l[c] = this.i(c) & p.i(c);
1165
- return new m(l, this.h & p.h);
1166
- }, r.or = function(p) {
1167
- for (var h = Math.max(this.g.length, p.g.length), l = [], c = 0; c < h; c++) l[c] = this.i(c) | p.i(c);
1168
- return new m(l, this.h | p.h);
1169
- }, r.xor = function(p) {
1170
- for (var h = Math.max(this.g.length, p.g.length), l = [], c = 0; c < h; c++) l[c] = this.i(c) ^ p.i(c);
1171
- return new m(l, this.h ^ p.h);
1172
- };
1173
- function Ht(p) {
1174
- for (var h = p.g.length + 1, l = [], c = 0; c < h; c++) l[c] = p.i(c) << 1 | p.i(c - 1) >>> 31;
1175
- return new m(l, p.h);
1176
- }
1177
- function J(p, h) {
1178
- var l = h >> 5;
1179
- h %= 32;
1180
- for (var c = p.g.length - l, f = [], g = 0; g < c; g++) f[g] = 0 < h ? p.i(g + l) >>> h | p.i(g + l + 1) << 32 - h : p.i(g + l);
1181
- return new m(f, p.h);
1182
- }
1183
- u.prototype.digest = u.prototype.v, u.prototype.reset = u.prototype.s, u.prototype.update = u.prototype.u, m.prototype.add = m.prototype.add, m.prototype.multiply = m.prototype.j, m.prototype.modulo = m.prototype.A, m.prototype.compare = m.prototype.l, m.prototype.toNumber = m.prototype.m, m.prototype.toString = m.prototype.toString, m.prototype.getBits = m.prototype.i, m.fromNumber = R, m.fromString = q, Ri = m;
1184
- }).apply(typeof ei < "u" ? ei : typeof self < "u" ? self : typeof window < "u" ? window : {});
1185
- var ie = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
1186
- (function() {
1187
- var r, i = typeof Object.defineProperties == "function" ? Object.defineProperty : function(t, e, n) {
1188
- return t == Array.prototype || t == Object.prototype || (t[e] = n.value), t;
1189
- };
1190
- function o(t) {
1191
- t = [typeof globalThis == "object" && globalThis, t, typeof window == "object" && window, typeof self == "object" && self, typeof ie == "object" && ie];
1192
- for (var e = 0; e < t.length; ++e) {
1193
- var n = t[e];
1194
- if (n && n.Math == Math) return n;
1195
- }
1196
- throw Error("Cannot find global object");
1197
- }
1198
- var u = o(this);
1199
- function d(t, e) {
1200
- if (e) t: {
1201
- var n = u;
1202
- t = t.split(".");
1203
- for (var s = 0; s < t.length - 1; s++) {
1204
- var E = t[s];
1205
- if (!(E in n)) break t;
1206
- n = n[E];
1207
- }
1208
- t = t[t.length - 1], s = n[t], e = e(s), e != s && e != null && i(n, t, { configurable: !0, writable: !0, value: e });
1209
- }
1210
- }
1211
- function T(t, e) {
1212
- t instanceof String && (t += "");
1213
- var n = 0, s = !1, E = { next: function() {
1214
- if (!s && n < t.length) {
1215
- var _ = n++;
1216
- return { value: e(_, t[_]), done: !1 };
1217
- }
1218
- return s = !0, { done: !0, value: void 0 };
1219
- } };
1220
- return E[Symbol.iterator] = function() {
1221
- return E;
1222
- }, E;
1223
- }
1224
- d("Array.prototype.values", function(t) {
1225
- return t || function() {
1226
- return T(this, function(e, n) {
1227
- return n;
1228
- });
1229
- };
1230
- });
1231
- /** @license
1232
-
1233
- Copyright The Closure Library Authors.
1234
- SPDX-License-Identifier: Apache-2.0
1235
- */
1236
- var m = m || {}, y = this || self;
1237
- function A(t) {
1238
- var e = typeof t;
1239
- return e = e != "object" ? e : t ? Array.isArray(t) ? "array" : e : "null", e == "array" || e == "object" && typeof t.length == "number";
1240
- }
1241
- function R(t) {
1242
- var e = typeof t;
1243
- return e == "object" && t != null || e == "function";
1244
- }
1245
- function q(t, e, n) {
1246
- return t.call.apply(t.bind, arguments);
1247
- }
1248
- function j(t, e, n) {
1249
- if (!t) throw Error();
1250
- if (2 < arguments.length) {
1251
- var s = Array.prototype.slice.call(arguments, 2);
1252
- return function() {
1253
- var E = Array.prototype.slice.call(arguments);
1254
- return Array.prototype.unshift.apply(E, s), t.apply(e, E);
1255
- };
1256
- }
1257
- return function() {
1258
- return t.apply(e, arguments);
1259
- };
1260
- }
1261
- function N(t, e, n) {
1262
- return N = Function.prototype.bind && Function.prototype.bind.toString().indexOf("native code") != -1 ? q : j, N.apply(null, arguments);
1263
- }
1264
- function Q(t, e) {
1265
- var n = Array.prototype.slice.call(arguments, 1);
1266
- return function() {
1267
- var s = n.slice();
1268
- return s.push.apply(s, arguments), t.apply(this, s);
1269
- };
1270
- }
1271
- function D(t, e) {
1272
- function n() {
1273
- }
1274
- n.prototype = e.prototype, t.aa = e.prototype, t.prototype = new n(), t.prototype.constructor = t, t.Qb = function(s, E, _) {
1275
- for (var S = Array(arguments.length - 2), w = 2; w < arguments.length; w++) S[w - 2] = arguments[w];
1276
- return e.prototype[E].apply(s, S);
1277
- };
1278
- }
1279
- function b(t) {
1280
- const e = t.length;
1281
- if (0 < e) {
1282
- const n = Array(e);
1283
- for (let s = 0; s < e; s++) n[s] = t[s];
1284
- return n;
1285
- }
1286
- return [];
1287
- }
1288
- function L(t, e) {
1289
- for (let n = 1; n < arguments.length; n++) {
1290
- const s = arguments[n];
1291
- if (A(s)) {
1292
- const E = t.length || 0, _ = s.length || 0;
1293
- t.length = E + _;
1294
- for (let S = 0; S < _; S++) t[E + S] = s[S];
1295
- } else t.push(s);
1296
- }
1297
- }
1298
- class ft {
1299
- constructor(e, n) {
1300
- this.i = e, this.j = n, this.h = 0, this.g = null;
1301
- }
1302
- get() {
1303
- let e;
1304
- return 0 < this.h ? (this.h--, e = this.g, this.g = e.next, e.next = null) : e = this.i(), e;
1305
- }
1306
- }
1307
- function z(t) {
1308
- return /^[\s\xa0]*$/.test(t);
1309
- }
1310
- function G() {
1311
- var t = y.navigator;
1312
- return t && (t = t.userAgent) ? t : "";
1313
- }
1314
- function it(t) {
1315
- return it[" "](t), t;
1316
- }
1317
- it[" "] = function() {
1318
- };
1319
- var Ht = G().indexOf("Gecko") != -1 && !(G().toLowerCase().indexOf("webkit") != -1 && G().indexOf("Edge") == -1) && !(G().indexOf("Trident") != -1 || G().indexOf("MSIE") != -1) && G().indexOf("Edge") == -1;
1320
- function J(t, e, n) {
1321
- for (const s in t) e.call(n, t[s], s, t);
1322
- }
1323
- function p(t, e) {
1324
- for (const n in t) e.call(void 0, t[n], n, t);
1325
- }
1326
- function h(t) {
1327
- const e = {};
1328
- for (const n in t) e[n] = t[n];
1329
- return e;
1330
- }
1331
- const l = "constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");
1332
- function c(t, e) {
1333
- let n, s;
1334
- for (let E = 1; E < arguments.length; E++) {
1335
- s = arguments[E];
1336
- for (n in s) t[n] = s[n];
1337
- for (let _ = 0; _ < l.length; _++) n = l[_], Object.prototype.hasOwnProperty.call(s, n) && (t[n] = s[n]);
1338
- }
1339
- }
1340
- function f(t) {
1341
- var e = 1;
1342
- t = t.split(":");
1343
- const n = [];
1344
- for (; 0 < e && t.length; ) n.push(t.shift()), e--;
1345
- return t.length && n.push(t.join(":")), n;
1346
- }
1347
- function g(t) {
1348
- y.setTimeout(() => {
1349
- throw t;
1350
- }, 0);
1351
- }
1352
- function a() {
1353
- var t = le;
1354
- let e = null;
1355
- return t.g && (e = t.g, t.g = t.g.next, t.g || (t.h = null), e.next = null), e;
1356
- }
1357
- class Z {
1358
- constructor() {
1359
- this.h = this.g = null;
1360
- }
1361
- add(e, n) {
1362
- const s = St.get();
1363
- s.set(e, n), this.h ? this.h.next = s : this.g = s, this.h = s;
1364
- }
1365
- }
1366
- var St = new ft(() => new wi(), (t) => t.reset());
1367
- class wi {
1368
- constructor() {
1369
- this.next = this.g = this.h = null;
1370
- }
1371
- set(e, n) {
1372
- this.h = e, this.g = n, this.next = null;
1373
- }
1374
- reset() {
1375
- this.next = this.g = this.h = null;
1376
- }
1377
- }
1378
- let yt, At = !1, le = new Z(), Ye = () => {
1379
- const t = y.Promise.resolve(void 0);
1380
- yt = () => {
1381
- t.then(Ci);
1382
- };
1383
- };
1384
- var Ci = () => {
1385
- for (var t; t = a(); ) {
1386
- try {
1387
- t.h.call(t.g);
1388
- } catch (n) {
1389
- g(n);
1390
- }
1391
- var e = St;
1392
- e.j(t), 100 > e.h && (e.h++, t.next = e.g, e.g = t);
1393
- }
1394
- At = !1;
1395
- };
1396
- function st() {
1397
- this.s = this.s, this.C = this.C;
1398
- }
1399
- st.prototype.s = !1, st.prototype.ma = function() {
1400
- this.s || (this.s = !0, this.N());
1401
- }, st.prototype.N = function() {
1402
- if (this.C) for (; this.C.length; ) this.C.shift()();
1403
- };
1404
- function M(t, e) {
1405
- this.type = t, this.g = this.target = e, this.defaultPrevented = !1;
1406
- }
1407
- M.prototype.h = function() {
1408
- this.defaultPrevented = !0;
1409
- };
1410
- var Oi = function() {
1411
- if (!y.addEventListener || !Object.defineProperty) return !1;
1412
- var t = !1, e = Object.defineProperty({}, "passive", { get: function() {
1413
- t = !0;
1414
- } });
1415
- try {
1416
- const n = () => {
1417
- };
1418
- y.addEventListener("test", n, e), y.removeEventListener("test", n, e);
1419
- } catch {
1420
- }
1421
- return t;
1422
- }();
1423
- function Rt(t, e) {
1424
- if (M.call(this, t ? t.type : ""), this.relatedTarget = this.g = this.target = null, this.button = this.screenY = this.screenX = this.clientY = this.clientX = 0, this.key = "", this.metaKey = this.shiftKey = this.altKey = this.ctrlKey = !1, this.state = null, this.pointerId = 0, this.pointerType = "", this.i = null, t) {
1425
- var n = this.type = t.type, s = t.changedTouches && t.changedTouches.length ? t.changedTouches[0] : null;
1426
- if (this.target = t.target || t.srcElement, this.g = e, e = t.relatedTarget) {
1427
- if (Ht) {
1428
- t: {
1429
- try {
1430
- it(e.nodeName);
1431
- var E = !0;
1432
- break t;
1433
- } catch {
1434
- }
1435
- E = !1;
1436
- }
1437
- E || (e = null);
1438
- }
1439
- } else n == "mouseover" ? e = t.fromElement : n == "mouseout" && (e = t.toElement);
1440
- this.relatedTarget = e, s ? (this.clientX = s.clientX !== void 0 ? s.clientX : s.pageX, this.clientY = s.clientY !== void 0 ? s.clientY : s.pageY, this.screenX = s.screenX || 0, this.screenY = s.screenY || 0) : (this.clientX = t.clientX !== void 0 ? t.clientX : t.pageX, this.clientY = t.clientY !== void 0 ? t.clientY : t.pageY, this.screenX = t.screenX || 0, this.screenY = t.screenY || 0), this.button = t.button, this.key = t.key || "", this.ctrlKey = t.ctrlKey, this.altKey = t.altKey, this.shiftKey = t.shiftKey, this.metaKey = t.metaKey, this.pointerId = t.pointerId || 0, this.pointerType = typeof t.pointerType == "string" ? t.pointerType : Ni[t.pointerType] || "", this.state = t.state, this.i = t, t.defaultPrevented && Rt.aa.h.call(this);
1441
- }
1442
- }
1443
- D(Rt, M);
1444
- var Ni = { 2: "touch", 3: "pen", 4: "mouse" };
1445
- Rt.prototype.h = function() {
1446
- Rt.aa.h.call(this);
1447
- var t = this.i;
1448
- t.preventDefault ? t.preventDefault() : t.returnValue = !1;
1449
- };
1450
- var jt = "closure_listenable_" + (1e6 * Math.random() | 0), Ui = 0;
1451
- function Li(t, e, n, s, E) {
1452
- this.listener = t, this.proxy = null, this.src = e, this.type = n, this.capture = !!s, this.ha = E, this.key = ++Ui, this.da = this.fa = !1;
1453
- }
1454
- function Vt(t) {
1455
- t.da = !0, t.listener = null, t.proxy = null, t.src = null, t.ha = null;
1456
- }
1457
- function Qt(t) {
1458
- this.src = t, this.g = {}, this.h = 0;
1459
- }
1460
- Qt.prototype.add = function(t, e, n, s, E) {
1461
- var _ = t.toString();
1462
- t = this.g[_], t || (t = this.g[_] = [], this.h++);
1463
- var S = ue(t, e, s, E);
1464
- return -1 < S ? (e = t[S], n || (e.fa = !1)) : (e = new Li(e, this.src, _, !!s, E), e.fa = n, t.push(e)), e;
1465
- };
1466
- function ce(t, e) {
1467
- var n = e.type;
1468
- if (n in t.g) {
1469
- var s = t.g[n], E = Array.prototype.indexOf.call(s, e, void 0), _;
1470
- (_ = 0 <= E) && Array.prototype.splice.call(s, E, 1), _ && (Vt(e), t.g[n].length == 0 && (delete t.g[n], t.h--));
1471
- }
1472
- }
1473
- function ue(t, e, n, s) {
1474
- for (var E = 0; E < t.length; ++E) {
1475
- var _ = t[E];
1476
- if (!_.da && _.listener == e && _.capture == !!n && _.ha == s) return E;
1477
- }
1478
- return -1;
1479
- }
1480
- var fe = "closure_lm_" + (1e6 * Math.random() | 0), pe = {};
1481
- function Ke(t, e, n, s, E) {
1482
- if (Array.isArray(e)) {
1483
- for (var _ = 0; _ < e.length; _++) Ke(t, e[_], n, s, E);
1484
- return null;
1485
- }
1486
- return n = ze(n), t && t[jt] ? t.K(e, n, R(s) ? !!s.capture : !!s, E) : Pi(t, e, n, !1, s, E);
1487
- }
1488
- function Pi(t, e, n, s, E, _) {
1489
- if (!e) throw Error("Invalid event type");
1490
- var S = R(E) ? !!E.capture : !!E, w = ge(t);
1491
- if (w || (t[fe] = w = new Qt(t)), n = w.add(e, n, s, S, _), n.proxy) return n;
1492
- if (s = bi(), n.proxy = s, s.src = t, s.listener = n, t.addEventListener) Oi || (E = S), E === void 0 && (E = !1), t.addEventListener(e.toString(), s, E);
1493
- else if (t.attachEvent) t.attachEvent(Xe(e.toString()), s);
1494
- else if (t.addListener && t.removeListener) t.addListener(s);
1495
- else throw Error("addEventListener and attachEvent are unavailable.");
1496
- return n;
1497
- }
1498
- function bi() {
1499
- function t(n) {
1500
- return e.call(t.src, t.listener, n);
1501
- }
1502
- const e = Mi;
1503
- return t;
1504
- }
1505
- function We(t, e, n, s, E) {
1506
- if (Array.isArray(e)) for (var _ = 0; _ < e.length; _++) We(t, e[_], n, s, E);
1507
- else s = R(s) ? !!s.capture : !!s, n = ze(n), t && t[jt] ? (t = t.i, e = String(e).toString(), e in t.g && (_ = t.g[e], n = ue(_, n, s, E), -1 < n && (Vt(_[n]), Array.prototype.splice.call(_, n, 1), _.length == 0 && (delete t.g[e], t.h--)))) : t && (t = ge(t)) && (e = t.g[e.toString()], t = -1, e && (t = ue(e, n, s, E)), (n = -1 < t ? e[t] : null) && Ee(n));
1508
- }
1509
- function Ee(t) {
1510
- if (typeof t != "number" && t && !t.da) {
1511
- var e = t.src;
1512
- if (e && e[jt]) ce(e.i, t);
1513
- else {
1514
- var n = t.type, s = t.proxy;
1515
- e.removeEventListener ? e.removeEventListener(n, s, t.capture) : e.detachEvent ? e.detachEvent(Xe(n), s) : e.addListener && e.removeListener && e.removeListener(s), (n = ge(e)) ? (ce(n, t), n.h == 0 && (n.src = null, e[fe] = null)) : Vt(t);
1516
- }
1517
- }
1518
- }
1519
- function Xe(t) {
1520
- return t in pe ? pe[t] : pe[t] = "on" + t;
1521
- }
1522
- function Mi(t, e) {
1523
- if (t.da) t = !0;
1524
- else {
1525
- e = new Rt(e, this);
1526
- var n = t.listener, s = t.ha || t.src;
1527
- t.fa && Ee(t), t = n.call(s, e);
1528
- }
1529
- return t;
1530
- }
1531
- function ge(t) {
1532
- return t = t[fe], t instanceof Qt ? t : null;
1533
- }
1534
- var de = "__closure_events_fn_" + (1e9 * Math.random() >>> 0);
1535
- function ze(t) {
1536
- return typeof t == "function" ? t : (t[de] || (t[de] = function(e) {
1537
- return t.handleEvent(e);
1538
- }), t[de]);
1539
- }
1540
- function B() {
1541
- st.call(this), this.i = new Qt(this), this.M = this, this.F = null;
1542
- }
1543
- D(B, st), B.prototype[jt] = !0, B.prototype.removeEventListener = function(t, e, n, s) {
1544
- We(this, t, e, n, s);
1545
- };
1546
- function F(t, e) {
1547
- var n, s = t.F;
1548
- if (s) for (n = []; s; s = s.F) n.push(s);
1549
- if (t = t.M, s = e.type || e, typeof e == "string") e = new M(e, t);
1550
- else if (e instanceof M) e.target = e.target || t;
1551
- else {
1552
- var E = e;
1553
- e = new M(s, t), c(e, E);
1554
- }
1555
- if (E = !0, n) for (var _ = n.length - 1; 0 <= _; _--) {
1556
- var S = e.g = n[_];
1557
- E = Gt(S, s, !0, e) && E;
1558
- }
1559
- if (S = e.g = t, E = Gt(S, s, !0, e) && E, E = Gt(S, s, !1, e) && E, n) for (_ = 0; _ < n.length; _++) S = e.g = n[_], E = Gt(S, s, !1, e) && E;
1560
- }
1561
- B.prototype.N = function() {
1562
- if (B.aa.N.call(this), this.i) {
1563
- var t = this.i, e;
1564
- for (e in t.g) {
1565
- for (var n = t.g[e], s = 0; s < n.length; s++) Vt(n[s]);
1566
- delete t.g[e], t.h--;
1567
- }
1568
- }
1569
- this.F = null;
1570
- }, B.prototype.K = function(t, e, n, s) {
1571
- return this.i.add(String(t), e, !1, n, s);
1572
- }, B.prototype.L = function(t, e, n, s) {
1573
- return this.i.add(String(t), e, !0, n, s);
1574
- };
1575
- function Gt(t, e, n, s) {
1576
- if (e = t.i.g[String(e)], !e) return !0;
1577
- e = e.concat();
1578
- for (var E = !0, _ = 0; _ < e.length; ++_) {
1579
- var S = e[_];
1580
- if (S && !S.da && S.capture == n) {
1581
- var w = S.listener, P = S.ha || S.src;
1582
- S.fa && ce(t.i, S), E = w.call(P, s) !== !1 && E;
1583
- }
1584
- }
1585
- return E && !s.defaultPrevented;
1586
- }
1587
- function Je(t, e, n) {
1588
- if (typeof t == "function") n && (t = N(t, n));
1589
- else if (t && typeof t.handleEvent == "function") t = N(t.handleEvent, t);
1590
- else throw Error("Invalid listener argument");
1591
- return 2147483647 < Number(e) ? -1 : y.setTimeout(t, e || 0);
1592
- }
1593
- function qe(t) {
1594
- t.g = Je(() => {
1595
- t.g = null, t.i && (t.i = !1, qe(t));
1596
- }, t.l);
1597
- const e = t.h;
1598
- t.h = null, t.m.apply(null, e);
1599
- }
1600
- class Bi extends st {
1601
- constructor(e, n) {
1602
- super(), this.m = e, this.l = n, this.h = null, this.i = !1, this.g = null;
1603
- }
1604
- j(e) {
1605
- this.h = arguments, this.g ? this.i = !0 : qe(this);
1606
- }
1607
- N() {
1608
- super.N(), this.g && (y.clearTimeout(this.g), this.g = null, this.i = !1, this.h = null);
1609
- }
1610
- }
1611
- function vt(t) {
1612
- st.call(this), this.h = t, this.g = {};
1613
- }
1614
- D(vt, st);
1615
- var Ze = [];
1616
- function tn(t) {
1617
- J(t.g, function(e, n) {
1618
- this.g.hasOwnProperty(n) && Ee(e);
1619
- }, t), t.g = {};
1620
- }
1621
- vt.prototype.N = function() {
1622
- vt.aa.N.call(this), tn(this);
1623
- }, vt.prototype.handleEvent = function() {
1624
- throw Error("EventHandler.handleEvent not implemented");
1625
- };
1626
- var _e = y.JSON.stringify, xi = y.JSON.parse, ki = class {
1627
- stringify(t) {
1628
- return y.JSON.stringify(t, void 0);
1629
- }
1630
- parse(t) {
1631
- return y.JSON.parse(t, void 0);
1632
- }
1633
- };
1634
- function Te() {
1635
- }
1636
- Te.prototype.h = null;
1637
- function en(t) {
1638
- return t.h || (t.h = t.i());
1639
- }
1640
- function Fi() {
1641
- }
1642
- var It = { OPEN: "a", kb: "b", Ja: "c", wb: "d" };
1643
- function me() {
1644
- M.call(this, "d");
1645
- }
1646
- D(me, M);
1647
- function Se() {
1648
- M.call(this, "c");
1649
- }
1650
- D(Se, M);
1651
- var pt = {}, nn = null;
1652
- function ye() {
1653
- return nn = nn || new B();
1654
- }
1655
- pt.La = "serverreachability";
1656
- function sn(t) {
1657
- M.call(this, pt.La, t);
1658
- }
1659
- D(sn, M);
1660
- function Dt(t) {
1661
- const e = ye();
1662
- F(e, new sn(e));
1663
- }
1664
- pt.STAT_EVENT = "statevent";
1665
- function rn(t, e) {
1666
- M.call(this, pt.STAT_EVENT, t), this.stat = e;
1667
- }
1668
- D(rn, M);
1669
- function H(t) {
1670
- const e = ye();
1671
- F(e, new rn(e, t));
1672
- }
1673
- pt.Ma = "timingevent";
1674
- function on(t, e) {
1675
- M.call(this, pt.Ma, t), this.size = e;
1676
- }
1677
- D(on, M);
1678
- function wt(t, e) {
1679
- if (typeof t != "function") throw Error("Fn must not be null and must be a function");
1680
- return y.setTimeout(function() {
1681
- t();
1682
- }, e);
1683
- }
1684
- function Ct() {
1685
- this.g = !0;
1686
- }
1687
- Ct.prototype.xa = function() {
1688
- this.g = !1;
1689
- };
1690
- function Hi(t, e, n, s, E, _) {
1691
- t.info(function() {
1692
- if (t.g) if (_)
1693
- for (var S = "", w = _.split("&"), P = 0; P < w.length; P++) {
1694
- var I = w[P].split("=");
1695
- if (1 < I.length) {
1696
- var x = I[0];
1697
- I = I[1];
1698
- var k = x.split("_");
1699
- S = 2 <= k.length && k[1] == "type" ? S + (x + "=" + I + "&") : S + (x + "=redacted&");
1700
- }
1701
- }
1702
- else S = null;
1703
- else S = _;
1704
- return "XMLHTTP REQ (" + s + ") [attempt " + E + "]: " + e + `
1705
- ` + n + `
1706
- ` + S;
1707
- });
1708
- }
1709
- function ji(t, e, n, s, E, _, S) {
1710
- t.info(function() {
1711
- return "XMLHTTP RESP (" + s + ") [ attempt " + E + "]: " + e + `
1712
- ` + n + `
1713
- ` + _ + " " + S;
1714
- });
1715
- }
1716
- function Et(t, e, n, s) {
1717
- t.info(function() {
1718
- return "XMLHTTP TEXT (" + e + "): " + Qi(t, n) + (s ? " " + s : "");
1719
- });
1720
- }
1721
- function Vi(t, e) {
1722
- t.info(function() {
1723
- return "TIMEOUT: " + e;
1724
- });
1725
- }
1726
- Ct.prototype.info = function() {
1727
- };
1728
- function Qi(t, e) {
1729
- if (!t.g) return e;
1730
- if (!e) return null;
1731
- try {
1732
- var n = JSON.parse(e);
1733
- if (n) {
1734
- for (t = 0; t < n.length; t++) if (Array.isArray(n[t])) {
1735
- var s = n[t];
1736
- if (!(2 > s.length)) {
1737
- var E = s[1];
1738
- if (Array.isArray(E) && !(1 > E.length)) {
1739
- var _ = E[0];
1740
- if (_ != "noop" && _ != "stop" && _ != "close") for (var S = 1; S < E.length; S++) E[S] = "";
1741
- }
1742
- }
1743
- }
1744
- }
1745
- return _e(n);
1746
- } catch {
1747
- return e;
1748
- }
1749
- }
1750
- var Ae = { NO_ERROR: 0, gb: 1, tb: 2, sb: 3, nb: 4, rb: 5, ub: 6, Ia: 7, TIMEOUT: 8, xb: 9 }, Gi = { lb: "complete", Hb: "success", Ja: "error", Ia: "abort", zb: "ready", Ab: "readystatechange", TIMEOUT: "timeout", vb: "incrementaldata", yb: "progress", ob: "downloadprogress", Pb: "uploadprogress" }, Re;
1751
- function $t() {
1752
- }
1753
- D($t, Te), $t.prototype.g = function() {
1754
- return new XMLHttpRequest();
1755
- }, $t.prototype.i = function() {
1756
- return {};
1757
- }, Re = new $t();
1758
- function rt(t, e, n, s) {
1759
- this.j = t, this.i = e, this.l = n, this.R = s || 1, this.U = new vt(this), this.I = 45e3, this.H = null, this.o = !1, this.m = this.A = this.v = this.L = this.F = this.S = this.B = null, this.D = [], this.g = null, this.C = 0, this.s = this.u = null, this.X = -1, this.J = !1, this.O = 0, this.M = null, this.W = this.K = this.T = this.P = !1, this.h = new hn();
1760
- }
1761
- function hn() {
1762
- this.i = null, this.g = "", this.h = !1;
1763
- }
1764
- var an = {}, ve = {};
1765
- function Ie(t, e, n) {
1766
- t.L = 1, t.v = Xt(tt(e)), t.m = n, t.P = !0, ln(t, null);
1767
- }
1768
- function ln(t, e) {
1769
- t.F = Date.now(), Yt(t), t.A = tt(t.v);
1770
- var n = t.A, s = t.R;
1771
- Array.isArray(s) || (s = [String(s)]), Rn(n.i, "t", s), t.C = 0, n = t.j.J, t.h = new hn(), t.g = jn(t.j, n ? e : null, !t.m), 0 < t.O && (t.M = new Bi(N(t.Y, t, t.g), t.O)), e = t.U, n = t.g, s = t.ca;
1772
- var E = "readystatechange";
1773
- Array.isArray(E) || (E && (Ze[0] = E.toString()), E = Ze);
1774
- for (var _ = 0; _ < E.length; _++) {
1775
- var S = Ke(n, E[_], s || e.handleEvent, !1, e.h || e);
1776
- if (!S) break;
1777
- e.g[S.key] = S;
1778
- }
1779
- e = t.H ? h(t.H) : {}, t.m ? (t.u || (t.u = "POST"), e["Content-Type"] = "application/x-www-form-urlencoded", t.g.ea(
1780
- t.A,
1781
- t.u,
1782
- t.m,
1783
- e
1784
- )) : (t.u = "GET", t.g.ea(t.A, t.u, null, e)), Dt(), Hi(t.i, t.u, t.A, t.l, t.R, t.m);
1785
- }
1786
- rt.prototype.ca = function(t) {
1787
- t = t.target;
1788
- const e = this.M;
1789
- e && et(t) == 3 ? e.j() : this.Y(t);
1790
- }, rt.prototype.Y = function(t) {
1791
- try {
1792
- if (t == this.g) t: {
1793
- const k = et(this.g);
1794
- var e = this.g.Ba();
1795
- const _t = this.g.Z();
1796
- if (!(3 > k) && (k != 3 || this.g && (this.h.h || this.g.oa() || Nn(this.g)))) {
1797
- this.J || k != 4 || e == 7 || (e == 8 || 0 >= _t ? Dt(3) : Dt(2)), De(this);
1798
- var n = this.g.Z();
1799
- this.X = n;
1800
- e: if (cn(this)) {
1801
- var s = Nn(this.g);
1802
- t = "";
1803
- var E = s.length, _ = et(this.g) == 4;
1804
- if (!this.h.i) {
1805
- if (typeof TextDecoder > "u") {
1806
- lt(this), Ot(this);
1807
- var S = "";
1808
- break e;
1809
- }
1810
- this.h.i = new y.TextDecoder();
1811
- }
1812
- for (e = 0; e < E; e++) this.h.h = !0, t += this.h.i.decode(s[e], { stream: !(_ && e == E - 1) });
1813
- s.length = 0, this.h.g += t, this.C = 0, S = this.h.g;
1814
- } else S = this.g.oa();
1815
- if (this.o = n == 200, ji(this.i, this.u, this.A, this.l, this.R, k, n), this.o) {
1816
- if (this.T && !this.K) {
1817
- e: {
1818
- if (this.g) {
1819
- var w, P = this.g;
1820
- if ((w = P.g ? P.g.getResponseHeader("X-HTTP-Initial-Response") : null) && !z(w)) {
1821
- var I = w;
1822
- break e;
1823
- }
1824
- }
1825
- I = null;
1826
- }
1827
- if (n = I) Et(this.i, this.l, n, "Initial handshake response via X-HTTP-Initial-Response"), this.K = !0, we(this, n);
1828
- else {
1829
- this.o = !1, this.s = 3, H(12), lt(this), Ot(this);
1830
- break t;
1831
- }
1832
- }
1833
- if (this.P) {
1834
- n = !0;
1835
- let Y;
1836
- for (; !this.J && this.C < S.length; ) if (Y = $i(this, S), Y == ve) {
1837
- k == 4 && (this.s = 4, H(14), n = !1), Et(this.i, this.l, null, "[Incomplete Response]");
1838
- break;
1839
- } else if (Y == an) {
1840
- this.s = 4, H(15), Et(this.i, this.l, S, "[Invalid Chunk]"), n = !1;
1841
- break;
1842
- } else Et(this.i, this.l, Y, null), we(this, Y);
1843
- if (cn(this) && this.C != 0 && (this.h.g = this.h.g.slice(this.C), this.C = 0), k != 4 || S.length != 0 || this.h.h || (this.s = 1, H(16), n = !1), this.o = this.o && n, !n) Et(this.i, this.l, S, "[Invalid Chunked Response]"), lt(this), Ot(this);
1844
- else if (0 < S.length && !this.W) {
1845
- this.W = !0;
1846
- var x = this.j;
1847
- x.g == this && x.ba && !x.M && (x.j.info("Great, no buffering proxy detected. Bytes received: " + S.length), Pe(x), x.M = !0, H(11));
1848
- }
1849
- } else Et(this.i, this.l, S, null), we(this, S);
1850
- k == 4 && lt(this), this.o && !this.J && (k == 4 ? xn(this.j, this) : (this.o = !1, Yt(this)));
1851
- } else as(this.g), n == 400 && 0 < S.indexOf("Unknown SID") ? (this.s = 3, H(12)) : (this.s = 0, H(13)), lt(this), Ot(this);
1852
- }
1853
- }
1854
- } catch {
1855
- } finally {
1856
- }
1857
- };
1858
- function cn(t) {
1859
- return t.g ? t.u == "GET" && t.L != 2 && t.j.Ca : !1;
1860
- }
1861
- function $i(t, e) {
1862
- var n = t.C, s = e.indexOf(`
1863
- `, n);
1864
- return s == -1 ? ve : (n = Number(e.substring(n, s)), isNaN(n) ? an : (s += 1, s + n > e.length ? ve : (e = e.slice(s, s + n), t.C = s + n, e)));
1865
- }
1866
- rt.prototype.cancel = function() {
1867
- this.J = !0, lt(this);
1868
- };
1869
- function Yt(t) {
1870
- t.S = Date.now() + t.I, un(t, t.I);
1871
- }
1872
- function un(t, e) {
1873
- if (t.B != null) throw Error("WatchDog timer not null");
1874
- t.B = wt(N(t.ba, t), e);
1875
- }
1876
- function De(t) {
1877
- t.B && (y.clearTimeout(t.B), t.B = null);
1878
- }
1879
- rt.prototype.ba = function() {
1880
- this.B = null;
1881
- const t = Date.now();
1882
- 0 <= t - this.S ? (Vi(this.i, this.A), this.L != 2 && (Dt(), H(17)), lt(this), this.s = 2, Ot(this)) : un(this, this.S - t);
1883
- };
1884
- function Ot(t) {
1885
- t.j.G == 0 || t.J || xn(t.j, t);
1886
- }
1887
- function lt(t) {
1888
- De(t);
1889
- var e = t.M;
1890
- e && typeof e.ma == "function" && e.ma(), t.M = null, tn(t.U), t.g && (e = t.g, t.g = null, e.abort(), e.ma());
1891
- }
1892
- function we(t, e) {
1893
- try {
1894
- var n = t.j;
1895
- if (n.G != 0 && (n.g == t || Ce(n.h, t))) {
1896
- if (!t.K && Ce(n.h, t) && n.G == 3) {
1897
- try {
1898
- var s = n.Da.g.parse(e);
1899
- } catch {
1900
- s = null;
1901
- }
1902
- if (Array.isArray(s) && s.length == 3) {
1903
- var E = s;
1904
- if (E[0] == 0) {
1905
- t:
1906
- if (!n.u) {
1907
- if (n.g) if (n.g.F + 3e3 < t.F) ee(n), Zt(n);
1908
- else break t;
1909
- Le(n), H(18);
1910
- }
1911
- } else n.za = E[1], 0 < n.za - n.T && 37500 > E[2] && n.F && n.v == 0 && !n.C && (n.C = wt(N(n.Za, n), 6e3));
1912
- if (1 >= En(n.h) && n.ca) {
1913
- try {
1914
- n.ca();
1915
- } catch {
1916
- }
1917
- n.ca = void 0;
1918
- }
1919
- } else ut(n, 11);
1920
- } else if ((t.K || n.g == t) && ee(n), !z(e)) for (E = n.Da.g.parse(e), e = 0; e < E.length; e++) {
1921
- let I = E[e];
1922
- if (n.T = I[0], I = I[1], n.G == 2) if (I[0] == "c") {
1923
- n.K = I[1], n.ia = I[2];
1924
- const x = I[3];
1925
- x != null && (n.la = x, n.j.info("VER=" + n.la));
1926
- const k = I[4];
1927
- k != null && (n.Aa = k, n.j.info("SVER=" + n.Aa));
1928
- const _t = I[5];
1929
- _t != null && typeof _t == "number" && 0 < _t && (s = 1.5 * _t, n.L = s, n.j.info("backChannelRequestTimeoutMs_=" + s)), s = n;
1930
- const Y = t.g;
1931
- if (Y) {
1932
- const ne = Y.g ? Y.g.getResponseHeader("X-Client-Wire-Protocol") : null;
1933
- if (ne) {
1934
- var _ = s.h;
1935
- _.g || ne.indexOf("spdy") == -1 && ne.indexOf("quic") == -1 && ne.indexOf("h2") == -1 || (_.j = _.l, _.g = /* @__PURE__ */ new Set(), _.h && (Oe(_, _.h), _.h = null));
1936
- }
1937
- if (s.D) {
1938
- const be = Y.g ? Y.g.getResponseHeader("X-HTTP-Session-Id") : null;
1939
- be && (s.ya = be, O(s.I, s.D, be));
1940
- }
1941
- }
1942
- n.G = 3, n.l && n.l.ua(), n.ba && (n.R = Date.now() - t.F, n.j.info("Handshake RTT: " + n.R + "ms")), s = n;
1943
- var S = t;
1944
- if (s.qa = Hn(s, s.J ? s.ia : null, s.W), S.K) {
1945
- gn(s.h, S);
1946
- var w = S, P = s.L;
1947
- P && (w.I = P), w.B && (De(w), Yt(w)), s.g = S;
1948
- } else Mn(s);
1949
- 0 < n.i.length && te(n);
1950
- } else I[0] != "stop" && I[0] != "close" || ut(n, 7);
1951
- else n.G == 3 && (I[0] == "stop" || I[0] == "close" ? I[0] == "stop" ? ut(n, 7) : Ue(n) : I[0] != "noop" && n.l && n.l.ta(I), n.v = 0);
1952
- }
1953
- }
1954
- Dt(4);
1955
- } catch {
1956
- }
1957
- }
1958
- var Yi = class {
1959
- constructor(t, e) {
1960
- this.g = t, this.map = e;
1961
- }
1962
- };
1963
- function fn(t) {
1964
- this.l = t || 10, y.PerformanceNavigationTiming ? (t = y.performance.getEntriesByType("navigation"), t = 0 < t.length && (t[0].nextHopProtocol == "hq" || t[0].nextHopProtocol == "h2")) : t = !!(y.chrome && y.chrome.loadTimes && y.chrome.loadTimes() && y.chrome.loadTimes().wasFetchedViaSpdy), this.j = t ? this.l : 1, this.g = null, 1 < this.j && (this.g = /* @__PURE__ */ new Set()), this.h = null, this.i = [];
1965
- }
1966
- function pn(t) {
1967
- return t.h ? !0 : t.g ? t.g.size >= t.j : !1;
1968
- }
1969
- function En(t) {
1970
- return t.h ? 1 : t.g ? t.g.size : 0;
1971
- }
1972
- function Ce(t, e) {
1973
- return t.h ? t.h == e : t.g ? t.g.has(e) : !1;
1974
- }
1975
- function Oe(t, e) {
1976
- t.g ? t.g.add(e) : t.h = e;
1977
- }
1978
- function gn(t, e) {
1979
- t.h && t.h == e ? t.h = null : t.g && t.g.has(e) && t.g.delete(e);
1980
- }
1981
- fn.prototype.cancel = function() {
1982
- if (this.i = dn(this), this.h) this.h.cancel(), this.h = null;
1983
- else if (this.g && this.g.size !== 0) {
1984
- for (const t of this.g.values()) t.cancel();
1985
- this.g.clear();
1986
- }
1987
- };
1988
- function dn(t) {
1989
- if (t.h != null) return t.i.concat(t.h.D);
1990
- if (t.g != null && t.g.size !== 0) {
1991
- let e = t.i;
1992
- for (const n of t.g.values()) e = e.concat(n.D);
1993
- return e;
1994
- }
1995
- return b(t.i);
1996
- }
1997
- function Ki(t) {
1998
- if (t.V && typeof t.V == "function") return t.V();
1999
- if (typeof Map < "u" && t instanceof Map || typeof Set < "u" && t instanceof Set) return Array.from(t.values());
2000
- if (typeof t == "string") return t.split("");
2001
- if (A(t)) {
2002
- for (var e = [], n = t.length, s = 0; s < n; s++) e.push(t[s]);
2003
- return e;
2004
- }
2005
- e = [], n = 0;
2006
- for (s in t) e[n++] = t[s];
2007
- return e;
2008
- }
2009
- function Wi(t) {
2010
- if (t.na && typeof t.na == "function") return t.na();
2011
- if (!t.V || typeof t.V != "function") {
2012
- if (typeof Map < "u" && t instanceof Map) return Array.from(t.keys());
2013
- if (!(typeof Set < "u" && t instanceof Set)) {
2014
- if (A(t) || typeof t == "string") {
2015
- var e = [];
2016
- t = t.length;
2017
- for (var n = 0; n < t; n++) e.push(n);
2018
- return e;
2019
- }
2020
- e = [], n = 0;
2021
- for (const s in t) e[n++] = s;
2022
- return e;
2023
- }
2024
- }
2025
- }
2026
- function _n(t, e) {
2027
- if (t.forEach && typeof t.forEach == "function") t.forEach(e, void 0);
2028
- else if (A(t) || typeof t == "string") Array.prototype.forEach.call(t, e, void 0);
2029
- else for (var n = Wi(t), s = Ki(t), E = s.length, _ = 0; _ < E; _++) e.call(void 0, s[_], n && n[_], t);
2030
- }
2031
- var Tn = RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$");
2032
- function Xi(t, e) {
2033
- if (t) {
2034
- t = t.split("&");
2035
- for (var n = 0; n < t.length; n++) {
2036
- var s = t[n].indexOf("="), E = null;
2037
- if (0 <= s) {
2038
- var _ = t[n].substring(0, s);
2039
- E = t[n].substring(s + 1);
2040
- } else _ = t[n];
2041
- e(_, E ? decodeURIComponent(E.replace(/\+/g, " ")) : "");
2042
- }
2043
- }
2044
- }
2045
- function ct(t) {
2046
- if (this.g = this.o = this.j = "", this.s = null, this.m = this.l = "", this.h = !1, t instanceof ct) {
2047
- this.h = t.h, Kt(this, t.j), this.o = t.o, this.g = t.g, Wt(this, t.s), this.l = t.l;
2048
- var e = t.i, n = new Lt();
2049
- n.i = e.i, e.g && (n.g = new Map(e.g), n.h = e.h), mn(this, n), this.m = t.m;
2050
- } else t && (e = String(t).match(Tn)) ? (this.h = !1, Kt(this, e[1] || "", !0), this.o = Nt(e[2] || ""), this.g = Nt(e[3] || "", !0), Wt(this, e[4]), this.l = Nt(e[5] || "", !0), mn(this, e[6] || "", !0), this.m = Nt(e[7] || "")) : (this.h = !1, this.i = new Lt(null, this.h));
2051
- }
2052
- ct.prototype.toString = function() {
2053
- var t = [], e = this.j;
2054
- e && t.push(Ut(e, Sn, !0), ":");
2055
- var n = this.g;
2056
- return (n || e == "file") && (t.push("//"), (e = this.o) && t.push(Ut(e, Sn, !0), "@"), t.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g, "%$1")), n = this.s, n != null && t.push(":", String(n))), (n = this.l) && (this.g && n.charAt(0) != "/" && t.push("/"), t.push(Ut(n, n.charAt(0) == "/" ? qi : Ji, !0))), (n = this.i.toString()) && t.push("?", n), (n = this.m) && t.push("#", Ut(n, ts)), t.join("");
2057
- };
2058
- function tt(t) {
2059
- return new ct(t);
2060
- }
2061
- function Kt(t, e, n) {
2062
- t.j = n ? Nt(e, !0) : e, t.j && (t.j = t.j.replace(/:$/, ""));
2063
- }
2064
- function Wt(t, e) {
2065
- if (e) {
2066
- if (e = Number(e), isNaN(e) || 0 > e) throw Error("Bad port number " + e);
2067
- t.s = e;
2068
- } else t.s = null;
2069
- }
2070
- function mn(t, e, n) {
2071
- e instanceof Lt ? (t.i = e, es(t.i, t.h)) : (n || (e = Ut(e, Zi)), t.i = new Lt(e, t.h));
2072
- }
2073
- function O(t, e, n) {
2074
- t.i.set(e, n);
2075
- }
2076
- function Xt(t) {
2077
- return O(t, "zx", Math.floor(2147483648 * Math.random()).toString(36) + Math.abs(Math.floor(2147483648 * Math.random()) ^ Date.now()).toString(36)), t;
2078
- }
2079
- function Nt(t, e) {
2080
- return t ? e ? decodeURI(t.replace(/%25/g, "%2525")) : decodeURIComponent(t) : "";
2081
- }
2082
- function Ut(t, e, n) {
2083
- return typeof t == "string" ? (t = encodeURI(t).replace(e, zi), n && (t = t.replace(/%25([0-9a-fA-F]{2})/g, "%$1")), t) : null;
2084
- }
2085
- function zi(t) {
2086
- return t = t.charCodeAt(0), "%" + (t >> 4 & 15).toString(16) + (t & 15).toString(16);
2087
- }
2088
- var Sn = /[#\/\?@]/g, Ji = /[#\?:]/g, qi = /[#\?]/g, Zi = /[#\?@]/g, ts = /#/g;
2089
- function Lt(t, e) {
2090
- this.h = this.g = null, this.i = t || null, this.j = !!e;
2091
- }
2092
- function ot(t) {
2093
- t.g || (t.g = /* @__PURE__ */ new Map(), t.h = 0, t.i && Xi(t.i, function(e, n) {
2094
- t.add(decodeURIComponent(e.replace(/\+/g, " ")), n);
2095
- }));
2096
- }
2097
- r = Lt.prototype, r.add = function(t, e) {
2098
- ot(this), this.i = null, t = gt(this, t);
2099
- var n = this.g.get(t);
2100
- return n || this.g.set(t, n = []), n.push(e), this.h += 1, this;
2101
- };
2102
- function yn(t, e) {
2103
- ot(t), e = gt(t, e), t.g.has(e) && (t.i = null, t.h -= t.g.get(e).length, t.g.delete(e));
2104
- }
2105
- function An(t, e) {
2106
- return ot(t), e = gt(t, e), t.g.has(e);
2107
- }
2108
- r.forEach = function(t, e) {
2109
- ot(this), this.g.forEach(function(n, s) {
2110
- n.forEach(function(E) {
2111
- t.call(e, E, s, this);
2112
- }, this);
2113
- }, this);
2114
- }, r.na = function() {
2115
- ot(this);
2116
- const t = Array.from(this.g.values()), e = Array.from(this.g.keys()), n = [];
2117
- for (let s = 0; s < e.length; s++) {
2118
- const E = t[s];
2119
- for (let _ = 0; _ < E.length; _++) n.push(e[s]);
2120
- }
2121
- return n;
2122
- }, r.V = function(t) {
2123
- ot(this);
2124
- let e = [];
2125
- if (typeof t == "string") An(this, t) && (e = e.concat(this.g.get(gt(this, t))));
2126
- else {
2127
- t = Array.from(this.g.values());
2128
- for (let n = 0; n < t.length; n++) e = e.concat(t[n]);
2129
- }
2130
- return e;
2131
- }, r.set = function(t, e) {
2132
- return ot(this), this.i = null, t = gt(this, t), An(this, t) && (this.h -= this.g.get(t).length), this.g.set(t, [e]), this.h += 1, this;
2133
- }, r.get = function(t, e) {
2134
- return t ? (t = this.V(t), 0 < t.length ? String(t[0]) : e) : e;
2135
- };
2136
- function Rn(t, e, n) {
2137
- yn(t, e), 0 < n.length && (t.i = null, t.g.set(gt(t, e), b(n)), t.h += n.length);
2138
- }
2139
- r.toString = function() {
2140
- if (this.i) return this.i;
2141
- if (!this.g) return "";
2142
- const t = [], e = Array.from(this.g.keys());
2143
- for (var n = 0; n < e.length; n++) {
2144
- var s = e[n];
2145
- const _ = encodeURIComponent(String(s)), S = this.V(s);
2146
- for (s = 0; s < S.length; s++) {
2147
- var E = _;
2148
- S[s] !== "" && (E += "=" + encodeURIComponent(String(S[s]))), t.push(E);
2149
- }
2150
- }
2151
- return this.i = t.join("&");
2152
- };
2153
- function gt(t, e) {
2154
- return e = String(e), t.j && (e = e.toLowerCase()), e;
2155
- }
2156
- function es(t, e) {
2157
- e && !t.j && (ot(t), t.i = null, t.g.forEach(function(n, s) {
2158
- var E = s.toLowerCase();
2159
- s != E && (yn(this, s), Rn(this, E, n));
2160
- }, t)), t.j = e;
2161
- }
2162
- function ns(t, e) {
2163
- const n = new Ct();
2164
- if (y.Image) {
2165
- const s = new Image();
2166
- s.onload = Q(ht, n, "TestLoadImage: loaded", !0, e, s), s.onerror = Q(ht, n, "TestLoadImage: error", !1, e, s), s.onabort = Q(ht, n, "TestLoadImage: abort", !1, e, s), s.ontimeout = Q(ht, n, "TestLoadImage: timeout", !1, e, s), y.setTimeout(function() {
2167
- s.ontimeout && s.ontimeout();
2168
- }, 1e4), s.src = t;
2169
- } else e(!1);
2170
- }
2171
- function is(t, e) {
2172
- const n = new Ct(), s = new AbortController(), E = setTimeout(() => {
2173
- s.abort(), ht(n, "TestPingServer: timeout", !1, e);
2174
- }, 1e4);
2175
- fetch(t, { signal: s.signal }).then((_) => {
2176
- clearTimeout(E), _.ok ? ht(n, "TestPingServer: ok", !0, e) : ht(n, "TestPingServer: server error", !1, e);
2177
- }).catch(() => {
2178
- clearTimeout(E), ht(n, "TestPingServer: error", !1, e);
2179
- });
2180
- }
2181
- function ht(t, e, n, s, E) {
2182
- try {
2183
- E && (E.onload = null, E.onerror = null, E.onabort = null, E.ontimeout = null), s(n);
2184
- } catch {
2185
- }
2186
- }
2187
- function ss() {
2188
- this.g = new ki();
2189
- }
2190
- function rs(t, e, n) {
2191
- const s = n || "";
2192
- try {
2193
- _n(t, function(E, _) {
2194
- let S = E;
2195
- R(E) && (S = _e(E)), e.push(s + _ + "=" + encodeURIComponent(S));
2196
- });
2197
- } catch (E) {
2198
- throw e.push(s + "type=" + encodeURIComponent("_badmap")), E;
2199
- }
2200
- }
2201
- function zt(t) {
2202
- this.l = t.Ub || null, this.j = t.eb || !1;
2203
- }
2204
- D(zt, Te), zt.prototype.g = function() {
2205
- return new Jt(this.l, this.j);
2206
- }, zt.prototype.i = /* @__PURE__ */ function(t) {
2207
- return function() {
2208
- return t;
2209
- };
2210
- }({});
2211
- function Jt(t, e) {
2212
- B.call(this), this.D = t, this.o = e, this.m = void 0, this.status = this.readyState = 0, this.responseType = this.responseText = this.response = this.statusText = "", this.onreadystatechange = null, this.u = new Headers(), this.h = null, this.B = "GET", this.A = "", this.g = !1, this.v = this.j = this.l = null;
2213
- }
2214
- D(Jt, B), r = Jt.prototype, r.open = function(t, e) {
2215
- if (this.readyState != 0) throw this.abort(), Error("Error reopening a connection");
2216
- this.B = t, this.A = e, this.readyState = 1, bt(this);
2217
- }, r.send = function(t) {
2218
- if (this.readyState != 1) throw this.abort(), Error("need to call open() first. ");
2219
- this.g = !0;
2220
- const e = { headers: this.u, method: this.B, credentials: this.m, cache: void 0 };
2221
- t && (e.body = t), (this.D || y).fetch(new Request(this.A, e)).then(this.Sa.bind(this), this.ga.bind(this));
2222
- }, r.abort = function() {
2223
- this.response = this.responseText = "", this.u = new Headers(), this.status = 0, this.j && this.j.cancel("Request was aborted.").catch(() => {
2224
- }), 1 <= this.readyState && this.g && this.readyState != 4 && (this.g = !1, Pt(this)), this.readyState = 0;
2225
- }, r.Sa = function(t) {
2226
- if (this.g && (this.l = t, this.h || (this.status = this.l.status, this.statusText = this.l.statusText, this.h = t.headers, this.readyState = 2, bt(this)), this.g && (this.readyState = 3, bt(this), this.g))) if (this.responseType === "arraybuffer") t.arrayBuffer().then(this.Qa.bind(this), this.ga.bind(this));
2227
- else if (typeof y.ReadableStream < "u" && "body" in t) {
2228
- if (this.j = t.body.getReader(), this.o) {
2229
- if (this.responseType) throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');
2230
- this.response = [];
2231
- } else this.response = this.responseText = "", this.v = new TextDecoder();
2232
- vn(this);
2233
- } else t.text().then(this.Ra.bind(this), this.ga.bind(this));
2234
- };
2235
- function vn(t) {
2236
- t.j.read().then(t.Pa.bind(t)).catch(t.ga.bind(t));
2237
- }
2238
- r.Pa = function(t) {
2239
- if (this.g) {
2240
- if (this.o && t.value) this.response.push(t.value);
2241
- else if (!this.o) {
2242
- var e = t.value ? t.value : new Uint8Array(0);
2243
- (e = this.v.decode(e, { stream: !t.done })) && (this.response = this.responseText += e);
2244
- }
2245
- t.done ? Pt(this) : bt(this), this.readyState == 3 && vn(this);
2246
- }
2247
- }, r.Ra = function(t) {
2248
- this.g && (this.response = this.responseText = t, Pt(this));
2249
- }, r.Qa = function(t) {
2250
- this.g && (this.response = t, Pt(this));
2251
- }, r.ga = function() {
2252
- this.g && Pt(this);
2253
- };
2254
- function Pt(t) {
2255
- t.readyState = 4, t.l = null, t.j = null, t.v = null, bt(t);
2256
- }
2257
- r.setRequestHeader = function(t, e) {
2258
- this.u.append(t, e);
2259
- }, r.getResponseHeader = function(t) {
2260
- return this.h && this.h.get(t.toLowerCase()) || "";
2261
- }, r.getAllResponseHeaders = function() {
2262
- if (!this.h) return "";
2263
- const t = [], e = this.h.entries();
2264
- for (var n = e.next(); !n.done; ) n = n.value, t.push(n[0] + ": " + n[1]), n = e.next();
2265
- return t.join(`\r
2266
- `);
2267
- };
2268
- function bt(t) {
2269
- t.onreadystatechange && t.onreadystatechange.call(t);
2270
- }
2271
- Object.defineProperty(Jt.prototype, "withCredentials", { get: function() {
2272
- return this.m === "include";
2273
- }, set: function(t) {
2274
- this.m = t ? "include" : "same-origin";
2275
- } });
2276
- function In(t) {
2277
- let e = "";
2278
- return J(t, function(n, s) {
2279
- e += s, e += ":", e += n, e += `\r
2280
- `;
2281
- }), e;
2282
- }
2283
- function Ne(t, e, n) {
2284
- t: {
2285
- for (s in n) {
2286
- var s = !1;
2287
- break t;
2288
- }
2289
- s = !0;
2290
- }
2291
- s || (n = In(n), typeof t == "string" ? n != null && encodeURIComponent(String(n)) : O(t, e, n));
2292
- }
2293
- function U(t) {
2294
- B.call(this), this.headers = /* @__PURE__ */ new Map(), this.o = t || null, this.h = !1, this.v = this.g = null, this.D = "", this.m = 0, this.l = "", this.j = this.B = this.u = this.A = !1, this.I = null, this.H = "", this.J = !1;
2295
- }
2296
- D(U, B);
2297
- var os = /^https?$/i, hs = ["POST", "PUT"];
2298
- r = U.prototype, r.Ha = function(t) {
2299
- this.J = t;
2300
- }, r.ea = function(t, e, n, s) {
2301
- if (this.g) throw Error("[goog.net.XhrIo] Object is active with another request=" + this.D + "; newUri=" + t);
2302
- e = e ? e.toUpperCase() : "GET", this.D = t, this.l = "", this.m = 0, this.A = !1, this.h = !0, this.g = this.o ? this.o.g() : Re.g(), this.v = this.o ? en(this.o) : en(Re), this.g.onreadystatechange = N(this.Ea, this);
2303
- try {
2304
- this.B = !0, this.g.open(e, String(t), !0), this.B = !1;
2305
- } catch (_) {
2306
- Dn(this, _);
2307
- return;
2308
- }
2309
- if (t = n || "", n = new Map(this.headers), s) if (Object.getPrototypeOf(s) === Object.prototype) for (var E in s) n.set(E, s[E]);
2310
- else if (typeof s.keys == "function" && typeof s.get == "function") for (const _ of s.keys()) n.set(_, s.get(_));
2311
- else throw Error("Unknown input type for opt_headers: " + String(s));
2312
- s = Array.from(n.keys()).find((_) => _.toLowerCase() == "content-type"), E = y.FormData && t instanceof y.FormData, !(0 <= Array.prototype.indexOf.call(hs, e, void 0)) || s || E || n.set("Content-Type", "application/x-www-form-urlencoded;charset=utf-8");
2313
- for (const [_, S] of n) this.g.setRequestHeader(_, S);
2314
- this.H && (this.g.responseType = this.H), "withCredentials" in this.g && this.g.withCredentials !== this.J && (this.g.withCredentials = this.J);
2315
- try {
2316
- On(this), this.u = !0, this.g.send(t), this.u = !1;
2317
- } catch (_) {
2318
- Dn(this, _);
2319
- }
2320
- };
2321
- function Dn(t, e) {
2322
- t.h = !1, t.g && (t.j = !0, t.g.abort(), t.j = !1), t.l = e, t.m = 5, wn(t), qt(t);
2323
- }
2324
- function wn(t) {
2325
- t.A || (t.A = !0, F(t, "complete"), F(t, "error"));
2326
- }
2327
- r.abort = function(t) {
2328
- this.g && this.h && (this.h = !1, this.j = !0, this.g.abort(), this.j = !1, this.m = t || 7, F(this, "complete"), F(this, "abort"), qt(this));
2329
- }, r.N = function() {
2330
- this.g && (this.h && (this.h = !1, this.j = !0, this.g.abort(), this.j = !1), qt(this, !0)), U.aa.N.call(this);
2331
- }, r.Ea = function() {
2332
- this.s || (this.B || this.u || this.j ? Cn(this) : this.bb());
2333
- }, r.bb = function() {
2334
- Cn(this);
2335
- };
2336
- function Cn(t) {
2337
- if (t.h && typeof m < "u" && (!t.v[1] || et(t) != 4 || t.Z() != 2)) {
2338
- if (t.u && et(t) == 4) Je(t.Ea, 0, t);
2339
- else if (F(t, "readystatechange"), et(t) == 4) {
2340
- t.h = !1;
2341
- try {
2342
- const S = t.Z();
2343
- t: switch (S) {
2344
- case 200:
2345
- case 201:
2346
- case 202:
2347
- case 204:
2348
- case 206:
2349
- case 304:
2350
- case 1223:
2351
- var e = !0;
2352
- break t;
2353
- default:
2354
- e = !1;
2355
- }
2356
- var n;
2357
- if (!(n = e)) {
2358
- var s;
2359
- if (s = S === 0) {
2360
- var E = String(t.D).match(Tn)[1] || null;
2361
- !E && y.self && y.self.location && (E = y.self.location.protocol.slice(0, -1)), s = !os.test(E ? E.toLowerCase() : "");
2362
- }
2363
- n = s;
2364
- }
2365
- if (n) F(t, "complete"), F(t, "success");
2366
- else {
2367
- t.m = 6;
2368
- try {
2369
- var _ = 2 < et(t) ? t.g.statusText : "";
2370
- } catch {
2371
- _ = "";
2372
- }
2373
- t.l = _ + " [" + t.Z() + "]", wn(t);
2374
- }
2375
- } finally {
2376
- qt(t);
2377
- }
2378
- }
2379
- }
2380
- }
2381
- function qt(t, e) {
2382
- if (t.g) {
2383
- On(t);
2384
- const n = t.g, s = t.v[0] ? () => {
2385
- } : null;
2386
- t.g = null, t.v = null, e || F(t, "ready");
2387
- try {
2388
- n.onreadystatechange = s;
2389
- } catch {
2390
- }
2391
- }
2392
- }
2393
- function On(t) {
2394
- t.I && (y.clearTimeout(t.I), t.I = null);
2395
- }
2396
- r.isActive = function() {
2397
- return !!this.g;
2398
- };
2399
- function et(t) {
2400
- return t.g ? t.g.readyState : 0;
2401
- }
2402
- r.Z = function() {
2403
- try {
2404
- return 2 < et(this) ? this.g.status : -1;
2405
- } catch {
2406
- return -1;
2407
- }
2408
- }, r.oa = function() {
2409
- try {
2410
- return this.g ? this.g.responseText : "";
2411
- } catch {
2412
- return "";
2413
- }
2414
- }, r.Oa = function(t) {
2415
- if (this.g) {
2416
- var e = this.g.responseText;
2417
- return t && e.indexOf(t) == 0 && (e = e.substring(t.length)), xi(e);
2418
- }
2419
- };
2420
- function Nn(t) {
2421
- try {
2422
- if (!t.g) return null;
2423
- if ("response" in t.g) return t.g.response;
2424
- switch (t.H) {
2425
- case "":
2426
- case "text":
2427
- return t.g.responseText;
2428
- case "arraybuffer":
2429
- if ("mozResponseArrayBuffer" in t.g) return t.g.mozResponseArrayBuffer;
2430
- }
2431
- return null;
2432
- } catch {
2433
- return null;
2434
- }
2435
- }
2436
- function as(t) {
2437
- const e = {};
2438
- t = (t.g && 2 <= et(t) && t.g.getAllResponseHeaders() || "").split(`\r
2439
- `);
2440
- for (let s = 0; s < t.length; s++) {
2441
- if (z(t[s])) continue;
2442
- var n = f(t[s]);
2443
- const E = n[0];
2444
- if (n = n[1], typeof n != "string") continue;
2445
- n = n.trim();
2446
- const _ = e[E] || [];
2447
- e[E] = _, _.push(n);
2448
- }
2449
- p(e, function(s) {
2450
- return s.join(", ");
2451
- });
2452
- }
2453
- r.Ba = function() {
2454
- return this.m;
2455
- }, r.Ka = function() {
2456
- return typeof this.l == "string" ? this.l : String(this.l);
2457
- };
2458
- function Mt(t, e, n) {
2459
- return n && n.internalChannelParams && n.internalChannelParams[t] || e;
2460
- }
2461
- function Un(t) {
2462
- this.Aa = 0, this.i = [], this.j = new Ct(), this.ia = this.qa = this.I = this.W = this.g = this.ya = this.D = this.H = this.m = this.S = this.o = null, this.Ya = this.U = 0, this.Va = Mt("failFast", !1, t), this.F = this.C = this.u = this.s = this.l = null, this.X = !0, this.za = this.T = -1, this.Y = this.v = this.B = 0, this.Ta = Mt("baseRetryDelayMs", 5e3, t), this.cb = Mt("retryDelaySeedMs", 1e4, t), this.Wa = Mt("forwardChannelMaxRetries", 2, t), this.wa = Mt("forwardChannelRequestTimeoutMs", 2e4, t), this.pa = t && t.xmlHttpFactory || void 0, this.Xa = t && t.Tb || void 0, this.Ca = t && t.useFetchStreams || !1, this.L = void 0, this.J = t && t.supportsCrossDomainXhr || !1, this.K = "", this.h = new fn(t && t.concurrentRequestLimit), this.Da = new ss(), this.P = t && t.fastHandshake || !1, this.O = t && t.encodeInitMessageHeaders || !1, this.P && this.O && (this.O = !1), this.Ua = t && t.Rb || !1, t && t.xa && this.j.xa(), t && t.forceLongPolling && (this.X = !1), this.ba = !this.P && this.X && t && t.detectBufferingProxy || !1, this.ja = void 0, t && t.longPollingTimeout && 0 < t.longPollingTimeout && (this.ja = t.longPollingTimeout), this.ca = void 0, this.R = 0, this.M = !1, this.ka = this.A = null;
2463
- }
2464
- r = Un.prototype, r.la = 8, r.G = 1, r.connect = function(t, e, n, s) {
2465
- H(0), this.W = t, this.H = e || {}, n && s !== void 0 && (this.H.OSID = n, this.H.OAID = s), this.F = this.X, this.I = Hn(this, null, this.W), te(this);
2466
- };
2467
- function Ue(t) {
2468
- if (Ln(t), t.G == 3) {
2469
- var e = t.U++, n = tt(t.I);
2470
- if (O(n, "SID", t.K), O(n, "RID", e), O(n, "TYPE", "terminate"), Bt(t, n), e = new rt(t, t.j, e), e.L = 2, e.v = Xt(tt(n)), n = !1, y.navigator && y.navigator.sendBeacon) try {
2471
- n = y.navigator.sendBeacon(e.v.toString(), "");
2472
- } catch {
2473
- }
2474
- !n && y.Image && (new Image().src = e.v, n = !0), n || (e.g = jn(e.j, null), e.g.ea(e.v)), e.F = Date.now(), Yt(e);
2475
- }
2476
- Fn(t);
2477
- }
2478
- function Zt(t) {
2479
- t.g && (Pe(t), t.g.cancel(), t.g = null);
2480
- }
2481
- function Ln(t) {
2482
- Zt(t), t.u && (y.clearTimeout(t.u), t.u = null), ee(t), t.h.cancel(), t.s && (typeof t.s == "number" && y.clearTimeout(t.s), t.s = null);
2483
- }
2484
- function te(t) {
2485
- if (!pn(t.h) && !t.s) {
2486
- t.s = !0;
2487
- var e = t.Ga;
2488
- yt || Ye(), At || (yt(), At = !0), le.add(e, t), t.B = 0;
2489
- }
2490
- }
2491
- function ls(t, e) {
2492
- return En(t.h) >= t.h.j - (t.s ? 1 : 0) ? !1 : t.s ? (t.i = e.D.concat(t.i), !0) : t.G == 1 || t.G == 2 || t.B >= (t.Va ? 0 : t.Wa) ? !1 : (t.s = wt(N(t.Ga, t, e), kn(t, t.B)), t.B++, !0);
2493
- }
2494
- r.Ga = function(t) {
2495
- if (this.s) if (this.s = null, this.G == 1) {
2496
- if (!t) {
2497
- this.U = Math.floor(1e5 * Math.random()), t = this.U++;
2498
- const E = new rt(this, this.j, t);
2499
- let _ = this.o;
2500
- if (this.S && (_ ? (_ = h(_), c(_, this.S)) : _ = this.S), this.m !== null || this.O || (E.H = _, _ = null), this.P) t: {
2501
- for (var e = 0, n = 0; n < this.i.length; n++) {
2502
- e: {
2503
- var s = this.i[n];
2504
- if ("__data__" in s.map && (s = s.map.__data__, typeof s == "string")) {
2505
- s = s.length;
2506
- break e;
2507
- }
2508
- s = void 0;
2509
- }
2510
- if (s === void 0) break;
2511
- if (e += s, 4096 < e) {
2512
- e = n;
2513
- break t;
2514
- }
2515
- if (e === 4096 || n === this.i.length - 1) {
2516
- e = n + 1;
2517
- break t;
2518
- }
2519
- }
2520
- e = 1e3;
2521
- }
2522
- else e = 1e3;
2523
- e = bn(this, E, e), n = tt(this.I), O(n, "RID", t), O(n, "CVER", 22), this.D && O(n, "X-HTTP-Session-Id", this.D), Bt(this, n), _ && (this.O ? e = "headers=" + encodeURIComponent(String(In(_))) + "&" + e : this.m && Ne(n, this.m, _)), Oe(this.h, E), this.Ua && O(n, "TYPE", "init"), this.P ? (O(n, "$req", e), O(n, "SID", "null"), E.T = !0, Ie(E, n, null)) : Ie(E, n, e), this.G = 2;
2524
- }
2525
- } else this.G == 3 && (t ? Pn(this, t) : this.i.length == 0 || pn(this.h) || Pn(this));
2526
- };
2527
- function Pn(t, e) {
2528
- var n;
2529
- e ? n = e.l : n = t.U++;
2530
- const s = tt(t.I);
2531
- O(s, "SID", t.K), O(s, "RID", n), O(s, "AID", t.T), Bt(t, s), t.m && t.o && Ne(s, t.m, t.o), n = new rt(t, t.j, n, t.B + 1), t.m === null && (n.H = t.o), e && (t.i = e.D.concat(t.i)), e = bn(t, n, 1e3), n.I = Math.round(0.5 * t.wa) + Math.round(0.5 * t.wa * Math.random()), Oe(t.h, n), Ie(n, s, e);
2532
- }
2533
- function Bt(t, e) {
2534
- t.H && J(t.H, function(n, s) {
2535
- O(e, s, n);
2536
- }), t.l && _n({}, function(n, s) {
2537
- O(e, s, n);
2538
- });
2539
- }
2540
- function bn(t, e, n) {
2541
- n = Math.min(t.i.length, n);
2542
- var s = t.l ? N(t.l.Na, t.l, t) : null;
2543
- t: {
2544
- var E = t.i;
2545
- let _ = -1;
2546
- for (; ; ) {
2547
- const S = ["count=" + n];
2548
- _ == -1 ? 0 < n ? (_ = E[0].g, S.push("ofs=" + _)) : _ = 0 : S.push("ofs=" + _);
2549
- let w = !0;
2550
- for (let P = 0; P < n; P++) {
2551
- let I = E[P].g;
2552
- const x = E[P].map;
2553
- if (I -= _, 0 > I) _ = Math.max(0, E[P].g - 100), w = !1;
2554
- else try {
2555
- rs(x, S, "req" + I + "_");
2556
- } catch {
2557
- s && s(x);
2558
- }
2559
- }
2560
- if (w) {
2561
- s = S.join("&");
2562
- break t;
2563
- }
2564
- }
2565
- }
2566
- return t = t.i.splice(0, n), e.D = t, s;
2567
- }
2568
- function Mn(t) {
2569
- if (!t.g && !t.u) {
2570
- t.Y = 1;
2571
- var e = t.Fa;
2572
- yt || Ye(), At || (yt(), At = !0), le.add(e, t), t.v = 0;
2573
- }
2574
- }
2575
- function Le(t) {
2576
- return t.g || t.u || 3 <= t.v ? !1 : (t.Y++, t.u = wt(N(t.Fa, t), kn(t, t.v)), t.v++, !0);
2577
- }
2578
- r.Fa = function() {
2579
- if (this.u = null, Bn(this), this.ba && !(this.M || this.g == null || 0 >= this.R)) {
2580
- var t = 2 * this.R;
2581
- this.j.info("BP detection timer enabled: " + t), this.A = wt(N(this.ab, this), t);
2582
- }
2583
- }, r.ab = function() {
2584
- this.A && (this.A = null, this.j.info("BP detection timeout reached."), this.j.info("Buffering proxy detected and switch to long-polling!"), this.F = !1, this.M = !0, H(10), Zt(this), Bn(this));
2585
- };
2586
- function Pe(t) {
2587
- t.A != null && (y.clearTimeout(t.A), t.A = null);
2588
- }
2589
- function Bn(t) {
2590
- t.g = new rt(t, t.j, "rpc", t.Y), t.m === null && (t.g.H = t.o), t.g.O = 0;
2591
- var e = tt(t.qa);
2592
- O(e, "RID", "rpc"), O(e, "SID", t.K), O(e, "AID", t.T), O(e, "CI", t.F ? "0" : "1"), !t.F && t.ja && O(e, "TO", t.ja), O(e, "TYPE", "xmlhttp"), Bt(t, e), t.m && t.o && Ne(e, t.m, t.o), t.L && (t.g.I = t.L);
2593
- var n = t.g;
2594
- t = t.ia, n.L = 1, n.v = Xt(tt(e)), n.m = null, n.P = !0, ln(n, t);
2595
- }
2596
- r.Za = function() {
2597
- this.C != null && (this.C = null, Zt(this), Le(this), H(19));
2598
- };
2599
- function ee(t) {
2600
- t.C != null && (y.clearTimeout(t.C), t.C = null);
2601
- }
2602
- function xn(t, e) {
2603
- var n = null;
2604
- if (t.g == e) {
2605
- ee(t), Pe(t), t.g = null;
2606
- var s = 2;
2607
- } else if (Ce(t.h, e)) n = e.D, gn(t.h, e), s = 1;
2608
- else return;
2609
- if (t.G != 0) {
2610
- if (e.o) if (s == 1) {
2611
- n = e.m ? e.m.length : 0, e = Date.now() - e.F;
2612
- var E = t.B;
2613
- s = ye(), F(s, new on(s, n)), te(t);
2614
- } else Mn(t);
2615
- else if (E = e.s, E == 3 || E == 0 && 0 < e.X || !(s == 1 && ls(t, e) || s == 2 && Le(t))) switch (n && 0 < n.length && (e = t.h, e.i = e.i.concat(n)), E) {
2616
- case 1:
2617
- ut(t, 5);
2618
- break;
2619
- case 4:
2620
- ut(t, 10);
2621
- break;
2622
- case 3:
2623
- ut(t, 6);
2624
- break;
2625
- default:
2626
- ut(t, 2);
2627
- }
2628
- }
2629
- }
2630
- function kn(t, e) {
2631
- let n = t.Ta + Math.floor(Math.random() * t.cb);
2632
- return t.isActive() || (n *= 2), n * e;
2633
- }
2634
- function ut(t, e) {
2635
- if (t.j.info("Error code " + e), e == 2) {
2636
- var n = N(t.fb, t), s = t.Xa;
2637
- const E = !s;
2638
- s = new ct(s || "//www.google.com/images/cleardot.gif"), y.location && y.location.protocol == "http" || Kt(s, "https"), Xt(s), E ? ns(s.toString(), n) : is(s.toString(), n);
2639
- } else H(2);
2640
- t.G = 0, t.l && t.l.sa(e), Fn(t), Ln(t);
2641
- }
2642
- r.fb = function(t) {
2643
- t ? (this.j.info("Successfully pinged google.com"), H(2)) : (this.j.info("Failed to ping google.com"), H(1));
2644
- };
2645
- function Fn(t) {
2646
- if (t.G = 0, t.ka = [], t.l) {
2647
- const e = dn(t.h);
2648
- (e.length != 0 || t.i.length != 0) && (L(t.ka, e), L(t.ka, t.i), t.h.i.length = 0, b(t.i), t.i.length = 0), t.l.ra();
2649
- }
2650
- }
2651
- function Hn(t, e, n) {
2652
- var s = n instanceof ct ? tt(n) : new ct(n);
2653
- if (s.g != "") e && (s.g = e + "." + s.g), Wt(s, s.s);
2654
- else {
2655
- var E = y.location;
2656
- s = E.protocol, e = e ? e + "." + E.hostname : E.hostname, E = +E.port;
2657
- var _ = new ct(null);
2658
- s && Kt(_, s), e && (_.g = e), E && Wt(_, E), n && (_.l = n), s = _;
2659
- }
2660
- return n = t.D, e = t.ya, n && e && O(s, n, e), O(s, "VER", t.la), Bt(t, s), s;
2661
- }
2662
- function jn(t, e, n) {
2663
- if (e && !t.J) throw Error("Can't create secondary domain capable XhrIo object.");
2664
- return e = t.Ca && !t.pa ? new U(new zt({ eb: n })) : new U(t.pa), e.Ha(t.J), e;
2665
- }
2666
- r.isActive = function() {
2667
- return !!this.l && this.l.isActive(this);
2668
- };
2669
- function Vn() {
2670
- }
2671
- r = Vn.prototype, r.ua = function() {
2672
- }, r.ta = function() {
2673
- }, r.sa = function() {
2674
- }, r.ra = function() {
2675
- }, r.isActive = function() {
2676
- return !0;
2677
- }, r.Na = function() {
2678
- };
2679
- function $(t, e) {
2680
- B.call(this), this.g = new Un(e), this.l = t, this.h = e && e.messageUrlParams || null, t = e && e.messageHeaders || null, e && e.clientProtocolHeaderRequired && (t ? t["X-Client-Protocol"] = "webchannel" : t = { "X-Client-Protocol": "webchannel" }), this.g.o = t, t = e && e.initMessageHeaders || null, e && e.messageContentType && (t ? t["X-WebChannel-Content-Type"] = e.messageContentType : t = { "X-WebChannel-Content-Type": e.messageContentType }), e && e.va && (t ? t["X-WebChannel-Client-Profile"] = e.va : t = { "X-WebChannel-Client-Profile": e.va }), this.g.S = t, (t = e && e.Sb) && !z(t) && (this.g.m = t), this.v = e && e.supportsCrossDomainXhr || !1, this.u = e && e.sendRawJson || !1, (e = e && e.httpSessionIdParam) && !z(e) && (this.g.D = e, t = this.h, t !== null && e in t && (t = this.h, e in t && delete t[e])), this.j = new dt(this);
2681
- }
2682
- D($, B), $.prototype.m = function() {
2683
- this.g.l = this.j, this.v && (this.g.J = !0), this.g.connect(this.l, this.h || void 0);
2684
- }, $.prototype.close = function() {
2685
- Ue(this.g);
2686
- }, $.prototype.o = function(t) {
2687
- var e = this.g;
2688
- if (typeof t == "string") {
2689
- var n = {};
2690
- n.__data__ = t, t = n;
2691
- } else this.u && (n = {}, n.__data__ = _e(t), t = n);
2692
- e.i.push(new Yi(e.Ya++, t)), e.G == 3 && te(e);
2693
- }, $.prototype.N = function() {
2694
- this.g.l = null, delete this.j, Ue(this.g), delete this.g, $.aa.N.call(this);
2695
- };
2696
- function Qn(t) {
2697
- me.call(this), t.__headers__ && (this.headers = t.__headers__, this.statusCode = t.__status__, delete t.__headers__, delete t.__status__);
2698
- var e = t.__sm__;
2699
- if (e) {
2700
- t: {
2701
- for (const n in e) {
2702
- t = n;
2703
- break t;
2704
- }
2705
- t = void 0;
2706
- }
2707
- (this.i = t) && (t = this.i, e = e !== null && t in e ? e[t] : void 0), this.data = e;
2708
- } else this.data = t;
2709
- }
2710
- D(Qn, me);
2711
- function Gn() {
2712
- Se.call(this), this.status = 1;
2713
- }
2714
- D(Gn, Se);
2715
- function dt(t) {
2716
- this.g = t;
2717
- }
2718
- D(dt, Vn), dt.prototype.ua = function() {
2719
- F(this.g, "a");
2720
- }, dt.prototype.ta = function(t) {
2721
- F(this.g, new Qn(t));
2722
- }, dt.prototype.sa = function(t) {
2723
- F(this.g, new Gn());
2724
- }, dt.prototype.ra = function() {
2725
- F(this.g, "b");
2726
- }, $.prototype.send = $.prototype.o, $.prototype.open = $.prototype.m, $.prototype.close = $.prototype.close, Ae.NO_ERROR = 0, Ae.TIMEOUT = 8, Ae.HTTP_ERROR = 6, Gi.COMPLETE = "complete", Fi.EventType = It, It.OPEN = "a", It.CLOSE = "b", It.ERROR = "c", It.MESSAGE = "d", B.prototype.listen = B.prototype.K, U.prototype.listenOnce = U.prototype.L, U.prototype.getLastError = U.prototype.Ka, U.prototype.getLastErrorCode = U.prototype.Ba, U.prototype.getStatus = U.prototype.Z, U.prototype.getResponseJson = U.prototype.Oa, U.prototype.getResponseText = U.prototype.oa, U.prototype.send = U.prototype.ea, U.prototype.setWithCredentials = U.prototype.Ha;
2727
- }).apply(typeof ie < "u" ? ie : typeof self < "u" ? self : typeof window < "u" ? window : {});
2728
- const ni = "@firebase/firestore", ii = "4.7.17";
2729
- /**
2730
- * @license
2731
- * Copyright 2017 Google LLC
2732
- *
2733
- * Licensed under the Apache License, Version 2.0 (the "License");
2734
- * you may not use this file except in compliance with the License.
2735
- * You may obtain a copy of the License at
2736
- *
2737
- * http://www.apache.org/licenses/LICENSE-2.0
2738
- *
2739
- * Unless required by applicable law or agreed to in writing, software
2740
- * distributed under the License is distributed on an "AS IS" BASIS,
2741
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2742
- * See the License for the specific language governing permissions and
2743
- * limitations under the License.
2744
- */
2745
- class V {
2746
- constructor(i) {
2747
- this.uid = i;
2748
- }
2749
- isAuthenticated() {
2750
- return this.uid != null;
2751
- }
2752
- /**
2753
- * Returns a key representing this user, suitable for inclusion in a
2754
- * dictionary.
2755
- */
2756
- toKey() {
2757
- return this.isAuthenticated() ? "uid:" + this.uid : "anonymous-user";
2758
- }
2759
- isEqual(i) {
2760
- return i.uid === this.uid;
2761
- }
2762
- }
2763
- V.UNAUTHENTICATED = new V(null), // TODO(mikelehen): Look into getting a proper uid-equivalent for
2764
- // non-FirebaseAuth providers.
2765
- V.GOOGLE_CREDENTIALS = new V("google-credentials-uid"), V.FIRST_PARTY = new V("first-party-uid"), V.MOCK_USER = new V("mock-user");
2766
- /**
2767
- * @license
2768
- * Copyright 2017 Google LLC
2769
- *
2770
- * Licensed under the Apache License, Version 2.0 (the "License");
2771
- * you may not use this file except in compliance with the License.
2772
- * You may obtain a copy of the License at
2773
- *
2774
- * http://www.apache.org/licenses/LICENSE-2.0
2775
- *
2776
- * Unless required by applicable law or agreed to in writing, software
2777
- * distributed under the License is distributed on an "AS IS" BASIS,
2778
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2779
- * See the License for the specific language governing permissions and
2780
- * limitations under the License.
2781
- */
2782
- let ae = "11.9.0";
2783
- /**
2784
- * @license
2785
- * Copyright 2017 Google LLC
2786
- *
2787
- * Licensed under the Apache License, Version 2.0 (the "License");
2788
- * you may not use this file except in compliance with the License.
2789
- * You may obtain a copy of the License at
2790
- *
2791
- * http://www.apache.org/licenses/LICENSE-2.0
2792
- *
2793
- * Unless required by applicable law or agreed to in writing, software
2794
- * distributed under the License is distributed on an "AS IS" BASIS,
2795
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2796
- * See the License for the specific language governing permissions and
2797
- * limitations under the License.
2798
- */
2799
- const oe = new Ti("@firebase/firestore");
2800
- function X(r, ...i) {
2801
- if (oe.logLevel <= C.DEBUG) {
2802
- const o = i.map(Ii);
2803
- oe.debug(`Firestore (${ae}): ${r}`, ...o);
2804
- }
2805
- }
2806
- function vi(r, ...i) {
2807
- if (oe.logLevel <= C.ERROR) {
2808
- const o = i.map(Ii);
2809
- oe.error(`Firestore (${ae}): ${r}`, ...o);
2810
- }
2811
- }
2812
- function Ii(r) {
2813
- if (typeof r == "string") return r;
2814
- try {
2815
- /**
2816
- * @license
2817
- * Copyright 2020 Google LLC
2818
- *
2819
- * Licensed under the Apache License, Version 2.0 (the "License");
2820
- * you may not use this file except in compliance with the License.
2821
- * You may obtain a copy of the License at
2822
- *
2823
- * http://www.apache.org/licenses/LICENSE-2.0
2824
- *
2825
- * Unless required by applicable law or agreed to in writing, software
2826
- * distributed under the License is distributed on an "AS IS" BASIS,
2827
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2828
- * See the License for the specific language governing permissions and
2829
- * limitations under the License.
2830
- */
2831
- return function(o) {
2832
- return JSON.stringify(o);
2833
- }(r);
2834
- } catch {
2835
- return r;
2836
- }
2837
- }
2838
- /**
2839
- * @license
2840
- * Copyright 2017 Google LLC
2841
- *
2842
- * Licensed under the Apache License, Version 2.0 (the "License");
2843
- * you may not use this file except in compliance with the License.
2844
- * You may obtain a copy of the License at
2845
- *
2846
- * http://www.apache.org/licenses/LICENSE-2.0
2847
- *
2848
- * Unless required by applicable law or agreed to in writing, software
2849
- * distributed under the License is distributed on an "AS IS" BASIS,
2850
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2851
- * See the License for the specific language governing permissions and
2852
- * limitations under the License.
2853
- */
2854
- function Cr(r, i, o) {
2855
- let u = "Unexpected state";
2856
- typeof i == "string" ? u = i : o = i, Di(r, u, o);
2857
- }
2858
- function Di(r, i, o) {
2859
- let u = `FIRESTORE (${ae}) INTERNAL ASSERTION FAILED: ${i} (ID: ${r.toString(16)})`;
2860
- if (o !== void 0) try {
2861
- u += " CONTEXT: " + JSON.stringify(o);
2862
- } catch {
2863
- u += " CONTEXT: " + o;
2864
- }
2865
- throw vi(u), new Error(u);
2866
- }
2867
- function xt(r, i, o, u) {
2868
- let d = "Unexpected state";
2869
- typeof o == "string" ? d = o : u = o, r || Di(i, d, u);
2870
- }
2871
- /**
2872
- * @license
2873
- * Copyright 2017 Google LLC
2874
- *
2875
- * Licensed under the Apache License, Version 2.0 (the "License");
2876
- * you may not use this file except in compliance with the License.
2877
- * You may obtain a copy of the License at
2878
- *
2879
- * http://www.apache.org/licenses/LICENSE-2.0
2880
- *
2881
- * Unless required by applicable law or agreed to in writing, software
2882
- * distributed under the License is distributed on an "AS IS" BASIS,
2883
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2884
- * See the License for the specific language governing permissions and
2885
- * limitations under the License.
2886
- */
2887
- const K = {
2888
- // Causes are copied from:
2889
- // https://github.com/grpc/grpc/blob/bceec94ea4fc5f0085d81235d8e1c06798dc341a/include/grpc%2B%2B/impl/codegen/status_code_enum.h
2890
- /** Not an error; returned on success. */
2891
- OK: "ok",
2892
- /** The operation was cancelled (typically by the caller). */
2893
- CANCELLED: "cancelled",
2894
- /** Unknown error or an error from a different error domain. */
2895
- UNKNOWN: "unknown",
2896
- /**
2897
- * Client specified an invalid argument. Note that this differs from
2898
- * FAILED_PRECONDITION. INVALID_ARGUMENT indicates arguments that are
2899
- * problematic regardless of the state of the system (e.g., a malformed file
2900
- * name).
2901
- */
2902
- INVALID_ARGUMENT: "invalid-argument",
2903
- /**
2904
- * Deadline expired before operation could complete. For operations that
2905
- * change the state of the system, this error may be returned even if the
2906
- * operation has completed successfully. For example, a successful response
2907
- * from a server could have been delayed long enough for the deadline to
2908
- * expire.
2909
- */
2910
- DEADLINE_EXCEEDED: "deadline-exceeded",
2911
- /** Some requested entity (e.g., file or directory) was not found. */
2912
- NOT_FOUND: "not-found",
2913
- /**
2914
- * Some entity that we attempted to create (e.g., file or directory) already
2915
- * exists.
2916
- */
2917
- ALREADY_EXISTS: "already-exists",
2918
- /**
2919
- * The caller does not have permission to execute the specified operation.
2920
- * PERMISSION_DENIED must not be used for rejections caused by exhausting
2921
- * some resource (use RESOURCE_EXHAUSTED instead for those errors).
2922
- * PERMISSION_DENIED must not be used if the caller cannot be identified
2923
- * (use UNAUTHENTICATED instead for those errors).
2924
- */
2925
- PERMISSION_DENIED: "permission-denied",
2926
- /**
2927
- * The request does not have valid authentication credentials for the
2928
- * operation.
2929
- */
2930
- UNAUTHENTICATED: "unauthenticated",
2931
- /**
2932
- * Some resource has been exhausted, perhaps a per-user quota, or perhaps the
2933
- * entire file system is out of space.
2934
- */
2935
- RESOURCE_EXHAUSTED: "resource-exhausted",
2936
- /**
2937
- * Operation was rejected because the system is not in a state required for
2938
- * the operation's execution. For example, directory to be deleted may be
2939
- * non-empty, an rmdir operation is applied to a non-directory, etc.
2940
- *
2941
- * A litmus test that may help a service implementor in deciding
2942
- * between FAILED_PRECONDITION, ABORTED, and UNAVAILABLE:
2943
- * (a) Use UNAVAILABLE if the client can retry just the failing call.
2944
- * (b) Use ABORTED if the client should retry at a higher-level
2945
- * (e.g., restarting a read-modify-write sequence).
2946
- * (c) Use FAILED_PRECONDITION if the client should not retry until
2947
- * the system state has been explicitly fixed. E.g., if an "rmdir"
2948
- * fails because the directory is non-empty, FAILED_PRECONDITION
2949
- * should be returned since the client should not retry unless
2950
- * they have first fixed up the directory by deleting files from it.
2951
- * (d) Use FAILED_PRECONDITION if the client performs conditional
2952
- * REST Get/Update/Delete on a resource and the resource on the
2953
- * server does not match the condition. E.g., conflicting
2954
- * read-modify-write on the same resource.
2955
- */
2956
- FAILED_PRECONDITION: "failed-precondition",
2957
- /**
2958
- * The operation was aborted, typically due to a concurrency issue like
2959
- * sequencer check failures, transaction aborts, etc.
2960
- *
2961
- * See litmus test above for deciding between FAILED_PRECONDITION, ABORTED,
2962
- * and UNAVAILABLE.
2963
- */
2964
- ABORTED: "aborted",
2965
- /**
2966
- * Operation was attempted past the valid range. E.g., seeking or reading
2967
- * past end of file.
2968
- *
2969
- * Unlike INVALID_ARGUMENT, this error indicates a problem that may be fixed
2970
- * if the system state changes. For example, a 32-bit file system will
2971
- * generate INVALID_ARGUMENT if asked to read at an offset that is not in the
2972
- * range [0,2^32-1], but it will generate OUT_OF_RANGE if asked to read from
2973
- * an offset past the current file size.
2974
- *
2975
- * There is a fair bit of overlap between FAILED_PRECONDITION and
2976
- * OUT_OF_RANGE. We recommend using OUT_OF_RANGE (the more specific error)
2977
- * when it applies so that callers who are iterating through a space can
2978
- * easily look for an OUT_OF_RANGE error to detect when they are done.
2979
- */
2980
- OUT_OF_RANGE: "out-of-range",
2981
- /** Operation is not implemented or not supported/enabled in this service. */
2982
- UNIMPLEMENTED: "unimplemented",
2983
- /**
2984
- * Internal errors. Means some invariants expected by underlying System has
2985
- * been broken. If you see one of these errors, Something is very broken.
2986
- */
2987
- INTERNAL: "internal",
2988
- /**
2989
- * The service is currently unavailable. This is a most likely a transient
2990
- * condition and may be corrected by retrying with a backoff.
2991
- *
2992
- * See litmus test above for deciding between FAILED_PRECONDITION, ABORTED,
2993
- * and UNAVAILABLE.
2994
- */
2995
- UNAVAILABLE: "unavailable",
2996
- /** Unrecoverable data loss or corruption. */
2997
- DATA_LOSS: "data-loss"
2998
- };
2999
- class W extends mt {
3000
- /** @hideconstructor */
3001
- constructor(i, o) {
3002
- super(i, o), this.code = i, this.message = o, // HACK: We write a toString property directly because Error is not a real
3003
- // class and so inheritance does not work correctly. We could alternatively
3004
- // do the same "back-door inheritance" trick that FirebaseError does.
3005
- this.toString = () => `${this.name}: [code=${this.code}]: ${this.message}`;
3006
- }
3007
- }
3008
- /**
3009
- * @license
3010
- * Copyright 2017 Google LLC
3011
- *
3012
- * Licensed under the Apache License, Version 2.0 (the "License");
3013
- * you may not use this file except in compliance with the License.
3014
- * You may obtain a copy of the License at
3015
- *
3016
- * http://www.apache.org/licenses/LICENSE-2.0
3017
- *
3018
- * Unless required by applicable law or agreed to in writing, software
3019
- * distributed under the License is distributed on an "AS IS" BASIS,
3020
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3021
- * See the License for the specific language governing permissions and
3022
- * limitations under the License.
3023
- */
3024
- class kt {
3025
- constructor() {
3026
- this.promise = new Promise((i, o) => {
3027
- this.resolve = i, this.reject = o;
3028
- });
3029
- }
3030
- }
3031
- /**
3032
- * @license
3033
- * Copyright 2017 Google LLC
3034
- *
3035
- * Licensed under the Apache License, Version 2.0 (the "License");
3036
- * you may not use this file except in compliance with the License.
3037
- * You may obtain a copy of the License at
3038
- *
3039
- * http://www.apache.org/licenses/LICENSE-2.0
3040
- *
3041
- * Unless required by applicable law or agreed to in writing, software
3042
- * distributed under the License is distributed on an "AS IS" BASIS,
3043
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3044
- * See the License for the specific language governing permissions and
3045
- * limitations under the License.
3046
- */
3047
- class Or {
3048
- constructor(i, o) {
3049
- this.user = o, this.type = "OAuth", this.headers = /* @__PURE__ */ new Map(), this.headers.set("Authorization", `Bearer ${i}`);
3050
- }
3051
- }
3052
- class Nr {
3053
- getToken() {
3054
- return Promise.resolve(null);
3055
- }
3056
- invalidateToken() {
3057
- }
3058
- start(i, o) {
3059
- i.enqueueRetryable(() => o(V.UNAUTHENTICATED));
3060
- }
3061
- shutdown() {
3062
- }
3063
- }
3064
- class Ur {
3065
- constructor(i) {
3066
- this.t = i, /** Tracks the current User. */
3067
- this.currentUser = V.UNAUTHENTICATED, /**
3068
- * Counter used to detect if the token changed while a getToken request was
3069
- * outstanding.
3070
- */
3071
- this.i = 0, this.forceRefresh = !1, this.auth = null;
3072
- }
3073
- start(i, o) {
3074
- xt(this.o === void 0, 42304);
3075
- let u = this.i;
3076
- const d = (A) => this.i !== u ? (u = this.i, o(A)) : Promise.resolve();
3077
- let T = new kt();
3078
- this.o = () => {
3079
- this.i++, this.currentUser = this.u(), T.resolve(), T = new kt(), i.enqueueRetryable(() => d(this.currentUser));
3080
- };
3081
- const m = () => {
3082
- const A = T;
3083
- i.enqueueRetryable(async () => {
3084
- await A.promise, await d(this.currentUser);
3085
- });
3086
- }, y = (A) => {
3087
- X("FirebaseAuthCredentialsProvider", "Auth detected"), this.auth = A, this.o && (this.auth.addAuthTokenListener(this.o), m());
3088
- };
3089
- this.t.onInit((A) => y(A)), // Our users can initialize Auth right after Firestore, so we give it
3090
- // a chance to register itself with the component framework before we
3091
- // determine whether to start up in unauthenticated mode.
3092
- setTimeout(() => {
3093
- if (!this.auth) {
3094
- const A = this.t.getImmediate({
3095
- optional: !0
3096
- });
3097
- A ? y(A) : (
3098
- // If auth is still not available, proceed with `null` user
3099
- (X("FirebaseAuthCredentialsProvider", "Auth not yet detected"), T.resolve(), T = new kt())
3100
- );
3101
- }
3102
- }, 0), m();
3103
- }
3104
- getToken() {
3105
- const i = this.i, o = this.forceRefresh;
3106
- return this.forceRefresh = !1, this.auth ? this.auth.getToken(o).then((u) => (
3107
- // Cancel the request since the token changed while the request was
3108
- // outstanding so the response is potentially for a previous user (which
3109
- // user, we can't be sure).
3110
- this.i !== i ? (X("FirebaseAuthCredentialsProvider", "getToken aborted due to token change."), this.getToken()) : u ? (xt(typeof u.accessToken == "string", 31837, {
3111
- l: u
3112
- }), new Or(u.accessToken, this.currentUser)) : null
3113
- )) : Promise.resolve(null);
3114
- }
3115
- invalidateToken() {
3116
- this.forceRefresh = !0;
3117
- }
3118
- shutdown() {
3119
- this.auth && this.o && this.auth.removeAuthTokenListener(this.o), this.o = void 0;
3120
- }
3121
- // Auth.getUid() can return null even with a user logged in. It is because
3122
- // getUid() is synchronous, but the auth code populating Uid is asynchronous.
3123
- // This method should only be called in the AuthTokenListener callback
3124
- // to guarantee to get the actual user.
3125
- u() {
3126
- const i = this.auth && this.auth.getUid();
3127
- return xt(i === null || typeof i == "string", 2055, {
3128
- h: i
3129
- }), new V(i);
3130
- }
3131
- }
3132
- class Lr {
3133
- constructor(i, o, u) {
3134
- this.P = i, this.T = o, this.I = u, this.type = "FirstParty", this.user = V.FIRST_PARTY, this.A = /* @__PURE__ */ new Map();
3135
- }
3136
- /**
3137
- * Gets an authorization token, using a provided factory function, or return
3138
- * null.
3139
- */
3140
- R() {
3141
- return this.I ? this.I() : null;
3142
- }
3143
- get headers() {
3144
- this.A.set("X-Goog-AuthUser", this.P);
3145
- const i = this.R();
3146
- return i && this.A.set("Authorization", i), this.T && this.A.set("X-Goog-Iam-Authorization-Token", this.T), this.A;
3147
- }
3148
- }
3149
- class Pr {
3150
- constructor(i, o, u) {
3151
- this.P = i, this.T = o, this.I = u;
3152
- }
3153
- getToken() {
3154
- return Promise.resolve(new Lr(this.P, this.T, this.I));
3155
- }
3156
- start(i, o) {
3157
- i.enqueueRetryable(() => o(V.FIRST_PARTY));
3158
- }
3159
- shutdown() {
3160
- }
3161
- invalidateToken() {
3162
- }
3163
- }
3164
- class si {
3165
- constructor(i) {
3166
- this.value = i, this.type = "AppCheck", this.headers = /* @__PURE__ */ new Map(), i && i.length > 0 && this.headers.set("x-firebase-appcheck", this.value);
3167
- }
3168
- }
3169
- class br {
3170
- constructor(i, o) {
3171
- this.V = o, this.forceRefresh = !1, this.appCheck = null, this.m = null, this.p = null, pr(i) && i.settings.appCheckToken && (this.p = i.settings.appCheckToken);
3172
- }
3173
- start(i, o) {
3174
- xt(this.o === void 0, 3512);
3175
- const u = (T) => {
3176
- T.error != null && X("FirebaseAppCheckTokenProvider", `Error getting App Check token; using placeholder token instead. Error: ${T.error.message}`);
3177
- const m = T.token !== this.m;
3178
- return this.m = T.token, X("FirebaseAppCheckTokenProvider", `Received ${m ? "new" : "existing"} token.`), m ? o(T.token) : Promise.resolve();
3179
- };
3180
- this.o = (T) => {
3181
- i.enqueueRetryable(() => u(T));
3182
- };
3183
- const d = (T) => {
3184
- X("FirebaseAppCheckTokenProvider", "AppCheck detected"), this.appCheck = T, this.o && this.appCheck.addTokenListener(this.o);
3185
- };
3186
- this.V.onInit((T) => d(T)), // Our users can initialize AppCheck after Firestore, so we give it
3187
- // a chance to register itself with the component framework.
3188
- setTimeout(() => {
3189
- if (!this.appCheck) {
3190
- const T = this.V.getImmediate({
3191
- optional: !0
3192
- });
3193
- T ? d(T) : (
3194
- // If AppCheck is still not available, proceed without it.
3195
- X("FirebaseAppCheckTokenProvider", "AppCheck not yet detected")
3196
- );
3197
- }
3198
- }, 0);
3199
- }
3200
- getToken() {
3201
- if (this.p) return Promise.resolve(new si(this.p));
3202
- const i = this.forceRefresh;
3203
- return this.forceRefresh = !1, this.appCheck ? this.appCheck.getToken(i).then((o) => o ? (xt(typeof o.token == "string", 44558, {
3204
- tokenResult: o
3205
- }), this.m = o.token, new si(o.token)) : null) : Promise.resolve(null);
3206
- }
3207
- invalidateToken() {
3208
- this.forceRefresh = !0;
3209
- }
3210
- shutdown() {
3211
- this.appCheck && this.o && this.appCheck.removeTokenListener(this.o), this.o = void 0;
3212
- }
3213
- }
3214
- function Mr(r) {
3215
- return r.name === "IndexedDbTransactionError";
3216
- }
3217
- const ri = "(default)";
3218
- class he {
3219
- constructor(i, o) {
3220
- this.projectId = i, this.database = o || ri;
3221
- }
3222
- static empty() {
3223
- return new he("", "");
3224
- }
3225
- get isDefaultDatabase() {
3226
- return this.database === ri;
3227
- }
3228
- isEqual(i) {
3229
- return i instanceof he && i.projectId === this.projectId && i.database === this.database;
3230
- }
3231
- }
3232
- /**
3233
- * @license
3234
- * Copyright 2017 Google LLC
3235
- *
3236
- * Licensed under the Apache License, Version 2.0 (the "License");
3237
- * you may not use this file except in compliance with the License.
3238
- * You may obtain a copy of the License at
3239
- *
3240
- * http://www.apache.org/licenses/LICENSE-2.0
3241
- *
3242
- * Unless required by applicable law or agreed to in writing, software
3243
- * distributed under the License is distributed on an "AS IS" BASIS,
3244
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3245
- * See the License for the specific language governing permissions and
3246
- * limitations under the License.
3247
- */
3248
- var oi, v;
3249
- (v = oi || (oi = {}))[v.OK = 0] = "OK", v[v.CANCELLED = 1] = "CANCELLED", v[v.UNKNOWN = 2] = "UNKNOWN", v[v.INVALID_ARGUMENT = 3] = "INVALID_ARGUMENT", v[v.DEADLINE_EXCEEDED = 4] = "DEADLINE_EXCEEDED", v[v.NOT_FOUND = 5] = "NOT_FOUND", v[v.ALREADY_EXISTS = 6] = "ALREADY_EXISTS", v[v.PERMISSION_DENIED = 7] = "PERMISSION_DENIED", v[v.UNAUTHENTICATED = 16] = "UNAUTHENTICATED", v[v.RESOURCE_EXHAUSTED = 8] = "RESOURCE_EXHAUSTED", v[v.FAILED_PRECONDITION = 9] = "FAILED_PRECONDITION", v[v.ABORTED = 10] = "ABORTED", v[v.OUT_OF_RANGE = 11] = "OUT_OF_RANGE", v[v.UNIMPLEMENTED = 12] = "UNIMPLEMENTED", v[v.INTERNAL = 13] = "INTERNAL", v[v.UNAVAILABLE = 14] = "UNAVAILABLE", v[v.DATA_LOSS = 15] = "DATA_LOSS";
3250
- /**
3251
- * @license
3252
- * Copyright 2022 Google LLC
3253
- *
3254
- * Licensed under the Apache License, Version 2.0 (the "License");
3255
- * you may not use this file except in compliance with the License.
3256
- * You may obtain a copy of the License at
3257
- *
3258
- * http://www.apache.org/licenses/LICENSE-2.0
3259
- *
3260
- * Unless required by applicable law or agreed to in writing, software
3261
- * distributed under the License is distributed on an "AS IS" BASIS,
3262
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3263
- * See the License for the specific language governing permissions and
3264
- * limitations under the License.
3265
- */
3266
- new Ri([4294967295, 4294967295], 0);
3267
- /**
3268
- * @license
3269
- * Copyright 2018 Google LLC
3270
- *
3271
- * Licensed under the Apache License, Version 2.0 (the "License");
3272
- * you may not use this file except in compliance with the License.
3273
- * You may obtain a copy of the License at
3274
- *
3275
- * http://www.apache.org/licenses/LICENSE-2.0
3276
- *
3277
- * Unless required by applicable law or agreed to in writing, software
3278
- * distributed under the License is distributed on an "AS IS" BASIS,
3279
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3280
- * See the License for the specific language governing permissions and
3281
- * limitations under the License.
3282
- */
3283
- const Br = 41943040;
3284
- /**
3285
- * @license
3286
- * Copyright 2020 Google LLC
3287
- *
3288
- * Licensed under the Apache License, Version 2.0 (the "License");
3289
- * you may not use this file except in compliance with the License.
3290
- * You may obtain a copy of the License at
3291
- *
3292
- * http://www.apache.org/licenses/LICENSE-2.0
3293
- *
3294
- * Unless required by applicable law or agreed to in writing, software
3295
- * distributed under the License is distributed on an "AS IS" BASIS,
3296
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3297
- * See the License for the specific language governing permissions and
3298
- * limitations under the License.
3299
- */
3300
- const xr = 1048576;
3301
- function Fe() {
3302
- return typeof document < "u" ? document : null;
3303
- }
3304
- /**
3305
- * @license
3306
- * Copyright 2017 Google LLC
3307
- *
3308
- * Licensed under the Apache License, Version 2.0 (the "License");
3309
- * you may not use this file except in compliance with the License.
3310
- * You may obtain a copy of the License at
3311
- *
3312
- * http://www.apache.org/licenses/LICENSE-2.0
3313
- *
3314
- * Unless required by applicable law or agreed to in writing, software
3315
- * distributed under the License is distributed on an "AS IS" BASIS,
3316
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3317
- * See the License for the specific language governing permissions and
3318
- * limitations under the License.
3319
- */
3320
- class kr {
3321
- constructor(i, o, u = 1e3, d = 1.5, T = 6e4) {
3322
- this.xi = i, this.timerId = o, this.A_ = u, this.R_ = d, this.V_ = T, this.m_ = 0, this.f_ = null, /** The last backoff attempt, as epoch milliseconds. */
3323
- this.g_ = Date.now(), this.reset();
3324
- }
3325
- /**
3326
- * Resets the backoff delay.
3327
- *
3328
- * The very next backoffAndWait() will have no delay. If it is called again
3329
- * (i.e. due to an error), initialDelayMs (plus jitter) will be used, and
3330
- * subsequent ones will increase according to the backoffFactor.
3331
- */
3332
- reset() {
3333
- this.m_ = 0;
3334
- }
3335
- /**
3336
- * Resets the backoff delay to the maximum delay (e.g. for use after a
3337
- * RESOURCE_EXHAUSTED error).
3338
- */
3339
- p_() {
3340
- this.m_ = this.V_;
3341
- }
3342
- /**
3343
- * Returns a promise that resolves after currentDelayMs, and increases the
3344
- * delay for any subsequent attempts. If there was a pending backoff operation
3345
- * already, it will be canceled.
3346
- */
3347
- y_(i) {
3348
- this.cancel();
3349
- const o = Math.floor(this.m_ + this.w_()), u = Math.max(0, Date.now() - this.g_), d = Math.max(0, o - u);
3350
- d > 0 && X("ExponentialBackoff", `Backing off for ${d} ms (base delay: ${this.m_} ms, delay with jitter: ${o} ms, last attempt: ${u} ms ago)`), this.f_ = this.xi.enqueueAfterDelay(this.timerId, d, () => (this.g_ = Date.now(), i())), // Apply backoff factor to determine next delay and ensure it is within
3351
- // bounds.
3352
- this.m_ *= this.R_, this.m_ < this.A_ && (this.m_ = this.A_), this.m_ > this.V_ && (this.m_ = this.V_);
3353
- }
3354
- b_() {
3355
- this.f_ !== null && (this.f_.skipDelay(), this.f_ = null);
3356
- }
3357
- cancel() {
3358
- this.f_ !== null && (this.f_.cancel(), this.f_ = null);
3359
- }
3360
- /** Returns a random value in the range [-currentBaseMs/2, currentBaseMs/2] */
3361
- w_() {
3362
- return (Math.random() - 0.5) * this.m_;
3363
- }
3364
- }
3365
- /**
3366
- * @license
3367
- * Copyright 2017 Google LLC
3368
- *
3369
- * Licensed under the Apache License, Version 2.0 (the "License");
3370
- * you may not use this file except in compliance with the License.
3371
- * You may obtain a copy of the License at
3372
- *
3373
- * http://www.apache.org/licenses/LICENSE-2.0
3374
- *
3375
- * Unless required by applicable law or agreed to in writing, software
3376
- * distributed under the License is distributed on an "AS IS" BASIS,
3377
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3378
- * See the License for the specific language governing permissions and
3379
- * limitations under the License.
3380
- */
3381
- class $e {
3382
- constructor(i, o, u, d, T) {
3383
- this.asyncQueue = i, this.timerId = o, this.targetTimeMs = u, this.op = d, this.removalCallback = T, this.deferred = new kt(), this.then = this.deferred.promise.then.bind(this.deferred.promise), // It's normal for the deferred promise to be canceled (due to cancellation)
3384
- // and so we attach a dummy catch callback to avoid
3385
- // 'UnhandledPromiseRejectionWarning' log spam.
3386
- this.deferred.promise.catch((m) => {
3387
- });
3388
- }
3389
- get promise() {
3390
- return this.deferred.promise;
3391
- }
3392
- /**
3393
- * Creates and returns a DelayedOperation that has been scheduled to be
3394
- * executed on the provided asyncQueue after the provided delayMs.
3395
- *
3396
- * @param asyncQueue - The queue to schedule the operation on.
3397
- * @param id - A Timer ID identifying the type of operation this is.
3398
- * @param delayMs - The delay (ms) before the operation should be scheduled.
3399
- * @param op - The operation to run.
3400
- * @param removalCallback - A callback to be called synchronously once the
3401
- * operation is executed or canceled, notifying the AsyncQueue to remove it
3402
- * from its delayedOperations list.
3403
- * PORTING NOTE: This exists to prevent making removeDelayedOperation() and
3404
- * the DelayedOperation class public.
3405
- */
3406
- static createAndSchedule(i, o, u, d, T) {
3407
- const m = Date.now() + u, y = new $e(i, o, m, d, T);
3408
- return y.start(u), y;
3409
- }
3410
- /**
3411
- * Starts the timer. This is called immediately after construction by
3412
- * createAndSchedule().
3413
- */
3414
- start(i) {
3415
- this.timerHandle = setTimeout(() => this.handleDelayElapsed(), i);
3416
- }
3417
- /**
3418
- * Queues the operation to run immediately (if it hasn't already been run or
3419
- * canceled).
3420
- */
3421
- skipDelay() {
3422
- return this.handleDelayElapsed();
3423
- }
3424
- /**
3425
- * Cancels the operation if it hasn't already been executed or canceled. The
3426
- * promise will be rejected.
3427
- *
3428
- * As long as the operation has not yet been run, calling cancel() provides a
3429
- * guarantee that the operation will not be run.
3430
- */
3431
- cancel(i) {
3432
- this.timerHandle !== null && (this.clearTimeout(), this.deferred.reject(new W(K.CANCELLED, "Operation cancelled" + (i ? ": " + i : ""))));
3433
- }
3434
- handleDelayElapsed() {
3435
- this.asyncQueue.enqueueAndForget(() => this.timerHandle !== null ? (this.clearTimeout(), this.op().then((i) => this.deferred.resolve(i))) : Promise.resolve());
3436
- }
3437
- clearTimeout() {
3438
- this.timerHandle !== null && (this.removalCallback(this), clearTimeout(this.timerHandle), this.timerHandle = null);
3439
- }
3440
- }
3441
- var hi, ai;
3442
- (ai = hi || (hi = {})).xa = "default", /** Listen to changes in cache only */
3443
- ai.Cache = "cache";
3444
- /**
3445
- * @license
3446
- * Copyright 2023 Google LLC
3447
- *
3448
- * Licensed under the Apache License, Version 2.0 (the "License");
3449
- * you may not use this file except in compliance with the License.
3450
- * You may obtain a copy of the License at
3451
- *
3452
- * http://www.apache.org/licenses/LICENSE-2.0
3453
- *
3454
- * Unless required by applicable law or agreed to in writing, software
3455
- * distributed under the License is distributed on an "AS IS" BASIS,
3456
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3457
- * See the License for the specific language governing permissions and
3458
- * limitations under the License.
3459
- */
3460
- function Fr(r) {
3461
- const i = {};
3462
- return r.timeoutSeconds !== void 0 && (i.timeoutSeconds = r.timeoutSeconds), i;
3463
- }
3464
- /**
3465
- * @license
3466
- * Copyright 2020 Google LLC
3467
- *
3468
- * Licensed under the Apache License, Version 2.0 (the "License");
3469
- * you may not use this file except in compliance with the License.
3470
- * You may obtain a copy of the License at
3471
- *
3472
- * http://www.apache.org/licenses/LICENSE-2.0
3473
- *
3474
- * Unless required by applicable law or agreed to in writing, software
3475
- * distributed under the License is distributed on an "AS IS" BASIS,
3476
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3477
- * See the License for the specific language governing permissions and
3478
- * limitations under the License.
3479
- */
3480
- const li = /* @__PURE__ */ new Map();
3481
- function Hr(r, i, o, u) {
3482
- if (i === !0 && u === !0) throw new W(K.INVALID_ARGUMENT, `${r} and ${o} cannot be used together.`);
3483
- }
3484
- /**
3485
- * @license
3486
- * Copyright 2020 Google LLC
3487
- *
3488
- * Licensed under the Apache License, Version 2.0 (the "License");
3489
- * you may not use this file except in compliance with the License.
3490
- * You may obtain a copy of the License at
3491
- *
3492
- * http://www.apache.org/licenses/LICENSE-2.0
3493
- *
3494
- * Unless required by applicable law or agreed to in writing, software
3495
- * distributed under the License is distributed on an "AS IS" BASIS,
3496
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3497
- * See the License for the specific language governing permissions and
3498
- * limitations under the License.
3499
- */
3500
- const jr = "firestore.googleapis.com", ci = !0;
3501
- class ui {
3502
- constructor(i) {
3503
- var o, u;
3504
- if (i.host === void 0) {
3505
- if (i.ssl !== void 0) throw new W(K.INVALID_ARGUMENT, "Can't provide ssl option if host option is not set");
3506
- this.host = jr, this.ssl = ci;
3507
- } else this.host = i.host, this.ssl = (o = i.ssl) !== null && o !== void 0 ? o : ci;
3508
- if (this.isUsingEmulator = i.emulatorOptions !== void 0, this.credentials = i.credentials, this.ignoreUndefinedProperties = !!i.ignoreUndefinedProperties, this.localCache = i.localCache, i.cacheSizeBytes === void 0) this.cacheSizeBytes = Br;
3509
- else {
3510
- if (i.cacheSizeBytes !== -1 && i.cacheSizeBytes < xr) throw new W(K.INVALID_ARGUMENT, "cacheSizeBytes must be at least 1048576");
3511
- this.cacheSizeBytes = i.cacheSizeBytes;
3512
- }
3513
- Hr("experimentalForceLongPolling", i.experimentalForceLongPolling, "experimentalAutoDetectLongPolling", i.experimentalAutoDetectLongPolling), this.experimentalForceLongPolling = !!i.experimentalForceLongPolling, this.experimentalForceLongPolling ? this.experimentalAutoDetectLongPolling = !1 : i.experimentalAutoDetectLongPolling === void 0 ? this.experimentalAutoDetectLongPolling = !0 : (
3514
- // For backwards compatibility, coerce the value to boolean even though
3515
- // the TypeScript compiler has narrowed the type to boolean already.
3516
- // noinspection PointlessBooleanExpressionJS
3517
- this.experimentalAutoDetectLongPolling = !!i.experimentalAutoDetectLongPolling
3518
- ), this.experimentalLongPollingOptions = Fr((u = i.experimentalLongPollingOptions) !== null && u !== void 0 ? u : {}), function(T) {
3519
- if (T.timeoutSeconds !== void 0) {
3520
- if (isNaN(T.timeoutSeconds)) throw new W(K.INVALID_ARGUMENT, `invalid long polling timeout: ${T.timeoutSeconds} (must not be NaN)`);
3521
- if (T.timeoutSeconds < 5) throw new W(K.INVALID_ARGUMENT, `invalid long polling timeout: ${T.timeoutSeconds} (minimum allowed value is 5)`);
3522
- if (T.timeoutSeconds > 30) throw new W(K.INVALID_ARGUMENT, `invalid long polling timeout: ${T.timeoutSeconds} (maximum allowed value is 30)`);
3523
- }
3524
- }(this.experimentalLongPollingOptions), this.useFetchStreams = !!i.useFetchStreams;
3525
- }
3526
- isEqual(i) {
3527
- return this.host === i.host && this.ssl === i.ssl && this.credentials === i.credentials && this.cacheSizeBytes === i.cacheSizeBytes && this.experimentalForceLongPolling === i.experimentalForceLongPolling && this.experimentalAutoDetectLongPolling === i.experimentalAutoDetectLongPolling && function(u, d) {
3528
- return u.timeoutSeconds === d.timeoutSeconds;
3529
- }(this.experimentalLongPollingOptions, i.experimentalLongPollingOptions) && this.ignoreUndefinedProperties === i.ignoreUndefinedProperties && this.useFetchStreams === i.useFetchStreams;
3530
- }
3531
- }
3532
- class Vr {
3533
- /** @hideconstructor */
3534
- constructor(i, o, u, d) {
3535
- this._authCredentials = i, this._appCheckCredentials = o, this._databaseId = u, this._app = d, /**
3536
- * Whether it's a Firestore or Firestore Lite instance.
3537
- */
3538
- this.type = "firestore-lite", this._persistenceKey = "(lite)", this._settings = new ui({}), this._settingsFrozen = !1, this._emulatorOptions = {}, // A task that is assigned when the terminate() is invoked and resolved when
3539
- // all components have shut down. Otherwise, Firestore is not terminated,
3540
- // which can mean either the FirestoreClient is in the process of starting,
3541
- // or restarting.
3542
- this._terminateTask = "notTerminated";
3543
- }
3544
- /**
3545
- * The {@link @firebase/app#FirebaseApp} associated with this `Firestore` service
3546
- * instance.
3547
- */
3548
- get app() {
3549
- if (!this._app) throw new W(K.FAILED_PRECONDITION, "Firestore was not initialized using the Firebase SDK. 'app' is not available");
3550
- return this._app;
3551
- }
3552
- get _initialized() {
3553
- return this._settingsFrozen;
3554
- }
3555
- get _terminated() {
3556
- return this._terminateTask !== "notTerminated";
3557
- }
3558
- _setSettings(i) {
3559
- if (this._settingsFrozen) throw new W(K.FAILED_PRECONDITION, "Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");
3560
- this._settings = new ui(i), this._emulatorOptions = i.emulatorOptions || {}, i.credentials !== void 0 && (this._authCredentials = function(u) {
3561
- if (!u) return new Nr();
3562
- switch (u.type) {
3563
- case "firstParty":
3564
- return new Pr(u.sessionIndex || "0", u.iamToken || null, u.authTokenFactory || null);
3565
- case "provider":
3566
- return u.client;
3567
- default:
3568
- throw new W(K.INVALID_ARGUMENT, "makeAuthCredentialsProvider failed due to invalid credential type");
3569
- }
3570
- }(i.credentials));
3571
- }
3572
- _getSettings() {
3573
- return this._settings;
3574
- }
3575
- _getEmulatorOptions() {
3576
- return this._emulatorOptions;
3577
- }
3578
- _freezeSettings() {
3579
- return this._settingsFrozen = !0, this._settings;
3580
- }
3581
- _delete() {
3582
- return this._terminateTask === "notTerminated" && (this._terminateTask = this._terminate()), this._terminateTask;
3583
- }
3584
- async _restart() {
3585
- this._terminateTask === "notTerminated" ? await this._terminate() : this._terminateTask = "notTerminated";
3586
- }
3587
- /** Returns a JSON-serializable representation of this `Firestore` instance. */
3588
- toJSON() {
3589
- return {
3590
- app: this._app,
3591
- databaseId: this._databaseId,
3592
- settings: this._settings
3593
- };
3594
- }
3595
- /**
3596
- * Terminates all components used by this client. Subclasses can override
3597
- * this method to clean up their own dependencies, but must also call this
3598
- * method.
3599
- *
3600
- * Only ever called once.
3601
- */
3602
- _terminate() {
3603
- return function(o) {
3604
- const u = li.get(o);
3605
- u && (X("ComponentProvider", "Removing Datastore"), li.delete(o), u.terminate());
3606
- }(this), Promise.resolve();
3607
- }
3608
- }
3609
- /**
3610
- * @license
3611
- * Copyright 2020 Google LLC
3612
- *
3613
- * Licensed under the Apache License, Version 2.0 (the "License");
3614
- * you may not use this file except in compliance with the License.
3615
- * You may obtain a copy of the License at
3616
- *
3617
- * http://www.apache.org/licenses/LICENSE-2.0
3618
- *
3619
- * Unless required by applicable law or agreed to in writing, software
3620
- * distributed under the License is distributed on an "AS IS" BASIS,
3621
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3622
- * See the License for the specific language governing permissions and
3623
- * limitations under the License.
3624
- */
3625
- const fi = "AsyncQueue";
3626
- class pi {
3627
- constructor(i = Promise.resolve()) {
3628
- this.Ju = [], // Is this AsyncQueue being shut down? Once it is set to true, it will not
3629
- // be changed again.
3630
- this.Yu = !1, // Operations scheduled to be queued in the future. Operations are
3631
- // automatically removed after they are run or canceled.
3632
- this.Zu = [], // visible for testing
3633
- this.Xu = null, // Flag set while there's an outstanding AsyncQueue operation, used for
3634
- // assertion sanity-checks.
3635
- this.ec = !1, // Enabled during shutdown on Safari to prevent future access to IndexedDB.
3636
- this.tc = !1, // List of TimerIds to fast-forward delays for.
3637
- this.nc = [], // Backoff timer used to schedule retries for retryable operations
3638
- this.x_ = new kr(
3639
- this,
3640
- "async_queue_retry"
3641
- /* TimerId.AsyncQueueRetry */
3642
- ), // Visibility handler that triggers an immediate retry of all retryable
3643
- // operations. Meant to speed up recovery when we regain file system access
3644
- // after page comes into foreground.
3645
- this.rc = () => {
3646
- const u = Fe();
3647
- u && X(fi, "Visibility state changed to " + u.visibilityState), this.x_.b_();
3648
- }, this.sc = i;
3649
- const o = Fe();
3650
- o && typeof o.addEventListener == "function" && o.addEventListener("visibilitychange", this.rc);
3651
- }
3652
- get isShuttingDown() {
3653
- return this.Yu;
3654
- }
3655
- /**
3656
- * Adds a new operation to the queue without waiting for it to complete (i.e.
3657
- * we ignore the Promise result).
3658
- */
3659
- enqueueAndForget(i) {
3660
- this.enqueue(i);
3661
- }
3662
- enqueueAndForgetEvenWhileRestricted(i) {
3663
- this.oc(), // eslint-disable-next-line @typescript-eslint/no-floating-promises
3664
- this._c(i);
3665
- }
3666
- enterRestrictedMode(i) {
3667
- if (!this.Yu) {
3668
- this.Yu = !0, this.tc = i || !1;
3669
- const o = Fe();
3670
- o && typeof o.removeEventListener == "function" && o.removeEventListener("visibilitychange", this.rc);
3671
- }
3672
- }
3673
- enqueue(i) {
3674
- if (this.oc(), this.Yu)
3675
- return new Promise(() => {
3676
- });
3677
- const o = new kt();
3678
- return this._c(() => this.Yu && this.tc ? Promise.resolve() : (i().then(o.resolve, o.reject), o.promise)).then(() => o.promise);
3679
- }
3680
- enqueueRetryable(i) {
3681
- this.enqueueAndForget(() => (this.Ju.push(i), this.ac()));
3682
- }
3683
- /**
3684
- * Runs the next operation from the retryable queue. If the operation fails,
3685
- * reschedules with backoff.
3686
- */
3687
- async ac() {
3688
- if (this.Ju.length !== 0) {
3689
- try {
3690
- await this.Ju[0](), this.Ju.shift(), this.x_.reset();
3691
- } catch (i) {
3692
- if (!Mr(i)) throw i;
3693
- X(fi, "Operation failed with retryable error: " + i);
3694
- }
3695
- this.Ju.length > 0 && // If there are additional operations, we re-schedule `retryNextOp()`.
3696
- // This is necessary to run retryable operations that failed during
3697
- // their initial attempt since we don't know whether they are already
3698
- // enqueued. If, for example, `op1`, `op2`, `op3` are enqueued and `op1`
3699
- // needs to be re-run, we will run `op1`, `op1`, `op2` using the
3700
- // already enqueued calls to `retryNextOp()`. `op3()` will then run in the
3701
- // call scheduled here.
3702
- // Since `backoffAndRun()` cancels an existing backoff and schedules a
3703
- // new backoff on every call, there is only ever a single additional
3704
- // operation in the queue.
3705
- this.x_.y_(() => this.ac());
3706
- }
3707
- }
3708
- _c(i) {
3709
- const o = this.sc.then(() => (this.ec = !0, i().catch((u) => {
3710
- throw this.Xu = u, this.ec = !1, vi("INTERNAL UNHANDLED ERROR: ", Ei(u)), u;
3711
- }).then((u) => (this.ec = !1, u))));
3712
- return this.sc = o, o;
3713
- }
3714
- enqueueAfterDelay(i, o, u) {
3715
- this.oc(), // Fast-forward delays for timerIds that have been overridden.
3716
- this.nc.indexOf(i) > -1 && (o = 0);
3717
- const d = $e.createAndSchedule(this, i, o, u, (T) => this.uc(T));
3718
- return this.Zu.push(d), d;
3719
- }
3720
- oc() {
3721
- this.Xu && Cr(47125, {
3722
- cc: Ei(this.Xu)
3723
- });
3724
- }
3725
- verifyOperationInProgress() {
3726
- }
3727
- /**
3728
- * Waits until all currently queued tasks are finished executing. Delayed
3729
- * operations are not run.
3730
- */
3731
- async lc() {
3732
- let i;
3733
- do
3734
- i = this.sc, await i;
3735
- while (i !== this.sc);
3736
- }
3737
- /**
3738
- * For Tests: Determine if a delayed operation with a particular TimerId
3739
- * exists.
3740
- */
3741
- hc(i) {
3742
- for (const o of this.Zu) if (o.timerId === i) return !0;
3743
- return !1;
3744
- }
3745
- /**
3746
- * For Tests: Runs some or all delayed operations early.
3747
- *
3748
- * @param lastTimerId - Delayed operations up to and including this TimerId
3749
- * will be drained. Pass TimerId.All to run all delayed operations.
3750
- * @returns a Promise that resolves once all operations have been run.
3751
- */
3752
- Pc(i) {
3753
- return this.lc().then(() => {
3754
- this.Zu.sort((o, u) => o.targetTimeMs - u.targetTimeMs);
3755
- for (const o of this.Zu) if (o.skipDelay(), i !== "all" && o.timerId === i) break;
3756
- return this.lc();
3757
- });
3758
- }
3759
- /**
3760
- * For Tests: Skip all subsequent delays for a timer id.
3761
- */
3762
- Tc(i) {
3763
- this.nc.push(i);
3764
- }
3765
- /** Called once a DelayedOperation is run or canceled. */
3766
- uc(i) {
3767
- const o = this.Zu.indexOf(i);
3768
- this.Zu.splice(o, 1);
3769
- }
3770
- }
3771
- function Ei(r) {
3772
- let i = r.message || "";
3773
- return r.stack && (i = r.stack.includes(r.message) ? r.stack : r.message + `
3774
- ` + r.stack), i;
3775
- }
3776
- class Qr extends Vr {
3777
- /** @hideconstructor */
3778
- constructor(i, o, u, d) {
3779
- super(i, o, u, d), /**
3780
- * Whether it's a {@link Firestore} or Firestore Lite instance.
3781
- */
3782
- this.type = "firestore", this._queue = new pi(), this._persistenceKey = (d == null ? void 0 : d.name) || "[DEFAULT]";
3783
- }
3784
- async _terminate() {
3785
- if (this._firestoreClient) {
3786
- const i = this._firestoreClient.terminate();
3787
- this._queue = new pi(i), this._firestoreClient = void 0, await i;
3788
- }
3789
- }
3790
- }
3791
- (function(i, o = !0) {
3792
- (function(d) {
3793
- ae = d;
3794
- })(gr), re(new se("firestore", (u, { instanceIdentifier: d, options: T }) => {
3795
- const m = u.getProvider("app").getImmediate(), y = new Qr(new Ur(u.getProvider("auth-internal")), new br(m, u.getProvider("app-check-internal")), function(R, q) {
3796
- if (!Object.prototype.hasOwnProperty.apply(R.options, ["projectId"])) throw new W(K.INVALID_ARGUMENT, '"projectId" not provided in firebase.initializeApp.');
3797
- return new he(R.options.projectId, q);
3798
- }(m, d), m);
3799
- return T = Object.assign({
3800
- useFetchStreams: o
3801
- }, T), y._setSettings(T), y;
3802
- }, "PUBLIC").setMultipleInstances(!0)), Tt(ni, ii, i), // BUILD_TARGET will be replaced by values like esm2017, cjs2017, etc during the compilation
3803
- Tt(ni, ii, "esm2017");
3804
- })();
3805
- const Gr = "AUTH_RESET", $r = "VALIDATE_PLAYER_REGISTER_BY_EMAIL_REQUEST", Yr = "AUTH_SCREEN_UPDATE", Kr = "REGISTER_PLAYER_BY_EMAIL_REQUEST", Wr = "VERIFY_REGISTER_BY_EMAIL_REQUEST", Xr = "REGISTER_STORE_BY_EMAIL_REQUEST", zr = "VALIDATE_STORE_REGISTER_BY_EMAIL_REQUEST", Jr = "VERIFY_STORE_REGISTER_BY_EMAIL_REQUEST", qr = "LOGIN_BY_EMAIL_REQUEST", Zr = "VALIDATE_LOGIN_REQUEST", to = "REGISTER_BY_EMAIL_REQUEST", eo = "VALIDATE_REGISTER_REQUEST", no = "USER_REF_REQUEST", io = "USER_REF_COUNT_REQUEST", so = "USER_TWITTER_INFO_REQUEST", ro = "USER_TWITTER_UPDATE_REQUEST", oo = "USER_MINIMAL_KYC_REQUEST", ho = "RESET_KYC", ao = "USER_BANK_REQUEST", lo = "ADD_BANK_REQUEST", co = "DELETE_BANK_REQUEST", uo = "PLAID_TOKEN_REQUEST", fo = "PLAID_CREATE_ITEM_REQUEST", po = "GET_IBAN_REQUEST", Eo = "IBAN_SEND_STATUS_START", go = "IBAN_SEND_STATUS_PROCESSING", _o = "IBAN_SEND_STATUS_FINISHED", To = "SET_IBAN_SEND_STATUS", mo = "SEND_FROM_IBAN_REQUEST", So = "USER_WALLET_REQUEST", yo = "ADD_WALLET_REQUEST", Ao = "ADD_WALLET_SUCCESS", Ro = "USER_ASSOCIATE_WALLET_REQUEST", vo = "ADD_ASSOCIATE_WALLET_REQUEST", Io = "ADD_ASSOCIATE_WALLET_SUCCESS", Do = "FETCH_AVAILABLE_TOKENS", wo = "FETCH_LINKED_WALLET_TOKENS", Co = "FETCH_EVER_WALLET_TOKENS", Oo = "FIAT_ASSETS_REQUEST", No = "FEATURE_CRYPTO_ASSETS", Uo = "CRYPTO_ASSETS_REQUEST", Lo = "CRYPTO_ASSETS_PAIRS_REQUEST", Po = "USER_DOCUMENTS_REQUEST", bo = "PREVIEW_DOCUMENT_REQUEST", Mo = "PREVIEW_IDENTITY_DOCUMENT_REQUEST", Bo = "PREVIEW_DOCUMENT_CLEAR", xo = "DELETE_DOCUMENT_REQUEST", ko = "UPLOAD_DOCUMENT_REQUEST", Fo = "NETWORK_LIST_REQUEST", Ho = "SUGGEST_GAS_REQUEST", jo = "SEND_NATIVE_TOKEN_REQUEST", Vo = "SEND_TOKEN_REQUEST", Qo = "HIDE_GAS_POPUP", Go = "CLEAR_SEND_TRX_ID", $o = "ORDER_LIST_REQUEST", Yo = "ORDER_ESTIMATE_REQUEST", Ko = "ORDER_CREATE_REQUEST", Wo = "ORDER_RESET_ESTIMATE", Xo = "ORDER_IBAN_PAYMENT_REQUEST", zo = "ORDER_CHECKOUT_PAYMENT_REQUEST", Jo = "ORDER_TYPE_REQUEST", qo = "ORDER_CARD_REQUEST", Zo = "STAKE_LIST_REQUEST", th = "STAKE_SET_REQUEST", eh = "STAKE_INITIAL_STATE", nh = "STAKE_FINISH_REQUEST", ih = "BRIDGE_MOVE_TO_ETHEREUM_GAS_REQUEST", sh = "BRIDGE_MOVE_TO_ETHEREUM_REQUEST", rh = "BRIDGE_MOVE_TO_EVERCHAIN_GAS_REQUEST", oh = "BRIDGE_MOVE_TO_EVERCHAIN_REQUEST", hh = "BRIDGE_RESET", ah = "RESET_PASSWORD_REQUEST", lh = "STORE_BALANCE_REQUEST", ch = "KYB_DOCUMENT_UPLOAD_REQUEST", uh = "KYB_APPLICATION_REQUEST";
3806
- export {
3807
- hh as $,
3808
- Gr as A,
3809
- fo as B,
3810
- lo as C,
3811
- mo as D,
3812
- To as E,
3813
- Do as F,
3814
- po as G,
3815
- ao as H,
3816
- co as I,
3817
- Oo as J,
3818
- ho as K,
3819
- qr as L,
3820
- oo as M,
3821
- ch as N,
3822
- Yo as O,
3823
- uo as P,
3824
- uh as Q,
3825
- to as R,
3826
- Zo as S,
3827
- _o as T,
3828
- So as U,
3829
- Zr as V,
3830
- Eo as W,
3831
- go as X,
3832
- Uo as Y,
3833
- Lo as Z,
3834
- No as _,
3835
- $r as a,
3836
- ih as a0,
3837
- sh as a1,
3838
- rh as a2,
3839
- oh as a3,
3840
- Bo as a4,
3841
- Po as a5,
3842
- ko as a6,
3843
- Mo as a7,
3844
- bo as a8,
3845
- xo as a9,
3846
- no as aa,
3847
- io as ab,
3848
- so as ac,
3849
- ro as ad,
3850
- Fo as ae,
3851
- Qo as af,
3852
- jo as ag,
3853
- Vo as ah,
3854
- Go as ai,
3855
- Ho as aj,
3856
- lh as ak,
3857
- zr as b,
3858
- eo as c,
3859
- Yr as d,
3860
- Kr as e,
3861
- Wr as f,
3862
- Xr as g,
3863
- Jr as h,
3864
- ah as i,
3865
- Ro as j,
3866
- wo as k,
3867
- Co as l,
3868
- Ao as m,
3869
- Io as n,
3870
- yo as o,
3871
- vo as p,
3872
- eh as q,
3873
- nh as r,
3874
- th as s,
3875
- Wo as t,
3876
- qo as u,
3877
- Ko as v,
3878
- Xo as w,
3879
- zo as x,
3880
- $o as y,
3881
- Jo as z
3882
- };