reactfire 4.1.1 → 4.2.2
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/SuspenseSubject.d.ts +21 -21
- package/dist/auth.d.ts +104 -104
- package/dist/database.d.ts +23 -23
- package/dist/firebaseApp.d.ts +14 -14
- package/dist/firestore.d.ts +35 -35
- package/dist/functions.d.ts +12 -0
- package/dist/index.d.ts +36 -35
- package/dist/index.js +2337 -5
- package/dist/index.js.map +1 -0
- package/dist/index.umd.cjs +122 -0
- package/dist/index.umd.cjs.map +1 -0
- package/dist/performance.d.ts +7 -7
- package/dist/remote-config.d.ts +30 -30
- package/dist/sdk.d.ts +70 -55
- package/dist/storage.d.ts +26 -26
- package/dist/useObservable.d.ts +41 -41
- package/package.json +54 -53
- package/src/auth.tsx +6 -6
- package/src/firebaseApp.tsx +2 -2
- package/src/functions.tsx +26 -0
- package/src/index.ts +1 -0
- package/src/sdk.tsx +14 -9
- package/src/storage.tsx +2 -24
- package/dist/reactfire.cjs.development.js +0 -2093
- package/dist/reactfire.cjs.development.js.map +0 -1
- package/dist/reactfire.cjs.production.min.js +0 -2
- package/dist/reactfire.cjs.production.min.js.map +0 -1
- package/dist/reactfire.esm.js +0 -2029
- package/dist/reactfire.esm.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,8 +1,2340 @@
|
|
|
1
|
+
import * as f from "react";
|
|
2
|
+
import { onIdTokenChanged as Ft } from "firebase/auth";
|
|
3
|
+
import { onChildAdded as Pt, onChildRemoved as $t, onChildChanged as Tt, onChildMoved as Dt, onValue as Rt, off as jt, get as Ut } from "firebase/database";
|
|
4
|
+
import { getApps as Vt, registerVersion as Ne, initializeApp as Mt } from "firebase/app";
|
|
5
|
+
import { onSnapshot as Lt, queryEqual as Nt } from "firebase/firestore";
|
|
6
|
+
import { httpsCallable as Wt } from "firebase/functions";
|
|
7
|
+
import { getDownloadURL as qt, ref as Qt } from "firebase/storage";
|
|
8
|
+
import { ensureInitialized as Kt, getValue as Ht, getString as Yt, getNumber as Gt, getBoolean as Jt, getAll as zt } from "firebase/remote-config";
|
|
9
|
+
var ce = function(e, t) {
|
|
10
|
+
return ce = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) {
|
|
11
|
+
n.__proto__ = r;
|
|
12
|
+
} || function(n, r) {
|
|
13
|
+
for (var i in r)
|
|
14
|
+
Object.prototype.hasOwnProperty.call(r, i) && (n[i] = r[i]);
|
|
15
|
+
}, ce(e, t);
|
|
16
|
+
};
|
|
17
|
+
function x(e, t) {
|
|
18
|
+
if (typeof t != "function" && t !== null)
|
|
19
|
+
throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
|
|
20
|
+
ce(e, t);
|
|
21
|
+
function n() {
|
|
22
|
+
this.constructor = e;
|
|
23
|
+
}
|
|
24
|
+
e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n());
|
|
25
|
+
}
|
|
26
|
+
function Zt(e, t) {
|
|
27
|
+
var n = {};
|
|
28
|
+
for (var r in e)
|
|
29
|
+
Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
30
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
31
|
+
for (var i = 0, r = Object.getOwnPropertySymbols(e); i < r.length; i++)
|
|
32
|
+
t.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[i]) && (n[r[i]] = e[r[i]]);
|
|
33
|
+
return n;
|
|
34
|
+
}
|
|
35
|
+
function pe(e, t, n, r) {
|
|
36
|
+
function i(o) {
|
|
37
|
+
return o instanceof n ? o : new n(function(u) {
|
|
38
|
+
u(o);
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
return new (n || (n = Promise))(function(o, u) {
|
|
42
|
+
function a(l) {
|
|
43
|
+
try {
|
|
44
|
+
c(r.next(l));
|
|
45
|
+
} catch (d) {
|
|
46
|
+
u(d);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
function s(l) {
|
|
50
|
+
try {
|
|
51
|
+
c(r.throw(l));
|
|
52
|
+
} catch (d) {
|
|
53
|
+
u(d);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
function c(l) {
|
|
57
|
+
l.done ? o(l.value) : i(l.value).then(a, s);
|
|
58
|
+
}
|
|
59
|
+
c((r = r.apply(e, t || [])).next());
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
function He(e, t) {
|
|
63
|
+
var n = { label: 0, sent: function() {
|
|
64
|
+
if (o[0] & 1)
|
|
65
|
+
throw o[1];
|
|
66
|
+
return o[1];
|
|
67
|
+
}, trys: [], ops: [] }, r, i, o, u;
|
|
68
|
+
return u = { next: a(0), throw: a(1), return: a(2) }, typeof Symbol == "function" && (u[Symbol.iterator] = function() {
|
|
69
|
+
return this;
|
|
70
|
+
}), u;
|
|
71
|
+
function a(c) {
|
|
72
|
+
return function(l) {
|
|
73
|
+
return s([c, l]);
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
function s(c) {
|
|
77
|
+
if (r)
|
|
78
|
+
throw new TypeError("Generator is already executing.");
|
|
79
|
+
for (; n; )
|
|
80
|
+
try {
|
|
81
|
+
if (r = 1, i && (o = c[0] & 2 ? i.return : c[0] ? i.throw || ((o = i.return) && o.call(i), 0) : i.next) && !(o = o.call(i, c[1])).done)
|
|
82
|
+
return o;
|
|
83
|
+
switch (i = 0, o && (c = [c[0] & 2, o.value]), c[0]) {
|
|
84
|
+
case 0:
|
|
85
|
+
case 1:
|
|
86
|
+
o = c;
|
|
87
|
+
break;
|
|
88
|
+
case 4:
|
|
89
|
+
return n.label++, { value: c[1], done: !1 };
|
|
90
|
+
case 5:
|
|
91
|
+
n.label++, i = c[1], c = [0];
|
|
92
|
+
continue;
|
|
93
|
+
case 7:
|
|
94
|
+
c = n.ops.pop(), n.trys.pop();
|
|
95
|
+
continue;
|
|
96
|
+
default:
|
|
97
|
+
if (o = n.trys, !(o = o.length > 0 && o[o.length - 1]) && (c[0] === 6 || c[0] === 2)) {
|
|
98
|
+
n = 0;
|
|
99
|
+
continue;
|
|
100
|
+
}
|
|
101
|
+
if (c[0] === 3 && (!o || c[1] > o[0] && c[1] < o[3])) {
|
|
102
|
+
n.label = c[1];
|
|
103
|
+
break;
|
|
104
|
+
}
|
|
105
|
+
if (c[0] === 6 && n.label < o[1]) {
|
|
106
|
+
n.label = o[1], o = c;
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
if (o && n.label < o[2]) {
|
|
110
|
+
n.label = o[2], n.ops.push(c);
|
|
111
|
+
break;
|
|
112
|
+
}
|
|
113
|
+
o[2] && n.ops.pop(), n.trys.pop();
|
|
114
|
+
continue;
|
|
115
|
+
}
|
|
116
|
+
c = t.call(e, n);
|
|
117
|
+
} catch (l) {
|
|
118
|
+
c = [6, l], i = 0;
|
|
119
|
+
} finally {
|
|
120
|
+
r = o = 0;
|
|
121
|
+
}
|
|
122
|
+
if (c[0] & 5)
|
|
123
|
+
throw c[1];
|
|
124
|
+
return { value: c[0] ? c[1] : void 0, done: !0 };
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
function V(e) {
|
|
128
|
+
var t = typeof Symbol == "function" && Symbol.iterator, n = t && e[t], r = 0;
|
|
129
|
+
if (n)
|
|
130
|
+
return n.call(e);
|
|
131
|
+
if (e && typeof e.length == "number")
|
|
132
|
+
return {
|
|
133
|
+
next: function() {
|
|
134
|
+
return e && r >= e.length && (e = void 0), { value: e && e[r++], done: !e };
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
138
|
+
}
|
|
139
|
+
function D(e, t) {
|
|
140
|
+
var n = typeof Symbol == "function" && e[Symbol.iterator];
|
|
141
|
+
if (!n)
|
|
142
|
+
return e;
|
|
143
|
+
var r = n.call(e), i, o = [], u;
|
|
144
|
+
try {
|
|
145
|
+
for (; (t === void 0 || t-- > 0) && !(i = r.next()).done; )
|
|
146
|
+
o.push(i.value);
|
|
147
|
+
} catch (a) {
|
|
148
|
+
u = { error: a };
|
|
149
|
+
} finally {
|
|
150
|
+
try {
|
|
151
|
+
i && !i.done && (n = r.return) && n.call(r);
|
|
152
|
+
} finally {
|
|
153
|
+
if (u)
|
|
154
|
+
throw u.error;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
return o;
|
|
158
|
+
}
|
|
159
|
+
function R(e, t, n) {
|
|
160
|
+
if (n || arguments.length === 2)
|
|
161
|
+
for (var r = 0, i = t.length, o; r < i; r++)
|
|
162
|
+
(o || !(r in t)) && (o || (o = Array.prototype.slice.call(t, 0, r)), o[r] = t[r]);
|
|
163
|
+
return e.concat(o || Array.prototype.slice.call(t));
|
|
164
|
+
}
|
|
165
|
+
function U(e) {
|
|
166
|
+
return this instanceof U ? (this.v = e, this) : new U(e);
|
|
167
|
+
}
|
|
168
|
+
function Bt(e, t, n) {
|
|
169
|
+
if (!Symbol.asyncIterator)
|
|
170
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
171
|
+
var r = n.apply(e, t || []), i, o = [];
|
|
172
|
+
return i = {}, u("next"), u("throw"), u("return"), i[Symbol.asyncIterator] = function() {
|
|
173
|
+
return this;
|
|
174
|
+
}, i;
|
|
175
|
+
function u(v) {
|
|
176
|
+
r[v] && (i[v] = function(p) {
|
|
177
|
+
return new Promise(function(S, h) {
|
|
178
|
+
o.push([v, p, S, h]) > 1 || a(v, p);
|
|
179
|
+
});
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
function a(v, p) {
|
|
183
|
+
try {
|
|
184
|
+
s(r[v](p));
|
|
185
|
+
} catch (S) {
|
|
186
|
+
d(o[0][3], S);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
function s(v) {
|
|
190
|
+
v.value instanceof U ? Promise.resolve(v.value.v).then(c, l) : d(o[0][2], v);
|
|
191
|
+
}
|
|
192
|
+
function c(v) {
|
|
193
|
+
a("next", v);
|
|
194
|
+
}
|
|
195
|
+
function l(v) {
|
|
196
|
+
a("throw", v);
|
|
197
|
+
}
|
|
198
|
+
function d(v, p) {
|
|
199
|
+
v(p), o.shift(), o.length && a(o[0][0], o[0][1]);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
function Xt(e) {
|
|
203
|
+
if (!Symbol.asyncIterator)
|
|
204
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
205
|
+
var t = e[Symbol.asyncIterator], n;
|
|
206
|
+
return t ? t.call(e) : (e = typeof V == "function" ? V(e) : e[Symbol.iterator](), n = {}, r("next"), r("throw"), r("return"), n[Symbol.asyncIterator] = function() {
|
|
207
|
+
return this;
|
|
208
|
+
}, n);
|
|
209
|
+
function r(o) {
|
|
210
|
+
n[o] = e[o] && function(u) {
|
|
211
|
+
return new Promise(function(a, s) {
|
|
212
|
+
u = e[o](u), i(a, s, u.done, u.value);
|
|
213
|
+
});
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
function i(o, u, a, s) {
|
|
217
|
+
Promise.resolve(s).then(function(c) {
|
|
218
|
+
o({ value: c, done: a });
|
|
219
|
+
}, u);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
function b(e) {
|
|
223
|
+
return typeof e == "function";
|
|
224
|
+
}
|
|
225
|
+
function me(e) {
|
|
226
|
+
var t = function(r) {
|
|
227
|
+
Error.call(r), r.stack = new Error().stack;
|
|
228
|
+
}, n = e(t);
|
|
229
|
+
return n.prototype = Object.create(Error.prototype), n.prototype.constructor = n, n;
|
|
230
|
+
}
|
|
231
|
+
var oe = me(function(e) {
|
|
232
|
+
return function(n) {
|
|
233
|
+
e(this), this.message = n ? n.length + ` errors occurred during unsubscription:
|
|
234
|
+
` + n.map(function(r, i) {
|
|
235
|
+
return i + 1 + ") " + r.toString();
|
|
236
|
+
}).join(`
|
|
237
|
+
`) : "", this.name = "UnsubscriptionError", this.errors = n;
|
|
238
|
+
};
|
|
239
|
+
});
|
|
240
|
+
function B(e, t) {
|
|
241
|
+
if (e) {
|
|
242
|
+
var n = e.indexOf(t);
|
|
243
|
+
0 <= n && e.splice(n, 1);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
var N = function() {
|
|
247
|
+
function e(t) {
|
|
248
|
+
this.initialTeardown = t, this.closed = !1, this._parentage = null, this._finalizers = null;
|
|
249
|
+
}
|
|
250
|
+
return e.prototype.unsubscribe = function() {
|
|
251
|
+
var t, n, r, i, o;
|
|
252
|
+
if (!this.closed) {
|
|
253
|
+
this.closed = !0;
|
|
254
|
+
var u = this._parentage;
|
|
255
|
+
if (u)
|
|
256
|
+
if (this._parentage = null, Array.isArray(u))
|
|
257
|
+
try {
|
|
258
|
+
for (var a = V(u), s = a.next(); !s.done; s = a.next()) {
|
|
259
|
+
var c = s.value;
|
|
260
|
+
c.remove(this);
|
|
261
|
+
}
|
|
262
|
+
} catch (h) {
|
|
263
|
+
t = { error: h };
|
|
264
|
+
} finally {
|
|
265
|
+
try {
|
|
266
|
+
s && !s.done && (n = a.return) && n.call(a);
|
|
267
|
+
} finally {
|
|
268
|
+
if (t)
|
|
269
|
+
throw t.error;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
else
|
|
273
|
+
u.remove(this);
|
|
274
|
+
var l = this.initialTeardown;
|
|
275
|
+
if (b(l))
|
|
276
|
+
try {
|
|
277
|
+
l();
|
|
278
|
+
} catch (h) {
|
|
279
|
+
o = h instanceof oe ? h.errors : [h];
|
|
280
|
+
}
|
|
281
|
+
var d = this._finalizers;
|
|
282
|
+
if (d) {
|
|
283
|
+
this._finalizers = null;
|
|
284
|
+
try {
|
|
285
|
+
for (var v = V(d), p = v.next(); !p.done; p = v.next()) {
|
|
286
|
+
var S = p.value;
|
|
287
|
+
try {
|
|
288
|
+
We(S);
|
|
289
|
+
} catch (h) {
|
|
290
|
+
o = o != null ? o : [], h instanceof oe ? o = R(R([], D(o)), D(h.errors)) : o.push(h);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
} catch (h) {
|
|
294
|
+
r = { error: h };
|
|
295
|
+
} finally {
|
|
296
|
+
try {
|
|
297
|
+
p && !p.done && (i = v.return) && i.call(v);
|
|
298
|
+
} finally {
|
|
299
|
+
if (r)
|
|
300
|
+
throw r.error;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
if (o)
|
|
305
|
+
throw new oe(o);
|
|
306
|
+
}
|
|
307
|
+
}, e.prototype.add = function(t) {
|
|
308
|
+
var n;
|
|
309
|
+
if (t && t !== this)
|
|
310
|
+
if (this.closed)
|
|
311
|
+
We(t);
|
|
312
|
+
else {
|
|
313
|
+
if (t instanceof e) {
|
|
314
|
+
if (t.closed || t._hasParent(this))
|
|
315
|
+
return;
|
|
316
|
+
t._addParent(this);
|
|
317
|
+
}
|
|
318
|
+
(this._finalizers = (n = this._finalizers) !== null && n !== void 0 ? n : []).push(t);
|
|
319
|
+
}
|
|
320
|
+
}, e.prototype._hasParent = function(t) {
|
|
321
|
+
var n = this._parentage;
|
|
322
|
+
return n === t || Array.isArray(n) && n.includes(t);
|
|
323
|
+
}, e.prototype._addParent = function(t) {
|
|
324
|
+
var n = this._parentage;
|
|
325
|
+
this._parentage = Array.isArray(n) ? (n.push(t), n) : n ? [n, t] : t;
|
|
326
|
+
}, e.prototype._removeParent = function(t) {
|
|
327
|
+
var n = this._parentage;
|
|
328
|
+
n === t ? this._parentage = null : Array.isArray(n) && B(n, t);
|
|
329
|
+
}, e.prototype.remove = function(t) {
|
|
330
|
+
var n = this._finalizers;
|
|
331
|
+
n && B(n, t), t instanceof e && t._removeParent(this);
|
|
332
|
+
}, e.EMPTY = function() {
|
|
333
|
+
var t = new e();
|
|
334
|
+
return t.closed = !0, t;
|
|
335
|
+
}(), e;
|
|
336
|
+
}(), Ye = N.EMPTY;
|
|
337
|
+
function Ge(e) {
|
|
338
|
+
return e instanceof N || e && "closed" in e && b(e.remove) && b(e.add) && b(e.unsubscribe);
|
|
339
|
+
}
|
|
340
|
+
function We(e) {
|
|
341
|
+
b(e) ? e() : e.unsubscribe();
|
|
342
|
+
}
|
|
343
|
+
var be = {
|
|
344
|
+
onUnhandledError: null,
|
|
345
|
+
onStoppedNotification: null,
|
|
346
|
+
Promise: void 0,
|
|
347
|
+
useDeprecatedSynchronousErrorHandling: !1,
|
|
348
|
+
useDeprecatedNextContext: !1
|
|
349
|
+
}, le = {
|
|
350
|
+
setTimeout: function(e, t) {
|
|
351
|
+
for (var n = [], r = 2; r < arguments.length; r++)
|
|
352
|
+
n[r - 2] = arguments[r];
|
|
353
|
+
var i = le.delegate;
|
|
354
|
+
return i != null && i.setTimeout ? i.setTimeout.apply(i, R([e, t], D(n))) : setTimeout.apply(void 0, R([e, t], D(n)));
|
|
355
|
+
},
|
|
356
|
+
clearTimeout: function(e) {
|
|
357
|
+
var t = le.delegate;
|
|
358
|
+
return ((t == null ? void 0 : t.clearTimeout) || clearTimeout)(e);
|
|
359
|
+
},
|
|
360
|
+
delegate: void 0
|
|
361
|
+
};
|
|
362
|
+
function Je(e) {
|
|
363
|
+
le.setTimeout(function() {
|
|
364
|
+
throw e;
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
function fe() {
|
|
368
|
+
}
|
|
369
|
+
var G = null;
|
|
370
|
+
function z(e) {
|
|
371
|
+
if (be.useDeprecatedSynchronousErrorHandling) {
|
|
372
|
+
var t = !G;
|
|
373
|
+
if (t && (G = { errorThrown: !1, error: null }), e(), t) {
|
|
374
|
+
var n = G, r = n.errorThrown, i = n.error;
|
|
375
|
+
if (G = null, r)
|
|
376
|
+
throw i;
|
|
377
|
+
}
|
|
378
|
+
} else
|
|
379
|
+
e();
|
|
380
|
+
}
|
|
381
|
+
var ye = function(e) {
|
|
382
|
+
x(t, e);
|
|
383
|
+
function t(n) {
|
|
384
|
+
var r = e.call(this) || this;
|
|
385
|
+
return r.isStopped = !1, n ? (r.destination = n, Ge(n) && n.add(r)) : r.destination = rn, r;
|
|
386
|
+
}
|
|
387
|
+
return t.create = function(n, r, i) {
|
|
388
|
+
return new L(n, r, i);
|
|
389
|
+
}, t.prototype.next = function(n) {
|
|
390
|
+
this.isStopped || this._next(n);
|
|
391
|
+
}, t.prototype.error = function(n) {
|
|
392
|
+
this.isStopped || (this.isStopped = !0, this._error(n));
|
|
393
|
+
}, t.prototype.complete = function() {
|
|
394
|
+
this.isStopped || (this.isStopped = !0, this._complete());
|
|
395
|
+
}, t.prototype.unsubscribe = function() {
|
|
396
|
+
this.closed || (this.isStopped = !0, e.prototype.unsubscribe.call(this), this.destination = null);
|
|
397
|
+
}, t.prototype._next = function(n) {
|
|
398
|
+
this.destination.next(n);
|
|
399
|
+
}, t.prototype._error = function(n) {
|
|
400
|
+
try {
|
|
401
|
+
this.destination.error(n);
|
|
402
|
+
} finally {
|
|
403
|
+
this.unsubscribe();
|
|
404
|
+
}
|
|
405
|
+
}, t.prototype._complete = function() {
|
|
406
|
+
try {
|
|
407
|
+
this.destination.complete();
|
|
408
|
+
} finally {
|
|
409
|
+
this.unsubscribe();
|
|
410
|
+
}
|
|
411
|
+
}, t;
|
|
412
|
+
}(N), en = Function.prototype.bind;
|
|
413
|
+
function ue(e, t) {
|
|
414
|
+
return en.call(e, t);
|
|
415
|
+
}
|
|
416
|
+
var tn = function() {
|
|
417
|
+
function e(t) {
|
|
418
|
+
this.partialObserver = t;
|
|
419
|
+
}
|
|
420
|
+
return e.prototype.next = function(t) {
|
|
421
|
+
var n = this.partialObserver;
|
|
422
|
+
if (n.next)
|
|
423
|
+
try {
|
|
424
|
+
n.next(t);
|
|
425
|
+
} catch (r) {
|
|
426
|
+
J(r);
|
|
427
|
+
}
|
|
428
|
+
}, e.prototype.error = function(t) {
|
|
429
|
+
var n = this.partialObserver;
|
|
430
|
+
if (n.error)
|
|
431
|
+
try {
|
|
432
|
+
n.error(t);
|
|
433
|
+
} catch (r) {
|
|
434
|
+
J(r);
|
|
435
|
+
}
|
|
436
|
+
else
|
|
437
|
+
J(t);
|
|
438
|
+
}, e.prototype.complete = function() {
|
|
439
|
+
var t = this.partialObserver;
|
|
440
|
+
if (t.complete)
|
|
441
|
+
try {
|
|
442
|
+
t.complete();
|
|
443
|
+
} catch (n) {
|
|
444
|
+
J(n);
|
|
445
|
+
}
|
|
446
|
+
}, e;
|
|
447
|
+
}(), L = function(e) {
|
|
448
|
+
x(t, e);
|
|
449
|
+
function t(n, r, i) {
|
|
450
|
+
var o = e.call(this) || this, u;
|
|
451
|
+
if (b(n) || !n)
|
|
452
|
+
u = {
|
|
453
|
+
next: n != null ? n : void 0,
|
|
454
|
+
error: r != null ? r : void 0,
|
|
455
|
+
complete: i != null ? i : void 0
|
|
456
|
+
};
|
|
457
|
+
else {
|
|
458
|
+
var a;
|
|
459
|
+
o && be.useDeprecatedNextContext ? (a = Object.create(n), a.unsubscribe = function() {
|
|
460
|
+
return o.unsubscribe();
|
|
461
|
+
}, u = {
|
|
462
|
+
next: n.next && ue(n.next, a),
|
|
463
|
+
error: n.error && ue(n.error, a),
|
|
464
|
+
complete: n.complete && ue(n.complete, a)
|
|
465
|
+
}) : u = n;
|
|
466
|
+
}
|
|
467
|
+
return o.destination = new tn(u), o;
|
|
468
|
+
}
|
|
469
|
+
return t;
|
|
470
|
+
}(ye);
|
|
471
|
+
function J(e) {
|
|
472
|
+
Je(e);
|
|
473
|
+
}
|
|
474
|
+
function nn(e) {
|
|
475
|
+
throw e;
|
|
476
|
+
}
|
|
477
|
+
var rn = {
|
|
478
|
+
closed: !0,
|
|
479
|
+
next: fe,
|
|
480
|
+
error: nn,
|
|
481
|
+
complete: fe
|
|
482
|
+
}, ge = function() {
|
|
483
|
+
return typeof Symbol == "function" && Symbol.observable || "@@observable";
|
|
484
|
+
}();
|
|
485
|
+
function W(e) {
|
|
486
|
+
return e;
|
|
487
|
+
}
|
|
488
|
+
function on(e) {
|
|
489
|
+
return e.length === 0 ? W : e.length === 1 ? e[0] : function(n) {
|
|
490
|
+
return e.reduce(function(r, i) {
|
|
491
|
+
return i(r);
|
|
492
|
+
}, n);
|
|
493
|
+
};
|
|
494
|
+
}
|
|
495
|
+
var y = function() {
|
|
496
|
+
function e(t) {
|
|
497
|
+
t && (this._subscribe = t);
|
|
498
|
+
}
|
|
499
|
+
return e.prototype.lift = function(t) {
|
|
500
|
+
var n = new e();
|
|
501
|
+
return n.source = this, n.operator = t, n;
|
|
502
|
+
}, e.prototype.subscribe = function(t, n, r) {
|
|
503
|
+
var i = this, o = an(t) ? t : new L(t, n, r);
|
|
504
|
+
return z(function() {
|
|
505
|
+
var u = i, a = u.operator, s = u.source;
|
|
506
|
+
o.add(a ? a.call(o, s) : s ? i._subscribe(o) : i._trySubscribe(o));
|
|
507
|
+
}), o;
|
|
508
|
+
}, e.prototype._trySubscribe = function(t) {
|
|
509
|
+
try {
|
|
510
|
+
return this._subscribe(t);
|
|
511
|
+
} catch (n) {
|
|
512
|
+
t.error(n);
|
|
513
|
+
}
|
|
514
|
+
}, e.prototype.forEach = function(t, n) {
|
|
515
|
+
var r = this;
|
|
516
|
+
return n = qe(n), new n(function(i, o) {
|
|
517
|
+
var u = new L({
|
|
518
|
+
next: function(a) {
|
|
519
|
+
try {
|
|
520
|
+
t(a);
|
|
521
|
+
} catch (s) {
|
|
522
|
+
o(s), u.unsubscribe();
|
|
523
|
+
}
|
|
524
|
+
},
|
|
525
|
+
error: o,
|
|
526
|
+
complete: i
|
|
527
|
+
});
|
|
528
|
+
r.subscribe(u);
|
|
529
|
+
});
|
|
530
|
+
}, e.prototype._subscribe = function(t) {
|
|
531
|
+
var n;
|
|
532
|
+
return (n = this.source) === null || n === void 0 ? void 0 : n.subscribe(t);
|
|
533
|
+
}, e.prototype[ge] = function() {
|
|
534
|
+
return this;
|
|
535
|
+
}, e.prototype.pipe = function() {
|
|
536
|
+
for (var t = [], n = 0; n < arguments.length; n++)
|
|
537
|
+
t[n] = arguments[n];
|
|
538
|
+
return on(t)(this);
|
|
539
|
+
}, e.prototype.toPromise = function(t) {
|
|
540
|
+
var n = this;
|
|
541
|
+
return t = qe(t), new t(function(r, i) {
|
|
542
|
+
var o;
|
|
543
|
+
n.subscribe(function(u) {
|
|
544
|
+
return o = u;
|
|
545
|
+
}, function(u) {
|
|
546
|
+
return i(u);
|
|
547
|
+
}, function() {
|
|
548
|
+
return r(o);
|
|
549
|
+
});
|
|
550
|
+
});
|
|
551
|
+
}, e.create = function(t) {
|
|
552
|
+
return new e(t);
|
|
553
|
+
}, e;
|
|
554
|
+
}();
|
|
555
|
+
function qe(e) {
|
|
556
|
+
var t;
|
|
557
|
+
return (t = e != null ? e : be.Promise) !== null && t !== void 0 ? t : Promise;
|
|
558
|
+
}
|
|
559
|
+
function un(e) {
|
|
560
|
+
return e && b(e.next) && b(e.error) && b(e.complete);
|
|
561
|
+
}
|
|
562
|
+
function an(e) {
|
|
563
|
+
return e && e instanceof ye || un(e) && Ge(e);
|
|
564
|
+
}
|
|
565
|
+
function sn(e) {
|
|
566
|
+
return b(e == null ? void 0 : e.lift);
|
|
567
|
+
}
|
|
568
|
+
function _(e) {
|
|
569
|
+
return function(t) {
|
|
570
|
+
if (sn(t))
|
|
571
|
+
return t.lift(function(n) {
|
|
572
|
+
try {
|
|
573
|
+
return e(n, this);
|
|
574
|
+
} catch (r) {
|
|
575
|
+
this.error(r);
|
|
576
|
+
}
|
|
577
|
+
});
|
|
578
|
+
throw new TypeError("Unable to lift unknown Observable type");
|
|
579
|
+
};
|
|
580
|
+
}
|
|
581
|
+
function w(e, t, n, r, i) {
|
|
582
|
+
return new cn(e, t, n, r, i);
|
|
583
|
+
}
|
|
584
|
+
var cn = function(e) {
|
|
585
|
+
x(t, e);
|
|
586
|
+
function t(n, r, i, o, u, a) {
|
|
587
|
+
var s = e.call(this, n) || this;
|
|
588
|
+
return s.onFinalize = u, s.shouldUnsubscribe = a, s._next = r ? function(c) {
|
|
589
|
+
try {
|
|
590
|
+
r(c);
|
|
591
|
+
} catch (l) {
|
|
592
|
+
n.error(l);
|
|
593
|
+
}
|
|
594
|
+
} : e.prototype._next, s._error = o ? function(c) {
|
|
595
|
+
try {
|
|
596
|
+
o(c);
|
|
597
|
+
} catch (l) {
|
|
598
|
+
n.error(l);
|
|
599
|
+
} finally {
|
|
600
|
+
this.unsubscribe();
|
|
601
|
+
}
|
|
602
|
+
} : e.prototype._error, s._complete = i ? function() {
|
|
603
|
+
try {
|
|
604
|
+
i();
|
|
605
|
+
} catch (c) {
|
|
606
|
+
n.error(c);
|
|
607
|
+
} finally {
|
|
608
|
+
this.unsubscribe();
|
|
609
|
+
}
|
|
610
|
+
} : e.prototype._complete, s;
|
|
611
|
+
}
|
|
612
|
+
return t.prototype.unsubscribe = function() {
|
|
613
|
+
var n;
|
|
614
|
+
if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {
|
|
615
|
+
var r = this.closed;
|
|
616
|
+
e.prototype.unsubscribe.call(this), !r && ((n = this.onFinalize) === null || n === void 0 || n.call(this));
|
|
617
|
+
}
|
|
618
|
+
}, t;
|
|
619
|
+
}(ye), ln = me(function(e) {
|
|
620
|
+
return function() {
|
|
621
|
+
e(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
|
|
622
|
+
};
|
|
623
|
+
}), ne = function(e) {
|
|
624
|
+
x(t, e);
|
|
625
|
+
function t() {
|
|
626
|
+
var n = e.call(this) || this;
|
|
627
|
+
return n.closed = !1, n.currentObservers = null, n.observers = [], n.isStopped = !1, n.hasError = !1, n.thrownError = null, n;
|
|
628
|
+
}
|
|
629
|
+
return t.prototype.lift = function(n) {
|
|
630
|
+
var r = new Qe(this, this);
|
|
631
|
+
return r.operator = n, r;
|
|
632
|
+
}, t.prototype._throwIfClosed = function() {
|
|
633
|
+
if (this.closed)
|
|
634
|
+
throw new ln();
|
|
635
|
+
}, t.prototype.next = function(n) {
|
|
636
|
+
var r = this;
|
|
637
|
+
z(function() {
|
|
638
|
+
var i, o;
|
|
639
|
+
if (r._throwIfClosed(), !r.isStopped) {
|
|
640
|
+
r.currentObservers || (r.currentObservers = Array.from(r.observers));
|
|
641
|
+
try {
|
|
642
|
+
for (var u = V(r.currentObservers), a = u.next(); !a.done; a = u.next()) {
|
|
643
|
+
var s = a.value;
|
|
644
|
+
s.next(n);
|
|
645
|
+
}
|
|
646
|
+
} catch (c) {
|
|
647
|
+
i = { error: c };
|
|
648
|
+
} finally {
|
|
649
|
+
try {
|
|
650
|
+
a && !a.done && (o = u.return) && o.call(u);
|
|
651
|
+
} finally {
|
|
652
|
+
if (i)
|
|
653
|
+
throw i.error;
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
});
|
|
658
|
+
}, t.prototype.error = function(n) {
|
|
659
|
+
var r = this;
|
|
660
|
+
z(function() {
|
|
661
|
+
if (r._throwIfClosed(), !r.isStopped) {
|
|
662
|
+
r.hasError = r.isStopped = !0, r.thrownError = n;
|
|
663
|
+
for (var i = r.observers; i.length; )
|
|
664
|
+
i.shift().error(n);
|
|
665
|
+
}
|
|
666
|
+
});
|
|
667
|
+
}, t.prototype.complete = function() {
|
|
668
|
+
var n = this;
|
|
669
|
+
z(function() {
|
|
670
|
+
if (n._throwIfClosed(), !n.isStopped) {
|
|
671
|
+
n.isStopped = !0;
|
|
672
|
+
for (var r = n.observers; r.length; )
|
|
673
|
+
r.shift().complete();
|
|
674
|
+
}
|
|
675
|
+
});
|
|
676
|
+
}, t.prototype.unsubscribe = function() {
|
|
677
|
+
this.isStopped = this.closed = !0, this.observers = this.currentObservers = null;
|
|
678
|
+
}, Object.defineProperty(t.prototype, "observed", {
|
|
679
|
+
get: function() {
|
|
680
|
+
var n;
|
|
681
|
+
return ((n = this.observers) === null || n === void 0 ? void 0 : n.length) > 0;
|
|
682
|
+
},
|
|
683
|
+
enumerable: !1,
|
|
684
|
+
configurable: !0
|
|
685
|
+
}), t.prototype._trySubscribe = function(n) {
|
|
686
|
+
return this._throwIfClosed(), e.prototype._trySubscribe.call(this, n);
|
|
687
|
+
}, t.prototype._subscribe = function(n) {
|
|
688
|
+
return this._throwIfClosed(), this._checkFinalizedStatuses(n), this._innerSubscribe(n);
|
|
689
|
+
}, t.prototype._innerSubscribe = function(n) {
|
|
690
|
+
var r = this, i = this, o = i.hasError, u = i.isStopped, a = i.observers;
|
|
691
|
+
return o || u ? Ye : (this.currentObservers = null, a.push(n), new N(function() {
|
|
692
|
+
r.currentObservers = null, B(a, n);
|
|
693
|
+
}));
|
|
694
|
+
}, t.prototype._checkFinalizedStatuses = function(n) {
|
|
695
|
+
var r = this, i = r.hasError, o = r.thrownError, u = r.isStopped;
|
|
696
|
+
i ? n.error(o) : u && n.complete();
|
|
697
|
+
}, t.prototype.asObservable = function() {
|
|
698
|
+
var n = new y();
|
|
699
|
+
return n.source = this, n;
|
|
700
|
+
}, t.create = function(n, r) {
|
|
701
|
+
return new Qe(n, r);
|
|
702
|
+
}, t;
|
|
703
|
+
}(y), Qe = function(e) {
|
|
704
|
+
x(t, e);
|
|
705
|
+
function t(n, r) {
|
|
706
|
+
var i = e.call(this) || this;
|
|
707
|
+
return i.destination = n, i.source = r, i;
|
|
708
|
+
}
|
|
709
|
+
return t.prototype.next = function(n) {
|
|
710
|
+
var r, i;
|
|
711
|
+
(i = (r = this.destination) === null || r === void 0 ? void 0 : r.next) === null || i === void 0 || i.call(r, n);
|
|
712
|
+
}, t.prototype.error = function(n) {
|
|
713
|
+
var r, i;
|
|
714
|
+
(i = (r = this.destination) === null || r === void 0 ? void 0 : r.error) === null || i === void 0 || i.call(r, n);
|
|
715
|
+
}, t.prototype.complete = function() {
|
|
716
|
+
var n, r;
|
|
717
|
+
(r = (n = this.destination) === null || n === void 0 ? void 0 : n.complete) === null || r === void 0 || r.call(n);
|
|
718
|
+
}, t.prototype._subscribe = function(n) {
|
|
719
|
+
var r, i;
|
|
720
|
+
return (i = (r = this.source) === null || r === void 0 ? void 0 : r.subscribe(n)) !== null && i !== void 0 ? i : Ye;
|
|
721
|
+
}, t;
|
|
722
|
+
}(ne), we = {
|
|
723
|
+
now: function() {
|
|
724
|
+
return (we.delegate || Date).now();
|
|
725
|
+
},
|
|
726
|
+
delegate: void 0
|
|
727
|
+
}, fn = function(e) {
|
|
728
|
+
x(t, e);
|
|
729
|
+
function t(n, r, i) {
|
|
730
|
+
n === void 0 && (n = 1 / 0), r === void 0 && (r = 1 / 0), i === void 0 && (i = we);
|
|
731
|
+
var o = e.call(this) || this;
|
|
732
|
+
return o._bufferSize = n, o._windowTime = r, o._timestampProvider = i, o._buffer = [], o._infiniteTimeWindow = !0, o._infiniteTimeWindow = r === 1 / 0, o._bufferSize = Math.max(1, n), o._windowTime = Math.max(1, r), o;
|
|
733
|
+
}
|
|
734
|
+
return t.prototype.next = function(n) {
|
|
735
|
+
var r = this, i = r.isStopped, o = r._buffer, u = r._infiniteTimeWindow, a = r._timestampProvider, s = r._windowTime;
|
|
736
|
+
i || (o.push(n), !u && o.push(a.now() + s)), this._trimBuffer(), e.prototype.next.call(this, n);
|
|
737
|
+
}, t.prototype._subscribe = function(n) {
|
|
738
|
+
this._throwIfClosed(), this._trimBuffer();
|
|
739
|
+
for (var r = this._innerSubscribe(n), i = this, o = i._infiniteTimeWindow, u = i._buffer, a = u.slice(), s = 0; s < a.length && !n.closed; s += o ? 1 : 2)
|
|
740
|
+
n.next(a[s]);
|
|
741
|
+
return this._checkFinalizedStatuses(n), r;
|
|
742
|
+
}, t.prototype._trimBuffer = function() {
|
|
743
|
+
var n = this, r = n._bufferSize, i = n._timestampProvider, o = n._buffer, u = n._infiniteTimeWindow, a = (u ? 1 : 2) * r;
|
|
744
|
+
if (r < 1 / 0 && a < o.length && o.splice(0, o.length - a), !u) {
|
|
745
|
+
for (var s = i.now(), c = 0, l = 1; l < o.length && o[l] <= s; l += 2)
|
|
746
|
+
c = l;
|
|
747
|
+
c && o.splice(0, c + 1);
|
|
748
|
+
}
|
|
749
|
+
}, t;
|
|
750
|
+
}(ne), dn = function(e) {
|
|
751
|
+
x(t, e);
|
|
752
|
+
function t(n, r) {
|
|
753
|
+
return e.call(this) || this;
|
|
754
|
+
}
|
|
755
|
+
return t.prototype.schedule = function(n, r) {
|
|
756
|
+
return this;
|
|
757
|
+
}, t;
|
|
758
|
+
}(N), X = {
|
|
759
|
+
setInterval: function(e, t) {
|
|
760
|
+
for (var n = [], r = 2; r < arguments.length; r++)
|
|
761
|
+
n[r - 2] = arguments[r];
|
|
762
|
+
var i = X.delegate;
|
|
763
|
+
return i != null && i.setInterval ? i.setInterval.apply(i, R([e, t], D(n))) : setInterval.apply(void 0, R([e, t], D(n)));
|
|
764
|
+
},
|
|
765
|
+
clearInterval: function(e) {
|
|
766
|
+
var t = X.delegate;
|
|
767
|
+
return ((t == null ? void 0 : t.clearInterval) || clearInterval)(e);
|
|
768
|
+
},
|
|
769
|
+
delegate: void 0
|
|
770
|
+
}, vn = function(e) {
|
|
771
|
+
x(t, e);
|
|
772
|
+
function t(n, r) {
|
|
773
|
+
var i = e.call(this, n, r) || this;
|
|
774
|
+
return i.scheduler = n, i.work = r, i.pending = !1, i;
|
|
775
|
+
}
|
|
776
|
+
return t.prototype.schedule = function(n, r) {
|
|
777
|
+
if (r === void 0 && (r = 0), this.closed)
|
|
778
|
+
return this;
|
|
779
|
+
this.state = n;
|
|
780
|
+
var i = this.id, o = this.scheduler;
|
|
781
|
+
return i != null && (this.id = this.recycleAsyncId(o, i, r)), this.pending = !0, this.delay = r, this.id = this.id || this.requestAsyncId(o, this.id, r), this;
|
|
782
|
+
}, t.prototype.requestAsyncId = function(n, r, i) {
|
|
783
|
+
return i === void 0 && (i = 0), X.setInterval(n.flush.bind(n, this), i);
|
|
784
|
+
}, t.prototype.recycleAsyncId = function(n, r, i) {
|
|
785
|
+
if (i === void 0 && (i = 0), i != null && this.delay === i && this.pending === !1)
|
|
786
|
+
return r;
|
|
787
|
+
X.clearInterval(r);
|
|
788
|
+
}, t.prototype.execute = function(n, r) {
|
|
789
|
+
if (this.closed)
|
|
790
|
+
return new Error("executing a cancelled action");
|
|
791
|
+
this.pending = !1;
|
|
792
|
+
var i = this._execute(n, r);
|
|
793
|
+
if (i)
|
|
794
|
+
return i;
|
|
795
|
+
this.pending === !1 && this.id != null && (this.id = this.recycleAsyncId(this.scheduler, this.id, null));
|
|
796
|
+
}, t.prototype._execute = function(n, r) {
|
|
797
|
+
var i = !1, o;
|
|
798
|
+
try {
|
|
799
|
+
this.work(n);
|
|
800
|
+
} catch (u) {
|
|
801
|
+
i = !0, o = u || new Error("Scheduled action threw falsy error");
|
|
802
|
+
}
|
|
803
|
+
if (i)
|
|
804
|
+
return this.unsubscribe(), o;
|
|
805
|
+
}, t.prototype.unsubscribe = function() {
|
|
806
|
+
if (!this.closed) {
|
|
807
|
+
var n = this, r = n.id, i = n.scheduler, o = i.actions;
|
|
808
|
+
this.work = this.state = this.scheduler = null, this.pending = !1, B(o, this), r != null && (this.id = this.recycleAsyncId(i, r, null)), this.delay = null, e.prototype.unsubscribe.call(this);
|
|
809
|
+
}
|
|
810
|
+
}, t;
|
|
811
|
+
}(dn), Ke = function() {
|
|
812
|
+
function e(t, n) {
|
|
813
|
+
n === void 0 && (n = e.now), this.schedulerActionCtor = t, this.now = n;
|
|
814
|
+
}
|
|
815
|
+
return e.prototype.schedule = function(t, n, r) {
|
|
816
|
+
return n === void 0 && (n = 0), new this.schedulerActionCtor(this, t).schedule(r, n);
|
|
817
|
+
}, e.now = we.now, e;
|
|
818
|
+
}(), hn = function(e) {
|
|
819
|
+
x(t, e);
|
|
820
|
+
function t(n, r) {
|
|
821
|
+
r === void 0 && (r = Ke.now);
|
|
822
|
+
var i = e.call(this, n, r) || this;
|
|
823
|
+
return i.actions = [], i._active = !1, i._scheduled = void 0, i;
|
|
824
|
+
}
|
|
825
|
+
return t.prototype.flush = function(n) {
|
|
826
|
+
var r = this.actions;
|
|
827
|
+
if (this._active) {
|
|
828
|
+
r.push(n);
|
|
829
|
+
return;
|
|
830
|
+
}
|
|
831
|
+
var i;
|
|
832
|
+
this._active = !0;
|
|
833
|
+
do
|
|
834
|
+
if (i = n.execute(n.state, n.delay))
|
|
835
|
+
break;
|
|
836
|
+
while (n = r.shift());
|
|
837
|
+
if (this._active = !1, i) {
|
|
838
|
+
for (; n = r.shift(); )
|
|
839
|
+
n.unsubscribe();
|
|
840
|
+
throw i;
|
|
841
|
+
}
|
|
842
|
+
}, t;
|
|
843
|
+
}(Ke), _e = new hn(vn), pn = _e, Se = new y(function(e) {
|
|
844
|
+
return e.complete();
|
|
845
|
+
});
|
|
846
|
+
function mn(e) {
|
|
847
|
+
return e ? bn(e) : Se;
|
|
848
|
+
}
|
|
849
|
+
function bn(e) {
|
|
850
|
+
return new y(function(t) {
|
|
851
|
+
return e.schedule(function() {
|
|
852
|
+
return t.complete();
|
|
853
|
+
});
|
|
854
|
+
});
|
|
855
|
+
}
|
|
856
|
+
function ze(e) {
|
|
857
|
+
return e && b(e.schedule);
|
|
858
|
+
}
|
|
859
|
+
function Ze(e) {
|
|
860
|
+
return e[e.length - 1];
|
|
861
|
+
}
|
|
862
|
+
function Ce(e) {
|
|
863
|
+
return ze(Ze(e)) ? e.pop() : void 0;
|
|
864
|
+
}
|
|
865
|
+
function yn(e, t) {
|
|
866
|
+
return typeof Ze(e) == "number" ? e.pop() : t;
|
|
867
|
+
}
|
|
868
|
+
var Be = function(e) {
|
|
869
|
+
return e && typeof e.length == "number" && typeof e != "function";
|
|
870
|
+
};
|
|
871
|
+
function Xe(e) {
|
|
872
|
+
return b(e == null ? void 0 : e.then);
|
|
873
|
+
}
|
|
874
|
+
function et(e) {
|
|
875
|
+
return b(e[ge]);
|
|
876
|
+
}
|
|
877
|
+
function tt(e) {
|
|
878
|
+
return Symbol.asyncIterator && b(e == null ? void 0 : e[Symbol.asyncIterator]);
|
|
879
|
+
}
|
|
880
|
+
function nt(e) {
|
|
881
|
+
return new TypeError("You provided " + (e !== null && typeof e == "object" ? "an invalid object" : "'" + e + "'") + " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.");
|
|
882
|
+
}
|
|
883
|
+
function gn() {
|
|
884
|
+
return typeof Symbol != "function" || !Symbol.iterator ? "@@iterator" : Symbol.iterator;
|
|
885
|
+
}
|
|
886
|
+
var rt = gn();
|
|
887
|
+
function it(e) {
|
|
888
|
+
return b(e == null ? void 0 : e[rt]);
|
|
889
|
+
}
|
|
890
|
+
function ot(e) {
|
|
891
|
+
return Bt(this, arguments, function() {
|
|
892
|
+
var n, r, i, o;
|
|
893
|
+
return He(this, function(u) {
|
|
894
|
+
switch (u.label) {
|
|
895
|
+
case 0:
|
|
896
|
+
n = e.getReader(), u.label = 1;
|
|
897
|
+
case 1:
|
|
898
|
+
u.trys.push([1, , 9, 10]), u.label = 2;
|
|
899
|
+
case 2:
|
|
900
|
+
return [4, U(n.read())];
|
|
901
|
+
case 3:
|
|
902
|
+
return r = u.sent(), i = r.value, o = r.done, o ? [4, U(void 0)] : [3, 5];
|
|
903
|
+
case 4:
|
|
904
|
+
return [2, u.sent()];
|
|
905
|
+
case 5:
|
|
906
|
+
return [4, U(i)];
|
|
907
|
+
case 6:
|
|
908
|
+
return [4, u.sent()];
|
|
909
|
+
case 7:
|
|
910
|
+
return u.sent(), [3, 2];
|
|
911
|
+
case 8:
|
|
912
|
+
return [3, 10];
|
|
913
|
+
case 9:
|
|
914
|
+
return n.releaseLock(), [7];
|
|
915
|
+
case 10:
|
|
916
|
+
return [2];
|
|
917
|
+
}
|
|
918
|
+
});
|
|
919
|
+
});
|
|
920
|
+
}
|
|
921
|
+
function ut(e) {
|
|
922
|
+
return b(e == null ? void 0 : e.getReader);
|
|
923
|
+
}
|
|
924
|
+
function I(e) {
|
|
925
|
+
if (e instanceof y)
|
|
926
|
+
return e;
|
|
927
|
+
if (e != null) {
|
|
928
|
+
if (et(e))
|
|
929
|
+
return wn(e);
|
|
930
|
+
if (Be(e))
|
|
931
|
+
return _n(e);
|
|
932
|
+
if (Xe(e))
|
|
933
|
+
return Sn(e);
|
|
934
|
+
if (tt(e))
|
|
935
|
+
return at(e);
|
|
936
|
+
if (it(e))
|
|
937
|
+
return Cn(e);
|
|
938
|
+
if (ut(e))
|
|
939
|
+
return En(e);
|
|
940
|
+
}
|
|
941
|
+
throw nt(e);
|
|
942
|
+
}
|
|
943
|
+
function wn(e) {
|
|
944
|
+
return new y(function(t) {
|
|
945
|
+
var n = e[ge]();
|
|
946
|
+
if (b(n.subscribe))
|
|
947
|
+
return n.subscribe(t);
|
|
948
|
+
throw new TypeError("Provided object does not correctly implement Symbol.observable");
|
|
949
|
+
});
|
|
950
|
+
}
|
|
951
|
+
function _n(e) {
|
|
952
|
+
return new y(function(t) {
|
|
953
|
+
for (var n = 0; n < e.length && !t.closed; n++)
|
|
954
|
+
t.next(e[n]);
|
|
955
|
+
t.complete();
|
|
956
|
+
});
|
|
957
|
+
}
|
|
958
|
+
function Sn(e) {
|
|
959
|
+
return new y(function(t) {
|
|
960
|
+
e.then(function(n) {
|
|
961
|
+
t.closed || (t.next(n), t.complete());
|
|
962
|
+
}, function(n) {
|
|
963
|
+
return t.error(n);
|
|
964
|
+
}).then(null, Je);
|
|
965
|
+
});
|
|
966
|
+
}
|
|
967
|
+
function Cn(e) {
|
|
968
|
+
return new y(function(t) {
|
|
969
|
+
var n, r;
|
|
970
|
+
try {
|
|
971
|
+
for (var i = V(e), o = i.next(); !o.done; o = i.next()) {
|
|
972
|
+
var u = o.value;
|
|
973
|
+
if (t.next(u), t.closed)
|
|
974
|
+
return;
|
|
975
|
+
}
|
|
976
|
+
} catch (a) {
|
|
977
|
+
n = { error: a };
|
|
978
|
+
} finally {
|
|
979
|
+
try {
|
|
980
|
+
o && !o.done && (r = i.return) && r.call(i);
|
|
981
|
+
} finally {
|
|
982
|
+
if (n)
|
|
983
|
+
throw n.error;
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
t.complete();
|
|
987
|
+
});
|
|
988
|
+
}
|
|
989
|
+
function at(e) {
|
|
990
|
+
return new y(function(t) {
|
|
991
|
+
xn(e, t).catch(function(n) {
|
|
992
|
+
return t.error(n);
|
|
993
|
+
});
|
|
994
|
+
});
|
|
995
|
+
}
|
|
996
|
+
function En(e) {
|
|
997
|
+
return at(ot(e));
|
|
998
|
+
}
|
|
999
|
+
function xn(e, t) {
|
|
1000
|
+
var n, r, i, o;
|
|
1001
|
+
return pe(this, void 0, void 0, function() {
|
|
1002
|
+
var u, a;
|
|
1003
|
+
return He(this, function(s) {
|
|
1004
|
+
switch (s.label) {
|
|
1005
|
+
case 0:
|
|
1006
|
+
s.trys.push([0, 5, 6, 11]), n = Xt(e), s.label = 1;
|
|
1007
|
+
case 1:
|
|
1008
|
+
return [4, n.next()];
|
|
1009
|
+
case 2:
|
|
1010
|
+
if (r = s.sent(), !!r.done)
|
|
1011
|
+
return [3, 4];
|
|
1012
|
+
if (u = r.value, t.next(u), t.closed)
|
|
1013
|
+
return [2];
|
|
1014
|
+
s.label = 3;
|
|
1015
|
+
case 3:
|
|
1016
|
+
return [3, 1];
|
|
1017
|
+
case 4:
|
|
1018
|
+
return [3, 11];
|
|
1019
|
+
case 5:
|
|
1020
|
+
return a = s.sent(), i = { error: a }, [3, 11];
|
|
1021
|
+
case 6:
|
|
1022
|
+
return s.trys.push([6, , 9, 10]), r && !r.done && (o = n.return) ? [4, o.call(n)] : [3, 8];
|
|
1023
|
+
case 7:
|
|
1024
|
+
s.sent(), s.label = 8;
|
|
1025
|
+
case 8:
|
|
1026
|
+
return [3, 10];
|
|
1027
|
+
case 9:
|
|
1028
|
+
if (i)
|
|
1029
|
+
throw i.error;
|
|
1030
|
+
return [7];
|
|
1031
|
+
case 10:
|
|
1032
|
+
return [7];
|
|
1033
|
+
case 11:
|
|
1034
|
+
return t.complete(), [2];
|
|
1035
|
+
}
|
|
1036
|
+
});
|
|
1037
|
+
});
|
|
1038
|
+
}
|
|
1039
|
+
function P(e, t, n, r, i) {
|
|
1040
|
+
r === void 0 && (r = 0), i === void 0 && (i = !1);
|
|
1041
|
+
var o = t.schedule(function() {
|
|
1042
|
+
n(), i ? e.add(this.schedule(null, r)) : this.unsubscribe();
|
|
1043
|
+
}, r);
|
|
1044
|
+
if (e.add(o), !i)
|
|
1045
|
+
return o;
|
|
1046
|
+
}
|
|
1047
|
+
function st(e, t) {
|
|
1048
|
+
return t === void 0 && (t = 0), _(function(n, r) {
|
|
1049
|
+
n.subscribe(w(r, function(i) {
|
|
1050
|
+
return P(r, e, function() {
|
|
1051
|
+
return r.next(i);
|
|
1052
|
+
}, t);
|
|
1053
|
+
}, function() {
|
|
1054
|
+
return P(r, e, function() {
|
|
1055
|
+
return r.complete();
|
|
1056
|
+
}, t);
|
|
1057
|
+
}, function(i) {
|
|
1058
|
+
return P(r, e, function() {
|
|
1059
|
+
return r.error(i);
|
|
1060
|
+
}, t);
|
|
1061
|
+
}));
|
|
1062
|
+
});
|
|
1063
|
+
}
|
|
1064
|
+
function ct(e, t) {
|
|
1065
|
+
return t === void 0 && (t = 0), _(function(n, r) {
|
|
1066
|
+
r.add(e.schedule(function() {
|
|
1067
|
+
return n.subscribe(r);
|
|
1068
|
+
}, t));
|
|
1069
|
+
});
|
|
1070
|
+
}
|
|
1071
|
+
function In(e, t) {
|
|
1072
|
+
return I(e).pipe(ct(t), st(t));
|
|
1073
|
+
}
|
|
1074
|
+
function On(e, t) {
|
|
1075
|
+
return I(e).pipe(ct(t), st(t));
|
|
1076
|
+
}
|
|
1077
|
+
function kn(e, t) {
|
|
1078
|
+
return new y(function(n) {
|
|
1079
|
+
var r = 0;
|
|
1080
|
+
return t.schedule(function() {
|
|
1081
|
+
r === e.length ? n.complete() : (n.next(e[r++]), n.closed || this.schedule());
|
|
1082
|
+
});
|
|
1083
|
+
});
|
|
1084
|
+
}
|
|
1085
|
+
function An(e, t) {
|
|
1086
|
+
return new y(function(n) {
|
|
1087
|
+
var r;
|
|
1088
|
+
return P(n, t, function() {
|
|
1089
|
+
r = e[rt](), P(n, t, function() {
|
|
1090
|
+
var i, o, u;
|
|
1091
|
+
try {
|
|
1092
|
+
i = r.next(), o = i.value, u = i.done;
|
|
1093
|
+
} catch (a) {
|
|
1094
|
+
n.error(a);
|
|
1095
|
+
return;
|
|
1096
|
+
}
|
|
1097
|
+
u ? n.complete() : n.next(o);
|
|
1098
|
+
}, 0, !0);
|
|
1099
|
+
}), function() {
|
|
1100
|
+
return b(r == null ? void 0 : r.return) && r.return();
|
|
1101
|
+
};
|
|
1102
|
+
});
|
|
1103
|
+
}
|
|
1104
|
+
function lt(e, t) {
|
|
1105
|
+
if (!e)
|
|
1106
|
+
throw new Error("Iterable cannot be null");
|
|
1107
|
+
return new y(function(n) {
|
|
1108
|
+
P(n, t, function() {
|
|
1109
|
+
var r = e[Symbol.asyncIterator]();
|
|
1110
|
+
P(n, t, function() {
|
|
1111
|
+
r.next().then(function(i) {
|
|
1112
|
+
i.done ? n.complete() : n.next(i.value);
|
|
1113
|
+
});
|
|
1114
|
+
}, 0, !0);
|
|
1115
|
+
});
|
|
1116
|
+
});
|
|
1117
|
+
}
|
|
1118
|
+
function Fn(e, t) {
|
|
1119
|
+
return lt(ot(e), t);
|
|
1120
|
+
}
|
|
1121
|
+
function Pn(e, t) {
|
|
1122
|
+
if (e != null) {
|
|
1123
|
+
if (et(e))
|
|
1124
|
+
return In(e, t);
|
|
1125
|
+
if (Be(e))
|
|
1126
|
+
return kn(e, t);
|
|
1127
|
+
if (Xe(e))
|
|
1128
|
+
return On(e, t);
|
|
1129
|
+
if (tt(e))
|
|
1130
|
+
return lt(e, t);
|
|
1131
|
+
if (it(e))
|
|
1132
|
+
return An(e, t);
|
|
1133
|
+
if (ut(e))
|
|
1134
|
+
return Fn(e, t);
|
|
1135
|
+
}
|
|
1136
|
+
throw nt(e);
|
|
1137
|
+
}
|
|
1138
|
+
function O(e, t) {
|
|
1139
|
+
return t ? Pn(e, t) : I(e);
|
|
1140
|
+
}
|
|
1141
|
+
function ee() {
|
|
1142
|
+
for (var e = [], t = 0; t < arguments.length; t++)
|
|
1143
|
+
e[t] = arguments[t];
|
|
1144
|
+
var n = Ce(e);
|
|
1145
|
+
return O(e, n);
|
|
1146
|
+
}
|
|
1147
|
+
var ft = me(function(e) {
|
|
1148
|
+
return function() {
|
|
1149
|
+
e(this), this.name = "EmptyError", this.message = "no elements in sequence";
|
|
1150
|
+
};
|
|
1151
|
+
});
|
|
1152
|
+
function $n(e) {
|
|
1153
|
+
return e instanceof Date && !isNaN(e);
|
|
1154
|
+
}
|
|
1155
|
+
function C(e, t) {
|
|
1156
|
+
return _(function(n, r) {
|
|
1157
|
+
var i = 0;
|
|
1158
|
+
n.subscribe(w(r, function(o) {
|
|
1159
|
+
r.next(e.call(t, o, i++));
|
|
1160
|
+
}));
|
|
1161
|
+
});
|
|
1162
|
+
}
|
|
1163
|
+
function Tn(e, t, n, r, i, o, u, a) {
|
|
1164
|
+
var s = [], c = 0, l = 0, d = !1, v = function() {
|
|
1165
|
+
d && !s.length && !c && t.complete();
|
|
1166
|
+
}, p = function(h) {
|
|
1167
|
+
return c < r ? S(h) : s.push(h);
|
|
1168
|
+
}, S = function(h) {
|
|
1169
|
+
o && t.next(h), c++;
|
|
1170
|
+
var $ = !1;
|
|
1171
|
+
I(n(h, l++)).subscribe(w(t, function(E) {
|
|
1172
|
+
i == null || i(E), o ? p(E) : t.next(E);
|
|
1173
|
+
}, function() {
|
|
1174
|
+
$ = !0;
|
|
1175
|
+
}, void 0, function() {
|
|
1176
|
+
if ($)
|
|
1177
|
+
try {
|
|
1178
|
+
c--;
|
|
1179
|
+
for (var E = function() {
|
|
1180
|
+
var j = s.shift();
|
|
1181
|
+
u ? P(t, u, function() {
|
|
1182
|
+
return S(j);
|
|
1183
|
+
}) : S(j);
|
|
1184
|
+
}; s.length && c < r; )
|
|
1185
|
+
E();
|
|
1186
|
+
v();
|
|
1187
|
+
} catch (j) {
|
|
1188
|
+
t.error(j);
|
|
1189
|
+
}
|
|
1190
|
+
}));
|
|
1191
|
+
};
|
|
1192
|
+
return e.subscribe(w(t, p, function() {
|
|
1193
|
+
d = !0, v();
|
|
1194
|
+
})), function() {
|
|
1195
|
+
a == null || a();
|
|
1196
|
+
};
|
|
1197
|
+
}
|
|
1198
|
+
function Ee(e, t, n) {
|
|
1199
|
+
return n === void 0 && (n = 1 / 0), b(t) ? Ee(function(r, i) {
|
|
1200
|
+
return C(function(o, u) {
|
|
1201
|
+
return t(r, o, i, u);
|
|
1202
|
+
})(I(e(r, i)));
|
|
1203
|
+
}, n) : (typeof t == "number" && (n = t), _(function(r, i) {
|
|
1204
|
+
return Tn(r, i, e, n);
|
|
1205
|
+
}));
|
|
1206
|
+
}
|
|
1207
|
+
function dt(e) {
|
|
1208
|
+
return e === void 0 && (e = 1 / 0), Ee(W, e);
|
|
1209
|
+
}
|
|
1210
|
+
function Dn() {
|
|
1211
|
+
return dt(1);
|
|
1212
|
+
}
|
|
1213
|
+
function Rn() {
|
|
1214
|
+
for (var e = [], t = 0; t < arguments.length; t++)
|
|
1215
|
+
e[t] = arguments[t];
|
|
1216
|
+
return Dn()(O(e, Ce(e)));
|
|
1217
|
+
}
|
|
1218
|
+
function jn(e, t, n) {
|
|
1219
|
+
e === void 0 && (e = 0), n === void 0 && (n = pn);
|
|
1220
|
+
var r = -1;
|
|
1221
|
+
return t != null && (ze(t) ? n = t : r = t), new y(function(i) {
|
|
1222
|
+
var o = $n(e) ? +e - n.now() : e;
|
|
1223
|
+
o < 0 && (o = 0);
|
|
1224
|
+
var u = 0;
|
|
1225
|
+
return n.schedule(function() {
|
|
1226
|
+
i.closed || (i.next(u++), 0 <= r ? this.schedule(void 0, r) : i.complete());
|
|
1227
|
+
}, o);
|
|
1228
|
+
});
|
|
1229
|
+
}
|
|
1230
|
+
function Un() {
|
|
1231
|
+
for (var e = [], t = 0; t < arguments.length; t++)
|
|
1232
|
+
e[t] = arguments[t];
|
|
1233
|
+
var n = Ce(e), r = yn(e, 1 / 0), i = e;
|
|
1234
|
+
return i.length ? i.length === 1 ? I(i[0]) : dt(r)(O(i, n)) : Se;
|
|
1235
|
+
}
|
|
1236
|
+
function Vn(e, t) {
|
|
1237
|
+
return _(function(n, r) {
|
|
1238
|
+
var i = 0;
|
|
1239
|
+
n.subscribe(w(r, function(o) {
|
|
1240
|
+
return e.call(t, o, i++) && r.next(o);
|
|
1241
|
+
}));
|
|
1242
|
+
});
|
|
1243
|
+
}
|
|
1244
|
+
function vt(e) {
|
|
1245
|
+
return _(function(t, n) {
|
|
1246
|
+
var r = null, i = !1, o;
|
|
1247
|
+
r = t.subscribe(w(n, void 0, void 0, function(u) {
|
|
1248
|
+
o = I(e(u, vt(e)(t))), r ? (r.unsubscribe(), r = null, o.subscribe(n)) : i = !0;
|
|
1249
|
+
})), i && (r.unsubscribe(), r = null, o.subscribe(n));
|
|
1250
|
+
});
|
|
1251
|
+
}
|
|
1252
|
+
function Mn(e, t, n, r, i) {
|
|
1253
|
+
return function(o, u) {
|
|
1254
|
+
var a = n, s = t, c = 0;
|
|
1255
|
+
o.subscribe(w(u, function(l) {
|
|
1256
|
+
var d = c++;
|
|
1257
|
+
s = a ? e(s, l, d) : (a = !0, l), r && u.next(s);
|
|
1258
|
+
}, i && function() {
|
|
1259
|
+
a && u.next(s), u.complete();
|
|
1260
|
+
}));
|
|
1261
|
+
};
|
|
1262
|
+
}
|
|
1263
|
+
function Ln(e, t) {
|
|
1264
|
+
return t === void 0 && (t = _e), _(function(n, r) {
|
|
1265
|
+
var i = null, o = null, u = null, a = function() {
|
|
1266
|
+
if (i) {
|
|
1267
|
+
i.unsubscribe(), i = null;
|
|
1268
|
+
var c = o;
|
|
1269
|
+
o = null, r.next(c);
|
|
1270
|
+
}
|
|
1271
|
+
};
|
|
1272
|
+
function s() {
|
|
1273
|
+
var c = u + e, l = t.now();
|
|
1274
|
+
if (l < c) {
|
|
1275
|
+
i = this.schedule(void 0, c - l), r.add(i);
|
|
1276
|
+
return;
|
|
1277
|
+
}
|
|
1278
|
+
a();
|
|
1279
|
+
}
|
|
1280
|
+
n.subscribe(w(r, function(c) {
|
|
1281
|
+
o = c, u = t.now(), i || (i = t.schedule(s, e), r.add(i));
|
|
1282
|
+
}, function() {
|
|
1283
|
+
a(), r.complete();
|
|
1284
|
+
}, void 0, function() {
|
|
1285
|
+
o = i = null;
|
|
1286
|
+
}));
|
|
1287
|
+
});
|
|
1288
|
+
}
|
|
1289
|
+
function Nn(e) {
|
|
1290
|
+
return _(function(t, n) {
|
|
1291
|
+
var r = !1;
|
|
1292
|
+
t.subscribe(w(n, function(i) {
|
|
1293
|
+
r = !0, n.next(i);
|
|
1294
|
+
}, function() {
|
|
1295
|
+
r || n.next(e), n.complete();
|
|
1296
|
+
}));
|
|
1297
|
+
});
|
|
1298
|
+
}
|
|
1299
|
+
function de(e) {
|
|
1300
|
+
return e <= 0 ? function() {
|
|
1301
|
+
return Se;
|
|
1302
|
+
} : _(function(t, n) {
|
|
1303
|
+
var r = 0;
|
|
1304
|
+
t.subscribe(w(n, function(i) {
|
|
1305
|
+
++r <= e && (n.next(i), e <= r && n.complete());
|
|
1306
|
+
}));
|
|
1307
|
+
});
|
|
1308
|
+
}
|
|
1309
|
+
function Wn() {
|
|
1310
|
+
return _(function(e, t) {
|
|
1311
|
+
e.subscribe(w(t, fe));
|
|
1312
|
+
});
|
|
1313
|
+
}
|
|
1314
|
+
function qn(e) {
|
|
1315
|
+
return C(function() {
|
|
1316
|
+
return e;
|
|
1317
|
+
});
|
|
1318
|
+
}
|
|
1319
|
+
function ht(e, t) {
|
|
1320
|
+
return t ? function(n) {
|
|
1321
|
+
return Rn(t.pipe(de(1), Wn()), n.pipe(ht(e)));
|
|
1322
|
+
} : Ee(function(n, r) {
|
|
1323
|
+
return e(n, r).pipe(de(1), qn(n));
|
|
1324
|
+
});
|
|
1325
|
+
}
|
|
1326
|
+
function Qn(e, t) {
|
|
1327
|
+
t === void 0 && (t = _e);
|
|
1328
|
+
var n = jn(e, t);
|
|
1329
|
+
return ht(function() {
|
|
1330
|
+
return n;
|
|
1331
|
+
});
|
|
1332
|
+
}
|
|
1333
|
+
function Kn(e, t) {
|
|
1334
|
+
return t === void 0 && (t = W), e = e != null ? e : Hn, _(function(n, r) {
|
|
1335
|
+
var i, o = !0;
|
|
1336
|
+
n.subscribe(w(r, function(u) {
|
|
1337
|
+
var a = t(u);
|
|
1338
|
+
(o || !e(i, a)) && (o = !1, i = a, r.next(u));
|
|
1339
|
+
}));
|
|
1340
|
+
});
|
|
1341
|
+
}
|
|
1342
|
+
function Hn(e, t) {
|
|
1343
|
+
return e === t;
|
|
1344
|
+
}
|
|
1345
|
+
function Yn(e) {
|
|
1346
|
+
return e === void 0 && (e = Gn), _(function(t, n) {
|
|
1347
|
+
var r = !1;
|
|
1348
|
+
t.subscribe(w(n, function(i) {
|
|
1349
|
+
r = !0, n.next(i);
|
|
1350
|
+
}, function() {
|
|
1351
|
+
return r ? n.complete() : n.error(e());
|
|
1352
|
+
}));
|
|
1353
|
+
});
|
|
1354
|
+
}
|
|
1355
|
+
function Gn() {
|
|
1356
|
+
return new ft();
|
|
1357
|
+
}
|
|
1358
|
+
function pt(e, t) {
|
|
1359
|
+
var n = arguments.length >= 2;
|
|
1360
|
+
return function(r) {
|
|
1361
|
+
return r.pipe(e ? Vn(function(i, o) {
|
|
1362
|
+
return e(i, o, r);
|
|
1363
|
+
}) : W, de(1), n ? Nn(t) : Yn(function() {
|
|
1364
|
+
return new ft();
|
|
1365
|
+
}));
|
|
1366
|
+
};
|
|
1367
|
+
}
|
|
1368
|
+
function Jn(e, t) {
|
|
1369
|
+
return _(Mn(e, t, arguments.length >= 2, !0));
|
|
1370
|
+
}
|
|
1371
|
+
function zn(e) {
|
|
1372
|
+
e === void 0 && (e = {});
|
|
1373
|
+
var t = e.connector, n = t === void 0 ? function() {
|
|
1374
|
+
return new ne();
|
|
1375
|
+
} : t, r = e.resetOnError, i = r === void 0 ? !0 : r, o = e.resetOnComplete, u = o === void 0 ? !0 : o, a = e.resetOnRefCountZero, s = a === void 0 ? !0 : a;
|
|
1376
|
+
return function(c) {
|
|
1377
|
+
var l, d, v, p = 0, S = !1, h = !1, $ = function() {
|
|
1378
|
+
d == null || d.unsubscribe(), d = void 0;
|
|
1379
|
+
}, E = function() {
|
|
1380
|
+
$(), l = v = void 0, S = h = !1;
|
|
1381
|
+
}, j = function() {
|
|
1382
|
+
var M = l;
|
|
1383
|
+
E(), M == null || M.unsubscribe();
|
|
1384
|
+
};
|
|
1385
|
+
return _(function(M, Le) {
|
|
1386
|
+
p++, !h && !S && $();
|
|
1387
|
+
var H = v = v != null ? v : n();
|
|
1388
|
+
Le.add(function() {
|
|
1389
|
+
p--, p === 0 && !h && !S && (d = ae(j, s));
|
|
1390
|
+
}), H.subscribe(Le), !l && p > 0 && (l = new L({
|
|
1391
|
+
next: function(Y) {
|
|
1392
|
+
return H.next(Y);
|
|
1393
|
+
},
|
|
1394
|
+
error: function(Y) {
|
|
1395
|
+
h = !0, $(), d = ae(E, i, Y), H.error(Y);
|
|
1396
|
+
},
|
|
1397
|
+
complete: function() {
|
|
1398
|
+
S = !0, $(), d = ae(E, u), H.complete();
|
|
1399
|
+
}
|
|
1400
|
+
}), I(M).subscribe(l));
|
|
1401
|
+
})(c);
|
|
1402
|
+
};
|
|
1403
|
+
}
|
|
1404
|
+
function ae(e, t) {
|
|
1405
|
+
for (var n = [], r = 2; r < arguments.length; r++)
|
|
1406
|
+
n[r - 2] = arguments[r];
|
|
1407
|
+
if (t === !0) {
|
|
1408
|
+
e();
|
|
1409
|
+
return;
|
|
1410
|
+
}
|
|
1411
|
+
if (t !== !1) {
|
|
1412
|
+
var i = new L({
|
|
1413
|
+
next: function() {
|
|
1414
|
+
i.unsubscribe(), e();
|
|
1415
|
+
}
|
|
1416
|
+
});
|
|
1417
|
+
return t.apply(void 0, R([], D(n))).subscribe(i);
|
|
1418
|
+
}
|
|
1419
|
+
}
|
|
1420
|
+
function Zn(e, t, n) {
|
|
1421
|
+
var r, i, o, u, a = !1;
|
|
1422
|
+
return e && typeof e == "object" ? (r = e.bufferSize, u = r === void 0 ? 1 / 0 : r, i = e.windowTime, t = i === void 0 ? 1 / 0 : i, o = e.refCount, a = o === void 0 ? !1 : o, n = e.scheduler) : u = e != null ? e : 1 / 0, zn({
|
|
1423
|
+
connector: function() {
|
|
1424
|
+
return new fn(u, t, n);
|
|
1425
|
+
},
|
|
1426
|
+
resetOnError: !0,
|
|
1427
|
+
resetOnComplete: !1,
|
|
1428
|
+
resetOnRefCountZero: a
|
|
1429
|
+
});
|
|
1430
|
+
}
|
|
1431
|
+
function mt(e, t) {
|
|
1432
|
+
return _(function(n, r) {
|
|
1433
|
+
var i = null, o = 0, u = !1, a = function() {
|
|
1434
|
+
return u && !i && r.complete();
|
|
1435
|
+
};
|
|
1436
|
+
n.subscribe(w(r, function(s) {
|
|
1437
|
+
i == null || i.unsubscribe();
|
|
1438
|
+
var c = 0, l = o++;
|
|
1439
|
+
I(e(s, l)).subscribe(i = w(r, function(d) {
|
|
1440
|
+
return r.next(t ? t(s, d, l, c++) : d);
|
|
1441
|
+
}, function() {
|
|
1442
|
+
i = null, a();
|
|
1443
|
+
}));
|
|
1444
|
+
}, function() {
|
|
1445
|
+
u = !0, a();
|
|
1446
|
+
}));
|
|
1447
|
+
});
|
|
1448
|
+
}
|
|
1449
|
+
function Bn(e, t, n) {
|
|
1450
|
+
var r = b(e) || t || n ? { next: e, error: t, complete: n } : e;
|
|
1451
|
+
return r ? _(function(i, o) {
|
|
1452
|
+
var u;
|
|
1453
|
+
(u = r.subscribe) === null || u === void 0 || u.call(r);
|
|
1454
|
+
var a = !0;
|
|
1455
|
+
i.subscribe(w(o, function(s) {
|
|
1456
|
+
var c;
|
|
1457
|
+
(c = r.next) === null || c === void 0 || c.call(r, s), o.next(s);
|
|
1458
|
+
}, function() {
|
|
1459
|
+
var s;
|
|
1460
|
+
a = !1, (s = r.complete) === null || s === void 0 || s.call(r), o.complete();
|
|
1461
|
+
}, function(s) {
|
|
1462
|
+
var c;
|
|
1463
|
+
a = !1, (c = r.error) === null || c === void 0 || c.call(r, s), o.error(s);
|
|
1464
|
+
}, function() {
|
|
1465
|
+
var s, c;
|
|
1466
|
+
a && ((s = r.unsubscribe) === null || s === void 0 || s.call(r)), (c = r.finalize) === null || c === void 0 || c.call(r);
|
|
1467
|
+
}));
|
|
1468
|
+
}) : W;
|
|
1469
|
+
}
|
|
1470
|
+
function xe(e) {
|
|
1471
|
+
return new y(function(t) {
|
|
1472
|
+
var n = Ft(e, t.next.bind(t), t.error.bind(t), t.complete.bind(t));
|
|
1473
|
+
return { unsubscribe: n };
|
|
1474
|
+
});
|
|
1475
|
+
}
|
|
1476
|
+
const Xn = "[DEFAULT]", bt = f.createContext(void 0), Ie = f.createContext(!1), er = "4.2.2", tr = (e, t) => e === t || [...Object.keys(e), ...Object.keys(t)].every((n) => e[n] === t[n]);
|
|
1477
|
+
function Lr(e) {
|
|
1478
|
+
const {
|
|
1479
|
+
firebaseConfig: t,
|
|
1480
|
+
appName: n,
|
|
1481
|
+
suspense: r
|
|
1482
|
+
} = e, i = f.useMemo(() => {
|
|
1483
|
+
if (e.firebaseApp)
|
|
1484
|
+
return e.firebaseApp;
|
|
1485
|
+
const o = Vt().find((u) => u.name === (n || Xn));
|
|
1486
|
+
if (o) {
|
|
1487
|
+
if (t && tr(o.options, t))
|
|
1488
|
+
return o;
|
|
1489
|
+
throw new Error(`Does not match the options already provided to the ${n || "default"} firebase app instance, give this new instance a different appName.`);
|
|
1490
|
+
} else {
|
|
1491
|
+
if (!t)
|
|
1492
|
+
throw new Error("No firebaseConfig provided");
|
|
1493
|
+
const u = f.version || "unknown";
|
|
1494
|
+
return Ne("react", u), Ne("reactfire", er), Mt(t, n);
|
|
1495
|
+
}
|
|
1496
|
+
}, [e.firebaseApp, t, n]);
|
|
1497
|
+
return f.createElement(bt.Provider, {
|
|
1498
|
+
value: i
|
|
1499
|
+
}, f.createElement(Ie.Provider, Object.assign({
|
|
1500
|
+
value: r != null ? r : !1
|
|
1501
|
+
}, e)));
|
|
1502
|
+
}
|
|
1503
|
+
function Nr() {
|
|
1504
|
+
const e = f.useContext(Ie);
|
|
1505
|
+
return e != null ? e : !1;
|
|
1506
|
+
}
|
|
1507
|
+
function re(e) {
|
|
1508
|
+
let t = f.useContext(Ie);
|
|
1509
|
+
return e !== void 0 ? e : t;
|
|
1510
|
+
}
|
|
1511
|
+
function yt() {
|
|
1512
|
+
const e = f.useContext(bt);
|
|
1513
|
+
if (!e)
|
|
1514
|
+
throw new Error("Cannot call useFirebaseApp unless your component is within a FirebaseAppProvider");
|
|
1515
|
+
return e;
|
|
1516
|
+
}
|
|
1517
|
+
function Wr(e) {
|
|
1518
|
+
return pe(this, void 0, void 0, function* () {
|
|
1519
|
+
const t = yield e();
|
|
1520
|
+
return Ae(xe(t), `auth:user:${t.name}`).toPromise();
|
|
1521
|
+
});
|
|
1522
|
+
}
|
|
1523
|
+
function nr(e) {
|
|
1524
|
+
var t;
|
|
1525
|
+
const n = kt(), r = `auth:user:${n.name}`, i = xe(n), o = (t = Object.assign({}, e)) !== null && t !== void 0 ? t : {};
|
|
1526
|
+
return n.currentUser !== void 0 && (o.initialData = n.currentUser, o.startWithValue = n.currentUser), g(r, i, o);
|
|
1527
|
+
}
|
|
1528
|
+
function rr(e, t = !1, n) {
|
|
1529
|
+
if (!e)
|
|
1530
|
+
throw new Error("you must provide a user");
|
|
1531
|
+
const r = `auth:idTokenResult:${e.uid}:forceRefresh=${t}`, i = O(e.getIdTokenResult(t));
|
|
1532
|
+
return g(r, i, n);
|
|
1533
|
+
}
|
|
1534
|
+
function qr(e) {
|
|
1535
|
+
if ((e == null ? void 0 : e.hasOwnProperty("requiredClaims")) && (e == null ? void 0 : e.hasOwnProperty("validateCustomClaims")))
|
|
1536
|
+
throw new Error('Cannot have both "requiredClaims" and "validateCustomClaims". Use one or the other.');
|
|
1537
|
+
const t = kt();
|
|
1538
|
+
let n = `auth:signInCheck:${t.name}::forceRefresh:${!!(e != null && e.forceRefresh)}`;
|
|
1539
|
+
e != null && e.forceRefresh && (n = `${n}:forceRefresh:${e.forceRefresh}`), e != null && e.hasOwnProperty("requiredClaims") ? n = `${n}:requiredClaims:${JSON.stringify(e.requiredClaims)}` : e != null && e.hasOwnProperty("validateCustomClaims") && (n = `${n}:validateCustomClaims:${JSON.stringify(e.validateCustomClaims)}`);
|
|
1540
|
+
const r = xe(t).pipe(mt((i) => {
|
|
1541
|
+
var o;
|
|
1542
|
+
return i ? e && (e.hasOwnProperty("requiredClaims") || e.hasOwnProperty("validateCustomClaims")) ? O(i.getIdTokenResult((o = e == null ? void 0 : e.forceRefresh) !== null && o !== void 0 ? o : !1)).pipe(C((u) => {
|
|
1543
|
+
let a;
|
|
1544
|
+
e.hasOwnProperty("requiredClaims") ? a = ir(e.requiredClaims) : a = e.validateCustomClaims;
|
|
1545
|
+
const {
|
|
1546
|
+
hasRequiredClaims: s,
|
|
1547
|
+
errors: c
|
|
1548
|
+
} = a(u.claims);
|
|
1549
|
+
return {
|
|
1550
|
+
signedIn: !0,
|
|
1551
|
+
hasRequiredClaims: s,
|
|
1552
|
+
errors: c,
|
|
1553
|
+
user: i
|
|
1554
|
+
};
|
|
1555
|
+
})) : ee({
|
|
1556
|
+
signedIn: !0,
|
|
1557
|
+
hasRequiredClaims: !0,
|
|
1558
|
+
errors: {},
|
|
1559
|
+
user: i
|
|
1560
|
+
}) : ee({
|
|
1561
|
+
signedIn: !1,
|
|
1562
|
+
hasRequiredClaims: !1,
|
|
1563
|
+
errors: {},
|
|
1564
|
+
user: null
|
|
1565
|
+
});
|
|
1566
|
+
}));
|
|
1567
|
+
return g(n, r);
|
|
1568
|
+
}
|
|
1569
|
+
function ir(e) {
|
|
1570
|
+
return function(n) {
|
|
1571
|
+
const r = {};
|
|
1572
|
+
return Object.keys(e).forEach((i) => {
|
|
1573
|
+
e[i] !== n[i] && (r[i] = [new Me("auth/missing-claim", `Expected "${e[i]}", but user has "${n[i]}" instead`)]);
|
|
1574
|
+
}), {
|
|
1575
|
+
hasRequiredClaims: Object.keys(r).length === 0,
|
|
1576
|
+
errors: r
|
|
1577
|
+
};
|
|
1578
|
+
};
|
|
1579
|
+
}
|
|
1580
|
+
function or({
|
|
1581
|
+
user: e,
|
|
1582
|
+
fallback: t,
|
|
1583
|
+
children: n,
|
|
1584
|
+
requiredClaims: r
|
|
1585
|
+
}) {
|
|
1586
|
+
const {
|
|
1587
|
+
data: i
|
|
1588
|
+
} = rr(e, !1), {
|
|
1589
|
+
claims: o
|
|
1590
|
+
} = i, u = {};
|
|
1591
|
+
return re() || console.warn("ClaimsCheck is deprecated and only works when ReactFire is in experimental Suspense Mode. Use useSigninCheck or set suspense={true} in FirebaseAppProvider if you want to use this component."), r && Object.keys(r).forEach((s) => {
|
|
1592
|
+
var c;
|
|
1593
|
+
r[s] !== o[s] && (u[s] = {
|
|
1594
|
+
expected: r[s],
|
|
1595
|
+
actual: (c = o[s]) === null || c === void 0 ? void 0 : c.toString()
|
|
1596
|
+
});
|
|
1597
|
+
}), Object.keys(u).length === 0 ? f.createElement(f.Fragment, null, n) : f.createElement(f.Fragment, null, t);
|
|
1598
|
+
}
|
|
1599
|
+
function Qr({
|
|
1600
|
+
fallback: e,
|
|
1601
|
+
children: t,
|
|
1602
|
+
requiredClaims: n
|
|
1603
|
+
}) {
|
|
1604
|
+
const {
|
|
1605
|
+
data: r
|
|
1606
|
+
} = nr();
|
|
1607
|
+
return re() || console.warn("AuthCheck is deprecated and only works when ReactFire is in experimental Suspense Mode. Use useSigninCheck or set suspense={true} in FirebaseAppProvider if you want to use this component."), r ? n ? f.createElement(or, {
|
|
1608
|
+
user: r,
|
|
1609
|
+
fallback: e,
|
|
1610
|
+
requiredClaims: n
|
|
1611
|
+
}, t) : f.createElement(f.Fragment, null, t) : f.createElement(f.Fragment, null, e);
|
|
1612
|
+
}
|
|
1613
|
+
/*! *****************************************************************************
|
|
1614
|
+
Copyright (c) Microsoft Corporation.
|
|
1
1615
|
|
|
2
|
-
|
|
1616
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
1617
|
+
purpose with or without fee is hereby granted.
|
|
3
1618
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1619
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
1620
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
1621
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
1622
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
1623
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
1624
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
1625
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
1626
|
+
***************************************************************************** */
|
|
1627
|
+
var te = function() {
|
|
1628
|
+
return te = Object.assign || function(t) {
|
|
1629
|
+
for (var n, r = 1, i = arguments.length; r < i; r++) {
|
|
1630
|
+
n = arguments[r];
|
|
1631
|
+
for (var o in n)
|
|
1632
|
+
Object.prototype.hasOwnProperty.call(n, o) && (t[o] = n[o]);
|
|
1633
|
+
}
|
|
1634
|
+
return t;
|
|
1635
|
+
}, te.apply(this, arguments);
|
|
1636
|
+
};
|
|
1637
|
+
function se(e, t) {
|
|
1638
|
+
for (var n = 0, r = t.length, i = e.length; n < r; n++, i++)
|
|
1639
|
+
e[i] = t[n];
|
|
1640
|
+
return e;
|
|
1641
|
+
}
|
|
1642
|
+
/**
|
|
1643
|
+
* @license
|
|
1644
|
+
* Copyright 2021 Google LLC
|
|
1645
|
+
*
|
|
1646
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1647
|
+
* you may not use this file except in compliance with the License.
|
|
1648
|
+
* You may obtain a copy of the License at
|
|
1649
|
+
*
|
|
1650
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1651
|
+
*
|
|
1652
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1653
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1654
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1655
|
+
* See the License for the specific language governing permissions and
|
|
1656
|
+
* limitations under the License.
|
|
1657
|
+
*/
|
|
1658
|
+
var T, m;
|
|
1659
|
+
(function(e) {
|
|
1660
|
+
e.added = "child_added", e.removed = "child_removed", e.changed = "child_changed", e.moved = "child_moved", e.value = "value";
|
|
1661
|
+
})(m || (m = {}));
|
|
1662
|
+
var ur = Object.freeze((T = {}, T[m.added] = Pt, T[m.removed] = $t, T[m.changed] = Tt, T[m.moved] = Dt, T[m.value] = Rt, T));
|
|
1663
|
+
/**
|
|
1664
|
+
* @license
|
|
1665
|
+
* Copyright 2021 Google LLC
|
|
1666
|
+
*
|
|
1667
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1668
|
+
* you may not use this file except in compliance with the License.
|
|
1669
|
+
* You may obtain a copy of the License at
|
|
1670
|
+
*
|
|
1671
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1672
|
+
*
|
|
1673
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1674
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1675
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1676
|
+
* See the License for the specific language governing permissions and
|
|
1677
|
+
* limitations under the License.
|
|
1678
|
+
*/
|
|
1679
|
+
function Oe(e, t) {
|
|
1680
|
+
return new y(function(n) {
|
|
1681
|
+
var r = ur[t](e, function(i, o) {
|
|
1682
|
+
n.next({ snapshot: i, prevKey: o, event: t });
|
|
1683
|
+
}, n.error.bind(n));
|
|
1684
|
+
return {
|
|
1685
|
+
unsubscribe: function() {
|
|
1686
|
+
jt(e, t, r);
|
|
1687
|
+
}
|
|
1688
|
+
};
|
|
1689
|
+
}).pipe(Qn(0));
|
|
1690
|
+
}
|
|
1691
|
+
/**
|
|
1692
|
+
* @license
|
|
1693
|
+
* Copyright 2021 Google LLC
|
|
1694
|
+
*
|
|
1695
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1696
|
+
* you may not use this file except in compliance with the License.
|
|
1697
|
+
* You may obtain a copy of the License at
|
|
1698
|
+
*
|
|
1699
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1700
|
+
*
|
|
1701
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1702
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1703
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1704
|
+
* See the License for the specific language governing permissions and
|
|
1705
|
+
* limitations under the License.
|
|
1706
|
+
*/
|
|
1707
|
+
function ar(e) {
|
|
1708
|
+
return (e == null || e.length === 0) && (e = [
|
|
1709
|
+
m.added,
|
|
1710
|
+
m.removed,
|
|
1711
|
+
m.changed,
|
|
1712
|
+
m.moved
|
|
1713
|
+
]), e;
|
|
1714
|
+
}
|
|
1715
|
+
/**
|
|
1716
|
+
* @license
|
|
1717
|
+
* Copyright 2021 Google LLC
|
|
1718
|
+
*
|
|
1719
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1720
|
+
* you may not use this file except in compliance with the License.
|
|
1721
|
+
* You may obtain a copy of the License at
|
|
1722
|
+
*
|
|
1723
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1724
|
+
*
|
|
1725
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1726
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1727
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1728
|
+
* See the License for the specific language governing permissions and
|
|
1729
|
+
* limitations under the License.
|
|
1730
|
+
*/
|
|
1731
|
+
function sr(e) {
|
|
1732
|
+
return Oe(e, m.value);
|
|
1733
|
+
}
|
|
1734
|
+
function cr(e, t) {
|
|
1735
|
+
return t === void 0 && (t = {}), Oe(e, m.value).pipe(C(function(n) {
|
|
1736
|
+
return gt(n, t);
|
|
1737
|
+
}));
|
|
1738
|
+
}
|
|
1739
|
+
function gt(e, t) {
|
|
1740
|
+
var n;
|
|
1741
|
+
t === void 0 && (t = {});
|
|
1742
|
+
var r = e.snapshot.val();
|
|
1743
|
+
return !e.snapshot.exists() || typeof r != "object" ? r : te(te({}, r), t.keyField ? (n = {}, n[t.keyField] = e.snapshot.key, n) : null);
|
|
1744
|
+
}
|
|
1745
|
+
function lr(e) {
|
|
1746
|
+
return O(Ut(e)).pipe(C(function(t) {
|
|
1747
|
+
var n = m.value;
|
|
1748
|
+
return { snapshot: t, prevKey: null, event: n };
|
|
1749
|
+
}));
|
|
1750
|
+
}
|
|
1751
|
+
function wt(e, t) {
|
|
1752
|
+
t === void 0 && (t = {});
|
|
1753
|
+
var n = ar(t.events);
|
|
1754
|
+
return lr(e).pipe(mt(function(r) {
|
|
1755
|
+
if (!r.snapshot.exists())
|
|
1756
|
+
return ee([]);
|
|
1757
|
+
var i = [ee(r)];
|
|
1758
|
+
return n.forEach(function(o) {
|
|
1759
|
+
i.push(Oe(e, o));
|
|
1760
|
+
}), Un.apply(void 0, i).pipe(Jn(vr, []));
|
|
1761
|
+
}), Kn());
|
|
1762
|
+
}
|
|
1763
|
+
function fr(e, t) {
|
|
1764
|
+
return t === void 0 && (t = {}), wt(e).pipe(C(function(n) {
|
|
1765
|
+
return n.map(function(r) {
|
|
1766
|
+
return gt(r, t);
|
|
1767
|
+
});
|
|
1768
|
+
}));
|
|
1769
|
+
}
|
|
1770
|
+
function _t(e, t) {
|
|
1771
|
+
for (var n = e.length, r = 0; r < n; r++)
|
|
1772
|
+
if (e[r].snapshot.key === t)
|
|
1773
|
+
return r;
|
|
1774
|
+
return -1;
|
|
1775
|
+
}
|
|
1776
|
+
function dr(e, t) {
|
|
1777
|
+
if (t == null)
|
|
1778
|
+
return 0;
|
|
1779
|
+
var n = _t(e, t);
|
|
1780
|
+
return n === -1 ? e.length : n + 1;
|
|
1781
|
+
}
|
|
1782
|
+
function vr(e, t) {
|
|
1783
|
+
var n = t.snapshot, r = t.prevKey, i = t.event, o = n.key, u = _t(e, o), a = dr(e, r || void 0);
|
|
1784
|
+
switch (i) {
|
|
1785
|
+
case m.value:
|
|
1786
|
+
if (t.snapshot && t.snapshot.exists()) {
|
|
1787
|
+
var s = null;
|
|
1788
|
+
t.snapshot.forEach(function(d) {
|
|
1789
|
+
var v = {
|
|
1790
|
+
snapshot: d,
|
|
1791
|
+
event: m.value,
|
|
1792
|
+
prevKey: s
|
|
1793
|
+
};
|
|
1794
|
+
return s = d.key, e = se(se([], e), [v]), !1;
|
|
1795
|
+
});
|
|
1796
|
+
}
|
|
1797
|
+
return e;
|
|
1798
|
+
case m.added:
|
|
1799
|
+
if (u > -1) {
|
|
1800
|
+
var c = e[u - 1];
|
|
1801
|
+
(c && c.snapshot.key || null) !== r && (e = e.filter(function(d) {
|
|
1802
|
+
return d.snapshot.key !== n.key;
|
|
1803
|
+
}), e.splice(a, 0, t));
|
|
1804
|
+
} else {
|
|
1805
|
+
if (r == null)
|
|
1806
|
+
return se([t], e);
|
|
1807
|
+
e = e.slice(), e.splice(a, 0, t);
|
|
1808
|
+
}
|
|
1809
|
+
return e;
|
|
1810
|
+
case m.removed:
|
|
1811
|
+
return e.filter(function(d) {
|
|
1812
|
+
return d.snapshot.key !== n.key;
|
|
1813
|
+
});
|
|
1814
|
+
case m.changed:
|
|
1815
|
+
return e.map(function(d) {
|
|
1816
|
+
return d.snapshot.key === o ? t : d;
|
|
1817
|
+
});
|
|
1818
|
+
case m.moved:
|
|
1819
|
+
if (u > -1) {
|
|
1820
|
+
var l = e.splice(u, 1)[0];
|
|
1821
|
+
return e = e.slice(), e.splice(a, 0, l), e;
|
|
1822
|
+
}
|
|
1823
|
+
return e;
|
|
1824
|
+
default:
|
|
1825
|
+
return e;
|
|
1826
|
+
}
|
|
1827
|
+
}
|
|
1828
|
+
const ve = globalThis._reactFireDatabaseCachedQueries || [];
|
|
1829
|
+
globalThis._reactFireDatabaseCachedQueries || (globalThis._reactFireDatabaseCachedQueries = ve);
|
|
1830
|
+
function St(e) {
|
|
1831
|
+
const t = ve.findIndex((n) => n.isEqual(e));
|
|
1832
|
+
return t > -1 ? t : ve.push(e) - 1;
|
|
1833
|
+
}
|
|
1834
|
+
function Kr(e, t) {
|
|
1835
|
+
const n = `database:object:${e.toString()}`, r = sr(e);
|
|
1836
|
+
return g(n, r, t);
|
|
1837
|
+
}
|
|
1838
|
+
function Hr(e, t) {
|
|
1839
|
+
const n = t ? K(t) : "NO_ID_FIELD", r = `database:objectVal:${e.toString()}:idField=${n}`, i = cr(e, {
|
|
1840
|
+
keyField: n
|
|
1841
|
+
});
|
|
1842
|
+
return g(r, i, t);
|
|
1843
|
+
}
|
|
1844
|
+
function Yr(e, t) {
|
|
1845
|
+
const n = `database:list:${St(e)}`, r = wt(e);
|
|
1846
|
+
return g(n, r, t);
|
|
1847
|
+
}
|
|
1848
|
+
function Gr(e, t) {
|
|
1849
|
+
const n = t ? K(t) : "NO_ID_FIELD", r = `database:listVal:${St(e)}:idField=${n}`, i = fr(e, {
|
|
1850
|
+
keyField: n
|
|
1851
|
+
});
|
|
1852
|
+
return g(r, i, t);
|
|
1853
|
+
}
|
|
1854
|
+
/**
|
|
1855
|
+
* @license
|
|
1856
|
+
* Copyright 2018 Google LLC
|
|
1857
|
+
*
|
|
1858
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1859
|
+
* you may not use this file except in compliance with the License.
|
|
1860
|
+
* You may obtain a copy of the License at
|
|
1861
|
+
*
|
|
1862
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1863
|
+
*
|
|
1864
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1865
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1866
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1867
|
+
* See the License for the specific language governing permissions and
|
|
1868
|
+
* limitations under the License.
|
|
1869
|
+
*/
|
|
1870
|
+
var hr = { includeMetadataChanges: !1 };
|
|
1871
|
+
function ke(e, t) {
|
|
1872
|
+
return t === void 0 && (t = hr), new y(function(n) {
|
|
1873
|
+
var r = Lt(e, t, {
|
|
1874
|
+
next: n.next.bind(n),
|
|
1875
|
+
error: n.error.bind(n),
|
|
1876
|
+
complete: n.complete.bind(n)
|
|
1877
|
+
});
|
|
1878
|
+
return { unsubscribe: r };
|
|
1879
|
+
});
|
|
1880
|
+
}
|
|
1881
|
+
/**
|
|
1882
|
+
* @license
|
|
1883
|
+
* Copyright 2018 Google LLC
|
|
1884
|
+
*
|
|
1885
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1886
|
+
* you may not use this file except in compliance with the License.
|
|
1887
|
+
* You may obtain a copy of the License at
|
|
1888
|
+
*
|
|
1889
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1890
|
+
*
|
|
1891
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1892
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1893
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1894
|
+
* See the License for the specific language governing permissions and
|
|
1895
|
+
* limitations under the License.
|
|
1896
|
+
*/
|
|
1897
|
+
function ie(e) {
|
|
1898
|
+
return ke(e, { includeMetadataChanges: !0 });
|
|
1899
|
+
}
|
|
1900
|
+
function Ct(e, t) {
|
|
1901
|
+
return t === void 0 && (t = {}), ie(e).pipe(C(function(n) {
|
|
1902
|
+
return Et(n, t);
|
|
1903
|
+
}));
|
|
1904
|
+
}
|
|
1905
|
+
function Et(e, t) {
|
|
1906
|
+
t === void 0 && (t = {});
|
|
1907
|
+
var n = e.data();
|
|
1908
|
+
return !e.exists() || typeof n != "object" || n === null || t.idField && (n[t.idField] = e.id), n;
|
|
1909
|
+
}
|
|
1910
|
+
function pr(e) {
|
|
1911
|
+
return ke(e, { includeMetadataChanges: !0 }).pipe(C(function(t) {
|
|
1912
|
+
return t.docs;
|
|
1913
|
+
}));
|
|
1914
|
+
}
|
|
1915
|
+
function mr(e, t) {
|
|
1916
|
+
return t === void 0 && (t = {}), pr(e).pipe(C(function(n) {
|
|
1917
|
+
return n.map(function(r) {
|
|
1918
|
+
return Et(r, t);
|
|
1919
|
+
});
|
|
1920
|
+
}));
|
|
1921
|
+
}
|
|
1922
|
+
class br extends ne {
|
|
1923
|
+
constructor(t, n) {
|
|
1924
|
+
super(), this._timeoutWindow = n, this._hasValue = !1, this._error = void 0, this._firstEmission = new Promise((r) => this._resolveFirstEmission = r), this._innerObservable = t.pipe(Bn({
|
|
1925
|
+
next: (r) => {
|
|
1926
|
+
this._next(r);
|
|
1927
|
+
},
|
|
1928
|
+
error: (r) => {
|
|
1929
|
+
this._error = r, this._resolveFirstEmission();
|
|
1930
|
+
}
|
|
1931
|
+
}), vt(() => mn()), Zn(1)), this._warmupSubscription = this._innerObservable.subscribe(), this._timeoutHandler = setTimeout(this._reset.bind(this), this._timeoutWindow);
|
|
1932
|
+
}
|
|
1933
|
+
get hasValue() {
|
|
1934
|
+
return this._hasValue || !!this._error;
|
|
1935
|
+
}
|
|
1936
|
+
get value() {
|
|
1937
|
+
if (this._error)
|
|
1938
|
+
throw this._error;
|
|
1939
|
+
if (!this.hasValue)
|
|
1940
|
+
throw Error("Can only get value if SuspenseSubject has a value");
|
|
1941
|
+
return this._value;
|
|
1942
|
+
}
|
|
1943
|
+
get firstEmission() {
|
|
1944
|
+
return this._firstEmission;
|
|
1945
|
+
}
|
|
1946
|
+
_next(t) {
|
|
1947
|
+
this._hasValue = !0, this._value = t, this._resolveFirstEmission();
|
|
1948
|
+
}
|
|
1949
|
+
_reset() {
|
|
1950
|
+
this._warmupSubscription && this._warmupSubscription.unsubscribe(), this._hasValue = !1, this._value = void 0, this._error = void 0, this._firstEmission = new Promise((t) => this._resolveFirstEmission = t);
|
|
1951
|
+
}
|
|
1952
|
+
_subscribe(t) {
|
|
1953
|
+
return this._timeoutHandler && clearTimeout(this._timeoutHandler), this._innerSubscriber = this._innerObservable.subscribe(t), this._innerSubscriber;
|
|
1954
|
+
}
|
|
1955
|
+
get ourError() {
|
|
1956
|
+
return this._error;
|
|
1957
|
+
}
|
|
1958
|
+
}
|
|
1959
|
+
const yr = 3e4, Z = globalThis._reactFirePreloadedObservables || /* @__PURE__ */ new Map();
|
|
1960
|
+
globalThis._reactFirePreloadedObservables || (globalThis._reactFirePreloadedObservables = Z);
|
|
1961
|
+
function Ae(e, t) {
|
|
1962
|
+
if (Z.has(t))
|
|
1963
|
+
return Z.get(t);
|
|
1964
|
+
{
|
|
1965
|
+
const n = new br(e, yr);
|
|
1966
|
+
return Z.set(t, n), n;
|
|
1967
|
+
}
|
|
1968
|
+
}
|
|
1969
|
+
function gr(e) {
|
|
1970
|
+
return function(n, r) {
|
|
1971
|
+
const i = Object.assign(Object.assign({}, n), { hasEmitted: n.hasEmitted || e.hasValue, error: e.ourError, firstValuePromise: e.firstEmission });
|
|
1972
|
+
switch (e.hasValue && (i.data = e.value), r) {
|
|
1973
|
+
case "value":
|
|
1974
|
+
return i.status = "success", i;
|
|
1975
|
+
case "error":
|
|
1976
|
+
return i.status = "error", i;
|
|
1977
|
+
case "complete":
|
|
1978
|
+
return i.isComplete = !0, i;
|
|
1979
|
+
default:
|
|
1980
|
+
throw new Error(`invalid action "${r}"`);
|
|
1981
|
+
}
|
|
1982
|
+
};
|
|
1983
|
+
}
|
|
1984
|
+
function g(e, t, n = {}) {
|
|
1985
|
+
var r;
|
|
1986
|
+
if (!e)
|
|
1987
|
+
throw new Error("cannot call useObservable without an observableId");
|
|
1988
|
+
const i = Ae(t, e), o = n.hasOwnProperty("initialData") || n.hasOwnProperty("startWithValue"), u = i.hasValue || o;
|
|
1989
|
+
if (re(n.suspense) === !0 && !u)
|
|
1990
|
+
throw i.firstEmission;
|
|
1991
|
+
const s = {
|
|
1992
|
+
status: u ? "success" : "loading",
|
|
1993
|
+
hasEmitted: u,
|
|
1994
|
+
isComplete: !1,
|
|
1995
|
+
data: i.hasValue ? i.value : (r = n == null ? void 0 : n.initialData) !== null && r !== void 0 ? r : n == null ? void 0 : n.startWithValue,
|
|
1996
|
+
error: i.ourError,
|
|
1997
|
+
firstValuePromise: i.firstEmission
|
|
1998
|
+
}, [c, l] = f.useReducer(gr(i), s);
|
|
1999
|
+
return f.useEffect(() => {
|
|
2000
|
+
const d = i.subscribe({
|
|
2001
|
+
next: () => {
|
|
2002
|
+
l("value");
|
|
2003
|
+
},
|
|
2004
|
+
error: (v) => {
|
|
2005
|
+
throw l("error"), v;
|
|
2006
|
+
},
|
|
2007
|
+
complete: () => {
|
|
2008
|
+
l("complete");
|
|
2009
|
+
}
|
|
2010
|
+
});
|
|
2011
|
+
return () => d.unsubscribe();
|
|
2012
|
+
}, [i]), c;
|
|
2013
|
+
}
|
|
2014
|
+
const he = globalThis._reactFireFirestoreQueryCache || [];
|
|
2015
|
+
globalThis._reactFireFirestoreQueryCache || (globalThis._reactFireFirestoreQueryCache = he);
|
|
2016
|
+
function xt(e) {
|
|
2017
|
+
const t = he.findIndex((n) => Nt(n, e));
|
|
2018
|
+
return t > -1 ? t : he.push(e) - 1;
|
|
2019
|
+
}
|
|
2020
|
+
function Jr(e) {
|
|
2021
|
+
return pe(this, void 0, void 0, function* () {
|
|
2022
|
+
const t = yield e();
|
|
2023
|
+
return Ae(ie(t), It(t));
|
|
2024
|
+
});
|
|
2025
|
+
}
|
|
2026
|
+
function It(e) {
|
|
2027
|
+
return `firestore:doc:${e.firestore.app.name}:${e.path}`;
|
|
2028
|
+
}
|
|
2029
|
+
function zr(e, t) {
|
|
2030
|
+
const n = It(e), r = ie(e);
|
|
2031
|
+
return g(n, r, t);
|
|
2032
|
+
}
|
|
2033
|
+
function Zr(e, t) {
|
|
2034
|
+
const n = `firestore:docOnce:${e.firestore.app.name}:${e.path}`, r = ie(e).pipe(pt());
|
|
2035
|
+
return g(n, r, t);
|
|
2036
|
+
}
|
|
2037
|
+
function Br(e, t) {
|
|
2038
|
+
const n = t ? K(t) : "NO_ID_FIELD", r = `firestore:docData:${e.firestore.app.name}:${e.path}:idField=${n}`, i = Ct(e, {
|
|
2039
|
+
idField: n
|
|
2040
|
+
});
|
|
2041
|
+
return g(r, i, t);
|
|
2042
|
+
}
|
|
2043
|
+
function Xr(e, t) {
|
|
2044
|
+
const n = t ? K(t) : "NO_ID_FIELD", r = `firestore:docDataOnce:${e.firestore.app.name}:${e.path}:idField=${n}`, i = Ct(e, {
|
|
2045
|
+
idField: n
|
|
2046
|
+
}).pipe(pt());
|
|
2047
|
+
return g(r, i, t);
|
|
2048
|
+
}
|
|
2049
|
+
function ei(e, t) {
|
|
2050
|
+
const n = `firestore:collection:${xt(e)}`, r = ke(e);
|
|
2051
|
+
return g(n, r, t);
|
|
2052
|
+
}
|
|
2053
|
+
function ti(e, t) {
|
|
2054
|
+
const n = t ? K(t) : "NO_ID_FIELD", r = `firestore:collectionData:${xt(e)}:idField=${n}`, i = mr(e, {
|
|
2055
|
+
idField: n
|
|
2056
|
+
});
|
|
2057
|
+
return g(r, i, t);
|
|
2058
|
+
}
|
|
2059
|
+
/**
|
|
2060
|
+
* @license
|
|
2061
|
+
* Copyright 2021 Google LLC
|
|
2062
|
+
*
|
|
2063
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2064
|
+
* you may not use this file except in compliance with the License.
|
|
2065
|
+
* You may obtain a copy of the License at
|
|
2066
|
+
*
|
|
2067
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2068
|
+
*
|
|
2069
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2070
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2071
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2072
|
+
* See the License for the specific language governing permissions and
|
|
2073
|
+
* limitations under the License.
|
|
2074
|
+
*/
|
|
2075
|
+
function wr(e, t, n) {
|
|
2076
|
+
var r = Wt(e, t, n);
|
|
2077
|
+
return function(i) {
|
|
2078
|
+
return O(r(i)).pipe(C(function(o) {
|
|
2079
|
+
return o.data;
|
|
2080
|
+
}));
|
|
2081
|
+
};
|
|
2082
|
+
}
|
|
2083
|
+
function ni(e, t) {
|
|
2084
|
+
const n = Fr(), r = `functions:callableResponse:${e}:${JSON.stringify(t == null ? void 0 : t.data)}:${JSON.stringify(t == null ? void 0 : t.httpsCallableOptions)}`, o = wr(n, e, t == null ? void 0 : t.httpsCallableOptions)(t == null ? void 0 : t.data);
|
|
2085
|
+
return g(r, o, t);
|
|
2086
|
+
}
|
|
2087
|
+
function ri({
|
|
2088
|
+
children: e,
|
|
2089
|
+
traceId: t,
|
|
2090
|
+
fallback: n
|
|
2091
|
+
}) {
|
|
2092
|
+
var r;
|
|
2093
|
+
const i = ((r = performance == null ? void 0 : performance.getEntriesByName) === null || r === void 0 ? void 0 : r.call(performance, t, "measure")) || [], o = `_${t}Start[${i.length}]`, u = `_${t}End[${i.length}]`, a = () => (f.useLayoutEffect(() => {
|
|
2094
|
+
var s;
|
|
2095
|
+
return (s = performance == null ? void 0 : performance.mark) === null || s === void 0 || s.call(performance, o), () => {
|
|
2096
|
+
var c, l;
|
|
2097
|
+
(c = performance == null ? void 0 : performance.mark) === null || c === void 0 || c.call(performance, u), (l = performance == null ? void 0 : performance.measure) === null || l === void 0 || l.call(performance, t, o, u);
|
|
2098
|
+
};
|
|
2099
|
+
}, []), f.createElement(f.Fragment, null, n));
|
|
2100
|
+
return f.createElement(f.Suspense, {
|
|
2101
|
+
fallback: f.createElement(a, null)
|
|
2102
|
+
}, e);
|
|
2103
|
+
}
|
|
2104
|
+
function q(e) {
|
|
2105
|
+
var t = e.remoteConfig, n = e.key, r = e.getter;
|
|
2106
|
+
return new y(function(i) {
|
|
2107
|
+
Kt(t).then(function() {
|
|
2108
|
+
var o = r.bind(t);
|
|
2109
|
+
i.next(o(t, n));
|
|
2110
|
+
});
|
|
2111
|
+
});
|
|
2112
|
+
}
|
|
2113
|
+
function _r(e, t) {
|
|
2114
|
+
var n = Ht;
|
|
2115
|
+
return q({ remoteConfig: e, key: t, getter: n });
|
|
2116
|
+
}
|
|
2117
|
+
function Sr(e, t) {
|
|
2118
|
+
var n = Yt;
|
|
2119
|
+
return q({ remoteConfig: e, key: t, getter: n });
|
|
2120
|
+
}
|
|
2121
|
+
function Cr(e, t) {
|
|
2122
|
+
var n = Gt;
|
|
2123
|
+
return q({ remoteConfig: e, key: t, getter: n });
|
|
2124
|
+
}
|
|
2125
|
+
function Er(e, t) {
|
|
2126
|
+
var n = Jt;
|
|
2127
|
+
return q({ remoteConfig: e, key: t, getter: n });
|
|
2128
|
+
}
|
|
2129
|
+
function xr(e) {
|
|
2130
|
+
var t = zt;
|
|
2131
|
+
return q({ remoteConfig: e, key: "", getter: t });
|
|
2132
|
+
}
|
|
2133
|
+
function Q(e, t) {
|
|
2134
|
+
const n = $r(), r = n.app.name, i = t(n, e), o = `remoteConfig:${e}:${t.name}:${r}`;
|
|
2135
|
+
return g(o, i);
|
|
2136
|
+
}
|
|
2137
|
+
function ii(e) {
|
|
2138
|
+
return Q(e, _r);
|
|
2139
|
+
}
|
|
2140
|
+
function oi(e) {
|
|
2141
|
+
return Q(e, Sr);
|
|
2142
|
+
}
|
|
2143
|
+
function ui(e) {
|
|
2144
|
+
return Q(e, Cr);
|
|
2145
|
+
}
|
|
2146
|
+
function ai(e) {
|
|
2147
|
+
return Q(e, Er);
|
|
2148
|
+
}
|
|
2149
|
+
function si(e) {
|
|
2150
|
+
return Q(e, xr);
|
|
2151
|
+
}
|
|
2152
|
+
function Ir(e) {
|
|
2153
|
+
return new y(function(t) {
|
|
2154
|
+
var n = function(u) {
|
|
2155
|
+
return t.next(u);
|
|
2156
|
+
}, r = function(u) {
|
|
2157
|
+
return t.error(u);
|
|
2158
|
+
}, i = function() {
|
|
2159
|
+
return t.complete();
|
|
2160
|
+
};
|
|
2161
|
+
n(e.snapshot);
|
|
2162
|
+
var o = e.on("state_changed", n);
|
|
2163
|
+
return e.then(function(u) {
|
|
2164
|
+
n(u), setTimeout(function() {
|
|
2165
|
+
return i();
|
|
2166
|
+
}, 0);
|
|
2167
|
+
}, function(u) {
|
|
2168
|
+
n(e.snapshot), setTimeout(function() {
|
|
2169
|
+
return r(u);
|
|
2170
|
+
}, 0);
|
|
2171
|
+
}), function() {
|
|
2172
|
+
o();
|
|
2173
|
+
};
|
|
2174
|
+
}).pipe(Ln(0));
|
|
2175
|
+
}
|
|
2176
|
+
function Or(e) {
|
|
2177
|
+
return O(qt(e));
|
|
2178
|
+
}
|
|
2179
|
+
function ci(e, t, n) {
|
|
2180
|
+
const r = `storage:task:${t.toString()}`, i = Ir(e);
|
|
2181
|
+
return g(r, i, n);
|
|
2182
|
+
}
|
|
2183
|
+
function kr(e, t) {
|
|
2184
|
+
const n = `storage:downloadUrl:${e.toString()}`, r = Or(e);
|
|
2185
|
+
return g(n, r, t);
|
|
2186
|
+
}
|
|
2187
|
+
function Ar(e) {
|
|
2188
|
+
const t = Pr();
|
|
2189
|
+
return e = Object.assign(Object.assign({}, e), {
|
|
2190
|
+
storage: t
|
|
2191
|
+
}), f.createElement(Ot, Object.assign({}, e));
|
|
2192
|
+
}
|
|
2193
|
+
function Ot(e) {
|
|
2194
|
+
let {
|
|
2195
|
+
storage: t,
|
|
2196
|
+
storagePath: n,
|
|
2197
|
+
suspense: r,
|
|
2198
|
+
placeHolder: i
|
|
2199
|
+
} = e, o = Zt(e, ["storage", "storagePath", "suspense", "placeHolder"]);
|
|
2200
|
+
const u = {
|
|
2201
|
+
suspense: re(r)
|
|
2202
|
+
};
|
|
2203
|
+
if (!t)
|
|
2204
|
+
throw new Error("Storage was not passed to component INTERNALStorageImage. This should not be possible");
|
|
2205
|
+
const {
|
|
2206
|
+
status: a,
|
|
2207
|
+
data: s
|
|
2208
|
+
} = kr(Qt(t, n), u);
|
|
2209
|
+
return a === "success" ? (o.alt || o.alt === "" || console.warn(`No alt prop provided for StorageImage with storagePath "${n}"`, "img elements must have an alt prop, either with meaningful text, or an empty string for decorative images"), f.createElement("img", Object.assign({
|
|
2210
|
+
src: s,
|
|
2211
|
+
alt: o.alt
|
|
2212
|
+
}, o))) : i != null ? i : f.createElement(f.Fragment, null, "''");
|
|
2213
|
+
}
|
|
2214
|
+
function li(e) {
|
|
2215
|
+
let {
|
|
2216
|
+
storage: t
|
|
2217
|
+
} = e;
|
|
2218
|
+
return t ? f.createElement(Ot, Object.assign({}, e)) : f.createElement(Ar, Object.assign({}, e));
|
|
2219
|
+
}
|
|
2220
|
+
const Fe = f.createContext(void 0), Pe = f.createContext(void 0), $e = f.createContext(void 0), Te = f.createContext(void 0), De = f.createContext(void 0), Re = f.createContext(void 0), je = f.createContext(void 0), Ue = f.createContext(void 0), Ve = f.createContext(void 0);
|
|
2221
|
+
function k(e) {
|
|
2222
|
+
return function(n) {
|
|
2223
|
+
var r, i;
|
|
2224
|
+
if (!n.sdk)
|
|
2225
|
+
throw new Error("no sdk provided");
|
|
2226
|
+
const o = yt().name;
|
|
2227
|
+
if (((i = (r = n == null ? void 0 : n.sdk) === null || r === void 0 ? void 0 : r.app) === null || i === void 0 ? void 0 : i.name) !== o)
|
|
2228
|
+
throw new Error("sdk was initialized with a different firebase app");
|
|
2229
|
+
return f.createElement(e.Provider, Object.assign({
|
|
2230
|
+
value: n.sdk
|
|
2231
|
+
}, n));
|
|
2232
|
+
};
|
|
2233
|
+
}
|
|
2234
|
+
function A(e) {
|
|
2235
|
+
const t = f.useContext(e);
|
|
2236
|
+
if (!t)
|
|
2237
|
+
throw new Error("SDK not found. useSdk must be called from within a provider");
|
|
2238
|
+
return t;
|
|
2239
|
+
}
|
|
2240
|
+
function F(e, t, n, r) {
|
|
2241
|
+
const i = yt();
|
|
2242
|
+
if (f.useContext(t))
|
|
2243
|
+
throw new Error(`Cannot initialize SDK ${e} because it already exists in Context`);
|
|
2244
|
+
const o = f.useMemo(() => n(i), [i]);
|
|
2245
|
+
return g(`firebase-sdk:${e}:${i.name}`, O(o), r);
|
|
2246
|
+
}
|
|
2247
|
+
const fi = k(Fe), di = k(Pe), vi = k($e), hi = k(Te), pi = k(De), mi = k(Re), bi = k(Ue), yi = k(je), gi = k(Ve), wi = () => A(Fe), kt = () => A(Pe), _i = () => A($e), Si = () => A(Te), Ci = () => A(De), Fr = () => A(Re), Ei = () => A(Ue), Pr = () => A(je), $r = () => A(Ve), xi = (e, t) => F("appcheck", Fe, e, t), Ii = (e, t) => F("auth", Pe, e, t), Oi = (e, t) => F("analytics", $e, e, t), ki = (e, t) => F("database", Te, e, t), Ai = (e, t) => F("firestore", De, e, t), Fi = (e, t) => F("functions", Re, e, t), Pi = (e, t) => F("performance", Ue, e, t), $i = (e, t) => F("remoteconfig", Ve, e, t), Ti = (e, t) => F("storage", je, e, t);
|
|
2248
|
+
class Me extends Error {
|
|
2249
|
+
constructor(t, n, r) {
|
|
2250
|
+
super(n), this.code = t, this.customData = r, this.name = "ReactFireError", Object.setPrototypeOf(this, Me.prototype);
|
|
2251
|
+
}
|
|
2252
|
+
}
|
|
2253
|
+
function At(e, t) {
|
|
2254
|
+
if (t === "idField" || t === "initialData" || t === "suspense")
|
|
2255
|
+
return e ? e[t] : void 0;
|
|
2256
|
+
throw new Error(`Field "${t}" is not a valid key in ReactFireOptions`);
|
|
2257
|
+
}
|
|
2258
|
+
function Di(e) {
|
|
2259
|
+
return At(e, "initialData");
|
|
2260
|
+
}
|
|
2261
|
+
function K(e) {
|
|
2262
|
+
return At(e, "idField");
|
|
8
2263
|
}
|
|
2264
|
+
export {
|
|
2265
|
+
vi as AnalyticsProvider,
|
|
2266
|
+
$e as AnalyticsSdkContext,
|
|
2267
|
+
fi as AppCheckProvider,
|
|
2268
|
+
Fe as AppCheckSdkContext,
|
|
2269
|
+
Qr as AuthCheck,
|
|
2270
|
+
di as AuthProvider,
|
|
2271
|
+
Pe as AuthSdkContext,
|
|
2272
|
+
or as ClaimsCheck,
|
|
2273
|
+
hi as DatabaseProvider,
|
|
2274
|
+
Te as DatabaseSdkContext,
|
|
2275
|
+
Lr as FirebaseAppProvider,
|
|
2276
|
+
pi as FirestoreProvider,
|
|
2277
|
+
De as FirestoreSdkContext,
|
|
2278
|
+
mi as FunctionsProvider,
|
|
2279
|
+
Re as FunctionsSdkContext,
|
|
2280
|
+
bi as PerformanceProvider,
|
|
2281
|
+
Ue as PerformanceSdkContext,
|
|
2282
|
+
Me as ReactFireError,
|
|
2283
|
+
gi as RemoteConfigProvider,
|
|
2284
|
+
Ve as RemoteConfigSdkContext,
|
|
2285
|
+
li as StorageImage,
|
|
2286
|
+
yi as StorageProvider,
|
|
2287
|
+
je as StorageSdkContext,
|
|
2288
|
+
ri as SuspenseWithPerf,
|
|
2289
|
+
K as checkIdField,
|
|
2290
|
+
At as checkOptions,
|
|
2291
|
+
Di as checkinitialData,
|
|
2292
|
+
Jr as preloadFirestoreDoc,
|
|
2293
|
+
Ae as preloadObservable,
|
|
2294
|
+
Wr as preloadUser,
|
|
2295
|
+
_i as useAnalytics,
|
|
2296
|
+
wi as useAppCheck,
|
|
2297
|
+
kt as useAuth,
|
|
2298
|
+
ni as useCallableFunctionResponse,
|
|
2299
|
+
Si as useDatabase,
|
|
2300
|
+
Yr as useDatabaseList,
|
|
2301
|
+
Gr as useDatabaseListData,
|
|
2302
|
+
Kr as useDatabaseObject,
|
|
2303
|
+
Hr as useDatabaseObjectData,
|
|
2304
|
+
yt as useFirebaseApp,
|
|
2305
|
+
Ci as useFirestore,
|
|
2306
|
+
ei as useFirestoreCollection,
|
|
2307
|
+
ti as useFirestoreCollectionData,
|
|
2308
|
+
zr as useFirestoreDoc,
|
|
2309
|
+
Br as useFirestoreDocData,
|
|
2310
|
+
Xr as useFirestoreDocDataOnce,
|
|
2311
|
+
Zr as useFirestoreDocOnce,
|
|
2312
|
+
Fr as useFunctions,
|
|
2313
|
+
rr as useIdTokenResult,
|
|
2314
|
+
Oi as useInitAnalytics,
|
|
2315
|
+
xi as useInitAppCheck,
|
|
2316
|
+
Ii as useInitAuth,
|
|
2317
|
+
ki as useInitDatabase,
|
|
2318
|
+
Ai as useInitFirestore,
|
|
2319
|
+
Fi as useInitFunctions,
|
|
2320
|
+
Pi as useInitPerformance,
|
|
2321
|
+
$i as useInitRemoteConfig,
|
|
2322
|
+
Ti as useInitStorage,
|
|
2323
|
+
Nr as useIsSuspenseEnabled,
|
|
2324
|
+
g as useObservable,
|
|
2325
|
+
Ei as usePerformance,
|
|
2326
|
+
$r as useRemoteConfig,
|
|
2327
|
+
si as useRemoteConfigAll,
|
|
2328
|
+
ai as useRemoteConfigBoolean,
|
|
2329
|
+
ui as useRemoteConfigNumber,
|
|
2330
|
+
oi as useRemoteConfigString,
|
|
2331
|
+
ii as useRemoteConfigValue,
|
|
2332
|
+
qr as useSigninCheck,
|
|
2333
|
+
Pr as useStorage,
|
|
2334
|
+
kr as useStorageDownloadURL,
|
|
2335
|
+
ci as useStorageTask,
|
|
2336
|
+
re as useSuspenseEnabledFromConfigAndContext,
|
|
2337
|
+
nr as useUser,
|
|
2338
|
+
er as version
|
|
2339
|
+
};
|
|
2340
|
+
//# sourceMappingURL=index.js.map
|