@firebase/firestore 3.7.3-canary.3bd031691 → 3.7.3-canary.734fdcd91

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 (42) hide show
  1. package/dist/firestore/src/local/local_documents_view.d.ts +0 -2
  2. package/dist/firestore/src/model/document.d.ts +8 -1
  3. package/dist/firestore/test/unit/specs/spec_test_runner.d.ts +1 -0
  4. package/dist/firestore/test/util/helpers.d.ts +1 -1
  5. package/dist/index.esm2017.js +45 -29
  6. package/dist/index.esm2017.js.map +1 -1
  7. package/dist/index.esm5.js +242 -226
  8. package/dist/index.esm5.js.map +1 -1
  9. package/dist/index.node.cjs.js +54 -21
  10. package/dist/index.node.cjs.js.map +1 -1
  11. package/dist/index.node.mjs +54 -21
  12. package/dist/index.node.mjs.map +1 -1
  13. package/dist/index.rn.js +45 -29
  14. package/dist/index.rn.js.map +1 -1
  15. package/dist/internal.d.ts +8 -3
  16. package/dist/lite/firestore/src/local/local_documents_view.d.ts +0 -2
  17. package/dist/lite/firestore/src/model/document.d.ts +8 -1
  18. package/dist/lite/firestore/test/unit/specs/spec_test_runner.d.ts +1 -0
  19. package/dist/lite/firestore/test/util/helpers.d.ts +1 -1
  20. package/dist/lite/index.browser.esm2017.js +116 -98
  21. package/dist/lite/index.browser.esm2017.js.map +1 -1
  22. package/dist/lite/index.browser.esm5.js +104 -86
  23. package/dist/lite/index.browser.esm5.js.map +1 -1
  24. package/dist/lite/index.node.cjs.js +44 -11
  25. package/dist/lite/index.node.cjs.js.map +1 -1
  26. package/dist/lite/index.node.mjs +44 -11
  27. package/dist/lite/index.node.mjs.map +1 -1
  28. package/dist/lite/index.rn.esm2017.js +109 -91
  29. package/dist/lite/index.rn.esm2017.js.map +1 -1
  30. package/dist/lite/internal.d.ts +8 -1
  31. package/dist/lite/packages/firestore/dist/lite/index.browser.esm2017.d.ts +17 -17
  32. package/dist/lite/packages/firestore/src/local/local_documents_view.d.ts +0 -2
  33. package/dist/lite/packages/firestore/src/model/document.d.ts +8 -1
  34. package/dist/lite/packages/firestore/test/unit/specs/spec_test_runner.d.ts +1 -0
  35. package/dist/lite/packages/firestore/test/util/helpers.d.ts +1 -1
  36. package/dist/lite/private.d.ts +8 -1
  37. package/dist/packages/firestore/src/local/local_documents_view.d.ts +0 -2
  38. package/dist/packages/firestore/src/model/document.d.ts +8 -1
  39. package/dist/packages/firestore/test/unit/specs/spec_test_runner.d.ts +1 -0
  40. package/dist/packages/firestore/test/util/helpers.d.ts +1 -1
  41. package/dist/private.d.ts +8 -3
  42. package/package.json +9 -9
@@ -8,9 +8,9 @@ import { Logger as l, LogLevel as h } from "@firebase/logger";
8
8
 
9
9
  import { FirebaseError as f, getUA as d, isSafari as p, getModularInstance as y, isIndexedDBAvailable as v, createMockUserToken as m, deepEqual as g, getDefaultEmulatorHostnameAndPort as w } from "@firebase/util";
10
10
 
11
- import { XhrIo as b, EventType as I, ErrorCode as E, createWebChannelTransport as T, getStatEventTarget as S, FetchXmlHttpFactory as _, WebChannel as D, Event as x, Stat as A } from "@firebase/webchannel-wrapper";
11
+ import { XhrIo as b, EventType as I, ErrorCode as T, createWebChannelTransport as E, getStatEventTarget as S, FetchXmlHttpFactory as _, WebChannel as D, Event as x, Stat as A } from "@firebase/webchannel-wrapper";
12
12
 
