@firebase/firestore 3.4.3 → 3.4.4-202202622812

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/firestore/src/api/database.d.ts +14 -9
  3. package/dist/firestore/src/api/index_configuration.d.ts +117 -0
  4. package/dist/firestore/src/api.d.ts +1 -0
  5. package/dist/firestore/src/core/firestore_client.d.ts +2 -0
  6. package/dist/firestore/src/model/field_index.d.ts +76 -0
  7. package/dist/firestore/test/integration/api/index_configuration.test.d.ts +17 -0
  8. package/dist/index.d.ts +15 -9
  9. package/dist/index.esm2017.js +663 -602
  10. package/dist/index.esm2017.js.map +1 -1
  11. package/dist/index.esm5.js +680 -617
  12. package/dist/index.esm5.js.map +1 -1
  13. package/dist/index.node.cjs.js +100 -13
  14. package/dist/index.node.cjs.js.map +1 -1
  15. package/dist/index.node.mjs +100 -14
  16. package/dist/index.node.mjs.map +1 -1
  17. package/dist/index.rn.js +705 -602
  18. package/dist/index.rn.js.map +1 -1
  19. package/dist/internal.d.ts +120 -9
  20. package/dist/lite/firestore/src/api/database.d.ts +14 -9
  21. package/dist/lite/firestore/src/api/index_configuration.d.ts +117 -0
  22. package/dist/lite/firestore/src/api.d.ts +1 -0
  23. package/dist/lite/firestore/src/core/firestore_client.d.ts +2 -0
  24. package/dist/lite/firestore/src/model/field_index.d.ts +76 -0
  25. package/dist/lite/firestore/test/integration/api/index_configuration.test.d.ts +17 -0
  26. package/dist/lite/index.browser.esm2017.js +2 -2
  27. package/dist/lite/index.browser.esm2017.js.map +1 -1
  28. package/dist/lite/index.browser.esm5.js +2 -2
  29. package/dist/lite/index.browser.esm5.js.map +1 -1
  30. package/dist/lite/index.node.cjs.js +2 -2
  31. package/dist/lite/index.node.mjs +2 -2
  32. package/dist/lite/index.node.mjs.map +1 -1
  33. package/dist/lite/index.rn.esm2017.js +2 -2
  34. package/dist/lite/index.rn.esm2017.js.map +1 -1
  35. package/dist/lite/packages/firestore/src/api/database.d.ts +14 -9
  36. package/dist/lite/packages/firestore/src/api/index_configuration.d.ts +117 -0
  37. package/dist/lite/packages/firestore/src/api.d.ts +1 -0
  38. package/dist/lite/packages/firestore/src/core/firestore_client.d.ts +2 -0
  39. package/dist/lite/packages/firestore/src/model/field_index.d.ts +76 -0
  40. package/dist/lite/packages/firestore/test/integration/api/index_configuration.test.d.ts +17 -0
  41. package/dist/packages/firestore/dist/index.esm2017.d.ts +152 -131
  42. package/dist/packages/firestore/src/api/database.d.ts +14 -9
  43. package/dist/packages/firestore/src/api/index_configuration.d.ts +117 -0
  44. package/dist/packages/firestore/src/api.d.ts +1 -0
  45. package/dist/packages/firestore/src/core/firestore_client.d.ts +2 -0
  46. package/dist/packages/firestore/src/model/field_index.d.ts +76 -0
  47. package/dist/packages/firestore/test/integration/api/index_configuration.test.d.ts +17 -0
  48. package/dist/private.d.ts +24 -9
  49. package/package.json +5 -5
@@ -70,7 +70,7 @@ O.MOCK_USER = new O("mock-user");
70
70
  * See the License for the specific language governing permissions and
71
71
  * limitations under the License.
72
72
  */
73
- var M = "9.6.3", F = new h("@firebase/firestore");
73
+ var M = "9.6.5-202202622812", F = new h("@firebase/firestore");
74
74
 
75
75
  /**
76
76
  * @license
@@ -11232,14 +11232,14 @@ e, i, o, s) {
11232
11232
  // Mark this as something the client is currently listening for.
11233
11233
  n.Wr.set(e.targetId, e), ps(n) ?
11234
11234
  // The listen will be sent in onWatchStreamOpen
11235
- ds(n) : Cs(n).lr() && fs(n, e));
11235
+ ds(n) : xs(n).lr() && fs(n, e));
11236
11236
  }
11237
11237
 
11238
11238
  /**
11239
11239
  * Removes the listen from server. It is a no-op if the given target id is
11240
11240
  * not being listened to.
11241
11241
  */ function hs(t, e) {
11242
- var n = W(t), r = Cs(n);
11242
+ var n = W(t), r = xs(n);
11243
11243
  n.Wr.delete(e), r.lr() && ls(n, e), 0 === n.Wr.size && (r.lr() ? r._r() : ys(n) &&
11244
11244
  // Revert to OnlineState.Unknown if the watch stream is not open and we
11245
11245
  // have no listeners, since without any listens to send we cannot
@@ -11251,7 +11251,7 @@ e, i, o, s) {
11251
11251
  * We need to increment the the expected number of pending responses we're due
11252
11252
  * from watch so we wait for the ack to process any messages from this target.
11253
11253
  */ function fs(t, e) {
11254
- t.Yr.X(e.targetId), Cs(t).Pr(e)
11254
+ t.Yr.X(e.targetId), xs(t).Pr(e)
11255
11255
  /**
11256
11256
  * We need to increment the expected number of pending responses we're due
11257
11257
  * from watch so we wait for the removal on the server before we process any
@@ -11260,7 +11260,7 @@ e, i, o, s) {
11260
11260
  }
11261
11261
 
11262
11262
  function ls(t, e) {
11263
- t.Yr.X(e), Cs(t).vr(e);
11263
+ t.Yr.X(e), xs(t).vr(e);
11264
11264
  }
11265
11265
 
11266
11266
  function ds(t) {
@@ -11271,7 +11271,7 @@ function ds(t) {
11271
11271
  Et: function(e) {
11272
11272
  return t.Wr.get(e) || null;
11273
11273
  }
11274
- }), Cs(t).start(), t.Jr.Br()
11274
+ }), xs(t).start(), t.Jr.Br()
11275
11275
  /**
11276
11276
  * Returns whether the watch stream should be started because it's necessary
11277
11277
  * and has not yet been started.
@@ -11279,7 +11279,7 @@ function ds(t) {
11279
11279
  }
11280
11280
 
11281
11281
  function ps(t) {
11282
- return ys(t) && !Cs(t).hr() && t.Wr.size > 0;
11282
+ return ys(t) && !xs(t).hr() && t.Wr.size > 0;
11283
11283
  }
11284
11284
 
11285
11285
  function ys(t) {
@@ -11501,7 +11501,7 @@ function Ts(t) {
11501
11501
  return r(this, (function(r) {
11502
11502
  switch (r.label) {
11503
11503
  case 0:
11504
- e = W(t), n = xs(e), i = e.Qr.length > 0 ? e.Qr[e.Qr.length - 1].batchId : -1, r.label = 1;
11504
+ e = W(t), n = Rs(e), i = e.Qr.length > 0 ? e.Qr[e.Qr.length - 1].batchId : -1, r.label = 1;
11505
11505
 
11506
11506
  case 1:
11507
11507
  if (!
@@ -11525,7 +11525,7 @@ function Ts(t) {
11525
11525
  return null === (o = r.sent()) ? (0 === e.Qr.length && n._r(), [ 3 /*break*/ , 7 ]) : (i = o.batchId,
11526
11526
  function(t, e) {
11527
11527
  t.Qr.push(e);
11528
- var n = xs(t);
11528
+ var n = Rs(t);
11529
11529
  n.lr() && n.Sr && n.Dr(e.mutations);
11530
11530
  }(e, o), [ 3 /*break*/ , 6 ]);
11531
11531
 
@@ -11546,17 +11546,17 @@ function Ts(t) {
11546
11546
  }
11547
11547
 
11548
11548
  function Es(t) {
11549
- return ys(t) && !xs(t).hr() && t.Qr.length > 0;
11549
+ return ys(t) && !Rs(t).hr() && t.Qr.length > 0;
11550
11550
  }
11551
11551
 
11552
11552
  function Ss(t) {
11553
- xs(t).start();
11553
+ Rs(t).start();
11554
11554
  }
11555
11555
 
11556
11556
  function _s(t) {
11557
11557
  return n(this, void 0, void 0, (function() {
11558
11558
  return r(this, (function(e) {
11559
- return xs(t).kr(), [ 2 /*return*/ ];
11559
+ return Rs(t).kr(), [ 2 /*return*/ ];
11560
11560
  }));
11561
11561
  }));
11562
11562
  }
@@ -11566,7 +11566,7 @@ function As(t) {
11566
11566
  var e, n, i, o;
11567
11567
  return r(this, (function(r) {
11568
11568
  // Send the write pipeline now that the stream is established.
11569
- for (e = xs(t), n = 0, i = t.Qr; n < i.length; n++) o = i[n], e.Dr(o.mutations);
11569
+ for (e = Rs(t), n = 0, i = t.Qr; n < i.length; n++) o = i[n], e.Dr(o.mutations);
11570
11570
  return [ 2 /*return*/ ];
11571
11571
  }));
11572
11572
  }));
