@feedmepos/mf-settings 0.0.50-beta.1 → 0.0.50-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-22eddb78.js → App-ccc37fd9.js} +97 -106
- package/dist/Business-edf5bd92.js +11975 -0
- package/dist/{CreateBusiness-138ac258.js → CreateBusiness-ec365db8.js} +2 -2
- package/dist/{FoodCourt-561cd7e3.js → FoodCourt-652c44f9.js} +1 -1
- package/dist/{Tagging-b746a5f3.js → Tagging-798e2bb7.js} +3 -3
- package/dist/TemplateBuilder-3e34e9e8.js +27 -0
- package/dist/{app-abfabbcf.js → app-bd3cfc9c.js} +38 -36
- package/dist/app.js +1 -1
- package/dist/apps/mf-settings/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{business-9a4e5bd7.js → business-93826a8c.js} +1 -1
- package/dist/{loading-84215dce.js → loading-6ee8ebc9.js} +223 -223
- package/dist/packages/shared/src/composable/elementPosition.d.ts +1 -1
- package/dist/{index.esm2017-c60b1ce5.js → tslib.es6-449ce8af.js} +502 -385
- package/package.json +2 -1
- package/dist/Business-416835ab.js +0 -3893
- package/dist/TemplateBuilder-54a34178.js +0 -27
|
@@ -71,8 +71,8 @@ const Be = function(t) {
|
|
|
71
71
|
const o = t[n++];
|
|
72
72
|
e[r++] = String.fromCharCode((s & 31) << 6 | o & 63);
|
|
73
73
|
} else if (s > 239 && s < 365) {
|
|
74
|
-
const o = t[n++], i = t[n++],
|
|
75
|
-
e[r++] = String.fromCharCode(55296 + (
|
|
74
|
+
const o = t[n++], i = t[n++], c = t[n++], l = ((s & 7) << 18 | (o & 63) << 12 | (i & 63) << 6 | c & 63) - 65536;
|
|
75
|
+
e[r++] = String.fromCharCode(55296 + (l >> 10)), e[r++] = String.fromCharCode(56320 + (l & 1023));
|
|
76
76
|
} else {
|
|
77
77
|
const o = t[n++], i = t[n++];
|
|
78
78
|
e[r++] = String.fromCharCode((s & 15) << 12 | (o & 63) << 6 | i & 63);
|
|
@@ -138,9 +138,9 @@ const Be = function(t) {
|
|
|
138
138
|
this.init_();
|
|
139
139
|
const n = e ? this.byteToCharMapWebSafe_ : this.byteToCharMap_, r = [];
|
|
140
140
|
for (let s = 0; s < t.length; s += 3) {
|
|
141
|
-
const o = t[s], i = s + 1 < t.length,
|
|
142
|
-
let
|
|
143
|
-
|
|
141
|
+
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;
|
|
142
|
+
let g = (c & 15) << 2 | a >> 6, m = a & 63;
|
|
143
|
+
l || (m = 64, i || (g = 64)), r.push(n[u], n[p], n[g], n[m]);
|
|
144
144
|
}
|
|
145
145
|
return r.join("");
|
|
146
146
|
},
|
|
@@ -185,19 +185,19 @@ const Be = function(t) {
|
|
|
185
185
|
this.init_();
|
|
186
186
|
const n = e ? this.charToByteMapWebSafe_ : this.charToByteMap_, r = [];
|
|
187
187
|
for (let s = 0; s < t.length; ) {
|
|
188
|
-
const o = n[t.charAt(s++)],
|
|
188
|
+
const o = n[t.charAt(s++)], c = s < t.length ? n[t.charAt(s)] : 0;
|
|
189
189
|
++s;
|
|
190
|
-
const
|
|
190
|
+
const a = s < t.length ? n[t.charAt(s)] : 64;
|
|
191
191
|
++s;
|
|
192
|
-
const
|
|
193
|
-
if (++s, o == null ||
|
|
192
|
+
const p = s < t.length ? n[t.charAt(s)] : 64;
|
|
193
|
+
if (++s, o == null || c == null || a == null || p == null)
|
|
194
194
|
throw new at();
|
|
195
|
-
const
|
|
196
|
-
if (r.push(
|
|
197
|
-
const m =
|
|
198
|
-
if (r.push(m),
|
|
199
|
-
const
|
|
200
|
-
r.push(
|
|
195
|
+
const g = o << 2 | c >> 4;
|
|
196
|
+
if (r.push(g), a !== 64) {
|
|
197
|
+
const m = c << 4 & 240 | a >> 2;
|
|
198
|
+
if (r.push(m), p !== 64) {
|
|
199
|
+
const E = a << 6 & 192 | p;
|
|
200
|
+
r.push(E);
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
203
|
}
|
|
@@ -311,7 +311,7 @@ const ht = () => ut().__FIREBASE_DEFAULTS__, dt = () => {
|
|
|
311
311
|
throw new Error(`Invalid host ${e} with no separate hostname and port!`);
|
|
312
312
|
const r = parseInt(e.substring(n + 1), 10);
|
|
313
313
|
return e[0] === "[" ? [e.substring(1, n - 1), r] : [e.substring(0, n), r];
|
|
314
|
-
},
|
|
314
|
+
}, Pe = () => {
|
|
315
315
|
var t;
|
|
316
316
|
return (t = K()) === null || t === void 0 ? void 0 : t.config;
|
|
317
317
|
}, rs = (t) => {
|
|
@@ -370,7 +370,7 @@ class mt {
|
|
|
370
370
|
* See the License for the specific language governing permissions and
|
|
371
371
|
* limitations under the License.
|
|
372
372
|
*/
|
|
373
|
-
function
|
|
373
|
+
function bt(t, e) {
|
|
374
374
|
if (t.uid)
|
|
375
375
|
throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');
|
|
376
376
|
const n = {
|
|
@@ -392,11 +392,11 @@ function _t(t, e) {
|
|
|
392
392
|
sign_in_provider: "custom",
|
|
393
393
|
identities: {}
|
|
394
394
|
}
|
|
395
|
-
}, t),
|
|
395
|
+
}, t), c = "";
|
|
396
396
|
return [
|
|
397
397
|
q(JSON.stringify(n)),
|
|
398
398
|
q(JSON.stringify(i)),
|
|
399
|
-
|
|
399
|
+
c
|
|
400
400
|
].join(".");
|
|
401
401
|
}
|
|
402
402
|
/**
|
|
@@ -415,15 +415,15 @@ function _t(t, e) {
|
|
|
415
415
|
* See the License for the specific language governing permissions and
|
|
416
416
|
* limitations under the License.
|
|
417
417
|
*/
|
|
418
|
-
function
|
|
418
|
+
function Ue() {
|
|
419
419
|
return typeof navigator < "u" && typeof navigator.userAgent == "string" ? navigator.userAgent : "";
|
|
420
420
|
}
|
|
421
421
|
function ss() {
|
|
422
422
|
return typeof window < "u" && // @ts-ignore Setting up an broadly applicable index signature for Window
|
|
423
423
|
// just to deal with this case would probably be a bad idea.
|
|
424
|
-
!!(window.cordova || window.phonegap || window.PhoneGap) && /ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(
|
|
424
|
+
!!(window.cordova || window.phonegap || window.PhoneGap) && /ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(Ue());
|
|
425
425
|
}
|
|
426
|
-
function
|
|
426
|
+
function _t() {
|
|
427
427
|
var t;
|
|
428
428
|
const e = (t = K()) === null || t === void 0 ? void 0 : t.forceEnvironment;
|
|
429
429
|
if (e === "node")
|
|
@@ -444,7 +444,7 @@ function is() {
|
|
|
444
444
|
return typeof navigator == "object" && navigator.product === "ReactNative";
|
|
445
445
|
}
|
|
446
446
|
function as() {
|
|
447
|
-
const t =
|
|
447
|
+
const t = Ue();
|
|
448
448
|
return t.indexOf("MSIE ") >= 0 || t.indexOf("Trident/") >= 0;
|
|
449
449
|
}
|
|
450
450
|
function yt() {
|
|
@@ -454,7 +454,7 @@ function yt() {
|
|
|
454
454
|
return !1;
|
|
455
455
|
}
|
|
456
456
|
}
|
|
457
|
-
function
|
|
457
|
+
function wt() {
|
|
458
458
|
return new Promise((t, e) => {
|
|
459
459
|
try {
|
|
460
460
|
let n = !0;
|
|
@@ -488,10 +488,10 @@ function Et() {
|
|
|
488
488
|
* See the License for the specific language governing permissions and
|
|
489
489
|
* limitations under the License.
|
|
490
490
|
*/
|
|
491
|
-
const
|
|
491
|
+
const Et = "FirebaseError";
|
|
492
492
|
class x extends Error {
|
|
493
493
|
constructor(e, n, r) {
|
|
494
|
-
super(n), this.code = e, this.customData = r, this.name =
|
|
494
|
+
super(n), this.code = e, this.customData = r, this.name = Et, Object.setPrototypeOf(this, x.prototype), Error.captureStackTrace && Error.captureStackTrace(this, Le.prototype.create);
|
|
495
495
|
}
|
|
496
496
|
}
|
|
497
497
|
class Le {
|
|
@@ -499,17 +499,17 @@ class Le {
|
|
|
499
499
|
this.service = e, this.serviceName = n, this.errors = r;
|
|
500
500
|
}
|
|
501
501
|
create(e, ...n) {
|
|
502
|
-
const r = n[0] || {}, s = `${this.service}/${e}`, o = this.errors[e], i = o ? It(o, r) : "Error",
|
|
503
|
-
return new x(s,
|
|
502
|
+
const r = n[0] || {}, s = `${this.service}/${e}`, o = this.errors[e], i = o ? It(o, r) : "Error", c = `${this.serviceName}: ${i} (${s}).`;
|
|
503
|
+
return new x(s, c, r);
|
|
504
504
|
}
|
|
505
505
|
}
|
|
506
506
|
function It(t, e) {
|
|
507
|
-
return t.replace(
|
|
507
|
+
return t.replace(vt, (n, r) => {
|
|
508
508
|
const s = e[r];
|
|
509
509
|
return s != null ? String(s) : `<${r}?>`;
|
|
510
510
|
});
|
|
511
511
|
}
|
|
512
|
-
const
|
|
512
|
+
const vt = /\{\$([^}]+)}/g;
|
|
513
513
|
function cs(t) {
|
|
514
514
|
for (const e in t)
|
|
515
515
|
if (Object.prototype.hasOwnProperty.call(t, e))
|
|
@@ -524,7 +524,7 @@ function ie(t, e) {
|
|
|
524
524
|
if (!r.includes(s))
|
|
525
525
|
return !1;
|
|
526
526
|
const o = t[s], i = e[s];
|
|
527
|
-
if (
|
|
527
|
+
if (we(o) && we(i)) {
|
|
528
528
|
if (!ie(o, i))
|
|
529
529
|
return !1;
|
|
530
530
|
} else if (o !== i)
|
|
@@ -535,7 +535,7 @@ function ie(t, e) {
|
|
|
535
535
|
return !1;
|
|
536
536
|
return !0;
|
|
537
537
|
}
|
|
538
|
-
function
|
|
538
|
+
function we(t) {
|
|
539
539
|
return t !== null && typeof t == "object";
|
|
540
540
|
}
|
|
541
541
|
/**
|
|
@@ -604,7 +604,7 @@ class Tt {
|
|
|
604
604
|
let s;
|
|
605
605
|
if (e === void 0 && n === void 0 && r === void 0)
|
|
606
606
|
throw new Error("Missing Observer.");
|
|
607
|
-
|
|
607
|
+
Rt(e, [
|
|
608
608
|
"next",
|
|
609
609
|
"error",
|
|
610
610
|
"complete"
|
|
@@ -650,7 +650,7 @@ class Tt {
|
|
|
650
650
|
}));
|
|
651
651
|
}
|
|
652
652
|
}
|
|
653
|
-
function
|
|
653
|
+
function Rt(t, e) {
|
|
654
654
|
if (typeof t != "object" || t === null)
|
|
655
655
|
return !1;
|
|
656
656
|
for (const n of e)
|
|
@@ -676,7 +676,7 @@ function Z() {
|
|
|
676
676
|
* See the License for the specific language governing permissions and
|
|
677
677
|
* limitations under the License.
|
|
678
678
|
*/
|
|
679
|
-
function
|
|
679
|
+
function P(t) {
|
|
680
680
|
return t && t._delegate ? t._delegate : t;
|
|
681
681
|
}
|
|
682
682
|
class $ {
|
|
@@ -718,7 +718,7 @@ class $ {
|
|
|
718
718
|
* See the License for the specific language governing permissions and
|
|
719
719
|
* limitations under the License.
|
|
720
720
|
*/
|
|
721
|
-
const
|
|
721
|
+
const O = "[DEFAULT]";
|
|
722
722
|
/**
|
|
723
723
|
* @license
|
|
724
724
|
* Copyright 2019 Google LLC
|
|
@@ -735,7 +735,7 @@ const C = "[DEFAULT]";
|
|
|
735
735
|
* See the License for the specific language governing permissions and
|
|
736
736
|
* limitations under the License.
|
|
737
737
|
*/
|
|
738
|
-
class
|
|
738
|
+
class At {
|
|
739
739
|
constructor(e, n) {
|
|
740
740
|
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();
|
|
741
741
|
}
|
|
@@ -786,9 +786,9 @@ class vt {
|
|
|
786
786
|
if (this.component)
|
|
787
787
|
throw Error(`Component for ${this.name} has already been provided`);
|
|
788
788
|
if (this.component = e, !!this.shouldAutoInitialize()) {
|
|
789
|
-
if (
|
|
789
|
+
if (Ot(e))
|
|
790
790
|
try {
|
|
791
|
-
this.getOrInitializeService({ instanceIdentifier:
|
|
791
|
+
this.getOrInitializeService({ instanceIdentifier: O });
|
|
792
792
|
} catch {
|
|
793
793
|
}
|
|
794
794
|
for (const [n, r] of this.instancesDeferred.entries()) {
|
|
@@ -803,7 +803,7 @@ class vt {
|
|
|
803
803
|
}
|
|
804
804
|
}
|
|
805
805
|
}
|
|
806
|
-
clearInstance(e =
|
|
806
|
+
clearInstance(e = O) {
|
|
807
807
|
this.instancesDeferred.delete(e), this.instancesOptions.delete(e), this.instances.delete(e);
|
|
808
808
|
}
|
|
809
809
|
// app.delete() will call this method on every provider to delete the services
|
|
@@ -818,10 +818,10 @@ class vt {
|
|
|
818
818
|
isComponentSet() {
|
|
819
819
|
return this.component != null;
|
|
820
820
|
}
|
|
821
|
-
isInitialized(e =
|
|
821
|
+
isInitialized(e = O) {
|
|
822
822
|
return this.instances.has(e);
|
|
823
823
|
}
|
|
824
|
-
getOptions(e =
|
|
824
|
+
getOptions(e = O) {
|
|
825
825
|
return this.instancesOptions.get(e) || {};
|
|
826
826
|
}
|
|
827
827
|
initialize(e = {}) {
|
|
@@ -835,8 +835,8 @@ class vt {
|
|
|
835
835
|
options: n
|
|
836
836
|
});
|
|
837
837
|
for (const [o, i] of this.instancesDeferred.entries()) {
|
|
838
|
-
const
|
|
839
|
-
r ===
|
|
838
|
+
const c = this.normalizeInstanceIdentifier(o);
|
|
839
|
+
r === c && i.resolve(s);
|
|
840
840
|
}
|
|
841
841
|
return s;
|
|
842
842
|
}
|
|
@@ -882,17 +882,17 @@ class vt {
|
|
|
882
882
|
}
|
|
883
883
|
return r || null;
|
|
884
884
|
}
|
|
885
|
-
normalizeInstanceIdentifier(e =
|
|
886
|
-
return this.component ? this.component.multipleInstances ? e :
|
|
885
|
+
normalizeInstanceIdentifier(e = O) {
|
|
886
|
+
return this.component ? this.component.multipleInstances ? e : O : e;
|
|
887
887
|
}
|
|
888
888
|
shouldAutoInitialize() {
|
|
889
889
|
return !!this.component && this.component.instantiationMode !== "EXPLICIT";
|
|
890
890
|
}
|
|
891
891
|
}
|
|
892
892
|
function Dt(t) {
|
|
893
|
-
return t ===
|
|
893
|
+
return t === O ? void 0 : t;
|
|
894
894
|
}
|
|
895
|
-
function
|
|
895
|
+
function Ot(t) {
|
|
896
896
|
return t.instantiationMode === "EAGER";
|
|
897
897
|
}
|
|
898
898
|
/**
|
|
@@ -911,7 +911,7 @@ function Ct(t) {
|
|
|
911
911
|
* See the License for the specific language governing permissions and
|
|
912
912
|
* limitations under the License.
|
|
913
913
|
*/
|
|
914
|
-
class
|
|
914
|
+
class Ct {
|
|
915
915
|
constructor(e) {
|
|
916
916
|
this.name = e, this.providers = /* @__PURE__ */ new Map();
|
|
917
917
|
}
|
|
@@ -943,7 +943,7 @@ class Ot {
|
|
|
943
943
|
getProvider(e) {
|
|
944
944
|
if (this.providers.has(e))
|
|
945
945
|
return this.providers.get(e);
|
|
946
|
-
const n = new
|
|
946
|
+
const n = new At(e, this);
|
|
947
947
|
return this.providers.set(e, n), n;
|
|
948
948
|
}
|
|
949
949
|
getProviders() {
|
|
@@ -966,27 +966,27 @@ class Ot {
|
|
|
966
966
|
* See the License for the specific language governing permissions and
|
|
967
967
|
* limitations under the License.
|
|
968
968
|
*/
|
|
969
|
-
var
|
|
969
|
+
var h;
|
|
970
970
|
(function(t) {
|
|
971
971
|
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";
|
|
972
|
-
})(
|
|
972
|
+
})(h || (h = {}));
|
|
973
973
|
const St = {
|
|
974
|
-
debug:
|
|
975
|
-
verbose:
|
|
976
|
-
info:
|
|
977
|
-
warn:
|
|
978
|
-
error:
|
|
979
|
-
silent:
|
|
980
|
-
},
|
|
981
|
-
[
|
|
982
|
-
[
|
|
983
|
-
[
|
|
984
|
-
[
|
|
985
|
-
[
|
|
974
|
+
debug: h.DEBUG,
|
|
975
|
+
verbose: h.VERBOSE,
|
|
976
|
+
info: h.INFO,
|
|
977
|
+
warn: h.WARN,
|
|
978
|
+
error: h.ERROR,
|
|
979
|
+
silent: h.SILENT
|
|
980
|
+
}, kt = h.INFO, Nt = {
|
|
981
|
+
[h.DEBUG]: "log",
|
|
982
|
+
[h.VERBOSE]: "log",
|
|
983
|
+
[h.INFO]: "info",
|
|
984
|
+
[h.WARN]: "warn",
|
|
985
|
+
[h.ERROR]: "error"
|
|
986
986
|
}, Bt = (t, e, ...n) => {
|
|
987
987
|
if (e < t.logLevel)
|
|
988
988
|
return;
|
|
989
|
-
const r = (/* @__PURE__ */ new Date()).toISOString(), s =
|
|
989
|
+
const r = (/* @__PURE__ */ new Date()).toISOString(), s = Nt[e];
|
|
990
990
|
if (s)
|
|
991
991
|
console[s](`[${r}] ${t.name}:`, ...n);
|
|
992
992
|
else
|
|
@@ -1000,13 +1000,13 @@ class xt {
|
|
|
1000
1000
|
* @param name The name that the logs will be associated with
|
|
1001
1001
|
*/
|
|
1002
1002
|
constructor(e) {
|
|
1003
|
-
this.name = e, this._logLevel =
|
|
1003
|
+
this.name = e, this._logLevel = kt, this._logHandler = Bt, this._userLogHandler = null;
|
|
1004
1004
|
}
|
|
1005
1005
|
get logLevel() {
|
|
1006
1006
|
return this._logLevel;
|
|
1007
1007
|
}
|
|
1008
1008
|
set logLevel(e) {
|
|
1009
|
-
if (!(e in
|
|
1009
|
+
if (!(e in h))
|
|
1010
1010
|
throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);
|
|
1011
1011
|
this._logLevel = e;
|
|
1012
1012
|
}
|
|
@@ -1032,25 +1032,25 @@ class xt {
|
|
|
1032
1032
|
* The functions below are all based on the `console` interface
|
|
1033
1033
|
*/
|
|
1034
1034
|
debug(...e) {
|
|
1035
|
-
this._userLogHandler && this._userLogHandler(this,
|
|
1035
|
+
this._userLogHandler && this._userLogHandler(this, h.DEBUG, ...e), this._logHandler(this, h.DEBUG, ...e);
|
|
1036
1036
|
}
|
|
1037
1037
|
log(...e) {
|
|
1038
|
-
this._userLogHandler && this._userLogHandler(this,
|
|
1038
|
+
this._userLogHandler && this._userLogHandler(this, h.VERBOSE, ...e), this._logHandler(this, h.VERBOSE, ...e);
|
|
1039
1039
|
}
|
|
1040
1040
|
info(...e) {
|
|
1041
|
-
this._userLogHandler && this._userLogHandler(this,
|
|
1041
|
+
this._userLogHandler && this._userLogHandler(this, h.INFO, ...e), this._logHandler(this, h.INFO, ...e);
|
|
1042
1042
|
}
|
|
1043
1043
|
warn(...e) {
|
|
1044
|
-
this._userLogHandler && this._userLogHandler(this,
|
|
1044
|
+
this._userLogHandler && this._userLogHandler(this, h.WARN, ...e), this._logHandler(this, h.WARN, ...e);
|
|
1045
1045
|
}
|
|
1046
1046
|
error(...e) {
|
|
1047
|
-
this._userLogHandler && this._userLogHandler(this,
|
|
1047
|
+
this._userLogHandler && this._userLogHandler(this, h.ERROR, ...e), this._logHandler(this, h.ERROR, ...e);
|
|
1048
1048
|
}
|
|
1049
1049
|
}
|
|
1050
|
-
const
|
|
1051
|
-
let
|
|
1052
|
-
function
|
|
1053
|
-
return
|
|
1050
|
+
const Pt = (t, e) => e.some((n) => t instanceof n);
|
|
1051
|
+
let Ee, Ie;
|
|
1052
|
+
function Ut() {
|
|
1053
|
+
return Ee || (Ee = [
|
|
1054
1054
|
IDBDatabase,
|
|
1055
1055
|
IDBObjectStore,
|
|
1056
1056
|
IDBIndex,
|
|
@@ -1071,7 +1071,7 @@ function Mt(t) {
|
|
|
1071
1071
|
const s = () => {
|
|
1072
1072
|
t.removeEventListener("success", o), t.removeEventListener("error", i);
|
|
1073
1073
|
}, o = () => {
|
|
1074
|
-
n(
|
|
1074
|
+
n(R(t.result)), s();
|
|
1075
1075
|
}, i = () => {
|
|
1076
1076
|
r(t.error), s();
|
|
1077
1077
|
};
|
|
@@ -1107,7 +1107,7 @@ let ce = {
|
|
|
1107
1107
|
if (e === "store")
|
|
1108
1108
|
return n.objectStoreNames[1] ? void 0 : n.objectStore(n.objectStoreNames[0]);
|
|
1109
1109
|
}
|
|
1110
|
-
return
|
|
1110
|
+
return R(t[e]);
|
|
1111
1111
|
},
|
|
1112
1112
|
set(t, e, n) {
|
|
1113
1113
|
return t[e] = n, !0;
|
|
@@ -1116,23 +1116,23 @@ let ce = {
|
|
|
1116
1116
|
return t instanceof IDBTransaction && (e === "done" || e === "store") ? !0 : e in t;
|
|
1117
1117
|
}
|
|
1118
1118
|
};
|
|
1119
|
-
function
|
|
1119
|
+
function Ht(t) {
|
|
1120
1120
|
ce = t(ce);
|
|
1121
1121
|
}
|
|
1122
|
-
function
|
|
1122
|
+
function Ft(t) {
|
|
1123
1123
|
return t === IDBDatabase.prototype.transaction && !("objectStoreNames" in IDBTransaction.prototype) ? function(e, ...n) {
|
|
1124
1124
|
const r = t.call(ee(this), e, ...n);
|
|
1125
|
-
return $e.set(r, e.sort ? e.sort() : [e]),
|
|
1125
|
+
return $e.set(r, e.sort ? e.sort() : [e]), R(r);
|
|
1126
1126
|
} : Lt().includes(t) ? function(...e) {
|
|
1127
|
-
return t.apply(ee(this), e),
|
|
1127
|
+
return t.apply(ee(this), e), R(Me.get(this));
|
|
1128
1128
|
} : function(...e) {
|
|
1129
|
-
return
|
|
1129
|
+
return R(t.apply(ee(this), e));
|
|
1130
1130
|
};
|
|
1131
1131
|
}
|
|
1132
1132
|
function jt(t) {
|
|
1133
|
-
return typeof t == "function" ?
|
|
1133
|
+
return typeof t == "function" ? Ft(t) : (t instanceof IDBTransaction && $t(t), Pt(t, Ut()) ? new Proxy(t, ce) : t);
|
|
1134
1134
|
}
|
|
1135
|
-
function
|
|
1135
|
+
function R(t) {
|
|
1136
1136
|
if (t instanceof IDBRequest)
|
|
1137
1137
|
return Mt(t);
|
|
1138
1138
|
if (Q.has(t))
|
|
@@ -1142,21 +1142,21 @@ function A(t) {
|
|
|
1142
1142
|
}
|
|
1143
1143
|
const ee = (t) => fe.get(t);
|
|
1144
1144
|
function Vt(t, e, { blocked: n, upgrade: r, blocking: s, terminated: o } = {}) {
|
|
1145
|
-
const i = indexedDB.open(t, e),
|
|
1146
|
-
return r && i.addEventListener("upgradeneeded", (
|
|
1147
|
-
r(
|
|
1148
|
-
}), n && i.addEventListener("blocked", (
|
|
1145
|
+
const i = indexedDB.open(t, e), c = R(i);
|
|
1146
|
+
return r && i.addEventListener("upgradeneeded", (l) => {
|
|
1147
|
+
r(R(i.result), l.oldVersion, l.newVersion, R(i.transaction), l);
|
|
1148
|
+
}), n && i.addEventListener("blocked", (l) => n(
|
|
1149
1149
|
// Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
)),
|
|
1154
|
-
o &&
|
|
1150
|
+
l.oldVersion,
|
|
1151
|
+
l.newVersion,
|
|
1152
|
+
l
|
|
1153
|
+
)), c.then((l) => {
|
|
1154
|
+
o && l.addEventListener("close", () => o()), s && l.addEventListener("versionchange", (a) => s(a.oldVersion, a.newVersion, a));
|
|
1155
1155
|
}).catch(() => {
|
|
1156
|
-
}),
|
|
1156
|
+
}), c;
|
|
1157
1157
|
}
|
|
1158
1158
|
const zt = ["get", "getKey", "getAll", "getAllKeys", "count"], Wt = ["put", "add", "delete", "clear"], te = /* @__PURE__ */ new Map();
|
|
1159
|
-
function
|
|
1159
|
+
function ve(t, e) {
|
|
1160
1160
|
if (!(t instanceof IDBDatabase && !(e in t) && typeof e == "string"))
|
|
1161
1161
|
return;
|
|
1162
1162
|
if (te.get(e))
|
|
@@ -1167,20 +1167,20 @@ function Re(t, e) {
|
|
|
1167
1167
|
!(n in (r ? IDBIndex : IDBObjectStore).prototype) || !(s || zt.includes(n))
|
|
1168
1168
|
)
|
|
1169
1169
|
return;
|
|
1170
|
-
const o = async function(i, ...
|
|
1171
|
-
const
|
|
1172
|
-
let
|
|
1173
|
-
return r && (
|
|
1174
|
-
|
|
1175
|
-
s &&
|
|
1170
|
+
const o = async function(i, ...c) {
|
|
1171
|
+
const l = this.transaction(i, s ? "readwrite" : "readonly");
|
|
1172
|
+
let a = l.store;
|
|
1173
|
+
return r && (a = a.index(c.shift())), (await Promise.all([
|
|
1174
|
+
a[n](...c),
|
|
1175
|
+
s && l.done
|
|
1176
1176
|
]))[0];
|
|
1177
1177
|
};
|
|
1178
1178
|
return te.set(e, o), o;
|
|
1179
1179
|
}
|
|
1180
|
-
|
|
1180
|
+
Ht((t) => ({
|
|
1181
1181
|
...t,
|
|
1182
|
-
get: (e, n, r) =>
|
|
1183
|
-
has: (e, n) => !!
|
|
1182
|
+
get: (e, n, r) => ve(e, n) || t.get(e, n, r),
|
|
1183
|
+
has: (e, n) => !!ve(e, n) || t.has(e, n)
|
|
1184
1184
|
}));
|
|
1185
1185
|
/**
|
|
1186
1186
|
* @license
|
|
@@ -1235,7 +1235,7 @@ const le = "@firebase/app", Te = "0.9.13";
|
|
|
1235
1235
|
* See the License for the specific language governing permissions and
|
|
1236
1236
|
* limitations under the License.
|
|
1237
1237
|
*/
|
|
1238
|
-
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",
|
|
1238
|
+
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";
|
|
1239
1239
|
/**
|
|
1240
1240
|
* @license
|
|
1241
1241
|
* Copyright 2019 Google LLC
|
|
@@ -1252,7 +1252,7 @@ const S = new xt("@firebase/app"), Kt = "@firebase/app-compat", Xt = "@firebase/
|
|
|
1252
1252
|
* See the License for the specific language governing permissions and
|
|
1253
1253
|
* limitations under the License.
|
|
1254
1254
|
*/
|
|
1255
|
-
const ue = "[DEFAULT]",
|
|
1255
|
+
const ue = "[DEFAULT]", wn = {
|
|
1256
1256
|
[le]: "fire-core",
|
|
1257
1257
|
[Kt]: "fire-core-compat",
|
|
1258
1258
|
[Jt]: "fire-analytics",
|
|
@@ -1276,9 +1276,9 @@ const ue = "[DEFAULT]", En = {
|
|
|
1276
1276
|
[pn]: "fire-gcs",
|
|
1277
1277
|
[gn]: "fire-gcs-compat",
|
|
1278
1278
|
[mn]: "fire-fst",
|
|
1279
|
-
[
|
|
1279
|
+
[bn]: "fire-fst-compat",
|
|
1280
1280
|
"fire-js": "fire-js",
|
|
1281
|
-
[
|
|
1281
|
+
[_n]: "fire-js-all"
|
|
1282
1282
|
};
|
|
1283
1283
|
/**
|
|
1284
1284
|
* @license
|
|
@@ -1296,8 +1296,8 @@ const ue = "[DEFAULT]", En = {
|
|
|
1296
1296
|
* See the License for the specific language governing permissions and
|
|
1297
1297
|
* limitations under the License.
|
|
1298
1298
|
*/
|
|
1299
|
-
const
|
|
1300
|
-
function
|
|
1299
|
+
const H = /* @__PURE__ */ new Map(), he = /* @__PURE__ */ new Map();
|
|
1300
|
+
function En(t, e) {
|
|
1301
1301
|
try {
|
|
1302
1302
|
t.container.addComponent(e);
|
|
1303
1303
|
} catch (n) {
|
|
@@ -1309,8 +1309,8 @@ function G(t) {
|
|
|
1309
1309
|
if (he.has(e))
|
|
1310
1310
|
return S.debug(`There were multiple attempts to register component ${e}.`), !1;
|
|
1311
1311
|
he.set(e, t);
|
|
1312
|
-
for (const n of
|
|
1313
|
-
|
|
1312
|
+
for (const n of H.values())
|
|
1313
|
+
En(n, t);
|
|
1314
1314
|
return !0;
|
|
1315
1315
|
}
|
|
1316
1316
|
function In(t, e) {
|
|
@@ -1333,7 +1333,7 @@ function In(t, e) {
|
|
|
1333
1333
|
* See the License for the specific language governing permissions and
|
|
1334
1334
|
* limitations under the License.
|
|
1335
1335
|
*/
|
|
1336
|
-
const
|
|
1336
|
+
const vn = {
|
|
1337
1337
|
"no-app": "No Firebase App '{$appName}' has been created - call initializeApp() first",
|
|
1338
1338
|
"bad-app-name": "Illegal App name: '{$appName}",
|
|
1339
1339
|
"duplicate-app": "Firebase App named '{$appName}' already exists with different options or config",
|
|
@@ -1345,7 +1345,7 @@ const Rn = {
|
|
|
1345
1345
|
"idb-get": "Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.",
|
|
1346
1346
|
"idb-set": "Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.",
|
|
1347
1347
|
"idb-delete": "Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}."
|
|
1348
|
-
},
|
|
1348
|
+
}, A = new Le("app", "Firebase", vn);
|
|
1349
1349
|
/**
|
|
1350
1350
|
* @license
|
|
1351
1351
|
* Copyright 2019 Google LLC
|
|
@@ -1401,7 +1401,7 @@ class Tn {
|
|
|
1401
1401
|
*/
|
|
1402
1402
|
checkDestroyed() {
|
|
1403
1403
|
if (this.isDeleted)
|
|
1404
|
-
throw
|
|
1404
|
+
throw A.create("app-deleted", { appName: this._name });
|
|
1405
1405
|
}
|
|
1406
1406
|
}
|
|
1407
1407
|
/**
|
|
@@ -1420,53 +1420,53 @@ class Tn {
|
|
|
1420
1420
|
* See the License for the specific language governing permissions and
|
|
1421
1421
|
* limitations under the License.
|
|
1422
1422
|
*/
|
|
1423
|
-
const
|
|
1424
|
-
function
|
|
1423
|
+
const Rn = yn;
|
|
1424
|
+
function An(t, e = {}) {
|
|
1425
1425
|
let n = t;
|
|
1426
1426
|
typeof e != "object" && (e = { name: e });
|
|
1427
1427
|
const r = Object.assign({ name: ue, automaticDataCollectionEnabled: !1 }, e), s = r.name;
|
|
1428
1428
|
if (typeof s != "string" || !s)
|
|
1429
|
-
throw
|
|
1429
|
+
throw A.create("bad-app-name", {
|
|
1430
1430
|
appName: String(s)
|
|
1431
1431
|
});
|
|
1432
|
-
if (n || (n =
|
|
1433
|
-
throw
|
|
1432
|
+
if (n || (n = Pe()), !n)
|
|
1433
|
+
throw A.create(
|
|
1434
1434
|
"no-options"
|
|
1435
1435
|
/* AppError.NO_OPTIONS */
|
|
1436
1436
|
);
|
|
1437
|
-
const o =
|
|
1437
|
+
const o = H.get(s);
|
|
1438
1438
|
if (o) {
|
|
1439
1439
|
if (ie(n, o.options) && ie(r, o.config))
|
|
1440
1440
|
return o;
|
|
1441
|
-
throw
|
|
1441
|
+
throw A.create("duplicate-app", { appName: s });
|
|
1442
1442
|
}
|
|
1443
|
-
const i = new
|
|
1444
|
-
for (const
|
|
1445
|
-
i.addComponent(
|
|
1446
|
-
const
|
|
1447
|
-
return
|
|
1443
|
+
const i = new Ct(s);
|
|
1444
|
+
for (const l of he.values())
|
|
1445
|
+
i.addComponent(l);
|
|
1446
|
+
const c = new Tn(n, r, i);
|
|
1447
|
+
return H.set(s, c), c;
|
|
1448
1448
|
}
|
|
1449
1449
|
function Dn(t = ue) {
|
|
1450
|
-
const e =
|
|
1451
|
-
if (!e && t === ue &&
|
|
1452
|
-
return
|
|
1450
|
+
const e = H.get(t);
|
|
1451
|
+
if (!e && t === ue && Pe())
|
|
1452
|
+
return An();
|
|
1453
1453
|
if (!e)
|
|
1454
|
-
throw
|
|
1454
|
+
throw A.create("no-app", { appName: t });
|
|
1455
1455
|
return e;
|
|
1456
1456
|
}
|
|
1457
1457
|
function hs() {
|
|
1458
|
-
return Array.from(
|
|
1458
|
+
return Array.from(H.values());
|
|
1459
1459
|
}
|
|
1460
1460
|
function L(t, e, n) {
|
|
1461
1461
|
var r;
|
|
1462
|
-
let s = (r =
|
|
1462
|
+
let s = (r = wn[t]) !== null && r !== void 0 ? r : t;
|
|
1463
1463
|
n && (s += `-${n}`);
|
|
1464
1464
|
const o = s.match(/\s|\//), i = e.match(/\s|\//);
|
|
1465
1465
|
if (o || i) {
|
|
1466
|
-
const
|
|
1466
|
+
const c = [
|
|
1467
1467
|
`Unable to register library "${s}" with version "${e}":`
|
|
1468
1468
|
];
|
|
1469
|
-
o &&
|
|
1469
|
+
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(" "));
|
|
1470
1470
|
return;
|
|
1471
1471
|
}
|
|
1472
1472
|
G(new $(
|
|
@@ -1492,52 +1492,52 @@ function L(t, e, n) {
|
|
|
1492
1492
|
* See the License for the specific language governing permissions and
|
|
1493
1493
|
* limitations under the License.
|
|
1494
1494
|
*/
|
|
1495
|
-
const
|
|
1495
|
+
const On = "firebase-heartbeat-database", Cn = 1, F = "firebase-heartbeat-store";
|
|
1496
1496
|
let ne = null;
|
|
1497
|
-
function
|
|
1498
|
-
return ne || (ne = Vt(
|
|
1497
|
+
function He() {
|
|
1498
|
+
return ne || (ne = Vt(On, Cn, {
|
|
1499
1499
|
upgrade: (t, e) => {
|
|
1500
1500
|
switch (e) {
|
|
1501
1501
|
case 0:
|
|
1502
|
-
t.createObjectStore(
|
|
1502
|
+
t.createObjectStore(F);
|
|
1503
1503
|
}
|
|
1504
1504
|
}
|
|
1505
1505
|
}).catch((t) => {
|
|
1506
|
-
throw
|
|
1506
|
+
throw A.create("idb-open", {
|
|
1507
1507
|
originalErrorMessage: t.message
|
|
1508
1508
|
});
|
|
1509
1509
|
})), ne;
|
|
1510
1510
|
}
|
|
1511
1511
|
async function Sn(t) {
|
|
1512
1512
|
try {
|
|
1513
|
-
return await (await
|
|
1513
|
+
return await (await He()).transaction(F).objectStore(F).get(Fe(t));
|
|
1514
1514
|
} catch (e) {
|
|
1515
1515
|
if (e instanceof x)
|
|
1516
1516
|
S.warn(e.message);
|
|
1517
1517
|
else {
|
|
1518
|
-
const n =
|
|
1518
|
+
const n = A.create("idb-get", {
|
|
1519
1519
|
originalErrorMessage: e == null ? void 0 : e.message
|
|
1520
1520
|
});
|
|
1521
1521
|
S.warn(n.message);
|
|
1522
1522
|
}
|
|
1523
1523
|
}
|
|
1524
1524
|
}
|
|
1525
|
-
async function
|
|
1525
|
+
async function Re(t, e) {
|
|
1526
1526
|
try {
|
|
1527
|
-
const r = (await
|
|
1528
|
-
await r.objectStore(
|
|
1527
|
+
const r = (await He()).transaction(F, "readwrite");
|
|
1528
|
+
await r.objectStore(F).put(e, Fe(t)), await r.done;
|
|
1529
1529
|
} catch (n) {
|
|
1530
1530
|
if (n instanceof x)
|
|
1531
1531
|
S.warn(n.message);
|
|
1532
1532
|
else {
|
|
1533
|
-
const r =
|
|
1533
|
+
const r = A.create("idb-set", {
|
|
1534
1534
|
originalErrorMessage: n == null ? void 0 : n.message
|
|
1535
1535
|
});
|
|
1536
1536
|
S.warn(r.message);
|
|
1537
1537
|
}
|
|
1538
1538
|
}
|
|
1539
1539
|
}
|
|
1540
|
-
function
|
|
1540
|
+
function Fe(t) {
|
|
1541
1541
|
return `${t.name}!${t.options.appId}`;
|
|
1542
1542
|
}
|
|
1543
1543
|
/**
|
|
@@ -1556,12 +1556,12 @@ function He(t) {
|
|
|
1556
1556
|
* See the License for the specific language governing permissions and
|
|
1557
1557
|
* limitations under the License.
|
|
1558
1558
|
*/
|
|
1559
|
-
const
|
|
1559
|
+
const kn = 1024, Nn = 30 * 24 * 60 * 60 * 1e3;
|
|
1560
1560
|
class Bn {
|
|
1561
1561
|
constructor(e) {
|
|
1562
1562
|
this.container = e, this._heartbeatsCache = null;
|
|
1563
1563
|
const n = this.container.getProvider("app").getImmediate();
|
|
1564
|
-
this._storage = new
|
|
1564
|
+
this._storage = new Pn(n), this._heartbeatsCachePromise = this._storage.read().then((r) => (this._heartbeatsCache = r, r));
|
|
1565
1565
|
}
|
|
1566
1566
|
/**
|
|
1567
1567
|
* Called to report a heartbeat. The function will generate
|
|
@@ -1571,11 +1571,11 @@ class Bn {
|
|
|
1571
1571
|
* already logged, subsequent calls to this function in the same day will be ignored.
|
|
1572
1572
|
*/
|
|
1573
1573
|
async triggerHeartbeat() {
|
|
1574
|
-
const n = this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(), r =
|
|
1574
|
+
const n = this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(), r = Ae();
|
|
1575
1575
|
if (this._heartbeatsCache === null && (this._heartbeatsCache = await this._heartbeatsCachePromise), !(this._heartbeatsCache.lastSentHeartbeatDate === r || this._heartbeatsCache.heartbeats.some((s) => s.date === r)))
|
|
1576
1576
|
return this._heartbeatsCache.heartbeats.push({ date: r, agent: n }), this._heartbeatsCache.heartbeats = this._heartbeatsCache.heartbeats.filter((s) => {
|
|
1577
1577
|
const o = new Date(s.date).valueOf();
|
|
1578
|
-
return Date.now() - o <=
|
|
1578
|
+
return Date.now() - o <= Nn;
|
|
1579
1579
|
}), this._storage.overwrite(this._heartbeatsCache);
|
|
1580
1580
|
}
|
|
1581
1581
|
/**
|
|
@@ -1588,14 +1588,14 @@ class Bn {
|
|
|
1588
1588
|
async getHeartbeatsHeader() {
|
|
1589
1589
|
if (this._heartbeatsCache === null && await this._heartbeatsCachePromise, this._heartbeatsCache === null || this._heartbeatsCache.heartbeats.length === 0)
|
|
1590
1590
|
return "";
|
|
1591
|
-
const e =
|
|
1591
|
+
const e = Ae(), { heartbeatsToSend: n, unsentEntries: r } = xn(this._heartbeatsCache.heartbeats), s = q(JSON.stringify({ version: 2, heartbeats: n }));
|
|
1592
1592
|
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;
|
|
1593
1593
|
}
|
|
1594
1594
|
}
|
|
1595
|
-
function
|
|
1595
|
+
function Ae() {
|
|
1596
1596
|
return (/* @__PURE__ */ new Date()).toISOString().substring(0, 10);
|
|
1597
1597
|
}
|
|
1598
|
-
function xn(t, e =
|
|
1598
|
+
function xn(t, e = kn) {
|
|
1599
1599
|
const n = [];
|
|
1600
1600
|
let r = t.slice();
|
|
1601
1601
|
for (const s of t) {
|
|
@@ -1619,12 +1619,12 @@ function xn(t, e = Nn) {
|
|
|
1619
1619
|
unsentEntries: r
|
|
1620
1620
|
};
|
|
1621
1621
|
}
|
|
1622
|
-
class
|
|
1622
|
+
class Pn {
|
|
1623
1623
|
constructor(e) {
|
|
1624
1624
|
this.app = e, this._canUseIndexedDBPromise = this.runIndexedDBEnvironmentCheck();
|
|
1625
1625
|
}
|
|
1626
1626
|
async runIndexedDBEnvironmentCheck() {
|
|
1627
|
-
return yt() ?
|
|
1627
|
+
return yt() ? wt().then(() => !0).catch(() => !1) : !1;
|
|
1628
1628
|
}
|
|
1629
1629
|
/**
|
|
1630
1630
|
* Read all heartbeats.
|
|
@@ -1637,7 +1637,7 @@ class Un {
|
|
|
1637
1637
|
var n;
|
|
1638
1638
|
if (await this._canUseIndexedDBPromise) {
|
|
1639
1639
|
const s = await this.read();
|
|
1640
|
-
return
|
|
1640
|
+
return Re(this.app, {
|
|
1641
1641
|
lastSentHeartbeatDate: (n = e.lastSentHeartbeatDate) !== null && n !== void 0 ? n : s.lastSentHeartbeatDate,
|
|
1642
1642
|
heartbeats: e.heartbeats
|
|
1643
1643
|
});
|
|
@@ -1649,7 +1649,7 @@ class Un {
|
|
|
1649
1649
|
var n;
|
|
1650
1650
|
if (await this._canUseIndexedDBPromise) {
|
|
1651
1651
|
const s = await this.read();
|
|
1652
|
-
return
|
|
1652
|
+
return Re(this.app, {
|
|
1653
1653
|
lastSentHeartbeatDate: (n = e.lastSentHeartbeatDate) !== null && n !== void 0 ? n : s.lastSentHeartbeatDate,
|
|
1654
1654
|
heartbeats: [
|
|
1655
1655
|
...s.heartbeats,
|
|
@@ -1682,7 +1682,7 @@ function De(t) {
|
|
|
1682
1682
|
* See the License for the specific language governing permissions and
|
|
1683
1683
|
* limitations under the License.
|
|
1684
1684
|
*/
|
|
1685
|
-
function
|
|
1685
|
+
function Un(t) {
|
|
1686
1686
|
G(new $(
|
|
1687
1687
|
"platform-logger",
|
|
1688
1688
|
(e) => new qt(e),
|
|
@@ -1695,7 +1695,7 @@ function Pn(t) {
|
|
|
1695
1695
|
/* ComponentType.PRIVATE */
|
|
1696
1696
|
)), L(le, Te, t), L(le, Te, "esm2017"), L("fire-js", "");
|
|
1697
1697
|
}
|
|
1698
|
-
|
|
1698
|
+
Un("");
|
|
1699
1699
|
/**
|
|
1700
1700
|
* @license
|
|
1701
1701
|
* Copyright 2017 Google LLC
|
|
@@ -1729,7 +1729,7 @@ const je = "firebasestorage.googleapis.com", Ve = "storageBucket", Ln = 2 * 60 *
|
|
|
1729
1729
|
* See the License for the specific language governing permissions and
|
|
1730
1730
|
* limitations under the License.
|
|
1731
1731
|
*/
|
|
1732
|
-
class
|
|
1732
|
+
class f extends x {
|
|
1733
1733
|
/**
|
|
1734
1734
|
* @param code - A `StorageErrorCode` string to be prefixed with 'storage/' and
|
|
1735
1735
|
* added to the end of the message.
|
|
@@ -1737,7 +1737,7 @@ class d extends x {
|
|
|
1737
1737
|
* @param status_ - Corresponding HTTP Status Code
|
|
1738
1738
|
*/
|
|
1739
1739
|
constructor(e, n, r = 0) {
|
|
1740
|
-
super(re(e), `Firebase Storage: ${n} (${re(e)})`), this.status_ = r, this.customData = { serverResponse: null }, this._baseMessage = this.message, Object.setPrototypeOf(this,
|
|
1740
|
+
super(re(e), `Firebase Storage: ${n} (${re(e)})`), this.status_ = r, this.customData = { serverResponse: null }, this._baseMessage = this.message, Object.setPrototypeOf(this, f.prototype);
|
|
1741
1741
|
}
|
|
1742
1742
|
get status() {
|
|
1743
1743
|
return this.status_;
|
|
@@ -1762,71 +1762,71 @@ class d extends x {
|
|
|
1762
1762
|
${this.customData.serverResponse}` : this.message = this._baseMessage;
|
|
1763
1763
|
}
|
|
1764
1764
|
}
|
|
1765
|
-
var
|
|
1765
|
+
var d;
|
|
1766
1766
|
(function(t) {
|
|
1767
1767
|
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";
|
|
1768
|
-
})(
|
|
1768
|
+
})(d || (d = {}));
|
|
1769
1769
|
function re(t) {
|
|
1770
1770
|
return "storage/" + t;
|
|
1771
1771
|
}
|
|
1772
1772
|
function pe() {
|
|
1773
1773
|
const t = "An unknown error occurred, please check the error payload for server response.";
|
|
1774
|
-
return new d
|
|
1774
|
+
return new f(d.UNKNOWN, t);
|
|
1775
1775
|
}
|
|
1776
1776
|
function $n(t) {
|
|
1777
|
-
return new d
|
|
1777
|
+
return new f(d.OBJECT_NOT_FOUND, "Object '" + t + "' does not exist.");
|
|
1778
1778
|
}
|
|
1779
|
-
function
|
|
1780
|
-
return new d
|
|
1779
|
+
function Hn(t) {
|
|
1780
|
+
return new f(d.QUOTA_EXCEEDED, "Quota for bucket '" + t + "' exceeded, please view quota on https://firebase.google.com/pricing/.");
|
|
1781
1781
|
}
|
|
1782
|
-
function
|
|
1782
|
+
function Fn() {
|
|
1783
1783
|
const t = "User is not authenticated, please authenticate using Firebase Authentication and try again.";
|
|
1784
|
-
return new d
|
|
1784
|
+
return new f(d.UNAUTHENTICATED, t);
|
|
1785
1785
|
}
|
|
1786
1786
|
function jn() {
|
|
1787
|
-
return new d
|
|
1787
|
+
return new f(d.UNAUTHORIZED_APP, "This app does not have permission to access Firebase Storage on this project.");
|
|
1788
1788
|
}
|
|
1789
1789
|
function Vn(t) {
|
|
1790
|
-
return new d
|
|
1790
|
+
return new f(d.UNAUTHORIZED, "User does not have permission to access '" + t + "'.");
|
|
1791
1791
|
}
|
|
1792
1792
|
function zn() {
|
|
1793
|
-
return new d
|
|
1793
|
+
return new f(d.RETRY_LIMIT_EXCEEDED, "Max retry time for operation exceeded, please try again.");
|
|
1794
1794
|
}
|
|
1795
1795
|
function Wn() {
|
|
1796
|
-
return new d
|
|
1796
|
+
return new f(d.CANCELED, "User canceled the upload/download.");
|
|
1797
1797
|
}
|
|
1798
1798
|
function qn(t) {
|
|
1799
|
-
return new d
|
|
1799
|
+
return new f(d.INVALID_URL, "Invalid URL '" + t + "'.");
|
|
1800
1800
|
}
|
|
1801
1801
|
function Gn(t) {
|
|
1802
|
-
return new d
|
|
1802
|
+
return new f(d.INVALID_DEFAULT_BUCKET, "Invalid default bucket '" + t + "'.");
|
|
1803
1803
|
}
|
|
1804
1804
|
function Kn() {
|
|
1805
|
-
return new d
|
|
1805
|
+
return new f(d.NO_DEFAULT_BUCKET, "No default bucket found. Did you set the '" + Ve + "' property when initializing the app?");
|
|
1806
1806
|
}
|
|
1807
1807
|
function Xn() {
|
|
1808
|
-
return new d
|
|
1808
|
+
return new f(d.CANNOT_SLICE_BLOB, "Cannot slice blob for upload. Please retry the upload.");
|
|
1809
1809
|
}
|
|
1810
1810
|
function Jn() {
|
|
1811
|
-
return new d
|
|
1811
|
+
return new f(d.NO_DOWNLOAD_URL, "The given file does not have any download URLs.");
|
|
1812
1812
|
}
|
|
1813
1813
|
function Yn(t) {
|
|
1814
|
-
return new d
|
|
1814
|
+
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.`);
|
|
1815
1815
|
}
|
|
1816
1816
|
function de(t) {
|
|
1817
|
-
return new d
|
|
1817
|
+
return new f(d.INVALID_ARGUMENT, t);
|
|
1818
1818
|
}
|
|
1819
1819
|
function ze() {
|
|
1820
|
-
return new d
|
|
1820
|
+
return new f(d.APP_DELETED, "The Firebase app was deleted.");
|
|
1821
1821
|
}
|
|
1822
1822
|
function Zn(t) {
|
|
1823
|
-
return new d
|
|
1823
|
+
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').");
|
|
1824
1824
|
}
|
|
1825
1825
|
function M(t, e) {
|
|
1826
|
-
return new d
|
|
1826
|
+
return new f(d.INVALID_FORMAT, "String does not match format '" + t + "': " + e);
|
|
1827
1827
|
}
|
|
1828
|
-
function
|
|
1829
|
-
throw new d
|
|
1828
|
+
function U(t) {
|
|
1829
|
+
throw new f(d.INTERNAL_ERROR, "Internal error: " + t);
|
|
1830
1830
|
}
|
|
1831
1831
|
/**
|
|
1832
1832
|
* @license
|
|
@@ -1844,7 +1844,7 @@ function P(t) {
|
|
|
1844
1844
|
* See the License for the specific language governing permissions and
|
|
1845
1845
|
* limitations under the License.
|
|
1846
1846
|
*/
|
|
1847
|
-
class
|
|
1847
|
+
class w {
|
|
1848
1848
|
constructor(e, n) {
|
|
1849
1849
|
this.bucket = e, this.path_ = n;
|
|
1850
1850
|
}
|
|
@@ -1864,9 +1864,9 @@ class E {
|
|
|
1864
1864
|
static makeFromBucketSpec(e, n) {
|
|
1865
1865
|
let r;
|
|
1866
1866
|
try {
|
|
1867
|
-
r =
|
|
1867
|
+
r = w.makeFromUrl(e, n);
|
|
1868
1868
|
} catch {
|
|
1869
|
-
return new
|
|
1869
|
+
return new w(e, "");
|
|
1870
1870
|
}
|
|
1871
1871
|
if (r.path === "")
|
|
1872
1872
|
return r;
|
|
@@ -1878,21 +1878,21 @@ class E {
|
|
|
1878
1878
|
function o(y) {
|
|
1879
1879
|
y.path.charAt(y.path.length - 1) === "/" && (y.path_ = y.path_.slice(0, -1));
|
|
1880
1880
|
}
|
|
1881
|
-
const i = "(/(.*))?$",
|
|
1882
|
-
function
|
|
1881
|
+
const i = "(/(.*))?$", c = new RegExp("^gs://" + s + i, "i"), l = { bucket: 1, path: 3 };
|
|
1882
|
+
function a(y) {
|
|
1883
1883
|
y.path_ = decodeURIComponent(y.path);
|
|
1884
1884
|
}
|
|
1885
|
-
const
|
|
1886
|
-
{ regex:
|
|
1885
|
+
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 = [
|
|
1886
|
+
{ regex: c, indices: l, postModify: o },
|
|
1887
1887
|
{
|
|
1888
1888
|
regex: m,
|
|
1889
|
-
indices:
|
|
1890
|
-
postModify:
|
|
1889
|
+
indices: E,
|
|
1890
|
+
postModify: a
|
|
1891
1891
|
},
|
|
1892
1892
|
{
|
|
1893
1893
|
regex: B,
|
|
1894
1894
|
indices: { bucket: 1, path: 2 },
|
|
1895
|
-
postModify:
|
|
1895
|
+
postModify: a
|
|
1896
1896
|
}
|
|
1897
1897
|
];
|
|
1898
1898
|
for (let y = 0; y < I.length; y++) {
|
|
@@ -1900,7 +1900,7 @@ class E {
|
|
|
1900
1900
|
if (J) {
|
|
1901
1901
|
const st = J[V.indices.bucket];
|
|
1902
1902
|
let Y = J[V.indices.path];
|
|
1903
|
-
Y || (Y = ""), r = new
|
|
1903
|
+
Y || (Y = ""), r = new w(st, Y), V.postModify(r);
|
|
1904
1904
|
break;
|
|
1905
1905
|
}
|
|
1906
1906
|
}
|
|
@@ -1938,46 +1938,46 @@ class Qn {
|
|
|
1938
1938
|
* limitations under the License.
|
|
1939
1939
|
*/
|
|
1940
1940
|
function er(t, e, n) {
|
|
1941
|
-
let r = 1, s = null, o = null, i = !1,
|
|
1942
|
-
function
|
|
1943
|
-
return
|
|
1941
|
+
let r = 1, s = null, o = null, i = !1, c = 0;
|
|
1942
|
+
function l() {
|
|
1943
|
+
return c === 2;
|
|
1944
1944
|
}
|
|
1945
|
-
let
|
|
1946
|
-
function
|
|
1947
|
-
|
|
1945
|
+
let a = !1;
|
|
1946
|
+
function u(..._) {
|
|
1947
|
+
a || (a = !0, e.apply(null, _));
|
|
1948
1948
|
}
|
|
1949
|
-
function
|
|
1949
|
+
function p(_) {
|
|
1950
1950
|
s = setTimeout(() => {
|
|
1951
|
-
s = null, t(m,
|
|
1952
|
-
},
|
|
1951
|
+
s = null, t(m, l());
|
|
1952
|
+
}, _);
|
|
1953
1953
|
}
|
|
1954
|
-
function
|
|
1954
|
+
function g() {
|
|
1955
1955
|
o && clearTimeout(o);
|
|
1956
1956
|
}
|
|
1957
|
-
function m(
|
|
1958
|
-
if (
|
|
1959
|
-
|
|
1957
|
+
function m(_, ...B) {
|
|
1958
|
+
if (a) {
|
|
1959
|
+
g();
|
|
1960
1960
|
return;
|
|
1961
1961
|
}
|
|
1962
|
-
if (
|
|
1963
|
-
|
|
1962
|
+
if (_) {
|
|
1963
|
+
g(), u.call(null, _, ...B);
|
|
1964
1964
|
return;
|
|
1965
1965
|
}
|
|
1966
|
-
if (
|
|
1967
|
-
|
|
1966
|
+
if (l() || i) {
|
|
1967
|
+
g(), u.call(null, _, ...B);
|
|
1968
1968
|
return;
|
|
1969
1969
|
}
|
|
1970
1970
|
r < 64 && (r *= 2);
|
|
1971
1971
|
let I;
|
|
1972
|
-
|
|
1972
|
+
c === 1 ? (c = 2, I = 0) : I = (r + Math.random()) * 1e3, p(I);
|
|
1973
1973
|
}
|
|
1974
|
-
let
|
|
1975
|
-
function
|
|
1976
|
-
|
|
1974
|
+
let E = !1;
|
|
1975
|
+
function N(_) {
|
|
1976
|
+
E || (E = !0, g(), !a && (s !== null ? (_ || (c = 2), clearTimeout(s), p(0)) : _ || (c = 1)));
|
|
1977
1977
|
}
|
|
1978
|
-
return
|
|
1979
|
-
i = !0,
|
|
1980
|
-
}, n),
|
|
1978
|
+
return p(0), o = setTimeout(() => {
|
|
1979
|
+
i = !0, N(!0);
|
|
1980
|
+
}, n), N;
|
|
1981
1981
|
}
|
|
1982
1982
|
function tr(t) {
|
|
1983
1983
|
t(!1);
|
|
@@ -2007,13 +2007,13 @@ function rr(t) {
|
|
|
2007
2007
|
function ge(t) {
|
|
2008
2008
|
return typeof t == "string" || t instanceof String;
|
|
2009
2009
|
}
|
|
2010
|
-
function
|
|
2010
|
+
function Oe(t) {
|
|
2011
2011
|
return me() && t instanceof Blob;
|
|
2012
2012
|
}
|
|
2013
2013
|
function me() {
|
|
2014
|
-
return typeof Blob < "u" && !
|
|
2014
|
+
return typeof Blob < "u" && !_t();
|
|
2015
2015
|
}
|
|
2016
|
-
function
|
|
2016
|
+
function Ce(t, e, n, r) {
|
|
2017
2017
|
if (r < e)
|
|
2018
2018
|
throw de(`Invalid value for '${t}'. Expected ${e} or greater.`);
|
|
2019
2019
|
if (r > n)
|
|
@@ -2065,10 +2065,10 @@ function We(t) {
|
|
|
2065
2065
|
* See the License for the specific language governing permissions and
|
|
2066
2066
|
* limitations under the License.
|
|
2067
2067
|
*/
|
|
2068
|
-
var
|
|
2068
|
+
var C;
|
|
2069
2069
|
(function(t) {
|
|
2070
2070
|
t[t.NO_ERROR = 0] = "NO_ERROR", t[t.NETWORK_ERROR = 1] = "NETWORK_ERROR", t[t.ABORT = 2] = "ABORT";
|
|
2071
|
-
})(
|
|
2071
|
+
})(C || (C = {}));
|
|
2072
2072
|
/**
|
|
2073
2073
|
* @license
|
|
2074
2074
|
* Copyright 2022 Google LLC
|
|
@@ -2111,9 +2111,9 @@ function sr(t, e) {
|
|
|
2111
2111
|
* limitations under the License.
|
|
2112
2112
|
*/
|
|
2113
2113
|
class or {
|
|
2114
|
-
constructor(e, n, r, s, o, i,
|
|
2115
|
-
this.url_ = e, this.method_ = n, this.headers_ = r, this.body_ = s, this.successCodes_ = o, this.additionalRetryCodes_ = i, this.callback_ =
|
|
2116
|
-
this.resolve_ = m, this.reject_ =
|
|
2114
|
+
constructor(e, n, r, s, o, i, c, l, a, u, p, g = !0) {
|
|
2115
|
+
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) => {
|
|
2116
|
+
this.resolve_ = m, this.reject_ = E, this.start_();
|
|
2117
2117
|
});
|
|
2118
2118
|
}
|
|
2119
2119
|
/**
|
|
@@ -2127,39 +2127,39 @@ class or {
|
|
|
2127
2127
|
}
|
|
2128
2128
|
const o = this.connectionFactory_();
|
|
2129
2129
|
this.pendingConnection_ = o;
|
|
2130
|
-
const i = (
|
|
2131
|
-
const
|
|
2132
|
-
this.progressCallback_ !== null && this.progressCallback_(
|
|
2130
|
+
const i = (c) => {
|
|
2131
|
+
const l = c.loaded, a = c.lengthComputable ? c.total : -1;
|
|
2132
|
+
this.progressCallback_ !== null && this.progressCallback_(l, a);
|
|
2133
2133
|
};
|
|
2134
2134
|
this.progressCallback_ !== null && o.addUploadProgressListener(i), o.send(this.url_, this.method_, this.body_, this.headers_).then(() => {
|
|
2135
2135
|
this.progressCallback_ !== null && o.removeUploadProgressListener(i), this.pendingConnection_ = null;
|
|
2136
|
-
const
|
|
2137
|
-
if (!
|
|
2138
|
-
const
|
|
2139
|
-
r(!1, new z(!1, null,
|
|
2136
|
+
const c = o.getErrorCode() === C.NO_ERROR, l = o.getStatus();
|
|
2137
|
+
if (!c || sr(l, this.additionalRetryCodes_) && this.retry) {
|
|
2138
|
+
const u = o.getErrorCode() === C.ABORT;
|
|
2139
|
+
r(!1, new z(!1, null, u));
|
|
2140
2140
|
return;
|
|
2141
2141
|
}
|
|
2142
|
-
const
|
|
2143
|
-
r(!0, new z(
|
|
2142
|
+
const a = this.successCodes_.indexOf(l) !== -1;
|
|
2143
|
+
r(!0, new z(a, o));
|
|
2144
2144
|
});
|
|
2145
2145
|
}, n = (r, s) => {
|
|
2146
|
-
const o = this.resolve_, i = this.reject_,
|
|
2146
|
+
const o = this.resolve_, i = this.reject_, c = s.connection;
|
|
2147
2147
|
if (s.wasSuccessCode)
|
|
2148
2148
|
try {
|
|
2149
|
-
const
|
|
2150
|
-
nr(
|
|
2151
|
-
} catch (
|
|
2152
|
-
i(
|
|
2149
|
+
const l = this.callback_(c, c.getResponse());
|
|
2150
|
+
nr(l) ? o(l) : o();
|
|
2151
|
+
} catch (l) {
|
|
2152
|
+
i(l);
|
|
2153
2153
|
}
|
|
2154
|
-
else if (
|
|
2155
|
-
const
|
|
2156
|
-
|
|
2154
|
+
else if (c !== null) {
|
|
2155
|
+
const l = pe();
|
|
2156
|
+
l.serverResponse = c.getErrorText(), this.errorCallback_ ? i(this.errorCallback_(c, l)) : i(l);
|
|
2157
2157
|
} else if (s.canceled) {
|
|
2158
|
-
const
|
|
2159
|
-
i(
|
|
2158
|
+
const l = this.appDelete_ ? ze() : Wn();
|
|
2159
|
+
i(l);
|
|
2160
2160
|
} else {
|
|
2161
|
-
const
|
|
2162
|
-
i(
|
|
2161
|
+
const l = zn();
|
|
2162
|
+
i(l);
|
|
2163
2163
|
}
|
|
2164
2164
|
};
|
|
2165
2165
|
this.canceled_ ? n(!1, new z(!1, null, !0)) : this.backoffId_ = er(e, n, this.timeout_);
|
|
@@ -2191,8 +2191,8 @@ function lr(t, e) {
|
|
|
2191
2191
|
e !== null && (t["X-Firebase-AppCheck"] = e);
|
|
2192
2192
|
}
|
|
2193
2193
|
function ur(t, e, n, r, s, o, i = !0) {
|
|
2194
|
-
const
|
|
2195
|
-
return cr(
|
|
2194
|
+
const c = We(t.urlParams), l = t.url + c, a = Object.assign({}, t.headers);
|
|
2195
|
+
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);
|
|
2196
2196
|
}
|
|
2197
2197
|
/**
|
|
2198
2198
|
* @license
|
|
@@ -2223,7 +2223,7 @@ function dr(...t) {
|
|
|
2223
2223
|
} else {
|
|
2224
2224
|
if (me())
|
|
2225
2225
|
return new Blob(t);
|
|
2226
|
-
throw new d
|
|
2226
|
+
throw new f(d.UNSUPPORTED_ENVIRONMENT, "This browser doesn't seem to support creating Blobs");
|
|
2227
2227
|
}
|
|
2228
2228
|
}
|
|
2229
2229
|
function fr(t, e, n) {
|
|
@@ -2266,7 +2266,7 @@ function pr(t) {
|
|
|
2266
2266
|
* See the License for the specific language governing permissions and
|
|
2267
2267
|
* limitations under the License.
|
|
2268
2268
|
*/
|
|
2269
|
-
const
|
|
2269
|
+
const v = {
|
|
2270
2270
|
/**
|
|
2271
2271
|
* Indicates the string should be interpreted "raw", that is, as normal text.
|
|
2272
2272
|
* The string will be interpreted as UTF-16, then uploaded as a UTF-8 byte
|
|
@@ -2307,13 +2307,13 @@ class se {
|
|
|
2307
2307
|
}
|
|
2308
2308
|
function gr(t, e) {
|
|
2309
2309
|
switch (t) {
|
|
2310
|
-
case
|
|
2310
|
+
case v.RAW:
|
|
2311
2311
|
return new se(qe(e));
|
|
2312
|
-
case
|
|
2313
|
-
case
|
|
2312
|
+
case v.BASE64:
|
|
2313
|
+
case v.BASE64URL:
|
|
2314
2314
|
return new se(Ge(t, e));
|
|
2315
|
-
case
|
|
2316
|
-
return new se(
|
|
2315
|
+
case v.DATA_URL:
|
|
2316
|
+
return new se(br(e), _r(e));
|
|
2317
2317
|
}
|
|
2318
2318
|
throw pe();
|
|
2319
2319
|
}
|
|
@@ -2342,19 +2342,19 @@ function mr(t) {
|
|
|
2342
2342
|
try {
|
|
2343
2343
|
e = decodeURIComponent(t);
|
|
2344
2344
|
} catch {
|
|
2345
|
-
throw M(
|
|
2345
|
+
throw M(v.DATA_URL, "Malformed data URL.");
|
|
2346
2346
|
}
|
|
2347
2347
|
return qe(e);
|
|
2348
2348
|
}
|
|
2349
2349
|
function Ge(t, e) {
|
|
2350
2350
|
switch (t) {
|
|
2351
|
-
case
|
|
2351
|
+
case v.BASE64: {
|
|
2352
2352
|
const s = e.indexOf("-") !== -1, o = e.indexOf("_") !== -1;
|
|
2353
2353
|
if (s || o)
|
|
2354
2354
|
throw M(t, "Invalid character '" + (s ? "-" : "_") + "' found: is it base64url encoded?");
|
|
2355
2355
|
break;
|
|
2356
2356
|
}
|
|
2357
|
-
case
|
|
2357
|
+
case v.BASE64URL: {
|
|
2358
2358
|
const s = e.indexOf("+") !== -1, o = e.indexOf("/") !== -1;
|
|
2359
2359
|
if (s || o)
|
|
2360
2360
|
throw M(t, "Invalid character '" + (s ? "+" : "/") + "' found: is it base64 encoded?");
|
|
@@ -2378,16 +2378,16 @@ class Ke {
|
|
|
2378
2378
|
this.base64 = !1, this.contentType = null;
|
|
2379
2379
|
const n = e.match(/^data:([^,]+)?,/);
|
|
2380
2380
|
if (n === null)
|
|
2381
|
-
throw M(
|
|
2381
|
+
throw M(v.DATA_URL, "Must be formatted 'data:[<mediatype>][;base64],<data>");
|
|
2382
2382
|
const r = n[1] || null;
|
|
2383
2383
|
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);
|
|
2384
2384
|
}
|
|
2385
2385
|
}
|
|
2386
|
-
function
|
|
2386
|
+
function br(t) {
|
|
2387
2387
|
const e = new Ke(t);
|
|
2388
|
-
return e.base64 ? Ge(
|
|
2388
|
+
return e.base64 ? Ge(v.BASE64, e.rest) : mr(e.rest);
|
|
2389
2389
|
}
|
|
2390
|
-
function
|
|
2390
|
+
function _r(t) {
|
|
2391
2391
|
return new Ke(t).contentType;
|
|
2392
2392
|
}
|
|
2393
2393
|
function yr(t, e) {
|
|
@@ -2412,7 +2412,7 @@ function yr(t, e) {
|
|
|
2412
2412
|
class T {
|
|
2413
2413
|
constructor(e, n) {
|
|
2414
2414
|
let r = 0, s = "";
|
|
2415
|
-
|
|
2415
|
+
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;
|
|
2416
2416
|
}
|
|
2417
2417
|
size() {
|
|
2418
2418
|
return this.size_;
|
|
@@ -2421,7 +2421,7 @@ class T {
|
|
|
2421
2421
|
return this.type_;
|
|
2422
2422
|
}
|
|
2423
2423
|
slice(e, n) {
|
|
2424
|
-
if (
|
|
2424
|
+
if (Oe(this.data_)) {
|
|
2425
2425
|
const r = this.data_, s = fr(r, e, n);
|
|
2426
2426
|
return s === null ? null : new T(s);
|
|
2427
2427
|
} else {
|
|
@@ -2434,7 +2434,7 @@ class T {
|
|
|
2434
2434
|
const n = e.map((r) => r instanceof T ? r.data_ : r);
|
|
2435
2435
|
return new T(dr.apply(null, n));
|
|
2436
2436
|
} else {
|
|
2437
|
-
const n = e.map((i) => ge(i) ? gr(
|
|
2437
|
+
const n = e.map((i) => ge(i) ? gr(v.RAW, i).data : i.data_);
|
|
2438
2438
|
let r = 0;
|
|
2439
2439
|
n.forEach((i) => {
|
|
2440
2440
|
r += i.byteLength;
|
|
@@ -2442,8 +2442,8 @@ class T {
|
|
|
2442
2442
|
const s = new Uint8Array(r);
|
|
2443
2443
|
let o = 0;
|
|
2444
2444
|
return n.forEach((i) => {
|
|
2445
|
-
for (let
|
|
2446
|
-
s[o++] = i[
|
|
2445
|
+
for (let c = 0; c < i.length; c++)
|
|
2446
|
+
s[o++] = i[c];
|
|
2447
2447
|
}), new T(s, !0);
|
|
2448
2448
|
}
|
|
2449
2449
|
}
|
|
@@ -2492,13 +2492,13 @@ function Xe(t) {
|
|
|
2492
2492
|
* See the License for the specific language governing permissions and
|
|
2493
2493
|
* limitations under the License.
|
|
2494
2494
|
*/
|
|
2495
|
-
function
|
|
2495
|
+
function wr(t) {
|
|
2496
2496
|
if (t.length === 0)
|
|
2497
2497
|
return null;
|
|
2498
2498
|
const e = t.lastIndexOf("/");
|
|
2499
2499
|
return e === -1 ? "" : t.slice(0, e);
|
|
2500
2500
|
}
|
|
2501
|
-
function
|
|
2501
|
+
function Er(t, e) {
|
|
2502
2502
|
const n = e.split("/").filter((r) => r.length > 0).join("/");
|
|
2503
2503
|
return t.length === 0 ? n : t + "/" + n;
|
|
2504
2504
|
}
|
|
@@ -2525,39 +2525,39 @@ function Je(t) {
|
|
|
2525
2525
|
function Ir(t, e) {
|
|
2526
2526
|
return e;
|
|
2527
2527
|
}
|
|
2528
|
-
class
|
|
2528
|
+
class b {
|
|
2529
2529
|
constructor(e, n, r, s) {
|
|
2530
2530
|
this.server = e, this.local = n || e, this.writable = !!r, this.xform = s || Ir;
|
|
2531
2531
|
}
|
|
2532
2532
|
}
|
|
2533
2533
|
let W = null;
|
|
2534
|
-
function
|
|
2534
|
+
function vr(t) {
|
|
2535
2535
|
return !ge(t) || t.length < 2 ? t : Je(t);
|
|
2536
2536
|
}
|
|
2537
2537
|
function Ye() {
|
|
2538
2538
|
if (W)
|
|
2539
2539
|
return W;
|
|
2540
2540
|
const t = [];
|
|
2541
|
-
t.push(new
|
|
2541
|
+
t.push(new b("bucket")), t.push(new b("generation")), t.push(new b("metageneration")), t.push(new b("name", "fullPath", !0));
|
|
2542
2542
|
function e(o, i) {
|
|
2543
|
-
return
|
|
2543
|
+
return vr(i);
|
|
2544
2544
|
}
|
|
2545
|
-
const n = new
|
|
2545
|
+
const n = new b("name");
|
|
2546
2546
|
n.xform = e, t.push(n);
|
|
2547
2547
|
function r(o, i) {
|
|
2548
2548
|
return i !== void 0 ? Number(i) : i;
|
|
2549
2549
|
}
|
|
2550
|
-
const s = new
|
|
2551
|
-
return s.xform = r, t.push(s), t.push(new
|
|
2550
|
+
const s = new b("size");
|
|
2551
|
+
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;
|
|
2552
2552
|
}
|
|
2553
2553
|
function Tr(t, e) {
|
|
2554
2554
|
function n() {
|
|
2555
|
-
const r = t.bucket, s = t.fullPath, o = new
|
|
2555
|
+
const r = t.bucket, s = t.fullPath, o = new w(r, s);
|
|
2556
2556
|
return e._makeStorageReference(o);
|
|
2557
2557
|
}
|
|
2558
2558
|
Object.defineProperty(t, "ref", { get: n });
|
|
2559
2559
|
}
|
|
2560
|
-
function
|
|
2560
|
+
function Rr(t, e, n) {
|
|
2561
2561
|
const r = {};
|
|
2562
2562
|
r.type = "file";
|
|
2563
2563
|
const s = n.length;
|
|
@@ -2569,9 +2569,9 @@ function Ar(t, e, n) {
|
|
|
2569
2569
|
}
|
|
2570
2570
|
function Ze(t, e, n) {
|
|
2571
2571
|
const r = Xe(e);
|
|
2572
|
-
return r === null ? null :
|
|
2572
|
+
return r === null ? null : Rr(t, r, n);
|
|
2573
2573
|
}
|
|
2574
|
-
function
|
|
2574
|
+
function Ar(t, e, n, r) {
|
|
2575
2575
|
const s = Xe(e);
|
|
2576
2576
|
if (s === null || !ge(s.downloadTokens))
|
|
2577
2577
|
return null;
|
|
@@ -2579,12 +2579,12 @@ function vr(t, e, n, r) {
|
|
|
2579
2579
|
if (o.length === 0)
|
|
2580
2580
|
return null;
|
|
2581
2581
|
const i = encodeURIComponent;
|
|
2582
|
-
return o.split(",").map((
|
|
2583
|
-
const
|
|
2582
|
+
return o.split(",").map((a) => {
|
|
2583
|
+
const u = t.bucket, p = t.fullPath, g = "/b/" + i(u) + "/o/" + i(p), m = j(g, n, r), E = We({
|
|
2584
2584
|
alt: "media",
|
|
2585
|
-
token:
|
|
2585
|
+
token: a
|
|
2586
2586
|
});
|
|
2587
|
-
return m +
|
|
2587
|
+
return m + E;
|
|
2588
2588
|
})[0];
|
|
2589
2589
|
}
|
|
2590
2590
|
function Dr(t, e) {
|
|
@@ -2620,28 +2620,28 @@ function Qe(t) {
|
|
|
2620
2620
|
if (!t)
|
|
2621
2621
|
throw pe();
|
|
2622
2622
|
}
|
|
2623
|
-
function
|
|
2623
|
+
function Or(t, e) {
|
|
2624
2624
|
function n(r, s) {
|
|
2625
2625
|
const o = Ze(t, s, e);
|
|
2626
2626
|
return Qe(o !== null), o;
|
|
2627
2627
|
}
|
|
2628
2628
|
return n;
|
|
2629
2629
|
}
|
|
2630
|
-
function
|
|
2630
|
+
function Cr(t, e) {
|
|
2631
2631
|
function n(r, s) {
|
|
2632
2632
|
const o = Ze(t, s, e);
|
|
2633
|
-
return Qe(o !== null),
|
|
2633
|
+
return Qe(o !== null), Ar(o, s, t.host, t._protocol);
|
|
2634
2634
|
}
|
|
2635
2635
|
return n;
|
|
2636
2636
|
}
|
|
2637
2637
|
function et(t) {
|
|
2638
2638
|
function e(n, r) {
|
|
2639
2639
|
let s;
|
|
2640
|
-
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 =
|
|
2640
|
+
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;
|
|
2641
2641
|
}
|
|
2642
2642
|
return e;
|
|
2643
2643
|
}
|
|
2644
|
-
function
|
|
2644
|
+
function be(t) {
|
|
2645
2645
|
const e = et(t);
|
|
2646
2646
|
function n(r, s) {
|
|
2647
2647
|
let o = e(r, s);
|
|
@@ -2650,23 +2650,23 @@ function _e(t) {
|
|
|
2650
2650
|
return n;
|
|
2651
2651
|
}
|
|
2652
2652
|
function Sr(t, e, n) {
|
|
2653
|
-
const r = e.fullServerUrl(), s = j(r, t.host, t._protocol) + "?alt=media", o = "GET", i = t.maxOperationRetryTime,
|
|
2654
|
-
return
|
|
2653
|
+
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);
|
|
2654
|
+
return c.errorHandler = be(e), n !== void 0 && (c.headers.Range = `bytes=0-${n}`, c.successCodes = [
|
|
2655
2655
|
200,
|
|
2656
2656
|
206
|
|
2657
2657
|
/* Partial Content */
|
|
2658
|
-
]),
|
|
2658
|
+
]), c;
|
|
2659
2659
|
}
|
|
2660
|
-
function
|
|
2661
|
-
const r = e.fullServerUrl(), s = j(r, t.host, t._protocol), o = "GET", i = t.maxOperationRetryTime,
|
|
2662
|
-
return
|
|
2660
|
+
function kr(t, e, n) {
|
|
2661
|
+
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);
|
|
2662
|
+
return c.errorHandler = be(e), c;
|
|
2663
2663
|
}
|
|
2664
|
-
function
|
|
2664
|
+
function Nr(t, e) {
|
|
2665
2665
|
const n = e.fullServerUrl(), r = j(n, t.host, t._protocol), s = "DELETE", o = t.maxOperationRetryTime;
|
|
2666
|
-
function i(
|
|
2666
|
+
function i(l, a) {
|
|
2667
2667
|
}
|
|
2668
|
-
const
|
|
2669
|
-
return
|
|
2668
|
+
const c = new X(r, s, i, o);
|
|
2669
|
+
return c.successCodes = [200, 204], c.errorHandler = be(e), c;
|
|
2670
2670
|
}
|
|
2671
2671
|
function Br(t, e) {
|
|
2672
2672
|
return t && t.contentType || e && e.type() || "application/octet-stream";
|
|
@@ -2675,39 +2675,39 @@ function xr(t, e, n) {
|
|
|
2675
2675
|
const r = Object.assign({}, n);
|
|
2676
2676
|
return r.fullPath = t.path, r.size = e.size(), r.contentType || (r.contentType = Br(null, e)), r;
|
|
2677
2677
|
}
|
|
2678
|
-
function
|
|
2678
|
+
function Pr(t, e, n, r, s) {
|
|
2679
2679
|
const o = e.bucketOnlyServerUrl(), i = {
|
|
2680
2680
|
"X-Goog-Upload-Protocol": "multipart"
|
|
2681
2681
|
};
|
|
2682
|
-
function
|
|
2682
|
+
function c() {
|
|
2683
2683
|
let I = "";
|
|
2684
2684
|
for (let y = 0; y < 2; y++)
|
|
2685
2685
|
I = I + Math.random().toString().slice(2);
|
|
2686
2686
|
return I;
|
|
2687
2687
|
}
|
|
2688
|
-
const
|
|
2689
|
-
i["Content-Type"] = "multipart/related; boundary=" +
|
|
2690
|
-
const
|
|
2688
|
+
const l = c();
|
|
2689
|
+
i["Content-Type"] = "multipart/related; boundary=" + l;
|
|
2690
|
+
const a = xr(e, r, s), u = Dr(a, n), p = "--" + l + `\r
|
|
2691
2691
|
Content-Type: application/json; charset=utf-8\r
|
|
2692
2692
|
\r
|
|
2693
|
-
` +
|
|
2694
|
-
--` +
|
|
2695
|
-
Content-Type: ` +
|
|
2693
|
+
` + u + `\r
|
|
2694
|
+
--` + l + `\r
|
|
2695
|
+
Content-Type: ` + a.contentType + `\r
|
|
2696
2696
|
\r
|
|
2697
|
-
`,
|
|
2698
|
-
--` +
|
|
2697
|
+
`, g = `\r
|
|
2698
|
+
--` + l + "--", m = T.getBlob(p, r, g);
|
|
2699
2699
|
if (m === null)
|
|
2700
2700
|
throw Xn();
|
|
2701
|
-
const
|
|
2702
|
-
return D.urlParams =
|
|
2701
|
+
const E = { name: a.fullPath }, N = j(o, t.host, t._protocol), _ = "POST", B = t.maxUploadRetryTime, D = new X(N, _, Or(t, n), B);
|
|
2702
|
+
return D.urlParams = E, D.headers = i, D.body = m.uploadData(), D.errorHandler = et(e), D;
|
|
2703
2703
|
}
|
|
2704
2704
|
class tt {
|
|
2705
2705
|
constructor() {
|
|
2706
|
-
this.sent_ = !1, this.xhr_ = new XMLHttpRequest(), this.initXhr(), this.errorCode_ =
|
|
2706
|
+
this.sent_ = !1, this.xhr_ = new XMLHttpRequest(), this.initXhr(), this.errorCode_ = C.NO_ERROR, this.sendPromise_ = new Promise((e) => {
|
|
2707
2707
|
this.xhr_.addEventListener("abort", () => {
|
|
2708
|
-
this.errorCode_ =
|
|
2708
|
+
this.errorCode_ = C.ABORT, e();
|
|
2709
2709
|
}), this.xhr_.addEventListener("error", () => {
|
|
2710
|
-
this.errorCode_ =
|
|
2710
|
+
this.errorCode_ = C.NETWORK_ERROR, e();
|
|
2711
2711
|
}), this.xhr_.addEventListener("load", () => {
|
|
2712
2712
|
e();
|
|
2713
2713
|
});
|
|
@@ -2715,7 +2715,7 @@ class tt {
|
|
|
2715
2715
|
}
|
|
2716
2716
|
send(e, n, r, s) {
|
|
2717
2717
|
if (this.sent_)
|
|
2718
|
-
throw
|
|
2718
|
+
throw U("cannot .send() more than once");
|
|
2719
2719
|
if (this.sent_ = !0, this.xhr_.open(n, e, !0), s !== void 0)
|
|
2720
2720
|
for (const o in s)
|
|
2721
2721
|
s.hasOwnProperty(o) && this.xhr_.setRequestHeader(o, s[o].toString());
|
|
@@ -2723,12 +2723,12 @@ class tt {
|
|
|
2723
2723
|
}
|
|
2724
2724
|
getErrorCode() {
|
|
2725
2725
|
if (!this.sent_)
|
|
2726
|
-
throw
|
|
2726
|
+
throw U("cannot .getErrorCode() before sending");
|
|
2727
2727
|
return this.errorCode_;
|
|
2728
2728
|
}
|
|
2729
2729
|
getStatus() {
|
|
2730
2730
|
if (!this.sent_)
|
|
2731
|
-
throw
|
|
2731
|
+
throw U("cannot .getStatus() before sending");
|
|
2732
2732
|
try {
|
|
2733
2733
|
return this.xhr_.status;
|
|
2734
2734
|
} catch {
|
|
@@ -2737,12 +2737,12 @@ class tt {
|
|
|
2737
2737
|
}
|
|
2738
2738
|
getResponse() {
|
|
2739
2739
|
if (!this.sent_)
|
|
2740
|
-
throw
|
|
2740
|
+
throw U("cannot .getResponse() before sending");
|
|
2741
2741
|
return this.xhr_.response;
|
|
2742
2742
|
}
|
|
2743
2743
|
getErrorText() {
|
|
2744
2744
|
if (!this.sent_)
|
|
2745
|
-
throw
|
|
2745
|
+
throw U("cannot .getErrorText() before sending");
|
|
2746
2746
|
return this.xhr_.statusText;
|
|
2747
2747
|
}
|
|
2748
2748
|
/** Aborts the request. */
|
|
@@ -2759,13 +2759,13 @@ class tt {
|
|
|
2759
2759
|
this.xhr_.upload != null && this.xhr_.upload.removeEventListener("progress", e);
|
|
2760
2760
|
}
|
|
2761
2761
|
}
|
|
2762
|
-
class
|
|
2762
|
+
class Ur extends tt {
|
|
2763
2763
|
initXhr() {
|
|
2764
2764
|
this.xhr_.responseType = "text";
|
|
2765
2765
|
}
|
|
2766
2766
|
}
|
|
2767
|
-
function
|
|
2768
|
-
return new
|
|
2767
|
+
function _e() {
|
|
2768
|
+
return new Ur();
|
|
2769
2769
|
}
|
|
2770
2770
|
class Lr extends tt {
|
|
2771
2771
|
initXhr() {
|
|
@@ -2791,9 +2791,9 @@ function Mr() {
|
|
|
2791
2791
|
* See the License for the specific language governing permissions and
|
|
2792
2792
|
* limitations under the License.
|
|
2793
2793
|
*/
|
|
2794
|
-
class
|
|
2794
|
+
class k {
|
|
2795
2795
|
constructor(e, n) {
|
|
2796
|
-
this._service = e, n instanceof
|
|
2796
|
+
this._service = e, n instanceof w ? this._location = n : this._location = w.makeFromUrl(n, e.host);
|
|
2797
2797
|
}
|
|
2798
2798
|
/**
|
|
2799
2799
|
* Returns the URL for the bucket and path this object references,
|
|
@@ -2804,13 +2804,13 @@ class N {
|
|
|
2804
2804
|
return "gs://" + this._location.bucket + "/" + this._location.path;
|
|
2805
2805
|
}
|
|
2806
2806
|
_newRef(e, n) {
|
|
2807
|
-
return new
|
|
2807
|
+
return new k(e, n);
|
|
2808
2808
|
}
|
|
2809
2809
|
/**
|
|
2810
2810
|
* A reference to the root of this object's bucket.
|
|
2811
2811
|
*/
|
|
2812
2812
|
get root() {
|
|
2813
|
-
const e = new
|
|
2813
|
+
const e = new w(this._location.bucket, "");
|
|
2814
2814
|
return this._newRef(this._service, e);
|
|
2815
2815
|
}
|
|
2816
2816
|
/**
|
|
@@ -2843,11 +2843,11 @@ class N {
|
|
|
2843
2843
|
* this reference is the root.
|
|
2844
2844
|
*/
|
|
2845
2845
|
get parent() {
|
|
2846
|
-
const e =
|
|
2846
|
+
const e = wr(this._location.path);
|
|
2847
2847
|
if (e === null)
|
|
2848
2848
|
return null;
|
|
2849
|
-
const n = new
|
|
2850
|
-
return new
|
|
2849
|
+
const n = new w(this._location.bucket, e);
|
|
2850
|
+
return new k(this._service, n);
|
|
2851
2851
|
}
|
|
2852
2852
|
/**
|
|
2853
2853
|
* Utility function to throw an error in methods that do not accept a root reference.
|
|
@@ -2865,18 +2865,18 @@ function $r(t, e) {
|
|
|
2865
2865
|
r.slice(0, e)
|
|
2866
2866
|
) : r);
|
|
2867
2867
|
}
|
|
2868
|
-
function
|
|
2868
|
+
function Hr(t, e, n) {
|
|
2869
2869
|
t._throwIfRoot("uploadBytes");
|
|
2870
|
-
const r =
|
|
2871
|
-
return t.storage.makeRequestWithTokens(r,
|
|
2870
|
+
const r = Pr(t.storage, t._location, Ye(), new T(e, !0), n);
|
|
2871
|
+
return t.storage.makeRequestWithTokens(r, _e).then((s) => ({
|
|
2872
2872
|
metadata: s,
|
|
2873
2873
|
ref: t
|
|
2874
2874
|
}));
|
|
2875
2875
|
}
|
|
2876
|
-
function
|
|
2876
|
+
function Fr(t) {
|
|
2877
2877
|
t._throwIfRoot("getDownloadURL");
|
|
2878
|
-
const e =
|
|
2879
|
-
return t.storage.makeRequestWithTokens(e,
|
|
2878
|
+
const e = kr(t.storage, t._location, Ye());
|
|
2879
|
+
return t.storage.makeRequestWithTokens(e, _e).then((n) => {
|
|
2880
2880
|
if (n === null)
|
|
2881
2881
|
throw Jn();
|
|
2882
2882
|
return n;
|
|
@@ -2884,12 +2884,12 @@ function Hr(t) {
|
|
|
2884
2884
|
}
|
|
2885
2885
|
function jr(t) {
|
|
2886
2886
|
t._throwIfRoot("deleteObject");
|
|
2887
|
-
const e =
|
|
2888
|
-
return t.storage.makeRequestWithTokens(e,
|
|
2887
|
+
const e = Nr(t.storage, t._location);
|
|
2888
|
+
return t.storage.makeRequestWithTokens(e, _e);
|
|
2889
2889
|
}
|
|
2890
2890
|
function Vr(t, e) {
|
|
2891
|
-
const n =
|
|
2892
|
-
return new
|
|
2891
|
+
const n = Er(t._location.path, e), r = new w(t._location.bucket, n);
|
|
2892
|
+
return new k(t.storage, r);
|
|
2893
2893
|
}
|
|
2894
2894
|
/**
|
|
2895
2895
|
* @license
|
|
@@ -2911,14 +2911,14 @@ function zr(t) {
|
|
|
2911
2911
|
return /^[A-Za-z]+:\/\//.test(t);
|
|
2912
2912
|
}
|
|
2913
2913
|
function Wr(t, e) {
|
|
2914
|
-
return new
|
|
2914
|
+
return new k(t, e);
|
|
2915
2915
|
}
|
|
2916
2916
|
function nt(t, e) {
|
|
2917
2917
|
if (t instanceof ye) {
|
|
2918
2918
|
const n = t;
|
|
2919
2919
|
if (n._bucket == null)
|
|
2920
2920
|
throw Kn();
|
|
2921
|
-
const r = new
|
|
2921
|
+
const r = new k(n, n._bucket);
|
|
2922
2922
|
return e != null ? nt(r, e) : r;
|
|
2923
2923
|
} else
|
|
2924
2924
|
return e !== void 0 ? Vr(t, e) : t;
|
|
@@ -2933,16 +2933,16 @@ function qr(t, e) {
|
|
|
2933
2933
|
}
|
|
2934
2934
|
function Se(t, e) {
|
|
2935
2935
|
const n = e == null ? void 0 : e[Ve];
|
|
2936
|
-
return n == null ? null :
|
|
2936
|
+
return n == null ? null : w.makeFromBucketSpec(n, t);
|
|
2937
2937
|
}
|
|
2938
2938
|
function Gr(t, e, n, r = {}) {
|
|
2939
2939
|
t.host = `${e}:${n}`, t._protocol = "http";
|
|
2940
2940
|
const { mockUserToken: s } = r;
|
|
2941
|
-
s && (t._overrideAuthToken = typeof s == "string" ? s :
|
|
2941
|
+
s && (t._overrideAuthToken = typeof s == "string" ? s : bt(s, t.app.options.projectId));
|
|
2942
2942
|
}
|
|
2943
2943
|
class ye {
|
|
2944
2944
|
constructor(e, n, r, s, o) {
|
|
2945
|
-
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 =
|
|
2945
|
+
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);
|
|
2946
2946
|
}
|
|
2947
2947
|
/**
|
|
2948
2948
|
* The host string for this service, in the form of `host` or
|
|
@@ -2952,7 +2952,7 @@ class ye {
|
|
|
2952
2952
|
return this._host;
|
|
2953
2953
|
}
|
|
2954
2954
|
set host(e) {
|
|
2955
|
-
this._host = e, this._url != null ? this._bucket =
|
|
2955
|
+
this._host = e, this._url != null ? this._bucket = w.makeFromBucketSpec(this._url, e) : this._bucket = Se(e, this.app.options);
|
|
2956
2956
|
}
|
|
2957
2957
|
/**
|
|
2958
2958
|
* The maximum time to retry uploads in milliseconds.
|
|
@@ -2961,7 +2961,7 @@ class ye {
|
|
|
2961
2961
|
return this._maxUploadRetryTime;
|
|
2962
2962
|
}
|
|
2963
2963
|
set maxUploadRetryTime(e) {
|
|
2964
|
-
|
|
2964
|
+
Ce(
|
|
2965
2965
|
"time",
|
|
2966
2966
|
/* minValue=*/
|
|
2967
2967
|
0,
|
|
@@ -2978,7 +2978,7 @@ class ye {
|
|
|
2978
2978
|
return this._maxOperationRetryTime;
|
|
2979
2979
|
}
|
|
2980
2980
|
set maxOperationRetryTime(e) {
|
|
2981
|
-
|
|
2981
|
+
Ce(
|
|
2982
2982
|
"time",
|
|
2983
2983
|
/* minValue=*/
|
|
2984
2984
|
0,
|
|
@@ -3013,7 +3013,7 @@ class ye {
|
|
|
3013
3013
|
* at the given Location.
|
|
3014
3014
|
*/
|
|
3015
3015
|
_makeStorageReference(e) {
|
|
3016
|
-
return new
|
|
3016
|
+
return new k(this, e);
|
|
3017
3017
|
}
|
|
3018
3018
|
/**
|
|
3019
3019
|
* @param requestInfo - HTTP RequestInfo object
|
|
@@ -3035,7 +3035,7 @@ class ye {
|
|
|
3035
3035
|
return this._makeRequest(e, n, r, s).getPromise();
|
|
3036
3036
|
}
|
|
3037
3037
|
}
|
|
3038
|
-
const
|
|
3038
|
+
const ke = "@firebase/storage", Ne = "0.11.2";
|
|
3039
3039
|
/**
|
|
3040
3040
|
* @license
|
|
3041
3041
|
* Copyright 2020 Google LLC
|
|
@@ -3054,19 +3054,19 @@ const Ne = "@firebase/storage", ke = "0.11.2";
|
|
|
3054
3054
|
*/
|
|
3055
3055
|
const rt = "storage";
|
|
3056
3056
|
function ds(t, e, n) {
|
|
3057
|
-
return t =
|
|
3057
|
+
return t = P(t), Hr(t, e, n);
|
|
3058
3058
|
}
|
|
3059
3059
|
function fs(t) {
|
|
3060
|
-
return t =
|
|
3060
|
+
return t = P(t), Fr(t);
|
|
3061
3061
|
}
|
|
3062
3062
|
function ps(t) {
|
|
3063
|
-
return t =
|
|
3063
|
+
return t = P(t), jr(t);
|
|
3064
3064
|
}
|
|
3065
3065
|
function gs(t, e) {
|
|
3066
|
-
return t =
|
|
3066
|
+
return t = P(t), qr(t, e);
|
|
3067
3067
|
}
|
|
3068
3068
|
function ms(t = Dn(), e) {
|
|
3069
|
-
t =
|
|
3069
|
+
t = P(t);
|
|
3070
3070
|
const r = In(t, rt).getImmediate({
|
|
3071
3071
|
identifier: e
|
|
3072
3072
|
}), s = gt("storage");
|
|
@@ -3091,12 +3091,12 @@ function Kr(t, e, n, r = {}) {
|
|
|
3091
3091
|
* See the License for the specific language governing permissions and
|
|
3092
3092
|
* limitations under the License.
|
|
3093
3093
|
*/
|
|
3094
|
-
function
|
|
3095
|
-
return t =
|
|
3094
|
+
function bs(t, e) {
|
|
3095
|
+
return t = P(t), $r(t, e);
|
|
3096
3096
|
}
|
|
3097
3097
|
function Xr(t, { instanceIdentifier: e }) {
|
|
3098
3098
|
const n = t.getProvider("app").getImmediate(), r = t.getProvider("auth-internal"), s = t.getProvider("app-check-internal");
|
|
3099
|
-
return new ye(n, r, s, e,
|
|
3099
|
+
return new ye(n, r, s, e, Rn);
|
|
3100
3100
|
}
|
|
3101
3101
|
function Jr() {
|
|
3102
3102
|
G(new $(
|
|
@@ -3104,44 +3104,161 @@ function Jr() {
|
|
|
3104
3104
|
Xr,
|
|
3105
3105
|
"PUBLIC"
|
|
3106
3106
|
/* ComponentType.PUBLIC */
|
|
3107
|
-
).setMultipleInstances(!0)), L(
|
|
3107
|
+
).setMultipleInstances(!0)), L(ke, Ne, ""), L(ke, Ne, "esm2017");
|
|
3108
3108
|
}
|
|
3109
3109
|
Jr();
|
|
3110
|
+
function _s(t, e) {
|
|
3111
|
+
var n = {};
|
|
3112
|
+
for (var r in t)
|
|
3113
|
+
Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
|
|
3114
|
+
if (t != null && typeof Object.getOwnPropertySymbols == "function")
|
|
3115
|
+
for (var s = 0, r = Object.getOwnPropertySymbols(t); s < r.length; s++)
|
|
3116
|
+
e.indexOf(r[s]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[s]) && (n[r[s]] = t[r[s]]);
|
|
3117
|
+
return n;
|
|
3118
|
+
}
|
|
3119
|
+
function ys(t, e, n, r) {
|
|
3120
|
+
function s(o) {
|
|
3121
|
+
return o instanceof n ? o : new n(function(i) {
|
|
3122
|
+
i(o);
|
|
3123
|
+
});
|
|
3124
|
+
}
|
|
3125
|
+
return new (n || (n = Promise))(function(o, i) {
|
|
3126
|
+
function c(u) {
|
|
3127
|
+
try {
|
|
3128
|
+
a(r.next(u));
|
|
3129
|
+
} catch (p) {
|
|
3130
|
+
i(p);
|
|
3131
|
+
}
|
|
3132
|
+
}
|
|
3133
|
+
function l(u) {
|
|
3134
|
+
try {
|
|
3135
|
+
a(r.throw(u));
|
|
3136
|
+
} catch (p) {
|
|
3137
|
+
i(p);
|
|
3138
|
+
}
|
|
3139
|
+
}
|
|
3140
|
+
function a(u) {
|
|
3141
|
+
u.done ? o(u.value) : s(u.value).then(c, l);
|
|
3142
|
+
}
|
|
3143
|
+
a((r = r.apply(t, e || [])).next());
|
|
3144
|
+
});
|
|
3145
|
+
}
|
|
3146
|
+
function ws(t, e) {
|
|
3147
|
+
var n = { label: 0, sent: function() {
|
|
3148
|
+
if (o[0] & 1)
|
|
3149
|
+
throw o[1];
|
|
3150
|
+
return o[1];
|
|
3151
|
+
}, trys: [], ops: [] }, r, s, o, i = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
|
|
3152
|
+
return i.next = c(0), i.throw = c(1), i.return = c(2), typeof Symbol == "function" && (i[Symbol.iterator] = function() {
|
|
3153
|
+
return this;
|
|
3154
|
+
}), i;
|
|
3155
|
+
function c(a) {
|
|
3156
|
+
return function(u) {
|
|
3157
|
+
return l([a, u]);
|
|
3158
|
+
};
|
|
3159
|
+
}
|
|
3160
|
+
function l(a) {
|
|
3161
|
+
if (r)
|
|
3162
|
+
throw new TypeError("Generator is already executing.");
|
|
3163
|
+
for (; i && (i = 0, a[0] && (n = 0)), n; )
|
|
3164
|
+
try {
|
|
3165
|
+
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)
|
|
3166
|
+
return o;
|
|
3167
|
+
switch (s = 0, o && (a = [a[0] & 2, o.value]), a[0]) {
|
|
3168
|
+
case 0:
|
|
3169
|
+
case 1:
|
|
3170
|
+
o = a;
|
|
3171
|
+
break;
|
|
3172
|
+
case 4:
|
|
3173
|
+
return n.label++, { value: a[1], done: !1 };
|
|
3174
|
+
case 5:
|
|
3175
|
+
n.label++, s = a[1], a = [0];
|
|
3176
|
+
continue;
|
|
3177
|
+
case 7:
|
|
3178
|
+
a = n.ops.pop(), n.trys.pop();
|
|
3179
|
+
continue;
|
|
3180
|
+
default:
|
|
3181
|
+
if (o = n.trys, !(o = o.length > 0 && o[o.length - 1]) && (a[0] === 6 || a[0] === 2)) {
|
|
3182
|
+
n = 0;
|
|
3183
|
+
continue;
|
|
3184
|
+
}
|
|
3185
|
+
if (a[0] === 3 && (!o || a[1] > o[0] && a[1] < o[3])) {
|
|
3186
|
+
n.label = a[1];
|
|
3187
|
+
break;
|
|
3188
|
+
}
|
|
3189
|
+
if (a[0] === 6 && n.label < o[1]) {
|
|
3190
|
+
n.label = o[1], o = a;
|
|
3191
|
+
break;
|
|
3192
|
+
}
|
|
3193
|
+
if (o && n.label < o[2]) {
|
|
3194
|
+
n.label = o[2], n.ops.push(a);
|
|
3195
|
+
break;
|
|
3196
|
+
}
|
|
3197
|
+
o[2] && n.ops.pop(), n.trys.pop();
|
|
3198
|
+
continue;
|
|
3199
|
+
}
|
|
3200
|
+
a = e.call(t, n);
|
|
3201
|
+
} catch (u) {
|
|
3202
|
+
a = [6, u], s = 0;
|
|
3203
|
+
} finally {
|
|
3204
|
+
r = o = 0;
|
|
3205
|
+
}
|
|
3206
|
+
if (a[0] & 5)
|
|
3207
|
+
throw a[1];
|
|
3208
|
+
return { value: a[0] ? a[1] : void 0, done: !0 };
|
|
3209
|
+
}
|
|
3210
|
+
}
|
|
3211
|
+
function Es(t) {
|
|
3212
|
+
var e = typeof Symbol == "function" && Symbol.iterator, n = e && t[e], r = 0;
|
|
3213
|
+
if (n)
|
|
3214
|
+
return n.call(t);
|
|
3215
|
+
if (t && typeof t.length == "number")
|
|
3216
|
+
return {
|
|
3217
|
+
next: function() {
|
|
3218
|
+
return t && r >= t.length && (t = void 0), { value: t && t[r++], done: !t };
|
|
3219
|
+
}
|
|
3220
|
+
};
|
|
3221
|
+
throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
3222
|
+
}
|
|
3110
3223
|
export {
|
|
3111
|
-
|
|
3112
|
-
|
|
3224
|
+
ys as A,
|
|
3225
|
+
ws as B,
|
|
3113
3226
|
$ as C,
|
|
3114
|
-
|
|
3227
|
+
Es as D,
|
|
3115
3228
|
Le as E,
|
|
3116
3229
|
x as F,
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3230
|
+
gs as G,
|
|
3231
|
+
bs as H,
|
|
3232
|
+
ds as I,
|
|
3233
|
+
fs as J,
|
|
3234
|
+
ps as K,
|
|
3235
|
+
h as L,
|
|
3236
|
+
Rn as S,
|
|
3120
3237
|
G as _,
|
|
3121
3238
|
is as a,
|
|
3122
3239
|
os as b,
|
|
3123
|
-
|
|
3240
|
+
P as c,
|
|
3124
3241
|
us as d,
|
|
3125
3242
|
In as e,
|
|
3126
3243
|
pt as f,
|
|
3127
3244
|
rs as g,
|
|
3128
3245
|
Dn as h,
|
|
3129
3246
|
ss as i,
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3247
|
+
_s as j,
|
|
3248
|
+
Ue as k,
|
|
3249
|
+
ie as l,
|
|
3250
|
+
xt as m,
|
|
3251
|
+
lt as n,
|
|
3252
|
+
as as o,
|
|
3253
|
+
cs as p,
|
|
3137
3254
|
ls as q,
|
|
3138
3255
|
L as r,
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3256
|
+
hs as s,
|
|
3257
|
+
An as t,
|
|
3258
|
+
ms as u,
|
|
3259
|
+
Zr as v,
|
|
3260
|
+
Qr as w,
|
|
3261
|
+
es as x,
|
|
3262
|
+
ns as y,
|
|
3263
|
+
ts as z
|
|
3147
3264
|
};
|