@firebase/firestore 4.4.0-canary.2e32eebb5 → 4.4.0-canary.50b2182d7
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/index.cjs.js +74 -74
- package/dist/index.esm2017.js +74 -74
- package/dist/index.esm5.js +68 -68
- package/dist/index.node.cjs.js +2 -2
- package/dist/index.node.mjs +2 -2
- package/dist/index.rn.js +78 -78
- package/dist/lite/index.browser.esm2017.js +2 -2
- package/dist/lite/index.browser.esm5.js +2 -2
- package/dist/lite/index.cjs.js +2 -2
- package/dist/lite/index.node.cjs.js +2 -2
- package/dist/lite/index.node.mjs +2 -2
- package/dist/lite/index.rn.esm2017.js +2 -2
- package/dist/packages/firestore/dist/index.esm2017.d.ts +14 -14
- package/package.json +9 -9
package/dist/index.esm5.js
CHANGED
|
@@ -70,7 +70,7 @@ k.MOCK_USER = new k("mock-user");
|
|
|
70
70
|
* See the License for the specific language governing permissions and
|
|
71
71
|
* limitations under the License.
|
|
72
72
|
*/
|
|
73
|
-
var O = "10.7.1-canary.
|
|
73
|
+
var O = "10.7.1-canary.50b2182d7", P = new l("@firebase/firestore");
|
|
74
74
|
|
|
75
75
|
/**
|
|
76
76
|
* @license
|
|
@@ -5560,16 +5560,16 @@ var pi = /** @class */ function() {
|
|
|
5560
5560
|
throw new vi("Invalid padding when bitmap length is 0: ".concat(e));
|
|
5561
5561
|
this.Te = 8 * t.length - e,
|
|
5562
5562
|
// Set the bit count in Integer to avoid repetition in mightContain().
|
|
5563
|
-
this.
|
|
5563
|
+
this.de = b.fromNumber(this.Te);
|
|
5564
5564
|
}
|
|
5565
5565
|
// Calculate the ith hash value based on the hashed 64bit integers,
|
|
5566
5566
|
// and calculate its corresponding bit index in the bitmap to be checked.
|
|
5567
|
-
return t.prototype.
|
|
5567
|
+
return t.prototype.Ee = function(t, e, n) {
|
|
5568
5568
|
// Calculate hashed value h(i) = h1 + (i * h2).
|
|
5569
5569
|
var r = t.add(e.multiply(b.fromNumber(n)));
|
|
5570
5570
|
// Wrap if hash value overflow 64bit.
|
|
5571
5571
|
return 1 === r.compare(hi) && (r = new b([ r.getBits(0), r.getBits(1) ], 0)),
|
|
5572
|
-
r.modulo(this.
|
|
5572
|
+
r.modulo(this.de).toNumber();
|
|
5573
5573
|
},
|
|
5574
5574
|
// Return whether the bit on the given index in the bitmap is set to 1.
|
|
5575
5575
|
t.prototype.Ae = function(t) {
|
|
@@ -5578,7 +5578,7 @@ var pi = /** @class */ function() {
|
|
|
5578
5578
|
// Empty bitmap should always return false on membership check.
|
|
5579
5579
|
if (0 === this.Te) return !1;
|
|
5580
5580
|
for (var e = di(fi(t)), n = e[0], r = e[1], i = 0; i < this.hashCount; i++) {
|
|
5581
|
-
var o = this.
|
|
5581
|
+
var o = this.Ee(n, r, i);
|
|
5582
5582
|
if (!this.Ae(o)) return !1;
|
|
5583
5583
|
}
|
|
5584
5584
|
return !0;
|
|
@@ -5590,7 +5590,7 @@ var pi = /** @class */ function() {
|
|
|
5590
5590
|
})), o;
|
|
5591
5591
|
}, t.prototype.insert = function(t) {
|
|
5592
5592
|
if (0 !== this.Te) for (var e = di(fi(t)), n = e[0], r = e[1], i = 0; i < this.hashCount; i++) {
|
|
5593
|
-
var o = this.
|
|
5593
|
+
var o = this.Ee(n, r, i);
|
|
5594
5594
|
this.Re(o);
|
|
5595
5595
|
}
|
|
5596
5596
|
}, t.prototype.Re = function(t) {
|
|
@@ -7093,25 +7093,25 @@ function yo(t, e, n, r) {
|
|
|
7093
7093
|
e.It();
|
|
7094
7094
|
}, t.prototype.Pt = function(t, e) {
|
|
7095
7095
|
if ("nullValue" in t) this.Tt(e, 5); else if ("booleanValue" in t) this.Tt(e, 10),
|
|
7096
|
-
e.
|
|
7096
|
+
e.dt(t.booleanValue ? 1 : 0); else if ("integerValue" in t) this.Tt(e, 15), e.dt(Re(t.integerValue)); else if ("doubleValue" in t) {
|
|
7097
7097
|
var n = Re(t.doubleValue);
|
|
7098
7098
|
isNaN(n) ? this.Tt(e, 13) : (this.Tt(e, 15), zt(n) ?
|
|
7099
7099
|
// -0.0, 0 and 0.0 are all considered the same
|
|
7100
|
-
e.
|
|
7100
|
+
e.dt(0) : e.dt(n));
|
|
7101
7101
|
} else if ("timestampValue" in t) {
|
|
7102
7102
|
var r = t.timestampValue;
|
|
7103
|
-
this.Tt(e, 20), "string" == typeof r ? e.
|
|
7104
|
-
e.
|
|
7103
|
+
this.Tt(e, 20), "string" == typeof r ? e.Et(r) : (e.Et("".concat(r.seconds || "")),
|
|
7104
|
+
e.dt(r.nanos || 0));
|
|
7105
7105
|
} else if ("stringValue" in t) this.At(t.stringValue, e), this.Rt(e); else if ("bytesValue" in t) this.Tt(e, 30),
|
|
7106
7106
|
e.Vt(Fe(t.bytesValue)), this.Rt(e); else if ("referenceValue" in t) this.ft(t.referenceValue, e); else if ("geoPointValue" in t) {
|
|
7107
7107
|
var i = t.geoPointValue;
|
|
7108
|
-
this.Tt(e, 45), e.
|
|
7108
|
+
this.Tt(e, 45), e.dt(i.latitude || 0), e.dt(i.longitude || 0);
|
|
7109
7109
|
} else "mapValue" in t ? on(t) ? this.Tt(e, Number.MAX_SAFE_INTEGER) : (this.gt(t.mapValue, e),
|
|
7110
7110
|
this.Rt(e)) : "arrayValue" in t ? (this.yt(t.arrayValue, e), this.Rt(e)) : U();
|
|
7111
7111
|
}, t.prototype.At = function(t, e) {
|
|
7112
7112
|
this.Tt(e, 25), this.wt(t, e);
|
|
7113
7113
|
}, t.prototype.wt = function(t, e) {
|
|
7114
|
-
e.
|
|
7114
|
+
e.Et(t);
|
|
7115
7115
|
}, t.prototype.gt = function(t, e) {
|
|
7116
7116
|
var n = t.fields || {};
|
|
7117
7117
|
this.Tt(e, 55);
|
|
@@ -7132,12 +7132,12 @@ function yo(t, e, n, r) {
|
|
|
7132
7132
|
n.Tt(e, 60), n.wt(t, e);
|
|
7133
7133
|
}));
|
|
7134
7134
|
}, t.prototype.Tt = function(t, e) {
|
|
7135
|
-
t.
|
|
7135
|
+
t.dt(e);
|
|
7136
7136
|
}, t.prototype.Rt = function(t) {
|
|
7137
7137
|
// While the SDK does not implement truncation, the truncation marker is
|
|
7138
7138
|
// used to terminate all variable length values (which are strings, bytes,
|
|
7139
7139
|
// references, arrays and maps).
|
|
7140
|
-
t.
|
|
7140
|
+
t.dt(2);
|
|
7141
7141
|
}, t;
|
|
7142
7142
|
}();
|
|
7143
7143
|
|
|
@@ -7312,9 +7312,9 @@ var xo = /** @class */ function() {
|
|
|
7312
7312
|
}
|
|
7313
7313
|
return t.prototype.Vt = function(t) {
|
|
7314
7314
|
this.Wt.bt(t);
|
|
7315
|
-
}, t.prototype.dt = function(t) {
|
|
7316
|
-
this.Wt.xt(t);
|
|
7317
7315
|
}, t.prototype.Et = function(t) {
|
|
7316
|
+
this.Wt.xt(t);
|
|
7317
|
+
}, t.prototype.dt = function(t) {
|
|
7318
7318
|
this.Wt.Nt(t);
|
|
7319
7319
|
}, t.prototype.It = function() {
|
|
7320
7320
|
this.Wt.qt();
|
|
@@ -7325,9 +7325,9 @@ var xo = /** @class */ function() {
|
|
|
7325
7325
|
}
|
|
7326
7326
|
return t.prototype.Vt = function(t) {
|
|
7327
7327
|
this.Wt.vt(t);
|
|
7328
|
-
}, t.prototype.dt = function(t) {
|
|
7329
|
-
this.Wt.Ot(t);
|
|
7330
7328
|
}, t.prototype.Et = function(t) {
|
|
7329
|
+
this.Wt.Ot(t);
|
|
7330
|
+
}, t.prototype.dt = function(t) {
|
|
7331
7331
|
this.Wt.kt(t);
|
|
7332
7332
|
}, t.prototype.It = function() {
|
|
7333
7333
|
this.Wt.Kt();
|
|
@@ -8002,7 +8002,7 @@ var Go = /** @class */ function() {
|
|
|
8002
8002
|
*/
|
|
8003
8003
|
t.prototype.Pn = function(t, e, n, r, i, o, a) {
|
|
8004
8004
|
for (var u = this, s = (null != e ? e.length : 1) * Math.max(n.length, i.length), c = s / (null != e ? e.length : 1), l = [], h = function(s) {
|
|
8005
|
-
var h = e ? f.In(e[s / c]) : jo, d = f.Tn(t, h, n[s % c], r), p = f.
|
|
8005
|
+
var h = e ? f.In(e[s / c]) : jo, d = f.Tn(t, h, n[s % c], r), p = f.dn(t, h, i[s % c], o), v = a.map((function(e) {
|
|
8006
8006
|
return u.Tn(t, h, e,
|
|
8007
8007
|
/* inclusive= */ !0);
|
|
8008
8008
|
}));
|
|
@@ -8019,7 +8019,7 @@ var Go = /** @class */ function() {
|
|
|
8019
8019
|
var i = new Ao(t, dt.empty(), e, n);
|
|
8020
8020
|
return r ? i : i.Ht();
|
|
8021
8021
|
},
|
|
8022
|
-
/** Generates the upper bound for `arrayValue` and `directionalValue`. */ t.prototype.
|
|
8022
|
+
/** Generates the upper bound for `arrayValue` and `directionalValue`. */ t.prototype.dn = function(t, e, n, r) {
|
|
8023
8023
|
var i = new Ao(t, dt.empty(), e, n);
|
|
8024
8024
|
return r ? i.Ht() : i;
|
|
8025
8025
|
}, t.prototype.cn = function(t, e) {
|
|
@@ -8072,7 +8072,7 @@ var Go = /** @class */ function() {
|
|
|
8072
8072
|
* Returns `null` if the document does not have all fields specified in the
|
|
8073
8073
|
* index.
|
|
8074
8074
|
*/
|
|
8075
|
-
t.prototype.
|
|
8075
|
+
t.prototype.En = function(t, e) {
|
|
8076
8076
|
for (var n = new No, r = 0, i = mt(t); r < i.length; r++) {
|
|
8077
8077
|
var o = i[r], a = e.data.field(o.fieldPath);
|
|
8078
8078
|
if (null == a) return null;
|
|
@@ -8216,7 +8216,7 @@ var Go = /** @class */ function() {
|
|
|
8216
8216
|
}));
|
|
8217
8217
|
},
|
|
8218
8218
|
/** Creates the index entries for the given document. */ t.prototype.pn = function(t, e) {
|
|
8219
|
-
var n = new Se(ko), r = this.
|
|
8219
|
+
var n = new Se(ko), r = this.En(e, t);
|
|
8220
8220
|
if (null == r) return n;
|
|
8221
8221
|
var i = vt(e);
|
|
8222
8222
|
if (null != i) {
|
|
@@ -10214,7 +10214,7 @@ e) {
|
|
|
10214
10214
|
var n = new Pa(t, e);
|
|
10215
10215
|
this.hr = this.hr.add(n), this.Ir = this.Ir.add(n);
|
|
10216
10216
|
},
|
|
10217
|
-
/** Add references to the given document keys for the given ID. */ t.prototype.
|
|
10217
|
+
/** Add references to the given document keys for the given ID. */ t.prototype.dr = function(t, e) {
|
|
10218
10218
|
var n = this;
|
|
10219
10219
|
t.forEach((function(t) {
|
|
10220
10220
|
return n.addReference(t, e);
|
|
@@ -10225,7 +10225,7 @@ e) {
|
|
|
10225
10225
|
* ID.
|
|
10226
10226
|
*/
|
|
10227
10227
|
t.prototype.removeReference = function(t, e) {
|
|
10228
|
-
this.
|
|
10228
|
+
this.Er(new Pa(t, e));
|
|
10229
10229
|
}, t.prototype.Ar = function(t, e) {
|
|
10230
10230
|
var n = this;
|
|
10231
10231
|
t.forEach((function(t) {
|
|
@@ -10239,14 +10239,14 @@ e) {
|
|
|
10239
10239
|
t.prototype.Rr = function(t) {
|
|
10240
10240
|
var e = this, n = new dt(new lt([])), r = new Pa(n, t), i = new Pa(n, t + 1), o = [];
|
|
10241
10241
|
return this.Ir.forEachInRange([ r, i ], (function(t) {
|
|
10242
|
-
e.
|
|
10242
|
+
e.Er(t), o.push(t.key);
|
|
10243
10243
|
})), o;
|
|
10244
10244
|
}, t.prototype.Vr = function() {
|
|
10245
10245
|
var t = this;
|
|
10246
10246
|
this.hr.forEach((function(e) {
|
|
10247
|
-
return t.
|
|
10247
|
+
return t.Er(e);
|
|
10248
10248
|
}));
|
|
10249
|
-
}, t.prototype.
|
|
10249
|
+
}, t.prototype.Er = function(t) {
|
|
10250
10250
|
this.hr = this.hr.delete(t), this.Ir = this.Ir.delete(t);
|
|
10251
10251
|
}, t.prototype.mr = function(t) {
|
|
10252
10252
|
var e = new dt(new lt([])), n = new Pa(e, t), r = new Pa(e, t + 1), i = wr();
|
|
@@ -10548,7 +10548,7 @@ e) {
|
|
|
10548
10548
|
var n = this.Fr.get(e) || null;
|
|
10549
10549
|
return Ct.resolve(n);
|
|
10550
10550
|
}, t.prototype.addMatchingKeys = function(t, e, n) {
|
|
10551
|
-
return this.Or.
|
|
10551
|
+
return this.Or.dr(e, n), Ct.resolve();
|
|
10552
10552
|
}, t.prototype.removeMatchingKeys = function(t, e, n) {
|
|
10553
10553
|
this.Or.Ar(e, n);
|
|
10554
10554
|
var r = this.persistence.referenceDelegate, i = [];
|
|
@@ -11118,7 +11118,7 @@ var Ka = "Failed to obtain exclusive access to the persistence layer. To allow s
|
|
|
11118
11118
|
}, !t.D()) throw new j(K.UNIMPLEMENTED, "This platform is either missing IndexedDB or is known to have an incomplete implementation. Offline persistence has been disabled.");
|
|
11119
11119
|
this.referenceDelegate = new ya(this, i), this.Ii = n + "main", this.serializer = new oo(s),
|
|
11120
11120
|
this.Ti = new At(this.Ii, this.ai, new za(this.serializer)), this.qr = new sa(this.referenceDelegate, this.serializer),
|
|
11121
|
-
this.remoteDocumentCache = Ia(this.serializer), this.Kr = new go, this.window && this.window.localStorage ? this.
|
|
11121
|
+
this.remoteDocumentCache = Ia(this.serializer), this.Kr = new go, this.window && this.window.localStorage ? this.di = this.window.localStorage : (this.di = null,
|
|
11122
11122
|
!1 === l && L("IndexedDbPersistence", "LocalStorage is unavailable. As a result, persistence may not work reliably. In particular enablePersistence() could fail immediately after refreshing the page."));
|
|
11123
11123
|
}
|
|
11124
11124
|
/**
|
|
@@ -11130,7 +11130,7 @@ var Ka = "Failed to obtain exclusive access to the persistence layer. To allow s
|
|
|
11130
11130
|
// NOTE: This is expected to fail sometimes (in the case of another tab
|
|
11131
11131
|
// already having the persistence lock), so it's the first thing we should
|
|
11132
11132
|
// do.
|
|
11133
|
-
return this.
|
|
11133
|
+
return this.Ei().then((function() {
|
|
11134
11134
|
if (!t.isPrimary && !t.allowTabSynchronization)
|
|
11135
11135
|
// Fail `start()` if `synchronizeTabs` is disabled and we cannot
|
|
11136
11136
|
// obtain the primary lease.
|
|
@@ -11204,7 +11204,7 @@ var Ka = "Failed to obtain exclusive access to the persistence layer. To allow s
|
|
|
11204
11204
|
return n(this, (function(t) {
|
|
11205
11205
|
switch (t.label) {
|
|
11206
11206
|
case 0:
|
|
11207
|
-
return this.started ? [ 4 /*yield*/ , this.
|
|
11207
|
+
return this.started ? [ 4 /*yield*/ , this.Ei() ] : [ 3 /*break*/ , 2 ];
|
|
11208
11208
|
|
|
11209
11209
|
case 1:
|
|
11210
11210
|
t.sent(), t.label = 2;
|
|
@@ -11222,7 +11222,7 @@ var Ka = "Failed to obtain exclusive access to the persistence layer. To allow s
|
|
|
11222
11222
|
* primary state listener if the client either newly obtained or released its
|
|
11223
11223
|
* primary lease.
|
|
11224
11224
|
*/
|
|
11225
|
-
t.prototype.
|
|
11225
|
+
t.prototype.Ei = function() {
|
|
11226
11226
|
var t = this;
|
|
11227
11227
|
return this.runTransaction("updateClientMetadataAndTryBecomePrimary", "readwrite", (function(e) {
|
|
11228
11228
|
return Wa(e).put({
|
|
@@ -11301,7 +11301,7 @@ var Ka = "Failed to obtain exclusive access to the persistence layer. To allow s
|
|
|
11301
11301
|
// Ideally we'd delete the IndexedDb and LocalStorage zombie entries for
|
|
11302
11302
|
// the client atomically, but we can't. So we opt to delete the IndexedDb
|
|
11303
11303
|
// entries first to avoid potentially reviving a zombied client.
|
|
11304
|
-
if (t = n.sent(), this.
|
|
11304
|
+
if (t = n.sent(), this.di) for (e = 0, r = t; e < r.length; e++) i = r[e], this.di.removeItem(this.vi(i.clientId));
|
|
11305
11305
|
n.label = 2;
|
|
11306
11306
|
|
|
11307
11307
|
case 2:
|
|
@@ -11317,7 +11317,7 @@ var Ka = "Failed to obtain exclusive access to the persistence layer. To allow s
|
|
|
11317
11317
|
t.prototype.Vi = function() {
|
|
11318
11318
|
var t = this;
|
|
11319
11319
|
this.li = this.si.enqueueAfterDelay("client_metadata_refresh" /* TimerId.ClientMetadataRefresh */ , 4e3, (function() {
|
|
11320
|
-
return t.
|
|
11320
|
+
return t.Ei().then((function() {
|
|
11321
11321
|
return t.bi();
|
|
11322
11322
|
})).then((function() {
|
|
11323
11323
|
return t.Vi();
|
|
@@ -11523,7 +11523,7 @@ var Ka = "Failed to obtain exclusive access to the persistence layer. To allow s
|
|
|
11523
11523
|
var t = this;
|
|
11524
11524
|
null !== this.document && "function" == typeof this.document.addEventListener && (this.ci = function() {
|
|
11525
11525
|
t.si.enqueueAndForget((function() {
|
|
11526
|
-
return t.inForeground = "visible" === t.document.visibilityState, t.
|
|
11526
|
+
return t.inForeground = "visible" === t.document.visibilityState, t.Ei();
|
|
11527
11527
|
}));
|
|
11528
11528
|
}, this.document.addEventListener("visibilitychange", this.ci), this.inForeground = "visible" === this.document.visibilityState);
|
|
11529
11529
|
}, t.prototype.xi = function() {
|
|
@@ -11567,7 +11567,7 @@ var Ka = "Failed to obtain exclusive access to the persistence layer. To allow s
|
|
|
11567
11567
|
t.prototype.Fi = function(t) {
|
|
11568
11568
|
var e;
|
|
11569
11569
|
try {
|
|
11570
|
-
var n = null !== (null === (e = this.
|
|
11570
|
+
var n = null !== (null === (e = this.di) || void 0 === e ? void 0 : e.getItem(this.vi(t)));
|
|
11571
11571
|
return M("IndexedDbPersistence", "Client '".concat(t, "' ").concat(n ? "is" : "is not", " zombied in LocalStorage")),
|
|
11572
11572
|
n;
|
|
11573
11573
|
} catch (t) {
|
|
@@ -11580,16 +11580,16 @@ var Ka = "Failed to obtain exclusive access to the persistence layer. To allow s
|
|
|
11580
11580
|
* clients are ignored during primary tab selection.
|
|
11581
11581
|
*/
|
|
11582
11582
|
t.prototype.Mi = function() {
|
|
11583
|
-
if (this.
|
|
11584
|
-
this.
|
|
11583
|
+
if (this.di) try {
|
|
11584
|
+
this.di.setItem(this.vi(this.clientId), String(Date.now()));
|
|
11585
11585
|
} catch (t) {
|
|
11586
11586
|
// Gracefully handle if LocalStorage isn't available / working.
|
|
11587
11587
|
L("Failed to set zombie client id.", t);
|
|
11588
11588
|
}
|
|
11589
11589
|
},
|
|
11590
11590
|
/** Removes the zombied client entry if it exists. */ t.prototype.Ni = function() {
|
|
11591
|
-
if (this.
|
|
11592
|
-
this.
|
|
11591
|
+
if (this.di) try {
|
|
11592
|
+
this.di.removeItem(this.vi(this.clientId));
|
|
11593
11593
|
} catch (t) {
|
|
11594
11594
|
// Ignore
|
|
11595
11595
|
}
|
|
@@ -12476,7 +12476,7 @@ var yu = /** @class */ function() {
|
|
|
12476
12476
|
return a && o.error && ((a = "string" == typeof o.error.message && "string" == typeof o.error.code) && (i = new j(o.error.code, o.error.message))),
|
|
12477
12477
|
a ? new t(e, n, o.state, i) : (L("SharedClientState", "Failed to parse mutation state for ID '".concat(n, "': ").concat(r)),
|
|
12478
12478
|
null);
|
|
12479
|
-
}, t.prototype.
|
|
12479
|
+
}, t.prototype.ds = function() {
|
|
12480
12480
|
var t = {
|
|
12481
12481
|
state: this.state,
|
|
12482
12482
|
updateTimeMs: Date.now()
|
|
@@ -12499,7 +12499,7 @@ var yu = /** @class */ function() {
|
|
|
12499
12499
|
return o && i.error && ((o = "string" == typeof i.error.message && "string" == typeof i.error.code) && (r = new j(i.error.code, i.error.message))),
|
|
12500
12500
|
o ? new t(e, i.state, r) : (L("SharedClientState", "Failed to parse target state for ID '".concat(e, "': ").concat(n)),
|
|
12501
12501
|
null);
|
|
12502
|
-
}, t.prototype.
|
|
12502
|
+
}, t.prototype.ds = function() {
|
|
12503
12503
|
var t = {
|
|
12504
12504
|
state: this.state,
|
|
12505
12505
|
updateTimeMs: Date.now()
|
|
@@ -12540,7 +12540,7 @@ var yu = /** @class */ function() {
|
|
|
12540
12540
|
function t() {
|
|
12541
12541
|
this.activeTargetIds = Ir();
|
|
12542
12542
|
}
|
|
12543
|
-
return t.prototype.
|
|
12543
|
+
return t.prototype.Es = function(t) {
|
|
12544
12544
|
this.activeTargetIds = this.activeTargetIds.add(t);
|
|
12545
12545
|
}, t.prototype.As = function(t) {
|
|
12546
12546
|
this.activeTargetIds = this.activeTargetIds.delete(t);
|
|
@@ -12549,7 +12549,7 @@ var yu = /** @class */ function() {
|
|
|
12549
12549
|
* Converts this entry into a JSON-encoded format we can use for WebStorage.
|
|
12550
12550
|
* Does not encode `clientId` as it is part of the key in WebStorage.
|
|
12551
12551
|
*/
|
|
12552
|
-
t.prototype.
|
|
12552
|
+
t.prototype.ds = function() {
|
|
12553
12553
|
var t = {
|
|
12554
12554
|
activeTargetIds: this.activeTargetIds.toArray(),
|
|
12555
12555
|
updateTimeMs: Date.now()
|
|
@@ -12642,7 +12642,7 @@ var yu = /** @class */ function() {
|
|
|
12642
12642
|
r && (e = r.state);
|
|
12643
12643
|
}
|
|
12644
12644
|
}
|
|
12645
|
-
return this.Ls.
|
|
12645
|
+
return this.Ls.Es(t), this.Fs(), e;
|
|
12646
12646
|
}, t.prototype.removeLocalQueryTarget = function(t) {
|
|
12647
12647
|
this.Ls.As(t), this.Fs();
|
|
12648
12648
|
}, t.prototype.isLocalQueryTarget = function(t) {
|
|
@@ -12736,10 +12736,10 @@ var yu = /** @class */ function() {
|
|
|
12736
12736
|
enumerable: !1,
|
|
12737
12737
|
configurable: !0
|
|
12738
12738
|
}), t.prototype.Fs = function() {
|
|
12739
|
-
this.setItem(this.ys, this.Ls.
|
|
12739
|
+
this.setItem(this.ys, this.Ls.ds());
|
|
12740
12740
|
}, t.prototype.Ns = function(t, e, n) {
|
|
12741
12741
|
var r = new yu(this.currentUser, t, e, n), i = vu(this.persistenceKey, this.currentUser, t);
|
|
12742
|
-
this.setItem(i, r.
|
|
12742
|
+
this.setItem(i, r.ds());
|
|
12743
12743
|
}, t.prototype.Bs = function(t) {
|
|
12744
12744
|
var e = vu(this.persistenceKey, this.currentUser, t);
|
|
12745
12745
|
this.removeItem(e);
|
|
@@ -12751,7 +12751,7 @@ var yu = /** @class */ function() {
|
|
|
12751
12751
|
this.storage.setItem(this.Cs, JSON.stringify(e));
|
|
12752
12752
|
}, t.prototype.ks = function(t, e, n) {
|
|
12753
12753
|
var r = mu(this.persistenceKey, t), i = new gu(t, e, n);
|
|
12754
|
-
this.setItem(r, i.
|
|
12754
|
+
this.setItem(r, i.ds());
|
|
12755
12755
|
}, t.prototype.Qs = function(t) {
|
|
12756
12756
|
var e = JSON.stringify(Array.from(t));
|
|
12757
12757
|
this.setItem(this.vs, e);
|
|
@@ -12836,7 +12836,7 @@ var yu = /** @class */ function() {
|
|
|
12836
12836
|
}, t.prototype.updateMutationState = function(t, e, n) {
|
|
12837
12837
|
// No op.
|
|
12838
12838
|
}, t.prototype.addLocalQueryTarget = function(t) {
|
|
12839
|
-
return this.eo.
|
|
12839
|
+
return this.eo.Es(t), this.no[t] || "not-current";
|
|
12840
12840
|
}, t.prototype.updateQueryState = function(t, e, n) {
|
|
12841
12841
|
this.no[t] = e;
|
|
12842
12842
|
}, t.prototype.removeLocalQueryTarget = function(t) {
|
|
@@ -13825,7 +13825,7 @@ function Ou() {
|
|
|
13825
13825
|
* required to make the StreamingWrite RPC work. Subsequent
|
|
13826
13826
|
* calls should wait until onHandshakeComplete was called.
|
|
13827
13827
|
*/
|
|
13828
|
-
n.prototype.
|
|
13828
|
+
n.prototype.d_ = function() {
|
|
13829
13829
|
// TODO(dimond): Support stream resumption. We intentionally do not set the
|
|
13830
13830
|
// stream token on the handshake, ignoring any stream token we might have.
|
|
13831
13831
|
var t = {};
|
|
@@ -13844,10 +13844,10 @@ function Ou() {
|
|
|
13844
13844
|
function n(t, n, r, i) {
|
|
13845
13845
|
var o = this;
|
|
13846
13846
|
return (o = e.call(this) || this).authCredentials = t, o.appCheckCredentials = n,
|
|
13847
|
-
o.connection = r, o.serializer = i, o.
|
|
13847
|
+
o.connection = r, o.serializer = i, o.E_ = !1, o;
|
|
13848
13848
|
}
|
|
13849
13849
|
return t(n, e), n.prototype.A_ = function() {
|
|
13850
|
-
if (this.
|
|
13850
|
+
if (this.E_) throw new j(K.FAILED_PRECONDITION, "The client has already been terminated.");
|
|
13851
13851
|
},
|
|
13852
13852
|
/** Invokes the provided RPC with auth and AppCheck tokens. */ n.prototype.wo = function(t, e, n) {
|
|
13853
13853
|
var r = this;
|
|
@@ -13869,7 +13869,7 @@ function Ou() {
|
|
|
13869
13869
|
i.appCheckCredentials.invalidateToken()), t) : new j(K.UNKNOWN, t.toString());
|
|
13870
13870
|
}));
|
|
13871
13871
|
}, n.prototype.terminate = function() {
|
|
13872
|
-
this.
|
|
13872
|
+
this.E_ = !0, this.connection.terminate();
|
|
13873
13873
|
}, n;
|
|
13874
13874
|
}((function() {}));
|
|
13875
13875
|
|
|
@@ -14494,7 +14494,7 @@ function os(t) {
|
|
|
14494
14494
|
function as(t) {
|
|
14495
14495
|
return e(this, void 0, void 0, (function() {
|
|
14496
14496
|
return n(this, (function(e) {
|
|
14497
|
-
return ds(t).
|
|
14497
|
+
return ds(t).d_(), [ 2 /*return*/ ];
|
|
14498
14498
|
}));
|
|
14499
14499
|
}));
|
|
14500
14500
|
}
|
|
@@ -15496,7 +15496,7 @@ function As(t) {
|
|
|
15496
15496
|
/**
|
|
15497
15497
|
* Returns whether the doc for the given key should be in limbo.
|
|
15498
15498
|
*/
|
|
15499
|
-
t.prototype.
|
|
15499
|
+
t.prototype.da = function(t) {
|
|
15500
15500
|
// If the remote end says it's part of this query, it's not in limbo.
|
|
15501
15501
|
return !this.ia.has(t) &&
|
|
15502
15502
|
// The local store doesn't think it's a result, so it shouldn't be in limbo.
|
|
@@ -15521,7 +15521,7 @@ function As(t) {
|
|
|
15521
15521
|
// updating many documents.
|
|
15522
15522
|
var e = this.oa;
|
|
15523
15523
|
this.oa = wr(), this.aa.forEach((function(e) {
|
|
15524
|
-
t.
|
|
15524
|
+
t.da(e.key) && (t.oa = t.oa.add(e.key));
|
|
15525
15525
|
}));
|
|
15526
15526
|
// Diff the new limbo docs with the old limbo docs.
|
|
15527
15527
|
var n = [];
|
|
@@ -15551,7 +15551,7 @@ function As(t) {
|
|
|
15551
15551
|
* @returns The ViewChange that resulted from this synchronization.
|
|
15552
15552
|
*/
|
|
15553
15553
|
// PORTING NOTE: Multi-tab only.
|
|
15554
|
-
t.prototype.
|
|
15554
|
+
t.prototype.Ea = function(t) {
|
|
15555
15555
|
this.ia = t.ls, this.oa = wr();
|
|
15556
15556
|
var e = this.ca(t.documents);
|
|
15557
15557
|
return this.applyChanges(e, /* limboResolutionEnabled= */ !0);
|
|
@@ -16316,7 +16316,7 @@ function nc(t, e) {
|
|
|
16316
16316
|
/* usePreviousResults= */ !0) ];
|
|
16317
16317
|
|
|
16318
16318
|
case 1:
|
|
16319
|
-
return i = n.sent(), o = r.view.
|
|
16319
|
+
return i = n.sent(), o = r.view.Ea(i), [ 2 /*return*/ , (e.isPrimaryClient && Xs(e, r.targetId, o.Ta),
|
|
16320
16320
|
o) ];
|
|
16321
16321
|
}
|
|
16322
16322
|
}));
|
|
@@ -19606,16 +19606,16 @@ function(t) {
|
|
|
19606
19606
|
}),
|
|
19607
19607
|
/** Returns a new context with the specified settings overwritten. */ t.prototype.Tu = function(e) {
|
|
19608
19608
|
return new t(Object.assign(Object.assign({}, this.settings), e), this.databaseId, this.serializer, this.ignoreUndefinedProperties, this.fieldTransforms, this.fieldMask);
|
|
19609
|
-
}, t.prototype.
|
|
19609
|
+
}, t.prototype.du = function(t) {
|
|
19610
19610
|
var e, n = null === (e = this.path) || void 0 === e ? void 0 : e.child(t), r = this.Tu({
|
|
19611
19611
|
path: n,
|
|
19612
|
-
|
|
19612
|
+
Eu: !1
|
|
19613
19613
|
});
|
|
19614
19614
|
return r.Au(t), r;
|
|
19615
19615
|
}, t.prototype.Ru = function(t) {
|
|
19616
19616
|
var e, n = null === (e = this.path) || void 0 === e ? void 0 : e.child(t), r = this.Tu({
|
|
19617
19617
|
path: n,
|
|
19618
|
-
|
|
19618
|
+
Eu: !1
|
|
19619
19619
|
});
|
|
19620
19620
|
return r.Pu(), r;
|
|
19621
19621
|
}, t.prototype.Vu = function(t) {
|
|
@@ -19623,7 +19623,7 @@ function(t) {
|
|
|
19623
19623
|
// undefined.
|
|
19624
19624
|
return this.Tu({
|
|
19625
19625
|
path: void 0,
|
|
19626
|
-
|
|
19626
|
+
Eu: !0
|
|
19627
19627
|
});
|
|
19628
19628
|
}, t.prototype.mu = function(t) {
|
|
19629
19629
|
return nh(t, this.settings.methodName, this.settings.fu || !1, this.path, this.settings.gu);
|
|
@@ -19653,7 +19653,7 @@ function(t) {
|
|
|
19653
19653
|
methodName: e,
|
|
19654
19654
|
gu: n,
|
|
19655
19655
|
path: ft.emptyPath(),
|
|
19656
|
-
|
|
19656
|
+
Eu: !1,
|
|
19657
19657
|
fu: r
|
|
19658
19658
|
}, this.databaseId, this.serializer, this.ignoreUndefinedProperties);
|
|
19659
19659
|
}, t;
|
|
@@ -19719,7 +19719,7 @@ var Ul = /** @class */ function(e) {
|
|
|
19719
19719
|
Iu: 3 /* UserDataSource.Argument */ ,
|
|
19720
19720
|
gu: e.settings.gu,
|
|
19721
19721
|
methodName: t._methodName,
|
|
19722
|
-
|
|
19722
|
+
Eu: n
|
|
19723
19723
|
}, e.databaseId, e.serializer, e.ignoreUndefinedProperties);
|
|
19724
19724
|
}
|
|
19725
19725
|
|
|
@@ -19872,7 +19872,7 @@ var zl = /** @class */ function(e) {
|
|
|
19872
19872
|
// the set of values to be included for the IN query) that may directly
|
|
19873
19873
|
// contain additional arrays (each representing an individual field
|
|
19874
19874
|
// value), so we disable this validation.
|
|
19875
|
-
if (e.settings.
|
|
19875
|
+
if (e.settings.Eu && 4 /* UserDataSource.ArrayArgument */ !== e.Iu) throw e.mu("Nested arrays are not supported");
|
|
19876
19876
|
return function(t, e) {
|
|
19877
19877
|
for (var n = [], r = 0, i = 0, o = t; i < o.length; i++) {
|
|
19878
19878
|
var a = Hl(o[i], e.Vu(r));
|
|
@@ -19942,7 +19942,7 @@ function Jl(t, e) {
|
|
|
19942
19942
|
// If we encounter an empty object, we explicitly add it to the update
|
|
19943
19943
|
// mask to ensure that the server creates a map entry.
|
|
19944
19944
|
e.path && e.path.length > 0 && e.fieldMask.push(e.path) : be(t, (function(t, r) {
|
|
19945
|
-
var i = Hl(r, e.
|
|
19945
|
+
var i = Hl(r, e.du(t));
|
|
19946
19946
|
null != i && (n[t] = i);
|
|
19947
19947
|
})), {
|
|
19948
19948
|
mapValue: {
|
|
@@ -22450,9 +22450,9 @@ function Uf(t, r) {
|
|
|
22450
22450
|
return r = Object.assign({
|
|
22451
22451
|
useFetchStreams: zf
|
|
22452
22452
|
}, r), o._setSettings(r), o;
|
|
22453
|
-
}), "PUBLIC").setMultipleInstances(!0)), a(A, "4.4.0-canary.
|
|
22453
|
+
}), "PUBLIC").setMultipleInstances(!0)), a(A, "4.4.0-canary.50b2182d7", Bf),
|
|
22454
22454
|
// BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation
|
|
22455
|
-
a(A, "4.4.0-canary.
|
|
22455
|
+
a(A, "4.4.0-canary.50b2182d7", "esm5");
|
|
22456
22456
|
|
|
22457
22457
|
export { Oh as AbstractUserDataWriter, Sl as AggregateField, xl as AggregateQuerySnapshot, Dl as Bytes, sl as CACHE_SIZE_UNLIMITED, Zc as CollectionReference, $c as DocumentReference, Bh as DocumentSnapshot, Cl as FieldPath, Al as FieldValue, cl as Firestore, j as FirestoreError, kl as GeoPoint, ul as LoadBundleTask, Ff as PersistentCacheIndexManager, Xc as Query, dh as QueryCompositeFilterConstraint, ch as QueryConstraint, zh as QueryDocumentSnapshot, Eh as QueryEndAtConstraint, hh as QueryFieldFilterConstraint, gh as QueryLimitConstraint, mh as QueryOrderByConstraint, Gh as QuerySnapshot, Ih as QueryStartAtConstraint, Uh as SnapshotMetadata, ut as Timestamp, Sf as Transaction, Tf as WriteBatch, rt as _AutoId, ke as _ByteString, Ue as _DatabaseId, dt as _DocumentKey, et as _EmptyAppCheckTokenProvider, Y as _EmptyAuthCredentialsProvider, ft as _FieldPath, Kf as _TestingHooks, Qc as _cast, z as _debugAssert, Ae as _isBase64Available, V as _logWarn, zc as _validateIsNotUsedTogether, nf as addDoc, Vh as aggregateFieldEqual, qh as aggregateQuerySnapshotEqual, vh as and, Af as arrayRemove, Nf as arrayUnion, Mh as average, yl as clearIndexedDbPersistence, tl as collection, el as collectionGroup, Jc as connectFirestoreEmulator, Lh as count, qf as deleteAllPersistentCacheIndexes, ef as deleteDoc, Df as deleteField, bl as disableNetwork, Vf as disablePersistentCacheIndexAutoCreation, nl as doc, Nl as documentId, pl as enableIndexedDbPersistence, vl as enableMultiTabIndexedDbPersistence, wl as enableNetwork, Lf as enablePersistentCacheIndexAutoCreation, xh as endAt, Sh as endBefore, fl as ensureFirestoreConfigured, af as executeWrite, cf as getAggregateFromServer, sf as getCountFromServer, Qh as getDoc, Yh as getDocFromCache, Hh as getDocFromServer, Jh as getDocs, Xh as getDocsFromCache, $h as getDocsFromServer, hl as getFirestore, Mf as getPersistentCacheIndexManager, kf as increment, ll as initializeFirestore, wh as limit, bh as limitToLast, _l as loadBundle, pf as memoryEagerGarbageCollector, mf as memoryLocalCache, vf as memoryLruGarbageCollector, Tl as namedQuery, rf as onSnapshot, of as onSnapshotsInSync, ph as or, yh as orderBy, yf as persistentLocalCache, If as persistentMultipleTabManager, bf as persistentSingleTabManager, lh as query, il as queryEqual, rl as refEqual, xf as runTransaction, Cf as serverTimestamp, Zh as setDoc, Pf as setIndexConfiguration, F as setLogLevel, jh as snapshotEqual, Th as startAfter, _h as startAt, Fh as sum, Il as terminate, tf as updateDoc, gl as waitForPendingWrites, fh as where, Of as writeBatch };
|
|
22458
22458
|
//# sourceMappingURL=index.esm5.js.map
|
package/dist/index.node.cjs.js
CHANGED
|
@@ -34,7 +34,7 @@ var grpc__namespace = /*#__PURE__*/_interopNamespace(grpc);
|
|
|
34
34
|
var protoLoader__namespace = /*#__PURE__*/_interopNamespace(protoLoader);
|
|
35
35
|
|
|
36
36
|
const name = "@firebase/firestore";
|
|
37
|
-
const version$1 = "4.4.0-canary.
|
|
37
|
+
const version$1 = "4.4.0-canary.50b2182d7";
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
40
|
* @license
|
|
@@ -87,7 +87,7 @@ User.GOOGLE_CREDENTIALS = new User('google-credentials-uid');
|
|
|
87
87
|
User.FIRST_PARTY = new User('first-party-uid');
|
|
88
88
|
User.MOCK_USER = new User('mock-user');
|
|
89
89
|
|
|
90
|
-
const version = "10.7.1-canary.
|
|
90
|
+
const version = "10.7.1-canary.50b2182d7";
|
|
91
91
|
|
|
92
92
|
/**
|
|
93
93
|
* @license
|
package/dist/index.node.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import * as grpc from '@grpc/grpc-js';
|
|
|
9
9
|
import * as protoLoader from '@grpc/proto-loader';
|
|
10
10
|
|
|
11
11
|
const name = "@firebase/firestore";
|
|
12
|
-
const version$1 = "4.4.0-canary.
|
|
12
|
+
const version$1 = "4.4.0-canary.50b2182d7";
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* @license
|
|
@@ -62,7 +62,7 @@ User.GOOGLE_CREDENTIALS = new User('google-credentials-uid');
|
|
|
62
62
|
User.FIRST_PARTY = new User('first-party-uid');
|
|
63
63
|
User.MOCK_USER = new User('mock-user');
|
|
64
64
|
|
|
65
|
-
const version = "10.7.1-canary.
|
|
65
|
+
const version = "10.7.1-canary.50b2182d7";
|
|
66
66
|
|
|
67
67
|
/**
|
|
68
68
|
* @license
|