13
- var N = "@firebase/firestore", C = /** @class */ function() {
13
+ var C = "@firebase/firestore", N = /** @class */ function() {
14
14
  function t(t) {
15
15
  this.uid = t;
16
16
  }
@@ -48,11 +48,11 @@ var N = "@firebase/firestore", C = /** @class */ function() {
48
48
  * Simple wrapper around a nullable UID. Mostly exists to make code more
49
49
  * readable.
50
50
  */
51
- /** A user with a null UID. */ C.UNAUTHENTICATED = new C(null),
51
+ /** A user with a null UID. */ N.UNAUTHENTICATED = new N(null),
52
52
  // TODO(mikelehen): Look into getting a proper uid-equivalent for
53
53
  // non-FirebaseAuth providers.
54
- C.GOOGLE_CREDENTIALS = new C("google-credentials-uid"), C.FIRST_PARTY = new C("first-party-uid"),
55
- C.MOCK_USER = new C("mock-user");
54
+ N.GOOGLE_CREDENTIALS = new N("google-credentials-uid"), N.FIRST_PARTY = new N("first-party-uid"),
55
+ N.MOCK_USER = new N("mock-user");
56
56
 
57
57
  /**
58
58
  * @license
@@ -70,7 +70,7 @@ C.MOCK_USER = new C("mock-user");
70
70
  * See the License for the specific language governing permissions and
71
71
  * limitations under the License.
72
72
  */
73
- var k = "9.14.0-canary.3bd031691", F = new l("@firebase/firestore");
73
+ var k = "9.14.0-canary.734fdcd91", F = new l("@firebase/firestore");
74
74
 
75
75
  /**
76
76
  * @license
@@ -391,7 +391,7 @@ e) {
391
391
  }, t.prototype.invalidateToken = function() {}, t.prototype.start = function(t, e) {
392
392
  // Fire with initial user.
393
393
  t.enqueueRetryable((function() {
394
- return e(C.UNAUTHENTICATED);
394
+ return e(N.UNAUTHENTICATED);
395
395
  }));
396
396
  }, t.prototype.shutdown = function() {}, t;
397
397
  }(), H = /** @class */ function() {
@@ -420,7 +420,7 @@ e) {
420
420
  function t(t) {
421
421
  this.t = t,
422
422
  /** Tracks the current User. */
423
- this.currentUser = C.UNAUTHENTICATED,
423
+ this.currentUser = N.UNAUTHENTICATED,
424
424
  /**
425
425
  * Counter used to detect if the token changed while a getToken request was
426
426
  * outstanding.
@@ -497,11 +497,11 @@ e) {
497
497
  // to guarantee to get the actual user.
498
498
  t.prototype.u = function() {
499
499
  var t = this.auth && this.auth.getUid();
500
- return U(null === t || "string" == typeof t), new C(t);
500
+ return U(null === t || "string" == typeof t), new N(t);
501
501
  }, t;
502
502
  }(), X = /** @class */ function() {
503
503
  function t(t, e, n, r) {
504
- this.h = t, this.l = e, this.m = n, this.g = r, this.type = "FirstParty", this.user = C.FIRST_PARTY,
504
+ this.h = t, this.l = e, this.m = n, this.g = r, this.type = "FirstParty", this.user = N.FIRST_PARTY,
505
505
  this.p = new Map
506
506
  /** Gets an authorization token, using a provided factory function, or falling back to First Party GAPI. */;
507
507
  }
@@ -530,7 +530,7 @@ e) {
530
530
  }, t.prototype.start = function(t, e) {
531
531
  // Fire with initial uid.
532
532
  t.enqueueRetryable((function() {
533
- return e(C.FIRST_PARTY);
533
+ return e(N.FIRST_PARTY);
534
534
  }));
535
535
  }, t.prototype.shutdown = function() {}, t.prototype.invalidateToken = function() {},
536
536
  t;
@@ -1128,7 +1128,7 @@ function gt(t, e) {
1128
1128
  /** The state of an index that has not yet been backfilled. */;
1129
1129
  }
1130
1130
  return t.empty = function() {
1131
- return new t(0, Et.min());
1131
+ return new t(0, Tt.min());
1132
1132
  }, t;
1133
1133
  }();
1134
1134
 
@@ -1143,17 +1143,17 @@ function gt(t, e) {
1143
1143
  // `(readTime + 1, DocumentKey.empty())` since `> DocumentKey.empty()` matches
1144
1144
  // all valid document IDs.
1145
1145
  var n = t.toTimestamp().seconds, r = t.toTimestamp().nanoseconds + 1, i = at.fromTimestamp(1e9 === r ? new ut(n + 1, 0) : new ut(n, r));
1146
- return new Et(i, ft.empty(), e);
1146
+ return new Tt(i, ft.empty(), e);
1147
1147
  }
1148
1148
 
1149
1149
  /** Creates a new offset based on the provided document. */ function It(t) {
1150
- return new Et(t.readTime, t.key, -1);
1150
+ return new Tt(t.readTime, t.key, -1);
1151
1151
  }
1152
1152
 
1153
1153
  /**
1154
1154
  * Stores the latest read time, document and batch ID that were processed for an
1155
1155
  * index.
1156
- */ var Et = /** @class */ function() {
1156
+ */ var Tt = /** @class */ function() {
1157
1157
  function t(
1158
1158
  /**
1159
1159
  * The latest read time version that has been indexed by Firestore for this
@@ -1180,7 +1180,7 @@ function gt(t, e) {
1180
1180
  }, t;
1181
1181
  }();
1182
1182
 
1183
- function Tt(t, e) {
1183
+ function Et(t, e) {
1184
1184
  var n = t.readTime.compareTo(e.readTime);
1185
1185
  return 0 !== n ? n : 0 !== (n = ft.comparator(t.documentKey, e.documentKey)) ? n : rt(t.largestBatchId, e.largestBatchId);
1186
1186
  }
@@ -1460,7 +1460,7 @@ function Dt(t) {
1460
1460
  var e = this.transaction.objectStore(t);
1461
1461
  return new Ot(e);
1462
1462
  }, t;
1463
- }(), Nt = /** @class */ function() {
1463
+ }(), Ct = /** @class */ function() {
1464
1464
  /*
1465
1465
  * Creates a new SimpleDb wrapper for IndexedDb database `name`.
1466
1466
  *
@@ -1642,7 +1642,7 @@ function Dt(t) {
1642
1642
  }, t.prototype.close = function() {
1643
1643
  this.db && this.db.close(), this.db = void 0;
1644
1644
  }, t;
1645
- }(), Ct = /** @class */ function() {
1645
+ }(), Nt = /** @class */ function() {
1646
1646
  function t(t) {
1647
1647
  this.q = t, this.U = !1, this.K = null;
1648
1648
  }
@@ -1854,7 +1854,7 @@ function Dt(t) {
1854
1854
  }, t.onsuccess = function(t) {
1855
1855
  var i = t.target.result;
1856
1856
  if (i) {
1857
- var o = new Ct(i), u = e(i.primaryKey, i.value, o);
1857
+ var o = new Nt(i), u = e(i.primaryKey, i.value, o);
1858
1858
  if (u instanceof xt) {
1859
1859
  var a = u.catch((function(t) {
1860
1860
  return o.done(), xt.reject(t);
@@ -1902,7 +1902,7 @@ function Dt(t) {
1902
1902
  var Vt = !1;
1903
1903
 
1904
1904
  function Mt(t) {
1905
- var e = Nt.D(d());
1905
+ var e = Ct.D(d());
1906
1906
  if (e >= 12.2 && e < 13) {
1907
1907
  var n = "An internal error was encountered in the Indexed Database server";
1908
1908
  if (t.message.indexOf(n) >= 0) {
@@ -2035,8 +2035,8 @@ function Mt(t) {
2035
2035
  var n = t;
2036
2036
  return e.changes.forEach((function(t, e) {
2037
2037
  var r = It(e);
2038
- Tt(r, n) > 0 && (n = r);
2039
- })), new Et(n.readTime, n.documentKey, Math.max(e.batchId, t.largestBatchId));
2038
+ Et(r, n) > 0 && (n = r);
2039
+ })), new Tt(n.readTime, n.documentKey, Math.max(e.batchId, t.largestBatchId));
2040
2040
  }, t;
2041
2041
  }(), qt = /** @class */ function() {
2042
2042
  function t(t, e) {
@@ -2709,12 +2709,12 @@ function fe(t, e) {
2709
2709
  } : "mapValue" in t ? re : q();
2710
2710
  }
2711
2711
 
2712
- function Ee(t, e) {
2712
+ function Te(t, e) {
2713
2713
  var n = se(t.value, e.value);
2714
2714
  return 0 !== n ? n : t.inclusive && !e.inclusive ? -1 : !t.inclusive && e.inclusive ? 1 : 0;
2715
2715
  }
2716
2716
 
2717
- function Te(t, e) {
2717
+ function Ee(t, e) {
2718
2718
  var n = se(t.value, e.value);
2719
2719
  return 0 !== n ? n : t.inclusive && !e.inclusive ? 1 : !t.inclusive && e.inclusive ? -1 : 0;
2720
2720
  }
@@ -2835,7 +2835,7 @@ function _e(t, e, n) {
2835
2835
  }, n.prototype.getFirstInequalityField = function() {
2836
2836
  return this.isInequality() ? this.field : null;
2837
2837
  }, n;
2838
- }(xe), Ne = /** @class */ function(e) {
2838
+ }(xe), Ce = /** @class */ function(e) {
2839
2839
  function n(t, n) {
2840
2840
  var r = this;
2841
2841
  return (r = e.call(this) || this).filters = t, r.op = n, r.ht = null, r;
@@ -2845,7 +2845,7 @@ function _e(t, e, n) {
2845
2845
  */ return t(n, e), n.create = function(t, e) {
2846
2846
  return new n(t, e);
2847
2847
  }, n.prototype.matches = function(t) {
2848
- return Ce(this) ? void 0 === this.filters.find((function(e) {
2848
+ return Ne(this) ? void 0 === this.filters.find((function(e) {
2849
2849
  return !e.matches(t);
2850
2850
  })) : void 0 !== this.filters.find((function(e) {
2851
2851
  return e.matches(t);
@@ -2876,7 +2876,7 @@ function _e(t, e, n) {
2876
2876
  }, n;
2877
2877
  }(xe);
2878
2878
 
2879
- function Ce(t) {
2879
+ function Ne(t) {
2880
2880
  return "and" /* CompositeOperator.AND */ === t.op;
2881
2881
  }
2882
2882
 
@@ -2887,14 +2887,14 @@ function ke(t) {
2887
2887
  /**
2888
2888
  * Returns true if this filter is a conjunction of field filters only. Returns false otherwise.
2889
2889
  */ function Fe(t) {
2890
- return Oe(t) && Ce(t);
2890
+ return Oe(t) && Ne(t);
2891
2891
  }
2892
2892
 
2893
2893
  /**
2894
2894
  * Returns true if this filter does not contain any composite filters. Returns false otherwise.
2895
2895
  */ function Oe(t) {
2896
2896
  for (var e = 0, n = t.filters; e < n.length; e++) {
2897
- if (n[e] instanceof Ne) return !1;
2897
+ if (n[e] instanceof Ce) return !1;
2898
2898
  }
2899
2899
  return !0;
2900
2900
  }
@@ -2915,8 +2915,8 @@ function Re(t) {
2915
2915
  function Ve(t, e) {
2916
2916
  return t instanceof Ae ? function(t, e) {
2917
2917
  return e instanceof Ae && t.op === e.op && t.field.isEqual(e.field) && ue(t.value, e.value);
2918
- }(t, e) : t instanceof Ne ? function(t, e) {
2919
- return e instanceof Ne && t.op === e.op && t.filters.length === e.filters.length && t.filters.reduce((function(t, n, r) {
2918
+ }(t, e) : t instanceof Ce ? function(t, e) {
2919
+ return e instanceof Ce && t.op === e.op && t.filters.length === e.filters.length && t.filters.reduce((function(t, n, r) {
2920
2920
  return t && Ve(n, e.filters[r]);
2921
2921
  }), !0);
2922
2922
  }(t, e) : void q();
@@ -2924,13 +2924,13 @@ function Ve(t, e) {
2924
2924
 
2925
2925
  function Me(t, e) {
2926
2926
  var n = t.filters.concat(e);
2927
- return Ne.create(n, t.op);
2927
+ return Ce.create(n, t.op);
2928
2928
  }
2929
2929
 
2930
2930
  /** Returns a debug description for `filter`. */ function Le(t) {
2931
2931
  return t instanceof Ae ? function(t) {
2932
2932
  return "".concat(t.field.canonicalString(), " ").concat(t.op, " ").concat(le(t.value));
2933
- }(t) : t instanceof Ne ? function(t) {
2933
+ }(t) : t instanceof Ce ? function(t) {
2934
2934
  return t.op.toString() + " {" + t.getFilters().map(Le).join(" ,") + "}";
2935
2935
  }(t) : "Filter";
2936
2936
  }
@@ -3709,26 +3709,35 @@ function nn(t) {
3709
3709
  }
3710
3710
 
3711
3711
  var rn = /** @class */ function() {
3712
- function t(t, e, n, r, i, o) {
3713
- this.key = t, this.documentType = e, this.version = n, this.readTime = r, this.data = i,
3714
- this.documentState = o
3712
+ function t(t, e, n, r, i, o, u) {
3713
+ this.key = t, this.documentType = e, this.version = n, this.readTime = r, this.createTime = i,
3714
+ this.data = o, this.documentState = u
3715
3715
  /**
3716
3716
  * Creates a document with no known version or data, but which can serve as
3717
3717
  * base document for mutations.
3718
3718
  */;
3719
3719
  }
3720
3720
  return t.newInvalidDocument = function(e) {
3721
- return new t(e, 0 /* DocumentType.INVALID */ , at.min(), at.min(), en.empty(), 0 /* DocumentState.SYNCED */);
3721
+ return new t(e, 0 /* DocumentType.INVALID */ ,
3722
+ /* version */ at.min(),
3723
+ /* readTime */ at.min(),
3724
+ /* createTime */ at.min(), en.empty(), 0 /* DocumentState.SYNCED */);
3722
3725
  },
3723
3726
  /**
3724
3727
  * Creates a new document that is known to exist with the given data at the
3725
3728
  * given version.
3726
3729
  */
3727
- t.newFoundDocument = function(e, n, r) {
3728
- return new t(e, 1 /* DocumentType.FOUND_DOCUMENT */ , n, at.min(), r, 0 /* DocumentState.SYNCED */);
3730
+ t.newFoundDocument = function(e, n, r, i) {
3731
+ return new t(e, 1 /* DocumentType.FOUND_DOCUMENT */ ,
3732
+ /* version */ n,
3733
+ /* readTime */ at.min(),
3734
+ /* createTime */ r, i, 0 /* DocumentState.SYNCED */);
3729
3735
  },
3730
3736
  /** Creates a new document that is known to not exist at the given version. */ t.newNoDocument = function(e, n) {
3731
- return new t(e, 2 /* DocumentType.NO_DOCUMENT */ , n, at.min(), en.empty(), 0 /* DocumentState.SYNCED */);
3737
+ return new t(e, 2 /* DocumentType.NO_DOCUMENT */ ,
3738
+ /* version */ n,
3739
+ /* readTime */ at.min(),
3740
+ /* createTime */ at.min(), en.empty(), 0 /* DocumentState.SYNCED */);
3732
3741
  },
3733
3742
  /**
3734
3743
  * Creates a new document that is known to exist at the given version but
@@ -3736,15 +3745,24 @@ var rn = /** @class */ function() {
3736
3745
  * base document).
3737
3746
  */
3738
3747
  t.newUnknownDocument = function(e, n) {
3739
- return new t(e, 3 /* DocumentType.UNKNOWN_DOCUMENT */ , n, at.min(), en.empty(), 2 /* DocumentState.HAS_COMMITTED_MUTATIONS */);
3748
+ return new t(e, 3 /* DocumentType.UNKNOWN_DOCUMENT */ ,
3749
+ /* version */ n,
3750
+ /* readTime */ at.min(),
3751
+ /* createTime */ at.min(), en.empty(), 2 /* DocumentState.HAS_COMMITTED_MUTATIONS */);
3740
3752
  },
3741
3753
  /**
3742
3754
  * Changes the document type to indicate that it exists and that its version
3743
3755
  * and data are known.
3744
3756
  */
3745
3757
  t.prototype.convertToFoundDocument = function(t, e) {
3746
- return this.version = t, this.documentType = 1 /* DocumentType.FOUND_DOCUMENT */ ,
3747
- this.data = e, this.documentState = 0 /* DocumentState.SYNCED */ , this;
3758
+ // If a document is switching state from being an invalid or deleted
3759
+ // document to a valid (FOUND_DOCUMENT) document, either due to receiving an
3760
+ // update from Watch or due to applying a local set mutation on top
3761
+ // of a deleted document, our best guess about its createTime would be the
3762
+ // version at which the document transitioned to a FOUND_DOCUMENT.
3763
+ return !this.createTime.isEqual(at.min()) || 2 /* DocumentType.NO_DOCUMENT */ !== this.documentType && 0 /* DocumentType.INVALID */ !== this.documentType || (this.createTime = t),
3764
+ this.version = t, this.documentType = 1 /* DocumentType.FOUND_DOCUMENT */ , this.data = e,
3765
+ this.documentState = 0 /* DocumentState.SYNCED */ , this;
3748
3766
  },
3749
3767
  /**
3750
3768
  * Changes the document type to indicate that it doesn't exist at the given
@@ -3799,9 +3817,9 @@ var rn = /** @class */ function() {
3799
3817
  }, t.prototype.isEqual = function(e) {
3800
3818
  return e instanceof t && this.key.isEqual(e.key) && this.version.isEqual(e.version) && this.documentType === e.documentType && this.documentState === e.documentState && this.data.isEqual(e.data);
3801
3819
  }, t.prototype.mutableCopy = function() {
3802
- return new t(this.key, this.documentType, this.version, this.readTime, this.data.clone(), this.documentState);
3820
+ return new t(this.key, this.documentType, this.version, this.readTime, this.createTime, this.data.clone(), this.documentState);
3803
3821
  }, t.prototype.toString = function() {
3804
- return "Document(".concat(this.key, ", ").concat(this.version, ", ").concat(JSON.stringify(this.data.value), ", {documentType: ").concat(this.documentType, "}), {documentState: ").concat(this.documentState, "})");
3822
+ return "Document(".concat(this.key, ", ").concat(this.version, ", ").concat(JSON.stringify(this.data.value), ", {createTime: ").concat(this.createTime, "}), {documentType: ").concat(this.documentType, "}), {documentState: ").concat(this.documentState, "})");
3805
3823
  }, t;
3806
3824
  }(), on = function(t, e, n, r, i, o, u) {
3807
3825
  void 0 === e && (e = null), void 0 === n && (n = []), void 0 === r && (r = []),
@@ -3917,7 +3935,7 @@ function cn(t) {
3917
3935
  s = ie;
3918
3936
  // Remaining filters cannot be used as lower bounds.
3919
3937
  }
3920
- Ee({
3938
+ Te({
3921
3939
  value: r,
3922
3940
  inclusive: i
3923
3941
  }, {
@@ -3929,7 +3947,7 @@ function cn(t) {
3929
3947
  // range to see if we can narrow the scope.
3930
3948
  if (null !== n) for (var l = 0; l < t.orderBy.length; ++l) if (t.orderBy[l].field.isEqual(e)) {
3931
3949
  var h = n.position[l];
3932
- Ee({
3950
+ Te({
3933
3951
  value: r,
3934
3952
  inclusive: i
3935
3953
  }, {
@@ -3972,7 +3990,7 @@ function cn(t) {
3972
3990
  s = re;
3973
3991
  // Remaining filters cannot be used as upper bounds.
3974
3992
  }
3975
- Te({
3993
+ Ee({
3976
3994
  value: r,
3977
3995
  inclusive: i
3978
3996
  }, {
@@ -3984,7 +4002,7 @@ function cn(t) {
3984
4002
  // range to see if we can narrow the scope.
3985
4003
  if (null !== n) for (var l = 0; l < t.orderBy.length; ++l) if (t.orderBy[l].field.isEqual(e)) {
3986
4004
  var h = n.position[l];
3987
- Te({
4005
+ Ee({
3988
4006
  value: r,
3989
4007
  inclusive: i
3990
4008
  }, {
@@ -4129,13 +4147,13 @@ function gn(t) {
4129
4147
  return e._t;
4130
4148
  }
4131
4149
 
4132
- function En(t, e) {
4150
+ function Tn(t, e) {
4133
4151
  e.getFirstInequalityField(), gn(t);
4134
4152
  var n = t.filters.concat([ e ]);
4135
4153
  return new dn(t.path, t.collectionGroup, t.explicitOrderBy.slice(), n, t.limit, t.limitType, t.startAt, t.endAt);
4136
4154
  }
4137
4155
 
4138
- function Tn(t, e, n) {
4156
+ function En(t, e, n) {
4139
4157
  return new dn(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), e, n, t.startAt, t.endAt);
4140
4158
  }
4141
4159
 
@@ -4215,10 +4233,10 @@ function An(t) {
4215
4233
  /**
4216
4234
  * Returns a new comparator function that can be used to compare two documents
4217
4235
  * based on the Query's ordering constraint.
4218
- */ function Nn(t) {
4236
+ */ function Cn(t) {
4219
4237
  return function(e, n) {
4220
4238
  for (var r = !1, i = 0, o = bn(t); i < o.length; i++) {
4221
- var u = o[i], a = Cn(u, e, n);
4239
+ var u = o[i], a = Nn(u, e, n);
4222
4240
  if (0 !== a) return a;
4223
4241
  r = r || u.field.isKeyField();
4224
4242
  }
@@ -4226,7 +4244,7 @@ function An(t) {
4226
4244
  };
4227
4245
  }
4228
4246
 
4229
- function Cn(t, e, n) {
4247
+ function Nn(t, e, n) {
4230
4248
  var r = t.field.isKeyField() ? ft.comparator(e.key, n.key) : function(t, e, n) {
4231
4249
  var r = e.data.field(t), i = n.data.field(t);
4232
4250
  return null !== r && null !== i ? se(r, i) : q();
@@ -5048,14 +5066,14 @@ function wr(t) {
5048
5066
  }
5049
5067
 
5050
5068
  function br() {
5051
- return Er();
5069
+ return Tr();
5052
5070
  }
5053
5071
 
5054
5072
  function Ir() {
5055
- return Er();
5073
+ return Tr();
5056
5074
  }
5057
5075
 
5058
- function Er() {
5076
+ function Tr() {
5059
5077
  return new pr((function(t) {
5060
5078
  return t.toString();
5061
5079
  }), (function(t, e) {
@@ -5063,7 +5081,7 @@ function Er() {
5063
5081
  }));
5064
5082
  }
5065
5083
 
5066
- var Tr = new He(ft.comparator), Sr = new Ze(ft.comparator);
5084
+ var Er = new He(ft.comparator), Sr = new Ze(ft.comparator);
5067
5085
 
5068
5086
  function _r() {
5069
5087
  for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
@@ -5136,9 +5154,9 @@ function xr() {
5136
5154
  // PORTING NOTE: Multi-tab only
5137
5155
  return t.createSynthesizedRemoteEventForCurrentChange = function(e, n, r) {
5138
5156
  var i = new Map;
5139
- return i.set(e, Nr.createSynthesizedTargetChangeForCurrentChange(e, n, r)), new t(at.min(), i, xr(), vr(), _r());
5157
+ return i.set(e, Cr.createSynthesizedTargetChangeForCurrentChange(e, n, r)), new t(at.min(), i, xr(), vr(), _r());
5140
5158
  }, t;
5141
- }(), Nr = /** @class */ function() {
5159
+ }(), Cr = /** @class */ function() {
5142
5160
  function t(
5143
5161
  /**
5144
5162
  * An opaque, server-assigned token that allows watching a query to be resumed
@@ -5179,7 +5197,7 @@ function xr() {
5179
5197
  return t.createSynthesizedTargetChangeForCurrentChange = function(e, n, r) {
5180
5198
  return new t(r, n, _r(), _r(), _r());
5181
5199
  }, t;
5182
- }(), Cr = function(
5200
+ }(), Nr = function(
5183
5201
  /** The new document applies to all of these targets. */
5184
5202
  t,
5185
5203
  /** The new document is removed from all of these targets. */
@@ -5297,7 +5315,7 @@ n
5297
5315
  default:
5298
5316
  q();
5299
5317
  }
5300
- })), new Nr(this.bt, this.Pt, t, e, n);
5318
+ })), new Cr(this.bt, this.Pt, t, e, n);
5301
5319
  },
5302
5320
  /**
5303
5321
  * Resets the document changes and sets `hasPendingChanges` to false.
@@ -5701,12 +5719,12 @@ function $r(t, e, n) {
5701
5719
  }
5702
5720
 
5703
5721
  function ti(t, e, n) {
5704
- var r = Hr(t, e.name), i = jr(e.updateTime), o = new en({
5722
+ var r = Hr(t, e.name), i = jr(e.updateTime), o = e.createTime ? jr(e.createTime) : at.min(), u = new en({
5705
5723
  mapValue: {
5706
5724
  fields: e.fields
5707
5725
  }
5708
- }), u = rn.newFoundDocument(r, i, o);
5709
- return n && u.setHasCommittedMutations(), n ? u.setHasCommittedMutations() : u;
5726
+ }), a = rn.newFoundDocument(r, i, o, u);
5727
+ return n && a.setHasCommittedMutations(), n ? a.setHasCommittedMutations() : a;
5710
5728
  }
5711
5729
 
5712
5730
  function ei(t, e) {
@@ -5822,7 +5840,7 @@ function ii(t, e) {
5822
5840
  collectionId: r.lastSegment()
5823
5841
  } ]);
5824
5842
  var i = function(t) {
5825
- if (0 !== t.length) return fi(Ne.create(t, "and" /* CompositeOperator.AND */));
5843
+ if (0 !== t.length) return fi(Ce.create(t, "and" /* CompositeOperator.AND */));
5826
5844
  }(e.filters);
5827
5845
  i && (n.structuredQuery.where = i);
5828
5846
  var o = function(t) {
@@ -5863,7 +5881,7 @@ function oi(t) {
5863
5881
  var u = [];
5864
5882
  n.where && (u = function(t) {
5865
5883
  var e = ui(t);
5866
- return e instanceof Ne && Fe(e) ? e.getFilters() : [ e ];
5884
+ return e instanceof Ce && Fe(e) ? e.getFilters() : [ e ];
5867
5885
  }(n.where));
5868
5886
  var a = [];
5869
5887
  n.orderBy && (a = n.orderBy.map((function(t) {
@@ -5969,7 +5987,7 @@ function ui(t) {
5969
5987
  }
5970
5988
  }(t.fieldFilter.op), t.fieldFilter.value);
5971
5989
  }(t) : void 0 !== t.compositeFilter ? function(t) {
5972
- return Ne.create(t.compositeFilter.filters.map((function(t) {
5990
+ return Ce.create(t.compositeFilter.filters.map((function(t) {
5973
5991
  return ui(t);
5974
5992
  })), function(t) {
5975
5993
  switch (t) {
@@ -6044,7 +6062,7 @@ function fi(t) {
6044
6062
  value: t.value
6045
6063
  }
6046
6064
  };
6047
- }(t) : t instanceof Ne ? function(t) {
6065
+ }(t) : t instanceof Ce ? function(t) {
6048
6066
  var e = t.getFilters().map((function(t) {
6049
6067
  return fi(t);
6050
6068
  }));
@@ -6218,7 +6236,7 @@ function pi(t) {
6218
6236
  * there is no useful information to store as the value. The raw (unencoded)
6219
6237
  * path cannot be stored because IndexedDb doesn't store prototype
6220
6238
  * information.
6221
- */ var Ei = {}, Ti = [ "prefixPath", "collectionGroup", "readTime", "documentId" ], Si = [ "prefixPath", "collectionGroup", "documentId" ], _i = [ "collectionGroup", "readTime", "prefixPath", "documentId" ], Di = [ "canonicalId", "targetId" ], xi = [ "targetId", "path" ], Ai = [ "path", "targetId" ], Ni = [ "collectionId", "parent" ], Ci = [ "indexId", "uid" ], ki = [ "uid", "sequenceNumber" ], Fi = [ "indexId", "uid", "arrayValue", "directionalValue", "orderedDocumentKey", "documentKey" ], Oi = [ "indexId", "uid", "orderedDocumentKey" ], Ri = [ "userId", "collectionPath", "documentId" ], Vi = [ "userId", "collectionPath", "largestBatchId" ], Mi = [ "userId", "collectionGroup", "largestBatchId" ], Li = r(r([], r(r([], r(r([], r(r([], [ "mutationQueues", "mutations", "documentMutations", "remoteDocuments", "targets", "owner", "targetGlobal", "targetDocuments" ], !1), [ "clientMetadata" ], !1), !0), [ "remoteDocumentGlobal" ], !1), !0), [ "collectionParents" ], !1), !0), [ "bundles", "namedQueries" ], !1), Pi = r(r([], Li, !0), [ "documentOverlays" ], !1), qi = [ "mutationQueues", "mutations", "documentMutations", "remoteDocumentsV14", "targets", "owner", "targetGlobal", "targetDocuments", "clientMetadata", "remoteDocumentGlobal", "collectionParents", "bundles", "namedQueries", "documentOverlays" ], Ui = qi, Bi = r(r([], Ui, !0), [ "indexConfiguration", "indexState", "indexEntries" ], !1), Gi = /** @class */ function(e) {
6239
+ */ var Ti = {}, Ei = [ "prefixPath", "collectionGroup", "readTime", "documentId" ], Si = [ "prefixPath", "collectionGroup", "documentId" ], _i = [ "collectionGroup", "readTime", "prefixPath", "documentId" ], Di = [ "canonicalId", "targetId" ], xi = [ "targetId", "path" ], Ai = [ "path", "targetId" ], Ci = [ "collectionId", "parent" ], Ni = [ "indexId", "uid" ], ki = [ "uid", "sequenceNumber" ], Fi = [ "indexId", "uid", "arrayValue", "directionalValue", "orderedDocumentKey", "documentKey" ], Oi = [ "indexId", "uid", "orderedDocumentKey" ], Ri = [ "userId", "collectionPath", "documentId" ], Vi = [ "userId", "collectionPath", "largestBatchId" ], Mi = [ "userId", "collectionGroup", "largestBatchId" ], Li = r(r([], r(r([], r(r([], r(r([], [ "mutationQueues", "mutations", "documentMutations", "remoteDocuments", "targets", "owner", "targetGlobal", "targetDocuments" ], !1), [ "clientMetadata" ], !1), !0), [ "remoteDocumentGlobal" ], !1), !0), [ "collectionParents" ], !1), !0), [ "bundles", "namedQueries" ], !1), Pi = r(r([], Li, !0), [ "documentOverlays" ], !1), qi = [ "mutationQueues", "mutations", "documentMutations", "remoteDocumentsV14", "targets", "owner", "targetGlobal", "targetDocuments", "clientMetadata", "remoteDocumentGlobal", "collectionParents", "bundles", "namedQueries", "documentOverlays" ], Ui = qi, Bi = r(r([], Ui, !0), [ "indexConfiguration", "indexState", "indexEntries" ], !1), Gi = /** @class */ function(e) {
6222
6240
  function n(t, n) {
6223
6241
  var r = this;
6224
6242
  return (r = e.call(this) || this).se = t, r.currentSequenceNumber = n, r;
@@ -6243,7 +6261,7 @@ function pi(t) {
6243
6261
  * limitations under the License.
6244
6262
  */ function Ki(t, e) {
6245
6263
  var n = G(t);
6246
- return Nt.M(n.se, e);
6264
+ return Ct.M(n.se, e);
6247
6265
  }
6248
6266
 
6249
6267
  /**
@@ -6362,7 +6380,7 @@ function pi(t) {
6362
6380
  }
6363
6381
  return t.from = function(e, n, r) {
6364
6382
  U(e.mutations.length === r.length);
6365
- for (var i = Tr, o = e.mutations, u = 0; u < o.length; u++) i = i.insert(o[u].key, r[u].version);
6383
+ for (var i = Er, o = e.mutations, u = 0; u < o.length; u++) i = i.insert(o[u].key, r[u].version);
6366
6384
  return new t(e, n, r, i);
6367
6385
  }, t;
6368
6386
  }(), zi = /** @class */ function() {
@@ -6442,7 +6460,8 @@ function pi(t) {
6442
6460
  return {
6443
6461
  name: Wr(t, e.key),
6444
6462
  fields: e.data.value.mapValue.fields,
6445
- updateTime: Br(t, e.version.toTimestamp())
6463
+ updateTime: Br(t, e.version.toTimestamp()),
6464
+ createTime: Br(t, e.createTime.toTimestamp())
6446
6465
  };
6447
6466
  }(t.ie, e); else if (e.isNoDocument()) r.noDocument = {
6448
6467
  path: n.path.toArray(),
@@ -6538,7 +6557,7 @@ function eo(t, e) {
6538
6557
  parent: t.parent,
6539
6558
  structuredQuery: t.structuredQuery
6540
6559
  });
6541
- return "LAST" === t.limitType ? Tn(e, e.limit, "L" /* LimitType.Last */) : e;
6560
+ return "LAST" === t.limitType ? En(e, e.limit, "L" /* LimitType.Last */) : e;
6542
6561
  }
6543
6562
 
6544
6563
  /** Encodes a NamedQuery proto object to a NamedQuery model object. */
@@ -7087,7 +7106,7 @@ function Io(t, e) {
7087
7106
  * where('a', '>=', 'a').orderBy('a').orderBy('b') | a ASC
7088
7107
  * where('a', 'array-contains', 'a').orderBy('b') | a CONTAINS, b ASCENDING
7089
7108
  * where('a', 'array-contains', 'a').orderBy('b') | a CONTAINS
7090
- */ var Eo = /** @class */ function() {
7109
+ */ var To = /** @class */ function() {
7091
7110
  function t(t) {
7092
7111
  this.collectionId = null != t.collectionGroup ? t.collectionGroup : t.path.lastSegment(),
7093
7112
  this.Ke = t.orderBy, this.Ge = [];
@@ -7180,23 +7199,23 @@ function Io(t, e) {
7180
7199
  * The `in` filter is only a syntactic sugar over a disjunction of equalities. For instance: `a in
7181
7200
  * [1,2,3]` is in fact `a==1 || a==2 || a==3`. This method expands any `in` filter in the given
7182
7201
  * input into a disjunction of equality filters and returns the expanded filter.
7183
- */ function To(t) {
7202
+ */ function Eo(t) {
7184
7203
  var e, n;
7185
- if (U(t instanceof Ae || t instanceof Ne), t instanceof Ae) {
7204
+ if (U(t instanceof Ae || t instanceof Ce), t instanceof Ae) {
7186
7205
  if (t instanceof Ke) {
7187
7206
  var r = (null === (n = null === (e = t.value.arrayValue) || void 0 === e ? void 0 : e.values) || void 0 === n ? void 0 : n.map((function(e) {
7188
7207
  return Ae.create(t.field, "==" /* Operator.EQUAL */ , e);
7189
7208
  }))) || [];
7190
- return Ne.create(r, "or" /* CompositeOperator.OR */);
7209
+ return Ce.create(r, "or" /* CompositeOperator.OR */);
7191
7210
  }
7192
7211
  // We have reached other kinds of field filters.
7193
7212
  return t;
7194
7213
  }
7195
7214
  // We have a composite filter.
7196
7215
  var i = t.filters.map((function(t) {
7197
- return To(t);
7216
+ return Eo(t);
7198
7217
  }));
7199
- return Ne.create(i, t.op);
7218
+ return Ce.create(i, t.op);
7200
7219
  }
7201
7220
 
7202
7221
  /**
@@ -7211,7 +7230,7 @@ function Io(t, e) {
7211
7230
  * @return the terms in the DNF transform.
7212
7231
  */ function So(t) {
7213
7232
  if (0 === t.getFilters().length) return [];
7214
- var e = Ao(To(t));
7233
+ var e = Ao(Eo(t));
7215
7234
  return U(xo(e)), _o(e) || Do(e) ? [ e ] : e.getFilters()
7216
7235
  /** Returns true if the given filter is a single field filter. e.g. (a == 10). */;
7217
7236
  }
@@ -7224,7 +7243,7 @@ function _o(t) {
7224
7243
  * Returns true if the given filter is the conjunction of one or more field filters. e.g. (a == 10
7225
7244
  * && b == 20)
7226
7245
  */ function Do(t) {
7227
- return t instanceof Ne && Fe(t);
7246
+ return t instanceof Ce && Fe(t);
7228
7247
  }
7229
7248
 
7230
7249
  /**
@@ -7241,7 +7260,7 @@ function _o(t) {
7241
7260
  * field filters. e.g. (a == 10) || (b==20 && c==30)
7242
7261
  */
7243
7262
  function(t) {
7244
- if (t instanceof Ne && ke(t)) {
7263
+ if (t instanceof Ce && ke(t)) {
7245
7264
  for (var e = 0, n = t.getFilters(); e < n.length; e++) {
7246
7265
  var r = n[e];
7247
7266
  if (!_o(r) && !Do(r)) return !1;
@@ -7253,55 +7272,55 @@ function _o(t) {
7253
7272
  }
7254
7273
 
7255
7274
  function Ao(t) {
7256
- if (U(t instanceof Ae || t instanceof Ne), t instanceof Ae) return t;
7275
+ if (U(t instanceof Ae || t instanceof Ce), t instanceof Ae) return t;
7257
7276
  if (1 === t.filters.length) return Ao(t.filters[0]);
7258
7277
  // Compute DNF for each of the subfilters first
7259
7278
  var e = t.filters.map((function(t) {
7260
7279
  return Ao(t);
7261
- })), n = Ne.create(e, t.op);
7262
- return xo(n = ko(n)) ? n : (U(n instanceof Ne), U(Ce(n)), U(n.filters.length > 1),
7280
+ })), n = Ce.create(e, t.op);
7281
+ return xo(n = ko(n)) ? n : (U(n instanceof Ce), U(Ne(n)), U(n.filters.length > 1),
7263
7282
  n.filters.reduce((function(t, e) {
7264
- return No(t, e);
7283
+ return Co(t, e);
7265
7284
  })));
7266
7285
  }
7267
7286
 
7268
- function No(t, e) {
7287
+ function Co(t, e) {
7269
7288
  var n;
7270
- return U(t instanceof Ae || t instanceof Ne), U(e instanceof Ae || e instanceof Ne),
7289
+ return U(t instanceof Ae || t instanceof Ce), U(e instanceof Ae || e instanceof Ce),
7271
7290
  // FieldFilter FieldFilter
7272
7291
  n = t instanceof Ae ? e instanceof Ae ? function(t, e) {
7273
7292
  // Conjunction distribution for two field filters is the conjunction of them.
7274
- return Ne.create([ t, e ], "and" /* CompositeOperator.AND */);
7275
- }(t, e) : Co(t, e) : e instanceof Ae ? Co(e, t) : function(t, e) {
7293
+ return Ce.create([ t, e ], "and" /* CompositeOperator.AND */);
7294
+ }(t, e) : No(t, e) : e instanceof Ae ? No(e, t) : function(t, e) {
7276
7295
  // There are four cases:
7277
7296
  // (A & B) & (C & D) --> (A & B & C & D)
7278
7297
  // (A & B) & (C | D) --> (A & B & C) | (A & B & D)
7279
7298
  // (A | B) & (C & D) --> (C & D & A) | (C & D & B)
7280
7299
  // (A | B) & (C | D) --> (A & C) | (A & D) | (B & C) | (B & D)
7281
7300
  // Case 1 is a merge.
7282
- if (U(t.filters.length > 0 && e.filters.length > 0), Ce(t) && Ce(e)) return Me(t, e.getFilters());
7301
+ if (U(t.filters.length > 0 && e.filters.length > 0), Ne(t) && Ne(e)) return Me(t, e.getFilters());
7283
7302
  // Case 2,3,4 all have at least one side (lhs or rhs) that is a disjunction. In all three cases
7284
7303
  // we should take each element of the disjunction and distribute it over the other side, and
7285
7304
  // return the disjunction of the distribution results.
7286
7305
  var n = ke(t) ? t : e, r = ke(t) ? e : t, i = n.filters.map((function(t) {
7287
- return No(t, r);
7306
+ return Co(t, r);
7288
7307
  }));
7289
- return Ne.create(i, "or" /* CompositeOperator.OR */);
7308
+ return Ce.create(i, "or" /* CompositeOperator.OR */);
7290
7309
  }(t, e), ko(n);
7291
7310
  }
7292
7311
 
7293
- function Co(t, e) {
7312
+ function No(t, e) {
7294
7313
  // There are two cases:
7295
7314
  // A & (B & C) --> (A & B & C)
7296
7315
  // A & (B | C) --> (A & B) | (A & C)
7297
- if (Ce(e))
7316
+ if (Ne(e))
7298
7317
  // Case 1
7299
7318
  return Me(e, t.getFilters());
7300
7319
  // Case 2
7301
7320
  var n = e.filters.map((function(e) {
7302
- return No(t, e);
7321
+ return Co(t, e);
7303
7322
  }));
7304
- return Ne.create(n, "or" /* CompositeOperator.OR */);
7323
+ return Ce.create(n, "or" /* CompositeOperator.OR */);
7305
7324
  }
7306
7325
 
7307
7326
  /**
@@ -7314,7 +7333,7 @@ function Co(t, e) {
7314
7333
  *
7315
7334
  * <p>For more info, visit: https://en.wikipedia.org/wiki/Associative_property#Propositional_logic
7316
7335
  */ function ko(t) {
7317
- if (U(t instanceof Ae || t instanceof Ne), t instanceof Ae) return t;
7336
+ if (U(t instanceof Ae || t instanceof Ce), t instanceof Ae) return t;
7318
7337
  var e = t.getFilters();
7319
7338
  // If the composite filter only contains 1 filter, apply associativity to it.
7320
7339
  if (1 === e.length) return ko(e[0]);
@@ -7333,7 +7352,7 @@ function Co(t, e) {
7333
7352
  // Note that the `compositeSubfilter` has been eliminated, and its filters (B, C, D) have been
7334
7353
  // added to the top-level "compositeFilter".
7335
7354
  return n.forEach((function(e) {
7336
- e instanceof Ae ? r.push(e) : e instanceof Ne && (e.op === t.op ?
7355
+ e instanceof Ae ? r.push(e) : e instanceof Ce && (e.op === t.op ?
7337
7356
  // compositeFilter: (A | (B | C))
7338
7357
  // compositeSubfilter: (B | C)
7339
7358
  // Result: (A | B | C)
@@ -7346,7 +7365,7 @@ function Co(t, e) {
7346
7365
  // compositeSubfilter: (B & C)
7347
7366
  // Result: (A | (B & C))
7348
7367
  r.push(e));
7349
- })), 1 === r.length ? r[0] : Ne.create(r, t.op)
7368
+ })), 1 === r.length ? r[0] : Ce.create(r, t.op)
7350
7369
  /**
7351
7370
  * @license
7352
7371
  * Copyright 2019 Google LLC
@@ -7395,9 +7414,9 @@ var Fo = /** @class */ function() {
7395
7414
  // Field indices are not supported with memory persistence.
7396
7415
  return xt.resolve(null);
7397
7416
  }, t.prototype.getMinOffset = function(t, e) {
7398
- return xt.resolve(Et.min());
7417
+ return xt.resolve(Tt.min());
7399
7418
  }, t.prototype.getMinOffsetFromCollectionGroup = function(t, e) {
7400
- return xt.resolve(Et.min());
7419
+ return xt.resolve(Tt.min());
7401
7420
  }, t.prototype.updateCollectionGroup = function(t, e, n) {
7402
7421
  // Field indices are not supported with memory persistence.
7403
7422
  return xt.resolve();
@@ -7595,7 +7614,7 @@ var Fo = /** @class */ function() {
7595
7614
  }));
7596
7615
  }, t.prototype.Ze = function(t) {
7597
7616
  var e = this.Xe.get(t);
7598
- return e || (e = 0 === t.filters.length ? [ t ] : So(Ne.create(t.filters, "and" /* CompositeOperator.AND */)).map((function(e) {
7617
+ return e || (e = 0 === t.filters.length ? [ t ] : So(Ce.create(t.filters, "and" /* CompositeOperator.AND */)).map((function(e) {
7599
7618
  return un(t.path, t.collectionGroup, t.orderBy, e.getFilters(), t.limit, t.startAt, t.endAt);
7600
7619
  })), this.Xe.set(t, e), e);
7601
7620
  },
@@ -7626,7 +7645,7 @@ var Fo = /** @class */ function() {
7626
7645
  var i = new wo(t, ft.empty(), e, n);
7627
7646
  return r ? i.Ue() : i;
7628
7647
  }, t.prototype.tn = function(t, e) {
7629
- var n = new Eo(e), r = null != e.collectionGroup ? e.collectionGroup : e.path.lastSegment();
7648
+ var n = new To(e), r = null != e.collectionGroup ? e.collectionGroup : e.path.lastSegment();
7630
7649
  return this.getFieldIndexes(t, r).next((function(t) {
7631
7650
  for (
7632
7651
  // Return the index with the most number of segments.
@@ -7751,7 +7770,7 @@ var Fo = /** @class */ function() {
7751
7770
  return xt.forEach(t, (function(t) {
7752
7771
  return i.get([ t.indexId, n.uid ]).next((function(n) {
7753
7772
  e.push(function(t, e) {
7754
- var n = e ? new wt(e.sequenceNumber, new Et(Ji(e.readTime), new ft(gi(e.documentKey)), e.largestBatchId)) : wt.empty(), r = t.fields.map((function(t) {
7773
+ var n = e ? new wt(e.sequenceNumber, new Tt(Ji(e.readTime), new ft(gi(e.documentKey)), e.largestBatchId)) : wt.empty(), r = t.fields.map((function(t) {
7755
7774
  var e = t[0], n = t[1];
7756
7775
  return new mt(ht.fromServerFormat(e), n);
7757
7776
  }));
@@ -7962,9 +7981,9 @@ function Uo(t) {
7962
7981
  U(0 !== t.length);
7963
7982
  for (var e = t[0].indexState.offset, n = e.largestBatchId, r = 1; r < t.length; r++) {
7964
7983
  var i = t[r].indexState.offset;
7965
- Tt(i, e) < 0 && (e = i), n < i.largestBatchId && (n = i.largestBatchId);
7984
+ Et(i, e) < 0 && (e = i), n < i.largestBatchId && (n = i.largestBatchId);
7966
7985
  }
7967
- return new Et(e.readTime, e.documentKey, n);
7986
+ return new Tt(e.readTime, e.documentKey, n);
7968
7987
  }
7969
7988
 
7970
7989
  /**
@@ -8147,7 +8166,7 @@ var Qo = /** @class */ function() {
8147
8166
  return rt(t.canonicalString(), e.canonicalString());
8148
8167
  })), f = 0, d = r; f < d.length; f++) {
8149
8168
  var p = d[f], y = Ii(i.userId, p.key.path, a);
8150
- h = h.add(p.key.path.popLast()), l.push(u.put(c)), l.push(o.put(y, Ei));
8169
+ h = h.add(p.key.path.popLast()), l.push(u.put(c)), l.push(o.put(y, Ti));
8151
8170
  }
8152
8171
  return h.forEach((function(e) {
8153
8172
  l.push(i.indexManager.addToCollectionParentIndex(t, e));
@@ -9162,7 +9181,7 @@ function Jo(t) {
9162
9181
  return e;
9163
9182
  }));
9164
9183
  }, t.prototype.getAllFromCollectionGroup = function(t, e, n, r) {
9165
- var i = this, o = vr(), u = pu(e, n), a = pu(e, Et.max());
9184
+ var i = this, o = vr(), u = pu(e, n), a = pu(e, Tt.max());
9166
9185
  return fu(t).Z({
9167
9186
  index: "collectionGroupIndex",
9168
9187
  range: IDBKeyRange.bound(u, a, !0)
@@ -9434,7 +9453,7 @@ e) {
9434
9453
  return t.prototype.getDocument = function(t, e) {
9435
9454
  var n = this, r = null;
9436
9455
  return this.documentOverlayCache.getOverlay(t, e).next((function(i) {
9437
- return r = i, n.getBaseDocument(t, e, r);
9456
+ return r = i, n.remoteDocumentCache.getEntry(t, e);
9438
9457
  })).next((function(t) {
9439
9458
  return null !== r && $n(r.mutation, t, tn.empty(), ut.now()), t;
9440
9459
  }));
@@ -9514,7 +9533,7 @@ e) {
9514
9533
  * @return A map represents the local documents view.
9515
9534
  */
9516
9535
  t.prototype.computeViews = function(t, e, n, r) {
9517
- var i = vr(), o = Er(), u = Er();
9536
+ var i = vr(), o = Tr(), u = Tr();
9518
9537
  return e.forEach((function(t, e) {
9519
9538
  var u = n.get(e.key);
9520
9539
  // Recalculate an overlay if the document's existence state changed due to
@@ -9535,7 +9554,7 @@ e) {
9535
9554
  })), u;
9536
9555
  }));
9537
9556
  }, t.prototype.recalculateAndSaveOverlays = function(t, e) {
9538
- var n = this, r = Er(), i = new He((function(t, e) {
9557
+ var n = this, r = Tr(), i = new He((function(t, e) {
9539
9558
  return t - e;
9540
9559
  })), o = _r();
9541
9560
  return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(t, e).next((function(t) {
@@ -9620,7 +9639,7 @@ e) {
9620
9639
  // the batch id.
9621
9640
  return u.next((function(e) {
9622
9641
  return xt.forEach(e, (function(e, n) {
9623
- return a < n.largestBatchId && (a = n.largestBatchId), o.get(e) ? xt.resolve() : i.getBaseDocument(t, e, n).next((function(t) {
9642
+ return a < n.largestBatchId && (a = n.largestBatchId), o.get(e) ? xt.resolve() : i.remoteDocumentCache.getEntry(t, e).next((function(t) {
9624
9643
  s = s.insert(e, t);
9625
9644
  }));
9626
9645
  })).next((function() {
@@ -9679,9 +9698,6 @@ e) {
9679
9698
  xn(e, i) && (n = n.insert(r, i));
9680
9699
  })), n;
9681
9700
  }));
9682
- },
9683
- /** Returns a base document that can be used to apply `overlay`. */ t.prototype.getBaseDocument = function(t, e, n) {
9684
- return null === n || 1 /* MutationType.Patch */ === n.mutation.type ? this.remoteDocumentCache.getEntry(t, e) : xt.resolve(rn.newInvalidDocument(e));
9685
9701
  }, t;
9686
9702
  }(), gu = /** @class */ function() {
9687
9703
  function t(t) {
@@ -9838,7 +9854,7 @@ e) {
9838
9854
  /** Compare by ID then by key */ t.os = function(t, e) {
9839
9855
  return rt(t._s, e._s) || ft.comparator(t.key, e.key);
9840
9856
  }, t;
9841
- }(), Eu = /** @class */ function() {
9857
+ }(), Tu = /** @class */ function() {
9842
9858
  function t(t, e) {
9843
9859
  this.indexManager = t, this.referenceDelegate = e,
9844
9860
  /**
@@ -9972,7 +9988,7 @@ e) {
9972
9988
  var e = this.ps(t);
9973
9989
  return e < 0 || e >= this.mutationQueue.length ? null : this.mutationQueue[e];
9974
9990
  }, t;
9975
- }(), Tu = /** @class */ function() {
9991
+ }(), Eu = /** @class */ function() {
9976
9992
  /**
9977
9993
  * @param sizer - Used to assess the size of a document. For eager GC, this is
9978
9994
  * expected to just return 0 to avoid unnecessarily doing the work of
@@ -10026,7 +10042,7 @@ e) {
10026
10042
  ; o.hasNext(); ) {
10027
10043
  var u = o.getNext(), a = u.key, s = u.value.document;
10028
10044
  if (!e.isPrefixOf(a.path)) break;
10029
- a.path.length > e.length + 1 || Tt(It(s), n) <= 0 || (r = r.insert(s.key, s.mutableCopy()));
10045
+ a.path.length > e.length + 1 || Et(It(s), n) <= 0 || (r = r.insert(s.key, s.mutableCopy()));
10030
10046
  }
10031
10047
  return xt.resolve(r);
10032
10048
  }, t.prototype.getAllFromCollectionGroup = function(t, e, n, r) {
@@ -10144,7 +10160,7 @@ e) {
10144
10160
  var n = this;
10145
10161
  this.Vs = {}, this.overlays = {}, this.Ss = new qt(0), this.Ds = !1, this.Ds = !0,
10146
10162
  this.referenceDelegate = t(this), this.Cs = new _u(this), this.indexManager = new Fo,
10147
- this.remoteDocumentCache = new Tu((function(t) {
10163
+ this.remoteDocumentCache = new Eu((function(t) {
10148
10164
  return n.referenceDelegate.xs(t);
10149
10165
  })), this.yt = new Hi(e), this.Ns = new gu(this.yt);
10150
10166
  }
@@ -10172,7 +10188,7 @@ e) {
10172
10188
  return e || (e = new wu, this.overlays[t.toKey()] = e), e;
10173
10189
  }, t.prototype.getMutationQueue = function(t, e) {
10174
10190
  var n = this.Vs[t.toKey()];
10175
- return n || (n = new Eu(e, this.referenceDelegate), this.Vs[t.toKey()] = n), n;
10191
+ return n || (n = new Tu(e, this.referenceDelegate), this.Vs[t.toKey()] = n), n;
10176
10192
  }, t.prototype.getTargetCache = function() {
10177
10193
  return this.Cs;
10178
10194
  }, t.prototype.getRemoteDocumentCache = function() {
@@ -10270,7 +10286,7 @@ e) {
10270
10286
  return n.persistence.Ms(t, e);
10271
10287
  } ]);
10272
10288
  }, t;
10273
- }(), Nu = /** @class */ function() {
10289
+ }(), Cu = /** @class */ function() {
10274
10290
  function t(t) {
10275
10291
  this.yt = t;
10276
10292
  }
@@ -10293,7 +10309,7 @@ e) {
10293
10309
  }).createIndex("userMutationsIndex", wi, {
10294
10310
  unique: !0
10295
10311
  }), t.createObjectStore("documentMutations");
10296
- }(t), Cu(t), function(t) {
10312
+ }(t), Nu(t), function(t) {
10297
10313
  t.createObjectStore("remoteDocuments");
10298
10314
  }(t));
10299
10315
  // Migration 2 to populate the targetGlobal object no longer needed since
@@ -10304,7 +10320,7 @@ e) {
10304
10320
  // potentially have corrupt data.
10305
10321
  0 !== n && (function(t) {
10306
10322
  t.deleteObjectStore("targetDocuments"), t.deleteObjectStore("targets"), t.deleteObjectStore("targetGlobal");
10307
- }(t), Cu(t)), u = u.next((function() {
10323
+ }(t), Nu(t)), u = u.next((function() {
10308
10324
  /**
10309
10325
  * Creates the target global singleton row.
10310
10326
  *
@@ -10392,7 +10408,7 @@ e) {
10392
10408
  }))), n < 13 && r >= 13 && (u = u.next((function() {
10393
10409
  return function(t) {
10394
10410
  var e = t.createObjectStore("remoteDocumentsV14", {
10395
- keyPath: Ti
10411
+ keyPath: Ei
10396
10412
  });
10397
10413
  e.createIndex("documentKeyIndex", Si), e.createIndex("collectionGroupIndex", _i);
10398
10414
  }(t);
@@ -10410,7 +10426,7 @@ e) {
10410
10426
  }).createIndex("collectionGroupIndex", "collectionGroup", {
10411
10427
  unique: !1
10412
10428
  }), t.createObjectStore("indexState", {
10413
- keyPath: Ci
10429
+ keyPath: Ni
10414
10430
  }).createIndex("sequenceNumberIndex", ki, {
10415
10431
  unique: !1
10416
10432
  }), t.createObjectStore("indexEntries", {
@@ -10473,7 +10489,7 @@ e) {
10473
10489
  }, t.prototype.Qs = function(t, e) {
10474
10490
  // Create the index.
10475
10491
  t.createObjectStore("collectionParents", {
10476
- keyPath: Ni
10492
+ keyPath: Ci
10477
10493
  });
10478
10494
  var n = e.store("collectionParents"), r = new Oo, i = function(t) {
10479
10495
  if (r.add(t)) {
@@ -10535,7 +10551,7 @@ e) {
10535
10551
  return i = i.add(t);
10536
10552
  })), r.set(t.userId, i);
10537
10553
  })), xt.forEach(r, (function(t, r) {
10538
- var u = new C(r), a = co.re(n.yt, u), s = o.getIndexManager(u), c = Qo.re(u, n.yt, s, o.referenceDelegate);
10554
+ var u = new N(r), a = co.re(n.yt, u), s = o.getIndexManager(u), c = Qo.re(u, n.yt, s, o.referenceDelegate);
10539
10555
  return new mu(i, c, a, s).recalculateAndSaveOverlaysForDocumentKeys(new Gi(e, qt.at), t).next();
10540
10556
  }));
10541
10557
  }));
@@ -10563,7 +10579,7 @@ e) {
10563
10579
  * have a cached version in remoteDocumentCache or local mutations for the
10564
10580
  * document). The view is computed by applying the mutations in the
10565
10581
  * MutationQueue to the RemoteDocumentCache.
10566
- */ function Cu(t) {
10582
+ */ function Nu(t) {
10567
10583
  t.createObjectStore("targetDocuments", {
10568
10584
  keyPath: xi
10569
10585
  }).createIndex("documentTargetsIndex", Ai, {
@@ -10605,7 +10621,7 @@ var ku = "Failed to obtain exclusive access to the persistence layer. To allow s
10605
10621
  return Promise.resolve();
10606
10622
  }, !t.C()) throw new j(K.UNIMPLEMENTED, "This platform is either missing IndexedDB or is known to have an incomplete implementation. Offline persistence has been disabled.");
10607
10623
  this.referenceDelegate = new ou(this, i), this.ii = n + "main", this.yt = new Hi(s),
10608
- this.ri = new Nt(this.ii, this.Xs, new Nu(this.yt)), this.Cs = new Zo(this.referenceDelegate, this.yt),
10624
+ this.ri = new Ct(this.ii, this.Xs, new Cu(this.yt)), this.Cs = new Zo(this.referenceDelegate, this.yt),
10609
10625
  this.remoteDocumentCache = cu(this.yt), this.Ns = new uo, this.window && this.window.localStorage ? this.oi = this.window.localStorage : (this.oi = null,
10610
10626
  !1 === l && M("IndexedDbPersistence", "LocalStorage is unavailable. As a result, persistence may not work reliably. In particular enablePersistence() could fail immediately after refreshing the page."));
10611
10627
  }
@@ -10992,7 +11008,7 @@ var ku = "Failed to obtain exclusive access to the persistence layer. To allow s
10992
11008
  };
10993
11009
  return Ou(t).put("owner", e);
10994
11010
  }, t.C = function() {
10995
- return Nt.C();
11011
+ return Ct.C();
10996
11012
  },
10997
11013
  /** Checks the primary lease and removes it if we are the current primary. */ t.prototype._i = function(t) {
10998
11014
  var e = this, n = Ou(t);
@@ -11233,12 +11249,12 @@ var Mu = /** @class */ function() {
11233
11249
  // may return the correct set of documents in the wrong order (e.g. if
11234
11250
  // the index doesn't include a segment for one of the orderBys).
11235
11251
  // Therefore, a limit should not be applied in such cases.
11236
- e = Tn(e, null, "F" /* LimitType.First */), r = In(e)), n.indexManager.getDocumentsMatchingTarget(t, r).next((function(i) {
11252
+ e = En(e, null, "F" /* LimitType.First */), r = In(e)), n.indexManager.getDocumentsMatchingTarget(t, r).next((function(i) {
11237
11253
  var o = _r.apply(void 0, i);
11238
11254
  return n.Ni.getDocuments(t, o).next((function(i) {
11239
11255
  return n.indexManager.getMinOffset(t, r).next((function(r) {
11240
11256
  var u = n.Fi(e, i);
11241
- return n.$i(e, u, o, r.readTime) ? n.ki(t, Tn(e, null, "F" /* LimitType.First */)) : n.Bi(t, u, e, r);
11257
+ return n.$i(e, u, o, r.readTime) ? n.ki(t, En(e, null, "F" /* LimitType.First */)) : n.Bi(t, u, e, r);
11242
11258
  }));
11243
11259
  }));
11244
11260
  })));
@@ -11261,7 +11277,7 @@ var Mu = /** @class */ function() {
11261
11277
  /** Applies the query filter and sorting to the provided documents. */ t.prototype.Fi = function(t, e) {
11262
11278
  // Sort the documents and re-apply the query filter since previously
11263
11279
  // matching documents do not necessarily still match the query.
11264
- var n = new Ze(Nn(t));
11280
+ var n = new Ze(Cn(t));
11265
11281
  return e.forEach((function(e, r) {
11266
11282
  xn(t, r) && (n = n.add(r));
11267
11283
  })), n;
@@ -11298,7 +11314,7 @@ var Mu = /** @class */ function() {
11298
11314
  return !!i && (i.hasPendingWrites || i.version.compareTo(r) > 0);
11299
11315
  }, t.prototype.Mi = function(t, e) {
11300
11316
  return O() <= h.DEBUG && V("QueryEngine", "Using full collection scan to execute query:", Dn(e)),
11301
- this.Ni.getDocumentsMatchingQuery(t, e, Et.min());
11317
+ this.Ni.getDocumentsMatchingQuery(t, e, Tt.min());
11302
11318
  },
11303
11319
  /**
11304
11320
  * Combines the results from an indexed execution with the remaining documents
@@ -12247,7 +12263,7 @@ var ra = /** @class */ function() {
12247
12263
  */
12248
12264
  t.prototype.Dr = function(t, e) {
12249
12265
  var n = this.dr.exec(t), r = Number(n[1]), i = void 0 !== n[2] ? n[2] : null;
12250
- return ra.Zi(new C(i), r, e);
12266
+ return ra.Zi(new N(i), r, e);
12251
12267
  },
12252
12268
  /**
12253
12269
  * Parses a query target state from WebStorage. Returns 'null' if the value
@@ -12409,16 +12425,16 @@ var ra = /** @class */ function() {
12409
12425
  u.setWithCredentials(!0), u.listenOnce(I.COMPLETE, (function() {
12410
12426
  try {
12411
12427
  switch (u.getLastErrorCode()) {
12412
- case E.NO_ERROR:
12428
+ case T.NO_ERROR:
12413
12429
  var e = u.getResponseJson();
12414
12430
  V("Connection", "XHR received:", JSON.stringify(e)), i(e);
12415
12431
  break;
12416
12432
 
12417
- case E.TIMEOUT:
12433
+ case T.TIMEOUT:
12418
12434
  V("Connection", 'RPC "' + t + '" timed out'), o(new j(K.DEADLINE_EXCEEDED, "Request time out"));
12419
12435
  break;
12420
12436
 
12421
- case E.HTTP_ERROR:
12437
+ case T.HTTP_ERROR:
12422
12438
  var n = u.getStatus();
12423
12439
  if (V("Connection", 'RPC "' + t + '" failed with status:', n, "response text:", u.getResponseText()),
12424
12440
  n > 0) {
@@ -12449,7 +12465,7 @@ var ra = /** @class */ function() {
12449
12465
  u.send(e, "POST", a, n, 15);
12450
12466
  }));
12451
12467
  }, n.prototype.wo = function(t, e, n) {
12452
- var r = [ this.oo, "/", "google.firestore.v1.Firestore", "/", t, "/channel" ], i = T(), o = S(), u = {
12468
+ var r = [ this.oo, "/", "google.firestore.v1.Firestore", "/", t, "/channel" ], i = E(), o = S(), u = {
12453
12469
  // Required for backend stickiness, routing behavior is based on this
12454
12470
  // parameter.
12455
12471
  httpSessionIdParam: "gsessionid",
@@ -13034,31 +13050,31 @@ function ya() {
13034
13050
  e.documentChange;
13035
13051
  var s = e.documentChange;
13036
13052
  s.document, s.document.name, s.document.updateTime;
13037
- var c = Hr(t, s.document.name), l = jr(s.document.updateTime), h = new en({
13053
+ var c = Hr(t, s.document.name), l = jr(s.document.updateTime), h = s.document.createTime ? jr(s.document.createTime) : at.min(), f = new en({
13038
13054
  mapValue: {
13039
13055
  fields: s.document.fields
13040
13056
  }
13041
- }), f = rn.newFoundDocument(c, l, h), d = s.targetIds || [], p = s.removedTargetIds || [];
13042
- n = new Cr(d, p, f.key, f);
13057
+ }), d = rn.newFoundDocument(c, l, h, f), p = s.targetIds || [], y = s.removedTargetIds || [];
13058
+ n = new Nr(p, y, d.key, d);
13043
13059
  } else if ("documentDelete" in e) {
13044
13060
  e.documentDelete;
13045
- var y = e.documentDelete;
13046
- y.document;
13047
- var v = Hr(t, y.document), m = y.readTime ? jr(y.readTime) : at.min(), g = rn.newNoDocument(v, m), w = y.removedTargetIds || [];
13048
- n = new Cr([], w, g.key, g);
13061
+ var v = e.documentDelete;
13062
+ v.document;
13063
+ var m = Hr(t, v.document), g = v.readTime ? jr(v.readTime) : at.min(), w = rn.newNoDocument(m, g), b = v.removedTargetIds || [];
13064
+ n = new Nr([], b, w.key, w);
13049
13065
  } else if ("documentRemove" in e) {
13050
13066
  e.documentRemove;
13051
- var b = e.documentRemove;
13052
- b.document;
13053
- var I = Hr(t, b.document), E = b.removedTargetIds || [];
13054
- n = new Cr([], E, I, null);
13067
+ var I = e.documentRemove;
13068
+ I.document;
13069
+ var T = Hr(t, I.document), E = I.removedTargetIds || [];
13070
+ n = new Nr([], E, T, null);
13055
13071
  } else {
13056
13072
  if (!("filter" in e)) return q();
13057
13073
  e.filter;
13058
- var T = e.filter;
13059
- T.targetId;
13060
- var S = T.count || 0, _ = new hr(S), D = T.targetId;
13061
- n = new kr(D, _);
13074
+ var S = e.filter;
13075
+ S.targetId;
13076
+ var _ = S.count || 0, D = new hr(_), x = S.targetId;
13077
+ n = new kr(x, D);
13062
13078
  }
13063
13079
  return n;
13064
13080
  }(this.yt, t), n = function(t) {
@@ -13194,7 +13210,7 @@ function ya() {
13194
13210
  };
13195
13211
  this.Bo(n);
13196
13212
  }, n;
13197
- }(wa), Ea = /** @class */ function(e) {
13213
+ }(wa), Ta = /** @class */ function(e) {
13198
13214
  function n(t, n, r, i) {
13199
13215
  var o = this;
13200
13216
  return (o = e.call(this) || this).authCredentials = t, o.appCheckCredentials = n,
@@ -13286,7 +13302,7 @@ function ya() {
13286
13302
  * then we set the OnlineState to Offline, and the client will behave as if
13287
13303
  * it is offline (get()s will return cached data, etc.).
13288
13304
  */
13289
- var Ta = /** @class */ function() {
13305
+ var Ea = /** @class */ function() {
13290
13306
  function t(t, e) {
13291
13307
  this.asyncQueue = t, this.onlineStateHandler = e,
13292
13308
  /** The current OnlineState. */
@@ -13439,7 +13455,7 @@ r, i, o, u) {
13439
13455
  }));
13440
13456
  }));
13441
13457
  }));
13442
- })), this.gu = new Ta(i, o);
13458
+ })), this.gu = new Ea(i, o);
13443
13459
  };
13444
13460
 
13445
13461
  /**
@@ -13518,7 +13534,7 @@ r, i, o, u) {
13518
13534
  // Mark this as something the client is currently listening for.
13519
13535
  n.du.set(e.targetId, e), Fa(n) ?
13520
13536
  // The listen will be sent in onWatchStreamOpen
13521
- ka(n) : Ya(n).ko() && Na(n, e));
13537
+ ka(n) : Ya(n).ko() && Ca(n, e));
13522
13538
  }
13523
13539
 
13524
13540
  /**
@@ -13526,7 +13542,7 @@ r, i, o, u) {
13526
13542
  * not being listened to.
13527
13543
  */ function Aa(t, e) {
13528
13544
  var n = G(t), r = Ya(n);
13529
- n.du.delete(e), r.ko() && Ca(n, e), 0 === n.du.size && (r.ko() ? r.Fo() : Oa(n) &&
13545
+ n.du.delete(e), r.ko() && Na(n, e), 0 === n.du.size && (r.ko() ? r.Fo() : Oa(n) &&
13530
13546
  // Revert to OnlineState.Unknown if the watch stream is not open and we
13531
13547
  // have no listeners, since without any listens to send we cannot
13532
13548
  // confirm if the stream is healthy and upgrade to OnlineState.Online.
@@ -13536,7 +13552,7 @@ r, i, o, u) {
13536
13552
  /**
13537
13553
  * We need to increment the the expected number of pending responses we're due
13538
13554
  * from watch so we wait for the ack to process any messages from this target.
13539
- */ function Na(t, e) {
13555
+ */ function Ca(t, e) {
13540
13556
  t.yu.Ot(e.targetId), Ya(t).zo(e)
13541
13557
  /**
13542
13558
  * We need to increment the expected number of pending responses we're due
@@ -13545,7 +13561,7 @@ r, i, o, u) {
13545
13561
  */;
13546
13562
  }
13547
13563
 
13548
- function Ca(t, e) {
13564
+ function Na(t, e) {
13549
13565
  t.yu.Ot(e), Ya(t).Ho(e);
13550
13566
  }
13551
13567
 
@@ -13580,7 +13596,7 @@ function Va(t) {
13580
13596
  return e(this, void 0, void 0, (function() {
13581
13597
  return n(this, (function(e) {
13582
13598
  return t.du.forEach((function(e, n) {
13583
- Na(t, e);
13599
+ Ca(t, e);
13584
13600
  })), [ 2 /*return*/ ];
13585
13601
  }));
13586
13602
  }));
@@ -13655,7 +13671,7 @@ function La(t, r, i) {
13655
13671
  return [ 3 /*break*/ , 13 ];
13656
13672
 
13657
13673
  case 6:
13658
- if (r instanceof Cr ? t.yu.Kt(r) : r instanceof kr ? t.yu.Jt(r) : t.yu.jt(r), i.isEqual(at.min())) return [ 3 /*break*/ , 13 ];
13674
+ if (r instanceof Nr ? t.yu.Kt(r) : r instanceof kr ? t.yu.Jt(r) : t.yu.jt(r), i.isEqual(at.min())) return [ 3 /*break*/ , 13 ];
13659
13675
  s.label = 7;
13660
13676
 
13661
13677
  case 7:
@@ -13689,13 +13705,13 @@ function La(t, r, i) {
13689
13705
  t.du.set(e, n.withResumeToken(Yt.EMPTY_BYTE_STRING, n.snapshotVersion)),
13690
13706
  // Cause a hard reset by unwatching and rewatching immediately, but
13691
13707
  // deliberately don't send a resume token so that we get a full update.
13692
- Ca(t, e);
13708
+ Na(t, e);
13693
13709
  // Mark the target we send as being on behalf of an existence filter
13694
13710
  // mismatch, but don't actually retain that in listenTargets. This ensures
13695
13711
  // that we flag the first re-listen this way without impacting future
13696
13712
  // listens of this target (that might happen e.g. on reconnect).
13697
13713
  var r = new Wi(n.target, e, 1 /* TargetPurpose.ExistenceFilterMismatch */ , n.sequenceNumber);
13698
- Na(t, r);
13714
+ Ca(t, r);
13699
13715
  }
13700
13716
  })), t.remoteSyncer.applyRemoteEvent(n);
13701
13717
  }(t, i) ] : [ 3 /*break*/ , 10 ];
@@ -14680,7 +14696,7 @@ function ds(t) {
14680
14696
  /** Documents in the view but not in the remote target */
14681
14697
  this.Ku = _r(),
14682
14698
  /** Document Keys that have local changes */
14683
- this.mutatedKeys = _r(), this.Gu = Nn(t), this.Qu = new $a(this.Gu);
14699
+ this.mutatedKeys = _r(), this.Gu = Cn(t), this.Qu = new $a(this.Gu);
14684
14700
  }
14685
14701
  return Object.defineProperty(t.prototype, "ju", {
14686
14702
  /**
@@ -15052,7 +15068,7 @@ function bs(t, r) {
15052
15068
  /* usePreviousResults= */ !0) ];
15053
15069
 
15054
15070
  case 1:
15055
- return a = d.sent(), s = new vs(r, a.Hi), c = s.Wu(a.documents), l = Nr.createSynthesizedTargetChangeForCurrentChange(i, o && "Offline" /* OnlineState.Offline */ !== t.onlineState, u),
15071
+ return a = d.sent(), s = new vs(r, a.Hi), c = s.Wu(a.documents), l = Cr.createSynthesizedTargetChangeForCurrentChange(i, o && "Offline" /* OnlineState.Offline */ !== t.onlineState, u),
15056
15072
  h = s.applyChanges(c,
15057
15073
  /* updateLimboDocuments= */ t.isPrimaryClient, l), Rs(t, i, h.Xu), f = new ms(r, i, s),
15058
15074
  [ 2 /*return*/ , (t.ic.set(r, f), t.rc.has(i) ? t.rc.get(i).push(r) : t.rc.set(i, [ r ]),
@@ -15062,7 +15078,7 @@ function bs(t, r) {
15062
15078
  }));
15063
15079
  }
15064
15080
 
15065
- /** Stops listening to the query. */ function Es(t, r) {
15081
+ /** Stops listening to the query. */ function Ts(t, r) {
15066
15082
  return e(this, void 0, void 0, (function() {
15067
15083
  var e, i, o;
15068
15084
  return n(this, (function(n) {
@@ -15108,7 +15124,7 @@ function bs(t, r) {
15108
15124
  * have completed, *not* when the write was acked by the backend. The
15109
15125
  * userCallback is resolved once the write was acked/rejected by the
15110
15126
  * backend (or failed locally for any other reason).
15111
- */ function Ts(t, r, i) {
15127
+ */ function Es(t, r, i) {
15112
15128
  return e(this, void 0, void 0, (function() {
15113
15129
  var e, o, u, a;
15114
15130
  return n(this, (function(n) {
@@ -15329,7 +15345,7 @@ function xs(t, r) {
15329
15345
  // raise events immediately (depending on whether the watcher is caught
15330
15346
  // up), so we raise user callbacks first so that they consistently happen
15331
15347
  // before listen events.
15332
- ks(e, i, /*error=*/ null), Cs(e, i), e.sharedClientState.updateMutationState(i, "acknowledged"),
15348
+ ks(e, i, /*error=*/ null), Ns(e, i), e.sharedClientState.updateMutationState(i, "acknowledged"),
15333
15349
  [ 4 /*yield*/ , Ls(e, o) ];
15334
15350
 
15335
15351
  case 3:
@@ -15385,7 +15401,7 @@ function As(t, r, i) {
15385
15401
  // raise events immediately (depending on whether the watcher is caught up),
15386
15402
  // so we raise user callbacks first so that they consistently happen before
15387
15403
  // listen events.
15388
- ks(e, r, i), Cs(e, r), e.sharedClientState.updateMutationState(r, "rejected", i),
15404
+ ks(e, r, i), Ns(e, r), e.sharedClientState.updateMutationState(r, "rejected", i),
15389
15405
  [ 4 /*yield*/ , Ls(e, o) ];
15390
15406
 
15391
15407
  case 3:
@@ -15411,7 +15427,7 @@ function As(t, r, i) {
15411
15427
  /**
15412
15428
  * Registers a user callback that resolves when all pending mutations at the moment of calling
15413
15429
  * are acknowledged .
15414
- */ function Ns(t, r) {
15430
+ */ function Cs(t, r) {
15415
15431
  return e(this, void 0, void 0, (function() {
15416
15432
  var e, i, o, u, a;
15417
15433
  return n(this, (function(n) {
@@ -15446,7 +15462,7 @@ function As(t, r, i) {
15446
15462
  /**
15447
15463
  * Triggers the callbacks that are waiting for this batch id to get acknowledged by server,
15448
15464
  * if there are any.
15449
- */ function Cs(t, e) {
15465
+ */ function Ns(t, e) {
15450
15466
  (t.lc.get(e) || []).forEach((function(t) {
15451
15467
  t.resolve();
15452
15468
  })), t.lc.delete(e)
@@ -15702,7 +15718,7 @@ function Gs(t, r, i, o) {
15702
15718
  "acknowledged" === i || "rejected" === i ? (
15703
15719
  // NOTE: Both these methods are no-ops for batches that originated from
15704
15720
  // other clients.
15705
- ks(e, r, o || null), Cs(e, r), function(t, e) {
15721
+ ks(e, r, o || null), Ns(e, r), function(t, e) {
15706
15722
  G(G(t).mutationQueue).An(e);
15707
15723
  }(e.localStore, r)) : q(), n.label = 4;
15708
15724
 
@@ -16287,7 +16303,7 @@ var Js = /** @class */ function() {
16287
16303
  }, t.prototype.createDatastore = function(t) {
16288
16304
  var e, n = ma(t.databaseInfo.databaseId), r = (e = t.databaseInfo, new pa(e));
16289
16305
  /** Return the Platform-specific connectivity monitor. */ return function(t, e, n, r) {
16290
- return new Ea(t, e, n, r);
16306
+ return new Ta(t, e, n, r);
16291
16307
  }(t.authCredentials, t.appCheckCredentials, r, n);
16292
16308
  }, t.prototype.createRemoteStore = function(t) {
16293
16309
  var e, n, r, i, o, u = this;
@@ -16554,13 +16570,13 @@ function fc(t, e, n, r) {
16554
16570
  ssl: !1
16555
16571
  })), r.mockUserToken) {
16556
16572
  var u, a;
16557
- if ("string" == typeof r.mockUserToken) u = r.mockUserToken, a = C.MOCK_USER; else {
16573
+ if ("string" == typeof r.mockUserToken) u = r.mockUserToken, a = N.MOCK_USER; else {
16558
16574
  // Let createMockUserToken validate first (catches common mistakes like
16559
16575
  // invalid field "uid" and missing field "sub" / "user_id".)
16560
16576
  u = m(r.mockUserToken, null === (i = t._app) || void 0 === i ? void 0 : i.options.projectId);
16561
16577
  var s = r.mockUserToken.sub || r.mockUserToken.user_id;
16562
16578
  if (!s) throw new j(K.INVALID_ARGUMENT, "mockUserToken must contain 'sub' or 'user_id' field!");
16563
- a = new C(s);
16579
+ a = new N(s);
16564
16580
  }
16565
16581
  t._authCredentials = new H(new z(u, a));
16566
16582
  }
@@ -16864,7 +16880,7 @@ function Ic(t, r) {
16864
16880
  * A wrapper implementation of Observer<T> that will dispatch events
16865
16881
  * asynchronously. To allow immediate silencing, a mute call is added which
16866
16882
  * causes events scheduled to no longer be raised.
16867
- */ var Ec = /** @class */ function() {
16883
+ */ var Tc = /** @class */ function() {
16868
16884
  function t(t) {
16869
16885
  this.observer = t,
16870
16886
  /**
@@ -16885,7 +16901,7 @@ function Ic(t, r) {
16885
16901
  n.muted || t(e);
16886
16902
  }), 0);
16887
16903
  }, t;
16888
- }(), Tc = /** @class */ function() {
16904
+ }(), Ec = /** @class */ function() {
16889
16905
  function t(
16890
16906
  /** The reader to read from underlying binary bundle data source. */
16891
16907
  t, e) {
@@ -17163,12 +17179,12 @@ function Ic(t, r) {
17163
17179
  var n = function(t, e) {
17164
17180
  return "found" in e ? function(t, e) {
17165
17181
  U(!!e.found), e.found.name, e.found.updateTime;
17166
- var n = Hr(t, e.found.name), r = jr(e.found.updateTime), i = new en({
17182
+ var n = Hr(t, e.found.name), r = jr(e.found.updateTime), i = e.found.createTime ? jr(e.found.createTime) : at.min(), o = new en({
17167
17183
  mapValue: {
17168
17184
  fields: e.found.fields
17169
17185
  }
17170
17186
  });
17171
- return rn.newFoundDocument(n, r, i);
17187
+ return rn.newFoundDocument(n, r, i, o);
17172
17188
  }(t, e) : "missing" in e ? function(t, e) {
17173
17189
  U(!!e.missing), U(!!e.readTime);
17174
17190
  var n = Hr(t, e.missing), r = jr(e.readTime);
@@ -17346,7 +17362,7 @@ function Ic(t, r) {
17346
17362
  }
17347
17363
  return !1;
17348
17364
  }, t;
17349
- }(), Nc = /** @class */ function() {
17365
+ }(), Cc = /** @class */ function() {
17350
17366
  function t(t, r,
17351
17367
  /**
17352
17368
  * Asynchronous queue responsible for all of our internal processing. When
@@ -17359,7 +17375,7 @@ function Ic(t, r) {
17359
17375
  i, o) {
17360
17376
  var u = this;
17361
17377
  this.authCredentials = t, this.appCheckCredentials = r, this.asyncQueue = i, this.databaseInfo = o,
17362
- this.user = C.UNAUTHENTICATED, this.clientId = nt.R(), this.authCredentialListener = function() {
17378
+ this.user = N.UNAUTHENTICATED, this.clientId = nt.R(), this.authCredentialListener = function() {
17363
17379
  return Promise.resolve();
17364
17380
  }, this.appCheckCredentialListener = function() {
17365
17381
  return Promise.resolve();
@@ -17465,7 +17481,7 @@ function Ic(t, r) {
17465
17481
  *
17466
17482
  * Takes a bundle stream or buffer, and presents abstractions to read bundled
17467
17483
  * elements out of the underlying content.
17468
- */ function Cc(t, r) {
17484
+ */ function Nc(t, r) {
17469
17485
  return e(this, void 0, void 0, (function() {
17470
17486
  var i, o, u = this;
17471
17487
  return n(this, (function(a) {
@@ -17539,7 +17555,7 @@ function Fc(t) {
17539
17555
  switch (e.label) {
17540
17556
  case 0:
17541
17557
  return t.offlineComponents ? [ 3 /*break*/ , 2 ] : (V("FirestoreClient", "Using default OfflineComponentProvider"),
17542
- [ 4 /*yield*/ , Cc(t, new Js) ]);
17558
+ [ 4 /*yield*/ , Nc(t, new Js) ]);
17543
17559
 
17544
17560
  case 1:
17545
17561
  e.sent(), e.label = 2;
@@ -17609,7 +17625,7 @@ function qc(t) {
17609
17625
 
17610
17626
  case 1:
17611
17627
  return e = n.sent(), [ 2 /*return*/ , ((r = e.eventManager).onListen = bs.bind(null, e.syncEngine),
17612
- r.onUnlisten = Es.bind(null, e.syncEngine), r) ];
17628
+ r.onUnlisten = Ts.bind(null, e.syncEngine), r) ];
17613
17629
  }
17614
17630
  }));
17615
17631
  }));
@@ -17626,7 +17642,7 @@ function qc(t) {
17626
17642
  switch (n.label) {
17627
17643
  case 0:
17628
17644
  return e = function(t, e, n, r, i) {
17629
- var o = new Ec({
17645
+ var o = new Tc({
17630
17646
  next: function(o) {
17631
17647
  // Remove query first before passing event to user to avoid
17632
17648
  // user actions affecting the now stale query.
@@ -17673,7 +17689,7 @@ function Bc(t, r, i) {
17673
17689
  switch (n.label) {
17674
17690
  case 0:
17675
17691
  return e = function(t, e, n, r, i) {
17676
- var o = new Ec({
17692
+ var o = new Tc({
17677
17693
  next: function(n) {
17678
17694
  // Remove query first before passing event to user to avoid
17679
17695
  // user actions affecting the now stale query.
@@ -18102,7 +18118,7 @@ function Xc(t) {
18102
18118
  var e, n = t._freezeSettings(), r = function(t, e, n, r) {
18103
18119
  return new Ut(t, e, n, r.host, r.ssl, r.experimentalForceLongPolling, r.experimentalAutoDetectLongPolling, r.useFetchStreams);
18104
18120
  }(t._databaseId, (null === (e = t._app) || void 0 === e ? void 0 : e.options.appId) || "", t._persistenceKey, n);
18105
- t._firestoreClient = new Nc(t._authCredentials, t._appCheckCredentials, t._queue, r);
18121
+ t._firestoreClient = new Cc(t._authCredentials, t._appCheckCredentials, t._queue, r);
18106
18122
  }
18107
18123
 
18108
18124
  /**
@@ -18173,7 +18189,7 @@ function Xc(t) {
18173
18189
  return n(this, (function(n) {
18174
18190
  switch (n.label) {
18175
18191
  case 0:
18176
- return n.trys.push([ 0, 3, , 4 ]), [ 4 /*yield*/ , Cc(t, i) ];
18192
+ return n.trys.push([ 0, 3, , 4 ]), [ 4 /*yield*/ , Nc(t, i) ];
18177
18193
 
18178
18194
  case 1:
18179
18195
  return n.sent(), [ 4 /*yield*/ , kc(t, r) ];
@@ -18222,7 +18238,7 @@ function tl(t) {
18222
18238
  return n(this, (function(n) {
18223
18239
  switch (n.label) {
18224
18240
  case 0:
18225
- return Nt.C() ? (e = t + "main", [ 4 /*yield*/ , Nt.delete(e) ]) : [ 2 /*return*/ , Promise.resolve() ];
18241
+ return Ct.C() ? (e = t + "main", [ 4 /*yield*/ , Ct.delete(e) ]) : [ 2 /*return*/ , Promise.resolve() ];
18226
18242
 
18227
18243
  case 1:
18228
18244
  return n.sent(), [ 2 /*return*/ ];
@@ -18270,7 +18286,7 @@ function el(t) {
18270
18286
  return n(this, (function(n) {
18271
18287
  switch (n.label) {
18272
18288
  case 0:
18273
- return e = Ns, [ 4 /*yield*/ , Lc(t) ];
18289
+ return e = Cs, [ 4 /*yield*/ , Lc(t) ];
18274
18290
 
18275
18291
  case 1:
18276
18292
  return [ 2 /*return*/ , e.apply(void 0, [ n.sent(), i ]) ];
@@ -18419,7 +18435,7 @@ function ol(t, r) {
18419
18435
  return function(t, r, i, o) {
18420
18436
  var u = this, a = function(t, e) {
18421
18437
  return function(t, e) {
18422
- return new Tc(t, e);
18438
+ return new Ec(t, e);
18423
18439
  }(function(t, e) {
18424
18440
  if (t instanceof Uint8Array) return Ic(t, e);
18425
18441
  if (t instanceof ArrayBuffer) return Ic(new Uint8Array(t), e);
@@ -18918,7 +18934,7 @@ var Il = /** @class */ function(e) {
18918
18934
  * context.
18919
18935
  * @param context - The parent context.
18920
18936
  * @param arrayElement - Whether or not the FieldValue has an array.
18921
- */ function El(t, e, n) {
18937
+ */ function Tl(t, e, n) {
18922
18938
  return new ml({
18923
18939
  sa: 3 /* UserDataSource.Argument */ ,
18924
18940
  fa: e.settings.fa,
@@ -18927,7 +18943,7 @@ var Il = /** @class */ function(e) {
18927
18943
  }, e.databaseId, e.yt, e.ignoreUndefinedProperties);
18928
18944
  }
18929
18945
 
18930
- var Tl = /** @class */ function(e) {
18946
+ var El = /** @class */ function(e) {
18931
18947
  function n() {
18932
18948
  return null !== e && e.apply(this, arguments) || this;
18933
18949
  }
@@ -18942,9 +18958,9 @@ var Tl = /** @class */ function(e) {
18942
18958
  return (r = e.call(this, t) || this)._a = n, r;
18943
18959
  }
18944
18960
  return t(n, e), n.prototype._toFieldTransform = function(t) {
18945
- var e = El(this, t,
18961
+ var e = Tl(this, t,
18946
18962
  /*array=*/ !0), n = this._a.map((function(t) {
18947
- return Cl(t, e);
18963
+ return Nl(t, e);
18948
18964
  })), r = new qn(n);
18949
18965
  return new zn(t.path, r);
18950
18966
  }, n.prototype.isEqual = function(t) {
@@ -18957,9 +18973,9 @@ var Tl = /** @class */ function(e) {
18957
18973
  return (r = e.call(this, t) || this)._a = n, r;
18958
18974
  }
18959
18975
  return t(n, e), n.prototype._toFieldTransform = function(t) {
18960
- var e = El(this, t,
18976
+ var e = Tl(this, t,
18961
18977
  /*array=*/ !0), n = this._a.map((function(t) {
18962
- return Cl(t, e);
18978
+ return Nl(t, e);
18963
18979
  })), r = new Bn(n);
18964
18980
  return new zn(t.path, r);
18965
18981
  }, n.prototype.isEqual = function(t) {
@@ -18993,7 +19009,7 @@ var Tl = /** @class */ function(e) {
18993
19009
  if (r instanceof Il)
18994
19010
  // Add it to the field mask, but don't add anything to updateData.
18995
19011
  o.push(a); else {
18996
- var c = Cl(r, s);
19012
+ var c = Nl(r, s);
18997
19013
  null != c && (o.push(a), u.set(a, c));
18998
19014
  }
18999
19015
  }));
@@ -19016,7 +19032,7 @@ var Tl = /** @class */ function(e) {
19016
19032
  if (p instanceof Il)
19017
19033
  // Add it to the field mask, but don't add anything to updateData.
19018
19034
  l.push(d); else {
19019
- var m = Cl(p, v);
19035
+ var m = Nl(p, v);
19020
19036
  null != m && (l.push(d), h.set(d, m));
19021
19037
  }
19022
19038
  }
@@ -19030,8 +19046,8 @@ var Tl = /** @class */ function(e) {
19030
19046
  *
19031
19047
  * @param allowArrays - Whether the query value is an array that may directly
19032
19048
  * contain additional arrays (e.g. the operand of an `in` query).
19033
- */ function Nl(t, e, n, r) {
19034
- return void 0 === r && (r = !1), Cl(n, t.da(r ? 4 /* UserDataSource.ArrayArgument */ : 3 /* UserDataSource.Argument */ , e));
19049
+ */ function Cl(t, e, n, r) {
19050
+ return void 0 === r && (r = !1), Nl(n, t.da(r ? 4 /* UserDataSource.ArrayArgument */ : 3 /* UserDataSource.Argument */ , e));
19035
19051
  }
19036
19052
 
19037
19053
  /**
@@ -19042,7 +19058,7 @@ var Tl = /** @class */ function(e) {
19042
19058
  * the source of the data being parsed, etc.
19043
19059
  * @returns The parsed value, or null if the value was a FieldValue sentinel
19044
19060
  * that should not be included in the resulting parsed data.
19045
- */ function Cl(t, e) {
19061
+ */ function Nl(t, e) {
19046
19062
  if (Fl(
19047
19063
  // Unwrap the API type from the Compat SDK. This will return the API type
19048
19064
  // from firestore-exp.
@@ -19082,7 +19098,7 @@ var Tl = /** @class */ function(e) {
19082
19098
  if (e.settings.oa && 4 /* UserDataSource.ArrayArgument */ !== e.sa) throw e.ha("Nested arrays are not supported");
19083
19099
  return function(t, e) {
19084
19100
  for (var n = [], r = 0, i = 0, o = t; i < o.length; i++) {
19085
- var u = Cl(o[i], e.aa(r));
19101
+ var u = Nl(o[i], e.aa(r));
19086
19102
  null == u && (
19087
19103
  // Just include nulls in the array for fields being replaced with a
19088
19104
  // sentinel.
@@ -19149,7 +19165,7 @@ function kl(t, e) {
19149
19165
  // If we encounter an empty object, we explicitly add it to the update
19150
19166
  // mask to ensure that the server creates a map entry.
19151
19167
  e.path && e.path.length > 0 && e.fieldMask.push(e.path) : Kt(t, (function(t, r) {
19152
- var i = Cl(r, e.ra(t));
19168
+ var i = Nl(r, e.ra(t));
19153
19169
  null != i && (n[t] = i);
19154
19170
  })), {
19155
19171
  mapValue: {
@@ -19424,7 +19440,7 @@ function Bl(t, e) {
19424
19440
  return new n(t, e, r);
19425
19441
  }, n.prototype._apply = function(t) {
19426
19442
  var e = this._parse(t);
19427
- return hh(t._query, e), new pc(t.firestore, t.converter, En(t._query, e));
19443
+ return hh(t._query, e), new pc(t.firestore, t.converter, Tn(t._query, e));
19428
19444
  }, n.prototype._parse = function(t) {
19429
19445
  var e = wl(t.firestore), n = function(t, e, n, r, i, o, u) {
19430
19446
  var a;
@@ -19443,7 +19459,7 @@ function Bl(t, e) {
19443
19459
  };
19444
19460
  } else a = ch(r, t, u);
19445
19461
  } else "in" /* Operator.IN */ !== o && "not-in" /* Operator.NOT_IN */ !== o && "array-contains-any" /* Operator.ARRAY_CONTAINS_ANY */ !== o || lh(u, o),
19446
- a = Nl(n, "where", u,
19462
+ a = Cl(n, "where", u,
19447
19463
  /* allowArrays= */ "in" /* Operator.IN */ === o || "not-in" /* Operator.NOT_IN */ === o);
19448
19464
  return Ae.create(i, o, a);
19449
19465
  }(t._query, 0, e, t.firestore._databaseId, this._field, this._op, this._value);
@@ -19492,15 +19508,15 @@ function Bl(t, e) {
19492
19508
  })).filter((function(t) {
19493
19509
  return t.getFilters().length > 0;
19494
19510
  }));
19495
- return 1 === e.length ? e[0] : Ne.create(e, this._getOperator());
19511
+ return 1 === e.length ? e[0] : Ce.create(e, this._getOperator());
19496
19512
  }, n.prototype._apply = function(t) {
19497
19513
  var e = this._parse(t);
19498
19514
  return 0 === e.getFilters().length ? t : (function(t, e) {
19499
19515
  for (var n = t, r = 0, i = e.getFlattenedFilters(); r < i.length; r++) {
19500
19516
  var o = i[r];
19501
- hh(n, o), n = En(n, o);
19517
+ hh(n, o), n = Tn(n, o);
19502
19518
  }
19503
- }(t._query, e), new pc(t.firestore, t.converter, En(t._query, e)));
19519
+ }(t._query, e), new pc(t.firestore, t.converter, Tn(t._query, e)));
19504
19520
  }, n.prototype._getQueryConstraints = function() {
19505
19521
  return this._queryConstraints;
19506
19522
  }, n.prototype._getOperator = function() {
@@ -19621,7 +19637,7 @@ var Zl = /** @class */ function(e) {
19621
19637
  return t(n, e), n._create = function(t, e, r) {
19622
19638
  return new n(t, e, r);
19623
19639
  }, n.prototype._apply = function(t) {
19624
- return new pc(t.firestore, t.converter, Tn(t._query, this._limit, this._limitType));
19640
+ return new pc(t.firestore, t.converter, En(t._query, this._limit, this._limitType));
19625
19641
  }, n;
19626
19642
  }(jl);
19627
19643
 
@@ -19767,7 +19783,7 @@ function ah() {
19767
19783
  var h = new ft(l);
19768
19784
  a.push(fe(e, h));
19769
19785
  } else {
19770
- var f = Nl(n, r, c);
19786
+ var f = Cl(n, r, c);
19771
19787
  a.push(f);
19772
19788
  }
19773
19789
  }
@@ -20200,7 +20216,7 @@ var vh = /** @class */ function(e) {
20200
20216
  * @param left - A snapshot to compare.
20201
20217
  * @param right - A snapshot to compare.
20202
20218
  * @returns true if the snapshots are equal.
20203
- */ function Eh(t, e) {
20219
+ */ function Th(t, e) {
20204
20220
  return t instanceof gh && e instanceof gh ? 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 bh && e instanceof bh && t._firestore === e._firestore && bc(t.query, e.query) && t.metadata.isEqual(e.metadata) && t._snapshot.isEqual(e._snapshot);
20205
20221
  }
20206
20222
 
@@ -20231,7 +20247,7 @@ var vh = /** @class */ function(e) {
20231
20247
  * @param reference - The reference of the document to fetch.
20232
20248
  * @returns A Promise resolved with a `DocumentSnapshot` containing the
20233
20249
  * current document contents.
20234
- */ function Th(t) {
20250
+ */ function Eh(t) {
20235
20251
  t = ac(t, dc);
20236
20252
  var e = ac(t.firestore, zc);
20237
20253
  return Uc(Yc(e), t._key).then((function(n) {
@@ -20399,7 +20415,7 @@ function Ah(t) {
20399
20415
  * server. Returns an error if the network is not available.
20400
20416
  *
20401
20417
  * @returns A `Promise` that will be resolved with the results of the query.
20402
- */ function Nh(t) {
20418
+ */ function Ch(t) {
20403
20419
  t = ac(t, pc);
20404
20420
  var e = ac(t.firestore, zc), n = Yc(e), r = new Sh(e);
20405
20421
  return Bc(n, t._query, {
@@ -20409,7 +20425,7 @@ function Ah(t) {
20409
20425
  }));
20410
20426
  }
20411
20427
 
20412
- function Ch(t, e, n) {
20428
+ function Nh(t, e, n) {
20413
20429
  t = ac(t, dc);
20414
20430
  var r = ac(t.firestore, zc), i = yh(t.converter, e, n);
20415
20431
  return Mh(r, [ bl(wl(r), "setDoc", t._key, i, null !== t.converter, n).toMutation(t._key, Hn.none()) ]);
@@ -20485,7 +20501,7 @@ function Rh(t) {
20485
20501
  }, Gl(t._query);
20486
20502
  }
20487
20503
  return function(t, r, i, o) {
20488
- var u = this, a = new Ec(o), s = new cs(r, a, i);
20504
+ var u = this, a = new Tc(o), s = new cs(r, a, i);
20489
20505
  return t.asyncQueue.enqueueAndForget((function() {
20490
20506
  return e(u, void 0, void 0, (function() {
20491
20507
  var e;
@@ -20520,7 +20536,7 @@ function Rh(t) {
20520
20536
 
20521
20537
  function Vh(t, r) {
20522
20538
  return function(t, r) {
20523
- var i = this, o = new Ec(r);
20539
+ var i = this, o = new Tc(r);
20524
20540
  return t.asyncQueue.enqueueAndForget((function() {
20525
20541
  return e(i, void 0, void 0, (function() {
20526
20542
  var e;
@@ -20574,7 +20590,7 @@ function Vh(t, r) {
20574
20590
  return n(this, (function(n) {
20575
20591
  switch (n.label) {
20576
20592
  case 0:
20577
- return e = Ts, [ 4 /*yield*/ , Lc(t) ];
20593
+ return e = Es, [ 4 /*yield*/ , Lc(t) ];
20578
20594
 
20579
20595
  case 1:
20580
20596
  return [ 2 /*return*/ , e.apply(void 0, [ n.sent(), r, o ]) ];
@@ -20973,7 +20989,7 @@ function Vh(t, r) {
20973
20989
  * Returns a sentinel used with {@link @firebase/firestore/lite#(setDoc:1)} or {@link @firebase/firestore/lite#(updateDoc:1)} to
20974
20990
  * include a server-generated timestamp in the written data.
20975
20991
  */ function Wh() {
20976
- return new Tl("serverTimestamp");
20992
+ return new El("serverTimestamp");
20977
20993
  }
20978
20994
 
20979
20995
  /**
@@ -21158,9 +21174,9 @@ function $h(t, e) {
21158
21174
  return r = Object.assign({
21159
21175
  useFetchStreams: Kh
21160
21176
  }, r), o._setSettings(r), o;
21161
- }), "PUBLIC").setMultipleInstances(!0)), u(N, "3.7.3-canary.3bd031691", void 0),
21177
+ }), "PUBLIC").setMultipleInstances(!0)), u(C, "3.7.3-canary.734fdcd91", void 0),
21162
21178
  // BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation
21163
- u(N, "3.7.3-canary.3bd031691", "esm5");
21179
+ u(C, "3.7.3-canary.734fdcd91", "esm5");
21164
21180
 
21165
- export { ph as AbstractUserDataWriter, Sc as AggregateField, _c as AggregateQuerySnapshot, sl as Bytes, Qc as CACHE_SIZE_UNLIMITED, yc as CollectionReference, dc as DocumentReference, gh as DocumentSnapshot, cl as FieldPath, hl as FieldValue, zc as Firestore, j as FirestoreError, fl as GeoPoint, jc as LoadBundleTask, pc as Query, Hl as QueryCompositeFilterConstraint, jl as QueryConstraint, wh as QueryDocumentSnapshot, oh as QueryEndAtConstraint, zl as QueryFieldFilterConstraint, $l as QueryLimitConstraint, Zl as QueryOrderByConstraint, bh as QuerySnapshot, nh as QueryStartAtConstraint, mh as SnapshotMetadata, ut as Timestamp, jh as Transaction, Bh as WriteBatch, Bt as _DatabaseId, ft as _DocumentKey, tt as _EmptyAppCheckTokenProvider, W as _EmptyAuthCredentialsProvider, ht as _FieldPath, ac as _cast, B as _debugAssert, Ht as _isBase64Available, L as _logWarn, rc as _validateIsNotUsedTogether, Oh as addDoc, Ph as aggregateQuerySnapshotEqual, Xl as and, Yh as arrayRemove, Hh as arrayUnion, tl as clearIndexedDbPersistence, vc as collection, mc as collectionGroup, fc as connectFirestoreEmulator, Fh as deleteDoc, zh as deleteField, rl as disableNetwork, gc as doc, ll as documentId, Zc as enableIndexedDbPersistence, Jc as enableMultiTabIndexedDbPersistence, nl as enableNetwork, ah as endAt, uh as endBefore, Yc as ensureFirestoreConfigured, Mh as executeWrite, qh as getCountFromServer, Th as getDoc, _h as getDocFromCache, Dh as getDocFromServer, xh as getDocs, Ah as getDocsFromCache, Nh as getDocsFromServer, Hc as getFirestore, Xh as increment, Wc as initializeFirestore, th as limit, eh as limitToLast, ol as loadBundle, ul as namedQuery, Rh as onSnapshot, Vh as onSnapshotsInSync, Yl as or, Jl as orderBy, Ql as query, bc as queryEqual, wc as refEqual, Qh as runTransaction, Wh as serverTimestamp, Ch as setDoc, Jh as setIndexConfiguration, R as setLogLevel, Eh as snapshotEqual, ih as startAfter, rh as startAt, il as terminate, kh as updateDoc, el as waitForPendingWrites, Wl as where, Zh as writeBatch };
21181
+ export { ph as AbstractUserDataWriter, Sc as AggregateField, _c as AggregateQuerySnapshot, sl as Bytes, Qc as CACHE_SIZE_UNLIMITED, yc as CollectionReference, dc as DocumentReference, gh as DocumentSnapshot, cl as FieldPath, hl as FieldValue, zc as Firestore, j as FirestoreError, fl as GeoPoint, jc as LoadBundleTask, pc as Query, Hl as QueryCompositeFilterConstraint, jl as QueryConstraint, wh as QueryDocumentSnapshot, oh as QueryEndAtConstraint, zl as QueryFieldFilterConstraint, $l as QueryLimitConstraint, Zl as QueryOrderByConstraint, bh as QuerySnapshot, nh as QueryStartAtConstraint, mh as SnapshotMetadata, ut as Timestamp, jh as Transaction, Bh as WriteBatch, Bt as _DatabaseId, ft as _DocumentKey, tt as _EmptyAppCheckTokenProvider, W as _EmptyAuthCredentialsProvider, ht as _FieldPath, ac as _cast, B as _debugAssert, Ht as _isBase64Available, L as _logWarn, rc as _validateIsNotUsedTogether, Oh as addDoc, Ph as aggregateQuerySnapshotEqual, Xl as and, Yh as arrayRemove, Hh as arrayUnion, tl as clearIndexedDbPersistence, vc as collection, mc as collectionGroup, fc as connectFirestoreEmulator, Fh as deleteDoc, zh as deleteField, rl as disableNetwork, gc as doc, ll as documentId, Zc as enableIndexedDbPersistence, Jc as enableMultiTabIndexedDbPersistence, nl as enableNetwork, ah as endAt, uh as endBefore, Yc as ensureFirestoreConfigured, Mh as executeWrite, qh as getCountFromServer, Eh as getDoc, _h as getDocFromCache, Dh as getDocFromServer, xh as getDocs, Ah as getDocsFromCache, Ch as getDocsFromServer, Hc as getFirestore, Xh as increment, Wc as initializeFirestore, th as limit, eh as limitToLast, ol as loadBundle, ul as namedQuery, Rh as onSnapshot, Vh as onSnapshotsInSync, Yl as or, Jl as orderBy, Ql as query, bc as queryEqual, wc as refEqual, Qh as runTransaction, Wh as serverTimestamp, Nh as setDoc, Jh as setIndexConfiguration, R as setLogLevel, Th as snapshotEqual, ih as startAfter, rh as startAt, il as terminate, kh as updateDoc, el as waitForPendingWrites, Wl as where, Zh as writeBatch };
21166
21182
  //# sourceMappingURL=index.esm5.js.map