@@ -11601,7 +11601,7 @@ function Ds(t, e) {
11601
11601
  return r(this, (function(i) {
11602
11602
  switch (i.label) {
11603
11603
  case 0:
11604
- return e && xs(t).Sr ? [ 4 /*yield*/ , function(t, e) {
11604
+ return e && Rs(t).Sr ? [ 4 /*yield*/ , function(t, e) {
11605
11605
  return n(this, void 0, void 0, (function() {
11606
11606
  var n, i;
11607
11607
  return r(this, (function(r) {
@@ -11611,7 +11611,7 @@ function Ds(t, e) {
11611
11611
  // In this case it's also unlikely that the server itself is melting
11612
11612
  // down -- this was just a bad request so inhibit backoff on the next
11613
11613
  // restart.
11614
- xs(t).wr(), [ 4 /*yield*/ , Is(t, (function() {
11614
+ Rs(t).wr(), [ 4 /*yield*/ , Is(t, (function() {
11615
11615
  return t.remoteSyncer.rejectFailedWrite(n.batchId, e);
11616
11616
  })) ]) : [ 3 /*break*/ , 3 ];
11617
11617
 
@@ -11651,9 +11651,40 @@ function Ds(t, e) {
11651
11651
  }));
11652
11652
  }
11653
11653
 
11654
+ function Ns(t, e) {
11655
+ return n(this, void 0, void 0, (function() {
11656
+ var n, i;
11657
+ return r(this, (function(r) {
11658
+ switch (r.label) {
11659
+ case 0:
11660
+ return (n = W(t)).asyncQueue.verifyOperationInProgress(), U("RemoteStore", "RemoteStore received new credentials"),
11661
+ i = ys(n),
11662
+ // Tear down and re-create our network streams. This will ensure we get a
11663
+ // fresh auth token for the new user and re-fill the write pipeline with
11664
+ // new mutations from the LocalStore (since mutations are per-user).
11665
+ n.Gr.add(3 /* CredentialChange */), [ 4 /*yield*/ , as(n) ];
11666
+
11667
+ case 1:
11668
+ return r.sent(), i &&
11669
+ // Don't set the network status to Unknown if we are offline.
11670
+ n.Jr.set("Unknown" /* Unknown */), [ 4 /*yield*/ , n.remoteSyncer.handleCredentialChange(e) ];
11671
+
11672
+ case 2:
11673
+ return r.sent(), n.Gr.delete(3 /* CredentialChange */), [ 4 /*yield*/ , us(n) ];
11674
+
11675
+ case 3:
11676
+ // Tear down and re-create our network streams. This will ensure we get a
11677
+ // fresh auth token for the new user and re-fill the write pipeline with
11678
+ // new mutations from the LocalStore (since mutations are per-user).
11679
+ return r.sent(), [ 2 /*return*/ ];
11680
+ }
11681
+ }));
11682
+ }));
11683
+ }
11684
+
11654
11685
  /**
11655
11686
  * Toggles the network state when the client gains or loses its primary lease.
11656
- */ function Ns(t, e) {
11687
+ */ function Cs(t, e) {
11657
11688
  return n(this, void 0, void 0, (function() {
11658
11689
  var n;
11659
11690
  return r(this, (function(r) {
@@ -11687,7 +11718,7 @@ function Ds(t, e) {
11687
11718
  *
11688
11719
  * PORTING NOTE: On iOS and Android, the WatchStream gets registered on startup.
11689
11720
  * This is not done on Web to allow it to be tree-shaken.
11690
- */ function Cs(t) {
11721
+ */ function xs(t) {
11691
11722
  var e = this;
11692
11723
  return t.Xr || (
11693
11724
  // Create stream (but note that it is not started yet).
@@ -11727,7 +11758,7 @@ function Ds(t, e) {
11727
11758
  */;
11728
11759
  }
11729
11760
 
11730
- function xs(t) {
11761
+ function Rs(t) {
11731
11762
  var e = this;
11732
11763
  return t.Zr || (
11733
11764
  // Create stream (but note that it is not started yet).
@@ -11792,7 +11823,7 @@ function xs(t) {
11792
11823
  */;
11793
11824
  }
11794
11825
 
11795
- var Rs = /** @class */ function() {
11826
+ var Ls = /** @class */ function() {
11796
11827
  function t(t, e, n, r, i) {
11797
11828
  this.asyncQueue = t, this.timerId = e, this.targetTimeMs = n, this.op = r, this.removalCallback = i,
11798
11829
  this.deferred = new J, this.then = this.deferred.promise.then.bind(this.deferred.promise),
@@ -11861,7 +11892,7 @@ var Rs = /** @class */ function() {
11861
11892
  /**
11862
11893
  * Returns a FirestoreError that can be surfaced to the user if the provided
11863
11894
  * error is an IndexedDbTransactionError. Re-throws the error otherwise.
11864
- */ function Ls(t, e) {
11895
+ */ function Ps(t, e) {
11865
11896
  if (B("AsyncQueue", e + ": " + t), Jr(t)) return new Y(H.UNAVAILABLE, e + ": " + t);
11866
11897
  throw t;
11867
11898
  }
@@ -11887,7 +11918,7 @@ var Rs = /** @class */ function() {
11887
11918
  * in order specified by the provided comparator. We always add a document key
11888
11919
  * comparator on top of what is provided to guarantee document equality based on
11889
11920
  * the key.
11890
- */ var Ps = /** @class */ function() {
11921
+ */ var Os = /** @class */ function() {
11891
11922
  /** The default ordering is by key if the comparator is omitted */
11892
11923
  function t(t) {
11893
11924
  // We are adding document key comparator to the end as it's the only
@@ -11959,7 +11990,7 @@ var Rs = /** @class */ function() {
11959
11990
  var r = new t;
11960
11991
  return r.comparator = this.comparator, r.keyedMap = e, r.sortedSet = n, r;
11961
11992
  }, t;
11962
- }(), Os = /** @class */ function() {
11993
+ }(), Ms = /** @class */ function() {
11963
11994
  function t() {
11964
11995
  this.eo = new wn(Pt.comparator);
11965
11996
  }
@@ -11997,7 +12028,7 @@ var Rs = /** @class */ function() {
11997
12028
  t.push(n);
11998
12029
  })), t;
11999
12030
  }, t;
12000
- }(), Ms = /** @class */ function() {
12031
+ }(), Fs = /** @class */ function() {
12001
12032
  function t(t, e, n, r, i, o, s, u) {
12002
12033
  this.query = t, this.docs = e, this.oldDocs = n, this.docChanges = r, this.mutatedKeys = i,
12003
12034
  this.fromCache = o, this.syncStateChanged = s, this.excludesMetadataChanges = u
@@ -12010,7 +12041,7 @@ var Rs = /** @class */ function() {
12010
12041
  type: 0 /* Added */ ,
12011
12042
  doc: t
12012
12043
  });
12013
- })), new t(e, n, Ps.emptySet(n), o, r, i,
12044
+ })), new t(e, n, Os.emptySet(n), o, r, i,
12014
12045
  /* syncStateChanged= */ !0,
12015
12046
  /* excludesMetadataChanges= */ !1);
12016
12047
  }, Object.defineProperty(t.prototype, "hasPendingWrites", {
@@ -12026,9 +12057,9 @@ var Rs = /** @class */ function() {
12026
12057
  for (var r = 0; r < e.length; r++) if (e[r].type !== n[r].type || !e[r].doc.isEqual(n[r].doc)) return !1;
12027
12058
  return !0;
12028
12059
  }, t;
12029
- }(), Fs = function() {
12060
+ }(), Vs = function() {
12030
12061
  this.so = void 0, this.listeners = [];
12031
- }, Vs = function() {
12062
+ }, qs = function() {
12032
12063
  this.queries = new zi((function(t) {
12033
12064
  return Ce(t);
12034
12065
  }), Ne), this.onlineState = "Unknown" /* Unknown */ , this.io = new Set;
@@ -12053,13 +12084,13 @@ var Rs = /** @class */ function() {
12053
12084
  /**
12054
12085
  * DocumentChangeSet keeps track of a set of changes to docs in a query, merging
12055
12086
  * duplicate events for the same doc.
12056
- */ function qs(t, e) {
12087
+ */ function Us(t, e) {
12057
12088
  return n(this, void 0, void 0, (function() {
12058
12089
  var n, i, o, s, u, a, c;
12059
12090
  return r(this, (function(r) {
12060
12091
  switch (r.label) {
12061
12092
  case 0:
12062
- if (n = W(t), i = e.query, o = !1, (s = n.queries.get(i)) || (o = !0, s = new Fs),
12093
+ if (n = W(t), i = e.query, o = !1, (s = n.queries.get(i)) || (o = !0, s = new Vs),
12063
12094
  !o) return [ 3 /*break*/ , 4 ];
12064
12095
  r.label = 1;
12065
12096
 
@@ -12070,19 +12101,19 @@ var Rs = /** @class */ function() {
12070
12101
  return u.so = r.sent(), [ 3 /*break*/ , 4 ];
12071
12102
 
12072
12103
  case 3:
12073
- return a = r.sent(), c = Ls(a, "Initialization of query '" + xe(e.query) + "' failed"),
12104
+ return a = r.sent(), c = Ps(a, "Initialization of query '" + xe(e.query) + "' failed"),
12074
12105
  [ 2 /*return*/ , void e.onError(c) ];
12075
12106
 
12076
12107
  case 4:
12077
12108
  return n.queries.set(i, s), s.listeners.push(e),
12078
12109
  // Run global snapshot listeners if a consistent snapshot has been emitted.
12079
- e.ro(n.onlineState), s.so && e.oo(s.so) && Ks(n), [ 2 /*return*/ ];
12110
+ e.ro(n.onlineState), s.so && e.oo(s.so) && Gs(n), [ 2 /*return*/ ];
12080
12111
  }
12081
12112
  }));
12082
12113
  }));
12083
12114
  }
12084
12115
 
12085
- function Us(t, e) {
12116
+ function Bs(t, e) {
12086
12117
  return n(this, void 0, void 0, (function() {
12087
12118
  var n, i, o, s, u;
12088
12119
  return r(this, (function(r) {
@@ -12092,7 +12123,7 @@ function Us(t, e) {
12092
12123
  }));
12093
12124
  }
12094
12125
 
12095
- function Bs(t, e) {
12126
+ function js(t, e) {
12096
12127
  for (var n = W(t), r = !1, i = 0, o = e; i < o.length; i++) {
12097
12128
  var s = o[i], u = s.query, a = n.queries.get(u);
12098
12129
  if (a) {
@@ -12102,10 +12133,10 @@ function Bs(t, e) {
12102
12133
  a.so = s;
12103
12134
  }
12104
12135
  }
12105
- r && Ks(n);
12136
+ r && Gs(n);
12106
12137
  }
12107
12138
 
12108
- function js(t, e, n) {
12139
+ function Ks(t, e, n) {
12109
12140
  var r = W(t), i = r.queries.get(e);
12110
12141
  if (i) for (var o = 0, s = i.listeners; o < s.length; o++) {
12111
12142
  s[o].onError(n);
@@ -12116,7 +12147,7 @@ function js(t, e, n) {
12116
12147
  }
12117
12148
 
12118
12149
  // Call all global snapshot listeners that have been set.
12119
- function Ks(t) {
12150
+ function Gs(t) {
12120
12151
  t.io.forEach((function(t) {
12121
12152
  t.next();
12122
12153
  }));
@@ -12127,7 +12158,7 @@ function Ks(t) {
12127
12158
  * when to raise the event.
12128
12159
  *
12129
12160
  * It uses an Observer to dispatch events.
12130
- */ var Gs = /** @class */ function() {
12161
+ */ var zs = /** @class */ function() {
12131
12162
  function t(t, e, n) {
12132
12163
  this.query = t, this.co = e,
12133
12164
  /**
@@ -12150,7 +12181,7 @@ function Ks(t) {
12150
12181
  var i = r[n];
12151
12182
  3 /* Metadata */ !== i.type && e.push(i);
12152
12183
  }
12153
- t = new Ms(t.query, t.docs, t.oldDocs, e, t.mutatedKeys, t.fromCache, t.syncStateChanged,
12184
+ t = new Fs(t.query, t.docs, t.oldDocs, e, t.mutatedKeys, t.fromCache, t.syncStateChanged,
12154
12185
  /* excludesMetadataChanges= */ !0);
12155
12186
  }
12156
12187
  var o = !1;
@@ -12186,10 +12217,10 @@ function Ks(t) {
12186
12217
  // to get here if there were only metadata docChanges and they got
12187
12218
  // stripped out.
12188
12219
  }, t.prototype.fo = function(t) {
12189
- t = Ms.fromInitialDocuments(t.query, t.docs, t.mutatedKeys, t.fromCache), this.ao = !0,
12220
+ t = Fs.fromInitialDocuments(t.query, t.docs, t.mutatedKeys, t.fromCache), this.ao = !0,
12190
12221
  this.co.next(t);
12191
12222
  }, t;
12192
- }(), zs = /** @class */ function() {
12223
+ }(), Qs = /** @class */ function() {
12193
12224
  function t(t,
12194
12225
  // How many bytes this element takes to store in the bundle.
12195
12226
  e) {
@@ -12198,7 +12229,7 @@ function Ks(t) {
12198
12229
  return t.prototype._o = function() {
12199
12230
  return "metadata" in this.payload;
12200
12231
  }, t;
12201
- }(), Qs = /** @class */ function() {
12232
+ }(), Ws = /** @class */ function() {
12202
12233
  function t(t) {
12203
12234
  this.k = t;
12204
12235
  }
@@ -12213,13 +12244,13 @@ function Ks(t) {
12213
12244
  }, t.prototype.Yn = function(t) {
12214
12245
  return Yn(t);
12215
12246
  }, t;
12216
- }(), Ws = /** @class */ function() {
12247
+ }(), Hs = /** @class */ function() {
12217
12248
  function t(t, e, n) {
12218
12249
  this.mo = t, this.localStore = e, this.k = n,
12219
12250
  /** Batched queries to be saved into storage */
12220
12251
  this.queries = [],
12221
12252
  /** Batched documents to be saved into storage */
12222
- this.documents = [], this.progress = Hs(t)
12253
+ this.documents = [], this.progress = Ys(t)
12223
12254
  /**
12224
12255
  * Adds an element from the bundle to the loader.
12225
12256
  *
@@ -12236,7 +12267,7 @@ function Ks(t) {
12236
12267
  ++e), e !== this.progress.documentsLoaded ? (this.progress.documentsLoaded = e,
12237
12268
  Object.assign({}, this.progress)) : null;
12238
12269
  }, t.prototype.po = function(t) {
12239
- for (var e = new Map, n = new Qs(this.k), r = 0, i = t; r < i.length; r++) {
12270
+ for (var e = new Map, n = new Ws(this.k), r = 0, i = t; r < i.length; r++) {
12240
12271
  var o = i[r];
12241
12272
  if (o.metadata.queries) for (var s = n.Hn(o.metadata.name), u = 0, a = o.metadata.queries; u < a.length; u++) {
12242
12273
  var c = a[u], h = (e.get(c) || xn()).add(s);
@@ -12254,7 +12285,7 @@ function Ks(t) {
12254
12285
  return r(this, (function(r) {
12255
12286
  switch (r.label) {
12256
12287
  case 0:
12257
- return [ 4 /*yield*/ , So(this.localStore, new Qs(this.k), this.documents, this.mo.id) ];
12288
+ return [ 4 /*yield*/ , So(this.localStore, new Ws(this.k), this.documents, this.mo.id) ];
12258
12289
 
12259
12290
  case 1:
12260
12291
  t = r.sent(), e = this.po(this.documents), n = 0, i = this.queries, r.label = 2;
@@ -12300,7 +12331,7 @@ function Ks(t) {
12300
12331
  * Returns a `LoadBundleTaskProgress` representing the initial progress of
12301
12332
  * loading a bundle.
12302
12333
  */
12303
- function Hs(t) {
12334
+ function Ys(t) {
12304
12335
  return {
12305
12336
  taskState: "Running",
12306
12337
  documentsLoaded: 0,
@@ -12329,11 +12360,11 @@ function Hs(t) {
12329
12360
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12330
12361
  * See the License for the specific language governing permissions and
12331
12362
  * limitations under the License.
12332
- */ var Ys = function(t) {
12363
+ */ var Js = function(t) {
12333
12364
  this.key = t;
12334
- }, Js = function(t) {
12365
+ }, Xs = function(t) {
12335
12366
  this.key = t;
12336
- }, Xs = /** @class */ function() {
12367
+ }, $s = /** @class */ function() {
12337
12368
  function t(t,
12338
12369
  /** Documents included in the remote target */
12339
12370
  e) {
@@ -12348,7 +12379,7 @@ function Hs(t) {
12348
12379
  /** Documents in the view but not in the remote target */
12349
12380
  this.Io = xn(),
12350
12381
  /** Document Keys that have local changes */
12351
- this.mutatedKeys = xn(), this.Ao = Le(t), this.Ro = new Ps(this.Ao);
12382
+ this.mutatedKeys = xn(), this.Ao = Le(t), this.Ro = new Os(this.Ao);
12352
12383
  }
12353
12384
  return Object.defineProperty(t.prototype, "bo", {
12354
12385
  /**
@@ -12372,7 +12403,7 @@ function Hs(t) {
12372
12403
  * @returns a new set of docs, changes, and refill flag.
12373
12404
  */
12374
12405
  t.prototype.Po = function(t, e) {
12375
- var n = this, r = e ? e.vo : new Os, i = e ? e.Ro : this.Ro, o = e ? e.mutatedKeys : this.mutatedKeys, s = i, u = !1, a = Ie(this.query) && i.size === this.query.limit ? i.last() : null, c = Te(this.query) && i.size === this.query.limit ? i.first() : null;
12406
+ var n = this, r = e ? e.vo : new Ms, i = e ? e.Ro : this.Ro, o = e ? e.mutatedKeys : this.mutatedKeys, s = i, u = !1, a = Ie(this.query) && i.size === this.query.limit ? i.last() : null, c = Te(this.query) && i.size === this.query.limit ? i.first() : null;
12376
12407
  // Drop documents out to meet limit/limitToLast requirement.
12377
12408
  if (t.inorderTraversal((function(t, e) {
12378
12409
  var h = i.get(t), f = Re(n.query, e) ? e : null, l = !!h && n.mutatedKeys.has(h.key), d = !!f && (f.hasLocalMutations ||
@@ -12467,7 +12498,7 @@ function Hs(t) {
12467
12498
  })), this.So(n);
12468
12499
  var s = e ? this.Do() : [], u = 0 === this.Io.size && this.current ? 1 /* Synced */ : 0 /* Local */ , a = u !== this.Eo;
12469
12500
  return this.Eo = u, 0 !== o.length || a ? {
12470
- snapshot: new Ms(this.query, t.Ro, i, o, t.mutatedKeys, 0 /* Local */ === u, a,
12501
+ snapshot: new Fs(this.query, t.Ro, i, o, t.mutatedKeys, 0 /* Local */ === u, a,
12471
12502
  /* excludesMetadataChanges= */ !1),
12472
12503
  Co: s
12473
12504
  } : {
@@ -12487,7 +12518,7 @@ function Hs(t) {
12487
12518
  // true once the client is back online.
12488
12519
  this.current = !1, this.applyChanges({
12489
12520
  Ro: this.Ro,
12490
- vo: new Os,
12521
+ vo: new Ms,
12491
12522
  mutatedKeys: this.mutatedKeys,
12492
12523
  Bn: !1
12493
12524
  },
@@ -12528,9 +12559,9 @@ function Hs(t) {
12528
12559
  // Diff the new limbo docs with the old limbo docs.
12529
12560
  var n = [];
12530
12561
  return e.forEach((function(e) {
12531
- t.Io.has(e) || n.push(new Js(e));
12562
+ t.Io.has(e) || n.push(new Xs(e));
12532
12563
  })), this.Io.forEach((function(t) {
12533
- e.has(t) || n.push(new Ys(t));
12564
+ e.has(t) || n.push(new Js(t));
12534
12565
  })), n;
12535
12566
  },
12536
12567
  /**
@@ -12565,9 +12596,9 @@ function Hs(t) {
12565
12596
  */
12566
12597
  // PORTING NOTE: Multi-tab only.
12567
12598
  t.prototype.xo = function() {
12568
- return Ms.fromInitialDocuments(this.query, this.Ro, this.mutatedKeys, 0 /* Local */ === this.Eo);
12599
+ return Fs.fromInitialDocuments(this.query, this.Ro, this.mutatedKeys, 0 /* Local */ === this.Eo);
12569
12600
  }, t;
12570
- }(), $s = function(
12601
+ }(), Zs = function(
12571
12602
  /**
12572
12603
  * The query itself.
12573
12604
  */
@@ -12585,7 +12616,7 @@ e,
12585
12616
  */
12586
12617
  n) {
12587
12618
  this.query = t, this.targetId = e, this.view = n;
12588
- }, Zs = function(t) {
12619
+ }, tu = function(t) {
12589
12620
  this.key = t,
12590
12621
  /**
12591
12622
  * Set to true once we've received a document. This is used in
@@ -12594,7 +12625,7 @@ n) {
12594
12625
  * the target is CURRENT.
12595
12626
  */
12596
12627
  this.$o = !1;
12597
- }, tu = /** @class */ function() {
12628
+ }, eu = /** @class */ function() {
12598
12629
  function t(t, e, n,
12599
12630
  // PORTING NOTE: Manages state synchronization in multi-tab environments.
12600
12631
  r, i, o) {
@@ -12645,13 +12676,13 @@ n) {
12645
12676
  * server. All the subsequent view snapshots or errors are sent to the
12646
12677
  * subscribed handlers. Returns the initial snapshot.
12647
12678
  */
12648
- function eu(t, e) {
12679
+ function nu(t, e) {
12649
12680
  return n(this, void 0, void 0, (function() {
12650
12681
  var n, i, o, s, u, a;
12651
12682
  return r(this, (function(r) {
12652
12683
  switch (r.label) {
12653
12684
  case 0:
12654
- return n = Cu(t), (s = n.Mo.get(e)) ? (
12685
+ return n = xu(t), (s = n.Mo.get(e)) ? (
12655
12686
  // PORTING NOTE: With Multi-Tab Web, it is possible that a query view
12656
12687
  // already exists when EventManager calls us for the first time. This
12657
12688
  // happens when the primary tab is already listening to this query on
@@ -12665,7 +12696,7 @@ function eu(t, e) {
12665
12696
 
12666
12697
  case 2:
12667
12698
  return u = r.sent(), a = n.sharedClientState.addLocalQueryTarget(u.targetId), i = u.targetId,
12668
- [ 4 /*yield*/ , nu(n, e, i, "current" === a) ];
12699
+ [ 4 /*yield*/ , ru(n, e, i, "current" === a) ];
12669
12700
 
12670
12701
  case 3:
12671
12702
  o = r.sent(), n.isPrimaryClient && cs(n.remoteStore, u), r.label = 4;
@@ -12680,7 +12711,7 @@ function eu(t, e) {
12680
12711
  /**
12681
12712
  * Registers a view for a previously unknown query and computes its initial
12682
12713
  * snapshot.
12683
- */ function nu(t, e, i, o) {
12714
+ */ function ru(t, e, i, o) {
12684
12715
  return n(this, void 0, void 0, (function() {
12685
12716
  var s, u, a, c, h, f;
12686
12717
  return r(this, (function(l) {
@@ -12710,7 +12741,7 @@ function eu(t, e) {
12710
12741
 
12711
12742
  case 2:
12712
12743
  return s = o && o.targetChanges.get(e.targetId), u = e.view.applyChanges(n,
12713
- /* updateLimboDocuments= */ t.isPrimaryClient, s), [ 2 /*return*/ , (yu(t, e.targetId, u.Co),
12744
+ /* updateLimboDocuments= */ t.isPrimaryClient, s), [ 2 /*return*/ , (vu(t, e.targetId, u.Co),
12714
12745
  u.snapshot) ];
12715
12746
  }
12716
12747
  }));
@@ -12720,9 +12751,9 @@ function eu(t, e) {
12720
12751
  /* usePreviousResults= */ !0) ];
12721
12752
 
12722
12753
  case 1:
12723
- return s = l.sent(), u = new Xs(e, s.zn), a = u.Po(s.documents), c = On.createSynthesizedTargetChangeForCurrentChange(i, o && "Offline" /* Offline */ !== t.onlineState),
12754
+ return s = l.sent(), u = new $s(e, s.zn), a = u.Po(s.documents), c = On.createSynthesizedTargetChangeForCurrentChange(i, o && "Offline" /* Offline */ !== t.onlineState),
12724
12755
  h = u.applyChanges(a,
12725
- /* updateLimboDocuments= */ t.isPrimaryClient, c), yu(t, i, h.Co), f = new $s(e, i, u),
12756
+ /* updateLimboDocuments= */ t.isPrimaryClient, c), vu(t, i, h.Co), f = new Zs(e, i, u),
12726
12757
  [ 2 /*return*/ , (t.Mo.set(e, f), t.Fo.has(i) ? t.Fo.get(i).push(e) : t.Fo.set(i, [ e ]),
12727
12758
  h.snapshot) ];
12728
12759
  }
@@ -12730,7 +12761,7 @@ function eu(t, e) {
12730
12761
  }));
12731
12762
  }
12732
12763
 
12733
- /** Stops listening to the query. */ function ru(t, e) {
12764
+ /** Stops listening to the query. */ function iu(t, e) {
12734
12765
  return n(this, void 0, void 0, (function() {
12735
12766
  var n, i, o;
12736
12767
  return r(this, (function(r) {
@@ -12744,7 +12775,7 @@ function eu(t, e) {
12744
12775
  n.sharedClientState.removeLocalQueryTarget(i.targetId), n.sharedClientState.isActiveQueryTarget(i.targetId) ? [ 3 /*break*/ , 2 ] : [ 4 /*yield*/ , wo(n.localStore, i.targetId,
12745
12776
  /*keepPersistedTargetData=*/ !1).then((function() {
12746
12777
  n.sharedClientState.clearQueryState(i.targetId), hs(n.remoteStore, i.targetId),
12747
- du(n, i.targetId);
12778
+ pu(n, i.targetId);
12748
12779
  })).catch(Vi) ]) : [ 3 /*break*/ , 3 ];
12749
12780
 
12750
12781
  case 1:
@@ -12754,7 +12785,7 @@ function eu(t, e) {
12754
12785
  return [ 3 /*break*/ , 5 ];
12755
12786
 
12756
12787
  case 3:
12757
- return du(n, i.targetId), [ 4 /*yield*/ , wo(n.localStore, i.targetId,
12788
+ return pu(n, i.targetId), [ 4 /*yield*/ , wo(n.localStore, i.targetId,
12758
12789
  /*keepPersistedTargetData=*/ !0) ];
12759
12790
 
12760
12791
  case 4:
@@ -12776,13 +12807,13 @@ function eu(t, e) {
12776
12807
  * have completed, *not* when the write was acked by the backend. The
12777
12808
  * userCallback is resolved once the write was acked/rejected by the
12778
12809
  * backend (or failed locally for any other reason).
12779
- */ function iu(t, e, i) {
12810
+ */ function ou(t, e, i) {
12780
12811
  return n(this, void 0, void 0, (function() {
12781
12812
  var n, o, s, u;
12782
12813
  return r(this, (function(r) {
12783
12814
  switch (r.label) {
12784
12815
  case 0:
12785
- n = xu(t), r.label = 1;
12816
+ n = Ru(t), r.label = 1;
12786
12817
 
12787
12818
  case 1:
12788
12819
  return r.trys.push([ 1, 5, , 6 ]), [ 4 /*yield*/ , function(t, e) {
@@ -12820,7 +12851,7 @@ function eu(t, e) {
12820
12851
  return o = r.sent(), n.sharedClientState.addPendingMutation(o.batchId), function(t, e, n) {
12821
12852
  var r = t.Ko[t.currentUser.toKey()];
12822
12853
  r || (r = new wn(ct)), r = r.insert(e, n), t.Ko[t.currentUser.toKey()] = r;
12823
- }(n, o.batchId, i), [ 4 /*yield*/ , gu(n, o.changes) ];
12854
+ }(n, o.batchId, i), [ 4 /*yield*/ , wu(n, o.changes) ];
12824
12855
 
12825
12856
  case 3:
12826
12857
  return r.sent(), [ 4 /*yield*/ , Ts(n.remoteStore) ];
@@ -12829,7 +12860,7 @@ function eu(t, e) {
12829
12860
  return r.sent(), [ 3 /*break*/ , 6 ];
12830
12861
 
12831
12862
  case 5:
12832
- return s = r.sent(), u = Ls(s, "Failed to persist write"), i.reject(u), [ 3 /*break*/ , 6 ];
12863
+ return s = r.sent(), u = Ps(s, "Failed to persist write"), i.reject(u), [ 3 /*break*/ , 6 ];
12833
12864
 
12834
12865
  case 6:
12835
12866
  return [ 2 /*return*/ ];
@@ -12842,7 +12873,7 @@ function eu(t, e) {
12842
12873
  * Applies one remote event to the sync engine, notifying any views of the
12843
12874
  * changes, and releasing any pending mutation batches that would become
12844
12875
  * visible because of the snapshot version the remote event contains.
12845
- */ function ou(t, e) {
12876
+ */ function su(t, e) {
12846
12877
  return n(this, void 0, void 0, (function() {
12847
12878
  var n, i;
12848
12879
  return r(this, (function(r) {
@@ -12864,7 +12895,7 @@ function eu(t, e) {
12864
12895
  z(t.addedDocuments.size + t.modifiedDocuments.size + t.removedDocuments.size <= 1),
12865
12896
  t.addedDocuments.size > 0 ? r.$o = !0 : t.modifiedDocuments.size > 0 ? z(r.$o) : t.removedDocuments.size > 0 && (z(r.$o),
12866
12897
  r.$o = !1));
12867
- })), [ 4 /*yield*/ , gu(n, i, e) ];
12898
+ })), [ 4 /*yield*/ , wu(n, i, e) ];
12868
12899
 
12869
12900
  case 3:
12870
12901
  // Update `receivedDocument` as appropriate for any limbo targets.
@@ -12886,7 +12917,7 @@ function eu(t, e) {
12886
12917
  /**
12887
12918
  * Applies an OnlineState change to the sync engine and notifies any views of
12888
12919
  * the change.
12889
- */ function su(t, e, n) {
12920
+ */ function uu(t, e, n) {
12890
12921
  var r = W(t);
12891
12922
  // If we are the secondary client, we explicitly ignore the remote store's
12892
12923
  // online state (the local client may go offline, even though the primary
@@ -12906,7 +12937,7 @@ function eu(t, e) {
12906
12937
  // Run global snapshot listeners if a consistent snapshot has been emitted.
12907
12938
  o[i].ro(e) && (r = !0);
12908
12939
  }
12909
- })), r && Ks(n);
12940
+ })), r && Gs(n);
12910
12941
  }(r.eventManager, e), i.length && r.Oo.br(i), r.onlineState = e, r.isPrimaryClient && r.sharedClientState.setOnlineState(e);
12911
12942
  }
12912
12943
  }
@@ -12921,7 +12952,7 @@ function eu(t, e) {
12921
12952
  * @param err - A description of the condition that has forced the rejection.
12922
12953
  * Nearly always this will be an indication that the user is no longer
12923
12954
  * authorized to see the data matching the target.
12924
- */ function uu(t, e, i) {
12955
+ */ function au(t, e, i) {
12925
12956
  return n(this, void 0, void 0, (function() {
12926
12957
  var n, o, s, u, a, c;
12927
12958
  return r(this, (function(r) {
@@ -12932,7 +12963,7 @@ function eu(t, e) {
12932
12963
  (s = o && o.key) ? (u = (u = new wn(Pt.comparator)).insert(s, Xt.newNoDocument(s, dt.min())),
12933
12964
  a = xn().add(s), c = new Pn(dt.min(),
12934
12965
  /* targetChanges= */ new Map,
12935
- /* targetMismatches= */ new Tn(ct), u, a), [ 4 /*yield*/ , ou(n, c) ]) : [ 3 /*break*/ , 2 ];
12966
+ /* targetMismatches= */ new Tn(ct), u, a), [ 4 /*yield*/ , su(n, c) ]) : [ 3 /*break*/ , 2 ];
12936
12967
 
12937
12968
  case 1:
12938
12969
  return r.sent(),
@@ -12941,12 +12972,12 @@ function eu(t, e) {
12941
12972
  // RemoteEvent. If `applyRemoteEvent()` throws, we want to re-listen to
12942
12973
  // this query when the RemoteStore restarts the Watch stream, which should
12943
12974
  // re-trigger the target failure.
12944
- n.Bo = n.Bo.remove(s), n.Uo.delete(e), mu(n), [ 3 /*break*/ , 4 ];
12975
+ n.Bo = n.Bo.remove(s), n.Uo.delete(e), gu(n), [ 3 /*break*/ , 4 ];
12945
12976
 
12946
12977
  case 2:
12947
12978
  return [ 4 /*yield*/ , wo(n.localStore, e,
12948
12979
  /* keepPersistedTargetData */ !1).then((function() {
12949
- return du(n, e, i);
12980
+ return pu(n, e, i);
12950
12981
  })).catch(Vi) ];
12951
12982
 
12952
12983
  case 3:
@@ -12959,7 +12990,7 @@ function eu(t, e) {
12959
12990
  }));
12960
12991
  }
12961
12992
 
12962
- function au(t, e) {
12993
+ function cu(t, e) {
12963
12994
  return n(this, void 0, void 0, (function() {
12964
12995
  var n, i, o;
12965
12996
  return r(this, (function(r) {
@@ -12976,8 +13007,8 @@ function au(t, e) {
12976
13007
  // raise events immediately (depending on whether the watcher is caught
12977
13008
  // up), so we raise user callbacks first so that they consistently happen
12978
13009
  // before listen events.
12979
- lu(n, i, /*error=*/ null), fu(n, i), n.sharedClientState.updateMutationState(i, "acknowledged"),
12980
- [ 4 /*yield*/ , gu(n, o) ];
13010
+ du(n, i, /*error=*/ null), lu(n, i), n.sharedClientState.updateMutationState(i, "acknowledged"),
13011
+ [ 4 /*yield*/ , wu(n, o) ];
12981
13012
 
12982
13013
  case 3:
12983
13014
  // The local store may or may not be able to apply the write result and
@@ -12999,7 +13030,7 @@ function au(t, e) {
12999
13030
  }));
13000
13031
  }
13001
13032
 
13002
- function cu(t, e, i) {
13033
+ function hu(t, e, i) {
13003
13034
  return n(this, void 0, void 0, (function() {
13004
13035
  var n, o;
13005
13036
  return r(this, (function(r) {
@@ -13028,8 +13059,8 @@ function cu(t, e, i) {
13028
13059
  // raise events immediately (depending on whether the watcher is caught up),
13029
13060
  // so we raise user callbacks first so that they consistently happen before
13030
13061
  // listen events.
13031
- lu(n, e, i), fu(n, e), n.sharedClientState.updateMutationState(e, "rejected", i),
13032
- [ 4 /*yield*/ , gu(n, o) ];
13062
+ du(n, e, i), lu(n, e), n.sharedClientState.updateMutationState(e, "rejected", i),
13063
+ [ 4 /*yield*/ , wu(n, o) ];
13033
13064
 
13034
13065
  case 3:
13035
13066
  // The local store may or may not be able to apply the write result and
@@ -13054,7 +13085,7 @@ function cu(t, e, i) {
13054
13085
  /**
13055
13086
  * Registers a user callback that resolves when all pending mutations at the moment of calling
13056
13087
  * are acknowledged .
13057
- */ function hu(t, e) {
13088
+ */ function fu(t, e) {
13058
13089
  return n(this, void 0, void 0, (function() {
13059
13090
  var n, i, o, s, u;
13060
13091
  return r(this, (function(r) {
@@ -13076,7 +13107,7 @@ function cu(t, e, i) {
13076
13107
  n.jo.set(i, o), [ 3 /*break*/ , 4 ]);
13077
13108
 
13078
13109
  case 3:
13079
- return s = r.sent(), u = Ls(s, "Initialization of waitForPendingWrites() operation failed"),
13110
+ return s = r.sent(), u = Ps(s, "Initialization of waitForPendingWrites() operation failed"),
13080
13111
  e.reject(u), [ 3 /*break*/ , 4 ];
13081
13112
 
13082
13113
  case 4:
@@ -13089,14 +13120,14 @@ function cu(t, e, i) {
13089
13120
  /**
13090
13121
  * Triggers the callbacks that are waiting for this batch id to get acknowledged by server,
13091
13122
  * if there are any.
13092
- */ function fu(t, e) {
13123
+ */ function lu(t, e) {
13093
13124
  (t.jo.get(e) || []).forEach((function(t) {
13094
13125
  t.resolve();
13095
13126
  })), t.jo.delete(e)
13096
13127
  /** Reject all outstanding callbacks waiting for pending writes to complete. */;
13097
13128
  }
13098
13129
 
13099
- function lu(t, e, n) {
13130
+ function du(t, e, n) {
13100
13131
  var r = W(t), i = r.Ko[r.currentUser.toKey()];
13101
13132
  // NOTE: Mutations restored from persistence won't have callbacks, so it's
13102
13133
  // okay for there to be no callback for this ID.
@@ -13106,7 +13137,7 @@ function lu(t, e, n) {
13106
13137
  }
13107
13138
  }
13108
13139
 
13109
- function du(t, e, n) {
13140
+ function pu(t, e, n) {
13110
13141
  void 0 === n && (n = null), t.sharedClientState.removeLocalQueryTarget(e);
13111
13142
  for (var r = 0, i = t.Fo.get(e); r < i.length; r++) {
13112
13143
  var o = i[r];
@@ -13115,32 +13146,32 @@ function du(t, e, n) {
13115
13146
  t.Fo.delete(e), t.isPrimaryClient && t.qo.us(e).forEach((function(e) {
13116
13147
  t.qo.containsKey(e) ||
13117
13148
  // We removed the last reference for this key
13118
- pu(t, e);
13149
+ yu(t, e);
13119
13150
  }));
13120
13151
  }
13121
13152
 
13122
- function pu(t, e) {
13153
+ function yu(t, e) {
13123
13154
  t.Lo.delete(e.path.canonicalString());
13124
13155
  // It's possible that the target already got removed because the query failed. In that case,
13125
13156
  // the key won't exist in `limboTargetsByKey`. Only do the cleanup if we still have the target.
13126
13157
  var n = t.Bo.get(e);
13127
- null !== n && (hs(t.remoteStore, n), t.Bo = t.Bo.remove(e), t.Uo.delete(n), mu(t));
13158
+ null !== n && (hs(t.remoteStore, n), t.Bo = t.Bo.remove(e), t.Uo.delete(n), gu(t));
13128
13159
  }
13129
13160
 
13130
- function yu(t, e, n) {
13161
+ function vu(t, e, n) {
13131
13162
  for (var r = 0, i = n; r < i.length; r++) {
13132
13163
  var o = i[r];
13133
- o instanceof Ys ? (t.qo.addReference(o.key, e), vu(t, o)) : o instanceof Js ? (U("SyncEngine", "Document no longer in limbo: " + o.key),
13164
+ o instanceof Js ? (t.qo.addReference(o.key, e), mu(t, o)) : o instanceof Xs ? (U("SyncEngine", "Document no longer in limbo: " + o.key),
13134
13165
  t.qo.removeReference(o.key, e), t.qo.containsKey(o.key) ||
13135
13166
  // We removed the last reference for this key
13136
- pu(t, o.key)) : G();
13167
+ yu(t, o.key)) : G();
13137
13168
  }
13138
13169
  }
13139
13170
 
13140
- function vu(t, e) {
13171
+ function mu(t, e) {
13141
13172
  var n = e.key, r = n.path.canonicalString();
13142
13173
  t.Bo.get(n) || t.Lo.has(r) || (U("SyncEngine", "New document in limbo: " + n), t.Lo.add(r),
13143
- mu(t));
13174
+ gu(t));
13144
13175
  }
13145
13176
 
13146
13177
  /**
@@ -13150,16 +13181,16 @@ function vu(t, e) {
13150
13181
  * Without bounding the number of concurrent resolutions, the server can fail
13151
13182
  * with "resource exhausted" errors which can lead to pathological client
13152
13183
  * behavior as seen in https://github.com/firebase/firebase-js-sdk/issues/2683.
13153
- */ function mu(t) {
13184
+ */ function gu(t) {
13154
13185
  for (;t.Lo.size > 0 && t.Bo.size < t.maxConcurrentLimboResolutions; ) {
13155
13186
  var e = t.Lo.values().next().value;
13156
13187
  t.Lo.delete(e);
13157
13188
  var n = new Pt(gt.fromString(e)), r = t.Qo.next();
13158
- t.Uo.set(r, new Zs(n)), t.Bo = t.Bo.insert(n, r), cs(t.remoteStore, new oi(ke(be(n.path)), r, 2 /* LimboResolution */ , st.I));
13189
+ t.Uo.set(r, new tu(n)), t.Bo = t.Bo.insert(n, r), cs(t.remoteStore, new oi(ke(be(n.path)), r, 2 /* LimboResolution */ , st.I));
13159
13190
  }
13160
13191
  }
13161
13192
 
13162
- function gu(t, e, i) {
13193
+ function wu(t, e, i) {
13163
13194
  return n(this, void 0, void 0, (function() {
13164
13195
  var o, s, u, a;
13165
13196
  return r(this, (function(c) {
@@ -13231,7 +13262,7 @@ function gu(t, e, i) {
13231
13262
  }));
13232
13263
  }
13233
13264
 
13234
- function wu(t, e) {
13265
+ function bu(t, e) {
13235
13266
  return n(this, void 0, void 0, (function() {
13236
13267
  var n, i;
13237
13268
  return r(this, (function(r) {
@@ -13251,7 +13282,7 @@ function wu(t, e) {
13251
13282
  })), t.jo.clear();
13252
13283
  }(n),
13253
13284
  // TODO(b/114226417): Consider calling this only in the primary tab.
13254
- n.sharedClientState.handleUserChange(e, i.removedBatchIds, i.addedBatchIds), [ 4 /*yield*/ , gu(n, i.Gn) ];
13285
+ n.sharedClientState.handleUserChange(e, i.removedBatchIds, i.addedBatchIds), [ 4 /*yield*/ , wu(n, i.Gn) ];
13255
13286
 
13256
13287
  case 2:
13257
13288
  r.sent(), r.label = 3;
@@ -13263,7 +13294,7 @@ function wu(t, e) {
13263
13294
  }));
13264
13295
  }
13265
13296
 
13266
- function bu(t, e) {
13297
+ function Iu(t, e) {
13267
13298
  var n = W(t), r = n.Uo.get(e);
13268
13299
  if (r && r.$o) return xn().add(r.key);
13269
13300
  var i = xn(), o = n.Fo.get(e);
@@ -13278,7 +13309,7 @@ function bu(t, e) {
13278
13309
  /**
13279
13310
  * Reconcile the list of synced documents in an existing view with those
13280
13311
  * from persistence.
13281
- */ function Iu(t, e) {
13312
+ */ function Tu(t, e) {
13282
13313
  return n(this, void 0, void 0, (function() {
13283
13314
  var n, i, o;
13284
13315
  return r(this, (function(r) {
@@ -13288,7 +13319,7 @@ function bu(t, e) {
13288
13319
  /* usePreviousResults= */ !0) ];
13289
13320
 
13290
13321
  case 1:
13291
- return i = r.sent(), o = e.view.ko(i), [ 2 /*return*/ , (n.isPrimaryClient && yu(n, e.targetId, o.Co),
13322
+ return i = r.sent(), o = e.view.ko(i), [ 2 /*return*/ , (n.isPrimaryClient && vu(n, e.targetId, o.Co),
13292
13323
  o) ];
13293
13324
  }
13294
13325
  }));
@@ -13300,12 +13331,12 @@ function bu(t, e) {
13300
13331
  * snapshots if needed.
13301
13332
  */
13302
13333
  // PORTING NOTE: Multi-Tab only.
13303
- function Tu(t) {
13334
+ function Eu(t) {
13304
13335
  return n(this, void 0, void 0, (function() {
13305
13336
  var e;
13306
13337
  return r(this, (function(n) {
13307
13338
  return [ 2 /*return*/ , To((e = W(t)).localStore).then((function(t) {
13308
- return gu(e, t);
13339
+ return wu(e, t);
13309
13340
  })) ];
13310
13341
  }));
13311
13342
  }));
@@ -13313,7 +13344,7 @@ function Tu(t) {
13313
13344
 
13314
13345
  /** Applies a mutation state to an existing batch. */
13315
13346
  // PORTING NOTE: Multi-Tab only.
13316
- function Eu(t, e, i, o) {
13347
+ function Su(t, e, i, o) {
13317
13348
  return n(this, void 0, void 0, (function() {
13318
13349
  var n, s;
13319
13350
  return r(this, (function(r) {
@@ -13341,12 +13372,12 @@ function Eu(t, e, i, o) {
13341
13372
  "acknowledged" === i || "rejected" === i ? (
13342
13373
  // NOTE: Both these methods are no-ops for batches that originated from
13343
13374
  // other clients.
13344
- lu(n, e, o || null), fu(n, e), function(t, e) {
13375
+ du(n, e, o || null), lu(n, e), function(t, e) {
13345
13376
  W(W(t).An).ee(e);
13346
13377
  }(n.localStore, e)) : G(), r.label = 4;
13347
13378
 
13348
13379
  case 4:
13349
- return [ 4 /*yield*/ , gu(n, s) ];
13380
+ return [ 4 /*yield*/ , wu(n, s) ];
13350
13381
 
13351
13382
  case 5:
13352
13383
  return r.sent(), [ 3 /*break*/ , 7 ];
@@ -13370,17 +13401,17 @@ function Eu(t, e, i, o) {
13370
13401
 
13371
13402
  /** Applies a query target change from a different tab. */
13372
13403
  // PORTING NOTE: Multi-Tab only.
13373
- function Su(t, e) {
13404
+ function _u(t, e) {
13374
13405
  return n(this, void 0, void 0, (function() {
13375
13406
  var n, i, o, s, u, a, c, h;
13376
13407
  return r(this, (function(r) {
13377
13408
  switch (r.label) {
13378
13409
  case 0:
13379
- return Cu(n = W(t)), xu(n), !0 !== e || !0 === n.Wo ? [ 3 /*break*/ , 3 ] : (i = n.sharedClientState.getAllActiveQueryTargets(),
13380
- [ 4 /*yield*/ , _u(n, i.toArray()) ]);
13410
+ return xu(n = W(t)), Ru(n), !0 !== e || !0 === n.Wo ? [ 3 /*break*/ , 3 ] : (i = n.sharedClientState.getAllActiveQueryTargets(),
13411
+ [ 4 /*yield*/ , Au(n, i.toArray()) ]);
13381
13412
 
13382
13413
  case 1:
13383
- return o = r.sent(), n.Wo = !0, [ 4 /*yield*/ , Ns(n.remoteStore, !0) ];
13414
+ return o = r.sent(), n.Wo = !0, [ 4 /*yield*/ , Cs(n.remoteStore, !0) ];
13384
13415
 
13385
13416
  case 2:
13386
13417
  for (r.sent(), s = 0, u = o; s < u.length; s++) a = u[s], cs(n.remoteStore, a);
@@ -13390,13 +13421,13 @@ function Su(t, e) {
13390
13421
  return !1 !== e || !1 === n.Wo ? [ 3 /*break*/ , 7 ] : (c = [], h = Promise.resolve(),
13391
13422
  n.Fo.forEach((function(t, e) {
13392
13423
  n.sharedClientState.isLocalQueryTarget(e) ? c.push(e) : h = h.then((function() {
13393
- return du(n, e), wo(n.localStore, e,
13424
+ return pu(n, e), wo(n.localStore, e,
13394
13425
  /*keepPersistedTargetData=*/ !0);
13395
13426
  })), hs(n.remoteStore, e);
13396
13427
  })), [ 4 /*yield*/ , h ]);
13397
13428
 
13398
13429
  case 4:
13399
- return r.sent(), [ 4 /*yield*/ , _u(n, c) ];
13430
+ return r.sent(), [ 4 /*yield*/ , Au(n, c) ];
13400
13431
 
13401
13432
  case 5:
13402
13433
  return r.sent(),
@@ -13406,7 +13437,7 @@ function Su(t, e) {
13406
13437
  e.Uo.forEach((function(t, n) {
13407
13438
  hs(e.remoteStore, n);
13408
13439
  })), e.qo.hs(), e.Uo = new Map, e.Bo = new wn(Pt.comparator);
13409
- }(n), n.Wo = !1, [ 4 /*yield*/ , Ns(n.remoteStore, !1) ];
13440
+ }(n), n.Wo = !1, [ 4 /*yield*/ , Cs(n.remoteStore, !1) ];
13410
13441
 
13411
13442
  case 6:
13412
13443
  r.sent(), r.label = 7;
@@ -13418,7 +13449,7 @@ function Su(t, e) {
13418
13449
  }));
13419
13450
  }
13420
13451
 
13421
- function _u(t, e, i) {
13452
+ function Au(t, e, i) {
13422
13453
  return n(this, void 0, void 0, (function() {
13423
13454
  var n, i, o, s, u, a, c, h, f, l, d, p, y, v;
13424
13455
  return r(this, (function(r) {
@@ -13437,7 +13468,7 @@ function _u(t, e, i) {
13437
13468
  c = r.sent(), f = 0, l = h, r.label = 3;
13438
13469
 
13439
13470
  case 3:
13440
- return f < l.length ? (d = l[f], p = n.Mo.get(d), [ 4 /*yield*/ , Iu(n, p) ]) : [ 3 /*break*/ , 6 ];
13471
+ return f < l.length ? (d = l[f], p = n.Mo.get(d), [ 4 /*yield*/ , Tu(n, p) ]) : [ 3 /*break*/ , 6 ];
13441
13472
 
13442
13473
  case 4:
13443
13474
  (y = r.sent()).snapshot && o.push(y.snapshot), r.label = 5;
@@ -13455,7 +13486,7 @@ function _u(t, e, i) {
13455
13486
  return v = r.sent(), [ 4 /*yield*/ , go(n.localStore, v) ];
13456
13487
 
13457
13488
  case 9:
13458
- return c = r.sent(), [ 4 /*yield*/ , nu(n, Au(v), a,
13489
+ return c = r.sent(), [ 4 /*yield*/ , ru(n, ku(v), a,
13459
13490
  /*current=*/ !1) ];
13460
13491
 
13461
13492
  case 10:
@@ -13485,20 +13516,20 @@ function _u(t, e, i) {
13485
13516
  * difference will not cause issues.
13486
13517
  */
13487
13518
  // PORTING NOTE: Multi-Tab only.
13488
- function Au(t) {
13519
+ function ku(t) {
13489
13520
  return we(t.path, t.collectionGroup, t.orderBy, t.filters, t.limit, "F" /* First */ , t.startAt, t.endAt);
13490
13521
  }
13491
13522
 
13492
13523
  /** Returns the IDs of the clients that are currently active. */
13493
13524
  // PORTING NOTE: Multi-Tab only.
13494
- function ku(t) {
13525
+ function Du(t) {
13495
13526
  var e = W(t);
13496
13527
  return W(W(e.localStore).persistence).Tn();
13497
13528
  }
13498
13529
 
13499
13530
  /** Applies a query target change from a different tab. */
13500
13531
  // PORTING NOTE: Multi-Tab only.
13501
- function Du(t, e, i, o) {
13532
+ function Nu(t, e, i, o) {
13502
13533
  return n(this, void 0, void 0, (function() {
13503
13534
  var n, s, u;
13504
13535
  return r(this, (function(r) {
@@ -13526,7 +13557,7 @@ function Du(t, e, i, o) {
13526
13557
 
13527
13558
  case 3:
13528
13559
  return s = r.sent(), u = Pn.createSynthesizedRemoteEventForCurrentChange(e, "current" === i),
13529
- [ 4 /*yield*/ , gu(n, s, u) ];
13560
+ [ 4 /*yield*/ , wu(n, s, u) ];
13530
13561
 
13531
13562
  case 4:
13532
13563
  return r.sent(), [ 3 /*break*/ , 8 ];
@@ -13536,7 +13567,7 @@ function Du(t, e, i, o) {
13536
13567
  /* keepPersistedTargetData */ !0) ];
13537
13568
 
13538
13569
  case 6:
13539
- return r.sent(), du(n, e, o), [ 3 /*break*/ , 8 ];
13570
+ return r.sent(), pu(n, e, o), [ 3 /*break*/ , 8 ];
13540
13571
 
13541
13572
  case 7:
13542
13573
  G(), r.label = 8;
@@ -13548,13 +13579,13 @@ function Du(t, e, i, o) {
13548
13579
  }));
13549
13580
  }
13550
13581
 
13551
- /** Adds or removes Watch targets for queries from different tabs. */ function Nu(t, e, i) {
13582
+ /** Adds or removes Watch targets for queries from different tabs. */ function Cu(t, e, i) {
13552
13583
  return n(this, void 0, void 0, (function() {
13553
13584
  var n, o, s, u, a, c, h, f, l, d;
13554
13585
  return r(this, (function(p) {
13555
13586
  switch (p.label) {
13556
13587
  case 0:
13557
- if (!(n = Cu(t)).Wo) return [ 3 /*break*/ , 10 ];
13588
+ if (!(n = xu(t)).Wo) return [ 3 /*break*/ , 10 ];
13558
13589
  o = 0, s = e, p.label = 1;
13559
13590
 
13560
13591
  case 1:
@@ -13566,7 +13597,7 @@ function Du(t, e, i, o) {
13566
13597
  return a = p.sent(), [ 4 /*yield*/ , go(n.localStore, a) ];
13567
13598
 
13568
13599
  case 3:
13569
- return c = p.sent(), [ 4 /*yield*/ , nu(n, Au(a), c.targetId,
13600
+ return c = p.sent(), [ 4 /*yield*/ , ru(n, ku(a), c.targetId,
13570
13601
  /*current=*/ !1) ];
13571
13602
 
13572
13603
  case 4:
@@ -13582,7 +13613,7 @@ function Du(t, e, i, o) {
13582
13613
  case 0:
13583
13614
  return n.Fo.has(t) ? [ 4 /*yield*/ , wo(n.localStore, t,
13584
13615
  /* keepPersistedTargetData */ !1).then((function() {
13585
- hs(n.remoteStore, t), du(n, t);
13616
+ hs(n.remoteStore, t), pu(n, t);
13586
13617
  })).catch(Vi) ] : [ 3 /*break*/ , 2 ];
13587
13618
 
13588
13619
  // Release queries that are still active.
@@ -13612,16 +13643,16 @@ function Du(t, e, i, o) {
13612
13643
  }));
13613
13644
  }
13614
13645
 
13615
- function Cu(t) {
13646
+ function xu(t) {
13616
13647
  var e = W(t);
13617
- return e.remoteStore.remoteSyncer.applyRemoteEvent = ou.bind(null, e), e.remoteStore.remoteSyncer.getRemoteKeysForTarget = bu.bind(null, e),
13618
- e.remoteStore.remoteSyncer.rejectListen = uu.bind(null, e), e.Oo.br = Bs.bind(null, e.eventManager),
13619
- e.Oo.zo = js.bind(null, e.eventManager), e;
13648
+ return e.remoteStore.remoteSyncer.applyRemoteEvent = su.bind(null, e), e.remoteStore.remoteSyncer.getRemoteKeysForTarget = Iu.bind(null, e),
13649
+ e.remoteStore.remoteSyncer.rejectListen = au.bind(null, e), e.Oo.br = js.bind(null, e.eventManager),
13650
+ e.Oo.zo = Ks.bind(null, e.eventManager), e;
13620
13651
  }
13621
13652
 
13622
- function xu(t) {
13653
+ function Ru(t) {
13623
13654
  var e = W(t);
13624
- return e.remoteStore.remoteSyncer.applySuccessfulWrite = au.bind(null, e), e.remoteStore.remoteSyncer.rejectFailedWrite = cu.bind(null, e),
13655
+ return e.remoteStore.remoteSyncer.applySuccessfulWrite = cu.bind(null, e), e.remoteStore.remoteSyncer.rejectFailedWrite = hu.bind(null, e),
13625
13656
  e
13626
13657
  /**
13627
13658
  * Loads a Firestore bundle into the SDK. The returned promise resolves when
@@ -13633,7 +13664,7 @@ function xu(t) {
13633
13664
  */;
13634
13665
  }
13635
13666
 
13636
- function Ru(t, e, i) {
13667
+ function Lu(t, e, i) {
13637
13668
  var o = W(t);
13638
13669
  // eslint-disable-next-line @typescript-eslint/no-floating-promises
13639
13670
  (function(t, e, i) {
@@ -13669,7 +13700,7 @@ function Ru(t, e, i) {
13669
13700
  }(n))) ];
13670
13701
 
13671
13702
  case 4:
13672
- return i._updateProgress(Hs(n)), o = new Ws(n, t.localStore, e.k), [ 4 /*yield*/ , e.Ho() ];
13703
+ return i._updateProgress(Ys(n)), o = new Hs(n, t.localStore, e.k), [ 4 /*yield*/ , e.Ho() ];
13673
13704
 
13674
13705
  case 5:
13675
13706
  s = r.sent(), r.label = 6;
@@ -13693,7 +13724,7 @@ function Ru(t, e, i) {
13693
13724
  // TODO(b/160876443): This currently raises snapshots with
13694
13725
  // `fromCache=false` if users already listen to some queries and bundles
13695
13726
  // has newer version.
13696
- return a = r.sent(), [ 4 /*yield*/ , gu(t, a.In,
13727
+ return a = r.sent(), [ 4 /*yield*/ , wu(t, a.In,
13697
13728
  /* remoteEvent */ void 0) ];
13698
13729
 
13699
13730
  case 12:
@@ -13749,7 +13780,7 @@ function Ru(t, e, i) {
13749
13780
  }));
13750
13781
  }
13751
13782
 
13752
- var Lu = /** @class */ function() {
13783
+ var Pu = /** @class */ function() {
13753
13784
  function t() {
13754
13785
  this.synchronizeTabs = !1;
13755
13786
  }
@@ -13790,7 +13821,7 @@ var Lu = /** @class */ function() {
13790
13821
  }));
13791
13822
  }));
13792
13823
  }, t;
13793
- }(), Pu = /** @class */ function(e) {
13824
+ }(), Ou = /** @class */ function(e) {
13794
13825
  function i(t, n, r) {
13795
13826
  var i = this;
13796
13827
  return (i = e.call(this) || this).tc = t, i.cacheSizeBytes = n, i.forceOwnership = r,
@@ -13812,7 +13843,7 @@ var Lu = /** @class */ function() {
13812
13843
 
13813
13844
  case 3:
13814
13845
  // Enqueue writes from a previous session
13815
- return r.sent(), [ 4 /*yield*/ , xu(this.tc.syncEngine) ];
13846
+ return r.sent(), [ 4 /*yield*/ , Ru(this.tc.syncEngine) ];
13816
13847
 
13817
13848
  case 4:
13818
13849
  // Enqueue writes from a previous session
@@ -13844,7 +13875,7 @@ var Lu = /** @class */ function() {
13844
13875
  }, i.prototype.Jo = function(t) {
13845
13876
  return new zo;
13846
13877
  }, i;
13847
- }(Lu), Ou = /** @class */ function(e) {
13878
+ }(Pu), Mu = /** @class */ function(e) {
13848
13879
  function i(t, n) {
13849
13880
  var r = this;
13850
13881
  return (r = e.call(this, t, n, /* forceOwnership= */ !1) || this).tc = t, r.cacheSizeBytes = n,
@@ -13860,11 +13891,11 @@ var Lu = /** @class */ function() {
13860
13891
 
13861
13892
  case 1:
13862
13893
  return s.sent(), i = this.tc.syncEngine, this.sharedClientState instanceof Go ? (this.sharedClientState.syncEngine = {
13863
- mi: Eu.bind(null, i),
13864
- gi: Du.bind(null, i),
13865
- yi: Nu.bind(null, i),
13866
- Tn: ku.bind(null, i),
13867
- _i: Tu.bind(null, i)
13894
+ mi: Su.bind(null, i),
13895
+ gi: Nu.bind(null, i),
13896
+ yi: Cu.bind(null, i),
13897
+ Tn: Du.bind(null, i),
13898
+ _i: Eu.bind(null, i)
13868
13899
  }, [ 4 /*yield*/ , this.sharedClientState.start() ]) : [ 3 /*break*/ , 3 ];
13869
13900
 
13870
13901
  case 2:
@@ -13878,7 +13909,7 @@ var Lu = /** @class */ function() {
13878
13909
  return r(this, (function(e) {
13879
13910
  switch (e.label) {
13880
13911
  case 0:
13881
- return [ 4 /*yield*/ , Su(this.tc.syncEngine, t) ];
13912
+ return [ 4 /*yield*/ , _u(this.tc.syncEngine, t) ];
13882
13913
 
13883
13914
  case 1:
13884
13915
  return e.sent(), this.gcScheduler && (t && !this.gcScheduler.started ? this.gcScheduler.start(this.localStore) : t || this.gcScheduler.stop()),
@@ -13901,7 +13932,7 @@ var Lu = /** @class */ function() {
13901
13932
  var n = io(t.databaseInfo.databaseId, t.databaseInfo.persistenceKey);
13902
13933
  return new Go(e, t.asyncQueue, n, t.clientId, t.initialUser);
13903
13934
  }, i;
13904
- }(Pu), Mu = /** @class */ function() {
13935
+ }(Ou), Fu = /** @class */ function() {
13905
13936
  function t() {}
13906
13937
  return t.prototype.initialize = function(t, e) {
13907
13938
  return n(this, void 0, void 0, (function() {
@@ -13914,9 +13945,9 @@ var Lu = /** @class */ function() {
13914
13945
  this.remoteStore = this.createRemoteStore(e), this.eventManager = this.createEventManager(e),
13915
13946
  this.syncEngine = this.createSyncEngine(e,
13916
13947
  /* startAsPrimary=*/ !t.synchronizeTabs), this.sharedClientState.onlineStateHandler = function(t) {
13917
- return su(n.syncEngine, t, 1 /* SharedClientState */);
13918
- }, this.remoteStore.remoteSyncer.handleCredentialChange = wu.bind(null, this.syncEngine),
13919
- [ 4 /*yield*/ , Ns(this.remoteStore, this.syncEngine.isPrimaryClient) ]);
13948
+ return uu(n.syncEngine, t, 1 /* SharedClientState */);
13949
+ }, this.remoteStore.remoteSyncer.handleCredentialChange = bu.bind(null, this.syncEngine),
13950
+ [ 4 /*yield*/ , Cs(this.remoteStore, this.syncEngine.isPrimaryClient) ]);
13920
13951
 
13921
13952
  case 1:
13922
13953
  r.sent(), r.label = 2;
@@ -13927,7 +13958,7 @@ var Lu = /** @class */ function() {
13927
13958
  }));
13928
13959
  }));
13929
13960
  }, t.prototype.createEventManager = function(t) {
13930
- return new Vs;
13961
+ return new qs;
13931
13962
  }, t.prototype.createDatastore = function(t) {
13932
13963
  var e, n = Zo(t.databaseInfo.databaseId), r = (e = t.databaseInfo, new Jo(e));
13933
13964
  /** Return the Platform-specific connectivity monitor. */ return function(t, e, n, r) {
@@ -13936,13 +13967,13 @@ var Lu = /** @class */ function() {
13936
13967
  }, t.prototype.createRemoteStore = function(t) {
13937
13968
  var e, n, r, i, o, s = this;
13938
13969
  return e = this.localStore, n = this.datastore, r = t.asyncQueue, i = function(t) {
13939
- return su(s.syncEngine, t, 0 /* RemoteStore */);
13970
+ return uu(s.syncEngine, t, 0 /* RemoteStore */);
13940
13971
  }, o = Wo.Pt() ? new Wo : new Qo, new ss(e, n, r, i, o);
13941
13972
  }, t.prototype.createSyncEngine = function(t, e) {
13942
13973
  return function(t, e, n,
13943
13974
  // PORTING NOTE: Manages state synchronization in multi-tab environments.
13944
13975
  r, i, o, s) {
13945
- var u = new tu(t, e, n, r, i, o);
13976
+ var u = new eu(t, e, n, r, i, o);
13946
13977
  return s && (u.Wo = !0), u;
13947
13978
  }(this.localStore, this.remoteStore, this.eventManager, this.sharedClientState, t.initialUser, t.maxConcurrentLimboResolutions, e);
13948
13979
  }, t.prototype.terminate = function() {
@@ -13997,7 +14028,7 @@ var Lu = /** @class */ function() {
13997
14028
  * @param bytesPerRead - How many bytes each `read()` from the returned reader
13998
14029
  * will read.
13999
14030
  */
14000
- function Fu(t, e) {
14031
+ function Vu(t, e) {
14001
14032
  void 0 === e && (e = 10240);
14002
14033
  var i = 0;
14003
14034
  // The TypeScript definition for ReadableStreamReader changed. We use
@@ -14070,7 +14101,7 @@ function Fu(t, e) {
14070
14101
  * A wrapper implementation of Observer<T> that will dispatch events
14071
14102
  * asynchronously. To allow immediate silencing, a mute call is added which
14072
14103
  * causes events scheduled to no longer be raised.
14073
- */ var Vu = /** @class */ function() {
14104
+ */ var qu = /** @class */ function() {
14074
14105
  function t(t) {
14075
14106
  this.observer = t,
14076
14107
  /**
@@ -14091,7 +14122,7 @@ function Fu(t, e) {
14091
14122
  n.muted || t(e);
14092
14123
  }), 0);
14093
14124
  }, t;
14094
- }(), qu = /** @class */ function() {
14125
+ }(), Uu = /** @class */ function() {
14095
14126
  function t(
14096
14127
  /** The reader to read from underlying binary bundle data source. */
14097
14128
  t, e) {
@@ -14157,7 +14188,7 @@ function Fu(t, e) {
14157
14188
  [ 4 /*yield*/ , this.ac(n) ]);
14158
14189
 
14159
14190
  case 2:
14160
- return i = r.sent(), [ 2 /*return*/ , new zs(JSON.parse(i), t.length + n) ];
14191
+ return i = r.sent(), [ 2 /*return*/ , new Qs(JSON.parse(i), t.length + n) ];
14161
14192
  }
14162
14193
  }));
14163
14194
  }));
@@ -14251,7 +14282,7 @@ function Fu(t, e) {
14251
14282
  }));
14252
14283
  }));
14253
14284
  }, t;
14254
- }(), Uu = /** @class */ function() {
14285
+ }(), Bu = /** @class */ function() {
14255
14286
  function t(t) {
14256
14287
  this.datastore = t,
14257
14288
  // The version of each document that was read during this transaction.
@@ -14425,7 +14456,7 @@ function Fu(t, e) {
14425
14456
  }, t.prototype.write = function(t) {
14426
14457
  this.ensureCommitNotCalled(), this.mutations.push(t);
14427
14458
  }, t.prototype.ensureCommitNotCalled = function() {}, t;
14428
- }(), Bu = /** @class */ function() {
14459
+ }(), ju = /** @class */ function() {
14429
14460
  function t(t, e, n, r) {
14430
14461
  this.asyncQueue = t, this.datastore = e, this.updateFunction = n, this.deferred = r,
14431
14462
  this.lc = 5, this.ur = new ts(this.asyncQueue, "transaction_retry" /* TransactionRetry */)
@@ -14439,7 +14470,7 @@ function Fu(t, e) {
14439
14470
  return n(t, void 0, void 0, (function() {
14440
14471
  var t, e, n = this;
14441
14472
  return r(this, (function(r) {
14442
- return t = new Uu(this.datastore), (e = this.dc(t)) && e.then((function(e) {
14473
+ return t = new Bu(this.datastore), (e = this.dc(t)) && e.then((function(e) {
14443
14474
  n.asyncQueue.enqueueAndForget((function() {
14444
14475
  return t.commit().then((function() {
14445
14476
  n.deferred.resolve(e);
@@ -14476,7 +14507,7 @@ function Fu(t, e) {
14476
14507
  }
14477
14508
  return !1;
14478
14509
  }, t;
14479
- }(), ju = /** @class */ function() {
14510
+ }(), Ku = /** @class */ function() {
14480
14511
  function t(t, e,
14481
14512
  /**
14482
14513
  * Asynchronous queue responsible for all of our internal processing. When
@@ -14491,6 +14522,8 @@ function Fu(t, e) {
14491
14522
  this.authCredentials = t, this.appCheckCredentials = e, this.asyncQueue = i, this.databaseInfo = o,
14492
14523
  this.user = O.UNAUTHENTICATED, this.clientId = at.A(), this.authCredentialListener = function() {
14493
14524
  return Promise.resolve();
14525
+ }, this.appCheckCredentialListener = function() {
14526
+ return Promise.resolve();
14494
14527
  }, this.authCredentials.start(i, (function(t) {
14495
14528
  return n(s, void 0, void 0, (function() {
14496
14529
  return r(this, (function(e) {
@@ -14503,10 +14536,8 @@ function Fu(t, e) {
14503
14536
  }
14504
14537
  }));
14505
14538
  }));
14506
- })),
14507
- // Register an empty credentials change listener to activate token refresh.
14508
- this.appCheckCredentials.start(i, (function() {
14509
- return Promise.resolve();
14539
+ })), this.appCheckCredentials.start(i, (function(t) {
14540
+ return U("FirestoreClient", "Received new app check token=", t), s.appCheckCredentialListener(t, s.user);
14510
14541
  }));
14511
14542
  }
14512
14543
  return t.prototype.getConfiguration = function() {
@@ -14525,6 +14556,8 @@ function Fu(t, e) {
14525
14556
  }));
14526
14557
  }, t.prototype.setCredentialChangeListener = function(t) {
14527
14558
  this.authCredentialListener = t;
14559
+ }, t.prototype.setAppCheckTokenChangeListener = function(t) {
14560
+ this.appCheckCredentialListener = t;
14528
14561
  },
14529
14562
  /**
14530
14563
  * Checks that the client has not been terminated. Ensures that other methods on
@@ -14561,7 +14594,7 @@ function Fu(t, e) {
14561
14594
  [ 3 /*break*/ , 6 ];
14562
14595
 
14563
14596
  case 5:
14564
- return t = r.sent(), n = Ls(t, "Failed to shutdown persistence"), e.reject(n), [ 3 /*break*/ , 6 ];
14597
+ return t = r.sent(), n = Ps(t, "Failed to shutdown persistence"), e.reject(n), [ 3 /*break*/ , 6 ];
14565
14598
 
14566
14599
  case 6:
14567
14600
  return [ 2 /*return*/ ];
@@ -14593,7 +14626,7 @@ function Fu(t, e) {
14593
14626
  *
14594
14627
  * Takes a bundle stream or buffer, and presents abstractions to read bundled
14595
14628
  * elements out of the underlying content.
14596
- */ function Ku(t, e) {
14629
+ */ function Gu(t, e) {
14597
14630
  return n(this, void 0, void 0, (function() {
14598
14631
  var i, o, s = this;
14599
14632
  return r(this, (function(u) {
@@ -14632,69 +14665,42 @@ function Fu(t, e) {
14632
14665
  }));
14633
14666
  }
14634
14667
 
14635
- function Gu(t, e) {
14668
+ function zu(t, e) {
14636
14669
  return n(this, void 0, void 0, (function() {
14637
- var i, o;
14638
- return r(this, (function(s) {
14639
- switch (s.label) {
14670
+ var n, i;
14671
+ return r(this, (function(r) {
14672
+ switch (r.label) {
14640
14673
  case 0:
14641
- return t.asyncQueue.verifyOperationInProgress(), [ 4 /*yield*/ , zu(t) ];
14674
+ return t.asyncQueue.verifyOperationInProgress(), [ 4 /*yield*/ , Qu(t) ];
14642
14675
 
14643
14676
  case 1:
14644
- return i = s.sent(), U("FirestoreClient", "Initializing OnlineComponentProvider"),
14677
+ return n = r.sent(), U("FirestoreClient", "Initializing OnlineComponentProvider"),
14645
14678
  [ 4 /*yield*/ , t.getConfiguration() ];
14646
14679
 
14647
14680
  case 2:
14648
- return o = s.sent(), [ 4 /*yield*/ , e.initialize(i, o) ];
14681
+ return i = r.sent(), [ 4 /*yield*/ , e.initialize(n, i) ];
14649
14682
 
14650
14683
  case 3:
14651
- return s.sent(),
14684
+ return r.sent(),
14652
14685
  // The CredentialChangeListener of the online component provider takes
14653
14686
  // precedence over the offline component provider.
14654
14687
  t.setCredentialChangeListener((function(t) {
14655
- return function(t, e) {
14656
- return n(this, void 0, void 0, (function() {
14657
- var n, i;
14658
- return r(this, (function(r) {
14659
- switch (r.label) {
14660
- case 0:
14661
- return (n = W(t)).asyncQueue.verifyOperationInProgress(), U("RemoteStore", "RemoteStore received new credentials"),
14662
- i = ys(n),
14663
- // Tear down and re-create our network streams. This will ensure we get a
14664
- // fresh auth token for the new user and re-fill the write pipeline with
14665
- // new mutations from the LocalStore (since mutations are per-user).
14666
- n.Gr.add(3 /* CredentialChange */), [ 4 /*yield*/ , as(n) ];
14667
-
14668
- case 1:
14669
- return r.sent(), i &&
14670
- // Don't set the network status to Unknown if we are offline.
14671
- n.Jr.set("Unknown" /* Unknown */), [ 4 /*yield*/ , n.remoteSyncer.handleCredentialChange(e) ];
14672
-
14673
- case 2:
14674
- return r.sent(), n.Gr.delete(3 /* CredentialChange */), [ 4 /*yield*/ , us(n) ];
14675
-
14676
- case 3:
14677
- // Tear down and re-create our network streams. This will ensure we get a
14678
- // fresh auth token for the new user and re-fill the write pipeline with
14679
- // new mutations from the LocalStore (since mutations are per-user).
14680
- return r.sent(), [ 2 /*return*/ ];
14681
- }
14682
- }));
14683
- }));
14684
- }(e.remoteStore, t);
14688
+ return Ns(e.remoteStore, t);
14689
+ })), t.setAppCheckTokenChangeListener((function(t, n) {
14690
+ return Ns(e.remoteStore, n);
14685
14691
  })), t.onlineComponents = e, [ 2 /*return*/ ];
14686
14692
  }
14687
14693
  }));
14688
14694
  }));
14689
14695
  }
14690
14696
 
14691
- function zu(t) {
14697
+ function Qu(t) {
14692
14698
  return n(this, void 0, void 0, (function() {
14693
14699
  return r(this, (function(e) {
14694
14700
  switch (e.label) {
14695
14701
  case 0:
14696
14702
  return t.offlineComponents ? [ 3 /*break*/ , 2 ] : (U("FirestoreClient", "Using default OfflineComponentProvider"),
14697
- [ 4 /*yield*/ , Ku(t, new Lu) ]);
14703
+ [ 4 /*yield*/ , Gu(t, new Pu) ]);
14698
14704
 
14699
14705
  case 1:
14700
14706
  e.sent(), e.label = 2;
@@ -14706,13 +14712,13 @@ function zu(t) {
14706
14712
  }));
14707
14713
  }
14708
14714
 
14709
- function Qu(t) {
14715
+ function Wu(t) {
14710
14716
  return n(this, void 0, void 0, (function() {
14711
14717
  return r(this, (function(e) {
14712
14718
  switch (e.label) {
14713
14719
  case 0:
14714
14720
  return t.onlineComponents ? [ 3 /*break*/ , 2 ] : (U("FirestoreClient", "Using default OnlineComponentProvider"),
14715
- [ 4 /*yield*/ , Gu(t, new Mu) ]);
14721
+ [ 4 /*yield*/ , zu(t, new Fu) ]);
14716
14722
 
14717
14723
  case 1:
14718
14724
  e.sent(), e.label = 2;
@@ -14724,47 +14730,47 @@ function Qu(t) {
14724
14730
  }));
14725
14731
  }
14726
14732
 
14727
- function Wu(t) {
14728
- return zu(t).then((function(t) {
14733
+ function Hu(t) {
14734
+ return Qu(t).then((function(t) {
14729
14735
  return t.persistence;
14730
14736
  }));
14731
14737
  }
14732
14738
 
14733
- function Hu(t) {
14734
- return zu(t).then((function(t) {
14739
+ function Yu(t) {
14740
+ return Qu(t).then((function(t) {
14735
14741
  return t.localStore;
14736
14742
  }));
14737
14743
  }
14738
14744
 
14739
- function Yu(t) {
14740
- return Qu(t).then((function(t) {
14745
+ function Ju(t) {
14746
+ return Wu(t).then((function(t) {
14741
14747
  return t.remoteStore;
14742
14748
  }));
14743
14749
  }
14744
14750
 
14745
- function Ju(t) {
14746
- return Qu(t).then((function(t) {
14751
+ function Xu(t) {
14752
+ return Wu(t).then((function(t) {
14747
14753
  return t.syncEngine;
14748
14754
  }));
14749
14755
  }
14750
14756
 
14751
- function Xu(t) {
14757
+ function $u(t) {
14752
14758
  return n(this, void 0, void 0, (function() {
14753
14759
  var e, n;
14754
14760
  return r(this, (function(r) {
14755
14761
  switch (r.label) {
14756
14762
  case 0:
14757
- return [ 4 /*yield*/ , Qu(t) ];
14763
+ return [ 4 /*yield*/ , Wu(t) ];
14758
14764
 
14759
14765
  case 1:
14760
- return e = r.sent(), [ 2 /*return*/ , ((n = e.eventManager).onListen = eu.bind(null, e.syncEngine),
14761
- n.onUnlisten = ru.bind(null, e.syncEngine), n) ];
14766
+ return e = r.sent(), [ 2 /*return*/ , ((n = e.eventManager).onListen = nu.bind(null, e.syncEngine),
14767
+ n.onUnlisten = iu.bind(null, e.syncEngine), n) ];
14762
14768
  }
14763
14769
  }));
14764
14770
  }));
14765
14771
  }
14766
14772
 
14767
- /** Enables the network connection and re-enqueues all pending operations. */ function $u(t, e, i) {
14773
+ /** Enables the network connection and re-enqueues all pending operations. */ function Zu(t, e, i) {
14768
14774
  var o = this;
14769
14775
  void 0 === i && (i = {});
14770
14776
  var s = new J;
@@ -14775,12 +14781,12 @@ function Xu(t) {
14775
14781
  switch (r.label) {
14776
14782
  case 0:
14777
14783
  return n = function(t, e, n, r, i) {
14778
- var o = new Vu({
14784
+ var o = new qu({
14779
14785
  next: function(o) {
14780
14786
  // Remove query first before passing event to user to avoid
14781
14787
  // user actions affecting the now stale query.
14782
14788
  e.enqueueAndForget((function() {
14783
- return Us(t, s);
14789
+ return Bs(t, s);
14784
14790
  }));
14785
14791
  var u = o.docs.has(n);
14786
14792
  !u && o.fromCache ?
@@ -14796,12 +14802,12 @@ function Xu(t) {
14796
14802
  error: function(t) {
14797
14803
  return i.reject(t);
14798
14804
  }
14799
- }), s = new Gs(be(n.path), o, {
14805
+ }), s = new zs(be(n.path), o, {
14800
14806
  includeMetadataChanges: !0,
14801
14807
  wo: !0
14802
14808
  });
14803
- return qs(t, s);
14804
- }, [ 4 /*yield*/ , Xu(t) ];
14809
+ return Us(t, s);
14810
+ }, [ 4 /*yield*/ , $u(t) ];
14805
14811
 
14806
14812
  case 1:
14807
14813
  return [ 2 /*return*/ , n.apply(void 0, [ r.sent(), t.asyncQueue, e, i, s ]) ];
@@ -14811,7 +14817,7 @@ function Xu(t) {
14811
14817
  })), s.promise;
14812
14818
  }
14813
14819
 
14814
- function Zu(t, e, i) {
14820
+ function ta(t, e, i) {
14815
14821
  var o = this;
14816
14822
  void 0 === i && (i = {});
14817
14823
  var s = new J;
@@ -14822,23 +14828,23 @@ function Zu(t, e, i) {
14822
14828
  switch (r.label) {
14823
14829
  case 0:
14824
14830
  return n = function(t, e, n, r, i) {
14825
- var o = new Vu({
14831
+ var o = new qu({
14826
14832
  next: function(n) {
14827
14833
  // Remove query first before passing event to user to avoid
14828
14834
  // user actions affecting the now stale query.
14829
14835
  e.enqueueAndForget((function() {
14830
- return Us(t, s);
14836
+ return Bs(t, s);
14831
14837
  })), n.fromCache && "server" === r.source ? i.reject(new Y(H.UNAVAILABLE, 'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')) : i.resolve(n);
14832
14838
  },
14833
14839
  error: function(t) {
14834
14840
  return i.reject(t);
14835
14841
  }
14836
- }), s = new Gs(n, o, {
14842
+ }), s = new zs(n, o, {
14837
14843
  includeMetadataChanges: !0,
14838
14844
  wo: !0
14839
14845
  });
14840
- return qs(t, s);
14841
- }, [ 4 /*yield*/ , Xu(t) ];
14846
+ return Us(t, s);
14847
+ }, [ 4 /*yield*/ , $u(t) ];
14842
14848
 
14843
14849
  case 1:
14844
14850
  return [ 2 /*return*/ , n.apply(void 0, [ r.sent(), t.asyncQueue, e, i, s ]) ];
@@ -14848,7 +14854,7 @@ function Zu(t, e, i) {
14848
14854
  })), s.promise;
14849
14855
  }
14850
14856
 
14851
- var ta =
14857
+ var ea =
14852
14858
  /**
14853
14859
  * Constructs a DatabaseInfo using the provided host, databaseId and
14854
14860
  * persistenceKey.
@@ -14869,7 +14875,7 @@ var ta =
14869
14875
  function(t, e, n, r, i, o, s, u) {
14870
14876
  this.databaseId = t, this.appId = e, this.persistenceKey = n, this.host = r, this.ssl = i,
14871
14877
  this.forceLongPolling = o, this.autoDetectLongPolling = s, this.useFetchStreams = u;
14872
- }, ea = /** @class */ function() {
14878
+ }, na = /** @class */ function() {
14873
14879
  function t(t, e) {
14874
14880
  this.projectId = t, this.database = e || "(default)";
14875
14881
  }
@@ -14882,7 +14888,7 @@ function(t, e, n, r, i, o, s, u) {
14882
14888
  }), t.prototype.isEqual = function(e) {
14883
14889
  return e instanceof t && e.projectId === this.projectId && e.database === this.database;
14884
14890
  }, t;
14885
- }(), na = new Map;
14891
+ }(), ra = new Map;
14886
14892
 
14887
14893
  /** The default database name for a project. */
14888
14894
  /**
@@ -14909,28 +14915,28 @@ function(t, e, n, r, i, o, s, u) {
14909
14915
  * See the License for the specific language governing permissions and
14910
14916
  * limitations under the License.
14911
14917
  */
14912
- function ra(t, e, n) {
14918
+ function ia(t, e, n) {
14913
14919
  if (!n) throw new Y(H.INVALID_ARGUMENT, "Function " + t + "() cannot be called with an empty " + e + ".");
14914
14920
  }
14915
14921
 
14916
14922
  /**
14917
14923
  * Validates that two boolean options are not set at the same time.
14918
14924
  * @internal
14919
- */ function ia(t, e, n, r) {
14925
+ */ function oa(t, e, n, r) {
14920
14926
  if (!0 === e && !0 === r) throw new Y(H.INVALID_ARGUMENT, t + " and " + n + " cannot be used together.");
14921
14927
  }
14922
14928
 
14923
14929
  /**
14924
14930
  * Validates that `path` refers to a document (indicated by the fact it contains
14925
14931
  * an even numbers of segments).
14926
- */ function oa(t) {
14932
+ */ function sa(t) {
14927
14933
  if (!Pt.isDocumentKey(t)) throw new Y(H.INVALID_ARGUMENT, "Invalid document reference. Document references must have an even number of segments, but " + t + " has " + t.length + ".");
14928
14934
  }
14929
14935
 
14930
14936
  /**
14931
14937
  * Validates that `path` refers to a collection (indicated by the fact it
14932
14938
  * contains an odd numbers of segments).
14933
- */ function sa(t) {
14939
+ */ function ua(t) {
14934
14940
  if (Pt.isDocumentKey(t)) throw new Y(H.INVALID_ARGUMENT, "Invalid collection reference. Collection references must have an odd number of segments, but " + t + " has " + t.length + ".");
14935
14941
  }
14936
14942
 
@@ -14938,7 +14944,7 @@ function ra(t, e, n) {
14938
14944
  * Returns true if it's a non-null object without a custom prototype
14939
14945
  * (i.e. excludes Array, Date, etc.).
14940
14946
  */
14941
- /** Returns a string describing the type / value of the provided input. */ function ua(t) {
14947
+ /** Returns a string describing the type / value of the provided input. */ function aa(t) {
14942
14948
  if (void 0 === t) return "undefined";
14943
14949
  if (null === t) return "null";
14944
14950
  if ("string" == typeof t) return t.length > 20 && (t = t.substring(0, 20) + "..."),
@@ -14956,7 +14962,7 @@ function ra(t, e, n) {
14956
14962
  return "function" == typeof t ? "a function" : G();
14957
14963
  }
14958
14964
 
14959
- function aa(t,
14965
+ function ca(t,
14960
14966
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
14961
14967
  e) {
14962
14968
  if ("_delegate" in t && (
@@ -14964,13 +14970,13 @@ e) {
14964
14970
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
14965
14971
  t = t._delegate), !(t instanceof e)) {
14966
14972
  if (e.name === t.constructor.name) throw new Y(H.INVALID_ARGUMENT, "Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");
14967
- var n = ua(t);
14973
+ var n = aa(t);
14968
14974
  throw new Y(H.INVALID_ARGUMENT, "Expected type '" + e.name + "', but it was: " + n);
14969
14975
  }
14970
14976
  return t;
14971
14977
  }
14972
14978
 
14973
- function ca(t, e) {
14979
+ function ha(t, e) {
14974
14980
  if (e <= 0) throw new Y(H.INVALID_ARGUMENT, "Function " + t + "() requires a positive number, but it was: " + e + ".");
14975
14981
  }
14976
14982
 
@@ -14995,7 +15001,7 @@ function ca(t, e) {
14995
15001
  * A concrete type describing all the values that can be applied via a
14996
15002
  * user-supplied `FirestoreSettings` object. This is a separate type so that
14997
15003
  * defaults can be supplied and the value can be checked for equality.
14998
- */ var ha = /** @class */ function() {
15004
+ */ var fa = /** @class */ function() {
14999
15005
  function t(t) {
15000
15006
  var e;
15001
15007
  if (void 0 === t.host) {
@@ -15008,23 +15014,23 @@ function ca(t, e) {
15008
15014
  this.cacheSizeBytes = t.cacheSizeBytes;
15009
15015
  }
15010
15016
  this.experimentalForceLongPolling = !!t.experimentalForceLongPolling, this.experimentalAutoDetectLongPolling = !!t.experimentalAutoDetectLongPolling,
15011
- this.useFetchStreams = !!t.useFetchStreams, ia("experimentalForceLongPolling", t.experimentalForceLongPolling, "experimentalAutoDetectLongPolling", t.experimentalAutoDetectLongPolling);
15017
+ this.useFetchStreams = !!t.useFetchStreams, oa("experimentalForceLongPolling", t.experimentalForceLongPolling, "experimentalAutoDetectLongPolling", t.experimentalAutoDetectLongPolling);
15012
15018
  }
15013
15019
  return t.prototype.isEqual = function(t) {
15014
15020
  return this.host === t.host && this.ssl === t.ssl && this.credentials === t.credentials && this.cacheSizeBytes === t.cacheSizeBytes && this.experimentalForceLongPolling === t.experimentalForceLongPolling && this.experimentalAutoDetectLongPolling === t.experimentalAutoDetectLongPolling && this.ignoreUndefinedProperties === t.ignoreUndefinedProperties && this.useFetchStreams === t.useFetchStreams;
15015
15021
  }, t;
15016
- }(), fa = /** @class */ function() {
15022
+ }(), la = /** @class */ function() {
15017
15023
  /** @hideconstructor */
15018
15024
  function t(t, e, n) {
15019
15025
  this._authCredentials = e, this._appCheckCredentials = n,
15020
15026
  /**
15021
15027
  * Whether it's a Firestore or Firestore Lite instance.
15022
15028
  */
15023
- this.type = "firestore-lite", this._persistenceKey = "(lite)", this._settings = new ha({}),
15024
- this._settingsFrozen = !1, t instanceof ea ? this._databaseId = t : (this._app = t,
15029
+ this.type = "firestore-lite", this._persistenceKey = "(lite)", this._settings = new fa({}),
15030
+ this._settingsFrozen = !1, t instanceof na ? this._databaseId = t : (this._app = t,
15025
15031
  this._databaseId = function(t) {
15026
15032
  if (!Object.prototype.hasOwnProperty.apply(t.options, [ "projectId" ])) throw new Y(H.INVALID_ARGUMENT, '"projectId" not provided in firebase.initializeApp.');
15027
- return new ea(t.options.projectId);
15033
+ return new na(t.options.projectId);
15028
15034
  }(t));
15029
15035
  }
15030
15036
  return Object.defineProperty(t.prototype, "app", {
@@ -15052,7 +15058,7 @@ function ca(t, e) {
15052
15058
  configurable: !0
15053
15059
  }), t.prototype._setSettings = function(t) {
15054
15060
  if (this._settingsFrozen) throw new Y(H.FAILED_PRECONDITION, "Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");
15055
- this._settings = new ha(t), void 0 !== t.credentials && (this._authCredentials = function(t) {
15061
+ this._settings = new fa(t), void 0 !== t.credentials && (this._authCredentials = function(t) {
15056
15062
  if (!t) return new $;
15057
15063
  switch (t.type) {
15058
15064
  case "gapi":
@@ -15094,8 +15100,8 @@ function ca(t, e) {
15094
15100
  * Removes all components associated with the provided instance. Must be called
15095
15101
  * when the `Firestore` instance is terminated.
15096
15102
  */
15097
- return t = this, (e = na.get(t)) && (U("ComponentProvider", "Removing Datastore"),
15098
- na.delete(t), e.terminate()), Promise.resolve();
15103
+ return t = this, (e = ra.get(t)) && (U("ComponentProvider", "Removing Datastore"),
15104
+ ra.delete(t), e.terminate()), Promise.resolve();
15099
15105
  var t, e;
15100
15106
  }, t;
15101
15107
  }();
@@ -15120,10 +15126,10 @@ function ca(t, e) {
15120
15126
  * The Cloud Firestore service interface.
15121
15127
  *
15122
15128
  * Do not call this constructor directly. Instead, use {@link getFirestore}.
15123
- */ function la(t, e, n, r) {
15129
+ */ function da(t, e, n, r) {
15124
15130
  var i;
15125
15131
  void 0 === r && (r = {});
15126
- var o = (t = aa(t, fa))._getSettings();
15132
+ var o = (t = ca(t, la))._getSettings();
15127
15133
  if ("firestore.googleapis.com" !== o.host && o.host !== e && j("Host has been set in both settings() and useEmulator(), emulator host will be used"),
15128
15134
  t._setSettings(Object.assign(Object.assign({}, o), {
15129
15135
  host: e + ":" + n,
@@ -15162,7 +15168,7 @@ function ca(t, e) {
15162
15168
  * A `DocumentReference` refers to a document location in a Firestore database
15163
15169
  * and can be used to write, read, or listen to the location. The document at
15164
15170
  * the referenced location may or may not exist.
15165
- */ var da = /** @class */ function() {
15171
+ */ var pa = /** @class */ function() {
15166
15172
  /** @hideconstructor */
15167
15173
  function t(t,
15168
15174
  /**
@@ -15203,14 +15209,14 @@ function ca(t, e) {
15203
15209
  * The collection this `DocumentReference` belongs to.
15204
15210
  */
15205
15211
  get: function() {
15206
- return new ya(this.firestore, this.converter, this._key.path.popLast());
15212
+ return new va(this.firestore, this.converter, this._key.path.popLast());
15207
15213
  },
15208
15214
  enumerable: !1,
15209
15215
  configurable: !0
15210
15216
  }), t.prototype.withConverter = function(e) {
15211
15217
  return new t(this.firestore, e, this._key);
15212
15218
  }, t;
15213
- }(), pa = /** @class */ function() {
15219
+ }(), ya = /** @class */ function() {
15214
15220
  // This is the lite version of the Query class in the main SDK.
15215
15221
  /** @hideconstructor protected */
15216
15222
  function t(t,
@@ -15225,7 +15231,7 @@ function ca(t, e) {
15225
15231
  return t.prototype.withConverter = function(e) {
15226
15232
  return new t(this.firestore, e, this._query);
15227
15233
  }, t;
15228
- }(), ya = /** @class */ function(e) {
15234
+ }(), va = /** @class */ function(e) {
15229
15235
  /** @hideconstructor */
15230
15236
  function n(t, n, r) {
15231
15237
  var i = this;
@@ -15256,7 +15262,7 @@ function ca(t, e) {
15256
15262
  */
15257
15263
  get: function() {
15258
15264
  var t = this._path.popLast();
15259
- return t.isEmpty() ? null : new da(this.firestore,
15265
+ return t.isEmpty() ? null : new pa(this.firestore,
15260
15266
  /* converter= */ null, new Pt(t));
15261
15267
  },
15262
15268
  enumerable: !1,
@@ -15264,20 +15270,20 @@ function ca(t, e) {
15264
15270
  }), n.prototype.withConverter = function(t) {
15265
15271
  return new n(this.firestore, t, this._path);
15266
15272
  }, n;
15267
- }(pa);
15273
+ }(ya);
15268
15274
 
15269
15275
  /**
15270
15276
  * A `Query` refers to a query which you can read or listen to. You can also
15271
15277
  * construct refined `Query` objects by adding filters and ordering.
15272
- */ function va(t, n) {
15278
+ */ function ma(t, n) {
15273
15279
  for (var r = [], i = 2; i < arguments.length; i++) r[i - 2] = arguments[i];
15274
- if (t = I(t), ra("collection", "path", n), t instanceof fa) {
15280
+ if (t = I(t), ia("collection", "path", n), t instanceof la) {
15275
15281
  var o = gt.fromString.apply(gt, e([ n ], r));
15276
- return sa(o), new ya(t, /* converter= */ null, o);
15282
+ return ua(o), new va(t, /* converter= */ null, o);
15277
15283
  }
15278
- if (!(t instanceof da || t instanceof ya)) throw new Y(H.INVALID_ARGUMENT, "Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");
15284
+ if (!(t instanceof pa || t instanceof va)) throw new Y(H.INVALID_ARGUMENT, "Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");
15279
15285
  var s = t._path.child(gt.fromString.apply(gt, e([ n ], r)));
15280
- return sa(s), new ya(t.firestore,
15286
+ return ua(s), new va(t.firestore,
15281
15287
  /* converter= */ null, s);
15282
15288
  }
15283
15289
 
@@ -15293,9 +15299,9 @@ function ca(t, e) {
15293
15299
  * collection or subcollection with this ID as the last segment of its path
15294
15300
  * will be included. Cannot contain a slash.
15295
15301
  * @returns The created `Query`.
15296
- */ function ma(t, e) {
15297
- if (t = aa(t, fa), ra("collectionGroup", "collection id", e), e.indexOf("/") >= 0) throw new Y(H.INVALID_ARGUMENT, "Invalid collection ID '" + e + "' passed to function collectionGroup(). Collection IDs must not contain '/'.");
15298
- return new pa(t,
15302
+ */ function ga(t, e) {
15303
+ if (t = ca(t, la), ia("collectionGroup", "collection id", e), e.indexOf("/") >= 0) throw new Y(H.INVALID_ARGUMENT, "Invalid collection ID '" + e + "' passed to function collectionGroup(). Collection IDs must not contain '/'.");
15304
+ return new ya(t,
15299
15305
  /* converter= */ null,
15300
15306
  /**
15301
15307
  * Creates a new Query for a collection group query that matches all documents
@@ -15306,19 +15312,19 @@ function ca(t, e) {
15306
15312
  }(e));
15307
15313
  }
15308
15314
 
15309
- function ga(t, n) {
15315
+ function wa(t, n) {
15310
15316
  for (var r = [], i = 2; i < arguments.length; i++) r[i - 2] = arguments[i];
15311
15317
  if (t = I(t),
15312
15318
  // We allow omission of 'pathString' but explicitly prohibit passing in both
15313
15319
  // 'undefined' and 'null'.
15314
- 1 === arguments.length && (n = at.A()), ra("doc", "path", n), t instanceof fa) {
15320
+ 1 === arguments.length && (n = at.A()), ia("doc", "path", n), t instanceof la) {
15315
15321
  var o = gt.fromString.apply(gt, e([ n ], r));
15316
- return oa(o), new da(t,
15322
+ return sa(o), new pa(t,
15317
15323
  /* converter= */ null, new Pt(o));
15318
15324
  }
15319
- if (!(t instanceof da || t instanceof ya)) throw new Y(H.INVALID_ARGUMENT, "Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");
15325
+ if (!(t instanceof pa || t instanceof va)) throw new Y(H.INVALID_ARGUMENT, "Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");
15320
15326
  var s = t._path.child(gt.fromString.apply(gt, e([ n ], r)));
15321
- return oa(s), new da(t.firestore, t instanceof ya ? t.converter : null, new Pt(s));
15327
+ return sa(s), new pa(t.firestore, t instanceof va ? t.converter : null, new Pt(s));
15322
15328
  }
15323
15329
 
15324
15330
  /**
@@ -15328,8 +15334,8 @@ function ga(t, n) {
15328
15334
  * @param right - A reference to compare.
15329
15335
  * @returns true if the references point to the same location in the same
15330
15336
  * Firestore database.
15331
- */ function wa(t, e) {
15332
- return t = I(t), e = I(e), (t instanceof da || t instanceof ya) && (e instanceof da || e instanceof ya) && t.firestore === e.firestore && t.path === e.path && t.converter === e.converter
15337
+ */ function ba(t, e) {
15338
+ return t = I(t), e = I(e), (t instanceof pa || t instanceof va) && (e instanceof pa || e instanceof va) && t.firestore === e.firestore && t.path === e.path && t.converter === e.converter
15333
15339
  /**
15334
15340
  * Returns true if the provided queries point to the same collection and apply
15335
15341
  * the same constraints.
@@ -15341,8 +15347,8 @@ function ga(t, n) {
15341
15347
  */;
15342
15348
  }
15343
15349
 
15344
- function ba(t, e) {
15345
- return t = I(t), e = I(e), t instanceof pa && e instanceof pa && t.firestore === e.firestore && Ne(t._query, e._query) && t.converter === e.converter
15350
+ function Ia(t, e) {
15351
+ return t = I(t), e = I(e), t instanceof ya && e instanceof ya && t.firestore === e.firestore && Ne(t._query, e._query) && t.converter === e.converter
15346
15352
  /**
15347
15353
  * @license
15348
15354
  * Copyright 2020 Google LLC
@@ -15361,7 +15367,7 @@ function ba(t, e) {
15361
15367
  */;
15362
15368
  }
15363
15369
 
15364
- var Ia = /** @class */ function() {
15370
+ var Ta = /** @class */ function() {
15365
15371
  function t() {
15366
15372
  var t = this;
15367
15373
  // The last promise in the queue.
@@ -15515,7 +15521,7 @@ var Ia = /** @class */ function() {
15515
15521
  this.Pc(),
15516
15522
  // Fast-forward delays for timerIds that have been overriden.
15517
15523
  this.Rc.indexOf(t) > -1 && (e = 0);
15518
- var i = Rs.createAndSchedule(this, t, e, n, (function(t) {
15524
+ var i = Ls.createAndSchedule(this, t, e, n, (function(t) {
15519
15525
  return r.Sc(t);
15520
15526
  }));
15521
15527
  return this.Tc.push(i), i;
@@ -15592,7 +15598,7 @@ var Ia = /** @class */ function() {
15592
15598
  }, t;
15593
15599
  }();
15594
15600
 
15595
- function Ta(t) {
15601
+ function Ea(t) {
15596
15602
  /**
15597
15603
  * Returns true if obj is an object and contains at least one of the specified
15598
15604
  * methods.
@@ -15607,7 +15613,7 @@ function Ta(t) {
15607
15613
  }(t);
15608
15614
  }
15609
15615
 
15610
- var Ea = /** @class */ function() {
15616
+ var Sa = /** @class */ function() {
15611
15617
  function t() {
15612
15618
  this._progressObserver = {}, this._taskCompletionResolver = new J, this._lastProgress = {
15613
15619
  taskState: "Running",
@@ -15679,23 +15685,23 @@ var Ea = /** @class */ function() {
15679
15685
  t.prototype._updateProgress = function(t) {
15680
15686
  this._lastProgress = t, this._progressObserver.next && this._progressObserver.next(t);
15681
15687
  }, t;
15682
- }(), Sa = -1, _a = /** @class */ function(e) {
15688
+ }(), _a = -1, Aa = /** @class */ function(e) {
15683
15689
  /** @hideconstructor */
15684
15690
  function n(t, n, r) {
15685
15691
  var i = this;
15686
15692
  /**
15687
15693
  * Whether it's a {@link Firestore} or Firestore Lite instance.
15688
15694
  */
15689
- return (i = e.call(this, t, n, r) || this).type = "firestore", i._queue = new Ia,
15695
+ return (i = e.call(this, t, n, r) || this).type = "firestore", i._queue = new Ta,
15690
15696
  i._persistenceKey = "name" in t ? t.name : "[DEFAULT]", i;
15691
15697
  }
15692
15698
  return t(n, e), n.prototype._terminate = function() {
15693
15699
  return this._firestoreClient ||
15694
15700
  // The client must be initialized to ensure that all subsequent API
15695
15701
  // usage throws an exception.
15696
- Na(this), this._firestoreClient.terminate();
15702
+ Ca(this), this._firestoreClient.terminate();
15697
15703
  }, n;
15698
- }(fa);
15704
+ }(la);
15699
15705
 
15700
15706
  /**
15701
15707
  * @license
@@ -15725,7 +15731,7 @@ var Ea = /** @class */ function() {
15725
15731
  * @param settings - A settings object to configure the {@link Firestore} instance.
15726
15732
  * @returns A newly initialized {@link Firestore} instance.
15727
15733
  */
15728
- function Aa(t, e) {
15734
+ function ka(t, e) {
15729
15735
  var n = _getProvider(t, "firestore");
15730
15736
  if (n.isInitialized()) {
15731
15737
  var r = n.getImmediate(), i = n.getOptions();
@@ -15746,21 +15752,21 @@ function Aa(t, e) {
15746
15752
  * @param app - The {@link @firebase/app#FirebaseApp} instance that the returned {@link Firestore}
15747
15753
  * instance is associated with.
15748
15754
  * @returns The {@link Firestore} instance of the provided app.
15749
- */ function ka(t) {
15755
+ */ function Da(t) {
15750
15756
  return void 0 === t && (t = u()), _getProvider(t, "firestore").getImmediate();
15751
15757
  }
15752
15758
 
15753
15759
  /**
15754
15760
  * @internal
15755
- */ function Da(t) {
15756
- return t._firestoreClient || Na(t), t._firestoreClient.verifyNotTerminated(), t._firestoreClient;
15761
+ */ function Na(t) {
15762
+ return t._firestoreClient || Ca(t), t._firestoreClient.verifyNotTerminated(), t._firestoreClient;
15757
15763
  }
15758
15764
 
15759
- function Na(t) {
15765
+ function Ca(t) {
15760
15766
  var e, n = t._freezeSettings(), r = function(t, e, n, r) {
15761
- return new ta(t, e, n, r.host, r.ssl, r.experimentalForceLongPolling, r.experimentalAutoDetectLongPolling, r.useFetchStreams);
15767
+ return new ea(t, e, n, r.host, r.ssl, r.experimentalForceLongPolling, r.experimentalAutoDetectLongPolling, r.useFetchStreams);
15762
15768
  }(t._databaseId, (null === (e = t._app) || void 0 === e ? void 0 : e.options.appId) || "", t._persistenceKey, n);
15763
- t._firestoreClient = new ju(t._authCredentials, t._appCheckCredentials, t._queue, r);
15769
+ t._firestoreClient = new Ku(t._authCredentials, t._appCheckCredentials, t._queue, r);
15764
15770
  }
15765
15771
 
15766
15772
  /**
@@ -15785,10 +15791,10 @@ function Na(t) {
15785
15791
  * @param persistenceSettings - Optional settings object to configure
15786
15792
  * persistence.
15787
15793
  * @returns A `Promise` that represents successfully enabling persistent storage.
15788
- */ function Ca(t, e) {
15789
- Ua(t = aa(t, _a));
15790
- var n = Da(t), r = t._freezeSettings(), i = new Mu;
15791
- return Ra(n, i, new Pu(i, r.cacheSizeBytes, null == e ? void 0 : e.forceOwnership));
15794
+ */ function xa(t, e) {
15795
+ Ba(t = ca(t, Aa));
15796
+ var n = Na(t), r = t._freezeSettings(), i = new Fu;
15797
+ return La(n, i, new Ou(i, r.cacheSizeBytes, null == e ? void 0 : e.forceOwnership));
15792
15798
  }
15793
15799
 
15794
15800
  /**
@@ -15812,10 +15818,10 @@ function Na(t) {
15812
15818
  * @param firestore - The {@link Firestore} instance to enable persistence for.
15813
15819
  * @returns A `Promise` that represents successfully enabling persistent
15814
15820
  * storage.
15815
- */ function xa(t) {
15816
- Ua(t = aa(t, _a));
15817
- var e = Da(t), n = t._freezeSettings(), r = new Mu;
15818
- return Ra(e, r, new Ou(r, n.cacheSizeBytes));
15821
+ */ function Ra(t) {
15822
+ Ba(t = ca(t, Aa));
15823
+ var e = Na(t), n = t._freezeSettings(), r = new Fu;
15824
+ return La(e, r, new Mu(r, n.cacheSizeBytes));
15819
15825
  }
15820
15826
 
15821
15827
  /**
@@ -15823,7 +15829,7 @@ function Na(t) {
15823
15829
  * If the operation fails with a recoverable error (see
15824
15830
  * `canRecoverFromIndexedDbError()` below), the returned Promise is rejected
15825
15831
  * but the client remains usable.
15826
- */ function Ra(t, e, i) {
15832
+ */ function La(t, e, i) {
15827
15833
  var o = this, s = new J;
15828
15834
  return t.asyncQueue.enqueue((function() {
15829
15835
  return n(o, void 0, void 0, (function() {
@@ -15831,10 +15837,10 @@ function Na(t) {
15831
15837
  return r(this, (function(r) {
15832
15838
  switch (r.label) {
15833
15839
  case 0:
15834
- return r.trys.push([ 0, 3, , 4 ]), [ 4 /*yield*/ , Ku(t, i) ];
15840
+ return r.trys.push([ 0, 3, , 4 ]), [ 4 /*yield*/ , Gu(t, i) ];
15835
15841
 
15836
15842
  case 1:
15837
- return r.sent(), [ 4 /*yield*/ , Gu(t, e) ];
15843
+ return r.sent(), [ 4 /*yield*/ , zu(t, e) ];
15838
15844
 
15839
15845
  case 2:
15840
15846
  return r.sent(), s.resolve(), [ 3 /*break*/ , 4 ];
@@ -15864,7 +15870,7 @@ function Na(t) {
15864
15870
  }));
15865
15871
  }
15866
15872
 
15867
- function La(t) {
15873
+ function Pa(t) {
15868
15874
  var e = this;
15869
15875
  if (t._initialized && !t._terminated) throw new Y(H.FAILED_PRECONDITION, "Persistence can only be cleared before a Firestore instance is initialized or after it is terminated.");
15870
15876
  var i = new J;
@@ -15919,7 +15925,7 @@ function La(t) {
15919
15925
  */;
15920
15926
  }
15921
15927
 
15922
- function Pa(t) {
15928
+ function Oa(t) {
15923
15929
  return function(t) {
15924
15930
  var e = this, i = new J;
15925
15931
  return t.asyncQueue.enqueueAndForget((function() {
@@ -15928,7 +15934,7 @@ function Pa(t) {
15928
15934
  return r(this, (function(n) {
15929
15935
  switch (n.label) {
15930
15936
  case 0:
15931
- return e = hu, [ 4 /*yield*/ , Ju(t) ];
15937
+ return e = fu, [ 4 /*yield*/ , Xu(t) ];
15932
15938
 
15933
15939
  case 1:
15934
15940
  return [ 2 /*return*/ , e.apply(void 0, [ n.sent(), i ]) ];
@@ -15936,7 +15942,7 @@ function Pa(t) {
15936
15942
  }));
15937
15943
  }));
15938
15944
  })), i.promise;
15939
- }(Da(t = aa(t, _a)));
15945
+ }(Na(t = ca(t, Aa)));
15940
15946
  }
15941
15947
 
15942
15948
  /**
@@ -15944,7 +15950,7 @@ function Pa(t) {
15944
15950
  * call to {@link disableNetwork}.
15945
15951
  *
15946
15952
  * @returns A `Promise` that is resolved once the network has been enabled.
15947
- */ function Oa(t) {
15953
+ */ function Ma(t) {
15948
15954
  return function(t) {
15949
15955
  var e = this;
15950
15956
  return t.asyncQueue.enqueue((function() {
@@ -15953,10 +15959,10 @@ function Pa(t) {
15953
15959
  return r(this, (function(r) {
15954
15960
  switch (r.label) {
15955
15961
  case 0:
15956
- return [ 4 /*yield*/ , Wu(t) ];
15962
+ return [ 4 /*yield*/ , Hu(t) ];
15957
15963
 
15958
15964
  case 1:
15959
- return e = r.sent(), [ 4 /*yield*/ , Yu(t) ];
15965
+ return e = r.sent(), [ 4 /*yield*/ , Ju(t) ];
15960
15966
 
15961
15967
  case 2:
15962
15968
  return n = r.sent(), [ 2 /*return*/ , (e.setNetworkEnabled(!0), function(t) {
@@ -15968,7 +15974,7 @@ function Pa(t) {
15968
15974
  }));
15969
15975
  }));
15970
15976
  }
15971
- /** Disables the network connection. Pending operations will not complete. */ (Da(t = aa(t, _a)));
15977
+ /** Disables the network connection. Pending operations will not complete. */ (Na(t = ca(t, Aa)));
15972
15978
  }
15973
15979
 
15974
15980
  /**
@@ -15978,7 +15984,7 @@ function Pa(t) {
15978
15984
  * operations will be queued until the network is restored.
15979
15985
  *
15980
15986
  * @returns A `Promise` that is resolved once the network has been disabled.
15981
- */ function Ma(t) {
15987
+ */ function Fa(t) {
15982
15988
  return function(t) {
15983
15989
  var e = this;
15984
15990
  return t.asyncQueue.enqueue((function() {
@@ -15987,10 +15993,10 @@ function Pa(t) {
15987
15993
  return r(this, (function(o) {
15988
15994
  switch (o.label) {
15989
15995
  case 0:
15990
- return [ 4 /*yield*/ , Wu(t) ];
15996
+ return [ 4 /*yield*/ , Hu(t) ];
15991
15997
 
15992
15998
  case 1:
15993
- return e = o.sent(), [ 4 /*yield*/ , Yu(t) ];
15999
+ return e = o.sent(), [ 4 /*yield*/ , Ju(t) ];
15994
16000
 
15995
16001
  case 2:
15996
16002
  return i = o.sent(), [ 2 /*return*/ , (e.setNetworkEnabled(!1), function(t) {
@@ -16018,7 +16024,7 @@ function Pa(t) {
16018
16024
  * Returns a Promise that resolves when all writes that were pending at the time
16019
16025
  * this method was called received server acknowledgement. An acknowledgement
16020
16026
  * can be either acceptance or rejection.
16021
- */ (Da(t = aa(t, _a)));
16027
+ */ (Na(t = ca(t, Aa)));
16022
16028
  }
16023
16029
 
16024
16030
  /**
@@ -16042,30 +16048,30 @@ function Pa(t) {
16042
16048
  *
16043
16049
  * @returns A `Promise` that is resolved when the instance has been successfully
16044
16050
  * terminated.
16045
- */ function Fa(t) {
16051
+ */ function Va(t) {
16046
16052
  return a(t.app, "firestore"), t._delete()
16047
16053
  /**
16048
16054
  * Loads a Firestore bundle into the local cache.
16049
16055
  *
16050
- * @param firestore - The {@link Firestore} instance to load bundles for for.
16051
- * @param bundleData - An object representing the bundle to be loaded. Valid objects are
16052
- * `ArrayBuffer`, `ReadableStream<Uint8Array>` or `string`.
16056
+ * @param firestore - The {@link Firestore} instance to load bundles for.
16057
+ * @param bundleData - An object representing the bundle to be loaded. Valid
16058
+ * objects are `ArrayBuffer`, `ReadableStream<Uint8Array>` or `string`.
16053
16059
  *
16054
- * @returns
16055
- * A `LoadBundleTask` object, which notifies callers with progress updates, and completion
16056
- * or error events. It can be used as a `Promise<LoadBundleTaskProgress>`.
16060
+ * @returns A `LoadBundleTask` object, which notifies callers with progress
16061
+ * updates, and completion or error events. It can be used as a
16062
+ * `Promise<LoadBundleTaskProgress>`.
16057
16063
  */;
16058
16064
  }
16059
16065
 
16060
- function Va(t, e) {
16061
- var i = Da(t = aa(t, _a)), o = new Ea;
16066
+ function qa(t, e) {
16067
+ var i = Na(t = ca(t, Aa)), o = new Sa;
16062
16068
  return function(t, e, i, o) {
16063
16069
  var s = this, u = function(t, e) {
16064
16070
  return function(t, e) {
16065
- return new qu(t, e);
16071
+ return new Uu(t, e);
16066
16072
  }(function(t, e) {
16067
- if (t instanceof Uint8Array) return Fu(t, e);
16068
- if (t instanceof ArrayBuffer) return Fu(new Uint8Array(t), e);
16073
+ if (t instanceof Uint8Array) return Vu(t, e);
16074
+ if (t instanceof ArrayBuffer) return Vu(new Uint8Array(t), e);
16069
16075
  if (t instanceof ReadableStream) return t.getReader();
16070
16076
  throw new Error("Source of `toByteStreamReader` has to be a ArrayBuffer or ReadableStream");
16071
16077
  }("string" == typeof t ? (new TextEncoder).encode(t) : t), e);
@@ -16076,7 +16082,7 @@ function Va(t, e) {
16076
16082
  return r(this, (function(n) {
16077
16083
  switch (n.label) {
16078
16084
  case 0:
16079
- return e = Ru, [ 4 /*yield*/ , Ju(t) ];
16085
+ return e = Lu, [ 4 /*yield*/ , Xu(t) ];
16080
16086
 
16081
16087
  case 1:
16082
16088
  return e.apply(void 0, [ n.sent(), u, o ]), [ 2 /*return*/ ];
@@ -16086,15 +16092,20 @@ function Va(t, e) {
16086
16092
  }));
16087
16093
  }(i, t._databaseId, e, o), o
16088
16094
  /**
16089
- * Reads a Firestore {@link Query} from local cache, identified by the given name.
16095
+ * Reads a Firestore {@link Query} from local cache, identified by the given
16096
+ * name.
16090
16097
  *
16091
16098
  * The named queries are packaged into bundles on the server side (along
16092
- * with resulting documents), and loaded to local cache using `loadBundle`. Once in local
16093
- * cache, use this method to extract a {@link Query} by name.
16099
+ * with resulting documents), and loaded to local cache using `loadBundle`. Once
16100
+ * in local cache, use this method to extract a {@link Query} by name.
16101
+ *
16102
+ * @param firestore - The {@link Firestore} instance to read the query from.
16103
+ * @param name - The name of the query.
16104
+ * @returns A `Promise` that is resolved with the Query or `null`.
16094
16105
  */;
16095
16106
  }
16096
16107
 
16097
- function qa(t, e) {
16108
+ function Ua(t, e) {
16098
16109
  return function(t, e) {
16099
16110
  var i = this;
16100
16111
  return t.asyncQueue.enqueue((function() {
@@ -16108,7 +16119,7 @@ function qa(t, e) {
16108
16119
  return n.persistence.runTransaction("Get named query", "readonly", (function(t) {
16109
16120
  return n.Ye.getNamedQuery(t, e);
16110
16121
  }));
16111
- }, [ 4 /*yield*/ , Hu(t) ];
16122
+ }, [ 4 /*yield*/ , Yu(t) ];
16112
16123
 
16113
16124
  case 1:
16114
16125
  return [ 2 /*return*/ , n.apply(void 0, [ r.sent(), e ]) ];
@@ -16116,12 +16127,12 @@ function qa(t, e) {
16116
16127
  }));
16117
16128
  }));
16118
16129
  }));
16119
- }(Da(t = aa(t, _a)), e).then((function(e) {
16120
- return e ? new pa(t, null, e.query) : null;
16130
+ }(Na(t = ca(t, Aa)), e).then((function(e) {
16131
+ return e ? new ya(t, null, e.query) : null;
16121
16132
  }));
16122
16133
  }
16123
16134
 
16124
- function Ua(t) {
16135
+ function Ba(t) {
16125
16136
  if (t._initialized || t._terminated) throw new Y(H.FAILED_PRECONDITION, "Firestore has already been started and persistence can no longer be enabled. You can only enable persistence before calling any other methods on a Firestore object.");
16126
16137
  }
16127
16138
 
@@ -16164,7 +16175,7 @@ function Ua(t) {
16164
16175
  *
16165
16176
  * Create a `FieldPath` by providing field names. If more than one field
16166
16177
  * name is provided, the path will point to a nested field in a document.
16167
- */ var Ba = /** @class */ function() {
16178
+ */ var ja = /** @class */ function() {
16168
16179
  /**
16169
16180
  * Creates a `FieldPath` from the provided field names. If more than one field
16170
16181
  * name is provided, the path will point to a nested field in a document.
@@ -16189,8 +16200,8 @@ function Ua(t) {
16189
16200
  /**
16190
16201
  * Returns a special sentinel `FieldPath` to refer to the ID of a document.
16191
16202
  * It can be used in queries to sort or filter by the document ID.
16192
- */ function ja() {
16193
- return new Ba("__name__");
16203
+ */ function Ka() {
16204
+ return new ja("__name__");
16194
16205
  }
16195
16206
 
16196
16207
  /**
@@ -16211,7 +16222,7 @@ function Ua(t) {
16211
16222
  */
16212
16223
  /**
16213
16224
  * An immutable object representing an array of bytes.
16214
- */ var Ka = /** @class */ function() {
16225
+ */ var Ga = /** @class */ function() {
16215
16226
  /** @hideconstructor */
16216
16227
  function t(t) {
16217
16228
  this._byteString = t;
@@ -16269,14 +16280,14 @@ function Ua(t) {
16269
16280
  t.prototype.isEqual = function(t) {
16270
16281
  return this._byteString.isEqual(t._byteString);
16271
16282
  }, t;
16272
- }(), Ga =
16283
+ }(), za =
16273
16284
  /**
16274
16285
  * @param _methodName - The public API endpoint that returns this class.
16275
16286
  * @hideconstructor
16276
16287
  */
16277
16288
  function(t) {
16278
16289
  this._methodName = t;
16279
- }, za = /** @class */ function() {
16290
+ }, Qa = /** @class */ function() {
16280
16291
  /**
16281
16292
  * Creates a new immutable `GeoPoint` object with the provided latitude and
16282
16293
  * longitude values.
@@ -16329,14 +16340,14 @@ function(t) {
16329
16340
  t.prototype._compareTo = function(t) {
16330
16341
  return ct(this._lat, t._lat) || ct(this._long, t._long);
16331
16342
  }, t;
16332
- }(), Qa = /^__.*__$/, Wa = /** @class */ function() {
16343
+ }(), Wa = /^__.*__$/, Ha = /** @class */ function() {
16333
16344
  function t(t, e, n) {
16334
16345
  this.data = t, this.fieldMask = e, this.fieldTransforms = n;
16335
16346
  }
16336
16347
  return t.prototype.toMutation = function(t, e) {
16337
16348
  return null !== this.fieldMask ? new an(t, this.data, this.fieldMask, e, this.fieldTransforms) : new un(t, this.data, e, this.fieldTransforms);
16338
16349
  }, t;
16339
- }(), Ha = /** @class */ function() {
16350
+ }(), Ya = /** @class */ function() {
16340
16351
  function t(t,
16341
16352
  // The fieldMask does not include document transforms.
16342
16353
  e, n) {
@@ -16366,7 +16377,7 @@ function(t) {
16366
16377
  /**
16367
16378
  * Sentinel values that can be used when writing document fields with `set()`
16368
16379
  * or `update()`.
16369
- */ function Ya(t) {
16380
+ */ function Ja(t) {
16370
16381
  switch (t) {
16371
16382
  case 0 /* Set */ :
16372
16383
  // fall through
@@ -16384,7 +16395,7 @@ function(t) {
16384
16395
  }
16385
16396
  }
16386
16397
 
16387
- /** A "context" object passed around while parsing user data. */ var Ja = /** @class */ function() {
16398
+ /** A "context" object passed around while parsing user data. */ var Xa = /** @class */ function() {
16388
16399
  /**
16389
16400
  * Initializes a ParseContext with the given source and path.
16390
16401
  *
@@ -16444,7 +16455,7 @@ function(t) {
16444
16455
  Fc: !0
16445
16456
  });
16446
16457
  }, t.prototype.qc = function(t) {
16447
- return vc(t, this.settings.methodName, this.settings.Kc || !1, this.path, this.settings.jc);
16458
+ return mc(t, this.settings.methodName, this.settings.Kc || !1, this.path, this.settings.jc);
16448
16459
  },
16449
16460
  /** Returns 'true' if 'fieldPath' was traversed when creating this context. */ t.prototype.contains = function(t) {
16450
16461
  return void 0 !== this.fieldMask.find((function(e) {
@@ -16458,15 +16469,15 @@ function(t) {
16458
16469
  if (this.path) for (var t = 0; t < this.path.length; t++) this.Lc(this.path.get(t));
16459
16470
  }, t.prototype.Lc = function(t) {
16460
16471
  if (0 === t.length) throw this.qc("Document fields must not be empty");
16461
- if (Ya(this.$c) && Qa.test(t)) throw this.qc('Document fields cannot begin and end with "__"');
16472
+ if (Ja(this.$c) && Wa.test(t)) throw this.qc('Document fields cannot begin and end with "__"');
16462
16473
  }, t;
16463
- }(), Xa = /** @class */ function() {
16474
+ }(), $a = /** @class */ function() {
16464
16475
  function t(t, e, n) {
16465
16476
  this.databaseId = t, this.ignoreUndefinedProperties = e, this.k = n || Zo(t)
16466
16477
  /** Creates a new top-level parse context. */;
16467
16478
  }
16468
16479
  return t.prototype.Qc = function(t, e, n, r) {
16469
- return void 0 === r && (r = !1), new Ja({
16480
+ return void 0 === r && (r = !1), new Xa({
16470
16481
  $c: t,
16471
16482
  methodName: e,
16472
16483
  jc: n,
@@ -16480,30 +16491,30 @@ function(t) {
16480
16491
  /**
16481
16492
  * Helper for parsing raw user input (provided via the API) into internal model
16482
16493
  * classes.
16483
- */ function $a(t) {
16494
+ */ function Za(t) {
16484
16495
  var e = t._freezeSettings(), n = Zo(t._databaseId);
16485
- return new Xa(t._databaseId, !!e.ignoreUndefinedProperties, n);
16496
+ return new $a(t._databaseId, !!e.ignoreUndefinedProperties, n);
16486
16497
  }
16487
16498
 
16488
- /** Parse document data from a set() call. */ function Za(t, e, n, r, i, o) {
16499
+ /** Parse document data from a set() call. */ function tc(t, e, n, r, i, o) {
16489
16500
  void 0 === o && (o = {});
16490
16501
  var s = t.Qc(o.merge || o.mergeFields ? 2 /* MergeSet */ : 0 /* Set */ , e, n, i);
16491
- lc("Data must be an object, but it was:", s, r);
16492
- var u, a, c = hc(r, s);
16502
+ dc("Data must be an object, but it was:", s, r);
16503
+ var u, a, c = fc(r, s);
16493
16504
  if (o.merge) u = new It(s.fieldMask), a = s.fieldTransforms; else if (o.mergeFields) {
16494
16505
  for (var h = [], f = 0, l = o.mergeFields; f < l.length; f++) {
16495
- var d = dc(e, l[f], n);
16506
+ var d = pc(e, l[f], n);
16496
16507
  if (!s.contains(d)) throw new Y(H.INVALID_ARGUMENT, "Field '" + d + "' is specified in your field mask but missing from your input data.");
16497
- mc(h, d) || h.push(d);
16508
+ gc(h, d) || h.push(d);
16498
16509
  }
16499
16510
  u = new It(h), a = s.fieldTransforms.filter((function(t) {
16500
16511
  return u.covers(t.field);
16501
16512
  }));
16502
16513
  } else u = null, a = s.fieldTransforms;
16503
- return new Wa(new Yt(c), u, a);
16514
+ return new Ha(new Yt(c), u, a);
16504
16515
  }
16505
16516
 
16506
- var tc = /** @class */ function(e) {
16517
+ var ec = /** @class */ function(e) {
16507
16518
  function n() {
16508
16519
  return null !== e && e.apply(this, arguments) || this;
16509
16520
  }
@@ -16515,7 +16526,7 @@ var tc = /** @class */ function(e) {
16515
16526
  }, n.prototype.isEqual = function(t) {
16516
16527
  return t instanceof n;
16517
16528
  }, n;
16518
- }(Ga);
16529
+ }(za);
16519
16530
 
16520
16531
  /**
16521
16532
  * Creates a child context for parsing SerializableFieldValues.
@@ -16532,8 +16543,8 @@ var tc = /** @class */ function(e) {
16532
16543
  * context.
16533
16544
  * @param context - The parent context.
16534
16545
  * @param arrayElement - Whether or not the FieldValue has an array.
16535
- */ function ec(t, e, n) {
16536
- return new Ja({
16546
+ */ function nc(t, e, n) {
16547
+ return new Xa({
16537
16548
  $c: 3 /* Argument */ ,
16538
16549
  jc: e.settings.jc,
16539
16550
  methodName: t._methodName,
@@ -16541,7 +16552,7 @@ var tc = /** @class */ function(e) {
16541
16552
  }, e.databaseId, e.k, e.ignoreUndefinedProperties);
16542
16553
  }
16543
16554
 
16544
- var nc = /** @class */ function(e) {
16555
+ var rc = /** @class */ function(e) {
16545
16556
  function n() {
16546
16557
  return null !== e && e.apply(this, arguments) || this;
16547
16558
  }
@@ -16550,37 +16561,37 @@ var nc = /** @class */ function(e) {
16550
16561
  }, n.prototype.isEqual = function(t) {
16551
16562
  return t instanceof n;
16552
16563
  }, n;
16553
- }(Ga), rc = /** @class */ function(e) {
16564
+ }(za), ic = /** @class */ function(e) {
16554
16565
  function n(t, n) {
16555
16566
  var r = this;
16556
16567
  return (r = e.call(this, t) || this).Wc = n, r;
16557
16568
  }
16558
16569
  return t(n, e), n.prototype._toFieldTransform = function(t) {
16559
- var e = ec(this, t,
16570
+ var e = nc(this, t,
16560
16571
  /*array=*/ !0), n = this.Wc.map((function(t) {
16561
- return cc(t, e);
16572
+ return hc(t, e);
16562
16573
  })), r = new Ke(n);
16563
16574
  return new Je(t.path, r);
16564
16575
  }, n.prototype.isEqual = function(t) {
16565
16576
  // TODO(mrschmidt): Implement isEquals
16566
16577
  return this === t;
16567
16578
  }, n;
16568
- }(Ga), ic = /** @class */ function(e) {
16579
+ }(za), oc = /** @class */ function(e) {
16569
16580
  function n(t, n) {
16570
16581
  var r = this;
16571
16582
  return (r = e.call(this, t) || this).Wc = n, r;
16572
16583
  }
16573
16584
  return t(n, e), n.prototype._toFieldTransform = function(t) {
16574
- var e = ec(this, t,
16585
+ var e = nc(this, t,
16575
16586
  /*array=*/ !0), n = this.Wc.map((function(t) {
16576
- return cc(t, e);
16587
+ return hc(t, e);
16577
16588
  })), r = new ze(n);
16578
16589
  return new Je(t.path, r);
16579
16590
  }, n.prototype.isEqual = function(t) {
16580
16591
  // TODO(mrschmidt): Implement isEquals
16581
16592
  return this === t;
16582
16593
  }, n;
16583
- }(Ga), oc = /** @class */ function(e) {
16594
+ }(za), sc = /** @class */ function(e) {
16584
16595
  function n(t, n) {
16585
16596
  var r = this;
16586
16597
  return (r = e.call(this, t) || this).Gc = n, r;
@@ -16592,50 +16603,50 @@ var nc = /** @class */ function(e) {
16592
16603
  // TODO(mrschmidt): Implement isEquals
16593
16604
  return this === t;
16594
16605
  }, n;
16595
- }(Ga);
16606
+ }(za);
16596
16607
 
16597
- /** Parse update data from an update() call. */ function sc(t, e, n, r) {
16608
+ /** Parse update data from an update() call. */ function uc(t, e, n, r) {
16598
16609
  var i = t.Qc(1 /* Update */ , e, n);
16599
- lc("Data must be an object, but it was:", i, r);
16610
+ dc("Data must be an object, but it was:", i, r);
16600
16611
  var o = [], s = Yt.empty();
16601
16612
  yt(r, (function(t, r) {
16602
- var u = yc(e, t, n);
16613
+ var u = vc(e, t, n);
16603
16614
  // For Compat types, we have to "extract" the underlying types before
16604
16615
  // performing validation.
16605
16616
  r = I(r);
16606
16617
  var a = i.Bc(u);
16607
- if (r instanceof tc)
16618
+ if (r instanceof ec)
16608
16619
  // Add it to the field mask, but don't add anything to updateData.
16609
16620
  o.push(u); else {
16610
- var c = cc(r, a);
16621
+ var c = hc(r, a);
16611
16622
  null != c && (o.push(u), s.set(u, c));
16612
16623
  }
16613
16624
  }));
16614
16625
  var u = new It(o);
16615
- return new Ha(s, u, i.fieldTransforms);
16626
+ return new Ya(s, u, i.fieldTransforms);
16616
16627
  }
16617
16628
 
16618
- /** Parse update data from a list of field/value arguments. */ function uc(t, e, n, r, i, o) {
16619
- var s = t.Qc(1 /* Update */ , e, n), u = [ dc(e, r, n) ], a = [ i ];
16629
+ /** Parse update data from a list of field/value arguments. */ function ac(t, e, n, r, i, o) {
16630
+ var s = t.Qc(1 /* Update */ , e, n), u = [ pc(e, r, n) ], a = [ i ];
16620
16631
  if (o.length % 2 != 0) throw new Y(H.INVALID_ARGUMENT, "Function " + e + "() needs to be called with an even number of arguments that alternate between field names and values.");
16621
- for (var c = 0; c < o.length; c += 2) u.push(dc(e, o[c])), a.push(o[c + 1]);
16632
+ for (var c = 0; c < o.length; c += 2) u.push(pc(e, o[c])), a.push(o[c + 1]);
16622
16633
  // We iterate in reverse order to pick the last value for a field if the
16623
16634
  // user specified the field multiple times.
16624
- for (var h = [], f = Yt.empty(), l = u.length - 1; l >= 0; --l) if (!mc(h, u[l])) {
16635
+ for (var h = [], f = Yt.empty(), l = u.length - 1; l >= 0; --l) if (!gc(h, u[l])) {
16625
16636
  var d = u[l], p = a[l];
16626
16637
  // For Compat types, we have to "extract" the underlying types before
16627
16638
  // performing validation.
16628
16639
  p = I(p);
16629
16640
  var y = s.Bc(d);
16630
- if (p instanceof tc)
16641
+ if (p instanceof ec)
16631
16642
  // Add it to the field mask, but don't add anything to updateData.
16632
16643
  h.push(d); else {
16633
- var v = cc(p, y);
16644
+ var v = hc(p, y);
16634
16645
  null != v && (h.push(d), f.set(d, v));
16635
16646
  }
16636
16647
  }
16637
16648
  var m = new It(h);
16638
- return new Ha(f, m, s.fieldTransforms);
16649
+ return new Ya(f, m, s.fieldTransforms);
16639
16650
  }
16640
16651
 
16641
16652
  /**
@@ -16644,8 +16655,8 @@ var nc = /** @class */ function(e) {
16644
16655
  *
16645
16656
  * @param allowArrays - Whether the query value is an array that may directly
16646
16657
  * contain additional arrays (e.g. the operand of an `in` query).
16647
- */ function ac(t, e, n, r) {
16648
- return void 0 === r && (r = !1), cc(n, t.Qc(r ? 4 /* ArrayArgument */ : 3 /* Argument */ , e));
16658
+ */ function cc(t, e, n, r) {
16659
+ return void 0 === r && (r = !1), hc(n, t.Qc(r ? 4 /* ArrayArgument */ : 3 /* Argument */ , e));
16649
16660
  }
16650
16661
 
16651
16662
  /**
@@ -16656,12 +16667,12 @@ var nc = /** @class */ function(e) {
16656
16667
  * the source of the data being parsed, etc.
16657
16668
  * @returns The parsed value, or null if the value was a FieldValue sentinel
16658
16669
  * that should not be included in the resulting parsed data.
16659
- */ function cc(t, e) {
16660
- if (fc(
16670
+ */ function hc(t, e) {
16671
+ if (lc(
16661
16672
  // Unwrap the API type from the Compat SDK. This will return the API type
16662
16673
  // from firestore-exp.
16663
- t = I(t))) return lc("Unsupported field value:", e, t), hc(t, e);
16664
- if (t instanceof Ga)
16674
+ t = I(t))) return dc("Unsupported field value:", e, t), fc(t, e);
16675
+ if (t instanceof za)
16665
16676
  // FieldValues usually parse into transforms (except deleteField())
16666
16677
  // in which case we do not want to include this field in our parsed data
16667
16678
  // (as doing so will overwrite the field directly prior to the transform
@@ -16673,7 +16684,7 @@ var nc = /** @class */ function(e) {
16673
16684
  */
16674
16685
  return function(t, e) {
16675
16686
  // Sentinels are only supported with writes, and not within arrays.
16676
- if (!Ya(e.$c)) throw e.qc(t._methodName + "() can only be used with update() and set()");
16687
+ if (!Ja(e.$c)) throw e.qc(t._methodName + "() can only be used with update() and set()");
16677
16688
  if (!e.path) throw e.qc(t._methodName + "() is not currently supported inside arrays");
16678
16689
  var n = t._toFieldTransform(e);
16679
16690
  n && e.fieldTransforms.push(n);
@@ -16696,7 +16707,7 @@ var nc = /** @class */ function(e) {
16696
16707
  if (e.settings.Fc && 4 /* ArrayArgument */ !== e.$c) throw e.qc("Nested arrays are not supported");
16697
16708
  return function(t, e) {
16698
16709
  for (var n = [], r = 0, i = 0, o = t; i < o.length; i++) {
16699
- var s = cc(o[i], e.Uc(r));
16710
+ var s = hc(o[i], e.Uc(r));
16700
16711
  null == s && (
16701
16712
  // Just include nulls in the array for fields being replaced with a
16702
16713
  // sentinel.
@@ -16737,33 +16748,33 @@ var nc = /** @class */ function(e) {
16737
16748
  timestampValue: Qn(e.k, r)
16738
16749
  };
16739
16750
  }
16740
- if (t instanceof za) return {
16751
+ if (t instanceof Qa) return {
16741
16752
  geoPointValue: {
16742
16753
  latitude: t.latitude,
16743
16754
  longitude: t.longitude
16744
16755
  }
16745
16756
  };
16746
- if (t instanceof Ka) return {
16757
+ if (t instanceof Ga) return {
16747
16758
  bytesValue: Wn(e.k, t._byteString)
16748
16759
  };
16749
- if (t instanceof da) {
16760
+ if (t instanceof pa) {
16750
16761
  var i = e.databaseId, o = t.firestore._databaseId;
16751
16762
  if (!o.isEqual(i)) throw e.qc("Document reference is for database " + o.projectId + "/" + o.database + " but should be for database " + i.projectId + "/" + i.database);
16752
16763
  return {
16753
16764
  referenceValue: Jn(t.firestore._databaseId || e.databaseId, t._key.path)
16754
16765
  };
16755
16766
  }
16756
- throw e.qc("Unsupported field value: " + ua(t));
16767
+ throw e.qc("Unsupported field value: " + aa(t));
16757
16768
  }(t, e);
16758
16769
  }
16759
16770
 
16760
- function hc(t, e) {
16771
+ function fc(t, e) {
16761
16772
  var n = {};
16762
16773
  return vt(t) ?
16763
16774
  // If we encounter an empty object, we explicitly add it to the update
16764
16775
  // mask to ensure that the server creates a map entry.
16765
16776
  e.path && e.path.length > 0 && e.fieldMask.push(e.path) : yt(t, (function(t, r) {
16766
- var i = cc(r, e.Mc(t));
16777
+ var i = hc(r, e.Mc(t));
16767
16778
  null != i && (n[t] = i);
16768
16779
  })), {
16769
16780
  mapValue: {
@@ -16772,35 +16783,35 @@ function hc(t, e) {
16772
16783
  };
16773
16784
  }
16774
16785
 
16775
- function fc(t) {
16776
- return !("object" != typeof t || null === t || t instanceof Array || t instanceof Date || t instanceof lt || t instanceof za || t instanceof Ka || t instanceof da || t instanceof Ga);
16786
+ function lc(t) {
16787
+ return !("object" != typeof t || null === t || t instanceof Array || t instanceof Date || t instanceof lt || t instanceof Qa || t instanceof Ga || t instanceof pa || t instanceof za);
16777
16788
  }
16778
16789
 
16779
- function lc(t, e, n) {
16780
- if (!fc(n) || !function(t) {
16790
+ function dc(t, e, n) {
16791
+ if (!lc(n) || !function(t) {
16781
16792
  return "object" == typeof t && null !== t && (Object.getPrototypeOf(t) === Object.prototype || null === Object.getPrototypeOf(t));
16782
16793
  }(n)) {
16783
- var r = ua(n);
16794
+ var r = aa(n);
16784
16795
  throw "an object" === r ? e.qc(t + " a custom object") : e.qc(t + " " + r);
16785
16796
  }
16786
16797
  }
16787
16798
 
16788
16799
  /**
16789
16800
  * Helper that calls fromDotSeparatedString() but wraps any error thrown.
16790
- */ function dc(t, e, n) {
16801
+ */ function pc(t, e, n) {
16791
16802
  if (
16792
16803
  // If required, replace the FieldPath Compat class with with the firestore-exp
16793
16804
  // FieldPath.
16794
- (e = I(e)) instanceof Ba) return e._internalPath;
16795
- if ("string" == typeof e) return yc(t, e);
16796
- throw vc("Field path arguments must be of type string or ", t,
16805
+ (e = I(e)) instanceof ja) return e._internalPath;
16806
+ if ("string" == typeof e) return vc(t, e);
16807
+ throw mc("Field path arguments must be of type string or ", t,
16797
16808
  /* hasConverter= */ !1,
16798
16809
  /* path= */ void 0, n);
16799
16810
  }
16800
16811
 
16801
16812
  /**
16802
16813
  * Matches any characters in a field path string that are reserved.
16803
- */ var pc = new RegExp("[~\\*/\\[\\]]");
16814
+ */ var yc = new RegExp("[~\\*/\\[\\]]");
16804
16815
 
16805
16816
  /**
16806
16817
  * Wraps fromDotSeparatedString with an error message about the method that
@@ -16810,20 +16821,20 @@ function lc(t, e, n) {
16810
16821
  * split on dots.
16811
16822
  * @param targetDoc - The document against which the field path will be
16812
16823
  * evaluated.
16813
- */ function yc(t, n, r) {
16814
- if (n.search(pc) >= 0) throw vc("Invalid field path (" + n + "). Paths must not contain '~', '*', '/', '[', or ']'", t,
16824
+ */ function vc(t, n, r) {
16825
+ if (n.search(yc) >= 0) throw mc("Invalid field path (" + n + "). Paths must not contain '~', '*', '/', '[', or ']'", t,
16815
16826
  /* hasConverter= */ !1,
16816
16827
  /* path= */ void 0, r);
16817
16828
  try {
16818
- return (new (Ba.bind.apply(Ba, e([ void 0 ], n.split(".")))))._internalPath;
16829
+ return (new (ja.bind.apply(ja, e([ void 0 ], n.split(".")))))._internalPath;
16819
16830
  } catch (e) {
16820
- throw vc("Invalid field path (" + n + "). Paths must not be empty, begin with '.', end with '.', or contain '..'", t,
16831
+ throw mc("Invalid field path (" + n + "). Paths must not be empty, begin with '.', end with '.', or contain '..'", t,
16821
16832
  /* hasConverter= */ !1,
16822
16833
  /* path= */ void 0, r);
16823
16834
  }
16824
16835
  }
16825
16836
 
16826
- function vc(t, e, n, r, i) {
16837
+ function mc(t, e, n, r, i) {
16827
16838
  var o = r && !r.isEmpty(), s = void 0 !== i, u = "Function " + e + "() called with invalid data";
16828
16839
  n && (u += " (via `toFirestore()`)");
16829
16840
  var a = "";
@@ -16832,7 +16843,7 @@ function vc(t, e, n, r, i) {
16832
16843
  /** Checks `haystack` if FieldPath `needle` is present. Runs in O(n). */;
16833
16844
  }
16834
16845
 
16835
- function mc(t, e) {
16846
+ function gc(t, e) {
16836
16847
  return t.some((function(t) {
16837
16848
  return t.isEqual(e);
16838
16849
  }));
@@ -16862,7 +16873,7 @@ function mc(t, e) {
16862
16873
  * For a `DocumentSnapshot` that points to a non-existing document, any data
16863
16874
  * access will return 'undefined'. You can use the `exists()` method to
16864
16875
  * explicitly verify a document's existence.
16865
- */ var gc = /** @class */ function() {
16876
+ */ var wc = /** @class */ function() {
16866
16877
  // Note: This class is stripped down version of the DocumentSnapshot in
16867
16878
  // the legacy SDK. The changes are:
16868
16879
  // - No support for SnapshotMetadata.
@@ -16883,7 +16894,7 @@ function mc(t, e) {
16883
16894
  * The `DocumentReference` for the document included in the `DocumentSnapshot`.
16884
16895
  */
16885
16896
  get: function() {
16886
- return new da(this._firestore, this._converter, this._key);
16897
+ return new pa(this._firestore, this._converter, this._key);
16887
16898
  },
16888
16899
  enumerable: !1,
16889
16900
  configurable: !0
@@ -16908,7 +16919,7 @@ function mc(t, e) {
16908
16919
  if (this._converter) {
16909
16920
  // We only want to use the converter and create a new DocumentSnapshot
16910
16921
  // if a converter has been provided.
16911
- var t = new wc(this._firestore, this._userDataWriter, this._key, this._document,
16922
+ var t = new bc(this._firestore, this._userDataWriter, this._key, this._document,
16912
16923
  /* converter= */ null);
16913
16924
  return this._converter.fromFirestore(t);
16914
16925
  }
@@ -16928,11 +16939,11 @@ function mc(t, e) {
16928
16939
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
16929
16940
  t.prototype.get = function(t) {
16930
16941
  if (this._document) {
16931
- var e = this._document.data.field(bc("DocumentSnapshot.get", t));
16942
+ var e = this._document.data.field(Ic("DocumentSnapshot.get", t));
16932
16943
  if (null !== e) return this._userDataWriter.convertValue(e);
16933
16944
  }
16934
16945
  }, t;
16935
- }(), wc = /** @class */ function(e) {
16946
+ }(), bc = /** @class */ function(e) {
16936
16947
  function n() {
16937
16948
  return null !== e && e.apply(this, arguments) || this;
16938
16949
  }
@@ -16944,7 +16955,7 @@ function mc(t, e) {
16944
16955
  */ return t(n, e), n.prototype.data = function() {
16945
16956
  return e.prototype.data.call(this);
16946
16957
  }, n;
16947
- }(gc);
16958
+ }(wc);
16948
16959
 
16949
16960
  /**
16950
16961
  * A `QueryDocumentSnapshot` contains data read from a document in your
@@ -16960,8 +16971,8 @@ function mc(t, e) {
16960
16971
  /**
16961
16972
  * Helper that calls `fromDotSeparatedString()` but wraps any error thrown.
16962
16973
  */
16963
- function bc(t, e) {
16964
- return "string" == typeof e ? yc(t, e) : e instanceof Ba ? e._internalPath : e._delegate._internalPath;
16974
+ function Ic(t, e) {
16975
+ return "string" == typeof e ? vc(t, e) : e instanceof ja ? e._internalPath : e._delegate._internalPath;
16965
16976
  }
16966
16977
 
16967
16978
  /**
@@ -16982,7 +16993,7 @@ function bc(t, e) {
16982
16993
  */
16983
16994
  /**
16984
16995
  * Metadata about a snapshot, describing the state of the snapshot.
16985
- */ var Ic = /** @class */ function() {
16996
+ */ var Tc = /** @class */ function() {
16986
16997
  /** @hideconstructor */
16987
16998
  function t(t, e) {
16988
16999
  this.hasPendingWrites = t, this.fromCache = e
@@ -16996,7 +17007,7 @@ function bc(t, e) {
16996
17007
  return t.prototype.isEqual = function(t) {
16997
17008
  return this.hasPendingWrites === t.hasPendingWrites && this.fromCache === t.fromCache;
16998
17009
  }, t;
16999
- }(), Tc = /** @class */ function(e) {
17010
+ }(), Ec = /** @class */ function(e) {
17000
17011
  /** @hideconstructor protected */
17001
17012
  function n(t, n, r, i, o, s) {
17002
17013
  var u = this;
@@ -17028,7 +17039,7 @@ function bc(t, e) {
17028
17039
  if (this._converter) {
17029
17040
  // We only want to use the converter and create a new DocumentSnapshot
17030
17041
  // if a converter has been provided.
17031
- var e = new Ec(this._firestore, this._userDataWriter, this._key, this._document, this.metadata,
17042
+ var e = new Sc(this._firestore, this._userDataWriter, this._key, this._document, this.metadata,
17032
17043
  /* converter= */ null);
17033
17044
  return this._converter.fromFirestore(e, t);
17034
17045
  }
@@ -17055,11 +17066,11 @@ function bc(t, e) {
17055
17066
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
17056
17067
  n.prototype.get = function(t, e) {
17057
17068
  if (void 0 === e && (e = {}), this._document) {
17058
- var n = this._document.data.field(bc("DocumentSnapshot.get", t));
17069
+ var n = this._document.data.field(Ic("DocumentSnapshot.get", t));
17059
17070
  if (null !== n) return this._userDataWriter.convertValue(n, e.serverTimestamps);
17060
17071
  }
17061
17072
  }, n;
17062
- }(gc), Ec = /** @class */ function(e) {
17073
+ }(wc), Sc = /** @class */ function(e) {
17063
17074
  function n() {
17064
17075
  return null !== e && e.apply(this, arguments) || this;
17065
17076
  }
@@ -17078,10 +17089,10 @@ function bc(t, e) {
17078
17089
  */ return t(n, e), n.prototype.data = function(t) {
17079
17090
  return void 0 === t && (t = {}), e.prototype.data.call(this, t);
17080
17091
  }, n;
17081
- }(Tc), Sc = /** @class */ function() {
17092
+ }(Ec), _c = /** @class */ function() {
17082
17093
  /** @hideconstructor */
17083
17094
  function t(t, e, n, r) {
17084
- this._firestore = t, this._userDataWriter = e, this._snapshot = r, this.metadata = new Ic(r.hasPendingWrites, r.fromCache),
17095
+ this._firestore = t, this._userDataWriter = e, this._snapshot = r, this.metadata = new Tc(r.hasPendingWrites, r.fromCache),
17085
17096
  this.query = n;
17086
17097
  }
17087
17098
  return Object.defineProperty(t.prototype, "docs", {
@@ -17116,7 +17127,7 @@ function bc(t, e) {
17116
17127
  t.prototype.forEach = function(t, e) {
17117
17128
  var n = this;
17118
17129
  this._snapshot.docs.forEach((function(r) {
17119
- t.call(e, new Ec(n._firestore, n._userDataWriter, r.key, r, new Ic(n._snapshot.mutatedKeys.has(r.key), n._snapshot.fromCache), n.query.converter));
17130
+ t.call(e, new Sc(n._firestore, n._userDataWriter, r.key, r, new Tc(n._snapshot.mutatedKeys.has(r.key), n._snapshot.fromCache), n.query.converter));
17120
17131
  }));
17121
17132
  },
17122
17133
  /**
@@ -17140,7 +17151,7 @@ function bc(t, e) {
17140
17151
  return t._snapshot.docChanges.map((function(e) {
17141
17152
  return {
17142
17153
  type: "added",
17143
- doc: new Ec(t._firestore, t._userDataWriter, e.doc.key, e.doc, new Ic(t._snapshot.mutatedKeys.has(e.doc.key), t._snapshot.fromCache), t.query.converter),
17154
+ doc: new Sc(t._firestore, t._userDataWriter, e.doc.key, e.doc, new Tc(t._snapshot.mutatedKeys.has(e.doc.key), t._snapshot.fromCache), t.query.converter),
17144
17155
  oldIndex: -1,
17145
17156
  newIndex: n++
17146
17157
  };
@@ -17152,10 +17163,10 @@ function bc(t, e) {
17152
17163
  return t._snapshot.docChanges.filter((function(t) {
17153
17164
  return e || 3 /* Metadata */ !== t.type;
17154
17165
  })).map((function(e) {
17155
- var n = new Ec(t._firestore, t._userDataWriter, e.doc.key, e.doc, new Ic(t._snapshot.mutatedKeys.has(e.doc.key), t._snapshot.fromCache), t.query.converter), i = -1, o = -1;
17166
+ var n = new Sc(t._firestore, t._userDataWriter, e.doc.key, e.doc, new Tc(t._snapshot.mutatedKeys.has(e.doc.key), t._snapshot.fromCache), t.query.converter), i = -1, o = -1;
17156
17167
  return 0 /* Added */ !== e.type && (i = r.indexOf(e.doc.key), r = r.delete(e.doc.key)),
17157
17168
  1 /* Removed */ !== e.type && (o = (r = r.add(e.doc)).indexOf(e.doc.key)), {
17158
- type: _c(e.type),
17169
+ type: Ac(e.type),
17159
17170
  doc: n,
17160
17171
  oldIndex: i,
17161
17172
  newIndex: o
@@ -17173,7 +17184,7 @@ function bc(t, e) {
17173
17184
  * For a `DocumentSnapshot` that points to a non-existing document, any data
17174
17185
  * access will return 'undefined'. You can use the `exists()` method to
17175
17186
  * explicitly verify a document's existence.
17176
- */ function _c(t) {
17187
+ */ function Ac(t) {
17177
17188
  switch (t) {
17178
17189
  case 0 /* Added */ :
17179
17190
  return "added";
@@ -17198,8 +17209,8 @@ function bc(t, e) {
17198
17209
  * @param left - A snapshot to compare.
17199
17210
  * @param right - A snapshot to compare.
17200
17211
  * @returns true if the snapshots are equal.
17201
- */ function Ac(t, e) {
17202
- return t instanceof Tc && e instanceof Tc ? t._firestore === e._firestore && t._key.isEqual(e._key) && (null === t._document ? null === e._document : t._document.isEqual(e._document)) && t._converter === e._converter : t instanceof Sc && e instanceof Sc && t._firestore === e._firestore && ba(t.query, e.query) && t.metadata.isEqual(e.metadata) && t._snapshot.isEqual(e._snapshot);
17212
+ */ function kc(t, e) {
17213
+ return t instanceof Ec && e instanceof Ec ? t._firestore === e._firestore && t._key.isEqual(e._key) && (null === t._document ? null === e._document : t._document.isEqual(e._document)) && t._converter === e._converter : t instanceof _c && e instanceof _c && t._firestore === e._firestore && Ia(t.query, e.query) && t.metadata.isEqual(e.metadata) && t._snapshot.isEqual(e._snapshot);
17203
17214
  }
17204
17215
 
17205
17216
  /**
@@ -17217,7 +17228,7 @@ function bc(t, e) {
17217
17228
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17218
17229
  * See the License for the specific language governing permissions and
17219
17230
  * limitations under the License.
17220
- */ function kc(t) {
17231
+ */ function Dc(t) {
17221
17232
  if (Te(t) && 0 === t.explicitOrderBy.length) throw new Y(H.UNIMPLEMENTED, "limitToLast() queries require specifying at least one orderBy() clause");
17222
17233
  }
17223
17234
 
@@ -17228,7 +17239,7 @@ function bc(t, e) {
17228
17239
  * endBefore:1}, {@link (endAt:1)}, {@link limit} or {@link limitToLast} and
17229
17240
  * can then be passed to {@link query} to create a new query instance that
17230
17241
  * also contains this `QueryConstraint`.
17231
- */ var Dc = function() {};
17242
+ */ var Nc = function() {};
17232
17243
 
17233
17244
  /**
17234
17245
  * Creates a new immutable instance of {@link Query} that is extended to also include
@@ -17238,7 +17249,7 @@ function bc(t, e) {
17238
17249
  * @param queryConstraints - The list of {@link QueryConstraint}s to apply.
17239
17250
  * @throws if any of the provided query constraints cannot be combined with the
17240
17251
  * existing or new constraints.
17241
- */ function Nc(t) {
17252
+ */ function Cc(t) {
17242
17253
  for (var e = [], n = 1; n < arguments.length; n++) e[n - 1] = arguments[n];
17243
17254
  for (var r = 0, i = e; r < i.length; r++) {
17244
17255
  var o = i[r];
@@ -17247,31 +17258,31 @@ function bc(t, e) {
17247
17258
  return t;
17248
17259
  }
17249
17260
 
17250
- var Cc = /** @class */ function(e) {
17261
+ var xc = /** @class */ function(e) {
17251
17262
  function n(t, n, r) {
17252
17263
  var i = this;
17253
17264
  return (i = e.call(this) || this).zc = t, i.Hc = n, i.Jc = r, i.type = "where",
17254
17265
  i;
17255
17266
  }
17256
17267
  return t(n, e), n.prototype._apply = function(t) {
17257
- var e = $a(t.firestore), n = function(t, e, n, r, i, o, s) {
17268
+ var e = Za(t.firestore), n = function(t, e, n, r, i, o, s) {
17258
17269
  var u;
17259
17270
  if (i.isKeyField()) {
17260
17271
  if ("array-contains" /* ARRAY_CONTAINS */ === o || "array-contains-any" /* ARRAY_CONTAINS_ANY */ === o) throw new Y(H.INVALID_ARGUMENT, "Invalid Query. You can't perform '" + o + "' queries on documentId().");
17261
17272
  if ("in" /* IN */ === o || "not-in" /* NOT_IN */ === o) {
17262
- zc(s, o);
17273
+ Qc(s, o);
17263
17274
  for (var a = [], c = 0, h = s; c < h.length; c++) {
17264
17275
  var f = h[c];
17265
- a.push(Gc(r, t, f));
17276
+ a.push(zc(r, t, f));
17266
17277
  }
17267
17278
  u = {
17268
17279
  arrayValue: {
17269
17280
  values: a
17270
17281
  }
17271
17282
  };
17272
- } else u = Gc(r, t, s);
17273
- } else "in" /* IN */ !== o && "not-in" /* NOT_IN */ !== o && "array-contains-any" /* ARRAY_CONTAINS_ANY */ !== o || zc(s, o),
17274
- u = ac(n, "where", s,
17283
+ } else u = zc(r, t, s);
17284
+ } else "in" /* IN */ !== o && "not-in" /* NOT_IN */ !== o && "array-contains-any" /* ARRAY_CONTAINS_ANY */ !== o || Qc(s, o),
17285
+ u = cc(n, "where", s,
17275
17286
  /* allowArrays= */ "in" /* IN */ === o || "not-in" /* NOT_IN */ === o);
17276
17287
  var l = re.create(i, o, u);
17277
17288
  return function(t, e) {
@@ -17279,7 +17290,7 @@ var Cc = /** @class */ function(e) {
17279
17290
  var n = Se(t);
17280
17291
  if (null !== n && !n.isEqual(e.field)) throw new Y(H.INVALID_ARGUMENT, "Invalid query. All where filters with an inequality (<, <=, !=, not-in, >, or >=) must be on the same field. But you have inequality filters on '" + n.toString() + "' and '" + e.field.toString() + "'");
17281
17292
  var r = Ee(t);
17282
- null !== r && Qc(t, e.field, r);
17293
+ null !== r && Wc(t, e.field, r);
17283
17294
  }
17284
17295
  var i = function(t, e) {
17285
17296
  for (var n = 0, r = t.filters; n < r.length; n++) {
@@ -17326,12 +17337,12 @@ var Cc = /** @class */ function(e) {
17326
17337
  throw i === e.op ? new Y(H.INVALID_ARGUMENT, "Invalid query. You cannot use more than one '" + e.op.toString() + "' filter.") : new Y(H.INVALID_ARGUMENT, "Invalid query. You cannot use '" + e.op.toString() + "' filters with '" + i.toString() + "' filters.");
17327
17338
  }(t, l), l;
17328
17339
  }(t._query, 0, e, t.firestore._databaseId, this.zc, this.Hc, this.Jc);
17329
- return new pa(t.firestore, t.converter, function(t, e) {
17340
+ return new ya(t.firestore, t.converter, function(t, e) {
17330
17341
  var n = t.filters.concat([ e ]);
17331
17342
  return new ge(t.path, t.collectionGroup, t.explicitOrderBy.slice(), n, t.limit, t.limitType, t.startAt, t.endAt);
17332
17343
  }(t._query, n));
17333
17344
  }, n;
17334
- }(Dc);
17345
+ }(Nc);
17335
17346
 
17336
17347
  /**
17337
17348
  * Creates a {@link QueryConstraint} that enforces that documents must contain the
@@ -17343,12 +17354,12 @@ var Cc = /** @class */ function(e) {
17343
17354
  * "&lt;=", "!=").
17344
17355
  * @param value - The value for comparison
17345
17356
  * @returns The created {@link Query}.
17346
- */ function xc(t, e, n) {
17347
- var r = e, i = bc("where", t);
17348
- return new Cc(i, r, n);
17357
+ */ function Rc(t, e, n) {
17358
+ var r = e, i = Ic("where", t);
17359
+ return new xc(i, r, n);
17349
17360
  }
17350
17361
 
17351
- var Rc = /** @class */ function(e) {
17362
+ var Lc = /** @class */ function(e) {
17352
17363
  function n(t, n) {
17353
17364
  var r = this;
17354
17365
  return (r = e.call(this) || this).zc = t, r.Yc = n, r.type = "orderBy", r;
@@ -17362,17 +17373,17 @@ var Rc = /** @class */ function(e) {
17362
17373
  if (null === Ee(t)) {
17363
17374
  // This is the first order by. It must match any inequality.
17364
17375
  var n = Se(t);
17365
- null !== n && Qc(t, n, e.field);
17376
+ null !== n && Wc(t, n, e.field);
17366
17377
  }
17367
17378
  }(t, r), r;
17368
17379
  }(t._query, this.zc, this.Yc);
17369
- return new pa(t.firestore, t.converter, function(t, e) {
17380
+ return new ya(t.firestore, t.converter, function(t, e) {
17370
17381
  // TODO(dimond): validate that orderBy does not list the same key twice.
17371
17382
  var n = t.explicitOrderBy.concat([ e ]);
17372
17383
  return new ge(t.path, t.collectionGroup, n, t.filters.slice(), t.limit, t.limitType, t.startAt, t.endAt);
17373
17384
  }(t._query, e));
17374
17385
  }, n;
17375
- }(Dc);
17386
+ }(Nc);
17376
17387
 
17377
17388
  /**
17378
17389
  * Creates a {@link QueryConstraint} that sorts the query result by the
@@ -17382,29 +17393,29 @@ var Rc = /** @class */ function(e) {
17382
17393
  * @param directionStr - Optional direction to sort by ('asc' or 'desc'). If
17383
17394
  * not specified, order will be ascending.
17384
17395
  * @returns The created {@link Query}.
17385
- */ function Lc(t, e) {
17396
+ */ function Pc(t, e) {
17386
17397
  void 0 === e && (e = "asc");
17387
- var n = e, r = bc("orderBy", t);
17388
- return new Rc(r, n);
17398
+ var n = e, r = Ic("orderBy", t);
17399
+ return new Lc(r, n);
17389
17400
  }
17390
17401
 
17391
- var Pc = /** @class */ function(e) {
17402
+ var Oc = /** @class */ function(e) {
17392
17403
  function n(t, n, r) {
17393
17404
  var i = this;
17394
17405
  return (i = e.call(this) || this).type = t, i.Xc = n, i.Zc = r, i;
17395
17406
  }
17396
17407
  return t(n, e), n.prototype._apply = function(t) {
17397
- return new pa(t.firestore, t.converter, De(t._query, this.Xc, this.Zc));
17408
+ return new ya(t.firestore, t.converter, De(t._query, this.Xc, this.Zc));
17398
17409
  }, n;
17399
- }(Dc);
17410
+ }(Nc);
17400
17411
 
17401
17412
  /**
17402
17413
  * Creates a {@link QueryConstraint} that only returns the first matching documents.
17403
17414
  *
17404
17415
  * @param limit - The maximum number of items to return.
17405
17416
  * @returns The created {@link Query}.
17406
- */ function Oc(t) {
17407
- return ca("limit", t), new Pc("limit", t, "F" /* First */)
17417
+ */ function Mc(t) {
17418
+ return ha("limit", t), new Oc("limit", t, "F" /* First */)
17408
17419
  /**
17409
17420
  * Creates a {@link QueryConstraint} that only returns the last matching documents.
17410
17421
  *
@@ -17416,59 +17427,59 @@ var Pc = /** @class */ function(e) {
17416
17427
  */;
17417
17428
  }
17418
17429
 
17419
- function Mc(t) {
17420
- return ca("limitToLast", t), new Pc("limitToLast", t, "L" /* Last */);
17430
+ function Fc(t) {
17431
+ return ha("limitToLast", t), new Oc("limitToLast", t, "L" /* Last */);
17421
17432
  }
17422
17433
 
17423
- var Fc = /** @class */ function(e) {
17434
+ var Vc = /** @class */ function(e) {
17424
17435
  function n(t, n, r) {
17425
17436
  var i = this;
17426
17437
  return (i = e.call(this) || this).type = t, i.ta = n, i.ea = r, i;
17427
17438
  }
17428
17439
  return t(n, e), n.prototype._apply = function(t) {
17429
- var e = Kc(t, this.type, this.ta, this.ea);
17430
- return new pa(t.firestore, t.converter, function(t, e) {
17440
+ var e = Gc(t, this.type, this.ta, this.ea);
17441
+ return new ya(t.firestore, t.converter, function(t, e) {
17431
17442
  return new ge(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), t.limit, t.limitType, e, t.endAt);
17432
17443
  }(t._query, e));
17433
17444
  }, n;
17434
- }(Dc);
17445
+ }(Nc);
17435
17446
 
17436
- function Vc() {
17447
+ function qc() {
17437
17448
  for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
17438
- return new Fc("startAt", t, /*before=*/ !0);
17449
+ return new Vc("startAt", t, /*before=*/ !0);
17439
17450
  }
17440
17451
 
17441
- function qc() {
17452
+ function Uc() {
17442
17453
  for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
17443
- return new Fc("startAfter", t,
17454
+ return new Vc("startAfter", t,
17444
17455
  /*before=*/ !1);
17445
17456
  }
17446
17457
 
17447
- var Uc = /** @class */ function(e) {
17458
+ var Bc = /** @class */ function(e) {
17448
17459
  function n(t, n, r) {
17449
17460
  var i = this;
17450
17461
  return (i = e.call(this) || this).type = t, i.ta = n, i.ea = r, i;
17451
17462
  }
17452
17463
  return t(n, e), n.prototype._apply = function(t) {
17453
- var e = Kc(t, this.type, this.ta, this.ea);
17454
- return new pa(t.firestore, t.converter, function(t, e) {
17464
+ var e = Gc(t, this.type, this.ta, this.ea);
17465
+ return new ya(t.firestore, t.converter, function(t, e) {
17455
17466
  return new ge(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), t.limit, t.limitType, t.startAt, e);
17456
17467
  }(t._query, e));
17457
17468
  }, n;
17458
- }(Dc);
17469
+ }(Nc);
17459
17470
 
17460
- function Bc() {
17471
+ function jc() {
17461
17472
  for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
17462
- return new Uc("endBefore", t, /*before=*/ !0);
17473
+ return new Bc("endBefore", t, /*before=*/ !0);
17463
17474
  }
17464
17475
 
17465
- function jc() {
17476
+ function Kc() {
17466
17477
  for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
17467
- return new Uc("endAt", t, /*before=*/ !1);
17478
+ return new Bc("endAt", t, /*before=*/ !1);
17468
17479
  }
17469
17480
 
17470
- /** Helper function to create a bound from a document or fields */ function Kc(t, e, n, r) {
17471
- if (n[0] = I(n[0]), n[0] instanceof gc) return function(t, e, n, r, i) {
17481
+ /** Helper function to create a bound from a document or fields */ function Gc(t, e, n, r) {
17482
+ if (n[0] = I(n[0]), n[0] instanceof wc) return function(t, e, n, r, i) {
17472
17483
  if (!r) throw new Y(H.NOT_FOUND, "Can't use a DocumentSnapshot that doesn't exist for " + n + "().");
17473
17484
  // Because people expect to continue/end a query at the exact document
17474
17485
  // provided, we need to use the implicit sort order rather than the explicit
@@ -17491,7 +17502,7 @@ function jc() {
17491
17502
  }
17492
17503
  return new le(o, i);
17493
17504
  }(t._query, t.firestore._databaseId, e, n[0]._document, r);
17494
- var i = $a(t.firestore);
17505
+ var i = Za(t.firestore);
17495
17506
  return function(t, e, n, r, i, o) {
17496
17507
  // Use explicit order by's because it has to match the query the user made
17497
17508
  var s = t.explicitOrderBy;
@@ -17506,7 +17517,7 @@ function jc() {
17506
17517
  var f = new Pt(h);
17507
17518
  u.push(jt(e, f));
17508
17519
  } else {
17509
- var l = ac(n, r, c);
17520
+ var l = cc(n, r, c);
17510
17521
  u.push(l);
17511
17522
  }
17512
17523
  }
@@ -17514,7 +17525,7 @@ function jc() {
17514
17525
  }(t._query, t.firestore._databaseId, i, e, n, r);
17515
17526
  }
17516
17527
 
17517
- function Gc(t, e, n) {
17528
+ function zc(t, e, n) {
17518
17529
  if ("string" == typeof (n = I(n))) {
17519
17530
  if ("" === n) throw new Y(H.INVALID_ARGUMENT, "Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.");
17520
17531
  if (!_e(e) && -1 !== n.indexOf("/")) throw new Y(H.INVALID_ARGUMENT, "Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '" + n + "' contains a '/' character.");
@@ -17522,19 +17533,19 @@ function Gc(t, e, n) {
17522
17533
  if (!Pt.isDocumentKey(r)) throw new Y(H.INVALID_ARGUMENT, "Invalid query. When querying a collection group by documentId(), the value provided must result in a valid document path, but '" + r + "' is not because it has an odd number of segments (" + r.length + ").");
17523
17534
  return jt(t, new Pt(r));
17524
17535
  }
17525
- if (n instanceof da) return jt(t, n._key);
17526
- throw new Y(H.INVALID_ARGUMENT, "Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: " + ua(n) + ".");
17536
+ if (n instanceof pa) return jt(t, n._key);
17537
+ throw new Y(H.INVALID_ARGUMENT, "Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: " + aa(n) + ".");
17527
17538
  }
17528
17539
 
17529
17540
  /**
17530
17541
  * Validates that the value passed into a disjunctive filter satisfies all
17531
17542
  * array requirements.
17532
- */ function zc(t, e) {
17543
+ */ function Qc(t, e) {
17533
17544
  if (!Array.isArray(t) || 0 === t.length) throw new Y(H.INVALID_ARGUMENT, "Invalid Query. A non-empty array is required for '" + e.toString() + "' filters.");
17534
17545
  if (t.length > 10) throw new Y(H.INVALID_ARGUMENT, "Invalid Query. '" + e.toString() + "' filters support a maximum of 10 elements in the value array.");
17535
17546
  }
17536
17547
 
17537
- function Qc(t, e, n) {
17548
+ function Wc(t, e, n) {
17538
17549
  if (!n.isEqual(e)) throw new Y(H.INVALID_ARGUMENT, "Invalid query. You have a where filter with an inequality (<, <=, !=, not-in, >, or >=) on field '" + e.toString() + "' and so you must also use '" + e.toString() + "' as your first argument to orderBy(), but your first orderBy() is on field '" + n.toString() + "' instead.");
17539
17550
  }
17540
17551
 
@@ -17559,7 +17570,7 @@ function Qc(t, e, n) {
17559
17570
  * to the user.
17560
17571
  *
17561
17572
  * @internal
17562
- */ var Wc = /** @class */ function() {
17573
+ */ var Hc = /** @class */ function() {
17563
17574
  function t() {}
17564
17575
  return t.prototype.convertValue = function(t, e) {
17565
17576
  switch (void 0 === e && (e = "none"), Ot(t)) {
@@ -17605,7 +17616,7 @@ function Qc(t, e, n) {
17605
17616
  r[t] = n.convertValue(i, e);
17606
17617
  })), r;
17607
17618
  }, t.prototype.convertGeoPoint = function(t) {
17608
- return new za(At(t.latitude), At(t.longitude));
17619
+ return new Qa(At(t.latitude), At(t.longitude));
17609
17620
  }, t.prototype.convertArray = function(t, e) {
17610
17621
  var n = this;
17611
17622
  return (t.values || []).map((function(t) {
@@ -17629,7 +17640,7 @@ function Qc(t, e, n) {
17629
17640
  }, t.prototype.convertDocumentKey = function(t, e) {
17630
17641
  var n = gt.fromString(t);
17631
17642
  z(Ir(n));
17632
- var r = new ea(n.get(1), n.get(3)), i = new Pt(n.popFirst(5));
17643
+ var r = new na(n.get(1), n.get(3)), i = new Pt(n.popFirst(5));
17633
17644
  return r.isEqual(e) ||
17634
17645
  // TODO(b/64130202): Somehow support foreign references.
17635
17646
  B("Document " + i + " contains a document reference within a different database (" + r.projectId + "/" + r.database + ") which is not supported. It will be treated as a reference in the current database (" + e.projectId + "/" + e.database + ") instead."),
@@ -17661,41 +17672,41 @@ function Qc(t, e, n) {
17661
17672
  * because we want to provide the user with a more specific error message if
17662
17673
  * their `set()` or fails due to invalid data originating from a `toFirestore()`
17663
17674
  * call.
17664
- */ function Hc(t, e, n) {
17675
+ */ function Yc(t, e, n) {
17665
17676
  // Cast to `any` in order to satisfy the union type constraint on
17666
17677
  // toFirestore().
17667
17678
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
17668
17679
  return t ? n && (n.merge || n.mergeFields) ? t.toFirestore(e, n) : t.toFirestore(e) : e;
17669
17680
  }
17670
17681
 
17671
- var Yc = /** @class */ function(e) {
17682
+ var Jc = /** @class */ function(e) {
17672
17683
  function n(t) {
17673
17684
  var n = this;
17674
17685
  return (n = e.call(this) || this).firestore = t, n;
17675
17686
  }
17676
17687
  return t(n, e), n.prototype.convertBytes = function(t) {
17677
- return new Ka(t);
17688
+ return new Ga(t);
17678
17689
  }, n.prototype.convertReference = function(t) {
17679
17690
  var e = this.convertDocumentKey(t, this.firestore._databaseId);
17680
- return new da(this.firestore, /* converter= */ null, e);
17691
+ return new pa(this.firestore, /* converter= */ null, e);
17681
17692
  }, n;
17682
- }(Wc), Jc = /** @class */ function() {
17693
+ }(Hc), Xc = /** @class */ function() {
17683
17694
  /** @hideconstructor */
17684
17695
  function t(t, e) {
17685
17696
  this._firestore = t, this._commitHandler = e, this._mutations = [], this._committed = !1,
17686
- this._dataReader = $a(t);
17697
+ this._dataReader = Za(t);
17687
17698
  }
17688
17699
  return t.prototype.set = function(t, e, n) {
17689
17700
  this._verifyNotCommitted();
17690
- var r = Xc(t, this._firestore), i = Hc(r.converter, e, n), o = Za(this._dataReader, "WriteBatch.set", r._key, i, null !== r.converter, n);
17701
+ var r = $c(t, this._firestore), i = Yc(r.converter, e, n), o = tc(this._dataReader, "WriteBatch.set", r._key, i, null !== r.converter, n);
17691
17702
  return this._mutations.push(o.toMutation(r._key, $e.none())), this;
17692
17703
  }, t.prototype.update = function(t, e, n) {
17693
17704
  for (var r = [], i = 3; i < arguments.length; i++) r[i - 3] = arguments[i];
17694
17705
  this._verifyNotCommitted();
17695
- var o, s = Xc(t, this._firestore);
17706
+ var o, s = $c(t, this._firestore);
17696
17707
  // For Compat types, we have to "extract" the underlying types before
17697
17708
  // performing validation.
17698
- return o = "string" == typeof (e = I(e)) || e instanceof Ba ? uc(this._dataReader, "WriteBatch.update", s._key, e, n, r) : sc(this._dataReader, "WriteBatch.update", s._key, e),
17709
+ return o = "string" == typeof (e = I(e)) || e instanceof ja ? ac(this._dataReader, "WriteBatch.update", s._key, e, n, r) : uc(this._dataReader, "WriteBatch.update", s._key, e),
17699
17710
  this._mutations.push(o.toMutation(s._key, $e.exists(!0))), this;
17700
17711
  },
17701
17712
  /**
@@ -17706,7 +17717,7 @@ var Yc = /** @class */ function(e) {
17706
17717
  */
17707
17718
  t.prototype.delete = function(t) {
17708
17719
  this._verifyNotCommitted();
17709
- var e = Xc(t, this._firestore);
17720
+ var e = $c(t, this._firestore);
17710
17721
  return this._mutations = this._mutations.concat(new pn(e._key, $e.none())), this;
17711
17722
  },
17712
17723
  /**
@@ -17751,7 +17762,7 @@ var Yc = /** @class */ function(e) {
17751
17762
  * provides methods for adding writes to the write batch. None of the writes
17752
17763
  * will be committed (or visible locally) until {@link WriteBatch.commit} is
17753
17764
  * called.
17754
- */ function Xc(t, e) {
17765
+ */ function $c(t, e) {
17755
17766
  if ((t = I(t)).firestore !== e) throw new Y(H.INVALID_ARGUMENT, "Provided document reference is from a different Firestore instance.");
17756
17767
  return t;
17757
17768
  }
@@ -17808,26 +17819,26 @@ var Yc = /** @class */ function(e) {
17808
17819
  * @param reference - The reference of the document to fetch.
17809
17820
  * @returns A Promise resolved with a `DocumentSnapshot` containing the
17810
17821
  * current document contents.
17811
- */ function $c(t) {
17812
- t = aa(t, da);
17813
- var e = aa(t.firestore, _a);
17814
- return $u(Da(e), t._key).then((function(n) {
17815
- return lh(e, t, n);
17822
+ */ function Zc(t) {
17823
+ t = ca(t, pa);
17824
+ var e = ca(t.firestore, Aa);
17825
+ return Zu(Na(e), t._key).then((function(n) {
17826
+ return dh(e, t, n);
17816
17827
  }));
17817
17828
  }
17818
17829
 
17819
- var Zc = /** @class */ function(e) {
17830
+ var th = /** @class */ function(e) {
17820
17831
  function n(t) {
17821
17832
  var n = this;
17822
17833
  return (n = e.call(this) || this).firestore = t, n;
17823
17834
  }
17824
17835
  return t(n, e), n.prototype.convertBytes = function(t) {
17825
- return new Ka(t);
17836
+ return new Ga(t);
17826
17837
  }, n.prototype.convertReference = function(t) {
17827
17838
  var e = this.convertDocumentKey(t, this.firestore._databaseId);
17828
- return new da(this.firestore, /* converter= */ null, e);
17839
+ return new pa(this.firestore, /* converter= */ null, e);
17829
17840
  }, n;
17830
- }(Wc);
17841
+ }(Hc);
17831
17842
 
17832
17843
  /**
17833
17844
  * Reads the document referred to by this `DocumentReference` from cache.
@@ -17835,9 +17846,9 @@ var Zc = /** @class */ function(e) {
17835
17846
  *
17836
17847
  * @returns A `Promise` resolved with a `DocumentSnapshot` containing the
17837
17848
  * current document contents.
17838
- */ function th(t) {
17839
- t = aa(t, da);
17840
- var e = aa(t.firestore, _a), i = Da(e), o = new Zc(e);
17849
+ */ function eh(t) {
17850
+ t = ca(t, pa);
17851
+ var e = ca(t.firestore, Aa), i = Na(e), o = new th(e);
17841
17852
  return function(t, e) {
17842
17853
  var i = this, o = new J;
17843
17854
  return t.asyncQueue.enqueueAndForget((function() {
@@ -17864,7 +17875,7 @@ var Zc = /** @class */ function(e) {
17864
17875
  [ 3 /*break*/ , 3 ];
17865
17876
 
17866
17877
  case 2:
17867
- return o = r.sent(), s = Ls(o, "Failed to get document '" + e + " from cache"),
17878
+ return o = r.sent(), s = Ps(o, "Failed to get document '" + e + " from cache"),
17868
17879
  i.reject(s), [ 3 /*break*/ , 3 ];
17869
17880
 
17870
17881
  case 3:
@@ -17872,7 +17883,7 @@ var Zc = /** @class */ function(e) {
17872
17883
  }
17873
17884
  }));
17874
17885
  }));
17875
- }, [ 4 /*yield*/ , Hu(t) ];
17886
+ }, [ 4 /*yield*/ , Yu(t) ];
17876
17887
 
17877
17888
  case 1:
17878
17889
  return [ 2 /*return*/ , i.apply(void 0, [ s.sent(), e, o ]) ];
@@ -17881,7 +17892,7 @@ var Zc = /** @class */ function(e) {
17881
17892
  }));
17882
17893
  })), o.promise;
17883
17894
  }(i, t._key).then((function(n) {
17884
- return new Tc(e, o, t._key, n, new Ic(null !== n && n.hasLocalMutations,
17895
+ return new Ec(e, o, t._key, n, new Tc(null !== n && n.hasLocalMutations,
17885
17896
  /* fromCache= */ !0), t.converter);
17886
17897
  }));
17887
17898
  }
@@ -17892,13 +17903,13 @@ var Zc = /** @class */ function(e) {
17892
17903
  *
17893
17904
  * @returns A `Promise` resolved with a `DocumentSnapshot` containing the
17894
17905
  * current document contents.
17895
- */ function eh(t) {
17896
- t = aa(t, da);
17897
- var e = aa(t.firestore, _a);
17898
- return $u(Da(e), t._key, {
17906
+ */ function nh(t) {
17907
+ t = ca(t, pa);
17908
+ var e = ca(t.firestore, Aa);
17909
+ return Zu(Na(e), t._key, {
17899
17910
  source: "server"
17900
17911
  }).then((function(n) {
17901
- return lh(e, t, n);
17912
+ return dh(e, t, n);
17902
17913
  }));
17903
17914
  }
17904
17915
 
@@ -17911,11 +17922,11 @@ var Zc = /** @class */ function(e) {
17911
17922
  * invoke {@link getDocsFromCache} or {@link getDocsFromServer}.
17912
17923
  *
17913
17924
  * @returns A `Promise` that will be resolved with the results of the query.
17914
- */ function nh(t) {
17915
- t = aa(t, pa);
17916
- var e = aa(t.firestore, _a), n = Da(e), r = new Zc(e);
17917
- return kc(t._query), Zu(n, t._query).then((function(n) {
17918
- return new Sc(e, r, t, n);
17925
+ */ function rh(t) {
17926
+ t = ca(t, ya);
17927
+ var e = ca(t.firestore, Aa), n = Na(e), r = new th(e);
17928
+ return Dc(t._query), ta(n, t._query).then((function(n) {
17929
+ return new _c(e, r, t, n);
17919
17930
  }))
17920
17931
  /**
17921
17932
  * Executes the query and returns the results as a `QuerySnapshot` from cache.
@@ -17925,9 +17936,9 @@ var Zc = /** @class */ function(e) {
17925
17936
  */;
17926
17937
  }
17927
17938
 
17928
- function rh(t) {
17929
- t = aa(t, pa);
17930
- var e = aa(t.firestore, _a), i = Da(e), o = new Zc(e);
17939
+ function ih(t) {
17940
+ t = ca(t, ya);
17941
+ var e = ca(t.firestore, Aa), i = Na(e), o = new th(e);
17931
17942
  return function(t, e) {
17932
17943
  var i = this, o = new J;
17933
17944
  return t.asyncQueue.enqueueAndForget((function() {
@@ -17946,11 +17957,11 @@ function rh(t) {
17946
17957
  /* usePreviousResults= */ !0) ];
17947
17958
 
17948
17959
  case 1:
17949
- return n = r.sent(), o = new Xs(e, n.zn), s = o.Po(n.documents), u = o.applyChanges(s,
17960
+ return n = r.sent(), o = new $s(e, n.zn), s = o.Po(n.documents), u = o.applyChanges(s,
17950
17961
  /* updateLimboDocuments= */ !1), i.resolve(u.snapshot), [ 3 /*break*/ , 3 ];
17951
17962
 
17952
17963
  case 2:
17953
- return a = r.sent(), c = Ls(a, "Failed to execute query '" + e + " against cache"),
17964
+ return a = r.sent(), c = Ps(a, "Failed to execute query '" + e + " against cache"),
17954
17965
  i.reject(c), [ 3 /*break*/ , 3 ];
17955
17966
 
17956
17967
  case 3:
@@ -17958,7 +17969,7 @@ function rh(t) {
17958
17969
  }
17959
17970
  }));
17960
17971
  }));
17961
- }, [ 4 /*yield*/ , Hu(t) ];
17972
+ }, [ 4 /*yield*/ , Yu(t) ];
17962
17973
 
17963
17974
  case 1:
17964
17975
  return [ 2 /*return*/ , i.apply(void 0, [ s.sent(), e, o ]) ];
@@ -17967,7 +17978,7 @@ function rh(t) {
17967
17978
  }));
17968
17979
  })), o.promise;
17969
17980
  }(i, t._query).then((function(n) {
17970
- return new Sc(e, o, t, n);
17981
+ return new _c(e, o, t, n);
17971
17982
  }));
17972
17983
  }
17973
17984
 
@@ -17976,30 +17987,30 @@ function rh(t) {
17976
17987
  * server. Returns an error if the network is not available.
17977
17988
  *
17978
17989
  * @returns A `Promise` that will be resolved with the results of the query.
17979
- */ function ih(t) {
17980
- t = aa(t, pa);
17981
- var e = aa(t.firestore, _a), n = Da(e), r = new Zc(e);
17982
- return Zu(n, t._query, {
17990
+ */ function oh(t) {
17991
+ t = ca(t, ya);
17992
+ var e = ca(t.firestore, Aa), n = Na(e), r = new th(e);
17993
+ return ta(n, t._query, {
17983
17994
  source: "server"
17984
17995
  }).then((function(n) {
17985
- return new Sc(e, r, t, n);
17996
+ return new _c(e, r, t, n);
17986
17997
  }));
17987
17998
  }
17988
17999
 
17989
- function oh(t, e, n) {
17990
- t = aa(t, da);
17991
- var r = aa(t.firestore, _a), i = Hc(t.converter, e, n);
17992
- return fh(r, [ Za($a(r), "setDoc", t._key, i, null !== t.converter, n).toMutation(t._key, $e.none()) ]);
18000
+ function sh(t, e, n) {
18001
+ t = ca(t, pa);
18002
+ var r = ca(t.firestore, Aa), i = Yc(t.converter, e, n);
18003
+ return lh(r, [ tc(Za(r), "setDoc", t._key, i, null !== t.converter, n).toMutation(t._key, $e.none()) ]);
17993
18004
  }
17994
18005
 
17995
- function sh(t, e, n) {
18006
+ function uh(t, e, n) {
17996
18007
  for (var r = [], i = 3; i < arguments.length; i++) r[i - 3] = arguments[i];
17997
- t = aa(t, da);
17998
- var o = aa(t.firestore, _a), s = $a(o);
17999
- return fh(o, [ ("string" == typeof (
18008
+ t = ca(t, pa);
18009
+ var o = ca(t.firestore, Aa), s = Za(o);
18010
+ return lh(o, [ ("string" == typeof (
18000
18011
  // For Compat types, we have to "extract" the underlying types before
18001
18012
  // performing validation.
18002
- e = I(e)) || e instanceof Ba ? uc(s, "updateDoc", t._key, e, n, r) : sc(s, "updateDoc", t._key, e)).toMutation(t._key, $e.exists(!0)) ]);
18013
+ e = I(e)) || e instanceof ja ? ac(s, "updateDoc", t._key, e, n, r) : uc(s, "updateDoc", t._key, e)).toMutation(t._key, $e.exists(!0)) ]);
18003
18014
  }
18004
18015
 
18005
18016
  /**
@@ -18008,8 +18019,8 @@ function sh(t, e, n) {
18008
18019
  * @param reference - A reference to the document to delete.
18009
18020
  * @returns A Promise resolved once the document has been successfully
18010
18021
  * deleted from the backend (note that it won't resolve while you're offline).
18011
- */ function uh(t) {
18012
- return fh(aa(t.firestore, _a), [ new pn(t._key, $e.none()) ]);
18022
+ */ function ah(t) {
18023
+ return lh(ca(t.firestore, Aa), [ new pn(t._key, $e.none()) ]);
18013
18024
  }
18014
18025
 
18015
18026
  /**
@@ -18021,55 +18032,55 @@ function sh(t, e, n) {
18021
18032
  * @returns A `Promise` resolved with a `DocumentReference` pointing to the
18022
18033
  * newly created document after it has been written to the backend (Note that it
18023
18034
  * won't resolve while you're offline).
18024
- */ function ah(t, e) {
18025
- var n = aa(t.firestore, _a), r = ga(t), i = Hc(t.converter, e);
18026
- return fh(n, [ Za($a(t.firestore), "addDoc", r._key, i, null !== t.converter, {}).toMutation(r._key, $e.exists(!1)) ]).then((function() {
18035
+ */ function ch(t, e) {
18036
+ var n = ca(t.firestore, Aa), r = wa(t), i = Yc(t.converter, e);
18037
+ return lh(n, [ tc(Za(t.firestore), "addDoc", r._key, i, null !== t.converter, {}).toMutation(r._key, $e.exists(!1)) ]).then((function() {
18027
18038
  return r;
18028
18039
  }));
18029
18040
  }
18030
18041
 
18031
- function ch(t) {
18042
+ function hh(t) {
18032
18043
  for (var e, i, o, s = [], u = 1; u < arguments.length; u++) s[u - 1] = arguments[u];
18033
18044
  t = I(t);
18034
18045
  var a = {
18035
18046
  includeMetadataChanges: !1
18036
18047
  }, c = 0;
18037
- "object" != typeof s[c] || Ta(s[c]) || (a = s[c], c++);
18048
+ "object" != typeof s[c] || Ea(s[c]) || (a = s[c], c++);
18038
18049
  var h, f, l, d = {
18039
18050
  includeMetadataChanges: a.includeMetadataChanges
18040
18051
  };
18041
- if (Ta(s[c])) {
18052
+ if (Ea(s[c])) {
18042
18053
  var p = s[c];
18043
18054
  s[c] = null === (e = p.next) || void 0 === e ? void 0 : e.bind(p), s[c + 1] = null === (i = p.error) || void 0 === i ? void 0 : i.bind(p),
18044
18055
  s[c + 2] = null === (o = p.complete) || void 0 === o ? void 0 : o.bind(p);
18045
18056
  }
18046
- if (t instanceof da) f = aa(t.firestore, _a), l = be(t._key.path), h = {
18057
+ if (t instanceof pa) f = ca(t.firestore, Aa), l = be(t._key.path), h = {
18047
18058
  next: function(e) {
18048
- s[c] && s[c](lh(f, t, e));
18059
+ s[c] && s[c](dh(f, t, e));
18049
18060
  },
18050
18061
  error: s[c + 1],
18051
18062
  complete: s[c + 2]
18052
18063
  }; else {
18053
- var y = aa(t, pa);
18054
- f = aa(y.firestore, _a), l = y._query;
18055
- var v = new Zc(f);
18064
+ var y = ca(t, ya);
18065
+ f = ca(y.firestore, Aa), l = y._query;
18066
+ var v = new th(f);
18056
18067
  h = {
18057
18068
  next: function(t) {
18058
- s[c] && s[c](new Sc(f, v, y, t));
18069
+ s[c] && s[c](new _c(f, v, y, t));
18059
18070
  },
18060
18071
  error: s[c + 1],
18061
18072
  complete: s[c + 2]
18062
- }, kc(t._query);
18073
+ }, Dc(t._query);
18063
18074
  }
18064
18075
  return function(t, e, i, o) {
18065
- var s = this, u = new Vu(o), a = new Gs(e, u, i);
18076
+ var s = this, u = new qu(o), a = new zs(e, u, i);
18066
18077
  return t.asyncQueue.enqueueAndForget((function() {
18067
18078
  return n(s, void 0, void 0, (function() {
18068
18079
  var e;
18069
18080
  return r(this, (function(n) {
18070
18081
  switch (n.label) {
18071
18082
  case 0:
18072
- return e = qs, [ 4 /*yield*/ , Xu(t) ];
18083
+ return e = Us, [ 4 /*yield*/ , $u(t) ];
18073
18084
 
18074
18085
  case 1:
18075
18086
  return [ 2 /*return*/ , e.apply(void 0, [ n.sent(), a ]) ];
@@ -18083,7 +18094,7 @@ function ch(t) {
18083
18094
  return r(this, (function(n) {
18084
18095
  switch (n.label) {
18085
18096
  case 0:
18086
- return e = Us, [ 4 /*yield*/ , Xu(t) ];
18097
+ return e = Bs, [ 4 /*yield*/ , $u(t) ];
18087
18098
 
18088
18099
  case 1:
18089
18100
  return [ 2 /*return*/ , e.apply(void 0, [ n.sent(), a ]) ];
@@ -18092,12 +18103,12 @@ function ch(t) {
18092
18103
  }));
18093
18104
  }));
18094
18105
  };
18095
- }(Da(f), l, d, h);
18106
+ }(Na(f), l, d, h);
18096
18107
  }
18097
18108
 
18098
- function hh(t, e) {
18109
+ function fh(t, e) {
18099
18110
  return function(t, e) {
18100
- var i = this, o = new Vu(e);
18111
+ var i = this, o = new qu(e);
18101
18112
  return t.asyncQueue.enqueueAndForget((function() {
18102
18113
  return n(i, void 0, void 0, (function() {
18103
18114
  var e;
@@ -18109,7 +18120,7 @@ function hh(t, e) {
18109
18120
  // Immediately fire an initial event, indicating all existing listeners
18110
18121
  // are in-sync.
18111
18122
  e.next();
18112
- }, [ 4 /*yield*/ , Xu(t) ];
18123
+ }, [ 4 /*yield*/ , $u(t) ];
18113
18124
 
18114
18125
  case 1:
18115
18126
  return [ 2 /*return*/ , e.apply(void 0, [ n.sent(), o ]) ];
@@ -18125,7 +18136,7 @@ function hh(t, e) {
18125
18136
  case 0:
18126
18137
  return e = function(t, e) {
18127
18138
  W(t).io.delete(e);
18128
- }, [ 4 /*yield*/ , Xu(t) ];
18139
+ }, [ 4 /*yield*/ , $u(t) ];
18129
18140
 
18130
18141
  case 1:
18131
18142
  return [ 2 /*return*/ , e.apply(void 0, [ n.sent(), o ]) ];
@@ -18149,7 +18160,7 @@ function hh(t, e) {
18149
18160
  * been committed. For this reason, it is required that all reads are
18150
18161
  * performed before any writes. Transactions must be performed while online.
18151
18162
  */;
18152
- }(Da(t = aa(t, _a)), Ta(e) ? e : {
18163
+ }(Na(t = ca(t, Aa)), Ea(e) ? e : {
18153
18164
  next: e
18154
18165
  });
18155
18166
  }
@@ -18157,7 +18168,7 @@ function hh(t, e) {
18157
18168
  /**
18158
18169
  * Locally writes `mutations` on the async queue.
18159
18170
  * @internal
18160
- */ function fh(t, e) {
18171
+ */ function lh(t, e) {
18161
18172
  return function(t, e) {
18162
18173
  var i = this, o = new J;
18163
18174
  return t.asyncQueue.enqueueAndForget((function() {
@@ -18166,7 +18177,7 @@ function hh(t, e) {
18166
18177
  return r(this, (function(r) {
18167
18178
  switch (r.label) {
18168
18179
  case 0:
18169
- return n = iu, [ 4 /*yield*/ , Ju(t) ];
18180
+ return n = ou, [ 4 /*yield*/ , Xu(t) ];
18170
18181
 
18171
18182
  case 1:
18172
18183
  return [ 2 /*return*/ , n.apply(void 0, [ r.sent(), e, o ]) ];
@@ -18174,15 +18185,15 @@ function hh(t, e) {
18174
18185
  }));
18175
18186
  }));
18176
18187
  })), o.promise;
18177
- }(Da(t), e);
18188
+ }(Na(t), e);
18178
18189
  }
18179
18190
 
18180
18191
  /**
18181
18192
  * Converts a {@link ViewSnapshot} that contains the single document specified by `ref`
18182
18193
  * to a {@link DocumentSnapshot}.
18183
- */ function lh(t, e, n) {
18184
- var r = n.docs.get(e._key), i = new Zc(t);
18185
- return new Tc(t, i, e._key, r, new Ic(n.hasPendingWrites, n.fromCache), e.converter);
18194
+ */ function dh(t, e, n) {
18195
+ var r = n.docs.get(e._key), i = new th(t);
18196
+ return new Ec(t, i, e._key, r, new Tc(n.hasPendingWrites, n.fromCache), e.converter);
18186
18197
  }
18187
18198
 
18188
18199
  /**
@@ -18207,7 +18218,7 @@ function hh(t, e) {
18207
18218
  * The `Transaction` object passed to a transaction's `updateFunction` provides
18208
18219
  * the methods to read and write data within the transaction context. See
18209
18220
  * {@link runTransaction}.
18210
- */ var dh, ph = /** @class */ function(e) {
18221
+ */ var ph = /** @class */ function(e) {
18211
18222
  // This class implements the same logic as the Transaction API in the Lite SDK
18212
18223
  // but is subclassed in order to return its own DocumentSnapshot types.
18213
18224
  /** @hideconstructor */
@@ -18221,9 +18232,9 @@ function hh(t, e) {
18221
18232
  * @param documentRef - A reference to the document to be read.
18222
18233
  * @returns A `DocumentSnapshot` with the read data.
18223
18234
  */ return t(n, e), n.prototype.get = function(t) {
18224
- var n = this, r = Xc(t, this._firestore), i = new Zc(this._firestore);
18235
+ var n = this, r = $c(t, this._firestore), i = new th(this._firestore);
18225
18236
  return e.prototype.get.call(this, t).then((function(t) {
18226
- return new Tc(n._firestore, i, r._key, t._document, new Ic(
18237
+ return new Ec(n._firestore, i, r._key, t._document, new Tc(
18227
18238
  /* hasPendingWrites= */ !1,
18228
18239
  /* fromCache= */ !1), r.converter);
18229
18240
  }));
@@ -18231,7 +18242,7 @@ function hh(t, e) {
18231
18242
  }(/** @class */ function() {
18232
18243
  /** @hideconstructor */
18233
18244
  function t(t, e) {
18234
- this._firestore = t, this._transaction = e, this._dataReader = $a(t)
18245
+ this._firestore = t, this._transaction = e, this._dataReader = Za(t)
18235
18246
  /**
18236
18247
  * Reads the document referenced by the provided {@link DocumentReference}.
18237
18248
  *
@@ -18240,23 +18251,23 @@ function hh(t, e) {
18240
18251
  */;
18241
18252
  }
18242
18253
  return t.prototype.get = function(t) {
18243
- var e = this, n = Xc(t, this._firestore), r = new Yc(this._firestore);
18254
+ var e = this, n = $c(t, this._firestore), r = new Jc(this._firestore);
18244
18255
  return this._transaction.lookup([ n._key ]).then((function(t) {
18245
18256
  if (!t || 1 !== t.length) return G();
18246
18257
  var i = t[0];
18247
- if (i.isFoundDocument()) return new gc(e._firestore, r, i.key, i, n.converter);
18248
- if (i.isNoDocument()) return new gc(e._firestore, r, n._key, null, n.converter);
18258
+ if (i.isFoundDocument()) return new wc(e._firestore, r, i.key, i, n.converter);
18259
+ if (i.isNoDocument()) return new wc(e._firestore, r, n._key, null, n.converter);
18249
18260
  throw G();
18250
18261
  }));
18251
18262
  }, t.prototype.set = function(t, e, n) {
18252
- var r = Xc(t, this._firestore), i = Hc(r.converter, e, n), o = Za(this._dataReader, "Transaction.set", r._key, i, null !== r.converter, n);
18263
+ var r = $c(t, this._firestore), i = Yc(r.converter, e, n), o = tc(this._dataReader, "Transaction.set", r._key, i, null !== r.converter, n);
18253
18264
  return this._transaction.set(r._key, o), this;
18254
18265
  }, t.prototype.update = function(t, e, n) {
18255
18266
  for (var r = [], i = 3; i < arguments.length; i++) r[i - 3] = arguments[i];
18256
- var o, s = Xc(t, this._firestore);
18267
+ var o, s = $c(t, this._firestore);
18257
18268
  // For Compat types, we have to "extract" the underlying types before
18258
18269
  // performing validation.
18259
- return o = "string" == typeof (e = I(e)) || e instanceof Ba ? uc(this._dataReader, "Transaction.update", s._key, e, n, r) : sc(this._dataReader, "Transaction.update", s._key, e),
18270
+ return o = "string" == typeof (e = I(e)) || e instanceof ja ? ac(this._dataReader, "Transaction.update", s._key, e, n, r) : uc(this._dataReader, "Transaction.update", s._key, e),
18260
18271
  this._transaction.update(s._key, o), this;
18261
18272
  },
18262
18273
  /**
@@ -18266,7 +18277,7 @@ function hh(t, e) {
18266
18277
  * @returns This `Transaction` instance. Used for chaining method calls.
18267
18278
  */
18268
18279
  t.prototype.delete = function(t) {
18269
- var e = Xc(t, this._firestore);
18280
+ var e = $c(t, this._firestore);
18270
18281
  return this._transaction.delete(e._key), this;
18271
18282
  }, t;
18272
18283
  }());
@@ -18297,18 +18308,18 @@ function hh(t, e) {
18297
18308
  switch (r.label) {
18298
18309
  case 0:
18299
18310
  return [ 4 /*yield*/ , function(t) {
18300
- return Qu(t).then((function(t) {
18311
+ return Wu(t).then((function(t) {
18301
18312
  return t.datastore;
18302
18313
  }));
18303
18314
  }(t) ];
18304
18315
 
18305
18316
  case 1:
18306
- return n = r.sent(), new Bu(t.asyncQueue, n, e, o).run(), [ 2 /*return*/ ];
18317
+ return n = r.sent(), new ju(t.asyncQueue, n, e, o).run(), [ 2 /*return*/ ];
18307
18318
  }
18308
18319
  }));
18309
18320
  }));
18310
18321
  })), o.promise;
18311
- }(Da(t = aa(t, _a)), (function(n) {
18322
+ }(Na(t = ca(t, Aa)), (function(n) {
18312
18323
  return e(new ph(t, n));
18313
18324
  }));
18314
18325
  }
@@ -18333,14 +18344,14 @@ function hh(t, e) {
18333
18344
  * Returns a sentinel for use with {@link @firebase/firestore/lite#(updateDoc:1)} or
18334
18345
  * {@link @firebase/firestore/lite#(setDoc:1)} with `{merge: true}` to mark a field for deletion.
18335
18346
  */ function vh() {
18336
- return new tc("deleteField");
18347
+ return new ec("deleteField");
18337
18348
  }
18338
18349
 
18339
18350
  /**
18340
18351
  * Returns a sentinel used with {@link @firebase/firestore/lite#(setDoc:1)} or {@link @firebase/firestore/lite#(updateDoc:1)} to
18341
18352
  * include a server-generated timestamp in the written data.
18342
18353
  */ function mh() {
18343
- return new nc("serverTimestamp");
18354
+ return new rc("serverTimestamp");
18344
18355
  }
18345
18356
 
18346
18357
  /**
@@ -18358,7 +18369,7 @@ function hh(t, e) {
18358
18369
  for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
18359
18370
  // NOTE: We don't actually parse the data until it's used in set() or
18360
18371
  // update() since we'd need the Firestore instance to do this.
18361
- return new rc("arrayUnion", t);
18372
+ return new ic("arrayUnion", t);
18362
18373
  }
18363
18374
 
18364
18375
  /**
@@ -18375,7 +18386,7 @@ function hh(t, e) {
18375
18386
  for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
18376
18387
  // NOTE: We don't actually parse the data until it's used in set() or
18377
18388
  // update() since we'd need the Firestore instance to do this.
18378
- return new ic("arrayRemove", t);
18389
+ return new oc("arrayRemove", t);
18379
18390
  }
18380
18391
 
18381
18392
  /**
@@ -18397,7 +18408,7 @@ function hh(t, e) {
18397
18408
  * @returns The `FieldValue` sentinel for use in a call to `setDoc()` or
18398
18409
  * `updateDoc()`
18399
18410
  */ function bh(t) {
18400
- return new oc("increment", t);
18411
+ return new sc("increment", t);
18401
18412
  }
18402
18413
 
18403
18414
  /**
@@ -18427,24 +18438,76 @@ function hh(t, e) {
18427
18438
  * @returns A {@link WriteBatch} that can be used to atomically execute multiple
18428
18439
  * writes.
18429
18440
  */ function Ih(t) {
18430
- return Da(t = aa(t, _a)), new Jc(t, (function(e) {
18431
- return fh(t, e);
18441
+ return Na(t = ca(t, Aa)), new Xc(t, (function(e) {
18442
+ return lh(t, e);
18432
18443
  }))
18433
- /**
18434
- * Cloud Firestore
18444
+ /** An index component consisting of field path and index type. */;
18445
+ }
18446
+
18447
+ var Th, Eh = function(
18448
+ /** The field path of the component. */
18449
+ t,
18450
+ /** The fields sorting order. */
18451
+ e) {
18452
+ this.fieldPath = t, this.kind = e;
18453
+ };
18454
+
18455
+ /**
18456
+ * @license
18457
+ * Copyright 2021 Google LLC
18435
18458
  *
18436
- * @packageDocumentation
18437
- */;
18459
+ * Licensed under the Apache License, Version 2.0 (the "License");
18460
+ * you may not use this file except in compliance with the License.
18461
+ * You may obtain a copy of the License at
18462
+ *
18463
+ * http://www.apache.org/licenses/LICENSE-2.0
18464
+ *
18465
+ * Unless required by applicable law or agreed to in writing, software
18466
+ * distributed under the License is distributed on an "AS IS" BASIS,
18467
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18468
+ * See the License for the specific language governing permissions and
18469
+ * limitations under the License.
18470
+ */ function Sh(t, e) {
18471
+ Na(t = ca(t, Aa));
18472
+ var n = "string" == typeof e ? function(t) {
18473
+ try {
18474
+ return JSON.parse(t);
18475
+ } catch (t) {
18476
+ throw new Y(H.INVALID_ARGUMENT, "Failed to parse JSON:" + t.message);
18477
+ }
18478
+ }(e) : e;
18479
+ // PORTING NOTE: We don't return an error if the user has not enabled
18480
+ // persistence since `enableIndexeddbPersistence()` can fail on the Web.
18481
+ if (Array.isArray(n.indexes)) for (var r = 0, i = n.indexes; r < i.length; r++) {
18482
+ var o = i[r];
18483
+ _h(o, "collectionGroup");
18484
+ var s = [];
18485
+ if (Array.isArray(o.fields)) for (var u = 0, a = o.fields; u < a.length; u++) {
18486
+ var c = a[u], h = vc("setIndexConfiguration", _h(c, "fieldPath"));
18487
+ "CONTAINS" === c.arrayConfig ? s.push(new Eh(h, 2 /* CONTAINS */)) : "ASCENDING" === c.order ? s.push(new Eh(h, 0 /* ASCENDING */)) : "DESCENDING" === c.order && s.push(new Eh(h, 1 /* DESCENDING */));
18488
+ }
18489
+ }
18490
+ // TODO(indexing): Configure indexes
18491
+ return Promise.resolve();
18492
+ }
18493
+
18494
+ function _h(t, e) {
18495
+ if ("string" != typeof t[e]) throw new Y(H.INVALID_ARGUMENT, "Missing string value for: " + e);
18496
+ return t[e];
18438
18497
  }
18439
18498
 
18440
- void 0 === dh && (dh = !0), M = i, o(new c("firestore", (function(t, e) {
18441
- var n = e.options, r = t.getProvider("app").getImmediate(), i = new _a(r, new tt(t.getProvider("auth-internal")), new it(t.getProvider("app-check-internal")));
18499
+ /**
18500
+ * Cloud Firestore
18501
+ *
18502
+ * @packageDocumentation
18503
+ */ void 0 === Th && (Th = !0), M = i, o(new c("firestore", (function(t, e) {
18504
+ var n = e.options, r = t.getProvider("app").getImmediate(), i = new Aa(r, new tt(t.getProvider("auth-internal")), new it(t.getProvider("app-check-internal")));
18442
18505
  return n = Object.assign({
18443
- useFetchStreams: dh
18506
+ useFetchStreams: Th
18444
18507
  }, n), i._setSettings(n), i;
18445
- }), "PUBLIC")), s(P, "3.4.3", void 0),
18508
+ }), "PUBLIC")), s(P, "3.4.4-202202622812", void 0),
18446
18509
  // BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation
18447
- s(P, "3.4.3", "esm5");
18510
+ s(P, "3.4.4-202202622812", "esm5");
18448
18511
 
18449
- export { Wc as AbstractUserDataWriter, Ka as Bytes, Sa as CACHE_SIZE_UNLIMITED, ya as CollectionReference, da as DocumentReference, Tc as DocumentSnapshot, Ba as FieldPath, Ga as FieldValue, _a as Firestore, Y as FirestoreError, za as GeoPoint, Ea as LoadBundleTask, pa as Query, Dc as QueryConstraint, Ec as QueryDocumentSnapshot, Sc as QuerySnapshot, Ic as SnapshotMetadata, lt as Timestamp, ph as Transaction, Jc as WriteBatch, ea as _DatabaseId, Pt as _DocumentKey, ot as _EmptyAppCheckTokenProvider, $ as _EmptyAuthCredentialsProvider, bt as _FieldPath, aa as _cast, Q as _debugAssert, Tt as _isBase64Available, j as _logWarn, ia as _validateIsNotUsedTogether, ah as addDoc, wh as arrayRemove, gh as arrayUnion, La as clearIndexedDbPersistence, va as collection, ma as collectionGroup, la as connectFirestoreEmulator, uh as deleteDoc, vh as deleteField, Ma as disableNetwork, ga as doc, ja as documentId, Ca as enableIndexedDbPersistence, xa as enableMultiTabIndexedDbPersistence, Oa as enableNetwork, jc as endAt, Bc as endBefore, Da as ensureFirestoreConfigured, fh as executeWrite, $c as getDoc, th as getDocFromCache, eh as getDocFromServer, nh as getDocs, rh as getDocsFromCache, ih as getDocsFromServer, ka as getFirestore, bh as increment, Aa as initializeFirestore, Oc as limit, Mc as limitToLast, Va as loadBundle, qa as namedQuery, ch as onSnapshot, hh as onSnapshotsInSync, Lc as orderBy, Nc as query, ba as queryEqual, wa as refEqual, yh as runTransaction, mh as serverTimestamp, oh as setDoc, q as setLogLevel, Ac as snapshotEqual, qc as startAfter, Vc as startAt, Fa as terminate, sh as updateDoc, Pa as waitForPendingWrites, xc as where, Ih as writeBatch };
18512
+ export { Hc as AbstractUserDataWriter, Ga as Bytes, _a as CACHE_SIZE_UNLIMITED, va as CollectionReference, pa as DocumentReference, Ec as DocumentSnapshot, ja as FieldPath, za as FieldValue, Aa as Firestore, Y as FirestoreError, Qa as GeoPoint, Sa as LoadBundleTask, ya as Query, Nc as QueryConstraint, Sc as QueryDocumentSnapshot, _c as QuerySnapshot, Tc as SnapshotMetadata, lt as Timestamp, ph as Transaction, Xc as WriteBatch, na as _DatabaseId, Pt as _DocumentKey, ot as _EmptyAppCheckTokenProvider, $ as _EmptyAuthCredentialsProvider, bt as _FieldPath, ca as _cast, Q as _debugAssert, Tt as _isBase64Available, j as _logWarn, Sh as _setIndexConfiguration, oa as _validateIsNotUsedTogether, ch as addDoc, wh as arrayRemove, gh as arrayUnion, Pa as clearIndexedDbPersistence, ma as collection, ga as collectionGroup, da as connectFirestoreEmulator, ah as deleteDoc, vh as deleteField, Fa as disableNetwork, wa as doc, Ka as documentId, xa as enableIndexedDbPersistence, Ra as enableMultiTabIndexedDbPersistence, Ma as enableNetwork, Kc as endAt, jc as endBefore, Na as ensureFirestoreConfigured, lh as executeWrite, Zc as getDoc, eh as getDocFromCache, nh as getDocFromServer, rh as getDocs, ih as getDocsFromCache, oh as getDocsFromServer, Da as getFirestore, bh as increment, ka as initializeFirestore, Mc as limit, Fc as limitToLast, qa as loadBundle, Ua as namedQuery, hh as onSnapshot, fh as onSnapshotsInSync, Pc as orderBy, Cc as query, Ia as queryEqual, ba as refEqual, yh as runTransaction, mh as serverTimestamp, sh as setDoc, q as setLogLevel, kc as snapshotEqual, Uc as startAfter, qc as startAt, Va as terminate, uh as updateDoc, Oa as waitForPendingWrites, Rc as where, Ih as writeBatch };
18450
18513
  //# sourceMappingURL=index.esm5.js.map