@feedmepos/mf-settings 0.0.64-beta.1 → 0.0.64-prod
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.
- package/dist/{App-e0bba2b7.js → App-dadb8bf9.js} +551 -560
- package/dist/Business-eafcd130.js +12070 -0
- package/dist/{CreateBusiness-84a4e891.js → CreateBusiness-8145d5b6.js} +2 -2
- package/dist/{FoodCourt-1e83edbf.js → FoodCourt-859c83b2.js} +1 -1
- package/dist/{ReasonTemplate-9eab651a.js → ReasonTemplate-06a053d7.js} +1 -1
- package/dist/{Tagging-6d46c6db.js → Tagging-e96d855e.js} +3 -3
- package/dist/TemplateBuilder-3e34e9e8.js +27 -0
- package/dist/{app-51a50e28.js → app-9c6363b3.js} +8 -8
- package/dist/app.js +1 -1
- package/dist/{business-0b74f773.js → business-b5512a2c.js} +1 -1
- package/dist/{index-064cf2cd.js → index-f1179ebc.js} +2 -2
- package/dist/{map-695afd6f.js → map-54b71412.js} +527 -410
- package/package.json +1 -1
- package/dist/Business-c9dd77d6.js +0 -3947
- package/dist/TemplateBuilder-54a34178.js +0 -27
|
@@ -1,4 +1,117 @@
|
|
|
1
1
|
import { ref as ot } from "vue";
|
|
2
|
+
function Zr(t, e) {
|
|
3
|
+
var n = {};
|
|
4
|
+
for (var r in t)
|
|
5
|
+
Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
|
|
6
|
+
if (t != null && typeof Object.getOwnPropertySymbols == "function")
|
|
7
|
+
for (var s = 0, r = Object.getOwnPropertySymbols(t); s < r.length; s++)
|
|
8
|
+
e.indexOf(r[s]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[s]) && (n[r[s]] = t[r[s]]);
|
|
9
|
+
return n;
|
|
10
|
+
}
|
|
11
|
+
function Qr(t, e, n, r) {
|
|
12
|
+
function s(o) {
|
|
13
|
+
return o instanceof n ? o : new n(function(i) {
|
|
14
|
+
i(o);
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
return new (n || (n = Promise))(function(o, i) {
|
|
18
|
+
function c(u) {
|
|
19
|
+
try {
|
|
20
|
+
a(r.next(u));
|
|
21
|
+
} catch (p) {
|
|
22
|
+
i(p);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
function l(u) {
|
|
26
|
+
try {
|
|
27
|
+
a(r.throw(u));
|
|
28
|
+
} catch (p) {
|
|
29
|
+
i(p);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function a(u) {
|
|
33
|
+
u.done ? o(u.value) : s(u.value).then(c, l);
|
|
34
|
+
}
|
|
35
|
+
a((r = r.apply(t, e || [])).next());
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
function es(t, e) {
|
|
39
|
+
var n = { label: 0, sent: function() {
|
|
40
|
+
if (o[0] & 1)
|
|
41
|
+
throw o[1];
|
|
42
|
+
return o[1];
|
|
43
|
+
}, trys: [], ops: [] }, r, s, o, i = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
|
|
44
|
+
return i.next = c(0), i.throw = c(1), i.return = c(2), typeof Symbol == "function" && (i[Symbol.iterator] = function() {
|
|
45
|
+
return this;
|
|
46
|
+
}), i;
|
|
47
|
+
function c(a) {
|
|
48
|
+
return function(u) {
|
|
49
|
+
return l([a, u]);
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function l(a) {
|
|
53
|
+
if (r)
|
|
54
|
+
throw new TypeError("Generator is already executing.");
|
|
55
|
+
for (; i && (i = 0, a[0] && (n = 0)), n; )
|
|
56
|
+
try {
|
|
57
|
+
if (r = 1, s && (o = a[0] & 2 ? s.return : a[0] ? s.throw || ((o = s.return) && o.call(s), 0) : s.next) && !(o = o.call(s, a[1])).done)
|
|
58
|
+
return o;
|
|
59
|
+
switch (s = 0, o && (a = [a[0] & 2, o.value]), a[0]) {
|
|
60
|
+
case 0:
|
|
61
|
+
case 1:
|
|
62
|
+
o = a;
|
|
63
|
+
break;
|
|
64
|
+
case 4:
|
|
65
|
+
return n.label++, { value: a[1], done: !1 };
|
|
66
|
+
case 5:
|
|
67
|
+
n.label++, s = a[1], a = [0];
|
|
68
|
+
continue;
|
|
69
|
+
case 7:
|
|
70
|
+
a = n.ops.pop(), n.trys.pop();
|
|
71
|
+
continue;
|
|
72
|
+
default:
|
|
73
|
+
if (o = n.trys, !(o = o.length > 0 && o[o.length - 1]) && (a[0] === 6 || a[0] === 2)) {
|
|
74
|
+
n = 0;
|
|
75
|
+
continue;
|
|
76
|
+
}
|
|
77
|
+
if (a[0] === 3 && (!o || a[1] > o[0] && a[1] < o[3])) {
|
|
78
|
+
n.label = a[1];
|
|
79
|
+
break;
|
|
80
|
+
}
|
|
81
|
+
if (a[0] === 6 && n.label < o[1]) {
|
|
82
|
+
n.label = o[1], o = a;
|
|
83
|
+
break;
|
|
84
|
+
}
|
|
85
|
+
if (o && n.label < o[2]) {
|
|
86
|
+
n.label = o[2], n.ops.push(a);
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
o[2] && n.ops.pop(), n.trys.pop();
|
|
90
|
+
continue;
|
|
91
|
+
}
|
|
92
|
+
a = e.call(t, n);
|
|
93
|
+
} catch (u) {
|
|
94
|
+
a = [6, u], s = 0;
|
|
95
|
+
} finally {
|
|
96
|
+
r = o = 0;
|
|
97
|
+
}
|
|
98
|
+
if (a[0] & 5)
|
|
99
|
+
throw a[1];
|
|
100
|
+
return { value: a[0] ? a[1] : void 0, done: !0 };
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
function ts(t) {
|
|
104
|
+
var e = typeof Symbol == "function" && Symbol.iterator, n = e && t[e], r = 0;
|
|
105
|
+
if (n)
|
|
106
|
+
return n.call(t);
|
|
107
|
+
if (t && typeof t.length == "number")
|
|
108
|
+
return {
|
|
109
|
+
next: function() {
|
|
110
|
+
return t && r >= t.length && (t = void 0), { value: t && t[r++], done: !t };
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
114
|
+
}
|
|
2
115
|
/**
|
|
3
116
|
* @license
|
|
4
117
|
* Copyright 2017 Google LLC
|
|
@@ -50,8 +163,8 @@ const Be = function(t) {
|
|
|
50
163
|
const o = t[n++];
|
|
51
164
|
e[r++] = String.fromCharCode((s & 31) << 6 | o & 63);
|
|
52
165
|
} else if (s > 239 && s < 365) {
|
|
53
|
-
const o = t[n++], i = t[n++],
|
|
54
|
-
e[r++] = String.fromCharCode(55296 + (
|
|
166
|
+
const o = t[n++], i = t[n++], c = t[n++], l = ((s & 7) << 18 | (o & 63) << 12 | (i & 63) << 6 | c & 63) - 65536;
|
|
167
|
+
e[r++] = String.fromCharCode(55296 + (l >> 10)), e[r++] = String.fromCharCode(56320 + (l & 1023));
|
|
55
168
|
} else {
|
|
56
169
|
const o = t[n++], i = t[n++];
|
|
57
170
|
e[r++] = String.fromCharCode((s & 15) << 12 | (o & 63) << 6 | i & 63);
|
|
@@ -117,9 +230,9 @@ const Be = function(t) {
|
|
|
117
230
|
this.init_();
|
|
118
231
|
const n = e ? this.byteToCharMapWebSafe_ : this.byteToCharMap_, r = [];
|
|
119
232
|
for (let s = 0; s < t.length; s += 3) {
|
|
120
|
-
const o = t[s], i = s + 1 < t.length,
|
|
121
|
-
let
|
|
122
|
-
|
|
233
|
+
const o = t[s], i = s + 1 < t.length, c = i ? t[s + 1] : 0, l = s + 2 < t.length, a = l ? t[s + 2] : 0, u = o >> 2, p = (o & 3) << 4 | c >> 4;
|
|
234
|
+
let g = (c & 15) << 2 | a >> 6, m = a & 63;
|
|
235
|
+
l || (m = 64, i || (g = 64)), r.push(n[u], n[p], n[g], n[m]);
|
|
123
236
|
}
|
|
124
237
|
return r.join("");
|
|
125
238
|
},
|
|
@@ -164,19 +277,19 @@ const Be = function(t) {
|
|
|
164
277
|
this.init_();
|
|
165
278
|
const n = e ? this.charToByteMapWebSafe_ : this.charToByteMap_, r = [];
|
|
166
279
|
for (let s = 0; s < t.length; ) {
|
|
167
|
-
const o = n[t.charAt(s++)],
|
|
280
|
+
const o = n[t.charAt(s++)], c = s < t.length ? n[t.charAt(s)] : 0;
|
|
168
281
|
++s;
|
|
169
|
-
const
|
|
282
|
+
const a = s < t.length ? n[t.charAt(s)] : 64;
|
|
170
283
|
++s;
|
|
171
|
-
const
|
|
172
|
-
if (++s, o == null ||
|
|
284
|
+
const p = s < t.length ? n[t.charAt(s)] : 64;
|
|
285
|
+
if (++s, o == null || c == null || a == null || p == null)
|
|
173
286
|
throw new at();
|
|
174
|
-
const
|
|
175
|
-
if (r.push(
|
|
176
|
-
const m =
|
|
177
|
-
if (r.push(m),
|
|
178
|
-
const
|
|
179
|
-
r.push(
|
|
287
|
+
const g = o << 2 | c >> 4;
|
|
288
|
+
if (r.push(g), a !== 64) {
|
|
289
|
+
const m = c << 4 & 240 | a >> 2;
|
|
290
|
+
if (r.push(m), p !== 64) {
|
|
291
|
+
const E = a << 6 & 192 | p;
|
|
292
|
+
r.push(E);
|
|
180
293
|
}
|
|
181
294
|
}
|
|
182
295
|
}
|
|
@@ -290,10 +403,10 @@ const ht = () => ut().__FIREBASE_DEFAULTS__, dt = () => {
|
|
|
290
403
|
throw new Error(`Invalid host ${e} with no separate hostname and port!`);
|
|
291
404
|
const r = parseInt(e.substring(n + 1), 10);
|
|
292
405
|
return e[0] === "[" ? [e.substring(1, n - 1), r] : [e.substring(0, n), r];
|
|
293
|
-
},
|
|
406
|
+
}, Pe = () => {
|
|
294
407
|
var t;
|
|
295
408
|
return (t = K()) === null || t === void 0 ? void 0 : t.config;
|
|
296
|
-
},
|
|
409
|
+
}, ns = (t) => {
|
|
297
410
|
var e;
|
|
298
411
|
return (e = K()) === null || e === void 0 ? void 0 : e[`_${t}`];
|
|
299
412
|
};
|
|
@@ -349,7 +462,7 @@ class mt {
|
|
|
349
462
|
* See the License for the specific language governing permissions and
|
|
350
463
|
* limitations under the License.
|
|
351
464
|
*/
|
|
352
|
-
function
|
|
465
|
+
function bt(t, e) {
|
|
353
466
|
if (t.uid)
|
|
354
467
|
throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');
|
|
355
468
|
const n = {
|
|
@@ -371,11 +484,11 @@ function _t(t, e) {
|
|
|
371
484
|
sign_in_provider: "custom",
|
|
372
485
|
identities: {}
|
|
373
486
|
}
|
|
374
|
-
}, t),
|
|
487
|
+
}, t), c = "";
|
|
375
488
|
return [
|
|
376
489
|
q(JSON.stringify(n)),
|
|
377
490
|
q(JSON.stringify(i)),
|
|
378
|
-
|
|
491
|
+
c
|
|
379
492
|
].join(".");
|
|
380
493
|
}
|
|
381
494
|
/**
|
|
@@ -394,15 +507,15 @@ function _t(t, e) {
|
|
|
394
507
|
* See the License for the specific language governing permissions and
|
|
395
508
|
* limitations under the License.
|
|
396
509
|
*/
|
|
397
|
-
function
|
|
510
|
+
function Ue() {
|
|
398
511
|
return typeof navigator < "u" && typeof navigator.userAgent == "string" ? navigator.userAgent : "";
|
|
399
512
|
}
|
|
400
|
-
function
|
|
513
|
+
function rs() {
|
|
401
514
|
return typeof window < "u" && // @ts-ignore Setting up an broadly applicable index signature for Window
|
|
402
515
|
// just to deal with this case would probably be a bad idea.
|
|
403
|
-
!!(window.cordova || window.phonegap || window.PhoneGap) && /ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(
|
|
516
|
+
!!(window.cordova || window.phonegap || window.PhoneGap) && /ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(Ue());
|
|
404
517
|
}
|
|
405
|
-
function
|
|
518
|
+
function _t() {
|
|
406
519
|
var t;
|
|
407
520
|
const e = (t = K()) === null || t === void 0 ? void 0 : t.forceEnvironment;
|
|
408
521
|
if (e === "node")
|
|
@@ -415,15 +528,15 @@ function bt() {
|
|
|
415
528
|
return !1;
|
|
416
529
|
}
|
|
417
530
|
}
|
|
418
|
-
function
|
|
531
|
+
function ss() {
|
|
419
532
|
const t = typeof chrome == "object" ? chrome.runtime : typeof browser == "object" ? browser.runtime : void 0;
|
|
420
533
|
return typeof t == "object" && t.id !== void 0;
|
|
421
534
|
}
|
|
422
|
-
function
|
|
535
|
+
function os() {
|
|
423
536
|
return typeof navigator == "object" && navigator.product === "ReactNative";
|
|
424
537
|
}
|
|
425
|
-
function
|
|
426
|
-
const t =
|
|
538
|
+
function is() {
|
|
539
|
+
const t = Ue();
|
|
427
540
|
return t.indexOf("MSIE ") >= 0 || t.indexOf("Trident/") >= 0;
|
|
428
541
|
}
|
|
429
542
|
function yt() {
|
|
@@ -433,7 +546,7 @@ function yt() {
|
|
|
433
546
|
return !1;
|
|
434
547
|
}
|
|
435
548
|
}
|
|
436
|
-
function
|
|
549
|
+
function wt() {
|
|
437
550
|
return new Promise((t, e) => {
|
|
438
551
|
try {
|
|
439
552
|
let n = !0;
|
|
@@ -467,10 +580,10 @@ function Et() {
|
|
|
467
580
|
* See the License for the specific language governing permissions and
|
|
468
581
|
* limitations under the License.
|
|
469
582
|
*/
|
|
470
|
-
const
|
|
583
|
+
const Et = "FirebaseError";
|
|
471
584
|
class x extends Error {
|
|
472
585
|
constructor(e, n, r) {
|
|
473
|
-
super(n), this.code = e, this.customData = r, this.name =
|
|
586
|
+
super(n), this.code = e, this.customData = r, this.name = Et, Object.setPrototypeOf(this, x.prototype), Error.captureStackTrace && Error.captureStackTrace(this, Le.prototype.create);
|
|
474
587
|
}
|
|
475
588
|
}
|
|
476
589
|
class Le {
|
|
@@ -478,18 +591,18 @@ class Le {
|
|
|
478
591
|
this.service = e, this.serviceName = n, this.errors = r;
|
|
479
592
|
}
|
|
480
593
|
create(e, ...n) {
|
|
481
|
-
const r = n[0] || {}, s = `${this.service}/${e}`, o = this.errors[e], i = o ? It(o, r) : "Error",
|
|
482
|
-
return new x(s,
|
|
594
|
+
const r = n[0] || {}, s = `${this.service}/${e}`, o = this.errors[e], i = o ? It(o, r) : "Error", c = `${this.serviceName}: ${i} (${s}).`;
|
|
595
|
+
return new x(s, c, r);
|
|
483
596
|
}
|
|
484
597
|
}
|
|
485
598
|
function It(t, e) {
|
|
486
|
-
return t.replace(
|
|
599
|
+
return t.replace(vt, (n, r) => {
|
|
487
600
|
const s = e[r];
|
|
488
601
|
return s != null ? String(s) : `<${r}?>`;
|
|
489
602
|
});
|
|
490
603
|
}
|
|
491
|
-
const
|
|
492
|
-
function
|
|
604
|
+
const vt = /\{\$([^}]+)}/g;
|
|
605
|
+
function as(t) {
|
|
493
606
|
for (const e in t)
|
|
494
607
|
if (Object.prototype.hasOwnProperty.call(t, e))
|
|
495
608
|
return !1;
|
|
@@ -503,7 +616,7 @@ function oe(t, e) {
|
|
|
503
616
|
if (!r.includes(s))
|
|
504
617
|
return !1;
|
|
505
618
|
const o = t[s], i = e[s];
|
|
506
|
-
if (
|
|
619
|
+
if (we(o) && we(i)) {
|
|
507
620
|
if (!oe(o, i))
|
|
508
621
|
return !1;
|
|
509
622
|
} else if (o !== i)
|
|
@@ -514,7 +627,7 @@ function oe(t, e) {
|
|
|
514
627
|
return !1;
|
|
515
628
|
return !0;
|
|
516
629
|
}
|
|
517
|
-
function
|
|
630
|
+
function we(t) {
|
|
518
631
|
return t !== null && typeof t == "object";
|
|
519
632
|
}
|
|
520
633
|
/**
|
|
@@ -533,7 +646,7 @@ function Ee(t) {
|
|
|
533
646
|
* See the License for the specific language governing permissions and
|
|
534
647
|
* limitations under the License.
|
|
535
648
|
*/
|
|
536
|
-
function
|
|
649
|
+
function cs(t) {
|
|
537
650
|
const e = [];
|
|
538
651
|
for (const [n, r] of Object.entries(t))
|
|
539
652
|
Array.isArray(r) ? r.forEach((s) => {
|
|
@@ -541,7 +654,7 @@ function ss(t) {
|
|
|
541
654
|
}) : e.push(encodeURIComponent(n) + "=" + encodeURIComponent(r));
|
|
542
655
|
return e.length ? "&" + e.join("&") : "";
|
|
543
656
|
}
|
|
544
|
-
function
|
|
657
|
+
function ls(t, e) {
|
|
545
658
|
const n = new Tt(t, e);
|
|
546
659
|
return n.subscribe.bind(n);
|
|
547
660
|
}
|
|
@@ -583,7 +696,7 @@ class Tt {
|
|
|
583
696
|
let s;
|
|
584
697
|
if (e === void 0 && n === void 0 && r === void 0)
|
|
585
698
|
throw new Error("Missing Observer.");
|
|
586
|
-
|
|
699
|
+
Rt(e, [
|
|
587
700
|
"next",
|
|
588
701
|
"error",
|
|
589
702
|
"complete"
|
|
@@ -629,7 +742,7 @@ class Tt {
|
|
|
629
742
|
}));
|
|
630
743
|
}
|
|
631
744
|
}
|
|
632
|
-
function
|
|
745
|
+
function Rt(t, e) {
|
|
633
746
|
if (typeof t != "object" || t === null)
|
|
634
747
|
return !1;
|
|
635
748
|
for (const n of e)
|
|
@@ -655,7 +768,7 @@ function Z() {
|
|
|
655
768
|
* See the License for the specific language governing permissions and
|
|
656
769
|
* limitations under the License.
|
|
657
770
|
*/
|
|
658
|
-
function
|
|
771
|
+
function P(t) {
|
|
659
772
|
return t && t._delegate ? t._delegate : t;
|
|
660
773
|
}
|
|
661
774
|
class $ {
|
|
@@ -697,7 +810,7 @@ class $ {
|
|
|
697
810
|
* See the License for the specific language governing permissions and
|
|
698
811
|
* limitations under the License.
|
|
699
812
|
*/
|
|
700
|
-
const
|
|
813
|
+
const O = "[DEFAULT]";
|
|
701
814
|
/**
|
|
702
815
|
* @license
|
|
703
816
|
* Copyright 2019 Google LLC
|
|
@@ -714,7 +827,7 @@ const C = "[DEFAULT]";
|
|
|
714
827
|
* See the License for the specific language governing permissions and
|
|
715
828
|
* limitations under the License.
|
|
716
829
|
*/
|
|
717
|
-
class
|
|
830
|
+
class At {
|
|
718
831
|
constructor(e, n) {
|
|
719
832
|
this.name = e, this.container = n, this.component = null, this.instances = /* @__PURE__ */ new Map(), this.instancesDeferred = /* @__PURE__ */ new Map(), this.instancesOptions = /* @__PURE__ */ new Map(), this.onInitCallbacks = /* @__PURE__ */ new Map();
|
|
720
833
|
}
|
|
@@ -765,9 +878,9 @@ class vt {
|
|
|
765
878
|
if (this.component)
|
|
766
879
|
throw Error(`Component for ${this.name} has already been provided`);
|
|
767
880
|
if (this.component = e, !!this.shouldAutoInitialize()) {
|
|
768
|
-
if (
|
|
881
|
+
if (Ot(e))
|
|
769
882
|
try {
|
|
770
|
-
this.getOrInitializeService({ instanceIdentifier:
|
|
883
|
+
this.getOrInitializeService({ instanceIdentifier: O });
|
|
771
884
|
} catch {
|
|
772
885
|
}
|
|
773
886
|
for (const [n, r] of this.instancesDeferred.entries()) {
|
|
@@ -782,7 +895,7 @@ class vt {
|
|
|
782
895
|
}
|
|
783
896
|
}
|
|
784
897
|
}
|
|
785
|
-
clearInstance(e =
|
|
898
|
+
clearInstance(e = O) {
|
|
786
899
|
this.instancesDeferred.delete(e), this.instancesOptions.delete(e), this.instances.delete(e);
|
|
787
900
|
}
|
|
788
901
|
// app.delete() will call this method on every provider to delete the services
|
|
@@ -797,10 +910,10 @@ class vt {
|
|
|
797
910
|
isComponentSet() {
|
|
798
911
|
return this.component != null;
|
|
799
912
|
}
|
|
800
|
-
isInitialized(e =
|
|
913
|
+
isInitialized(e = O) {
|
|
801
914
|
return this.instances.has(e);
|
|
802
915
|
}
|
|
803
|
-
getOptions(e =
|
|
916
|
+
getOptions(e = O) {
|
|
804
917
|
return this.instancesOptions.get(e) || {};
|
|
805
918
|
}
|
|
806
919
|
initialize(e = {}) {
|
|
@@ -814,8 +927,8 @@ class vt {
|
|
|
814
927
|
options: n
|
|
815
928
|
});
|
|
816
929
|
for (const [o, i] of this.instancesDeferred.entries()) {
|
|
817
|
-
const
|
|
818
|
-
r ===
|
|
930
|
+
const c = this.normalizeInstanceIdentifier(o);
|
|
931
|
+
r === c && i.resolve(s);
|
|
819
932
|
}
|
|
820
933
|
return s;
|
|
821
934
|
}
|
|
@@ -861,17 +974,17 @@ class vt {
|
|
|
861
974
|
}
|
|
862
975
|
return r || null;
|
|
863
976
|
}
|
|
864
|
-
normalizeInstanceIdentifier(e =
|
|
865
|
-
return this.component ? this.component.multipleInstances ? e :
|
|
977
|
+
normalizeInstanceIdentifier(e = O) {
|
|
978
|
+
return this.component ? this.component.multipleInstances ? e : O : e;
|
|
866
979
|
}
|
|
867
980
|
shouldAutoInitialize() {
|
|
868
981
|
return !!this.component && this.component.instantiationMode !== "EXPLICIT";
|
|
869
982
|
}
|
|
870
983
|
}
|
|
871
984
|
function Dt(t) {
|
|
872
|
-
return t ===
|
|
985
|
+
return t === O ? void 0 : t;
|
|
873
986
|
}
|
|
874
|
-
function
|
|
987
|
+
function Ot(t) {
|
|
875
988
|
return t.instantiationMode === "EAGER";
|
|
876
989
|
}
|
|
877
990
|
/**
|
|
@@ -890,7 +1003,7 @@ function Ct(t) {
|
|
|
890
1003
|
* See the License for the specific language governing permissions and
|
|
891
1004
|
* limitations under the License.
|
|
892
1005
|
*/
|
|
893
|
-
class
|
|
1006
|
+
class Ct {
|
|
894
1007
|
constructor(e) {
|
|
895
1008
|
this.name = e, this.providers = /* @__PURE__ */ new Map();
|
|
896
1009
|
}
|
|
@@ -922,7 +1035,7 @@ class Ot {
|
|
|
922
1035
|
getProvider(e) {
|
|
923
1036
|
if (this.providers.has(e))
|
|
924
1037
|
return this.providers.get(e);
|
|
925
|
-
const n = new
|
|
1038
|
+
const n = new At(e, this);
|
|
926
1039
|
return this.providers.set(e, n), n;
|
|
927
1040
|
}
|
|
928
1041
|
getProviders() {
|
|
@@ -945,27 +1058,27 @@ class Ot {
|
|
|
945
1058
|
* See the License for the specific language governing permissions and
|
|
946
1059
|
* limitations under the License.
|
|
947
1060
|
*/
|
|
948
|
-
var
|
|
1061
|
+
var h;
|
|
949
1062
|
(function(t) {
|
|
950
1063
|
t[t.DEBUG = 0] = "DEBUG", t[t.VERBOSE = 1] = "VERBOSE", t[t.INFO = 2] = "INFO", t[t.WARN = 3] = "WARN", t[t.ERROR = 4] = "ERROR", t[t.SILENT = 5] = "SILENT";
|
|
951
|
-
})(
|
|
1064
|
+
})(h || (h = {}));
|
|
952
1065
|
const St = {
|
|
953
|
-
debug:
|
|
954
|
-
verbose:
|
|
955
|
-
info:
|
|
956
|
-
warn:
|
|
957
|
-
error:
|
|
958
|
-
silent:
|
|
959
|
-
},
|
|
960
|
-
[
|
|
961
|
-
[
|
|
962
|
-
[
|
|
963
|
-
[
|
|
964
|
-
[
|
|
1066
|
+
debug: h.DEBUG,
|
|
1067
|
+
verbose: h.VERBOSE,
|
|
1068
|
+
info: h.INFO,
|
|
1069
|
+
warn: h.WARN,
|
|
1070
|
+
error: h.ERROR,
|
|
1071
|
+
silent: h.SILENT
|
|
1072
|
+
}, kt = h.INFO, Nt = {
|
|
1073
|
+
[h.DEBUG]: "log",
|
|
1074
|
+
[h.VERBOSE]: "log",
|
|
1075
|
+
[h.INFO]: "info",
|
|
1076
|
+
[h.WARN]: "warn",
|
|
1077
|
+
[h.ERROR]: "error"
|
|
965
1078
|
}, Bt = (t, e, ...n) => {
|
|
966
1079
|
if (e < t.logLevel)
|
|
967
1080
|
return;
|
|
968
|
-
const r = (/* @__PURE__ */ new Date()).toISOString(), s =
|
|
1081
|
+
const r = (/* @__PURE__ */ new Date()).toISOString(), s = Nt[e];
|
|
969
1082
|
if (s)
|
|
970
1083
|
console[s](`[${r}] ${t.name}:`, ...n);
|
|
971
1084
|
else
|
|
@@ -979,13 +1092,13 @@ class xt {
|
|
|
979
1092
|
* @param name The name that the logs will be associated with
|
|
980
1093
|
*/
|
|
981
1094
|
constructor(e) {
|
|
982
|
-
this.name = e, this._logLevel =
|
|
1095
|
+
this.name = e, this._logLevel = kt, this._logHandler = Bt, this._userLogHandler = null;
|
|
983
1096
|
}
|
|
984
1097
|
get logLevel() {
|
|
985
1098
|
return this._logLevel;
|
|
986
1099
|
}
|
|
987
1100
|
set logLevel(e) {
|
|
988
|
-
if (!(e in
|
|
1101
|
+
if (!(e in h))
|
|
989
1102
|
throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);
|
|
990
1103
|
this._logLevel = e;
|
|
991
1104
|
}
|
|
@@ -1011,25 +1124,25 @@ class xt {
|
|
|
1011
1124
|
* The functions below are all based on the `console` interface
|
|
1012
1125
|
*/
|
|
1013
1126
|
debug(...e) {
|
|
1014
|
-
this._userLogHandler && this._userLogHandler(this,
|
|
1127
|
+
this._userLogHandler && this._userLogHandler(this, h.DEBUG, ...e), this._logHandler(this, h.DEBUG, ...e);
|
|
1015
1128
|
}
|
|
1016
1129
|
log(...e) {
|
|
1017
|
-
this._userLogHandler && this._userLogHandler(this,
|
|
1130
|
+
this._userLogHandler && this._userLogHandler(this, h.VERBOSE, ...e), this._logHandler(this, h.VERBOSE, ...e);
|
|
1018
1131
|
}
|
|
1019
1132
|
info(...e) {
|
|
1020
|
-
this._userLogHandler && this._userLogHandler(this,
|
|
1133
|
+
this._userLogHandler && this._userLogHandler(this, h.INFO, ...e), this._logHandler(this, h.INFO, ...e);
|
|
1021
1134
|
}
|
|
1022
1135
|
warn(...e) {
|
|
1023
|
-
this._userLogHandler && this._userLogHandler(this,
|
|
1136
|
+
this._userLogHandler && this._userLogHandler(this, h.WARN, ...e), this._logHandler(this, h.WARN, ...e);
|
|
1024
1137
|
}
|
|
1025
1138
|
error(...e) {
|
|
1026
|
-
this._userLogHandler && this._userLogHandler(this,
|
|
1139
|
+
this._userLogHandler && this._userLogHandler(this, h.ERROR, ...e), this._logHandler(this, h.ERROR, ...e);
|
|
1027
1140
|
}
|
|
1028
1141
|
}
|
|
1029
|
-
const
|
|
1030
|
-
let
|
|
1031
|
-
function
|
|
1032
|
-
return
|
|
1142
|
+
const Pt = (t, e) => e.some((n) => t instanceof n);
|
|
1143
|
+
let Ee, Ie;
|
|
1144
|
+
function Ut() {
|
|
1145
|
+
return Ee || (Ee = [
|
|
1033
1146
|
IDBDatabase,
|
|
1034
1147
|
IDBObjectStore,
|
|
1035
1148
|
IDBIndex,
|
|
@@ -1050,7 +1163,7 @@ function Mt(t) {
|
|
|
1050
1163
|
const s = () => {
|
|
1051
1164
|
t.removeEventListener("success", o), t.removeEventListener("error", i);
|
|
1052
1165
|
}, o = () => {
|
|
1053
|
-
n(
|
|
1166
|
+
n(R(t.result)), s();
|
|
1054
1167
|
}, i = () => {
|
|
1055
1168
|
r(t.error), s();
|
|
1056
1169
|
};
|
|
@@ -1086,7 +1199,7 @@ let ae = {
|
|
|
1086
1199
|
if (e === "store")
|
|
1087
1200
|
return n.objectStoreNames[1] ? void 0 : n.objectStore(n.objectStoreNames[0]);
|
|
1088
1201
|
}
|
|
1089
|
-
return
|
|
1202
|
+
return R(t[e]);
|
|
1090
1203
|
},
|
|
1091
1204
|
set(t, e, n) {
|
|
1092
1205
|
return t[e] = n, !0;
|
|
@@ -1095,23 +1208,23 @@ let ae = {
|
|
|
1095
1208
|
return t instanceof IDBTransaction && (e === "done" || e === "store") ? !0 : e in t;
|
|
1096
1209
|
}
|
|
1097
1210
|
};
|
|
1098
|
-
function
|
|
1211
|
+
function Ht(t) {
|
|
1099
1212
|
ae = t(ae);
|
|
1100
1213
|
}
|
|
1101
|
-
function
|
|
1214
|
+
function Ft(t) {
|
|
1102
1215
|
return t === IDBDatabase.prototype.transaction && !("objectStoreNames" in IDBTransaction.prototype) ? function(e, ...n) {
|
|
1103
1216
|
const r = t.call(ee(this), e, ...n);
|
|
1104
|
-
return $e.set(r, e.sort ? e.sort() : [e]),
|
|
1217
|
+
return $e.set(r, e.sort ? e.sort() : [e]), R(r);
|
|
1105
1218
|
} : Lt().includes(t) ? function(...e) {
|
|
1106
|
-
return t.apply(ee(this), e),
|
|
1219
|
+
return t.apply(ee(this), e), R(Me.get(this));
|
|
1107
1220
|
} : function(...e) {
|
|
1108
|
-
return
|
|
1221
|
+
return R(t.apply(ee(this), e));
|
|
1109
1222
|
};
|
|
1110
1223
|
}
|
|
1111
1224
|
function jt(t) {
|
|
1112
|
-
return typeof t == "function" ?
|
|
1225
|
+
return typeof t == "function" ? Ft(t) : (t instanceof IDBTransaction && $t(t), Pt(t, Ut()) ? new Proxy(t, ae) : t);
|
|
1113
1226
|
}
|
|
1114
|
-
function
|
|
1227
|
+
function R(t) {
|
|
1115
1228
|
if (t instanceof IDBRequest)
|
|
1116
1229
|
return Mt(t);
|
|
1117
1230
|
if (Q.has(t))
|
|
@@ -1121,21 +1234,21 @@ function A(t) {
|
|
|
1121
1234
|
}
|
|
1122
1235
|
const ee = (t) => fe.get(t);
|
|
1123
1236
|
function Vt(t, e, { blocked: n, upgrade: r, blocking: s, terminated: o } = {}) {
|
|
1124
|
-
const i = indexedDB.open(t, e),
|
|
1125
|
-
return r && i.addEventListener("upgradeneeded", (
|
|
1126
|
-
r(
|
|
1127
|
-
}), n && i.addEventListener("blocked", (
|
|
1237
|
+
const i = indexedDB.open(t, e), c = R(i);
|
|
1238
|
+
return r && i.addEventListener("upgradeneeded", (l) => {
|
|
1239
|
+
r(R(i.result), l.oldVersion, l.newVersion, R(i.transaction), l);
|
|
1240
|
+
}), n && i.addEventListener("blocked", (l) => n(
|
|
1128
1241
|
// Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
)),
|
|
1133
|
-
o &&
|
|
1242
|
+
l.oldVersion,
|
|
1243
|
+
l.newVersion,
|
|
1244
|
+
l
|
|
1245
|
+
)), c.then((l) => {
|
|
1246
|
+
o && l.addEventListener("close", () => o()), s && l.addEventListener("versionchange", (a) => s(a.oldVersion, a.newVersion, a));
|
|
1134
1247
|
}).catch(() => {
|
|
1135
|
-
}),
|
|
1248
|
+
}), c;
|
|
1136
1249
|
}
|
|
1137
1250
|
const zt = ["get", "getKey", "getAll", "getAllKeys", "count"], Wt = ["put", "add", "delete", "clear"], te = /* @__PURE__ */ new Map();
|
|
1138
|
-
function
|
|
1251
|
+
function ve(t, e) {
|
|
1139
1252
|
if (!(t instanceof IDBDatabase && !(e in t) && typeof e == "string"))
|
|
1140
1253
|
return;
|
|
1141
1254
|
if (te.get(e))
|
|
@@ -1146,20 +1259,20 @@ function Re(t, e) {
|
|
|
1146
1259
|
!(n in (r ? IDBIndex : IDBObjectStore).prototype) || !(s || zt.includes(n))
|
|
1147
1260
|
)
|
|
1148
1261
|
return;
|
|
1149
|
-
const o = async function(i, ...
|
|
1150
|
-
const
|
|
1151
|
-
let
|
|
1152
|
-
return r && (
|
|
1153
|
-
|
|
1154
|
-
s &&
|
|
1262
|
+
const o = async function(i, ...c) {
|
|
1263
|
+
const l = this.transaction(i, s ? "readwrite" : "readonly");
|
|
1264
|
+
let a = l.store;
|
|
1265
|
+
return r && (a = a.index(c.shift())), (await Promise.all([
|
|
1266
|
+
a[n](...c),
|
|
1267
|
+
s && l.done
|
|
1155
1268
|
]))[0];
|
|
1156
1269
|
};
|
|
1157
1270
|
return te.set(e, o), o;
|
|
1158
1271
|
}
|
|
1159
|
-
|
|
1272
|
+
Ht((t) => ({
|
|
1160
1273
|
...t,
|
|
1161
|
-
get: (e, n, r) =>
|
|
1162
|
-
has: (e, n) => !!
|
|
1274
|
+
get: (e, n, r) => ve(e, n) || t.get(e, n, r),
|
|
1275
|
+
has: (e, n) => !!ve(e, n) || t.has(e, n)
|
|
1163
1276
|
}));
|
|
1164
1277
|
/**
|
|
1165
1278
|
* @license
|
|
@@ -1214,7 +1327,7 @@ const ce = "@firebase/app", Te = "0.9.13";
|
|
|
1214
1327
|
* See the License for the specific language governing permissions and
|
|
1215
1328
|
* limitations under the License.
|
|
1216
1329
|
*/
|
|
1217
|
-
const S = new xt("@firebase/app"), Kt = "@firebase/app-compat", Xt = "@firebase/analytics-compat", Jt = "@firebase/analytics", Yt = "@firebase/app-check-compat", Zt = "@firebase/app-check", Qt = "@firebase/auth", en = "@firebase/auth-compat", tn = "@firebase/database", nn = "@firebase/database-compat", rn = "@firebase/functions", sn = "@firebase/functions-compat", on = "@firebase/installations", an = "@firebase/installations-compat", cn = "@firebase/messaging", ln = "@firebase/messaging-compat", un = "@firebase/performance", hn = "@firebase/performance-compat", dn = "@firebase/remote-config", fn = "@firebase/remote-config-compat", pn = "@firebase/storage", gn = "@firebase/storage-compat", mn = "@firebase/firestore",
|
|
1330
|
+
const S = new xt("@firebase/app"), Kt = "@firebase/app-compat", Xt = "@firebase/analytics-compat", Jt = "@firebase/analytics", Yt = "@firebase/app-check-compat", Zt = "@firebase/app-check", Qt = "@firebase/auth", en = "@firebase/auth-compat", tn = "@firebase/database", nn = "@firebase/database-compat", rn = "@firebase/functions", sn = "@firebase/functions-compat", on = "@firebase/installations", an = "@firebase/installations-compat", cn = "@firebase/messaging", ln = "@firebase/messaging-compat", un = "@firebase/performance", hn = "@firebase/performance-compat", dn = "@firebase/remote-config", fn = "@firebase/remote-config-compat", pn = "@firebase/storage", gn = "@firebase/storage-compat", mn = "@firebase/firestore", bn = "@firebase/firestore-compat", _n = "firebase", yn = "9.23.0";
|
|
1218
1331
|
/**
|
|
1219
1332
|
* @license
|
|
1220
1333
|
* Copyright 2019 Google LLC
|
|
@@ -1231,7 +1344,7 @@ const S = new xt("@firebase/app"), Kt = "@firebase/app-compat", Xt = "@firebase/
|
|
|
1231
1344
|
* See the License for the specific language governing permissions and
|
|
1232
1345
|
* limitations under the License.
|
|
1233
1346
|
*/
|
|
1234
|
-
const le = "[DEFAULT]",
|
|
1347
|
+
const le = "[DEFAULT]", wn = {
|
|
1235
1348
|
[ce]: "fire-core",
|
|
1236
1349
|
[Kt]: "fire-core-compat",
|
|
1237
1350
|
[Jt]: "fire-analytics",
|
|
@@ -1255,9 +1368,9 @@ const le = "[DEFAULT]", En = {
|
|
|
1255
1368
|
[pn]: "fire-gcs",
|
|
1256
1369
|
[gn]: "fire-gcs-compat",
|
|
1257
1370
|
[mn]: "fire-fst",
|
|
1258
|
-
[
|
|
1371
|
+
[bn]: "fire-fst-compat",
|
|
1259
1372
|
"fire-js": "fire-js",
|
|
1260
|
-
[
|
|
1373
|
+
[_n]: "fire-js-all"
|
|
1261
1374
|
};
|
|
1262
1375
|
/**
|
|
1263
1376
|
* @license
|
|
@@ -1275,8 +1388,8 @@ const le = "[DEFAULT]", En = {
|
|
|
1275
1388
|
* See the License for the specific language governing permissions and
|
|
1276
1389
|
* limitations under the License.
|
|
1277
1390
|
*/
|
|
1278
|
-
const
|
|
1279
|
-
function
|
|
1391
|
+
const H = /* @__PURE__ */ new Map(), ue = /* @__PURE__ */ new Map();
|
|
1392
|
+
function En(t, e) {
|
|
1280
1393
|
try {
|
|
1281
1394
|
t.container.addComponent(e);
|
|
1282
1395
|
} catch (n) {
|
|
@@ -1288,8 +1401,8 @@ function G(t) {
|
|
|
1288
1401
|
if (ue.has(e))
|
|
1289
1402
|
return S.debug(`There were multiple attempts to register component ${e}.`), !1;
|
|
1290
1403
|
ue.set(e, t);
|
|
1291
|
-
for (const n of
|
|
1292
|
-
|
|
1404
|
+
for (const n of H.values())
|
|
1405
|
+
En(n, t);
|
|
1293
1406
|
return !0;
|
|
1294
1407
|
}
|
|
1295
1408
|
function In(t, e) {
|
|
@@ -1312,7 +1425,7 @@ function In(t, e) {
|
|
|
1312
1425
|
* See the License for the specific language governing permissions and
|
|
1313
1426
|
* limitations under the License.
|
|
1314
1427
|
*/
|
|
1315
|
-
const
|
|
1428
|
+
const vn = {
|
|
1316
1429
|
"no-app": "No Firebase App '{$appName}' has been created - call initializeApp() first",
|
|
1317
1430
|
"bad-app-name": "Illegal App name: '{$appName}",
|
|
1318
1431
|
"duplicate-app": "Firebase App named '{$appName}' already exists with different options or config",
|
|
@@ -1324,7 +1437,7 @@ const Rn = {
|
|
|
1324
1437
|
"idb-get": "Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.",
|
|
1325
1438
|
"idb-set": "Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.",
|
|
1326
1439
|
"idb-delete": "Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}."
|
|
1327
|
-
},
|
|
1440
|
+
}, A = new Le("app", "Firebase", vn);
|
|
1328
1441
|
/**
|
|
1329
1442
|
* @license
|
|
1330
1443
|
* Copyright 2019 Google LLC
|
|
@@ -1380,7 +1493,7 @@ class Tn {
|
|
|
1380
1493
|
*/
|
|
1381
1494
|
checkDestroyed() {
|
|
1382
1495
|
if (this.isDeleted)
|
|
1383
|
-
throw
|
|
1496
|
+
throw A.create("app-deleted", { appName: this._name });
|
|
1384
1497
|
}
|
|
1385
1498
|
}
|
|
1386
1499
|
/**
|
|
@@ -1399,53 +1512,53 @@ class Tn {
|
|
|
1399
1512
|
* See the License for the specific language governing permissions and
|
|
1400
1513
|
* limitations under the License.
|
|
1401
1514
|
*/
|
|
1402
|
-
const
|
|
1403
|
-
function
|
|
1515
|
+
const Rn = yn;
|
|
1516
|
+
function An(t, e = {}) {
|
|
1404
1517
|
let n = t;
|
|
1405
1518
|
typeof e != "object" && (e = { name: e });
|
|
1406
1519
|
const r = Object.assign({ name: le, automaticDataCollectionEnabled: !1 }, e), s = r.name;
|
|
1407
1520
|
if (typeof s != "string" || !s)
|
|
1408
|
-
throw
|
|
1521
|
+
throw A.create("bad-app-name", {
|
|
1409
1522
|
appName: String(s)
|
|
1410
1523
|
});
|
|
1411
|
-
if (n || (n =
|
|
1412
|
-
throw
|
|
1524
|
+
if (n || (n = Pe()), !n)
|
|
1525
|
+
throw A.create(
|
|
1413
1526
|
"no-options"
|
|
1414
1527
|
/* AppError.NO_OPTIONS */
|
|
1415
1528
|
);
|
|
1416
|
-
const o =
|
|
1529
|
+
const o = H.get(s);
|
|
1417
1530
|
if (o) {
|
|
1418
1531
|
if (oe(n, o.options) && oe(r, o.config))
|
|
1419
1532
|
return o;
|
|
1420
|
-
throw
|
|
1533
|
+
throw A.create("duplicate-app", { appName: s });
|
|
1421
1534
|
}
|
|
1422
|
-
const i = new
|
|
1423
|
-
for (const
|
|
1424
|
-
i.addComponent(
|
|
1425
|
-
const
|
|
1426
|
-
return
|
|
1535
|
+
const i = new Ct(s);
|
|
1536
|
+
for (const l of ue.values())
|
|
1537
|
+
i.addComponent(l);
|
|
1538
|
+
const c = new Tn(n, r, i);
|
|
1539
|
+
return H.set(s, c), c;
|
|
1427
1540
|
}
|
|
1428
1541
|
function Dn(t = le) {
|
|
1429
|
-
const e =
|
|
1430
|
-
if (!e && t === le &&
|
|
1431
|
-
return
|
|
1542
|
+
const e = H.get(t);
|
|
1543
|
+
if (!e && t === le && Pe())
|
|
1544
|
+
return An();
|
|
1432
1545
|
if (!e)
|
|
1433
|
-
throw
|
|
1546
|
+
throw A.create("no-app", { appName: t });
|
|
1434
1547
|
return e;
|
|
1435
1548
|
}
|
|
1436
|
-
function
|
|
1437
|
-
return Array.from(
|
|
1549
|
+
function us() {
|
|
1550
|
+
return Array.from(H.values());
|
|
1438
1551
|
}
|
|
1439
1552
|
function L(t, e, n) {
|
|
1440
1553
|
var r;
|
|
1441
|
-
let s = (r =
|
|
1554
|
+
let s = (r = wn[t]) !== null && r !== void 0 ? r : t;
|
|
1442
1555
|
n && (s += `-${n}`);
|
|
1443
1556
|
const o = s.match(/\s|\//), i = e.match(/\s|\//);
|
|
1444
1557
|
if (o || i) {
|
|
1445
|
-
const
|
|
1558
|
+
const c = [
|
|
1446
1559
|
`Unable to register library "${s}" with version "${e}":`
|
|
1447
1560
|
];
|
|
1448
|
-
o &&
|
|
1561
|
+
o && c.push(`library name "${s}" contains illegal characters (whitespace or "/")`), o && i && c.push("and"), i && c.push(`version name "${e}" contains illegal characters (whitespace or "/")`), S.warn(c.join(" "));
|
|
1449
1562
|
return;
|
|
1450
1563
|
}
|
|
1451
1564
|
G(new $(
|
|
@@ -1471,52 +1584,52 @@ function L(t, e, n) {
|
|
|
1471
1584
|
* See the License for the specific language governing permissions and
|
|
1472
1585
|
* limitations under the License.
|
|
1473
1586
|
*/
|
|
1474
|
-
const
|
|
1587
|
+
const On = "firebase-heartbeat-database", Cn = 1, F = "firebase-heartbeat-store";
|
|
1475
1588
|
let ne = null;
|
|
1476
|
-
function
|
|
1477
|
-
return ne || (ne = Vt(
|
|
1589
|
+
function He() {
|
|
1590
|
+
return ne || (ne = Vt(On, Cn, {
|
|
1478
1591
|
upgrade: (t, e) => {
|
|
1479
1592
|
switch (e) {
|
|
1480
1593
|
case 0:
|
|
1481
|
-
t.createObjectStore(
|
|
1594
|
+
t.createObjectStore(F);
|
|
1482
1595
|
}
|
|
1483
1596
|
}
|
|
1484
1597
|
}).catch((t) => {
|
|
1485
|
-
throw
|
|
1598
|
+
throw A.create("idb-open", {
|
|
1486
1599
|
originalErrorMessage: t.message
|
|
1487
1600
|
});
|
|
1488
1601
|
})), ne;
|
|
1489
1602
|
}
|
|
1490
1603
|
async function Sn(t) {
|
|
1491
1604
|
try {
|
|
1492
|
-
return await (await
|
|
1605
|
+
return await (await He()).transaction(F).objectStore(F).get(Fe(t));
|
|
1493
1606
|
} catch (e) {
|
|
1494
1607
|
if (e instanceof x)
|
|
1495
1608
|
S.warn(e.message);
|
|
1496
1609
|
else {
|
|
1497
|
-
const n =
|
|
1610
|
+
const n = A.create("idb-get", {
|
|
1498
1611
|
originalErrorMessage: e == null ? void 0 : e.message
|
|
1499
1612
|
});
|
|
1500
1613
|
S.warn(n.message);
|
|
1501
1614
|
}
|
|
1502
1615
|
}
|
|
1503
1616
|
}
|
|
1504
|
-
async function
|
|
1617
|
+
async function Re(t, e) {
|
|
1505
1618
|
try {
|
|
1506
|
-
const r = (await
|
|
1507
|
-
await r.objectStore(
|
|
1619
|
+
const r = (await He()).transaction(F, "readwrite");
|
|
1620
|
+
await r.objectStore(F).put(e, Fe(t)), await r.done;
|
|
1508
1621
|
} catch (n) {
|
|
1509
1622
|
if (n instanceof x)
|
|
1510
1623
|
S.warn(n.message);
|
|
1511
1624
|
else {
|
|
1512
|
-
const r =
|
|
1625
|
+
const r = A.create("idb-set", {
|
|
1513
1626
|
originalErrorMessage: n == null ? void 0 : n.message
|
|
1514
1627
|
});
|
|
1515
1628
|
S.warn(r.message);
|
|
1516
1629
|
}
|
|
1517
1630
|
}
|
|
1518
1631
|
}
|
|
1519
|
-
function
|
|
1632
|
+
function Fe(t) {
|
|
1520
1633
|
return `${t.name}!${t.options.appId}`;
|
|
1521
1634
|
}
|
|
1522
1635
|
/**
|
|
@@ -1535,12 +1648,12 @@ function He(t) {
|
|
|
1535
1648
|
* See the License for the specific language governing permissions and
|
|
1536
1649
|
* limitations under the License.
|
|
1537
1650
|
*/
|
|
1538
|
-
const
|
|
1651
|
+
const kn = 1024, Nn = 30 * 24 * 60 * 60 * 1e3;
|
|
1539
1652
|
class Bn {
|
|
1540
1653
|
constructor(e) {
|
|
1541
1654
|
this.container = e, this._heartbeatsCache = null;
|
|
1542
1655
|
const n = this.container.getProvider("app").getImmediate();
|
|
1543
|
-
this._storage = new
|
|
1656
|
+
this._storage = new Pn(n), this._heartbeatsCachePromise = this._storage.read().then((r) => (this._heartbeatsCache = r, r));
|
|
1544
1657
|
}
|
|
1545
1658
|
/**
|
|
1546
1659
|
* Called to report a heartbeat. The function will generate
|
|
@@ -1550,11 +1663,11 @@ class Bn {
|
|
|
1550
1663
|
* already logged, subsequent calls to this function in the same day will be ignored.
|
|
1551
1664
|
*/
|
|
1552
1665
|
async triggerHeartbeat() {
|
|
1553
|
-
const n = this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(), r =
|
|
1666
|
+
const n = this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(), r = Ae();
|
|
1554
1667
|
if (this._heartbeatsCache === null && (this._heartbeatsCache = await this._heartbeatsCachePromise), !(this._heartbeatsCache.lastSentHeartbeatDate === r || this._heartbeatsCache.heartbeats.some((s) => s.date === r)))
|
|
1555
1668
|
return this._heartbeatsCache.heartbeats.push({ date: r, agent: n }), this._heartbeatsCache.heartbeats = this._heartbeatsCache.heartbeats.filter((s) => {
|
|
1556
1669
|
const o = new Date(s.date).valueOf();
|
|
1557
|
-
return Date.now() - o <=
|
|
1670
|
+
return Date.now() - o <= Nn;
|
|
1558
1671
|
}), this._storage.overwrite(this._heartbeatsCache);
|
|
1559
1672
|
}
|
|
1560
1673
|
/**
|
|
@@ -1567,14 +1680,14 @@ class Bn {
|
|
|
1567
1680
|
async getHeartbeatsHeader() {
|
|
1568
1681
|
if (this._heartbeatsCache === null && await this._heartbeatsCachePromise, this._heartbeatsCache === null || this._heartbeatsCache.heartbeats.length === 0)
|
|
1569
1682
|
return "";
|
|
1570
|
-
const e =
|
|
1683
|
+
const e = Ae(), { heartbeatsToSend: n, unsentEntries: r } = xn(this._heartbeatsCache.heartbeats), s = q(JSON.stringify({ version: 2, heartbeats: n }));
|
|
1571
1684
|
return this._heartbeatsCache.lastSentHeartbeatDate = e, r.length > 0 ? (this._heartbeatsCache.heartbeats = r, await this._storage.overwrite(this._heartbeatsCache)) : (this._heartbeatsCache.heartbeats = [], this._storage.overwrite(this._heartbeatsCache)), s;
|
|
1572
1685
|
}
|
|
1573
1686
|
}
|
|
1574
|
-
function
|
|
1687
|
+
function Ae() {
|
|
1575
1688
|
return (/* @__PURE__ */ new Date()).toISOString().substring(0, 10);
|
|
1576
1689
|
}
|
|
1577
|
-
function xn(t, e =
|
|
1690
|
+
function xn(t, e = kn) {
|
|
1578
1691
|
const n = [];
|
|
1579
1692
|
let r = t.slice();
|
|
1580
1693
|
for (const s of t) {
|
|
@@ -1598,12 +1711,12 @@ function xn(t, e = Nn) {
|
|
|
1598
1711
|
unsentEntries: r
|
|
1599
1712
|
};
|
|
1600
1713
|
}
|
|
1601
|
-
class
|
|
1714
|
+
class Pn {
|
|
1602
1715
|
constructor(e) {
|
|
1603
1716
|
this.app = e, this._canUseIndexedDBPromise = this.runIndexedDBEnvironmentCheck();
|
|
1604
1717
|
}
|
|
1605
1718
|
async runIndexedDBEnvironmentCheck() {
|
|
1606
|
-
return yt() ?
|
|
1719
|
+
return yt() ? wt().then(() => !0).catch(() => !1) : !1;
|
|
1607
1720
|
}
|
|
1608
1721
|
/**
|
|
1609
1722
|
* Read all heartbeats.
|
|
@@ -1616,7 +1729,7 @@ class Un {
|
|
|
1616
1729
|
var n;
|
|
1617
1730
|
if (await this._canUseIndexedDBPromise) {
|
|
1618
1731
|
const s = await this.read();
|
|
1619
|
-
return
|
|
1732
|
+
return Re(this.app, {
|
|
1620
1733
|
lastSentHeartbeatDate: (n = e.lastSentHeartbeatDate) !== null && n !== void 0 ? n : s.lastSentHeartbeatDate,
|
|
1621
1734
|
heartbeats: e.heartbeats
|
|
1622
1735
|
});
|
|
@@ -1628,7 +1741,7 @@ class Un {
|
|
|
1628
1741
|
var n;
|
|
1629
1742
|
if (await this._canUseIndexedDBPromise) {
|
|
1630
1743
|
const s = await this.read();
|
|
1631
|
-
return
|
|
1744
|
+
return Re(this.app, {
|
|
1632
1745
|
lastSentHeartbeatDate: (n = e.lastSentHeartbeatDate) !== null && n !== void 0 ? n : s.lastSentHeartbeatDate,
|
|
1633
1746
|
heartbeats: [
|
|
1634
1747
|
...s.heartbeats,
|
|
@@ -1661,7 +1774,7 @@ function De(t) {
|
|
|
1661
1774
|
* See the License for the specific language governing permissions and
|
|
1662
1775
|
* limitations under the License.
|
|
1663
1776
|
*/
|
|
1664
|
-
function
|
|
1777
|
+
function Un(t) {
|
|
1665
1778
|
G(new $(
|
|
1666
1779
|
"platform-logger",
|
|
1667
1780
|
(e) => new qt(e),
|
|
@@ -1674,7 +1787,7 @@ function Pn(t) {
|
|
|
1674
1787
|
/* ComponentType.PRIVATE */
|
|
1675
1788
|
)), L(ce, Te, t), L(ce, Te, "esm2017"), L("fire-js", "");
|
|
1676
1789
|
}
|
|
1677
|
-
|
|
1790
|
+
Un("");
|
|
1678
1791
|
/**
|
|
1679
1792
|
* @license
|
|
1680
1793
|
* Copyright 2017 Google LLC
|
|
@@ -1708,7 +1821,7 @@ const je = "firebasestorage.googleapis.com", Ve = "storageBucket", Ln = 2 * 60 *
|
|
|
1708
1821
|
* See the License for the specific language governing permissions and
|
|
1709
1822
|
* limitations under the License.
|
|
1710
1823
|
*/
|
|
1711
|
-
class
|
|
1824
|
+
class f extends x {
|
|
1712
1825
|
/**
|
|
1713
1826
|
* @param code - A `StorageErrorCode` string to be prefixed with 'storage/' and
|
|
1714
1827
|
* added to the end of the message.
|
|
@@ -1716,7 +1829,7 @@ class d extends x {
|
|
|
1716
1829
|
* @param status_ - Corresponding HTTP Status Code
|
|
1717
1830
|
*/
|
|
1718
1831
|
constructor(e, n, r = 0) {
|
|
1719
|
-
super(re(e), `Firebase Storage: ${n} (${re(e)})`), this.status_ = r, this.customData = { serverResponse: null }, this._baseMessage = this.message, Object.setPrototypeOf(this,
|
|
1832
|
+
super(re(e), `Firebase Storage: ${n} (${re(e)})`), this.status_ = r, this.customData = { serverResponse: null }, this._baseMessage = this.message, Object.setPrototypeOf(this, f.prototype);
|
|
1720
1833
|
}
|
|
1721
1834
|
get status() {
|
|
1722
1835
|
return this.status_;
|
|
@@ -1741,71 +1854,71 @@ class d extends x {
|
|
|
1741
1854
|
${this.customData.serverResponse}` : this.message = this._baseMessage;
|
|
1742
1855
|
}
|
|
1743
1856
|
}
|
|
1744
|
-
var
|
|
1857
|
+
var d;
|
|
1745
1858
|
(function(t) {
|
|
1746
1859
|
t.UNKNOWN = "unknown", t.OBJECT_NOT_FOUND = "object-not-found", t.BUCKET_NOT_FOUND = "bucket-not-found", t.PROJECT_NOT_FOUND = "project-not-found", t.QUOTA_EXCEEDED = "quota-exceeded", t.UNAUTHENTICATED = "unauthenticated", t.UNAUTHORIZED = "unauthorized", t.UNAUTHORIZED_APP = "unauthorized-app", t.RETRY_LIMIT_EXCEEDED = "retry-limit-exceeded", t.INVALID_CHECKSUM = "invalid-checksum", t.CANCELED = "canceled", t.INVALID_EVENT_NAME = "invalid-event-name", t.INVALID_URL = "invalid-url", t.INVALID_DEFAULT_BUCKET = "invalid-default-bucket", t.NO_DEFAULT_BUCKET = "no-default-bucket", t.CANNOT_SLICE_BLOB = "cannot-slice-blob", t.SERVER_FILE_WRONG_SIZE = "server-file-wrong-size", t.NO_DOWNLOAD_URL = "no-download-url", t.INVALID_ARGUMENT = "invalid-argument", t.INVALID_ARGUMENT_COUNT = "invalid-argument-count", t.APP_DELETED = "app-deleted", t.INVALID_ROOT_OPERATION = "invalid-root-operation", t.INVALID_FORMAT = "invalid-format", t.INTERNAL_ERROR = "internal-error", t.UNSUPPORTED_ENVIRONMENT = "unsupported-environment";
|
|
1747
|
-
})(
|
|
1860
|
+
})(d || (d = {}));
|
|
1748
1861
|
function re(t) {
|
|
1749
1862
|
return "storage/" + t;
|
|
1750
1863
|
}
|
|
1751
1864
|
function pe() {
|
|
1752
1865
|
const t = "An unknown error occurred, please check the error payload for server response.";
|
|
1753
|
-
return new d
|
|
1866
|
+
return new f(d.UNKNOWN, t);
|
|
1754
1867
|
}
|
|
1755
1868
|
function $n(t) {
|
|
1756
|
-
return new d
|
|
1869
|
+
return new f(d.OBJECT_NOT_FOUND, "Object '" + t + "' does not exist.");
|
|
1757
1870
|
}
|
|
1758
|
-
function
|
|
1759
|
-
return new d
|
|
1871
|
+
function Hn(t) {
|
|
1872
|
+
return new f(d.QUOTA_EXCEEDED, "Quota for bucket '" + t + "' exceeded, please view quota on https://firebase.google.com/pricing/.");
|
|
1760
1873
|
}
|
|
1761
|
-
function
|
|
1874
|
+
function Fn() {
|
|
1762
1875
|
const t = "User is not authenticated, please authenticate using Firebase Authentication and try again.";
|
|
1763
|
-
return new d
|
|
1876
|
+
return new f(d.UNAUTHENTICATED, t);
|
|
1764
1877
|
}
|
|
1765
1878
|
function jn() {
|
|
1766
|
-
return new d
|
|
1879
|
+
return new f(d.UNAUTHORIZED_APP, "This app does not have permission to access Firebase Storage on this project.");
|
|
1767
1880
|
}
|
|
1768
1881
|
function Vn(t) {
|
|
1769
|
-
return new d
|
|
1882
|
+
return new f(d.UNAUTHORIZED, "User does not have permission to access '" + t + "'.");
|
|
1770
1883
|
}
|
|
1771
1884
|
function zn() {
|
|
1772
|
-
return new d
|
|
1885
|
+
return new f(d.RETRY_LIMIT_EXCEEDED, "Max retry time for operation exceeded, please try again.");
|
|
1773
1886
|
}
|
|
1774
1887
|
function Wn() {
|
|
1775
|
-
return new d
|
|
1888
|
+
return new f(d.CANCELED, "User canceled the upload/download.");
|
|
1776
1889
|
}
|
|
1777
1890
|
function qn(t) {
|
|
1778
|
-
return new d
|
|
1891
|
+
return new f(d.INVALID_URL, "Invalid URL '" + t + "'.");
|
|
1779
1892
|
}
|
|
1780
1893
|
function Gn(t) {
|
|
1781
|
-
return new d
|
|
1894
|
+
return new f(d.INVALID_DEFAULT_BUCKET, "Invalid default bucket '" + t + "'.");
|
|
1782
1895
|
}
|
|
1783
1896
|
function Kn() {
|
|
1784
|
-
return new d
|
|
1897
|
+
return new f(d.NO_DEFAULT_BUCKET, "No default bucket found. Did you set the '" + Ve + "' property when initializing the app?");
|
|
1785
1898
|
}
|
|
1786
1899
|
function Xn() {
|
|
1787
|
-
return new d
|
|
1900
|
+
return new f(d.CANNOT_SLICE_BLOB, "Cannot slice blob for upload. Please retry the upload.");
|
|
1788
1901
|
}
|
|
1789
1902
|
function Jn() {
|
|
1790
|
-
return new d
|
|
1903
|
+
return new f(d.NO_DOWNLOAD_URL, "The given file does not have any download URLs.");
|
|
1791
1904
|
}
|
|
1792
1905
|
function Yn(t) {
|
|
1793
|
-
return new d
|
|
1906
|
+
return new f(d.UNSUPPORTED_ENVIRONMENT, `${t} is missing. Make sure to install the required polyfills. See https://firebase.google.com/docs/web/environments-js-sdk#polyfills for more information.`);
|
|
1794
1907
|
}
|
|
1795
1908
|
function he(t) {
|
|
1796
|
-
return new d
|
|
1909
|
+
return new f(d.INVALID_ARGUMENT, t);
|
|
1797
1910
|
}
|
|
1798
1911
|
function ze() {
|
|
1799
|
-
return new d
|
|
1912
|
+
return new f(d.APP_DELETED, "The Firebase app was deleted.");
|
|
1800
1913
|
}
|
|
1801
1914
|
function Zn(t) {
|
|
1802
|
-
return new d
|
|
1915
|
+
return new f(d.INVALID_ROOT_OPERATION, "The operation '" + t + "' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').");
|
|
1803
1916
|
}
|
|
1804
1917
|
function M(t, e) {
|
|
1805
|
-
return new d
|
|
1918
|
+
return new f(d.INVALID_FORMAT, "String does not match format '" + t + "': " + e);
|
|
1806
1919
|
}
|
|
1807
|
-
function
|
|
1808
|
-
throw new d
|
|
1920
|
+
function U(t) {
|
|
1921
|
+
throw new f(d.INTERNAL_ERROR, "Internal error: " + t);
|
|
1809
1922
|
}
|
|
1810
1923
|
/**
|
|
1811
1924
|
* @license
|
|
@@ -1823,7 +1936,7 @@ function P(t) {
|
|
|
1823
1936
|
* See the License for the specific language governing permissions and
|
|
1824
1937
|
* limitations under the License.
|
|
1825
1938
|
*/
|
|
1826
|
-
class
|
|
1939
|
+
class w {
|
|
1827
1940
|
constructor(e, n) {
|
|
1828
1941
|
this.bucket = e, this.path_ = n;
|
|
1829
1942
|
}
|
|
@@ -1843,9 +1956,9 @@ class E {
|
|
|
1843
1956
|
static makeFromBucketSpec(e, n) {
|
|
1844
1957
|
let r;
|
|
1845
1958
|
try {
|
|
1846
|
-
r =
|
|
1959
|
+
r = w.makeFromUrl(e, n);
|
|
1847
1960
|
} catch {
|
|
1848
|
-
return new
|
|
1961
|
+
return new w(e, "");
|
|
1849
1962
|
}
|
|
1850
1963
|
if (r.path === "")
|
|
1851
1964
|
return r;
|
|
@@ -1857,21 +1970,21 @@ class E {
|
|
|
1857
1970
|
function o(y) {
|
|
1858
1971
|
y.path.charAt(y.path.length - 1) === "/" && (y.path_ = y.path_.slice(0, -1));
|
|
1859
1972
|
}
|
|
1860
|
-
const i = "(/(.*))?$",
|
|
1861
|
-
function
|
|
1973
|
+
const i = "(/(.*))?$", c = new RegExp("^gs://" + s + i, "i"), l = { bucket: 1, path: 3 };
|
|
1974
|
+
function a(y) {
|
|
1862
1975
|
y.path_ = decodeURIComponent(y.path);
|
|
1863
1976
|
}
|
|
1864
|
-
const
|
|
1865
|
-
{ regex:
|
|
1977
|
+
const u = "v[A-Za-z0-9_]+", p = n.replace(/[.]/g, "\\."), g = "(/([^?#]*).*)?$", m = new RegExp(`^https?://${p}/${u}/b/${s}/o${g}`, "i"), E = { bucket: 1, path: 3 }, N = n === je ? "(?:storage.googleapis.com|storage.cloud.google.com)" : n, _ = "([^?#]*)", B = new RegExp(`^https?://${N}/${s}/${_}`, "i"), I = [
|
|
1978
|
+
{ regex: c, indices: l, postModify: o },
|
|
1866
1979
|
{
|
|
1867
1980
|
regex: m,
|
|
1868
|
-
indices:
|
|
1869
|
-
postModify:
|
|
1981
|
+
indices: E,
|
|
1982
|
+
postModify: a
|
|
1870
1983
|
},
|
|
1871
1984
|
{
|
|
1872
1985
|
regex: B,
|
|
1873
1986
|
indices: { bucket: 1, path: 2 },
|
|
1874
|
-
postModify:
|
|
1987
|
+
postModify: a
|
|
1875
1988
|
}
|
|
1876
1989
|
];
|
|
1877
1990
|
for (let y = 0; y < I.length; y++) {
|
|
@@ -1879,7 +1992,7 @@ class E {
|
|
|
1879
1992
|
if (J) {
|
|
1880
1993
|
const st = J[V.indices.bucket];
|
|
1881
1994
|
let Y = J[V.indices.path];
|
|
1882
|
-
Y || (Y = ""), r = new
|
|
1995
|
+
Y || (Y = ""), r = new w(st, Y), V.postModify(r);
|
|
1883
1996
|
break;
|
|
1884
1997
|
}
|
|
1885
1998
|
}
|
|
@@ -1917,46 +2030,46 @@ class Qn {
|
|
|
1917
2030
|
* limitations under the License.
|
|
1918
2031
|
*/
|
|
1919
2032
|
function er(t, e, n) {
|
|
1920
|
-
let r = 1, s = null, o = null, i = !1,
|
|
1921
|
-
function
|
|
1922
|
-
return
|
|
2033
|
+
let r = 1, s = null, o = null, i = !1, c = 0;
|
|
2034
|
+
function l() {
|
|
2035
|
+
return c === 2;
|
|
1923
2036
|
}
|
|
1924
|
-
let
|
|
1925
|
-
function
|
|
1926
|
-
|
|
2037
|
+
let a = !1;
|
|
2038
|
+
function u(..._) {
|
|
2039
|
+
a || (a = !0, e.apply(null, _));
|
|
1927
2040
|
}
|
|
1928
|
-
function
|
|
2041
|
+
function p(_) {
|
|
1929
2042
|
s = setTimeout(() => {
|
|
1930
|
-
s = null, t(m,
|
|
1931
|
-
},
|
|
2043
|
+
s = null, t(m, l());
|
|
2044
|
+
}, _);
|
|
1932
2045
|
}
|
|
1933
|
-
function
|
|
2046
|
+
function g() {
|
|
1934
2047
|
o && clearTimeout(o);
|
|
1935
2048
|
}
|
|
1936
|
-
function m(
|
|
1937
|
-
if (
|
|
1938
|
-
|
|
2049
|
+
function m(_, ...B) {
|
|
2050
|
+
if (a) {
|
|
2051
|
+
g();
|
|
1939
2052
|
return;
|
|
1940
2053
|
}
|
|
1941
|
-
if (
|
|
1942
|
-
|
|
2054
|
+
if (_) {
|
|
2055
|
+
g(), u.call(null, _, ...B);
|
|
1943
2056
|
return;
|
|
1944
2057
|
}
|
|
1945
|
-
if (
|
|
1946
|
-
|
|
2058
|
+
if (l() || i) {
|
|
2059
|
+
g(), u.call(null, _, ...B);
|
|
1947
2060
|
return;
|
|
1948
2061
|
}
|
|
1949
2062
|
r < 64 && (r *= 2);
|
|
1950
2063
|
let I;
|
|
1951
|
-
|
|
2064
|
+
c === 1 ? (c = 2, I = 0) : I = (r + Math.random()) * 1e3, p(I);
|
|
1952
2065
|
}
|
|
1953
|
-
let
|
|
1954
|
-
function
|
|
1955
|
-
|
|
2066
|
+
let E = !1;
|
|
2067
|
+
function N(_) {
|
|
2068
|
+
E || (E = !0, g(), !a && (s !== null ? (_ || (c = 2), clearTimeout(s), p(0)) : _ || (c = 1)));
|
|
1956
2069
|
}
|
|
1957
|
-
return
|
|
1958
|
-
i = !0,
|
|
1959
|
-
}, n),
|
|
2070
|
+
return p(0), o = setTimeout(() => {
|
|
2071
|
+
i = !0, N(!0);
|
|
2072
|
+
}, n), N;
|
|
1960
2073
|
}
|
|
1961
2074
|
function tr(t) {
|
|
1962
2075
|
t(!1);
|
|
@@ -1986,13 +2099,13 @@ function rr(t) {
|
|
|
1986
2099
|
function ge(t) {
|
|
1987
2100
|
return typeof t == "string" || t instanceof String;
|
|
1988
2101
|
}
|
|
1989
|
-
function
|
|
2102
|
+
function Oe(t) {
|
|
1990
2103
|
return me() && t instanceof Blob;
|
|
1991
2104
|
}
|
|
1992
2105
|
function me() {
|
|
1993
|
-
return typeof Blob < "u" && !
|
|
2106
|
+
return typeof Blob < "u" && !_t();
|
|
1994
2107
|
}
|
|
1995
|
-
function
|
|
2108
|
+
function Ce(t, e, n, r) {
|
|
1996
2109
|
if (r < e)
|
|
1997
2110
|
throw he(`Invalid value for '${t}'. Expected ${e} or greater.`);
|
|
1998
2111
|
if (r > n)
|
|
@@ -2044,10 +2157,10 @@ function We(t) {
|
|
|
2044
2157
|
* See the License for the specific language governing permissions and
|
|
2045
2158
|
* limitations under the License.
|
|
2046
2159
|
*/
|
|
2047
|
-
var
|
|
2160
|
+
var C;
|
|
2048
2161
|
(function(t) {
|
|
2049
2162
|
t[t.NO_ERROR = 0] = "NO_ERROR", t[t.NETWORK_ERROR = 1] = "NETWORK_ERROR", t[t.ABORT = 2] = "ABORT";
|
|
2050
|
-
})(
|
|
2163
|
+
})(C || (C = {}));
|
|
2051
2164
|
/**
|
|
2052
2165
|
* @license
|
|
2053
2166
|
* Copyright 2022 Google LLC
|
|
@@ -2090,9 +2203,9 @@ function sr(t, e) {
|
|
|
2090
2203
|
* limitations under the License.
|
|
2091
2204
|
*/
|
|
2092
2205
|
class or {
|
|
2093
|
-
constructor(e, n, r, s, o, i,
|
|
2094
|
-
this.url_ = e, this.method_ = n, this.headers_ = r, this.body_ = s, this.successCodes_ = o, this.additionalRetryCodes_ = i, this.callback_ =
|
|
2095
|
-
this.resolve_ = m, this.reject_ =
|
|
2206
|
+
constructor(e, n, r, s, o, i, c, l, a, u, p, g = !0) {
|
|
2207
|
+
this.url_ = e, this.method_ = n, this.headers_ = r, this.body_ = s, this.successCodes_ = o, this.additionalRetryCodes_ = i, this.callback_ = c, this.errorCallback_ = l, this.timeout_ = a, this.progressCallback_ = u, this.connectionFactory_ = p, this.retry = g, this.pendingConnection_ = null, this.backoffId_ = null, this.canceled_ = !1, this.appDelete_ = !1, this.promise_ = new Promise((m, E) => {
|
|
2208
|
+
this.resolve_ = m, this.reject_ = E, this.start_();
|
|
2096
2209
|
});
|
|
2097
2210
|
}
|
|
2098
2211
|
/**
|
|
@@ -2106,39 +2219,39 @@ class or {
|
|
|
2106
2219
|
}
|
|
2107
2220
|
const o = this.connectionFactory_();
|
|
2108
2221
|
this.pendingConnection_ = o;
|
|
2109
|
-
const i = (
|
|
2110
|
-
const
|
|
2111
|
-
this.progressCallback_ !== null && this.progressCallback_(
|
|
2222
|
+
const i = (c) => {
|
|
2223
|
+
const l = c.loaded, a = c.lengthComputable ? c.total : -1;
|
|
2224
|
+
this.progressCallback_ !== null && this.progressCallback_(l, a);
|
|
2112
2225
|
};
|
|
2113
2226
|
this.progressCallback_ !== null && o.addUploadProgressListener(i), o.send(this.url_, this.method_, this.body_, this.headers_).then(() => {
|
|
2114
2227
|
this.progressCallback_ !== null && o.removeUploadProgressListener(i), this.pendingConnection_ = null;
|
|
2115
|
-
const
|
|
2116
|
-
if (!
|
|
2117
|
-
const
|
|
2118
|
-
r(!1, new z(!1, null,
|
|
2228
|
+
const c = o.getErrorCode() === C.NO_ERROR, l = o.getStatus();
|
|
2229
|
+
if (!c || sr(l, this.additionalRetryCodes_) && this.retry) {
|
|
2230
|
+
const u = o.getErrorCode() === C.ABORT;
|
|
2231
|
+
r(!1, new z(!1, null, u));
|
|
2119
2232
|
return;
|
|
2120
2233
|
}
|
|
2121
|
-
const
|
|
2122
|
-
r(!0, new z(
|
|
2234
|
+
const a = this.successCodes_.indexOf(l) !== -1;
|
|
2235
|
+
r(!0, new z(a, o));
|
|
2123
2236
|
});
|
|
2124
2237
|
}, n = (r, s) => {
|
|
2125
|
-
const o = this.resolve_, i = this.reject_,
|
|
2238
|
+
const o = this.resolve_, i = this.reject_, c = s.connection;
|
|
2126
2239
|
if (s.wasSuccessCode)
|
|
2127
2240
|
try {
|
|
2128
|
-
const
|
|
2129
|
-
nr(
|
|
2130
|
-
} catch (
|
|
2131
|
-
i(
|
|
2241
|
+
const l = this.callback_(c, c.getResponse());
|
|
2242
|
+
nr(l) ? o(l) : o();
|
|
2243
|
+
} catch (l) {
|
|
2244
|
+
i(l);
|
|
2132
2245
|
}
|
|
2133
|
-
else if (
|
|
2134
|
-
const
|
|
2135
|
-
|
|
2246
|
+
else if (c !== null) {
|
|
2247
|
+
const l = pe();
|
|
2248
|
+
l.serverResponse = c.getErrorText(), this.errorCallback_ ? i(this.errorCallback_(c, l)) : i(l);
|
|
2136
2249
|
} else if (s.canceled) {
|
|
2137
|
-
const
|
|
2138
|
-
i(
|
|
2250
|
+
const l = this.appDelete_ ? ze() : Wn();
|
|
2251
|
+
i(l);
|
|
2139
2252
|
} else {
|
|
2140
|
-
const
|
|
2141
|
-
i(
|
|
2253
|
+
const l = zn();
|
|
2254
|
+
i(l);
|
|
2142
2255
|
}
|
|
2143
2256
|
};
|
|
2144
2257
|
this.canceled_ ? n(!1, new z(!1, null, !0)) : this.backoffId_ = er(e, n, this.timeout_);
|
|
@@ -2170,8 +2283,8 @@ function lr(t, e) {
|
|
|
2170
2283
|
e !== null && (t["X-Firebase-AppCheck"] = e);
|
|
2171
2284
|
}
|
|
2172
2285
|
function ur(t, e, n, r, s, o, i = !0) {
|
|
2173
|
-
const
|
|
2174
|
-
return cr(
|
|
2286
|
+
const c = We(t.urlParams), l = t.url + c, a = Object.assign({}, t.headers);
|
|
2287
|
+
return cr(a, e), ir(a, n), ar(a, o), lr(a, r), new or(l, t.method, a, t.body, t.successCodes, t.additionalRetryCodes, t.handler, t.errorHandler, t.timeout, t.progressCallback, s, i);
|
|
2175
2288
|
}
|
|
2176
2289
|
/**
|
|
2177
2290
|
* @license
|
|
@@ -2202,7 +2315,7 @@ function dr(...t) {
|
|
|
2202
2315
|
} else {
|
|
2203
2316
|
if (me())
|
|
2204
2317
|
return new Blob(t);
|
|
2205
|
-
throw new d
|
|
2318
|
+
throw new f(d.UNSUPPORTED_ENVIRONMENT, "This browser doesn't seem to support creating Blobs");
|
|
2206
2319
|
}
|
|
2207
2320
|
}
|
|
2208
2321
|
function fr(t, e, n) {
|
|
@@ -2245,7 +2358,7 @@ function pr(t) {
|
|
|
2245
2358
|
* See the License for the specific language governing permissions and
|
|
2246
2359
|
* limitations under the License.
|
|
2247
2360
|
*/
|
|
2248
|
-
const
|
|
2361
|
+
const v = {
|
|
2249
2362
|
/**
|
|
2250
2363
|
* Indicates the string should be interpreted "raw", that is, as normal text.
|
|
2251
2364
|
* The string will be interpreted as UTF-16, then uploaded as a UTF-8 byte
|
|
@@ -2286,13 +2399,13 @@ class se {
|
|
|
2286
2399
|
}
|
|
2287
2400
|
function gr(t, e) {
|
|
2288
2401
|
switch (t) {
|
|
2289
|
-
case
|
|
2402
|
+
case v.RAW:
|
|
2290
2403
|
return new se(qe(e));
|
|
2291
|
-
case
|
|
2292
|
-
case
|
|
2404
|
+
case v.BASE64:
|
|
2405
|
+
case v.BASE64URL:
|
|
2293
2406
|
return new se(Ge(t, e));
|
|
2294
|
-
case
|
|
2295
|
-
return new se(
|
|
2407
|
+
case v.DATA_URL:
|
|
2408
|
+
return new se(br(e), _r(e));
|
|
2296
2409
|
}
|
|
2297
2410
|
throw pe();
|
|
2298
2411
|
}
|
|
@@ -2321,19 +2434,19 @@ function mr(t) {
|
|
|
2321
2434
|
try {
|
|
2322
2435
|
e = decodeURIComponent(t);
|
|
2323
2436
|
} catch {
|
|
2324
|
-
throw M(
|
|
2437
|
+
throw M(v.DATA_URL, "Malformed data URL.");
|
|
2325
2438
|
}
|
|
2326
2439
|
return qe(e);
|
|
2327
2440
|
}
|
|
2328
2441
|
function Ge(t, e) {
|
|
2329
2442
|
switch (t) {
|
|
2330
|
-
case
|
|
2443
|
+
case v.BASE64: {
|
|
2331
2444
|
const s = e.indexOf("-") !== -1, o = e.indexOf("_") !== -1;
|
|
2332
2445
|
if (s || o)
|
|
2333
2446
|
throw M(t, "Invalid character '" + (s ? "-" : "_") + "' found: is it base64url encoded?");
|
|
2334
2447
|
break;
|
|
2335
2448
|
}
|
|
2336
|
-
case
|
|
2449
|
+
case v.BASE64URL: {
|
|
2337
2450
|
const s = e.indexOf("+") !== -1, o = e.indexOf("/") !== -1;
|
|
2338
2451
|
if (s || o)
|
|
2339
2452
|
throw M(t, "Invalid character '" + (s ? "+" : "/") + "' found: is it base64 encoded?");
|
|
@@ -2357,16 +2470,16 @@ class Ke {
|
|
|
2357
2470
|
this.base64 = !1, this.contentType = null;
|
|
2358
2471
|
const n = e.match(/^data:([^,]+)?,/);
|
|
2359
2472
|
if (n === null)
|
|
2360
|
-
throw M(
|
|
2473
|
+
throw M(v.DATA_URL, "Must be formatted 'data:[<mediatype>][;base64],<data>");
|
|
2361
2474
|
const r = n[1] || null;
|
|
2362
2475
|
r != null && (this.base64 = yr(r, ";base64"), this.contentType = this.base64 ? r.substring(0, r.length - 7) : r), this.rest = e.substring(e.indexOf(",") + 1);
|
|
2363
2476
|
}
|
|
2364
2477
|
}
|
|
2365
|
-
function
|
|
2478
|
+
function br(t) {
|
|
2366
2479
|
const e = new Ke(t);
|
|
2367
|
-
return e.base64 ? Ge(
|
|
2480
|
+
return e.base64 ? Ge(v.BASE64, e.rest) : mr(e.rest);
|
|
2368
2481
|
}
|
|
2369
|
-
function
|
|
2482
|
+
function _r(t) {
|
|
2370
2483
|
return new Ke(t).contentType;
|
|
2371
2484
|
}
|
|
2372
2485
|
function yr(t, e) {
|
|
@@ -2391,7 +2504,7 @@ function yr(t, e) {
|
|
|
2391
2504
|
class T {
|
|
2392
2505
|
constructor(e, n) {
|
|
2393
2506
|
let r = 0, s = "";
|
|
2394
|
-
|
|
2507
|
+
Oe(e) ? (this.data_ = e, r = e.size, s = e.type) : e instanceof ArrayBuffer ? (n ? this.data_ = new Uint8Array(e) : (this.data_ = new Uint8Array(e.byteLength), this.data_.set(new Uint8Array(e))), r = this.data_.length) : e instanceof Uint8Array && (n ? this.data_ = e : (this.data_ = new Uint8Array(e.length), this.data_.set(e)), r = e.length), this.size_ = r, this.type_ = s;
|
|
2395
2508
|
}
|
|
2396
2509
|
size() {
|
|
2397
2510
|
return this.size_;
|
|
@@ -2400,7 +2513,7 @@ class T {
|
|
|
2400
2513
|
return this.type_;
|
|
2401
2514
|
}
|
|
2402
2515
|
slice(e, n) {
|
|
2403
|
-
if (
|
|
2516
|
+
if (Oe(this.data_)) {
|
|
2404
2517
|
const r = this.data_, s = fr(r, e, n);
|
|
2405
2518
|
return s === null ? null : new T(s);
|
|
2406
2519
|
} else {
|
|
@@ -2413,7 +2526,7 @@ class T {
|
|
|
2413
2526
|
const n = e.map((r) => r instanceof T ? r.data_ : r);
|
|
2414
2527
|
return new T(dr.apply(null, n));
|
|
2415
2528
|
} else {
|
|
2416
|
-
const n = e.map((i) => ge(i) ? gr(
|
|
2529
|
+
const n = e.map((i) => ge(i) ? gr(v.RAW, i).data : i.data_);
|
|
2417
2530
|
let r = 0;
|
|
2418
2531
|
n.forEach((i) => {
|
|
2419
2532
|
r += i.byteLength;
|
|
@@ -2421,8 +2534,8 @@ class T {
|
|
|
2421
2534
|
const s = new Uint8Array(r);
|
|
2422
2535
|
let o = 0;
|
|
2423
2536
|
return n.forEach((i) => {
|
|
2424
|
-
for (let
|
|
2425
|
-
s[o++] = i[
|
|
2537
|
+
for (let c = 0; c < i.length; c++)
|
|
2538
|
+
s[o++] = i[c];
|
|
2426
2539
|
}), new T(s, !0);
|
|
2427
2540
|
}
|
|
2428
2541
|
}
|
|
@@ -2471,13 +2584,13 @@ function Xe(t) {
|
|
|
2471
2584
|
* See the License for the specific language governing permissions and
|
|
2472
2585
|
* limitations under the License.
|
|
2473
2586
|
*/
|
|
2474
|
-
function
|
|
2587
|
+
function wr(t) {
|
|
2475
2588
|
if (t.length === 0)
|
|
2476
2589
|
return null;
|
|
2477
2590
|
const e = t.lastIndexOf("/");
|
|
2478
2591
|
return e === -1 ? "" : t.slice(0, e);
|
|
2479
2592
|
}
|
|
2480
|
-
function
|
|
2593
|
+
function Er(t, e) {
|
|
2481
2594
|
const n = e.split("/").filter((r) => r.length > 0).join("/");
|
|
2482
2595
|
return t.length === 0 ? n : t + "/" + n;
|
|
2483
2596
|
}
|
|
@@ -2504,39 +2617,39 @@ function Je(t) {
|
|
|
2504
2617
|
function Ir(t, e) {
|
|
2505
2618
|
return e;
|
|
2506
2619
|
}
|
|
2507
|
-
class
|
|
2620
|
+
class b {
|
|
2508
2621
|
constructor(e, n, r, s) {
|
|
2509
2622
|
this.server = e, this.local = n || e, this.writable = !!r, this.xform = s || Ir;
|
|
2510
2623
|
}
|
|
2511
2624
|
}
|
|
2512
2625
|
let W = null;
|
|
2513
|
-
function
|
|
2626
|
+
function vr(t) {
|
|
2514
2627
|
return !ge(t) || t.length < 2 ? t : Je(t);
|
|
2515
2628
|
}
|
|
2516
2629
|
function Ye() {
|
|
2517
2630
|
if (W)
|
|
2518
2631
|
return W;
|
|
2519
2632
|
const t = [];
|
|
2520
|
-
t.push(new
|
|
2633
|
+
t.push(new b("bucket")), t.push(new b("generation")), t.push(new b("metageneration")), t.push(new b("name", "fullPath", !0));
|
|
2521
2634
|
function e(o, i) {
|
|
2522
|
-
return
|
|
2635
|
+
return vr(i);
|
|
2523
2636
|
}
|
|
2524
|
-
const n = new
|
|
2637
|
+
const n = new b("name");
|
|
2525
2638
|
n.xform = e, t.push(n);
|
|
2526
2639
|
function r(o, i) {
|
|
2527
2640
|
return i !== void 0 ? Number(i) : i;
|
|
2528
2641
|
}
|
|
2529
|
-
const s = new
|
|
2530
|
-
return s.xform = r, t.push(s), t.push(new
|
|
2642
|
+
const s = new b("size");
|
|
2643
|
+
return s.xform = r, t.push(s), t.push(new b("timeCreated")), t.push(new b("updated")), t.push(new b("md5Hash", null, !0)), t.push(new b("cacheControl", null, !0)), t.push(new b("contentDisposition", null, !0)), t.push(new b("contentEncoding", null, !0)), t.push(new b("contentLanguage", null, !0)), t.push(new b("contentType", null, !0)), t.push(new b("metadata", "customMetadata", !0)), W = t, W;
|
|
2531
2644
|
}
|
|
2532
2645
|
function Tr(t, e) {
|
|
2533
2646
|
function n() {
|
|
2534
|
-
const r = t.bucket, s = t.fullPath, o = new
|
|
2647
|
+
const r = t.bucket, s = t.fullPath, o = new w(r, s);
|
|
2535
2648
|
return e._makeStorageReference(o);
|
|
2536
2649
|
}
|
|
2537
2650
|
Object.defineProperty(t, "ref", { get: n });
|
|
2538
2651
|
}
|
|
2539
|
-
function
|
|
2652
|
+
function Rr(t, e, n) {
|
|
2540
2653
|
const r = {};
|
|
2541
2654
|
r.type = "file";
|
|
2542
2655
|
const s = n.length;
|
|
@@ -2548,9 +2661,9 @@ function Ar(t, e, n) {
|
|
|
2548
2661
|
}
|
|
2549
2662
|
function Ze(t, e, n) {
|
|
2550
2663
|
const r = Xe(e);
|
|
2551
|
-
return r === null ? null :
|
|
2664
|
+
return r === null ? null : Rr(t, r, n);
|
|
2552
2665
|
}
|
|
2553
|
-
function
|
|
2666
|
+
function Ar(t, e, n, r) {
|
|
2554
2667
|
const s = Xe(e);
|
|
2555
2668
|
if (s === null || !ge(s.downloadTokens))
|
|
2556
2669
|
return null;
|
|
@@ -2558,12 +2671,12 @@ function vr(t, e, n, r) {
|
|
|
2558
2671
|
if (o.length === 0)
|
|
2559
2672
|
return null;
|
|
2560
2673
|
const i = encodeURIComponent;
|
|
2561
|
-
return o.split(",").map((
|
|
2562
|
-
const
|
|
2674
|
+
return o.split(",").map((a) => {
|
|
2675
|
+
const u = t.bucket, p = t.fullPath, g = "/b/" + i(u) + "/o/" + i(p), m = j(g, n, r), E = We({
|
|
2563
2676
|
alt: "media",
|
|
2564
|
-
token:
|
|
2677
|
+
token: a
|
|
2565
2678
|
});
|
|
2566
|
-
return m +
|
|
2679
|
+
return m + E;
|
|
2567
2680
|
})[0];
|
|
2568
2681
|
}
|
|
2569
2682
|
function Dr(t, e) {
|
|
@@ -2599,28 +2712,28 @@ function Qe(t) {
|
|
|
2599
2712
|
if (!t)
|
|
2600
2713
|
throw pe();
|
|
2601
2714
|
}
|
|
2602
|
-
function
|
|
2715
|
+
function Or(t, e) {
|
|
2603
2716
|
function n(r, s) {
|
|
2604
2717
|
const o = Ze(t, s, e);
|
|
2605
2718
|
return Qe(o !== null), o;
|
|
2606
2719
|
}
|
|
2607
2720
|
return n;
|
|
2608
2721
|
}
|
|
2609
|
-
function
|
|
2722
|
+
function Cr(t, e) {
|
|
2610
2723
|
function n(r, s) {
|
|
2611
2724
|
const o = Ze(t, s, e);
|
|
2612
|
-
return Qe(o !== null),
|
|
2725
|
+
return Qe(o !== null), Ar(o, s, t.host, t._protocol);
|
|
2613
2726
|
}
|
|
2614
2727
|
return n;
|
|
2615
2728
|
}
|
|
2616
2729
|
function et(t) {
|
|
2617
2730
|
function e(n, r) {
|
|
2618
2731
|
let s;
|
|
2619
|
-
return n.getStatus() === 401 ? /* This exact message string is the only consistent part of the */ /* server's error response that identifies it as an App Check error. */ n.getErrorText().includes("Firebase App Check token is invalid") ? s = jn() : s =
|
|
2732
|
+
return n.getStatus() === 401 ? /* This exact message string is the only consistent part of the */ /* server's error response that identifies it as an App Check error. */ n.getErrorText().includes("Firebase App Check token is invalid") ? s = jn() : s = Fn() : n.getStatus() === 402 ? s = Hn(t.bucket) : n.getStatus() === 403 ? s = Vn(t.path) : s = r, s.status = n.getStatus(), s.serverResponse = r.serverResponse, s;
|
|
2620
2733
|
}
|
|
2621
2734
|
return e;
|
|
2622
2735
|
}
|
|
2623
|
-
function
|
|
2736
|
+
function be(t) {
|
|
2624
2737
|
const e = et(t);
|
|
2625
2738
|
function n(r, s) {
|
|
2626
2739
|
let o = e(r, s);
|
|
@@ -2629,23 +2742,23 @@ function _e(t) {
|
|
|
2629
2742
|
return n;
|
|
2630
2743
|
}
|
|
2631
2744
|
function Sr(t, e, n) {
|
|
2632
|
-
const r = e.fullServerUrl(), s = j(r, t.host, t._protocol) + "?alt=media", o = "GET", i = t.maxOperationRetryTime,
|
|
2633
|
-
return
|
|
2745
|
+
const r = e.fullServerUrl(), s = j(r, t.host, t._protocol) + "?alt=media", o = "GET", i = t.maxOperationRetryTime, c = new X(s, o, (l, a) => a, i);
|
|
2746
|
+
return c.errorHandler = be(e), n !== void 0 && (c.headers.Range = `bytes=0-${n}`, c.successCodes = [
|
|
2634
2747
|
200,
|
|
2635
2748
|
206
|
|
2636
2749
|
/* Partial Content */
|
|
2637
|
-
]),
|
|
2750
|
+
]), c;
|
|
2638
2751
|
}
|
|
2639
|
-
function
|
|
2640
|
-
const r = e.fullServerUrl(), s = j(r, t.host, t._protocol), o = "GET", i = t.maxOperationRetryTime,
|
|
2641
|
-
return
|
|
2752
|
+
function kr(t, e, n) {
|
|
2753
|
+
const r = e.fullServerUrl(), s = j(r, t.host, t._protocol), o = "GET", i = t.maxOperationRetryTime, c = new X(s, o, Cr(t, n), i);
|
|
2754
|
+
return c.errorHandler = be(e), c;
|
|
2642
2755
|
}
|
|
2643
|
-
function
|
|
2756
|
+
function Nr(t, e) {
|
|
2644
2757
|
const n = e.fullServerUrl(), r = j(n, t.host, t._protocol), s = "DELETE", o = t.maxOperationRetryTime;
|
|
2645
|
-
function i(
|
|
2758
|
+
function i(l, a) {
|
|
2646
2759
|
}
|
|
2647
|
-
const
|
|
2648
|
-
return
|
|
2760
|
+
const c = new X(r, s, i, o);
|
|
2761
|
+
return c.successCodes = [200, 204], c.errorHandler = be(e), c;
|
|
2649
2762
|
}
|
|
2650
2763
|
function Br(t, e) {
|
|
2651
2764
|
return t && t.contentType || e && e.type() || "application/octet-stream";
|
|
@@ -2654,39 +2767,39 @@ function xr(t, e, n) {
|
|
|
2654
2767
|
const r = Object.assign({}, n);
|
|
2655
2768
|
return r.fullPath = t.path, r.size = e.size(), r.contentType || (r.contentType = Br(null, e)), r;
|
|
2656
2769
|
}
|
|
2657
|
-
function
|
|
2770
|
+
function Pr(t, e, n, r, s) {
|
|
2658
2771
|
const o = e.bucketOnlyServerUrl(), i = {
|
|
2659
2772
|
"X-Goog-Upload-Protocol": "multipart"
|
|
2660
2773
|
};
|
|
2661
|
-
function
|
|
2774
|
+
function c() {
|
|
2662
2775
|
let I = "";
|
|
2663
2776
|
for (let y = 0; y < 2; y++)
|
|
2664
2777
|
I = I + Math.random().toString().slice(2);
|
|
2665
2778
|
return I;
|
|
2666
2779
|
}
|
|
2667
|
-
const
|
|
2668
|
-
i["Content-Type"] = "multipart/related; boundary=" +
|
|
2669
|
-
const
|
|
2780
|
+
const l = c();
|
|
2781
|
+
i["Content-Type"] = "multipart/related; boundary=" + l;
|
|
2782
|
+
const a = xr(e, r, s), u = Dr(a, n), p = "--" + l + `\r
|
|
2670
2783
|
Content-Type: application/json; charset=utf-8\r
|
|
2671
2784
|
\r
|
|
2672
|
-
` +
|
|
2673
|
-
--` +
|
|
2674
|
-
Content-Type: ` +
|
|
2785
|
+
` + u + `\r
|
|
2786
|
+
--` + l + `\r
|
|
2787
|
+
Content-Type: ` + a.contentType + `\r
|
|
2675
2788
|
\r
|
|
2676
|
-
`,
|
|
2677
|
-
--` +
|
|
2789
|
+
`, g = `\r
|
|
2790
|
+
--` + l + "--", m = T.getBlob(p, r, g);
|
|
2678
2791
|
if (m === null)
|
|
2679
2792
|
throw Xn();
|
|
2680
|
-
const
|
|
2681
|
-
return D.urlParams =
|
|
2793
|
+
const E = { name: a.fullPath }, N = j(o, t.host, t._protocol), _ = "POST", B = t.maxUploadRetryTime, D = new X(N, _, Or(t, n), B);
|
|
2794
|
+
return D.urlParams = E, D.headers = i, D.body = m.uploadData(), D.errorHandler = et(e), D;
|
|
2682
2795
|
}
|
|
2683
2796
|
class tt {
|
|
2684
2797
|
constructor() {
|
|
2685
|
-
this.sent_ = !1, this.xhr_ = new XMLHttpRequest(), this.initXhr(), this.errorCode_ =
|
|
2798
|
+
this.sent_ = !1, this.xhr_ = new XMLHttpRequest(), this.initXhr(), this.errorCode_ = C.NO_ERROR, this.sendPromise_ = new Promise((e) => {
|
|
2686
2799
|
this.xhr_.addEventListener("abort", () => {
|
|
2687
|
-
this.errorCode_ =
|
|
2800
|
+
this.errorCode_ = C.ABORT, e();
|
|
2688
2801
|
}), this.xhr_.addEventListener("error", () => {
|
|
2689
|
-
this.errorCode_ =
|
|
2802
|
+
this.errorCode_ = C.NETWORK_ERROR, e();
|
|
2690
2803
|
}), this.xhr_.addEventListener("load", () => {
|
|
2691
2804
|
e();
|
|
2692
2805
|
});
|
|
@@ -2694,7 +2807,7 @@ class tt {
|
|
|
2694
2807
|
}
|
|
2695
2808
|
send(e, n, r, s) {
|
|
2696
2809
|
if (this.sent_)
|
|
2697
|
-
throw
|
|
2810
|
+
throw U("cannot .send() more than once");
|
|
2698
2811
|
if (this.sent_ = !0, this.xhr_.open(n, e, !0), s !== void 0)
|
|
2699
2812
|
for (const o in s)
|
|
2700
2813
|
s.hasOwnProperty(o) && this.xhr_.setRequestHeader(o, s[o].toString());
|
|
@@ -2702,12 +2815,12 @@ class tt {
|
|
|
2702
2815
|
}
|
|
2703
2816
|
getErrorCode() {
|
|
2704
2817
|
if (!this.sent_)
|
|
2705
|
-
throw
|
|
2818
|
+
throw U("cannot .getErrorCode() before sending");
|
|
2706
2819
|
return this.errorCode_;
|
|
2707
2820
|
}
|
|
2708
2821
|
getStatus() {
|
|
2709
2822
|
if (!this.sent_)
|
|
2710
|
-
throw
|
|
2823
|
+
throw U("cannot .getStatus() before sending");
|
|
2711
2824
|
try {
|
|
2712
2825
|
return this.xhr_.status;
|
|
2713
2826
|
} catch {
|
|
@@ -2716,12 +2829,12 @@ class tt {
|
|
|
2716
2829
|
}
|
|
2717
2830
|
getResponse() {
|
|
2718
2831
|
if (!this.sent_)
|
|
2719
|
-
throw
|
|
2832
|
+
throw U("cannot .getResponse() before sending");
|
|
2720
2833
|
return this.xhr_.response;
|
|
2721
2834
|
}
|
|
2722
2835
|
getErrorText() {
|
|
2723
2836
|
if (!this.sent_)
|
|
2724
|
-
throw
|
|
2837
|
+
throw U("cannot .getErrorText() before sending");
|
|
2725
2838
|
return this.xhr_.statusText;
|
|
2726
2839
|
}
|
|
2727
2840
|
/** Aborts the request. */
|
|
@@ -2738,13 +2851,13 @@ class tt {
|
|
|
2738
2851
|
this.xhr_.upload != null && this.xhr_.upload.removeEventListener("progress", e);
|
|
2739
2852
|
}
|
|
2740
2853
|
}
|
|
2741
|
-
class
|
|
2854
|
+
class Ur extends tt {
|
|
2742
2855
|
initXhr() {
|
|
2743
2856
|
this.xhr_.responseType = "text";
|
|
2744
2857
|
}
|
|
2745
2858
|
}
|
|
2746
|
-
function
|
|
2747
|
-
return new
|
|
2859
|
+
function _e() {
|
|
2860
|
+
return new Ur();
|
|
2748
2861
|
}
|
|
2749
2862
|
class Lr extends tt {
|
|
2750
2863
|
initXhr() {
|
|
@@ -2770,9 +2883,9 @@ function Mr() {
|
|
|
2770
2883
|
* See the License for the specific language governing permissions and
|
|
2771
2884
|
* limitations under the License.
|
|
2772
2885
|
*/
|
|
2773
|
-
class
|
|
2886
|
+
class k {
|
|
2774
2887
|
constructor(e, n) {
|
|
2775
|
-
this._service = e, n instanceof
|
|
2888
|
+
this._service = e, n instanceof w ? this._location = n : this._location = w.makeFromUrl(n, e.host);
|
|
2776
2889
|
}
|
|
2777
2890
|
/**
|
|
2778
2891
|
* Returns the URL for the bucket and path this object references,
|
|
@@ -2783,13 +2896,13 @@ class N {
|
|
|
2783
2896
|
return "gs://" + this._location.bucket + "/" + this._location.path;
|
|
2784
2897
|
}
|
|
2785
2898
|
_newRef(e, n) {
|
|
2786
|
-
return new
|
|
2899
|
+
return new k(e, n);
|
|
2787
2900
|
}
|
|
2788
2901
|
/**
|
|
2789
2902
|
* A reference to the root of this object's bucket.
|
|
2790
2903
|
*/
|
|
2791
2904
|
get root() {
|
|
2792
|
-
const e = new
|
|
2905
|
+
const e = new w(this._location.bucket, "");
|
|
2793
2906
|
return this._newRef(this._service, e);
|
|
2794
2907
|
}
|
|
2795
2908
|
/**
|
|
@@ -2822,11 +2935,11 @@ class N {
|
|
|
2822
2935
|
* this reference is the root.
|
|
2823
2936
|
*/
|
|
2824
2937
|
get parent() {
|
|
2825
|
-
const e =
|
|
2938
|
+
const e = wr(this._location.path);
|
|
2826
2939
|
if (e === null)
|
|
2827
2940
|
return null;
|
|
2828
|
-
const n = new
|
|
2829
|
-
return new
|
|
2941
|
+
const n = new w(this._location.bucket, e);
|
|
2942
|
+
return new k(this._service, n);
|
|
2830
2943
|
}
|
|
2831
2944
|
/**
|
|
2832
2945
|
* Utility function to throw an error in methods that do not accept a root reference.
|
|
@@ -2844,18 +2957,18 @@ function $r(t, e) {
|
|
|
2844
2957
|
r.slice(0, e)
|
|
2845
2958
|
) : r);
|
|
2846
2959
|
}
|
|
2847
|
-
function
|
|
2960
|
+
function Hr(t, e, n) {
|
|
2848
2961
|
t._throwIfRoot("uploadBytes");
|
|
2849
|
-
const r =
|
|
2850
|
-
return t.storage.makeRequestWithTokens(r,
|
|
2962
|
+
const r = Pr(t.storage, t._location, Ye(), new T(e, !0), n);
|
|
2963
|
+
return t.storage.makeRequestWithTokens(r, _e).then((s) => ({
|
|
2851
2964
|
metadata: s,
|
|
2852
2965
|
ref: t
|
|
2853
2966
|
}));
|
|
2854
2967
|
}
|
|
2855
|
-
function
|
|
2968
|
+
function Fr(t) {
|
|
2856
2969
|
t._throwIfRoot("getDownloadURL");
|
|
2857
|
-
const e =
|
|
2858
|
-
return t.storage.makeRequestWithTokens(e,
|
|
2970
|
+
const e = kr(t.storage, t._location, Ye());
|
|
2971
|
+
return t.storage.makeRequestWithTokens(e, _e).then((n) => {
|
|
2859
2972
|
if (n === null)
|
|
2860
2973
|
throw Jn();
|
|
2861
2974
|
return n;
|
|
@@ -2863,12 +2976,12 @@ function Hr(t) {
|
|
|
2863
2976
|
}
|
|
2864
2977
|
function jr(t) {
|
|
2865
2978
|
t._throwIfRoot("deleteObject");
|
|
2866
|
-
const e =
|
|
2867
|
-
return t.storage.makeRequestWithTokens(e,
|
|
2979
|
+
const e = Nr(t.storage, t._location);
|
|
2980
|
+
return t.storage.makeRequestWithTokens(e, _e);
|
|
2868
2981
|
}
|
|
2869
2982
|
function Vr(t, e) {
|
|
2870
|
-
const n =
|
|
2871
|
-
return new
|
|
2983
|
+
const n = Er(t._location.path, e), r = new w(t._location.bucket, n);
|
|
2984
|
+
return new k(t.storage, r);
|
|
2872
2985
|
}
|
|
2873
2986
|
/**
|
|
2874
2987
|
* @license
|
|
@@ -2890,14 +3003,14 @@ function zr(t) {
|
|
|
2890
3003
|
return /^[A-Za-z]+:\/\//.test(t);
|
|
2891
3004
|
}
|
|
2892
3005
|
function Wr(t, e) {
|
|
2893
|
-
return new
|
|
3006
|
+
return new k(t, e);
|
|
2894
3007
|
}
|
|
2895
3008
|
function nt(t, e) {
|
|
2896
3009
|
if (t instanceof ye) {
|
|
2897
3010
|
const n = t;
|
|
2898
3011
|
if (n._bucket == null)
|
|
2899
3012
|
throw Kn();
|
|
2900
|
-
const r = new
|
|
3013
|
+
const r = new k(n, n._bucket);
|
|
2901
3014
|
return e != null ? nt(r, e) : r;
|
|
2902
3015
|
} else
|
|
2903
3016
|
return e !== void 0 ? Vr(t, e) : t;
|
|
@@ -2912,16 +3025,16 @@ function qr(t, e) {
|
|
|
2912
3025
|
}
|
|
2913
3026
|
function Se(t, e) {
|
|
2914
3027
|
const n = e == null ? void 0 : e[Ve];
|
|
2915
|
-
return n == null ? null :
|
|
3028
|
+
return n == null ? null : w.makeFromBucketSpec(n, t);
|
|
2916
3029
|
}
|
|
2917
3030
|
function Gr(t, e, n, r = {}) {
|
|
2918
3031
|
t.host = `${e}:${n}`, t._protocol = "http";
|
|
2919
3032
|
const { mockUserToken: s } = r;
|
|
2920
|
-
s && (t._overrideAuthToken = typeof s == "string" ? s :
|
|
3033
|
+
s && (t._overrideAuthToken = typeof s == "string" ? s : bt(s, t.app.options.projectId));
|
|
2921
3034
|
}
|
|
2922
3035
|
class ye {
|
|
2923
3036
|
constructor(e, n, r, s, o) {
|
|
2924
|
-
this.app = e, this._authProvider = n, this._appCheckProvider = r, this._url = s, this._firebaseVersion = o, this._bucket = null, this._host = je, this._protocol = "https", this._appId = null, this._deleted = !1, this._maxOperationRetryTime = Ln, this._maxUploadRetryTime = Mn, this._requests = /* @__PURE__ */ new Set(), s != null ? this._bucket =
|
|
3037
|
+
this.app = e, this._authProvider = n, this._appCheckProvider = r, this._url = s, this._firebaseVersion = o, this._bucket = null, this._host = je, this._protocol = "https", this._appId = null, this._deleted = !1, this._maxOperationRetryTime = Ln, this._maxUploadRetryTime = Mn, this._requests = /* @__PURE__ */ new Set(), s != null ? this._bucket = w.makeFromBucketSpec(s, this._host) : this._bucket = Se(this._host, this.app.options);
|
|
2925
3038
|
}
|
|
2926
3039
|
/**
|
|
2927
3040
|
* The host string for this service, in the form of `host` or
|
|
@@ -2931,7 +3044,7 @@ class ye {
|
|
|
2931
3044
|
return this._host;
|
|
2932
3045
|
}
|
|
2933
3046
|
set host(e) {
|
|
2934
|
-
this._host = e, this._url != null ? this._bucket =
|
|
3047
|
+
this._host = e, this._url != null ? this._bucket = w.makeFromBucketSpec(this._url, e) : this._bucket = Se(e, this.app.options);
|
|
2935
3048
|
}
|
|
2936
3049
|
/**
|
|
2937
3050
|
* The maximum time to retry uploads in milliseconds.
|
|
@@ -2940,7 +3053,7 @@ class ye {
|
|
|
2940
3053
|
return this._maxUploadRetryTime;
|
|
2941
3054
|
}
|
|
2942
3055
|
set maxUploadRetryTime(e) {
|
|
2943
|
-
|
|
3056
|
+
Ce(
|
|
2944
3057
|
"time",
|
|
2945
3058
|
/* minValue=*/
|
|
2946
3059
|
0,
|
|
@@ -2957,7 +3070,7 @@ class ye {
|
|
|
2957
3070
|
return this._maxOperationRetryTime;
|
|
2958
3071
|
}
|
|
2959
3072
|
set maxOperationRetryTime(e) {
|
|
2960
|
-
|
|
3073
|
+
Ce(
|
|
2961
3074
|
"time",
|
|
2962
3075
|
/* minValue=*/
|
|
2963
3076
|
0,
|
|
@@ -2992,7 +3105,7 @@ class ye {
|
|
|
2992
3105
|
* at the given Location.
|
|
2993
3106
|
*/
|
|
2994
3107
|
_makeStorageReference(e) {
|
|
2995
|
-
return new
|
|
3108
|
+
return new k(this, e);
|
|
2996
3109
|
}
|
|
2997
3110
|
/**
|
|
2998
3111
|
* @param requestInfo - HTTP RequestInfo object
|
|
@@ -3014,7 +3127,7 @@ class ye {
|
|
|
3014
3127
|
return this._makeRequest(e, n, r, s).getPromise();
|
|
3015
3128
|
}
|
|
3016
3129
|
}
|
|
3017
|
-
const
|
|
3130
|
+
const ke = "@firebase/storage", Ne = "0.11.2";
|
|
3018
3131
|
/**
|
|
3019
3132
|
* @license
|
|
3020
3133
|
* Copyright 2020 Google LLC
|
|
@@ -3032,20 +3145,20 @@ const Ne = "@firebase/storage", ke = "0.11.2";
|
|
|
3032
3145
|
* limitations under the License.
|
|
3033
3146
|
*/
|
|
3034
3147
|
const rt = "storage";
|
|
3035
|
-
function
|
|
3036
|
-
return t =
|
|
3148
|
+
function hs(t, e, n) {
|
|
3149
|
+
return t = P(t), Hr(t, e, n);
|
|
3037
3150
|
}
|
|
3038
|
-
function
|
|
3039
|
-
return t =
|
|
3151
|
+
function ds(t) {
|
|
3152
|
+
return t = P(t), Fr(t);
|
|
3040
3153
|
}
|
|
3041
|
-
function
|
|
3042
|
-
return t =
|
|
3154
|
+
function fs(t) {
|
|
3155
|
+
return t = P(t), jr(t);
|
|
3043
3156
|
}
|
|
3044
|
-
function
|
|
3045
|
-
return t =
|
|
3157
|
+
function ps(t, e) {
|
|
3158
|
+
return t = P(t), qr(t, e);
|
|
3046
3159
|
}
|
|
3047
|
-
function
|
|
3048
|
-
t =
|
|
3160
|
+
function gs(t = Dn(), e) {
|
|
3161
|
+
t = P(t);
|
|
3049
3162
|
const r = In(t, rt).getImmediate({
|
|
3050
3163
|
identifier: e
|
|
3051
3164
|
}), s = gt("storage");
|
|
@@ -3070,12 +3183,12 @@ function Kr(t, e, n, r = {}) {
|
|
|
3070
3183
|
* See the License for the specific language governing permissions and
|
|
3071
3184
|
* limitations under the License.
|
|
3072
3185
|
*/
|
|
3073
|
-
function
|
|
3074
|
-
return t =
|
|
3186
|
+
function ms(t, e) {
|
|
3187
|
+
return t = P(t), $r(t, e);
|
|
3075
3188
|
}
|
|
3076
3189
|
function Xr(t, { instanceIdentifier: e }) {
|
|
3077
3190
|
const n = t.getProvider("app").getImmediate(), r = t.getProvider("auth-internal"), s = t.getProvider("app-check-internal");
|
|
3078
|
-
return new ye(n, r, s, e,
|
|
3191
|
+
return new ye(n, r, s, e, Rn);
|
|
3079
3192
|
}
|
|
3080
3193
|
function Jr() {
|
|
3081
3194
|
G(new $(
|
|
@@ -3083,23 +3196,23 @@ function Jr() {
|
|
|
3083
3196
|
Xr,
|
|
3084
3197
|
"PUBLIC"
|
|
3085
3198
|
/* ComponentType.PUBLIC */
|
|
3086
|
-
).setMultipleInstances(!0)), L(
|
|
3199
|
+
).setMultipleInstances(!0)), L(ke, Ne, ""), L(ke, Ne, "esm2017");
|
|
3087
3200
|
}
|
|
3088
3201
|
Jr();
|
|
3089
|
-
const de = ot(null),
|
|
3090
|
-
function
|
|
3202
|
+
const de = ot(null), bs = () => de.value;
|
|
3203
|
+
function _s(t) {
|
|
3091
3204
|
de.value || (de.value = t);
|
|
3092
3205
|
}
|
|
3093
|
-
const
|
|
3206
|
+
const ys = Object.freeze({
|
|
3094
3207
|
jb: {
|
|
3095
3208
|
lat: 1.492659,
|
|
3096
3209
|
lng: 103.7413591
|
|
3097
3210
|
}
|
|
3098
3211
|
});
|
|
3099
|
-
function
|
|
3212
|
+
function ws(t) {
|
|
3100
3213
|
return [t.lng, t.lat];
|
|
3101
3214
|
}
|
|
3102
|
-
function
|
|
3215
|
+
function Es(t) {
|
|
3103
3216
|
if (t.length !== 2)
|
|
3104
3217
|
throw Error("Invalid coordinate array");
|
|
3105
3218
|
return {
|
|
@@ -3108,40 +3221,44 @@ function _s(t) {
|
|
|
3108
3221
|
};
|
|
3109
3222
|
}
|
|
3110
3223
|
export {
|
|
3111
|
-
|
|
3112
|
-
|
|
3224
|
+
ps as A,
|
|
3225
|
+
ms as B,
|
|
3113
3226
|
$ as C,
|
|
3114
|
-
|
|
3227
|
+
hs as D,
|
|
3115
3228
|
Le as E,
|
|
3116
3229
|
x as F,
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3230
|
+
ds as G,
|
|
3231
|
+
fs as H,
|
|
3232
|
+
ys as I,
|
|
3233
|
+
Es as J,
|
|
3234
|
+
ws as K,
|
|
3235
|
+
h as L,
|
|
3236
|
+
Rn as S,
|
|
3120
3237
|
G as _,
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3238
|
+
os as a,
|
|
3239
|
+
ss as b,
|
|
3240
|
+
P as c,
|
|
3241
|
+
ls as d,
|
|
3125
3242
|
In as e,
|
|
3126
3243
|
pt as f,
|
|
3127
|
-
|
|
3244
|
+
ns as g,
|
|
3128
3245
|
Dn as h,
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3246
|
+
rs as i,
|
|
3247
|
+
Zr as j,
|
|
3248
|
+
Ue as k,
|
|
3249
|
+
oe as l,
|
|
3250
|
+
xt as m,
|
|
3251
|
+
lt as n,
|
|
3252
|
+
is as o,
|
|
3253
|
+
as as p,
|
|
3254
|
+
cs as q,
|
|
3138
3255
|
L as r,
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3256
|
+
us as s,
|
|
3257
|
+
An as t,
|
|
3258
|
+
gs as u,
|
|
3259
|
+
bs as v,
|
|
3260
|
+
_s as w,
|
|
3261
|
+
Qr as x,
|
|
3262
|
+
es as y,
|
|
3263
|
+
ts as z
|
|
3147
3264
|
};
|