@firebase/firestore 4.6.1-dataconnect-preview.42eb5e521 → 4.6.2-20240508213348

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.
@@ -8,24 +8,6 @@ import { Logger as l, LogLevel as f } from "@firebase/logger";
8
8
 
9
9
  import { FirebaseError as h, deepEqual as p, getModularInstance as d, getDefaultEmulatorHostnameAndPort as y, createMockUserToken as m } from "@firebase/util";
10
10
 
11
- var v = "4.6.1-dataconnect-preview.42eb5e521", g = /** @class */ function() {
12
- function t(t) {
13
- this.uid = t;
14
- }
15
- return t.prototype.isAuthenticated = function() {
16
- return null != this.uid;
17
- },
18
- /**
19
- * Returns a key representing this user, suitable for inclusion in a
20
- * dictionary.
21
- */
22
- t.prototype.toKey = function() {
23
- return this.isAuthenticated() ? "uid:" + this.uid : "anonymous-user";
24
- }, t.prototype.isEqual = function(t) {
25
- return t.uid === this.uid;
26
- }, t;
27
- }();
28
-
29
11
  /**
30
12
  * @license
31
13
  * Copyright 2017 Google LLC
@@ -45,7 +27,24 @@ var v = "4.6.1-dataconnect-preview.42eb5e521", g = /** @class */ function() {
45
27
  /**
46
28
  * Simple wrapper around a nullable UID. Mostly exists to make code more
47
29
  * readable.
48
- */
30
+ */ var g = /** @class */ function() {
31
+ function t(t) {
32
+ this.uid = t;
33
+ }
34
+ return t.prototype.isAuthenticated = function() {
35
+ return null != this.uid;
36
+ },
37
+ /**
38
+ * Returns a key representing this user, suitable for inclusion in a
39
+ * dictionary.
40
+ */
41
+ t.prototype.toKey = function() {
42
+ return this.isAuthenticated() ? "uid:" + this.uid : "anonymous-user";
43
+ }, t.prototype.isEqual = function(t) {
44
+ return t.uid === this.uid;
45
+ }, t;
46
+ }();
47
+
49
48
  /** A user with a null UID. */ g.UNAUTHENTICATED = new g(null),
50
49
  // TODO(mikelehen): Look into getting a proper uid-equivalent for
51
50
  // non-FirebaseAuth providers.
@@ -68,7 +67,7 @@ g.MOCK_USER = new g("mock-user");
68
67
  * See the License for the specific language governing permissions and
69
68
  * limitations under the License.
70
69
  */
71
- var w = "10.11.1-dataconnect-preview.42eb5e521", _ = new l("@firebase/firestore");
70
+ var v = "10.12.0-20240508213348", w = new l("@firebase/firestore");
72
71
 
73
72
  /**
74
73
  * @license
@@ -99,39 +98,39 @@ var w = "10.11.1-dataconnect-preview.42eb5e521", _ = new l("@firebase/firestore"
99
98
  * <li><code>`silent` to turn off logging.</li>
100
99
  * </ul>
101
100
  */
102
- function b(t) {
103
- _.setLogLevel(t);
101
+ function _(t) {
102
+ w.setLogLevel(t);
104
103
  }
105
104
 
106
- function T(t) {
105
+ function b(t) {
107
106
  for (var e = [], n = 1; n < arguments.length; n++) e[n - 1] = arguments[n];
108
- if (_.logLevel <= f.DEBUG) {
109
- var i = e.map(k);
110
- _.debug.apply(_, r([ "Firestore (".concat(w, "): ").concat(t) ], i, !1));
107
+ if (w.logLevel <= f.DEBUG) {
108
+ var i = e.map(S);
109
+ w.debug.apply(w, r([ "Firestore (".concat(v, "): ").concat(t) ], i, !1));
111
110
  }
112
111
  }
113
112
 
114
- function E(t) {
113
+ function T(t) {
115
114
  for (var e = [], n = 1; n < arguments.length; n++) e[n - 1] = arguments[n];
116
- if (_.logLevel <= f.ERROR) {
117
- var i = e.map(k);
118
- _.error.apply(_, r([ "Firestore (".concat(w, "): ").concat(t) ], i, !1));
115
+ if (w.logLevel <= f.ERROR) {
116
+ var i = e.map(S);
117
+ w.error.apply(w, r([ "Firestore (".concat(v, "): ").concat(t) ], i, !1));
119
118
  }
120
119
  }
121
120
 
122
121
  /**
123
122
  * @internal
124
- */ function S(t) {
123
+ */ function E(t) {
125
124
  for (var e = [], n = 1; n < arguments.length; n++) e[n - 1] = arguments[n];
126
- if (_.logLevel <= f.WARN) {
127
- var i = e.map(k);
128
- _.warn.apply(_, r([ "Firestore (".concat(w, "): ").concat(t) ], i, !1));
125
+ if (w.logLevel <= f.WARN) {
126
+ var i = e.map(S);
127
+ w.warn.apply(w, r([ "Firestore (".concat(v, "): ").concat(t) ], i, !1));
129
128
  }
130
129
  }
131
130
 
132
131
  /**
133
132
  * Converts an additional log parameter to a string representation.
134
- */ function k(t) {
133
+ */ function S(t) {
135
134
  if ("string" == typeof t) return t;
136
135
  try {
137
136
  /**
@@ -183,15 +182,15 @@ function E(t) {
183
182
  * Returns `never` and can be used in expressions:
184
183
  * @example
185
184
  * let futureVar = fail('not implemented yet');
186
- */ function I(t) {
185
+ */ function k(t) {
187
186
  void 0 === t && (t = "Unexpected state");
188
187
  // Log the failure in addition to throw an exception, just in case the
189
188
  // exception is swallowed.
190
- var e = "FIRESTORE (".concat(w, ") INTERNAL ASSERTION FAILED: ") + t;
189
+ var e = "FIRESTORE (".concat(v, ") INTERNAL ASSERTION FAILED: ") + t;
191
190
  // NOTE: We don't use FirestoreError here because these are internal failures
192
191
  // that cannot be handled by the user. (Also it would create a circular
193
192
  // dependency between the error and assert modules which doesn't work.)
194
- throw E(e), new Error(e)
193
+ throw T(e), new Error(e)
195
194
  /**
196
195
  * Fails if the given assertion condition is false, throwing an Error with the
197
196
  * given message if it did.
@@ -200,14 +199,14 @@ function E(t) {
200
199
  */;
201
200
  }
202
201
 
203
- function A(t, e) {
204
- t || I();
202
+ function I(t, e) {
203
+ t || k();
205
204
  }
206
205
 
207
206
  /**
208
207
  * Casts `obj` to `T`. In non-production builds, verifies that `obj` is an
209
208
  * instance of `T` before casting.
210
- */ function P(t,
209
+ */ function A(t,
211
210
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
212
211
  e) {
213
212
  return t;
@@ -228,7 +227,7 @@ e) {
228
227
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
229
228
  * See the License for the specific language governing permissions and
230
229
  * limitations under the License.
231
- */ var F = "cancelled", O = "unknown", V = "invalid-argument", N = "deadline-exceeded", D = "not-found", R = "permission-denied", q = "unauthenticated", x = "resource-exhausted", C = "failed-precondition", j = "aborted", L = "out-of-range", M = "unimplemented", U = "internal", B = "unavailable", z = /** @class */ function(e) {
230
+ */ var P = "cancelled", F = "unknown", O = "invalid-argument", V = "deadline-exceeded", N = "not-found", D = "permission-denied", R = "unauthenticated", q = "resource-exhausted", x = "failed-precondition", C = "aborted", j = "out-of-range", L = "unimplemented", M = "internal", U = "unavailable", B = /** @class */ function(e) {
232
231
  /** @hideconstructor */
233
232
  function n(
234
233
  /**
@@ -249,14 +248,14 @@ e) {
249
248
  }, r;
250
249
  }
251
250
  return t(n, e), n;
252
- }(h), G = function() {
251
+ }(h), z = function() {
253
252
  var t = this;
254
253
  this.promise = new Promise((function(e, n) {
255
254
  t.resolve = e, t.reject = n;
256
255
  }));
257
- }, K = function(t, e) {
256
+ }, G = function(t, e) {
258
257
  this.user = e, this.type = "OAuth", this.headers = new Map, this.headers.set("Authorization", "Bearer ".concat(t));
259
- }, Q = /** @class */ function() {
258
+ }, K = /** @class */ function() {
260
259
  function t() {}
261
260
  return t.prototype.getToken = function() {
262
261
  return Promise.resolve(null);
@@ -266,7 +265,7 @@ e) {
266
265
  return e(g.UNAUTHENTICATED);
267
266
  }));
268
267
  }, t.prototype.shutdown = function() {}, t;
269
- }(), Y = /** @class */ function() {
268
+ }(), Q = /** @class */ function() {
270
269
  function t(t) {
271
270
  this.token = t,
272
271
  /**
@@ -288,7 +287,7 @@ e) {
288
287
  }, t.prototype.shutdown = function() {
289
288
  this.changeListener = null;
290
289
  }, t;
291
- }(), H = /** @class */ function() {
290
+ }(), Y = /** @class */ function() {
292
291
  function t(t) {
293
292
  var e = this;
294
293
  this.auth = null, t.onInit((function(t) {
@@ -298,11 +297,11 @@ e) {
298
297
  return t.prototype.getToken = function() {
299
298
  var t = this;
300
299
  return this.auth ? this.auth.getToken().then((function(e) {
301
- return e ? (A("string" == typeof e.accessToken), new K(e.accessToken, new g(t.auth.getUid()))) : null;
300
+ return e ? (I("string" == typeof e.accessToken), new G(e.accessToken, new g(t.auth.getUid()))) : null;
302
301
  })) : Promise.resolve(null);
303
302
  }, t.prototype.invalidateToken = function() {}, t.prototype.start = function(t, e) {},
304
303
  t.prototype.shutdown = function() {}, t;
305
- }(), W = /** @class */ function() {
304
+ }(), H = /** @class */ function() {
306
305
  function t(t, e, n) {
307
306
  this.t = t, this.i = e, this.o = n, this.type = "FirstParty", this.user = g.FIRST_PARTY,
308
307
  this.u = new Map
@@ -324,12 +323,12 @@ e) {
324
323
  enumerable: !1,
325
324
  configurable: !0
326
325
  }), t;
327
- }(), J = /** @class */ function() {
326
+ }(), W = /** @class */ function() {
328
327
  function t(t, e, n) {
329
328
  this.t = t, this.i = e, this.o = n;
330
329
  }
331
330
  return t.prototype.getToken = function() {
332
- return Promise.resolve(new W(this.t, this.i, this.o));
331
+ return Promise.resolve(new H(this.t, this.i, this.o));
333
332
  }, t.prototype.start = function(t, e) {
334
333
  // Fire with initial uid.
335
334
  t.enqueueRetryable((function() {
@@ -337,9 +336,9 @@ e) {
337
336
  }));
338
337
  }, t.prototype.shutdown = function() {}, t.prototype.invalidateToken = function() {},
339
338
  t;
340
- }(), X = function(t) {
339
+ }(), J = function(t) {
341
340
  this.value = t, this.type = "AppCheck", this.headers = new Map, t && t.length > 0 && this.headers.set("x-firebase-appcheck", this.value);
342
- }, Z = /** @class */ function() {
341
+ }, X = /** @class */ function() {
343
342
  function t(t) {
344
343
  var e = this;
345
344
  this.h = t, this.appCheck = null, t.onInit((function(t) {
@@ -348,11 +347,11 @@ e) {
348
347
  }
349
348
  return t.prototype.getToken = function() {
350
349
  return this.appCheck ? this.appCheck.getToken().then((function(t) {
351
- return t ? (A("string" == typeof t.token), new X(t.token)) : null;
350
+ return t ? (I("string" == typeof t.token), new J(t.token)) : null;
352
351
  })) : Promise.resolve(null);
353
352
  }, t.prototype.invalidateToken = function() {}, t.prototype.start = function(t, e) {},
354
353
  t.prototype.shutdown = function() {}, t;
355
- }(), $ =
354
+ }(), Z =
356
355
  /**
357
356
  * Constructs a DatabaseInfo using the provided host, databaseId and
358
357
  * persistenceKey.
@@ -375,7 +374,7 @@ function(t, e, n, r, i, o, a, u, s) {
375
374
  this.databaseId = t, this.appId = e, this.persistenceKey = n, this.host = r, this.ssl = i,
376
375
  this.forceLongPolling = o, this.autoDetectLongPolling = a, this.longPollingOptions = u,
377
376
  this.useFetchStreams = s;
378
- }, tt = /** @class */ function() {
377
+ }, $ = /** @class */ function() {
379
378
  function t(t, e) {
380
379
  this.projectId = t, this.database = e || "(default)";
381
380
  }
@@ -390,9 +389,9 @@ function(t, e, n, r, i, o, a, u, s) {
390
389
  }), t.prototype.isEqual = function(e) {
391
390
  return e instanceof t && e.projectId === this.projectId && e.database === this.database;
392
391
  }, t;
393
- }(), et = /** @class */ function() {
392
+ }(), tt = /** @class */ function() {
394
393
  function t(t, e, n) {
395
- void 0 === e ? e = 0 : e > t.length && I(), void 0 === n ? n = t.length - e : n > t.length - e && I(),
394
+ void 0 === e ? e = 0 : e > t.length && k(), void 0 === n ? n = t.length - e : n > t.length - e && k(),
396
395
  this.segments = t, this.offset = e, this.len = n;
397
396
  }
398
397
  return Object.defineProperty(t.prototype, "length", {
@@ -443,7 +442,7 @@ function(t, e, n, r, i, o, a, u, s) {
443
442
  }
444
443
  return t.length < e.length ? -1 : t.length > e.length ? 1 : 0;
445
444
  }, t;
446
- }(), nt = /** @class */ function(e) {
445
+ }(), et = /** @class */ function(e) {
447
446
  function n() {
448
447
  return null !== e && e.apply(this, arguments) || this;
449
448
  }
@@ -477,7 +476,7 @@ function(t, e, n, r, i, o, a, u, s) {
477
476
  // for legacy reasons and should not be used frequently).
478
477
  for (var r = [], i = 0, o = t; i < o.length; i++) {
479
478
  var a = o[i];
480
- if (a.indexOf("//") >= 0) throw new z(V, "Invalid segment (".concat(a, "). Paths must not contain // in them."));
479
+ if (a.indexOf("//") >= 0) throw new B(O, "Invalid segment (".concat(a, "). Paths must not contain // in them."));
481
480
  // Strip leading and traling slashed.
482
481
  r.push.apply(r, a.split("/").filter((function(t) {
483
482
  return t.length > 0;
@@ -487,7 +486,7 @@ function(t, e, n, r, i, o, a, u, s) {
487
486
  }, n.emptyPath = function() {
488
487
  return new n([]);
489
488
  }, n;
490
- }(et), rt = /^[_a-zA-Z][_a-zA-Z0-9]*$/, it = /** @class */ function(e) {
489
+ }(tt), nt = /^[_a-zA-Z][_a-zA-Z0-9]*$/, rt = /** @class */ function(e) {
491
490
  function n() {
492
491
  return null !== e && e.apply(this, arguments) || this;
493
492
  }
@@ -499,7 +498,7 @@ function(t, e, n, r, i, o, a, u, s) {
499
498
  * without escaping.
500
499
  */
501
500
  n.isValidIdentifier = function(t) {
502
- return rt.test(t);
501
+ return nt.test(t);
503
502
  }, n.prototype.canonicalString = function() {
504
503
  return this.toArray().map((function(t) {
505
504
  return t = t.replace(/\\/g, "\\\\").replace(/`/g, "\\`"), n.isValidIdentifier(t) || (t = "`" + t + "`"),
@@ -532,32 +531,32 @@ function(t, e, n, r, i, o, a, u, s) {
532
531
  */
533
532
  n.fromServerFormat = function(t) {
534
533
  for (var e = [], r = "", i = 0, o = function() {
535
- if (0 === r.length) throw new z(V, "Invalid field path (".concat(t, "). Paths must not be empty, begin with '.', end with '.', or contain '..'"));
534
+ if (0 === r.length) throw new B(O, "Invalid field path (".concat(t, "). Paths must not be empty, begin with '.', end with '.', or contain '..'"));
536
535
  e.push(r), r = "";
537
536
  }, a = !1; i < t.length; ) {
538
537
  var u = t[i];
539
538
  if ("\\" === u) {
540
- if (i + 1 === t.length) throw new z(V, "Path has trailing escape character: " + t);
539
+ if (i + 1 === t.length) throw new B(O, "Path has trailing escape character: " + t);
541
540
  var s = t[i + 1];
542
- if ("\\" !== s && "." !== s && "`" !== s) throw new z(V, "Path has invalid escape sequence: " + t);
541
+ if ("\\" !== s && "." !== s && "`" !== s) throw new B(O, "Path has invalid escape sequence: " + t);
543
542
  r += s, i += 2;
544
543
  } else "`" === u ? (a = !a, i++) : "." !== u || a ? (r += u, i++) : (o(), i++);
545
544
  }
546
- if (o(), a) throw new z(V, "Unterminated ` in path: " + t);
545
+ if (o(), a) throw new B(O, "Unterminated ` in path: " + t);
547
546
  return new n(e);
548
547
  }, n.emptyPath = function() {
549
548
  return new n([]);
550
549
  }, n;
551
- }(et), ot = /** @class */ function() {
550
+ }(tt), it = /** @class */ function() {
552
551
  function t(t) {
553
552
  this.path = t;
554
553
  }
555
554
  return t.fromPath = function(e) {
556
- return new t(nt.fromString(e));
555
+ return new t(et.fromString(e));
557
556
  }, t.fromName = function(e) {
558
- return new t(nt.fromString(e).popFirst(5));
557
+ return new t(et.fromString(e).popFirst(5));
559
558
  }, t.empty = function() {
560
- return new t(nt.emptyPath());
559
+ return new t(et.emptyPath());
561
560
  }, Object.defineProperty(t.prototype, "collectionGroup", {
562
561
  get: function() {
563
562
  return this.path.popLast().lastSegment();
@@ -574,11 +573,11 @@ function(t, e, n, r, i, o, a, u, s) {
574
573
  /** Returns the fully qualified path to the parent collection. */ t.prototype.getCollectionPath = function() {
575
574
  return this.path.popLast();
576
575
  }, t.prototype.isEqual = function(t) {
577
- return null !== t && 0 === nt.comparator(this.path, t.path);
576
+ return null !== t && 0 === et.comparator(this.path, t.path);
578
577
  }, t.prototype.toString = function() {
579
578
  return this.path.toString();
580
579
  }, t.comparator = function(t, e) {
581
- return nt.comparator(t.path, e.path);
580
+ return et.comparator(t.path, e.path);
582
581
  }, t.isDocumentKey = function(t) {
583
582
  return t.length % 2 == 0;
584
583
  },
@@ -589,7 +588,7 @@ function(t, e, n, r, i, o, a, u, s) {
589
588
  * @returns A new instance of DocumentKey
590
589
  */
591
590
  t.fromSegments = function(e) {
592
- return new t(new nt(e.slice()));
591
+ return new t(new et(e.slice()));
593
592
  }, t;
594
593
  }();
595
594
 
@@ -610,8 +609,8 @@ function(t, e, n, r, i, o, a, u, s) {
610
609
  * See the License for the specific language governing permissions and
611
610
  * limitations under the License.
612
611
  */
613
- function at(t, e, n) {
614
- if (!n) throw new z(V, "Function ".concat(t, "() cannot be called with an empty ").concat(e, "."));
612
+ function ot(t, e, n) {
613
+ if (!n) throw new B(O, "Function ".concat(t, "() cannot be called with an empty ").concat(e, "."));
615
614
  }
616
615
 
617
616
  /**
@@ -621,22 +620,22 @@ function at(t, e, n) {
621
620
  /**
622
621
  * Validates that `path` refers to a document (indicated by the fact it contains
623
622
  * an even numbers of segments).
624
- */ function ut(t) {
625
- if (!ot.isDocumentKey(t)) throw new z(V, "Invalid document reference. Document references must have an even number of segments, but ".concat(t, " has ").concat(t.length, "."));
623
+ */ function at(t) {
624
+ if (!it.isDocumentKey(t)) throw new B(O, "Invalid document reference. Document references must have an even number of segments, but ".concat(t, " has ").concat(t.length, "."));
626
625
  }
627
626
 
628
627
  /**
629
628
  * Validates that `path` refers to a collection (indicated by the fact it
630
629
  * contains an odd numbers of segments).
631
- */ function st(t) {
632
- if (ot.isDocumentKey(t)) throw new z(V, "Invalid collection reference. Collection references must have an odd number of segments, but ".concat(t, " has ").concat(t.length, "."));
630
+ */ function ut(t) {
631
+ if (it.isDocumentKey(t)) throw new B(O, "Invalid collection reference. Collection references must have an odd number of segments, but ".concat(t, " has ").concat(t.length, "."));
633
632
  }
634
633
 
635
634
  /**
636
635
  * Returns true if it's a non-null object without a custom prototype
637
636
  * (i.e. excludes Array, Date, etc.).
638
637
  */
639
- /** Returns a string describing the type / value of the provided input. */ function ct(t) {
638
+ /** Returns a string describing the type / value of the provided input. */ function st(t) {
640
639
  if (void 0 === t) return "undefined";
641
640
  if (null === t) return "null";
642
641
  if ("string" == typeof t) return t.length > 20 && (t = "".concat(t.substring(0, 20), "...")),
@@ -651,25 +650,25 @@ function at(t, e, n) {
651
650
  }(t);
652
651
  return e ? "a custom ".concat(e, " object") : "an object";
653
652
  }
654
- return "function" == typeof t ? "a function" : I();
653
+ return "function" == typeof t ? "a function" : k();
655
654
  }
656
655
 
657
- function lt(t,
656
+ function ct(t,
658
657
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
659
658
  e) {
660
659
  if ("_delegate" in t && (
661
660
  // Unwrap Compat types
662
661
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
663
662
  t = t._delegate), !(t instanceof e)) {
664
- if (e.name === t.constructor.name) throw new z(V, "Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");
665
- var n = ct(t);
666
- throw new z(V, "Expected type '".concat(e.name, "', but it was: ").concat(n));
663
+ if (e.name === t.constructor.name) throw new B(O, "Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");
664
+ var n = st(t);
665
+ throw new B(O, "Expected type '".concat(e.name, "', but it was: ").concat(n));
667
666
  }
668
667
  return t;
669
668
  }
670
669
 
671
- function ft(t, e) {
672
- if (e <= 0) throw new z(V, "Function ".concat(t, "() requires a positive number, but it was: ").concat(e, "."));
670
+ function lt(t, e) {
671
+ if (e <= 0) throw new B(O, "Function ".concat(t, "() requires a positive number, but it was: ").concat(e, "."));
673
672
  }
674
673
 
675
674
  /**
@@ -694,7 +693,7 @@ function ft(t, e) {
694
693
  /**
695
694
  * Creates and returns a new `ExperimentalLongPollingOptions` with the same
696
695
  * option values as the given instance.
697
- */ function ht(t) {
696
+ */ function ft(t) {
698
697
  var e = {};
699
698
  return void 0 !== t.timeoutSeconds && (e.timeoutSeconds = t.timeoutSeconds), e
700
699
  /**
@@ -719,7 +718,7 @@ function ft(t, e) {
719
718
  */;
720
719
  }
721
720
 
722
- var pt = null;
721
+ var ht = null;
723
722
 
724
723
  /**
725
724
  * Generates and returns an initial value for `lastUniqueDebugId`.
@@ -762,11 +761,11 @@ var pt = null;
762
761
  /**
763
762
  * Returns whether a variable is either undefined or null.
764
763
  */
765
- function dt(t) {
764
+ function pt(t) {
766
765
  return null == t;
767
766
  }
768
767
 
769
- /** Returns whether the value represents -0. */ function yt(t) {
768
+ /** Returns whether the value represents -0. */ function dt(t) {
770
769
  // Detect if the value is -0.0. Based on polyfill from
771
770
  // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
772
771
  return 0 === t && 1 / t == -1 / 0;
@@ -791,7 +790,7 @@ function dt(t) {
791
790
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
792
791
  * See the License for the specific language governing permissions and
793
792
  * limitations under the License.
794
- */ var mt, vt, gt = {
793
+ */ var yt, mt, gt = {
795
794
  BatchGetDocuments: "batchGet",
796
795
  Commit: "commit",
797
796
  RunQuery: "runQuery",
@@ -836,8 +835,8 @@ function dt(t) {
836
835
  * @returns The equivalent Code. Unknown status codes are mapped to
837
836
  * Code.UNKNOWN.
838
837
  */
839
- function wt(t) {
840
- if (void 0 === t) return E("RPC_ERROR", "HTTP error has no status"), O;
838
+ function vt(t) {
839
+ if (void 0 === t) return T("RPC_ERROR", "HTTP error has no status"), F;
841
840
  // The canonical error codes for Google APIs [1] specify mapping onto HTTP
842
841
  // status codes but the mapping is not bijective. In each case of ambiguity
843
842
  // this function chooses a primary error.
@@ -850,62 +849,62 @@ function wt(t) {
850
849
 
851
850
  case 400:
852
851
  // Bad Request
853
- return C;
852
+ return x;
854
853
 
855
854
  // Other possibilities based on the forward mapping
856
855
  // return Code.INVALID_ARGUMENT;
857
856
  // return Code.OUT_OF_RANGE;
858
857
  case 401:
859
858
  // Unauthorized
860
- return q;
859
+ return R;
861
860
 
862
861
  case 403:
863
862
  // Forbidden
864
- return R;
863
+ return D;
865
864
 
866
865
  case 404:
867
866
  // Not Found
868
- return D;
867
+ return N;
869
868
 
870
869
  case 409:
871
870
  // Conflict
872
- return j;
871
+ return C;
873
872
 
874
873
  // Other possibilities:
875
874
  // return Code.ALREADY_EXISTS;
876
875
  case 416:
877
876
  // Range Not Satisfiable
878
- return L;
877
+ return j;
879
878
 
880
879
  case 429:
881
880
  // Too Many Requests
882
- return x;
881
+ return q;
883
882
 
884
883
  case 499:
885
884
  // Client Closed Request
886
- return F;
885
+ return P;
887
886
 
888
887
  case 500:
889
888
  // Internal Server Error
890
- return O;
889
+ return F;
891
890
 
892
891
  // Other possibilities:
893
892
  // return Code.INTERNAL;
894
893
  // return Code.DATA_LOSS;
895
894
  case 501:
896
895
  // Unimplemented
897
- return M;
896
+ return L;
898
897
 
899
898
  case 503:
900
899
  // Service Unavailable
901
- return B;
900
+ return U;
902
901
 
903
902
  case 504:
904
903
  // Gateway Timeout
905
- return N;
904
+ return V;
906
905
 
907
906
  default:
908
- return t >= 200 && t < 300 ? "ok" : t >= 400 && t < 500 ? C : t >= 500 && t < 600 ? U : O;
907
+ return t >= 200 && t < 300 ? "ok" : t >= 400 && t < 500 ? x : t >= 500 && t < 600 ? M : F;
909
908
  }
910
909
  }
911
910
 
@@ -928,16 +927,16 @@ function wt(t) {
928
927
  /**
929
928
  * A Rest-based connection that relies on the native HTTP stack
930
929
  * (e.g. `fetch` or a polyfill).
931
- */ (vt = mt || (mt = {}))[vt.OK = 0] = "OK", vt[vt.CANCELLED = 1] = "CANCELLED",
932
- vt[vt.UNKNOWN = 2] = "UNKNOWN", vt[vt.INVALID_ARGUMENT = 3] = "INVALID_ARGUMENT",
933
- vt[vt.DEADLINE_EXCEEDED = 4] = "DEADLINE_EXCEEDED", vt[vt.NOT_FOUND = 5] = "NOT_FOUND",
934
- vt[vt.ALREADY_EXISTS = 6] = "ALREADY_EXISTS", vt[vt.PERMISSION_DENIED = 7] = "PERMISSION_DENIED",
935
- vt[vt.UNAUTHENTICATED = 16] = "UNAUTHENTICATED", vt[vt.RESOURCE_EXHAUSTED = 8] = "RESOURCE_EXHAUSTED",
936
- vt[vt.FAILED_PRECONDITION = 9] = "FAILED_PRECONDITION", vt[vt.ABORTED = 10] = "ABORTED",
937
- vt[vt.OUT_OF_RANGE = 11] = "OUT_OF_RANGE", vt[vt.UNIMPLEMENTED = 12] = "UNIMPLEMENTED",
938
- vt[vt.INTERNAL = 13] = "INTERNAL", vt[vt.UNAVAILABLE = 14] = "UNAVAILABLE", vt[vt.DATA_LOSS = 15] = "DATA_LOSS";
939
-
940
- var _t = /** @class */ function(r) {
930
+ */ (mt = yt || (yt = {}))[mt.OK = 0] = "OK", mt[mt.CANCELLED = 1] = "CANCELLED",
931
+ mt[mt.UNKNOWN = 2] = "UNKNOWN", mt[mt.INVALID_ARGUMENT = 3] = "INVALID_ARGUMENT",
932
+ mt[mt.DEADLINE_EXCEEDED = 4] = "DEADLINE_EXCEEDED", mt[mt.NOT_FOUND = 5] = "NOT_FOUND",
933
+ mt[mt.ALREADY_EXISTS = 6] = "ALREADY_EXISTS", mt[mt.PERMISSION_DENIED = 7] = "PERMISSION_DENIED",
934
+ mt[mt.UNAUTHENTICATED = 16] = "UNAUTHENTICATED", mt[mt.RESOURCE_EXHAUSTED = 8] = "RESOURCE_EXHAUSTED",
935
+ mt[mt.FAILED_PRECONDITION = 9] = "FAILED_PRECONDITION", mt[mt.ABORTED = 10] = "ABORTED",
936
+ mt[mt.OUT_OF_RANGE = 11] = "OUT_OF_RANGE", mt[mt.UNIMPLEMENTED = 12] = "UNIMPLEMENTED",
937
+ mt[mt.INTERNAL = 13] = "INTERNAL", mt[mt.UNAVAILABLE = 14] = "UNAVAILABLE", mt[mt.DATA_LOSS = 15] = "DATA_LOSS";
938
+
939
+ var wt = /** @class */ function(r) {
941
940
  /**
942
941
  * @param databaseInfo - The connection info.
943
942
  * @param fetchImpl - `fetch` or a Polyfill that implements the fetch API.
@@ -971,14 +970,14 @@ var _t = /** @class */ function(r) {
971
970
  return a = n.sent(), [ 3 /*break*/ , 4 ];
972
971
 
973
972
  case 3:
974
- throw u = n.sent(), new z(wt((s = u).status), "Request failed with error: " + s.statusText);
973
+ throw u = n.sent(), new B(vt((s = u).status), "Request failed with error: " + s.statusText);
975
974
 
976
975
  case 4:
977
976
  return a.ok ? [ 3 /*break*/ , 6 ] : [ 4 /*yield*/ , a.json() ];
978
977
 
979
978
  case 5:
980
979
  throw c = n.sent(), Array.isArray(c) && (c = c[0]), l = null === (t = null == c ? void 0 : c.error) || void 0 === t ? void 0 : t.message,
981
- new z(wt(a.status), "Request failed with error: ".concat(null != l ? l : a.statusText));
980
+ new B(vt(a.status), "Request failed with error: ".concat(null != l ? l : a.statusText));
982
981
 
983
982
  case 6:
984
983
  return [ 2 /*return*/ , a.json() ];
@@ -1002,18 +1001,18 @@ var _t = /** @class */ function(r) {
1002
1001
  enumerable: !1,
1003
1002
  configurable: !0
1004
1003
  }), t.prototype.P = function(t, e, n, r, i) {
1005
- var o = (null === pt ? pt = 268435456 + Math.round(2147483648 * Math.random()) : pt++,
1006
- "0x" + pt.toString(16)), a = this.I(t, e.toUriEncodedString());
1007
- T("RestConnection", "Sending RPC '".concat(t, "' ").concat(o, ":"), a, n);
1004
+ var o = (null === ht ? ht = 268435456 + Math.round(2147483648 * Math.random()) : ht++,
1005
+ "0x" + ht.toString(16)), a = this.I(t, e.toUriEncodedString());
1006
+ b("RestConnection", "Sending RPC '".concat(t, "' ").concat(o, ":"), a, n);
1008
1007
  var u = {
1009
1008
  "google-cloud-resource-prefix": this.A,
1010
1009
  "x-goog-request-params": this.T
1011
1010
  };
1012
1011
  return this.V(u, r, i), this.p(t, a, u, n).then((function(e) {
1013
- return T("RestConnection", "Received RPC '".concat(t, "' ").concat(o, ": "), e),
1012
+ return b("RestConnection", "Received RPC '".concat(t, "' ").concat(o, ": "), e),
1014
1013
  e;
1015
1014
  }), (function(e) {
1016
- throw S("RestConnection", "RPC '".concat(t, "' ").concat(o, " failed with error: "), e, "url: ", a, "request:", n),
1015
+ throw E("RestConnection", "RPC '".concat(t, "' ").concat(o, " failed with error: "), e, "url: ", a, "request:", n),
1017
1016
  e;
1018
1017
  }));
1019
1018
  }, t.prototype.g = function(t, e, n, r, i, o) {
@@ -1026,7 +1025,7 @@ var _t = /** @class */ function(r) {
1026
1025
  * present and any additional headers for the request.
1027
1026
  */
1028
1027
  t.prototype.V = function(t, e, n) {
1029
- t["X-Goog-Api-Client"] = "gl-js/ fire/" + w,
1028
+ t["X-Goog-Api-Client"] = "gl-js/ fire/" + v,
1030
1029
  // Content-Type: text/plain will avoid preflight requests which might
1031
1030
  // mess with CORS and redirects by proxies. If we add custom headers
1032
1031
  // we will need to change this code to potentially use the $httpOverwrite
@@ -1049,7 +1048,7 @@ var _t = /** @class */ function(r) {
1049
1048
  t.prototype.terminate = function() {
1050
1049
  // No-op
1051
1050
  }, t;
1052
- }()), bt = function(t, e, n) {
1051
+ }()), _t = function(t, e, n) {
1053
1052
  this.alias = t, this.aggregateType = e, this.fieldPath = n;
1054
1053
  };
1055
1054
 
@@ -1110,7 +1109,7 @@ var _t = /** @class */ function(r) {
1110
1109
  *
1111
1110
  * If `nBytes < 0` , an error will be thrown.
1112
1111
  */
1113
- function Tt(t) {
1112
+ function bt(t) {
1114
1113
  // Polyfills for IE and WebWorker by using `self` and `msCrypto` when `crypto` is not available.
1115
1114
  var e =
1116
1115
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -1142,14 +1141,14 @@ function Tt(t) {
1142
1141
  *
1143
1142
  * @internal
1144
1143
  * Exported internally for testing purposes.
1145
- */ var Et = /** @class */ function() {
1144
+ */ var Tt = /** @class */ function() {
1146
1145
  function t() {}
1147
1146
  return t.newId = function() {
1148
1147
  for (
1149
1148
  // Alphanumeric characters
1150
1149
  var t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", e = Math.floor(256 / t.length) * t.length, n = ""
1151
1150
  // The largest byte value that is a multiple of `char.length`.
1152
- ; n.length < 20; ) for (var r = Tt(40), i = 0; i < r.length; ++i)
1151
+ ; n.length < 20; ) for (var r = bt(40), i = 0; i < r.length; ++i)
1153
1152
  // Only accept values that are [0, maxMultiple), this ensures they can
1154
1153
  // be evenly mapped to indices of `chars` via a modulo operation.
1155
1154
  n.length < 20 && r[i] < e && (n += t.charAt(r[i] % t.length));
@@ -1157,11 +1156,11 @@ function Tt(t) {
1157
1156
  }, t;
1158
1157
  }();
1159
1158
 
1160
- function St(t, e) {
1159
+ function Et(t, e) {
1161
1160
  return t < e ? -1 : t > e ? 1 : 0;
1162
1161
  }
1163
1162
 
1164
- /** Helper to compare arrays using isEqual(). */ function kt(t, e, n) {
1163
+ /** Helper to compare arrays using isEqual(). */ function St(t, e, n) {
1165
1164
  return t.length === e.length && t.every((function(t, r) {
1166
1165
  return n(t, e[r]);
1167
1166
  }));
@@ -1182,13 +1181,13 @@ function St(t, e) {
1182
1181
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1183
1182
  * See the License for the specific language governing permissions and
1184
1183
  * limitations under the License.
1185
- */ function It(t) {
1184
+ */ function kt(t) {
1186
1185
  var e = 0;
1187
1186
  for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && e++;
1188
1187
  return e;
1189
1188
  }
1190
1189
 
1191
- function At(t, e) {
1190
+ function It(t, e) {
1192
1191
  for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && e(n, t[n]);
1193
1192
  }
1194
1193
 
@@ -1210,13 +1209,13 @@ function At(t, e) {
1210
1209
  */
1211
1210
  /**
1212
1211
  * An error encountered while decoding base64 string.
1213
- */ var Pt = /** @class */ function(e) {
1212
+ */ var At = /** @class */ function(e) {
1214
1213
  function n() {
1215
1214
  var t = this;
1216
1215
  return (t = e.apply(this, arguments) || this).name = "Base64DecodeError", t;
1217
1216
  }
1218
1217
  return t(n, e), n;
1219
- }(Error), Ft = /** @class */ function() {
1218
+ }(Error), Pt = /** @class */ function() {
1220
1219
  function t(t) {
1221
1220
  this.binaryString = t;
1222
1221
  }
@@ -1228,7 +1227,7 @@ function At(t, e) {
1228
1227
  // Check that `DOMException` is defined before using it to avoid
1229
1228
  // "ReferenceError: Property 'DOMException' doesn't exist" in react-native.
1230
1229
  // (https://github.com/firebase/firebase-js-sdk/issues/7115)
1231
- throw "undefined" != typeof DOMException && t instanceof DOMException ? new Pt("Invalid base64 string: " + t) : t;
1230
+ throw "undefined" != typeof DOMException && t instanceof DOMException ? new At("Invalid base64 string: " + t) : t;
1232
1231
  }
1233
1232
  }(e);
1234
1233
  return new t(n);
@@ -1268,7 +1267,7 @@ function At(t, e) {
1268
1267
  }, t.prototype.approximateByteSize = function() {
1269
1268
  return 2 * this.binaryString.length;
1270
1269
  }, t.prototype.compareTo = function(t) {
1271
- return St(this.binaryString, t.binaryString);
1270
+ return Et(this.binaryString, t.binaryString);
1272
1271
  }, t.prototype.isEqual = function(t) {
1273
1272
  return this.binaryString === t.binaryString;
1274
1273
  }, t;
@@ -1315,23 +1314,23 @@ function At(t, e) {
1315
1314
  * the proto byte string in a common class that must be converted into a string
1316
1315
  * before being sent as a proto.
1317
1316
  * @internal
1318
- */ Ft.EMPTY_BYTE_STRING = new Ft("");
1317
+ */ Pt.EMPTY_BYTE_STRING = new Pt("");
1319
1318
 
1320
- var Ot = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
1319
+ var Ft = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
1321
1320
 
1322
1321
  /**
1323
1322
  * Converts the possible Proto values for a timestamp value into a "seconds and
1324
1323
  * nanos" representation.
1325
- */ function Vt(t) {
1324
+ */ function Ot(t) {
1326
1325
  // The json interface (for the browser) will return an iso timestamp string,
1327
1326
  // while the proto js library (for node) will return a
1328
1327
  // google.protobuf.Timestamp instance.
1329
- if (A(!!t), "string" == typeof t) {
1328
+ if (I(!!t), "string" == typeof t) {
1330
1329
  // The date string can have higher precision (nanos) than the Date class
1331
1330
  // (millis), so we do some custom parsing here.
1332
1331
  // Parse the nanos right out of the string.
1333
- var e = 0, n = Ot.exec(t);
1334
- if (A(!!n), n[1]) {
1332
+ var e = 0, n = Ft.exec(t);
1333
+ if (I(!!n), n[1]) {
1335
1334
  // Pad the fraction out to 9 digits (nanos).
1336
1335
  var r = n[1];
1337
1336
  r = (r + "000000000").substr(0, 9), e = Number(r);
@@ -1344,21 +1343,21 @@ var Ot = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
1344
1343
  };
1345
1344
  }
1346
1345
  return {
1347
- seconds: Nt(t.seconds),
1348
- nanos: Nt(t.nanos)
1346
+ seconds: Vt(t.seconds),
1347
+ nanos: Vt(t.nanos)
1349
1348
  };
1350
1349
  }
1351
1350
 
1352
1351
  /**
1353
1352
  * Converts the possible Proto types for numbers into a JavaScript number.
1354
1353
  * Returns 0 if the value is not numeric.
1355
- */ function Nt(t) {
1354
+ */ function Vt(t) {
1356
1355
  // TODO(bjornick): Handle int64 greater than 53 bits.
1357
1356
  return "number" == typeof t ? t : "string" == typeof t ? Number(t) : 0;
1358
1357
  }
1359
1358
 
1360
- /** Converts the possible Proto types for Blobs into a ByteString. */ function Dt(t) {
1361
- return "string" == typeof t ? Ft.fromBase64String(t) : Ft.fromUint8Array(t);
1359
+ /** Converts the possible Proto types for Blobs into a ByteString. */ function Nt(t) {
1360
+ return "string" == typeof t ? Pt.fromBase64String(t) : Pt.fromUint8Array(t);
1362
1361
  }
1363
1362
 
1364
1363
  /**
@@ -1391,7 +1390,7 @@ var Ot = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
1391
1390
  *
1392
1391
  * For examples and further specifications, refer to the
1393
1392
  * {@link https://github.com/google/protobuf/blob/master/src/google/protobuf/timestamp.proto | Timestamp definition}.
1394
- */ var Rt = /** @class */ function() {
1393
+ */ var Dt = /** @class */ function() {
1395
1394
  /**
1396
1395
  * Creates a new timestamp.
1397
1396
  *
@@ -1412,11 +1411,11 @@ var Ot = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
1412
1411
  * The fractions of a second at nanosecond resolution.*
1413
1412
  */
1414
1413
  e) {
1415
- if (this.seconds = t, this.nanoseconds = e, e < 0) throw new z(V, "Timestamp nanoseconds out of range: " + e);
1416
- if (e >= 1e9) throw new z(V, "Timestamp nanoseconds out of range: " + e);
1417
- if (t < -62135596800) throw new z(V, "Timestamp seconds out of range: " + t);
1414
+ if (this.seconds = t, this.nanoseconds = e, e < 0) throw new B(O, "Timestamp nanoseconds out of range: " + e);
1415
+ if (e >= 1e9) throw new B(O, "Timestamp nanoseconds out of range: " + e);
1416
+ if (t < -62135596800) throw new B(O, "Timestamp seconds out of range: " + t);
1418
1417
  // This will break in the year 10,000.
1419
- if (t >= 253402300800) throw new z(V, "Timestamp seconds out of range: " + t);
1418
+ if (t >= 253402300800) throw new B(O, "Timestamp seconds out of range: " + t);
1420
1419
  }
1421
1420
  /**
1422
1421
  * Creates a new timestamp with the current date, with millisecond precision.
@@ -1468,7 +1467,7 @@ var Ot = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
1468
1467
  t.prototype.toMillis = function() {
1469
1468
  return 1e3 * this.seconds + this.nanoseconds / 1e6;
1470
1469
  }, t.prototype._compareTo = function(t) {
1471
- return this.seconds === t.seconds ? St(this.nanoseconds, t.nanoseconds) : St(this.seconds, t.seconds);
1470
+ return this.seconds === t.seconds ? Et(this.nanoseconds, t.nanoseconds) : Et(this.seconds, t.seconds);
1472
1471
  },
1473
1472
  /**
1474
1473
  * Returns true if this `Timestamp` is equal to the provided one.
@@ -1540,7 +1539,7 @@ var Ot = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
1540
1539
  * FieldValueOptions to value().
1541
1540
  * - With respect to other ServerTimestampValues, they sort by their
1542
1541
  * localWriteTime.
1543
- */ function qt(t) {
1542
+ */ function Rt(t) {
1544
1543
  var e, n;
1545
1544
  return "server_timestamp" === (null === (n = ((null === (e = null == t ? void 0 : t.mapValue) || void 0 === e ? void 0 : e.fields) || {}).__type__) || void 0 === n ? void 0 : n.stringValue);
1546
1545
  }
@@ -1550,16 +1549,16 @@ var Ot = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
1550
1549
  *
1551
1550
  * Preserving the previous values allows the user to display the last resoled
1552
1551
  * value until the backend responds with the timestamp.
1553
- */ function xt(t) {
1552
+ */ function qt(t) {
1554
1553
  var e = t.mapValue.fields.__previous_value__;
1555
- return qt(e) ? xt(e) : e;
1554
+ return Rt(e) ? qt(e) : e;
1556
1555
  }
1557
1556
 
1558
1557
  /**
1559
1558
  * Returns the local time at which this timestamp was first set.
1560
- */ function Ct(t) {
1561
- var e = Vt(t.mapValue.fields.__local_write_time__.timestampValue);
1562
- return new Rt(e.seconds, e.nanos);
1559
+ */ function xt(t) {
1560
+ var e = Ot(t.mapValue.fields.__local_write_time__.timestampValue);
1561
+ return new Dt(e.seconds, e.nanos);
1563
1562
  }
1564
1563
 
1565
1564
  /**
@@ -1577,7 +1576,7 @@ var Ot = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
1577
1576
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1578
1577
  * See the License for the specific language governing permissions and
1579
1578
  * limitations under the License.
1580
- */ var jt = {
1579
+ */ var Ct = {
1581
1580
  fields: {
1582
1581
  __type__: {
1583
1582
  stringValue: "__max__"
@@ -1585,18 +1584,18 @@ var Ot = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
1585
1584
  }
1586
1585
  };
1587
1586
 
1588
- /** Extracts the backend's type order for the provided value. */ function Lt(t) {
1589
- return "nullValue" in t ? 0 /* TypeOrder.NullValue */ : "booleanValue" in t ? 1 /* TypeOrder.BooleanValue */ : "integerValue" in t || "doubleValue" in t ? 2 /* TypeOrder.NumberValue */ : "timestampValue" in t ? 3 /* TypeOrder.TimestampValue */ : "stringValue" in t ? 5 /* TypeOrder.StringValue */ : "bytesValue" in t ? 6 /* TypeOrder.BlobValue */ : "referenceValue" in t ? 7 /* TypeOrder.RefValue */ : "geoPointValue" in t ? 8 /* TypeOrder.GeoPointValue */ : "arrayValue" in t ? 9 /* TypeOrder.ArrayValue */ : "mapValue" in t ? qt(t) ? 4 /* TypeOrder.ServerTimestampValue */ :
1587
+ /** Extracts the backend's type order for the provided value. */ function jt(t) {
1588
+ return "nullValue" in t ? 0 /* TypeOrder.NullValue */ : "booleanValue" in t ? 1 /* TypeOrder.BooleanValue */ : "integerValue" in t || "doubleValue" in t ? 2 /* TypeOrder.NumberValue */ : "timestampValue" in t ? 3 /* TypeOrder.TimestampValue */ : "stringValue" in t ? 5 /* TypeOrder.StringValue */ : "bytesValue" in t ? 6 /* TypeOrder.BlobValue */ : "referenceValue" in t ? 7 /* TypeOrder.RefValue */ : "geoPointValue" in t ? 8 /* TypeOrder.GeoPointValue */ : "arrayValue" in t ? 9 /* TypeOrder.ArrayValue */ : "mapValue" in t ? Rt(t) ? 4 /* TypeOrder.ServerTimestampValue */ :
1590
1589
  /** Returns true if the Value represents the canonical {@link #MAX_VALUE} . */
1591
1590
  function(t) {
1592
1591
  return "__max__" === (((t.mapValue || {}).fields || {}).__type__ || {}).stringValue;
1593
- }(t) ? 9007199254740991 /* TypeOrder.MaxValue */ : 10 /* TypeOrder.ObjectValue */ : I();
1592
+ }(t) ? 9007199254740991 /* TypeOrder.MaxValue */ : 10 /* TypeOrder.ObjectValue */ : k();
1594
1593
  }
1595
1594
 
1596
- /** Tests `left` and `right` for equality based on the backend semantics. */ function Mt(t, e) {
1595
+ /** Tests `left` and `right` for equality based on the backend semantics. */ function Lt(t, e) {
1597
1596
  if (t === e) return !0;
1598
- var n = Lt(t);
1599
- if (n !== Lt(e)) return !1;
1597
+ var n = jt(t);
1598
+ if (n !== jt(e)) return !1;
1600
1599
  switch (n) {
1601
1600
  case 0 /* TypeOrder.NullValue */ :
1602
1601
  case 9007199254740991 /* TypeOrder.MaxValue */ :
@@ -1606,14 +1605,14 @@ var Ot = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
1606
1605
  return t.booleanValue === e.booleanValue;
1607
1606
 
1608
1607
  case 4 /* TypeOrder.ServerTimestampValue */ :
1609
- return Ct(t).isEqual(Ct(e));
1608
+ return xt(t).isEqual(xt(e));
1610
1609
 
1611
1610
  case 3 /* TypeOrder.TimestampValue */ :
1612
1611
  return function(t, e) {
1613
1612
  if ("string" == typeof t.timestampValue && "string" == typeof e.timestampValue && t.timestampValue.length === e.timestampValue.length)
1614
1613
  // Use string equality for ISO 8601 timestamps
1615
1614
  return t.timestampValue === e.timestampValue;
1616
- var n = Vt(t.timestampValue), r = Vt(e.timestampValue);
1615
+ var n = Ot(t.timestampValue), r = Ot(e.timestampValue);
1617
1616
  return n.seconds === r.seconds && n.nanos === r.nanos;
1618
1617
  }(t, e);
1619
1618
 
@@ -1622,7 +1621,7 @@ var Ot = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
1622
1621
 
1623
1622
  case 6 /* TypeOrder.BlobValue */ :
1624
1623
  return function(t, e) {
1625
- return Dt(t.bytesValue).isEqual(Dt(e.bytesValue));
1624
+ return Nt(t.bytesValue).isEqual(Nt(e.bytesValue));
1626
1625
  }(t, e);
1627
1626
 
1628
1627
  case 7 /* TypeOrder.RefValue */ :
@@ -1630,105 +1629,105 @@ var Ot = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
1630
1629
 
1631
1630
  case 8 /* TypeOrder.GeoPointValue */ :
1632
1631
  return function(t, e) {
1633
- return Nt(t.geoPointValue.latitude) === Nt(e.geoPointValue.latitude) && Nt(t.geoPointValue.longitude) === Nt(e.geoPointValue.longitude);
1632
+ return Vt(t.geoPointValue.latitude) === Vt(e.geoPointValue.latitude) && Vt(t.geoPointValue.longitude) === Vt(e.geoPointValue.longitude);
1634
1633
  }(t, e);
1635
1634
 
1636
1635
  case 2 /* TypeOrder.NumberValue */ :
1637
1636
  return function(t, e) {
1638
- if ("integerValue" in t && "integerValue" in e) return Nt(t.integerValue) === Nt(e.integerValue);
1637
+ if ("integerValue" in t && "integerValue" in e) return Vt(t.integerValue) === Vt(e.integerValue);
1639
1638
  if ("doubleValue" in t && "doubleValue" in e) {
1640
- var n = Nt(t.doubleValue), r = Nt(e.doubleValue);
1641
- return n === r ? yt(n) === yt(r) : isNaN(n) && isNaN(r);
1639
+ var n = Vt(t.doubleValue), r = Vt(e.doubleValue);
1640
+ return n === r ? dt(n) === dt(r) : isNaN(n) && isNaN(r);
1642
1641
  }
1643
1642
  return !1;
1644
1643
  }(t, e);
1645
1644
 
1646
1645
  case 9 /* TypeOrder.ArrayValue */ :
1647
- return kt(t.arrayValue.values || [], e.arrayValue.values || [], Mt);
1646
+ return St(t.arrayValue.values || [], e.arrayValue.values || [], Lt);
1648
1647
 
1649
1648
  case 10 /* TypeOrder.ObjectValue */ :
1650
1649
  return function(t, e) {
1651
1650
  var n = t.mapValue.fields || {}, r = e.mapValue.fields || {};
1652
- if (It(n) !== It(r)) return !1;
1653
- for (var i in n) if (n.hasOwnProperty(i) && (void 0 === r[i] || !Mt(n[i], r[i]))) return !1;
1651
+ if (kt(n) !== kt(r)) return !1;
1652
+ for (var i in n) if (n.hasOwnProperty(i) && (void 0 === r[i] || !Lt(n[i], r[i]))) return !1;
1654
1653
  return !0;
1655
1654
  }(t, e);
1656
1655
 
1657
1656
  default:
1658
- return I();
1657
+ return k();
1659
1658
  }
1660
1659
  }
1661
1660
 
1662
- function Ut(t, e) {
1661
+ function Mt(t, e) {
1663
1662
  return void 0 !== (t.values || []).find((function(t) {
1664
- return Mt(t, e);
1663
+ return Lt(t, e);
1665
1664
  }));
1666
1665
  }
1667
1666
 
1668
- function Bt(t, e) {
1667
+ function Ut(t, e) {
1669
1668
  if (t === e) return 0;
1670
- var n = Lt(t), r = Lt(e);
1671
- if (n !== r) return St(n, r);
1669
+ var n = jt(t), r = jt(e);
1670
+ if (n !== r) return Et(n, r);
1672
1671
  switch (n) {
1673
1672
  case 0 /* TypeOrder.NullValue */ :
1674
1673
  case 9007199254740991 /* TypeOrder.MaxValue */ :
1675
1674
  return 0;
1676
1675
 
1677
1676
  case 1 /* TypeOrder.BooleanValue */ :
1678
- return St(t.booleanValue, e.booleanValue);
1677
+ return Et(t.booleanValue, e.booleanValue);
1679
1678
 
1680
1679
  case 2 /* TypeOrder.NumberValue */ :
1681
1680
  return function(t, e) {
1682
- var n = Nt(t.integerValue || t.doubleValue), r = Nt(e.integerValue || e.doubleValue);
1681
+ var n = Vt(t.integerValue || t.doubleValue), r = Vt(e.integerValue || e.doubleValue);
1683
1682
  return n < r ? -1 : n > r ? 1 : n === r ? 0 :
1684
1683
  // one or both are NaN.
1685
1684
  isNaN(n) ? isNaN(r) ? 0 : -1 : 1;
1686
1685
  }(t, e);
1687
1686
 
1688
1687
  case 3 /* TypeOrder.TimestampValue */ :
1689
- return zt(t.timestampValue, e.timestampValue);
1688
+ return Bt(t.timestampValue, e.timestampValue);
1690
1689
 
1691
1690
  case 4 /* TypeOrder.ServerTimestampValue */ :
1692
- return zt(Ct(t), Ct(e));
1691
+ return Bt(xt(t), xt(e));
1693
1692
 
1694
1693
  case 5 /* TypeOrder.StringValue */ :
1695
- return St(t.stringValue, e.stringValue);
1694
+ return Et(t.stringValue, e.stringValue);
1696
1695
 
1697
1696
  case 6 /* TypeOrder.BlobValue */ :
1698
1697
  return function(t, e) {
1699
- var n = Dt(t), r = Dt(e);
1698
+ var n = Nt(t), r = Nt(e);
1700
1699
  return n.compareTo(r);
1701
1700
  }(t.bytesValue, e.bytesValue);
1702
1701
 
1703
1702
  case 7 /* TypeOrder.RefValue */ :
1704
1703
  return function(t, e) {
1705
1704
  for (var n = t.split("/"), r = e.split("/"), i = 0; i < n.length && i < r.length; i++) {
1706
- var o = St(n[i], r[i]);
1705
+ var o = Et(n[i], r[i]);
1707
1706
  if (0 !== o) return o;
1708
1707
  }
1709
- return St(n.length, r.length);
1708
+ return Et(n.length, r.length);
1710
1709
  }(t.referenceValue, e.referenceValue);
1711
1710
 
1712
1711
  case 8 /* TypeOrder.GeoPointValue */ :
1713
1712
  return function(t, e) {
1714
- var n = St(Nt(t.latitude), Nt(e.latitude));
1715
- return 0 !== n ? n : St(Nt(t.longitude), Nt(e.longitude));
1713
+ var n = Et(Vt(t.latitude), Vt(e.latitude));
1714
+ return 0 !== n ? n : Et(Vt(t.longitude), Vt(e.longitude));
1716
1715
  }(t.geoPointValue, e.geoPointValue);
1717
1716
 
1718
1717
  case 9 /* TypeOrder.ArrayValue */ :
1719
1718
  return function(t, e) {
1720
1719
  for (var n = t.values || [], r = e.values || [], i = 0; i < n.length && i < r.length; ++i) {
1721
- var o = Bt(n[i], r[i]);
1720
+ var o = Ut(n[i], r[i]);
1722
1721
  if (o) return o;
1723
1722
  }
1724
- return St(n.length, r.length);
1723
+ return Et(n.length, r.length);
1725
1724
  }(t.arrayValue, e.arrayValue);
1726
1725
 
1727
1726
  case 10 /* TypeOrder.ObjectValue */ :
1728
1727
  return function(t, e) {
1729
- if (t === jt && e === jt) return 0;
1730
- if (t === jt) return 1;
1731
- if (e === jt) return -1;
1728
+ if (t === Ct && e === Ct) return 0;
1729
+ if (t === Ct) return 1;
1730
+ if (e === Ct) return -1;
1732
1731
  var n = t.fields || {}, r = Object.keys(n), i = e.fields || {}, o = Object.keys(i);
1733
1732
  // Even though MapValues are likely sorted correctly based on their insertion
1734
1733
  // order (e.g. when received from the backend), local modifications can bring
@@ -1736,48 +1735,48 @@ function Bt(t, e) {
1736
1735
  // canonical IDs are independent of insertion order.
1737
1736
  r.sort(), o.sort();
1738
1737
  for (var a = 0; a < r.length && a < o.length; ++a) {
1739
- var u = St(r[a], o[a]);
1738
+ var u = Et(r[a], o[a]);
1740
1739
  if (0 !== u) return u;
1741
- var s = Bt(n[r[a]], i[o[a]]);
1740
+ var s = Ut(n[r[a]], i[o[a]]);
1742
1741
  if (0 !== s) return s;
1743
1742
  }
1744
- return St(r.length, o.length);
1743
+ return Et(r.length, o.length);
1745
1744
  }(t.mapValue, e.mapValue);
1746
1745
 
1747
1746
  default:
1748
- throw I();
1747
+ throw k();
1749
1748
  }
1750
1749
  }
1751
1750
 
1752
- function zt(t, e) {
1753
- if ("string" == typeof t && "string" == typeof e && t.length === e.length) return St(t, e);
1754
- var n = Vt(t), r = Vt(e), i = St(n.seconds, r.seconds);
1755
- return 0 !== i ? i : St(n.nanos, r.nanos);
1751
+ function Bt(t, e) {
1752
+ if ("string" == typeof t && "string" == typeof e && t.length === e.length) return Et(t, e);
1753
+ var n = Ot(t), r = Ot(e), i = Et(n.seconds, r.seconds);
1754
+ return 0 !== i ? i : Et(n.nanos, r.nanos);
1756
1755
  }
1757
1756
 
1758
- function Gt(t, e) {
1757
+ function zt(t, e) {
1759
1758
  return {
1760
1759
  referenceValue: "projects/".concat(t.projectId, "/databases/").concat(t.database, "/documents/").concat(e.path.canonicalString())
1761
1760
  };
1762
1761
  }
1763
1762
 
1764
- /** Returns true if `value` is an ArrayValue. */ function Kt(t) {
1763
+ /** Returns true if `value` is an ArrayValue. */ function Gt(t) {
1765
1764
  return !!t && "arrayValue" in t;
1766
1765
  }
1767
1766
 
1768
- /** Returns true if `value` is a NullValue. */ function Qt(t) {
1767
+ /** Returns true if `value` is a NullValue. */ function Kt(t) {
1769
1768
  return !!t && "nullValue" in t;
1770
1769
  }
1771
1770
 
1772
- /** Returns true if `value` is NaN. */ function Yt(t) {
1771
+ /** Returns true if `value` is NaN. */ function Qt(t) {
1773
1772
  return !!t && "doubleValue" in t && isNaN(Number(t.doubleValue));
1774
1773
  }
1775
1774
 
1776
- /** Returns true if `value` is a MapValue. */ function Ht(t) {
1775
+ /** Returns true if `value` is a MapValue. */ function Yt(t) {
1777
1776
  return !!t && "mapValue" in t;
1778
1777
  }
1779
1778
 
1780
- /** Creates a deep copy of `source`. */ function Wt(t) {
1779
+ /** Creates a deep copy of `source`. */ function Ht(t) {
1781
1780
  if (t.geoPointValue) return {
1782
1781
  geoPointValue: Object.assign({}, t.geoPointValue)
1783
1782
  };
@@ -1790,8 +1789,8 @@ function Gt(t, e) {
1790
1789
  fields: {}
1791
1790
  }
1792
1791
  };
1793
- return At(t.mapValue.fields, (function(t, n) {
1794
- return e.mapValue.fields[t] = Wt(n);
1792
+ return It(t.mapValue.fields, (function(t, n) {
1793
+ return e.mapValue.fields[t] = Ht(n);
1795
1794
  })), e;
1796
1795
  }
1797
1796
  if (t.arrayValue) {
@@ -1799,21 +1798,21 @@ function Gt(t, e) {
1799
1798
  arrayValue: {
1800
1799
  values: []
1801
1800
  }
1802
- }, r = 0; r < (t.arrayValue.values || []).length; ++r) n.arrayValue.values[r] = Wt(t.arrayValue.values[r]);
1801
+ }, r = 0; r < (t.arrayValue.values || []).length; ++r) n.arrayValue.values[r] = Ht(t.arrayValue.values[r]);
1803
1802
  return n;
1804
1803
  }
1805
1804
  return Object.assign({}, t);
1806
1805
  }
1807
1806
 
1808
- var Jt = function(t, e) {
1807
+ var Wt = function(t, e) {
1809
1808
  this.position = t, this.inclusive = e;
1810
1809
  };
1811
1810
 
1812
- function Xt(t, e) {
1811
+ function Jt(t, e) {
1813
1812
  if (null === t) return null === e;
1814
1813
  if (null === e) return !1;
1815
1814
  if (t.inclusive !== e.inclusive || t.position.length !== e.position.length) return !1;
1816
- for (var n = 0; n < t.position.length; n++) if (!Mt(t.position[n], e.position[n])) return !1;
1815
+ for (var n = 0; n < t.position.length; n++) if (!Lt(t.position[n], e.position[n])) return !1;
1817
1816
  return !0;
1818
1817
  }
1819
1818
 
@@ -1832,7 +1831,7 @@ function Xt(t, e) {
1832
1831
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1833
1832
  * See the License for the specific language governing permissions and
1834
1833
  * limitations under the License.
1835
- */ var Zt = function() {}, $t = /** @class */ function(e) {
1834
+ */ var Xt = function() {}, Zt = /** @class */ function(e) {
1836
1835
  function n(t, n, r) {
1837
1836
  var i = this;
1838
1837
  return (i = e.call(this) || this).field = t, i.op = n, i.value = r, i;
@@ -1840,13 +1839,13 @@ function Xt(t, e) {
1840
1839
  /**
1841
1840
  * Creates a filter based on the provided arguments.
1842
1841
  */ return t(n, e), n.create = function(t, e, r) {
1843
- return t.isKeyField() ? "in" /* Operator.IN */ === e || "not-in" /* Operator.NOT_IN */ === e ? this.createKeyFieldInFilter(t, e, r) : new ne(t, e, r) : "array-contains" /* Operator.ARRAY_CONTAINS */ === e ? new ae(t, r) : "in" /* Operator.IN */ === e ? new ue(t, r) : "not-in" /* Operator.NOT_IN */ === e ? new se(t, r) : "array-contains-any" /* Operator.ARRAY_CONTAINS_ANY */ === e ? new ce(t, r) : new n(t, e, r);
1842
+ return t.isKeyField() ? "in" /* Operator.IN */ === e || "not-in" /* Operator.NOT_IN */ === e ? this.createKeyFieldInFilter(t, e, r) : new ee(t, e, r) : "array-contains" /* Operator.ARRAY_CONTAINS */ === e ? new oe(t, r) : "in" /* Operator.IN */ === e ? new ae(t, r) : "not-in" /* Operator.NOT_IN */ === e ? new ue(t, r) : "array-contains-any" /* Operator.ARRAY_CONTAINS_ANY */ === e ? new se(t, r) : new n(t, e, r);
1844
1843
  }, n.createKeyFieldInFilter = function(t, e, n) {
1845
- return "in" /* Operator.IN */ === e ? new re(t, n) : new ie(t, n);
1844
+ return "in" /* Operator.IN */ === e ? new ne(t, n) : new re(t, n);
1846
1845
  }, n.prototype.matches = function(t) {
1847
1846
  var e = t.data.field(this.field);
1848
1847
  // Types do not have to match in NOT_EQUAL filters.
1849
- return "!=" /* Operator.NOT_EQUAL */ === this.op ? null !== e && this.matchesComparison(Bt(e, this.value)) : null !== e && Lt(this.value) === Lt(e) && this.matchesComparison(Bt(e, this.value));
1848
+ return "!=" /* Operator.NOT_EQUAL */ === this.op ? null !== e && this.matchesComparison(Ut(e, this.value)) : null !== e && jt(this.value) === jt(e) && this.matchesComparison(Ut(e, this.value));
1850
1849
  // Only compare types with matching backend order (such as double and int).
1851
1850
  }, n.prototype.matchesComparison = function(t) {
1852
1851
  switch (this.op) {
@@ -1869,7 +1868,7 @@ function Xt(t, e) {
1869
1868
  return t >= 0;
1870
1869
 
1871
1870
  default:
1872
- return I();
1871
+ return k();
1873
1872
  }
1874
1873
  }, n.prototype.isInequality = function() {
1875
1874
  return [ "<" /* Operator.LESS_THAN */ , "<=" /* Operator.LESS_THAN_OR_EQUAL */ , ">" /* Operator.GREATER_THAN */ , ">=" /* Operator.GREATER_THAN_OR_EQUAL */ , "!=" /* Operator.NOT_EQUAL */ , "not-in" /* Operator.NOT_IN */ ].indexOf(this.op) >= 0;
@@ -1878,7 +1877,7 @@ function Xt(t, e) {
1878
1877
  }, n.prototype.getFilters = function() {
1879
1878
  return [ this ];
1880
1879
  }, n;
1881
- }(Zt), te = /** @class */ function(e) {
1880
+ }(Xt), $t = /** @class */ function(e) {
1882
1881
  function n(t, n) {
1883
1882
  var r = this;
1884
1883
  return (r = e.call(this) || this).filters = t, r.op = n, r.D = null, r;
@@ -1904,32 +1903,32 @@ function Xt(t, e) {
1904
1903
  n.prototype.getFilters = function() {
1905
1904
  return Object.assign([], this.filters);
1906
1905
  }, n;
1907
- }(Zt);
1908
-
1909
- function ee(t, e) {
1910
- return t instanceof $t ? function(t, e) {
1911
- return e instanceof $t && t.op === e.op && t.field.isEqual(e.field) && Mt(t.value, e.value);
1912
- }(t, e) : t instanceof te ? function(t, e) {
1913
- return e instanceof te && t.op === e.op && t.filters.length === e.filters.length && t.filters.reduce((function(t, n, r) {
1914
- return t && ee(n, e.filters[r]);
1906
+ }(Xt);
1907
+
1908
+ function te(t, e) {
1909
+ return t instanceof Zt ? function(t, e) {
1910
+ return e instanceof Zt && t.op === e.op && t.field.isEqual(e.field) && Lt(t.value, e.value);
1911
+ }(t, e) : t instanceof $t ? function(t, e) {
1912
+ return e instanceof $t && t.op === e.op && t.filters.length === e.filters.length && t.filters.reduce((function(t, n, r) {
1913
+ return t && te(n, e.filters[r]);
1915
1914
  }), !0);
1916
- }(t, e) : void I();
1915
+ }(t, e) : void k();
1917
1916
  }
1918
1917
 
1919
- var ne = /** @class */ function(e) {
1918
+ var ee = /** @class */ function(e) {
1920
1919
  function n(t, n, r) {
1921
1920
  var i = this;
1922
- return (i = e.call(this, t, n, r) || this).key = ot.fromName(r.referenceValue),
1921
+ return (i = e.call(this, t, n, r) || this).key = it.fromName(r.referenceValue),
1923
1922
  i;
1924
1923
  }
1925
1924
  return t(n, e), n.prototype.matches = function(t) {
1926
- var e = ot.comparator(t.key, this.key);
1925
+ var e = it.comparator(t.key, this.key);
1927
1926
  return this.matchesComparison(e);
1928
1927
  }, n;
1929
- }($t), re = /** @class */ function(e) {
1928
+ }(Zt), ne = /** @class */ function(e) {
1930
1929
  function n(t, n) {
1931
1930
  var r = this;
1932
- return (r = e.call(this, t, "in" /* Operator.IN */ , n) || this).keys = oe("in" /* Operator.IN */ , n),
1931
+ return (r = e.call(this, t, "in" /* Operator.IN */ , n) || this).keys = ie("in" /* Operator.IN */ , n),
1933
1932
  r;
1934
1933
  }
1935
1934
  return t(n, e), n.prototype.matches = function(t) {
@@ -1937,10 +1936,10 @@ var ne = /** @class */ function(e) {
1937
1936
  return e.isEqual(t.key);
1938
1937
  }));
1939
1938
  }, n;
1940
- }($t), ie = /** @class */ function(e) {
1939
+ }(Zt), re = /** @class */ function(e) {
1941
1940
  function n(t, n) {
1942
1941
  var r = this;
1943
- return (r = e.call(this, t, "not-in" /* Operator.NOT_IN */ , n) || this).keys = oe("not-in" /* Operator.NOT_IN */ , n),
1942
+ return (r = e.call(this, t, "not-in" /* Operator.NOT_IN */ , n) || this).keys = ie("not-in" /* Operator.NOT_IN */ , n),
1944
1943
  r;
1945
1944
  }
1946
1945
  return t(n, e), n.prototype.matches = function(t) {
@@ -1948,57 +1947,57 @@ var ne = /** @class */ function(e) {
1948
1947
  return e.isEqual(t.key);
1949
1948
  }));
1950
1949
  }, n;
1951
- }($t);
1950
+ }(Zt);
1952
1951
 
1953
- /** Filter that matches on key fields within an array. */ function oe(t, e) {
1952
+ /** Filter that matches on key fields within an array. */ function ie(t, e) {
1954
1953
  var n;
1955
1954
  return ((null === (n = e.arrayValue) || void 0 === n ? void 0 : n.values) || []).map((function(t) {
1956
- return ot.fromName(t.referenceValue);
1955
+ return it.fromName(t.referenceValue);
1957
1956
  }));
1958
1957
  }
1959
1958
 
1960
- /** A Filter that implements the array-contains operator. */ var ae = /** @class */ function(e) {
1959
+ /** A Filter that implements the array-contains operator. */ var oe = /** @class */ function(e) {
1961
1960
  function n(t, n) {
1962
1961
  return e.call(this, t, "array-contains" /* Operator.ARRAY_CONTAINS */ , n) || this;
1963
1962
  }
1964
1963
  return t(n, e), n.prototype.matches = function(t) {
1965
1964
  var e = t.data.field(this.field);
1966
- return Kt(e) && Ut(e.arrayValue, this.value);
1965
+ return Gt(e) && Mt(e.arrayValue, this.value);
1967
1966
  }, n;
1968
- }($t), ue = /** @class */ function(e) {
1967
+ }(Zt), ae = /** @class */ function(e) {
1969
1968
  function n(t, n) {
1970
1969
  return e.call(this, t, "in" /* Operator.IN */ , n) || this;
1971
1970
  }
1972
1971
  return t(n, e), n.prototype.matches = function(t) {
1973
1972
  var e = t.data.field(this.field);
1974
- return null !== e && Ut(this.value.arrayValue, e);
1973
+ return null !== e && Mt(this.value.arrayValue, e);
1975
1974
  }, n;
1976
- }($t), se = /** @class */ function(e) {
1975
+ }(Zt), ue = /** @class */ function(e) {
1977
1976
  function n(t, n) {
1978
1977
  return e.call(this, t, "not-in" /* Operator.NOT_IN */ , n) || this;
1979
1978
  }
1980
1979
  return t(n, e), n.prototype.matches = function(t) {
1981
- if (Ut(this.value.arrayValue, {
1980
+ if (Mt(this.value.arrayValue, {
1982
1981
  nullValue: "NULL_VALUE"
1983
1982
  })) return !1;
1984
1983
  var e = t.data.field(this.field);
1985
- return null !== e && !Ut(this.value.arrayValue, e);
1984
+ return null !== e && !Mt(this.value.arrayValue, e);
1986
1985
  }, n;
1987
- }($t), ce = /** @class */ function(e) {
1986
+ }(Zt), se = /** @class */ function(e) {
1988
1987
  function n(t, n) {
1989
1988
  return e.call(this, t, "array-contains-any" /* Operator.ARRAY_CONTAINS_ANY */ , n) || this;
1990
1989
  }
1991
1990
  return t(n, e), n.prototype.matches = function(t) {
1992
1991
  var e = this, n = t.data.field(this.field);
1993
- return !(!Kt(n) || !n.arrayValue.values) && n.arrayValue.values.some((function(t) {
1994
- return Ut(e.value.arrayValue, t);
1992
+ return !(!Gt(n) || !n.arrayValue.values) && n.arrayValue.values.some((function(t) {
1993
+ return Mt(e.value.arrayValue, t);
1995
1994
  }));
1996
1995
  }, n;
1997
- }($t), le = function(t, e /* Direction.ASCENDING */) {
1996
+ }(Zt), ce = function(t, e /* Direction.ASCENDING */) {
1998
1997
  void 0 === e && (e = "asc"), this.field = t, this.dir = e;
1999
1998
  };
2000
1999
 
2001
- /** A Filter that implements the IN operator. */ function fe(t, e) {
2000
+ /** A Filter that implements the IN operator. */ function le(t, e) {
2002
2001
  return t.dir === e.dir && t.field.isEqual(e.field);
2003
2002
  }
2004
2003
 
@@ -2021,16 +2020,16 @@ var ne = /** @class */ function(e) {
2021
2020
  /**
2022
2021
  * A version of a document in Firestore. This corresponds to the version
2023
2022
  * timestamp, such as update_time or read_time.
2024
- */ var he = /** @class */ function() {
2023
+ */ var fe = /** @class */ function() {
2025
2024
  function t(t) {
2026
2025
  this.timestamp = t;
2027
2026
  }
2028
2027
  return t.fromTimestamp = function(e) {
2029
2028
  return new t(e);
2030
2029
  }, t.min = function() {
2031
- return new t(new Rt(0, 0));
2030
+ return new t(new Dt(0, 0));
2032
2031
  }, t.max = function() {
2033
- return new t(new Rt(253402300799, 999999999));
2032
+ return new t(new Dt(253402300799, 999999999));
2034
2033
  }, t.prototype.compareTo = function(t) {
2035
2034
  return this.timestamp._compareTo(t.timestamp);
2036
2035
  }, t.prototype.isEqual = function(t) {
@@ -2044,17 +2043,17 @@ var ne = /** @class */ function(e) {
2044
2043
  }, t.prototype.toTimestamp = function() {
2045
2044
  return this.timestamp;
2046
2045
  }, t;
2047
- }(), pe = /** @class */ function() {
2046
+ }(), he = /** @class */ function() {
2048
2047
  function t(t, e) {
2049
- this.comparator = t, this.root = e || ye.EMPTY;
2048
+ this.comparator = t, this.root = e || de.EMPTY;
2050
2049
  }
2051
2050
  // Returns a copy of the map, with the specified key/value added or replaced.
2052
2051
  return t.prototype.insert = function(e, n) {
2053
- return new t(this.comparator, this.root.insert(e, n, this.comparator).copy(null, null, ye.BLACK, null, null));
2052
+ return new t(this.comparator, this.root.insert(e, n, this.comparator).copy(null, null, de.BLACK, null, null));
2054
2053
  },
2055
2054
  // Returns a copy of the map, with the specified key removed.
2056
2055
  t.prototype.remove = function(e) {
2057
- return new t(this.comparator, this.root.remove(e, this.comparator).copy(null, null, ye.BLACK, null, null));
2056
+ return new t(this.comparator, this.root.remove(e, this.comparator).copy(null, null, de.BLACK, null, null));
2058
2057
  },
2059
2058
  // Returns the value of the node with the given key, or null.
2060
2059
  t.prototype.get = function(t) {
@@ -2123,15 +2122,15 @@ var ne = /** @class */ function(e) {
2123
2122
  },
2124
2123
  // Returns an iterator over the SortedMap.
2125
2124
  t.prototype.getIterator = function() {
2126
- return new de(this.root, null, this.comparator, !1);
2125
+ return new pe(this.root, null, this.comparator, !1);
2127
2126
  }, t.prototype.getIteratorFrom = function(t) {
2128
- return new de(this.root, t, this.comparator, !1);
2127
+ return new pe(this.root, t, this.comparator, !1);
2129
2128
  }, t.prototype.getReverseIterator = function() {
2130
- return new de(this.root, null, this.comparator, !0);
2129
+ return new pe(this.root, null, this.comparator, !0);
2131
2130
  }, t.prototype.getReverseIteratorFrom = function(t) {
2132
- return new de(this.root, t, this.comparator, !0);
2131
+ return new pe(this.root, t, this.comparator, !0);
2133
2132
  }, t;
2134
- }(), de = /** @class */ function() {
2133
+ }(), pe = /** @class */ function() {
2135
2134
  function t(t, e, n, r) {
2136
2135
  this.isReverse = r, this.nodeStack = [];
2137
2136
  for (var i = 1; !t.isEmpty(); ) if (i = e ? n(t.key, e) : 1,
@@ -2168,7 +2167,7 @@ var ne = /** @class */ function(e) {
2168
2167
  value: t.value
2169
2168
  };
2170
2169
  }, t;
2171
- }(), ye = /** @class */ function() {
2170
+ }(), de = /** @class */ function() {
2172
2171
  function t(e, n, r, i, o) {
2173
2172
  this.key = e, this.value = n, this.color = null != r ? r : t.RED, this.left = null != i ? i : t.EMPTY,
2174
2173
  this.right = null != o ? o : t.EMPTY, this.size = this.left.size + 1 + this.right.size;
@@ -2260,10 +2259,10 @@ var ne = /** @class */ function(e) {
2260
2259
  // In a balanced RB tree, the black-depth (number of black nodes) from root to
2261
2260
  // leaves is equal on both sides. This function verifies that or asserts.
2262
2261
  t.prototype.check = function() {
2263
- if (this.isRed() && this.left.isRed()) throw I();
2264
- if (this.right.isRed()) throw I();
2262
+ if (this.isRed() && this.left.isRed()) throw k();
2263
+ if (this.right.isRed()) throw k();
2265
2264
  var t = this.left.check();
2266
- if (t !== this.right.check()) throw I();
2265
+ if (t !== this.right.check()) throw k();
2267
2266
  return t + (this.isRed() ? 0 : 1);
2268
2267
  }, t;
2269
2268
  }();
@@ -2289,39 +2288,39 @@ var ne = /** @class */ function(e) {
2289
2288
  // end LLRBNode
2290
2289
  // Empty node is shared between all LLRB trees.
2291
2290
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2292
- ye.EMPTY = null, ye.RED = !0, ye.BLACK = !1,
2291
+ de.EMPTY = null, de.RED = !0, de.BLACK = !1,
2293
2292
  // end LLRBEmptyNode
2294
- ye.EMPTY = new (/** @class */ function() {
2293
+ de.EMPTY = new (/** @class */ function() {
2295
2294
  function t() {
2296
2295
  this.size = 0;
2297
2296
  }
2298
2297
  return Object.defineProperty(t.prototype, "key", {
2299
2298
  get: function() {
2300
- throw I();
2299
+ throw k();
2301
2300
  },
2302
2301
  enumerable: !1,
2303
2302
  configurable: !0
2304
2303
  }), Object.defineProperty(t.prototype, "value", {
2305
2304
  get: function() {
2306
- throw I();
2305
+ throw k();
2307
2306
  },
2308
2307
  enumerable: !1,
2309
2308
  configurable: !0
2310
2309
  }), Object.defineProperty(t.prototype, "color", {
2311
2310
  get: function() {
2312
- throw I();
2311
+ throw k();
2313
2312
  },
2314
2313
  enumerable: !1,
2315
2314
  configurable: !0
2316
2315
  }), Object.defineProperty(t.prototype, "left", {
2317
2316
  get: function() {
2318
- throw I();
2317
+ throw k();
2319
2318
  },
2320
2319
  enumerable: !1,
2321
2320
  configurable: !0
2322
2321
  }), Object.defineProperty(t.prototype, "right", {
2323
2322
  get: function() {
2324
- throw I();
2323
+ throw k();
2325
2324
  },
2326
2325
  enumerable: !1,
2327
2326
  configurable: !0
@@ -2332,7 +2331,7 @@ ye.EMPTY = new (/** @class */ function() {
2332
2331
  },
2333
2332
  // Returns a copy of the tree, with the specified key/value added.
2334
2333
  t.prototype.insert = function(t, e, n) {
2335
- return new ye(t, e);
2334
+ return new de(t, e);
2336
2335
  },
2337
2336
  // Returns a copy of the tree, with the specified key removed.
2338
2337
  t.prototype.remove = function(t, e) {
@@ -2381,9 +2380,9 @@ ye.EMPTY = new (/** @class */ function() {
2381
2380
  * NOTE: if provided comparator returns 0 for two elements, we consider them to
2382
2381
  * be equal!
2383
2382
  */
2384
- var me = /** @class */ function() {
2383
+ var ye = /** @class */ function() {
2385
2384
  function t(t) {
2386
- this.comparator = t, this.data = new pe(this.comparator);
2385
+ this.comparator = t, this.data = new he(this.comparator);
2387
2386
  }
2388
2387
  return t.prototype.has = function(t) {
2389
2388
  return null !== this.data.get(t);
@@ -2423,9 +2422,9 @@ var me = /** @class */ function() {
2423
2422
  var e = this.data.getIteratorFrom(t);
2424
2423
  return e.hasNext() ? e.getNext().key : null;
2425
2424
  }, t.prototype.getIterator = function() {
2426
- return new ve(this.data.getIterator());
2425
+ return new me(this.data.getIterator());
2427
2426
  }, t.prototype.getIteratorFrom = function(t) {
2428
- return new ve(this.data.getIteratorFrom(t));
2427
+ return new me(this.data.getIteratorFrom(t));
2429
2428
  },
2430
2429
  /** Inserts or updates an element */ t.prototype.add = function(t) {
2431
2430
  return this.copy(this.data.remove(t).insert(t, !0));
@@ -2462,7 +2461,7 @@ var me = /** @class */ function() {
2462
2461
  var n = new t(this.comparator);
2463
2462
  return n.data = e, n;
2464
2463
  }, t;
2465
- }(), ve = /** @class */ function() {
2464
+ }(), me = /** @class */ function() {
2466
2465
  function t(t) {
2467
2466
  this.iter = t;
2468
2467
  }
@@ -2476,7 +2475,7 @@ var me = /** @class */ function() {
2476
2475
  this.fields = t,
2477
2476
  // TODO(dimond): validation of FieldMask
2478
2477
  // Sort the field mask to support `FieldMask.isEqual()` and assert below.
2479
- t.sort(it.comparator);
2478
+ t.sort(rt.comparator);
2480
2479
  }
2481
2480
  return t.empty = function() {
2482
2481
  return new t([]);
@@ -2486,7 +2485,7 @@ var me = /** @class */ function() {
2486
2485
  * fields paths to this field mask.
2487
2486
  */
2488
2487
  t.prototype.unionWith = function(e) {
2489
- for (var n = new me(it.comparator), r = 0, i = this.fields; r < i.length; r++) {
2488
+ for (var n = new ye(rt.comparator), r = 0, i = this.fields; r < i.length; r++) {
2490
2489
  var o = i[r];
2491
2490
  n = n.add(o);
2492
2491
  }
@@ -2508,11 +2507,11 @@ var me = /** @class */ function() {
2508
2507
  }
2509
2508
  return !1;
2510
2509
  }, t.prototype.isEqual = function(t) {
2511
- return kt(this.fields, t.fields, (function(t, e) {
2510
+ return St(this.fields, t.fields, (function(t, e) {
2512
2511
  return t.isEqual(e);
2513
2512
  }));
2514
2513
  }, t;
2515
- }(), we = /** @class */ function() {
2514
+ }(), ve = /** @class */ function() {
2516
2515
  function t(t) {
2517
2516
  this.value = t;
2518
2517
  }
@@ -2529,7 +2528,7 @@ var me = /** @class */ function() {
2529
2528
  */
2530
2529
  t.prototype.field = function(t) {
2531
2530
  if (t.isEmpty()) return this.value;
2532
- for (var e = this.value, n = 0; n < t.length - 1; ++n) if (!Ht(e = (e.mapValue.fields || {})[t.get(n)])) return null;
2531
+ for (var e = this.value, n = 0; n < t.length - 1; ++n) if (!Yt(e = (e.mapValue.fields || {})[t.get(n)])) return null;
2533
2532
  return (e = (e.mapValue.fields || {})[t.lastSegment()]) || null;
2534
2533
  },
2535
2534
  /**
@@ -2539,7 +2538,7 @@ var me = /** @class */ function() {
2539
2538
  * @param value - The value to set.
2540
2539
  */
2541
2540
  t.prototype.set = function(t, e) {
2542
- this.getFieldsMap(t.popLast())[t.lastSegment()] = Wt(e);
2541
+ this.getFieldsMap(t.popLast())[t.lastSegment()] = Ht(e);
2543
2542
  },
2544
2543
  /**
2545
2544
  * Sets the provided fields to the provided values.
@@ -2547,14 +2546,14 @@ var me = /** @class */ function() {
2547
2546
  * @param data - A map of fields to values (or null for deletes).
2548
2547
  */
2549
2548
  t.prototype.setAll = function(t) {
2550
- var e = this, n = it.emptyPath(), r = {}, i = [];
2549
+ var e = this, n = rt.emptyPath(), r = {}, i = [];
2551
2550
  t.forEach((function(t, o) {
2552
2551
  if (!n.isImmediateParentOf(o)) {
2553
2552
  // Insert the accumulated changes at this parent location
2554
2553
  var a = e.getFieldsMap(n);
2555
2554
  e.applyChanges(a, r, i), r = {}, i = [], n = o.popLast();
2556
2555
  }
2557
- t ? r[o.lastSegment()] = Wt(t) : i.push(o.lastSegment());
2556
+ t ? r[o.lastSegment()] = Ht(t) : i.push(o.lastSegment());
2558
2557
  }));
2559
2558
  var o = this.getFieldsMap(n);
2560
2559
  this.applyChanges(o, r, i);
@@ -2567,9 +2566,9 @@ var me = /** @class */ function() {
2567
2566
  */
2568
2567
  t.prototype.delete = function(t) {
2569
2568
  var e = this.field(t.popLast());
2570
- Ht(e) && e.mapValue.fields && delete e.mapValue.fields[t.lastSegment()];
2569
+ Yt(e) && e.mapValue.fields && delete e.mapValue.fields[t.lastSegment()];
2571
2570
  }, t.prototype.isEqual = function(t) {
2572
- return Mt(this.value, t.value);
2571
+ return Lt(this.value, t.value);
2573
2572
  },
2574
2573
  /**
2575
2574
  * Returns the map that contains the leaf element of `path`. If the parent
@@ -2582,7 +2581,7 @@ var me = /** @class */ function() {
2582
2581
  });
2583
2582
  for (var n = 0; n < t.length; ++n) {
2584
2583
  var r = e.mapValue.fields[t.get(n)];
2585
- Ht(r) && r.mapValue.fields || (r = {
2584
+ Yt(r) && r.mapValue.fields || (r = {
2586
2585
  mapValue: {
2587
2586
  fields: {}
2588
2587
  }
@@ -2595,7 +2594,7 @@ var me = /** @class */ function() {
2595
2594
  * entries.
2596
2595
  */
2597
2596
  t.prototype.applyChanges = function(t, e, n) {
2598
- At(e, (function(e, n) {
2597
+ It(e, (function(e, n) {
2599
2598
  return t[e] = n;
2600
2599
  }));
2601
2600
  for (var r = 0, i = n; r < i.length; r++) {
@@ -2603,9 +2602,9 @@ var me = /** @class */ function() {
2603
2602
  delete t[o];
2604
2603
  }
2605
2604
  }, t.prototype.clone = function() {
2606
- return new t(Wt(this.value));
2605
+ return new t(Ht(this.value));
2607
2606
  }, t;
2608
- }(), _e = /** @class */ function() {
2607
+ }(), we = /** @class */ function() {
2609
2608
  function t(t, e, n, r, i, o, a) {
2610
2609
  this.key = t, this.documentType = e, this.version = n, this.readTime = r, this.createTime = i,
2611
2610
  this.data = o, this.documentState = a
@@ -2616,9 +2615,9 @@ var me = /** @class */ function() {
2616
2615
  }
2617
2616
  return t.newInvalidDocument = function(e) {
2618
2617
  return new t(e, 0 /* DocumentType.INVALID */ ,
2619
- /* version */ he.min(),
2620
- /* readTime */ he.min(),
2621
- /* createTime */ he.min(), we.empty(), 0 /* DocumentState.SYNCED */);
2618
+ /* version */ fe.min(),
2619
+ /* readTime */ fe.min(),
2620
+ /* createTime */ fe.min(), ve.empty(), 0 /* DocumentState.SYNCED */);
2622
2621
  },
2623
2622
  /**
2624
2623
  * Creates a new document that is known to exist with the given data at the
@@ -2627,14 +2626,14 @@ var me = /** @class */ function() {
2627
2626
  t.newFoundDocument = function(e, n, r, i) {
2628
2627
  return new t(e, 1 /* DocumentType.FOUND_DOCUMENT */ ,
2629
2628
  /* version */ n,
2630
- /* readTime */ he.min(),
2629
+ /* readTime */ fe.min(),
2631
2630
  /* createTime */ r, i, 0 /* DocumentState.SYNCED */);
2632
2631
  },
2633
2632
  /** Creates a new document that is known to not exist at the given version. */ t.newNoDocument = function(e, n) {
2634
2633
  return new t(e, 2 /* DocumentType.NO_DOCUMENT */ ,
2635
2634
  /* version */ n,
2636
- /* readTime */ he.min(),
2637
- /* createTime */ he.min(), we.empty(), 0 /* DocumentState.SYNCED */);
2635
+ /* readTime */ fe.min(),
2636
+ /* createTime */ fe.min(), ve.empty(), 0 /* DocumentState.SYNCED */);
2638
2637
  },
2639
2638
  /**
2640
2639
  * Creates a new document that is known to exist at the given version but
@@ -2644,8 +2643,8 @@ var me = /** @class */ function() {
2644
2643
  t.newUnknownDocument = function(e, n) {
2645
2644
  return new t(e, 3 /* DocumentType.UNKNOWN_DOCUMENT */ ,
2646
2645
  /* version */ n,
2647
- /* readTime */ he.min(),
2648
- /* createTime */ he.min(), we.empty(), 2 /* DocumentState.HAS_COMMITTED_MUTATIONS */);
2646
+ /* readTime */ fe.min(),
2647
+ /* createTime */ fe.min(), ve.empty(), 2 /* DocumentState.HAS_COMMITTED_MUTATIONS */);
2649
2648
  },
2650
2649
  /**
2651
2650
  * Changes the document type to indicate that it exists and that its version
@@ -2657,7 +2656,7 @@ var me = /** @class */ function() {
2657
2656
  // update from Watch or due to applying a local set mutation on top
2658
2657
  // of a deleted document, our best guess about its createTime would be the
2659
2658
  // version at which the document transitioned to a FOUND_DOCUMENT.
2660
- return !this.createTime.isEqual(he.min()) || 2 /* DocumentType.NO_DOCUMENT */ !== this.documentType && 0 /* DocumentType.INVALID */ !== this.documentType || (this.createTime = t),
2659
+ return !this.createTime.isEqual(fe.min()) || 2 /* DocumentType.NO_DOCUMENT */ !== this.documentType && 0 /* DocumentType.INVALID */ !== this.documentType || (this.createTime = t),
2661
2660
  this.version = t, this.documentType = 1 /* DocumentType.FOUND_DOCUMENT */ , this.data = e,
2662
2661
  this.documentState = 0 /* DocumentState.SYNCED */ , this;
2663
2662
  },
@@ -2667,7 +2666,7 @@ var me = /** @class */ function() {
2667
2666
  */
2668
2667
  t.prototype.convertToNoDocument = function(t) {
2669
2668
  return this.version = t, this.documentType = 2 /* DocumentType.NO_DOCUMENT */ ,
2670
- this.data = we.empty(), this.documentState = 0 /* DocumentState.SYNCED */ , this;
2669
+ this.data = ve.empty(), this.documentState = 0 /* DocumentState.SYNCED */ , this;
2671
2670
  },
2672
2671
  /**
2673
2672
  * Changes the document type to indicate that it exists at a given version but
@@ -2676,12 +2675,12 @@ var me = /** @class */ function() {
2676
2675
  */
2677
2676
  t.prototype.convertToUnknownDocument = function(t) {
2678
2677
  return this.version = t, this.documentType = 3 /* DocumentType.UNKNOWN_DOCUMENT */ ,
2679
- this.data = we.empty(), this.documentState = 2 /* DocumentState.HAS_COMMITTED_MUTATIONS */ ,
2678
+ this.data = ve.empty(), this.documentState = 2 /* DocumentState.HAS_COMMITTED_MUTATIONS */ ,
2680
2679
  this;
2681
2680
  }, t.prototype.setHasCommittedMutations = function() {
2682
2681
  return this.documentState = 2 /* DocumentState.HAS_COMMITTED_MUTATIONS */ , this;
2683
2682
  }, t.prototype.setHasLocalMutations = function() {
2684
- return this.documentState = 1 /* DocumentState.HAS_LOCAL_MUTATIONS */ , this.version = he.min(),
2683
+ return this.documentState = 1 /* DocumentState.HAS_LOCAL_MUTATIONS */ , this.version = fe.min(),
2685
2684
  this;
2686
2685
  }, t.prototype.setReadTime = function(t) {
2687
2686
  return this.readTime = t, this;
@@ -2718,7 +2717,7 @@ var me = /** @class */ function() {
2718
2717
  }, t.prototype.toString = function() {
2719
2718
  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, "})");
2720
2719
  }, t;
2721
- }(), be = function(t, e, n, r, i, o, a) {
2720
+ }(), _e = function(t, e, n, r, i, o, a) {
2722
2721
  void 0 === e && (e = null), void 0 === n && (n = []), void 0 === r && (r = []),
2723
2722
  void 0 === i && (i = null), void 0 === o && (o = null), void 0 === a && (a = null),
2724
2723
  this.path = t, this.collectionGroup = e, this.orderBy = n, this.filters = r, this.limit = i,
@@ -2733,10 +2732,10 @@ var me = /** @class */ function() {
2733
2732
  * using this factory method, because `Query` provides an implicit `orderBy`
2734
2733
  * property.
2735
2734
  */
2736
- function Te(t, e, n, r, i, o, a) {
2735
+ function be(t, e, n, r, i, o, a) {
2737
2736
  return void 0 === e && (e = null), void 0 === n && (n = []), void 0 === r && (r = []),
2738
2737
  void 0 === i && (i = null), void 0 === o && (o = null), void 0 === a && (a = null),
2739
- new be(t, e, n, r, i, o, a);
2738
+ new _e(t, e, n, r, i, o, a);
2740
2739
  }
2741
2740
 
2742
2741
  /**
@@ -2761,7 +2760,7 @@ function Te(t, e, n, r, i, o, a) {
2761
2760
  * query the RemoteStore results.
2762
2761
  *
2763
2762
  * Visible for testing.
2764
- */ var Ee =
2763
+ */ var Te =
2765
2764
  /**
2766
2765
  * Initializes a Query with a path and optional additional query constraints.
2767
2766
  * Path must currently be empty if this is a collection group query.
@@ -2786,7 +2785,7 @@ function(t, e, n, r, i, o /* LimitType.First */ , a, u) {
2786
2785
  /**
2787
2786
  * Returns whether the query matches a collection group rather than a specific
2788
2787
  * collection.
2789
- */ function Se(t) {
2788
+ */ function Ee(t) {
2790
2789
  return null !== t.collectionGroup;
2791
2790
  }
2792
2791
 
@@ -2796,8 +2795,8 @@ function(t, e, n, r, i, o /* LimitType.First */ , a, u) {
2796
2795
  * the SDK and backend always orders by `__name__`). The normalized order-by
2797
2796
  * includes implicit order-bys in addition to the explicit user provided
2798
2797
  * order-bys.
2799
- */ function ke(t) {
2800
- var e = P(t);
2798
+ */ function Se(t) {
2799
+ var e = A(t);
2801
2800
  if (null === e.S) {
2802
2801
  e.S = [];
2803
2802
  // Any explicit order by fields should be added as is.
@@ -2809,7 +2808,7 @@ function(t, e, n, r, i, o /* LimitType.First */ , a, u) {
2809
2808
  var a = e.explicitOrderBy.length > 0 ? e.explicitOrderBy[e.explicitOrderBy.length - 1].dir : "asc" /* Direction.ASCENDING */ , u =
2810
2809
  // Returns the sorted set of inequality filter fields used in this query.
2811
2810
  function(t) {
2812
- var e = new me(it.comparator);
2811
+ var e = new ye(rt.comparator);
2813
2812
  return t.filters.forEach((function(t) {
2814
2813
  t.getFlattenedFilters().forEach((function(t) {
2815
2814
  t.isInequality() && (e = e.add(t.field));
@@ -2822,19 +2821,19 @@ function(t, e, n, r, i, o /* LimitType.First */ , a, u) {
2822
2821
  // Note: `SortedSet<FieldPath>` sorts the key field before other fields. However, we want the key
2823
2822
  // field to be sorted last.
2824
2823
  u.forEach((function(t) {
2825
- n.has(t.canonicalString()) || t.isKeyField() || e.S.push(new le(t, a));
2824
+ n.has(t.canonicalString()) || t.isKeyField() || e.S.push(new ce(t, a));
2826
2825
  })),
2827
2826
  // Add the document key field to the last if it is not explicitly ordered.
2828
- n.has(it.keyField().canonicalString()) || e.S.push(new le(it.keyField(), a));
2827
+ n.has(rt.keyField().canonicalString()) || e.S.push(new ce(rt.keyField(), a));
2829
2828
  }
2830
2829
  return e.S;
2831
2830
  }
2832
2831
 
2833
2832
  /**
2834
2833
  * Converts this `Query` instance to its corresponding `Target` representation.
2835
- */ function Ie(t) {
2836
- var e = P(t);
2837
- return e.N || (e.N = Ae(e, ke(t))), e.N
2834
+ */ function ke(t) {
2835
+ var e = A(t);
2836
+ return e.N || (e.N = Ie(e, Se(t))), e.N
2838
2837
  /**
2839
2838
  * Converts this `Query` instance to its corresponding `Target` representation,
2840
2839
  * for use within an aggregate query. Unlike targets for non-aggregate queries,
@@ -2843,22 +2842,22 @@ function(t, e, n, r, i, o /* LimitType.First */ , a, u) {
2843
2842
  */;
2844
2843
  }
2845
2844
 
2846
- function Ae(t, e) {
2847
- if ("F" /* LimitType.First */ === t.limitType) return Te(t.path, t.collectionGroup, e, t.filters, t.limit, t.startAt, t.endAt);
2845
+ function Ie(t, e) {
2846
+ if ("F" /* LimitType.First */ === t.limitType) return be(t.path, t.collectionGroup, e, t.filters, t.limit, t.startAt, t.endAt);
2848
2847
  // Flip the orderBy directions since we want the last results
2849
2848
  e = e.map((function(t) {
2850
2849
  var e = "desc" /* Direction.DESCENDING */ === t.dir ? "asc" /* Direction.ASCENDING */ : "desc" /* Direction.DESCENDING */;
2851
- return new le(t.field, e);
2850
+ return new ce(t.field, e);
2852
2851
  }));
2853
2852
  // We need to swap the cursors to match the now-flipped query ordering.
2854
- var n = t.endAt ? new Jt(t.endAt.position, t.endAt.inclusive) : null, r = t.startAt ? new Jt(t.startAt.position, t.startAt.inclusive) : null;
2853
+ var n = t.endAt ? new Wt(t.endAt.position, t.endAt.inclusive) : null, r = t.startAt ? new Wt(t.startAt.position, t.startAt.inclusive) : null;
2855
2854
  // Now return as a LimitType.First query.
2856
- return Te(t.path, t.collectionGroup, e, t.filters, t.limit, n, r);
2855
+ return be(t.path, t.collectionGroup, e, t.filters, t.limit, n, r);
2857
2856
  }
2858
2857
 
2859
- function Pe(t, e) {
2858
+ function Ae(t, e) {
2860
2859
  var n = t.filters.concat([ e ]);
2861
- return new Ee(t.path, t.collectionGroup, t.explicitOrderBy.slice(), n, t.limit, t.limitType, t.startAt, t.endAt);
2860
+ return new Te(t.path, t.collectionGroup, t.explicitOrderBy.slice(), n, t.limit, t.limitType, t.startAt, t.endAt);
2862
2861
  }
2863
2862
 
2864
2863
  /**
@@ -2886,9 +2885,9 @@ function Pe(t, e) {
2886
2885
  * The return value is an IntegerValue if it can safely represent the value,
2887
2886
  * otherwise a DoubleValue is returned.
2888
2887
  */
2889
- function Fe(t, e) {
2888
+ function Pe(t, e) {
2890
2889
  return function(t) {
2891
- return "number" == typeof t && Number.isInteger(t) && !yt(t) && t <= Number.MAX_SAFE_INTEGER && t >= Number.MIN_SAFE_INTEGER;
2890
+ return "number" == typeof t && Number.isInteger(t) && !dt(t) && t <= Number.MAX_SAFE_INTEGER && t >= Number.MIN_SAFE_INTEGER;
2892
2891
  }(e) ?
2893
2892
  /**
2894
2893
  * Returns an IntegerValue for `value`.
@@ -2910,7 +2909,7 @@ function Fe(t, e) {
2910
2909
  };
2911
2910
  }
2912
2911
  return {
2913
- doubleValue: yt(e) ? "-0" : e
2912
+ doubleValue: dt(e) ? "-0" : e
2914
2913
  };
2915
2914
  }(t, e);
2916
2915
  }
@@ -2931,36 +2930,36 @@ function Fe(t, e) {
2931
2930
  * See the License for the specific language governing permissions and
2932
2931
  * limitations under the License.
2933
2932
  */
2934
- /** Used to represent a field transform on a mutation. */ var Oe = function() {
2933
+ /** Used to represent a field transform on a mutation. */ var Fe = function() {
2935
2934
  // Make sure that the structural type of `TransformOperation` is unique.
2936
2935
  // See https://github.com/microsoft/TypeScript/issues/5451
2937
2936
  this._ = void 0;
2938
- }, Ve = /** @class */ function(e) {
2937
+ }, Oe = /** @class */ function(e) {
2939
2938
  function n() {
2940
2939
  return null !== e && e.apply(this, arguments) || this;
2941
2940
  }
2942
2941
  return t(n, e), n;
2943
- }(Oe), Ne = /** @class */ function(e) {
2942
+ }(Fe), Ve = /** @class */ function(e) {
2944
2943
  function n(t) {
2945
2944
  var n = this;
2946
2945
  return (n = e.call(this) || this).elements = t, n;
2947
2946
  }
2948
2947
  return t(n, e), n;
2949
- }(Oe), De = /** @class */ function(e) {
2948
+ }(Fe), Ne = /** @class */ function(e) {
2950
2949
  function n(t) {
2951
2950
  var n = this;
2952
2951
  return (n = e.call(this) || this).elements = t, n;
2953
2952
  }
2954
2953
  return t(n, e), n;
2955
- }(Oe), Re = /** @class */ function(e) {
2954
+ }(Fe), De = /** @class */ function(e) {
2956
2955
  function n(t, n) {
2957
2956
  var r = this;
2958
2957
  return (r = e.call(this) || this).serializer = t, r.q = n, r;
2959
2958
  }
2960
2959
  return t(n, e), n;
2961
- }(Oe), qe = function(t, e) {
2960
+ }(Fe), Re = function(t, e) {
2962
2961
  this.field = t, this.transform = e;
2963
- }, xe = /** @class */ function() {
2962
+ }, qe = /** @class */ function() {
2964
2963
  function t(t, e) {
2965
2964
  this.updateTime = t, this.exists = e
2966
2965
  /** Creates a new empty Precondition. */;
@@ -2982,7 +2981,7 @@ function Fe(t, e) {
2982
2981
  }), t.prototype.isEqual = function(t) {
2983
2982
  return this.exists === t.exists && (this.updateTime ? !!t.updateTime && this.updateTime.isEqual(t.updateTime) : !t.updateTime);
2984
2983
  }, t;
2985
- }(), Ce = function() {}, je = /** @class */ function(e) {
2984
+ }(), xe = function() {}, Ce = /** @class */ function(e) {
2986
2985
  function n(t, n, r, i) {
2987
2986
  void 0 === i && (i = []);
2988
2987
  var o = this;
@@ -2992,7 +2991,7 @@ function Fe(t, e) {
2992
2991
  return t(n, e), n.prototype.getFieldMask = function() {
2993
2992
  return null;
2994
2993
  }, n;
2995
- }(Ce), Le = /** @class */ function(e) {
2994
+ }(xe), je = /** @class */ function(e) {
2996
2995
  function n(t, n, r, i, o) {
2997
2996
  void 0 === o && (o = []);
2998
2997
  var a = this;
@@ -3002,7 +3001,7 @@ function Fe(t, e) {
3002
3001
  return t(n, e), n.prototype.getFieldMask = function() {
3003
3002
  return this.fieldMask;
3004
3003
  }, n;
3005
- }(Ce), Me = /** @class */ function(e) {
3004
+ }(xe), Le = /** @class */ function(e) {
3006
3005
  function n(t, n) {
3007
3006
  var r = this;
3008
3007
  return (r = e.call(this) || this).key = t, r.precondition = n, r.type = 2 /* MutationType.Delete */ ,
@@ -3011,7 +3010,7 @@ function Fe(t, e) {
3011
3010
  return t(n, e), n.prototype.getFieldMask = function() {
3012
3011
  return null;
3013
3012
  }, n;
3014
- }(Ce), Ue = /** @class */ function(e) {
3013
+ }(xe), Me = /** @class */ function(e) {
3015
3014
  function n(t, n) {
3016
3015
  var r = this;
3017
3016
  return (r = e.call(this) || this).key = t, r.precondition = n, r.type = 3 /* MutationType.Verify */ ,
@@ -3020,10 +3019,10 @@ function Fe(t, e) {
3020
3019
  return t(n, e), n.prototype.getFieldMask = function() {
3021
3020
  return null;
3022
3021
  }, n;
3023
- }(Ce), Be = {
3022
+ }(xe), Ue = {
3024
3023
  asc: "ASCENDING",
3025
3024
  desc: "DESCENDING"
3026
- }, ze = {
3025
+ }, Be = {
3027
3026
  "<": "LESS_THAN",
3028
3027
  "<=": "LESS_THAN_OR_EQUAL",
3029
3028
  ">": "GREATER_THAN",
@@ -3034,10 +3033,10 @@ function Fe(t, e) {
3034
3033
  in: "IN",
3035
3034
  "not-in": "NOT_IN",
3036
3035
  "array-contains-any": "ARRAY_CONTAINS_ANY"
3037
- }, Ge = {
3036
+ }, ze = {
3038
3037
  and: "AND",
3039
3038
  or: "OR"
3040
- }, Ke = function(t, e) {
3039
+ }, Ge = function(t, e) {
3041
3040
  this.databaseId = t, this.useProto3Json = e;
3042
3041
  };
3043
3042
 
@@ -3053,7 +3052,7 @@ function Fe(t, e) {
3053
3052
  /**
3054
3053
  * Returns a value for a Date that's appropriate to put into a proto.
3055
3054
  */
3056
- function Qe(t, e) {
3055
+ function Ke(t, e) {
3057
3056
  return t.useProto3Json ? "".concat(new Date(1e3 * e.seconds).toISOString().replace(/\.\d*/, "").replace("Z", ""), ".").concat(("000000000" + e.nanoseconds).slice(-9), "Z") : {
3058
3057
  seconds: "" + e.seconds,
3059
3058
  nanos: e.nanoseconds
@@ -3064,56 +3063,56 @@ function Qe(t, e) {
3064
3063
  * Returns a value for bytes that's appropriate to put in a proto.
3065
3064
  *
3066
3065
  * Visible for testing.
3067
- */ function Ye(t, e) {
3066
+ */ function Qe(t, e) {
3068
3067
  return t.useProto3Json ? e.toBase64() : e.toUint8Array();
3069
3068
  }
3070
3069
 
3071
- function He(t, e) {
3072
- return Qe(t, e.toTimestamp());
3070
+ function Ye(t, e) {
3071
+ return Ke(t, e.toTimestamp());
3073
3072
  }
3074
3073
 
3075
- function We(t) {
3076
- return A(!!t), he.fromTimestamp(function(t) {
3077
- var e = Vt(t);
3078
- return new Rt(e.seconds, e.nanos);
3074
+ function He(t) {
3075
+ return I(!!t), fe.fromTimestamp(function(t) {
3076
+ var e = Ot(t);
3077
+ return new Dt(e.seconds, e.nanos);
3079
3078
  }(t));
3080
3079
  }
3081
3080
 
3082
- function Je(t, e) {
3083
- return Xe(t, e).canonicalString();
3081
+ function We(t, e) {
3082
+ return Je(t, e).canonicalString();
3084
3083
  }
3085
3084
 
3086
- function Xe(t, e) {
3085
+ function Je(t, e) {
3087
3086
  var n = function(t) {
3088
- return new nt([ "projects", t.projectId, "databases", t.database ]);
3087
+ return new et([ "projects", t.projectId, "databases", t.database ]);
3089
3088
  }(t).child("documents");
3090
3089
  return void 0 === e ? n : n.child(e);
3091
3090
  }
3092
3091
 
3093
- function Ze(t, e) {
3094
- return Je(t.databaseId, e.path);
3092
+ function Xe(t, e) {
3093
+ return We(t.databaseId, e.path);
3095
3094
  }
3096
3095
 
3097
- function $e(t, e) {
3096
+ function Ze(t, e) {
3098
3097
  var n = function(t) {
3099
- var e = nt.fromString(t);
3100
- return A(cn(e)), e;
3098
+ var e = et.fromString(t);
3099
+ return I(sn(e)), e;
3101
3100
  }(e);
3102
- if (n.get(1) !== t.databaseId.projectId) throw new z(V, "Tried to deserialize key from different project: " + n.get(1) + " vs " + t.databaseId.projectId);
3103
- if (n.get(3) !== t.databaseId.database) throw new z(V, "Tried to deserialize key from different database: " + n.get(3) + " vs " + t.databaseId.database);
3104
- return new ot(function(t) {
3105
- return A(t.length > 4 && "documents" === t.get(4)), t.popFirst(5);
3101
+ if (n.get(1) !== t.databaseId.projectId) throw new B(O, "Tried to deserialize key from different project: " + n.get(1) + " vs " + t.databaseId.projectId);
3102
+ if (n.get(3) !== t.databaseId.database) throw new B(O, "Tried to deserialize key from different database: " + n.get(3) + " vs " + t.databaseId.database);
3103
+ return new it(function(t) {
3104
+ return I(t.length > 4 && "documents" === t.get(4)), t.popFirst(5);
3106
3105
  }(n));
3107
3106
  }
3108
3107
 
3109
- function tn(t, e, n) {
3108
+ function $e(t, e, n) {
3110
3109
  return {
3111
- name: Ze(t, e),
3110
+ name: Xe(t, e),
3112
3111
  fields: n.value.mapValue.fields
3113
3112
  };
3114
3113
  }
3115
3114
 
3116
- function en(t, e) {
3115
+ function tn(t, e) {
3117
3116
  // Dissect the path into parent, collectionId, and optional key filter.
3118
3117
  var n, r = {
3119
3118
  structuredQuery: {}
@@ -3124,10 +3123,10 @@ function en(t, e) {
3124
3123
  } ]) : (n = i.popLast(), r.structuredQuery.from = [ {
3125
3124
  collectionId: i.lastSegment()
3126
3125
  } ]), r.parent = function(t, e) {
3127
- return Je(t.databaseId, e);
3126
+ return We(t.databaseId, e);
3128
3127
  }(t, n);
3129
3128
  var o = function(t) {
3130
- if (0 !== t.length) return un(te.create(t, "and" /* CompositeOperator.AND */));
3129
+ if (0 !== t.length) return an($t.create(t, "and" /* CompositeOperator.AND */));
3131
3130
  }(e.filters);
3132
3131
  o && (r.structuredQuery.where = o);
3133
3132
  var a = function(t) {
@@ -3135,15 +3134,15 @@ function en(t, e) {
3135
3134
  // visible for testing
3136
3135
  return function(t) {
3137
3136
  return {
3138
- field: an(t.field),
3139
- direction: nn(t.dir)
3137
+ field: on(t.field),
3138
+ direction: en(t.dir)
3140
3139
  };
3141
3140
  }(t);
3142
3141
  }));
3143
3142
  }(e.orderBy);
3144
3143
  a && (r.structuredQuery.orderBy = a);
3145
3144
  var u = function(t, e) {
3146
- return t.useProto3Json || dt(e) ? e : {
3145
+ return t.useProto3Json || pt(e) ? e : {
3147
3146
  value: e
3148
3147
  };
3149
3148
  }(t, e.limit);
@@ -3163,75 +3162,75 @@ function en(t, e) {
3163
3162
  };
3164
3163
  }
3165
3164
 
3165
+ function en(t) {
3166
+ return Ue[t];
3167
+ }
3168
+
3169
+ // visible for testing
3166
3170
  function nn(t) {
3167
3171
  return Be[t];
3168
3172
  }
3169
3173
 
3170
- // visible for testing
3171
3174
  function rn(t) {
3172
3175
  return ze[t];
3173
3176
  }
3174
3177
 
3175
3178
  function on(t) {
3176
- return Ge[t];
3177
- }
3178
-
3179
- function an(t) {
3180
3179
  return {
3181
3180
  fieldPath: t.canonicalString()
3182
3181
  };
3183
3182
  }
3184
3183
 
3185
- function un(t) {
3186
- return t instanceof $t ? function(t) {
3184
+ function an(t) {
3185
+ return t instanceof Zt ? function(t) {
3187
3186
  if ("==" /* Operator.EQUAL */ === t.op) {
3188
- if (Yt(t.value)) return {
3187
+ if (Qt(t.value)) return {
3189
3188
  unaryFilter: {
3190
- field: an(t.field),
3189
+ field: on(t.field),
3191
3190
  op: "IS_NAN"
3192
3191
  }
3193
3192
  };
3194
- if (Qt(t.value)) return {
3193
+ if (Kt(t.value)) return {
3195
3194
  unaryFilter: {
3196
- field: an(t.field),
3195
+ field: on(t.field),
3197
3196
  op: "IS_NULL"
3198
3197
  }
3199
3198
  };
3200
3199
  } else if ("!=" /* Operator.NOT_EQUAL */ === t.op) {
3201
- if (Yt(t.value)) return {
3200
+ if (Qt(t.value)) return {
3202
3201
  unaryFilter: {
3203
- field: an(t.field),
3202
+ field: on(t.field),
3204
3203
  op: "IS_NOT_NAN"
3205
3204
  }
3206
3205
  };
3207
- if (Qt(t.value)) return {
3206
+ if (Kt(t.value)) return {
3208
3207
  unaryFilter: {
3209
- field: an(t.field),
3208
+ field: on(t.field),
3210
3209
  op: "IS_NOT_NULL"
3211
3210
  }
3212
3211
  };
3213
3212
  }
3214
3213
  return {
3215
3214
  fieldFilter: {
3216
- field: an(t.field),
3217
- op: rn(t.op),
3215
+ field: on(t.field),
3216
+ op: nn(t.op),
3218
3217
  value: t.value
3219
3218
  }
3220
3219
  };
3221
- }(t) : t instanceof te ? function(t) {
3220
+ }(t) : t instanceof $t ? function(t) {
3222
3221
  var e = t.getFilters().map((function(t) {
3223
- return un(t);
3222
+ return an(t);
3224
3223
  }));
3225
3224
  return 1 === e.length ? e[0] : {
3226
3225
  compositeFilter: {
3227
- op: on(t.op),
3226
+ op: rn(t.op),
3228
3227
  filters: e
3229
3228
  }
3230
3229
  };
3231
- }(t) : I();
3230
+ }(t) : k();
3232
3231
  }
3233
3232
 
3234
- function sn(t) {
3233
+ function un(t) {
3235
3234
  var e = [];
3236
3235
  return t.fields.forEach((function(t) {
3237
3236
  return e.push(t.canonicalString());
@@ -3240,7 +3239,7 @@ function sn(t) {
3240
3239
  };
3241
3240
  }
3242
3241
 
3243
- function cn(t) {
3242
+ function sn(t) {
3244
3243
  // Resource names have at least 4 components (project ID, database ID)
3245
3244
  return t.length >= 4 && "projects" === t.get(0) && "databases" === t.get(2);
3246
3245
  }
@@ -3260,8 +3259,8 @@ function cn(t) {
3260
3259
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3261
3260
  * See the License for the specific language governing permissions and
3262
3261
  * limitations under the License.
3263
- */ function ln(t) {
3264
- return new Ke(t, /* useProto3Json= */ !0);
3262
+ */ function cn(t) {
3263
+ return new Ge(t, /* useProto3Json= */ !0);
3265
3264
  }
3266
3265
 
3267
3266
  /**
@@ -3288,7 +3287,7 @@ function cn(t) {
3288
3287
  * backoff curve, and a +/- 50% "jitter" that is calculated and added to the
3289
3288
  * base delay. This prevents clients from accidentally synchronizing their
3290
3289
  * delays causing spikes of load to the backend.
3291
- */ var fn = /** @class */ function() {
3290
+ */ var ln = /** @class */ function() {
3292
3291
  function t(
3293
3292
  /**
3294
3293
  * The AsyncQueue to run backoff operations on.
@@ -3347,7 +3346,7 @@ function cn(t) {
3347
3346
  // honored as such).
3348
3347
  var n = Math.floor(this.U + this.H()), r = Math.max(0, Date.now() - this.W), i = Math.max(0, n - r);
3349
3348
  // Guard against lastAttemptTime being in the future due to a clock change.
3350
- i > 0 && T("ExponentialBackoff", "Backing off for ".concat(i, " ms (base delay: ").concat(this.U, " ms, delay with jitter: ").concat(n, " ms, last attempt: ").concat(r, " ms ago)")),
3349
+ i > 0 && b("ExponentialBackoff", "Backing off for ".concat(i, " ms (base delay: ").concat(this.U, " ms, delay with jitter: ").concat(n, " ms, last attempt: ").concat(r, " ms ago)")),
3351
3350
  this.j = this.$.enqueueAfterDelay(this.timerId, i, (function() {
3352
3351
  return e.W = Date.now(), t();
3353
3352
  })),
@@ -3362,33 +3361,33 @@ function cn(t) {
3362
3361
  /** Returns a random value in the range [-currentBaseMs/2, currentBaseMs/2] */ t.prototype.H = function() {
3363
3362
  return (Math.random() - .5) * this.U;
3364
3363
  }, t;
3365
- }(), hn = /** @class */ function(e) {
3364
+ }(), fn = /** @class */ function(e) {
3366
3365
  function n(t, n, r, i) {
3367
3366
  var o = this;
3368
3367
  return (o = e.call(this) || this).authCredentials = t, o.appCheckCredentials = n,
3369
3368
  o.connection = r, o.serializer = i, o.Y = !1, o;
3370
3369
  }
3371
3370
  return t(n, e), n.prototype.Z = function() {
3372
- if (this.Y) throw new z(C, "The client has already been terminated.");
3371
+ if (this.Y) throw new B(x, "The client has already been terminated.");
3373
3372
  },
3374
3373
  /** Invokes the provided RPC with auth and AppCheck tokens. */ n.prototype.P = function(t, e, n, r) {
3375
3374
  var i = this;
3376
3375
  return this.Z(), Promise.all([ this.authCredentials.getToken(), this.appCheckCredentials.getToken() ]).then((function(o) {
3377
3376
  var a = o[0], u = o[1];
3378
- return i.connection.P(t, Xe(e, n), r, a, u);
3377
+ return i.connection.P(t, Je(e, n), r, a, u);
3379
3378
  })).catch((function(t) {
3380
- throw "FirebaseError" === t.name ? (t.code === q && (i.authCredentials.invalidateToken(),
3381
- i.appCheckCredentials.invalidateToken()), t) : new z(O, t.toString());
3379
+ throw "FirebaseError" === t.name ? (t.code === R && (i.authCredentials.invalidateToken(),
3380
+ i.appCheckCredentials.invalidateToken()), t) : new B(F, t.toString());
3382
3381
  }));
3383
3382
  },
3384
3383
  /** Invokes the provided RPC with streamed results with auth and AppCheck tokens. */ n.prototype.g = function(t, e, n, r, i) {
3385
3384
  var o = this;
3386
3385
  return this.Z(), Promise.all([ this.authCredentials.getToken(), this.appCheckCredentials.getToken() ]).then((function(a) {
3387
3386
  var u = a[0], s = a[1];
3388
- return o.connection.g(t, Xe(e, n), r, u, s, i);
3387
+ return o.connection.g(t, Je(e, n), r, u, s, i);
3389
3388
  })).catch((function(t) {
3390
- throw "FirebaseError" === t.name ? (t.code === q && (o.authCredentials.invalidateToken(),
3391
- o.appCheckCredentials.invalidateToken()), t) : new z(O, t.toString());
3389
+ throw "FirebaseError" === t.name ? (t.code === R && (o.authCredentials.invalidateToken(),
3390
+ o.appCheckCredentials.invalidateToken()), t) : new B(F, t.toString());
3392
3391
  }));
3393
3392
  }, n.prototype.terminate = function() {
3394
3393
  this.Y = !0, this.connection.terminate();
@@ -3422,64 +3421,64 @@ function cn(t) {
3422
3421
  */
3423
3422
  // TODO(firestorexp): Make sure there is only one Datastore instance per
3424
3423
  // firestore-exp client.
3425
- function pn(t, r) {
3424
+ function hn(t, r) {
3426
3425
  return e(this, void 0, void 0, (function() {
3427
3426
  var e, i;
3428
3427
  return n(this, (function(n) {
3429
3428
  switch (n.label) {
3430
3429
  case 0:
3431
- return e = P(t), i = {
3430
+ return e = A(t), i = {
3432
3431
  writes: r.map((function(t) {
3433
3432
  return function(t, e) {
3434
3433
  var n;
3435
- if (e instanceof je) n = {
3436
- update: tn(t, e.key, e.value)
3437
- }; else if (e instanceof Me) n = {
3438
- delete: Ze(t, e.key)
3434
+ if (e instanceof Ce) n = {
3435
+ update: $e(t, e.key, e.value)
3439
3436
  }; else if (e instanceof Le) n = {
3440
- update: tn(t, e.key, e.data),
3441
- updateMask: sn(e.fieldMask)
3437
+ delete: Xe(t, e.key)
3438
+ }; else if (e instanceof je) n = {
3439
+ update: $e(t, e.key, e.data),
3440
+ updateMask: un(e.fieldMask)
3442
3441
  }; else {
3443
- if (!(e instanceof Ue)) return I();
3442
+ if (!(e instanceof Me)) return k();
3444
3443
  n = {
3445
- verify: Ze(t, e.key)
3444
+ verify: Xe(t, e.key)
3446
3445
  };
3447
3446
  }
3448
3447
  return e.fieldTransforms.length > 0 && (n.updateTransforms = e.fieldTransforms.map((function(t) {
3449
3448
  return function(t, e) {
3450
3449
  var n = e.transform;
3451
- if (n instanceof Ve) return {
3450
+ if (n instanceof Oe) return {
3452
3451
  fieldPath: e.field.canonicalString(),
3453
3452
  setToServerValue: "REQUEST_TIME"
3454
3453
  };
3455
- if (n instanceof Ne) return {
3454
+ if (n instanceof Ve) return {
3456
3455
  fieldPath: e.field.canonicalString(),
3457
3456
  appendMissingElements: {
3458
3457
  values: n.elements
3459
3458
  }
3460
3459
  };
3461
- if (n instanceof De) return {
3460
+ if (n instanceof Ne) return {
3462
3461
  fieldPath: e.field.canonicalString(),
3463
3462
  removeAllFromArray: {
3464
3463
  values: n.elements
3465
3464
  }
3466
3465
  };
3467
- if (n instanceof Re) return {
3466
+ if (n instanceof De) return {
3468
3467
  fieldPath: e.field.canonicalString(),
3469
3468
  increment: n.q
3470
3469
  };
3471
- throw I();
3470
+ throw k();
3472
3471
  }(0, t);
3473
3472
  }))), e.precondition.isNone || (n.currentDocument = function(t, e) {
3474
3473
  return void 0 !== e.updateTime ? {
3475
- updateTime: He(t, e.updateTime)
3474
+ updateTime: Ye(t, e.updateTime)
3476
3475
  } : void 0 !== e.exists ? {
3477
3476
  exists: e.exists
3478
- } : I();
3477
+ } : k();
3479
3478
  }(t, e.precondition)), n;
3480
3479
  }(e.serializer, t);
3481
3480
  }))
3482
- }, [ 4 /*yield*/ , e.P("Commit", e.serializer.databaseId, nt.emptyPath(), i) ];
3481
+ }, [ 4 /*yield*/ , e.P("Commit", e.serializer.databaseId, et.emptyPath(), i) ];
3483
3482
 
3484
3483
  case 1:
3485
3484
  return n.sent(), [ 2 /*return*/ ];
@@ -3488,39 +3487,39 @@ function pn(t, r) {
3488
3487
  }));
3489
3488
  }
3490
3489
 
3491
- function dn(t, r) {
3490
+ function pn(t, r) {
3492
3491
  return e(this, void 0, void 0, (function() {
3493
3492
  var e, i, o, a, u;
3494
3493
  return n(this, (function(n) {
3495
3494
  switch (n.label) {
3496
3495
  case 0:
3497
- return e = P(t), i = {
3496
+ return e = A(t), i = {
3498
3497
  documents: r.map((function(t) {
3499
- return Ze(e.serializer, t);
3498
+ return Xe(e.serializer, t);
3500
3499
  }))
3501
- }, [ 4 /*yield*/ , e.g("BatchGetDocuments", e.serializer.databaseId, nt.emptyPath(), i, r.length) ];
3500
+ }, [ 4 /*yield*/ , e.g("BatchGetDocuments", e.serializer.databaseId, et.emptyPath(), i, r.length) ];
3502
3501
 
3503
3502
  case 1:
3504
3503
  return o = n.sent(), a = new Map, o.forEach((function(t) {
3505
3504
  var n = function(t, e) {
3506
3505
  return "found" in e ? function(t, e) {
3507
- A(!!e.found), e.found.name, e.found.updateTime;
3508
- var n = $e(t, e.found.name), r = We(e.found.updateTime), i = e.found.createTime ? We(e.found.createTime) : he.min(), o = new we({
3506
+ I(!!e.found), e.found.name, e.found.updateTime;
3507
+ var n = Ze(t, e.found.name), r = He(e.found.updateTime), i = e.found.createTime ? He(e.found.createTime) : fe.min(), o = new ve({
3509
3508
  mapValue: {
3510
3509
  fields: e.found.fields
3511
3510
  }
3512
3511
  });
3513
- return _e.newFoundDocument(n, r, i, o);
3512
+ return we.newFoundDocument(n, r, i, o);
3514
3513
  }(t, e) : "missing" in e ? function(t, e) {
3515
- A(!!e.missing), A(!!e.readTime);
3516
- var n = $e(t, e.missing), r = We(e.readTime);
3517
- return _e.newNoDocument(n, r);
3518
- }(t, e) : I();
3514
+ I(!!e.missing), I(!!e.readTime);
3515
+ var n = Ze(t, e.missing), r = He(e.readTime);
3516
+ return we.newNoDocument(n, r);
3517
+ }(t, e) : k();
3519
3518
  }(e.serializer, t);
3520
3519
  a.set(n.key.toString(), n);
3521
3520
  })), u = [], [ 2 /*return*/ , (r.forEach((function(t) {
3522
3521
  var e = a.get(t.toString());
3523
- A(!!e), u.push(e);
3522
+ I(!!e), u.push(e);
3524
3523
  })), u) ];
3525
3524
  }
3526
3525
  }));
@@ -3543,7 +3542,7 @@ function dn(t, r) {
3543
3542
  * See the License for the specific language governing permissions and
3544
3543
  * limitations under the License.
3545
3544
  */
3546
- var yn = new Map;
3545
+ var dn = new Map;
3547
3546
 
3548
3547
  /**
3549
3548
  * An instance map that ensures only one Datastore exists per Firestore
@@ -3553,20 +3552,20 @@ var yn = new Map;
3553
3552
  * Returns an initialized and started Datastore for the given Firestore
3554
3553
  * instance. Callers must invoke removeComponents() when the Firestore
3555
3554
  * instance is terminated.
3556
- */ function mn(t) {
3557
- if (t._terminated) throw new z(C, "The client has already been terminated.");
3558
- if (!yn.has(t)) {
3559
- T("ComponentProvider", "Initializing Datastore");
3555
+ */ function yn(t) {
3556
+ if (t._terminated) throw new B(x, "The client has already been terminated.");
3557
+ if (!dn.has(t)) {
3558
+ b("ComponentProvider", "Initializing Datastore");
3560
3559
  var e = function(t) {
3561
- return new _t(t, fetch.bind(null));
3560
+ return new wt(t, fetch.bind(null));
3562
3561
  }(function(t, e, n, r) {
3563
- return new $(t, e, n, r.host, r.ssl, r.experimentalForceLongPolling, r.experimentalAutoDetectLongPolling, ht(r.experimentalLongPollingOptions), r.useFetchStreams);
3564
- }(t._databaseId, t.app.options.appId || "", t._persistenceKey, t._freezeSettings())), n = ln(t._databaseId), r = function(t, e, n, r) {
3565
- return new hn(t, e, n, r);
3562
+ return new Z(t, e, n, r.host, r.ssl, r.experimentalForceLongPolling, r.experimentalAutoDetectLongPolling, ft(r.experimentalLongPollingOptions), r.useFetchStreams);
3563
+ }(t._databaseId, t.app.options.appId || "", t._persistenceKey, t._freezeSettings())), n = cn(t._databaseId), r = function(t, e, n, r) {
3564
+ return new fn(t, e, n, r);
3566
3565
  }(t._authCredentials, t._appCheckCredentials, e, n);
3567
- yn.set(t, r);
3566
+ dn.set(t, r);
3568
3567
  }
3569
- return yn.get(t);
3568
+ return dn.get(t);
3570
3569
  }
3571
3570
 
3572
3571
  /**
@@ -3577,32 +3576,32 @@ var yn = new Map;
3577
3576
  * A concrete type describing all the values that can be applied via a
3578
3577
  * user-supplied `FirestoreSettings` object. This is a separate type so that
3579
3578
  * defaults can be supplied and the value can be checked for equality.
3580
- */ var vn = /** @class */ function() {
3579
+ */ var mn = /** @class */ function() {
3581
3580
  function t(t) {
3582
3581
  var e, n;
3583
3582
  if (void 0 === t.host) {
3584
- if (void 0 !== t.ssl) throw new z(V, "Can't provide ssl option if host option is not set");
3583
+ if (void 0 !== t.ssl) throw new B(O, "Can't provide ssl option if host option is not set");
3585
3584
  this.host = "firestore.googleapis.com", this.ssl = !0;
3586
3585
  } else this.host = t.host, this.ssl = null === (e = t.ssl) || void 0 === e || e;
3587
3586
  if (this.credentials = t.credentials, this.ignoreUndefinedProperties = !!t.ignoreUndefinedProperties,
3588
3587
  this.localCache = t.localCache, void 0 === t.cacheSizeBytes) this.cacheSizeBytes = 41943040; else {
3589
- if (-1 !== t.cacheSizeBytes && t.cacheSizeBytes < 1048576) throw new z(V, "cacheSizeBytes must be at least 1048576");
3588
+ if (-1 !== t.cacheSizeBytes && t.cacheSizeBytes < 1048576) throw new B(O, "cacheSizeBytes must be at least 1048576");
3590
3589
  this.cacheSizeBytes = t.cacheSizeBytes;
3591
3590
  }
3592
3591
  !function(t, e, n, r) {
3593
- if (!0 === e && !0 === r) throw new z(V, "".concat(t, " and ").concat(n, " cannot be used together."));
3592
+ if (!0 === e && !0 === r) throw new B(O, "".concat(t, " and ").concat(n, " cannot be used together."));
3594
3593
  }("experimentalForceLongPolling", t.experimentalForceLongPolling, "experimentalAutoDetectLongPolling", t.experimentalAutoDetectLongPolling),
3595
3594
  this.experimentalForceLongPolling = !!t.experimentalForceLongPolling, this.experimentalForceLongPolling ? this.experimentalAutoDetectLongPolling = !1 : void 0 === t.experimentalAutoDetectLongPolling ? this.experimentalAutoDetectLongPolling = !0 :
3596
3595
  // For backwards compatibility, coerce the value to boolean even though
3597
3596
  // the TypeScript compiler has narrowed the type to boolean already.
3598
3597
  // noinspection PointlessBooleanExpressionJS
3599
3598
  this.experimentalAutoDetectLongPolling = !!t.experimentalAutoDetectLongPolling,
3600
- this.experimentalLongPollingOptions = ht(null !== (n = t.experimentalLongPollingOptions) && void 0 !== n ? n : {}),
3599
+ this.experimentalLongPollingOptions = ft(null !== (n = t.experimentalLongPollingOptions) && void 0 !== n ? n : {}),
3601
3600
  function(t) {
3602
3601
  if (void 0 !== t.timeoutSeconds) {
3603
- if (isNaN(t.timeoutSeconds)) throw new z(V, "invalid long polling timeout: ".concat(t.timeoutSeconds, " (must not be NaN)"));
3604
- if (t.timeoutSeconds < 5) throw new z(V, "invalid long polling timeout: ".concat(t.timeoutSeconds, " (minimum allowed value is 5)"));
3605
- if (t.timeoutSeconds > 30) throw new z(V, "invalid long polling timeout: ".concat(t.timeoutSeconds, " (maximum allowed value is 30)"));
3602
+ if (isNaN(t.timeoutSeconds)) throw new B(O, "invalid long polling timeout: ".concat(t.timeoutSeconds, " (must not be NaN)"));
3603
+ if (t.timeoutSeconds < 5) throw new B(O, "invalid long polling timeout: ".concat(t.timeoutSeconds, " (minimum allowed value is 5)"));
3604
+ if (t.timeoutSeconds > 30) throw new B(O, "invalid long polling timeout: ".concat(t.timeoutSeconds, " (maximum allowed value is 30)"));
3606
3605
  }
3607
3606
  }(this.experimentalLongPollingOptions), this.useFetchStreams = !!t.useFetchStreams;
3608
3607
  }
@@ -3619,7 +3618,7 @@ var yn = new Map;
3619
3618
  /**
3620
3619
  * Whether it's a Firestore or Firestore Lite instance.
3621
3620
  */
3622
- this.type = "firestore-lite", this._persistenceKey = "(lite)", this._settings = new vn({}),
3621
+ this.type = "firestore-lite", this._persistenceKey = "(lite)", this._settings = new mn({}),
3623
3622
  this._settingsFrozen = !1;
3624
3623
  }
3625
3624
  return Object.defineProperty(t.prototype, "app", {
@@ -3628,7 +3627,7 @@ var yn = new Map;
3628
3627
  * instance.
3629
3628
  */
3630
3629
  get: function() {
3631
- if (!this._app) throw new z(C, "Firestore was not initialized using the Firebase SDK. 'app' is not available");
3630
+ if (!this._app) throw new B(x, "Firestore was not initialized using the Firebase SDK. 'app' is not available");
3632
3631
  return this._app;
3633
3632
  },
3634
3633
  enumerable: !1,
@@ -3646,18 +3645,18 @@ var yn = new Map;
3646
3645
  enumerable: !1,
3647
3646
  configurable: !0
3648
3647
  }), t.prototype._setSettings = function(t) {
3649
- if (this._settingsFrozen) throw new z(C, "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.");
3650
- this._settings = new vn(t), void 0 !== t.credentials && (this._authCredentials = function(t) {
3651
- if (!t) return new Q;
3648
+ if (this._settingsFrozen) throw new B(x, "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.");
3649
+ this._settings = new mn(t), void 0 !== t.credentials && (this._authCredentials = function(t) {
3650
+ if (!t) return new K;
3652
3651
  switch (t.type) {
3653
3652
  case "firstParty":
3654
- return new J(t.sessionIndex || "0", t.iamToken || null, t.authTokenFactory || null);
3653
+ return new W(t.sessionIndex || "0", t.iamToken || null, t.authTokenFactory || null);
3655
3654
 
3656
3655
  case "provider":
3657
3656
  return t.client;
3658
3657
 
3659
3658
  default:
3660
- throw new z(V, "makeAuthCredentialsProvider failed due to invalid credential type");
3659
+ throw new B(O, "makeAuthCredentialsProvider failed due to invalid credential type");
3661
3660
  }
3662
3661
  }(t.credentials));
3663
3662
  }, t.prototype._getSettings = function() {
@@ -3682,29 +3681,29 @@ var yn = new Map;
3682
3681
  * Only ever called once.
3683
3682
  */
3684
3683
  t.prototype._terminate = function() {
3685
- return t = this, (e = yn.get(t)) && (T("ComponentProvider", "Removing Datastore"),
3686
- yn.delete(t), e.terminate()), Promise.resolve();
3684
+ return t = this, (e = dn.get(t)) && (b("ComponentProvider", "Removing Datastore"),
3685
+ dn.delete(t), e.terminate()), Promise.resolve();
3687
3686
  var t, e;
3688
3687
  }, t;
3689
3688
  }();
3690
3689
 
3691
- function wn(t, e, n) {
3690
+ function vn(t, e, n) {
3692
3691
  n || (n = "(default)");
3693
3692
  var r = _getProvider(t, "firestore/lite");
3694
- if (r.isInitialized(n)) throw new z(C, "Firestore can only be initialized once per app.");
3693
+ if (r.isInitialized(n)) throw new B(x, "Firestore can only be initialized once per app.");
3695
3694
  return r.initialize({
3696
3695
  options: e,
3697
3696
  instanceIdentifier: n
3698
3697
  });
3699
3698
  }
3700
3699
 
3701
- function _n(t, e) {
3700
+ function wn(t, e) {
3702
3701
  var n = "object" == typeof t ? t : u(), i = "string" == typeof t ? t : e || "(default)", o = _getProvider(n, "firestore/lite").getImmediate({
3703
3702
  identifier: i
3704
3703
  });
3705
3704
  if (!o._initialized) {
3706
3705
  var a = y("firestore");
3707
- a && bn.apply(void 0, r([ o ], a, !1));
3706
+ a && _n.apply(void 0, r([ o ], a, !1));
3708
3707
  }
3709
3708
  return o;
3710
3709
  }
@@ -3721,11 +3720,11 @@ function _n(t, e) {
3721
3720
  * @param port - the emulator port (ex: 9000).
3722
3721
  * @param options.mockUserToken - the mock auth token to use for unit testing
3723
3722
  * Security Rules.
3724
- */ function bn(t, e, n, r) {
3723
+ */ function _n(t, e, n, r) {
3725
3724
  var i;
3726
3725
  void 0 === r && (r = {});
3727
- var o = (t = lt(t, gn))._getSettings(), a = "".concat(e, ":").concat(n);
3728
- if ("firestore.googleapis.com" !== o.host && o.host !== a && S("Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used."),
3726
+ var o = (t = ct(t, gn))._getSettings(), a = "".concat(e, ":").concat(n);
3727
+ if ("firestore.googleapis.com" !== o.host && o.host !== a && E("Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used."),
3729
3728
  t._setSettings(Object.assign(Object.assign({}, o), {
3730
3729
  host: a,
3731
3730
  ssl: !1
@@ -3736,10 +3735,10 @@ function _n(t, e) {
3736
3735
  // invalid field "uid" and missing field "sub" / "user_id".)
3737
3736
  u = m(r.mockUserToken, null === (i = t._app) || void 0 === i ? void 0 : i.options.projectId);
3738
3737
  var c = r.mockUserToken.sub || r.mockUserToken.user_id;
3739
- if (!c) throw new z(V, "mockUserToken must contain 'sub' or 'user_id' field!");
3738
+ if (!c) throw new B(O, "mockUserToken must contain 'sub' or 'user_id' field!");
3740
3739
  s = new g(c);
3741
3740
  }
3742
- t._authCredentials = new Y(new K(u, s));
3741
+ t._authCredentials = new Q(new G(u, s));
3743
3742
  }
3744
3743
  }
3745
3744
 
@@ -3762,8 +3761,8 @@ function _n(t, e) {
3762
3761
  * @param firestore - The `Firestore` instance to terminate.
3763
3762
  * @returns A `Promise` that is resolved when the instance has been successfully
3764
3763
  * terminated.
3765
- */ function Tn(t) {
3766
- return t = lt(t, gn), s(t.app, "firestore/lite"), t._delete();
3764
+ */ function bn(t) {
3765
+ return t = ct(t, gn), s(t.app, "firestore/lite"), t._delete();
3767
3766
  }
3768
3767
 
3769
3768
  /**
@@ -3802,7 +3801,7 @@ function _n(t, e) {
3802
3801
  * Represents an aggregation that can be performed by Firestore.
3803
3802
  */
3804
3803
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
3805
- var En =
3804
+ var Tn =
3806
3805
  /**
3807
3806
  * Create a new AggregateField<T>
3808
3807
  * @param aggregateType Specifies the type of aggregation operation to perform.
@@ -3813,7 +3812,7 @@ function(t, e) {
3813
3812
  void 0 === t && (t = "count"), this._internalFieldPath = e,
3814
3813
  /** A type string to uniquely identify instances of this class. */
3815
3814
  this.type = "AggregateField", this.aggregateType = t;
3816
- }, Sn = /** @class */ function() {
3815
+ }, En = /** @class */ function() {
3817
3816
  /** @hideconstructor */
3818
3817
  function t(t, e, n) {
3819
3818
  this._userDataWriter = e, this._data = n,
@@ -3834,7 +3833,7 @@ function(t, e) {
3834
3833
  return t.prototype.data = function() {
3835
3834
  return this._userDataWriter.convertObjectMap(this._data);
3836
3835
  }, t;
3837
- }(), kn = /** @class */ function() {
3836
+ }(), Sn = /** @class */ function() {
3838
3837
  // This is the lite version of the Query class in the main SDK.
3839
3838
  /** @hideconstructor protected */
3840
3839
  function t(t,
@@ -3849,7 +3848,7 @@ function(t, e) {
3849
3848
  return t.prototype.withConverter = function(e) {
3850
3849
  return new t(this.firestore, e, this._query);
3851
3850
  }, t;
3852
- }(), In = /** @class */ function() {
3851
+ }(), kn = /** @class */ function() {
3853
3852
  /** @hideconstructor */
3854
3853
  function t(t,
3855
3854
  /**
@@ -3890,19 +3889,19 @@ function(t, e) {
3890
3889
  * The collection this `DocumentReference` belongs to.
3891
3890
  */
3892
3891
  get: function() {
3893
- return new An(this.firestore, this.converter, this._key.path.popLast());
3892
+ return new In(this.firestore, this.converter, this._key.path.popLast());
3894
3893
  },
3895
3894
  enumerable: !1,
3896
3895
  configurable: !0
3897
3896
  }), t.prototype.withConverter = function(e) {
3898
3897
  return new t(this.firestore, e, this._key);
3899
3898
  }, t;
3900
- }(), An = /** @class */ function(e) {
3899
+ }(), In = /** @class */ function(e) {
3901
3900
  /** @hideconstructor */
3902
3901
  function n(t, n, r) {
3903
3902
  var i = this;
3904
3903
  return i = e.call(this, t, n, function(t) {
3905
- return new Ee(t);
3904
+ return new Te(t);
3906
3905
  }(r)) || this, i._path = r,
3907
3906
  /** The type of this Firestore reference. */
3908
3907
  i.type = "collection", i;
@@ -3930,27 +3929,27 @@ function(t, e) {
3930
3929
  */
3931
3930
  get: function() {
3932
3931
  var t = this._path.popLast();
3933
- return t.isEmpty() ? null : new In(this.firestore,
3934
- /* converter= */ null, new ot(t));
3932
+ return t.isEmpty() ? null : new kn(this.firestore,
3933
+ /* converter= */ null, new it(t));
3935
3934
  },
3936
3935
  enumerable: !1,
3937
3936
  configurable: !0
3938
3937
  }), n.prototype.withConverter = function(t) {
3939
3938
  return new n(this.firestore, t, this._path);
3940
3939
  }, n;
3941
- }(kn);
3940
+ }(Sn);
3942
3941
 
3943
3942
  /**
3944
3943
  * The results of executing an aggregation query.
3945
- */ function Pn(t, e) {
3944
+ */ function An(t, e) {
3946
3945
  for (var n = [], i = 2; i < arguments.length; i++) n[i - 2] = arguments[i];
3947
- if (t = d(t), at("collection", "path", e), t instanceof gn) {
3948
- var o = nt.fromString.apply(nt, r([ e ], n, !1));
3949
- return st(o), new An(t, /* converter= */ null, o);
3946
+ if (t = d(t), ot("collection", "path", e), t instanceof gn) {
3947
+ var o = et.fromString.apply(et, r([ e ], n, !1));
3948
+ return ut(o), new In(t, /* converter= */ null, o);
3950
3949
  }
3951
- if (!(t instanceof In || t instanceof An)) throw new z(V, "Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");
3952
- var a = t._path.child(nt.fromString.apply(nt, r([ e ], n, !1)));
3953
- return st(a), new An(t.firestore,
3950
+ if (!(t instanceof kn || t instanceof In)) throw new B(O, "Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");
3951
+ var a = t._path.child(et.fromString.apply(et, r([ e ], n, !1)));
3952
+ return ut(a), new In(t.firestore,
3954
3953
  /* converter= */ null, a);
3955
3954
  }
3956
3955
 
@@ -3966,27 +3965,27 @@ function(t, e) {
3966
3965
  * collection or subcollection with this ID as the last segment of its path
3967
3966
  * will be included. Cannot contain a slash.
3968
3967
  * @returns The created `Query`.
3969
- */ function Fn(t, e) {
3970
- if (t = lt(t, gn), at("collectionGroup", "collection id", e), e.indexOf("/") >= 0) throw new z(V, "Invalid collection ID '".concat(e, "' passed to function collectionGroup(). Collection IDs must not contain '/'."));
3971
- return new kn(t,
3968
+ */ function Pn(t, e) {
3969
+ if (t = ct(t, gn), ot("collectionGroup", "collection id", e), e.indexOf("/") >= 0) throw new B(O, "Invalid collection ID '".concat(e, "' passed to function collectionGroup(). Collection IDs must not contain '/'."));
3970
+ return new Sn(t,
3972
3971
  /* converter= */ null, function(t) {
3973
- return new Ee(nt.emptyPath(), t);
3972
+ return new Te(et.emptyPath(), t);
3974
3973
  }(e));
3975
3974
  }
3976
3975
 
3977
- function On(t, e) {
3976
+ function Fn(t, e) {
3978
3977
  for (var n = [], i = 2; i < arguments.length; i++) n[i - 2] = arguments[i];
3979
3978
  if (t = d(t),
3980
3979
  // We allow omission of 'pathString' but explicitly prohibit passing in both
3981
3980
  // 'undefined' and 'null'.
3982
- 1 === arguments.length && (e = Et.newId()), at("doc", "path", e), t instanceof gn) {
3983
- var o = nt.fromString.apply(nt, r([ e ], n, !1));
3984
- return ut(o), new In(t,
3985
- /* converter= */ null, new ot(o));
3981
+ 1 === arguments.length && (e = Tt.newId()), ot("doc", "path", e), t instanceof gn) {
3982
+ var o = et.fromString.apply(et, r([ e ], n, !1));
3983
+ return at(o), new kn(t,
3984
+ /* converter= */ null, new it(o));
3986
3985
  }
3987
- if (!(t instanceof In || t instanceof An)) throw new z(V, "Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");
3988
- var a = t._path.child(nt.fromString.apply(nt, r([ e ], n, !1)));
3989
- return ut(a), new In(t.firestore, t instanceof An ? t.converter : null, new ot(a));
3986
+ if (!(t instanceof kn || t instanceof In)) throw new B(O, "Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");
3987
+ var a = t._path.child(et.fromString.apply(et, r([ e ], n, !1)));
3988
+ return at(a), new kn(t.firestore, t instanceof In ? t.converter : null, new it(a));
3990
3989
  }
3991
3990
 
3992
3991
  /**
@@ -3996,8 +3995,8 @@ function On(t, e) {
3996
3995
  * @param right - A reference to compare.
3997
3996
  * @returns true if the references point to the same location in the same
3998
3997
  * Firestore database.
3999
- */ function Vn(t, e) {
4000
- return t = d(t), e = d(e), (t instanceof In || t instanceof An) && (e instanceof In || e instanceof An) && t.firestore === e.firestore && t.path === e.path && t.converter === e.converter
3998
+ */ function On(t, e) {
3999
+ return t = d(t), e = d(e), (t instanceof kn || t instanceof In) && (e instanceof kn || e instanceof In) && t.firestore === e.firestore && t.path === e.path && t.converter === e.converter
4001
4000
  /**
4002
4001
  * Returns true if the provided queries point to the same collection and apply
4003
4002
  * the same constraints.
@@ -4009,16 +4008,16 @@ function On(t, e) {
4009
4008
  */;
4010
4009
  }
4011
4010
 
4012
- function Nn(t, e) {
4013
- return t = d(t), e = d(e), t instanceof kn && e instanceof kn && t.firestore === e.firestore && function(t, e) {
4011
+ function Vn(t, e) {
4012
+ return t = d(t), e = d(e), t instanceof Sn && e instanceof Sn && t.firestore === e.firestore && function(t, e) {
4014
4013
  return function(t, e) {
4015
4014
  if (t.limit !== e.limit) return !1;
4016
4015
  if (t.orderBy.length !== e.orderBy.length) return !1;
4017
- for (var n = 0; n < t.orderBy.length; n++) if (!fe(t.orderBy[n], e.orderBy[n])) return !1;
4016
+ for (var n = 0; n < t.orderBy.length; n++) if (!le(t.orderBy[n], e.orderBy[n])) return !1;
4018
4017
  if (t.filters.length !== e.filters.length) return !1;
4019
- for (var r = 0; r < t.filters.length; r++) if (!ee(t.filters[r], e.filters[r])) return !1;
4020
- return t.collectionGroup === e.collectionGroup && !!t.path.isEqual(e.path) && !!Xt(t.startAt, e.startAt) && Xt(t.endAt, e.endAt);
4021
- }(Ie(t), Ie(e)) && t.limitType === e.limitType;
4018
+ for (var r = 0; r < t.filters.length; r++) if (!te(t.filters[r], e.filters[r])) return !1;
4019
+ return t.collectionGroup === e.collectionGroup && !!t.path.isEqual(e.path) && !!Jt(t.startAt, e.startAt) && Jt(t.endAt, e.endAt);
4020
+ }(ke(t), ke(e)) && t.limitType === e.limitType;
4022
4021
  }(t._query, e._query) && t.converter === e.converter
4023
4022
  /**
4024
4023
  * @license
@@ -4041,7 +4040,7 @@ function Nn(t, e) {
4041
4040
  */;
4042
4041
  }
4043
4042
 
4044
- var Dn = /** @class */ function() {
4043
+ var Nn = /** @class */ function() {
4045
4044
  /** @hideconstructor */
4046
4045
  function t(t) {
4047
4046
  this._byteString = t;
@@ -4053,9 +4052,9 @@ var Dn = /** @class */ function() {
4053
4052
  * @param base64 - The Base64 string used to create the `Bytes` object.
4054
4053
  */ return t.fromBase64String = function(e) {
4055
4054
  try {
4056
- return new t(Ft.fromBase64String(e));
4055
+ return new t(Pt.fromBase64String(e));
4057
4056
  } catch (e) {
4058
- throw new z(V, "Failed to construct data from Base64 string: " + e);
4057
+ throw new B(O, "Failed to construct data from Base64 string: " + e);
4059
4058
  }
4060
4059
  },
4061
4060
  /**
@@ -4064,7 +4063,7 @@ var Dn = /** @class */ function() {
4064
4063
  * @param array - The Uint8Array used to create the `Bytes` object.
4065
4064
  */
4066
4065
  t.fromUint8Array = function(e) {
4067
- return new t(Ft.fromUint8Array(e));
4066
+ return new t(Pt.fromUint8Array(e));
4068
4067
  },
4069
4068
  /**
4070
4069
  * Returns the underlying bytes as a Base64-encoded string.
@@ -4099,7 +4098,7 @@ var Dn = /** @class */ function() {
4099
4098
  t.prototype.isEqual = function(t) {
4100
4099
  return this._byteString.isEqual(t._byteString);
4101
4100
  }, t;
4102
- }(), Rn = /** @class */ function() {
4101
+ }(), Dn = /** @class */ function() {
4103
4102
  /**
4104
4103
  * Creates a `FieldPath` from the provided field names. If more than one field
4105
4104
  * name is provided, the path will point to a nested field in a document.
@@ -4108,8 +4107,8 @@ var Dn = /** @class */ function() {
4108
4107
  */
4109
4108
  function t() {
4110
4109
  for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
4111
- for (var n = 0; n < t.length; ++n) if (0 === t[n].length) throw new z(V, "Invalid field name at argument $(i + 1). Field names must not be empty.");
4112
- this._internalPath = new it(t);
4110
+ for (var n = 0; n < t.length; ++n) if (0 === t[n].length) throw new B(O, "Invalid field name at argument $(i + 1). Field names must not be empty.");
4111
+ this._internalPath = new rt(t);
4113
4112
  }
4114
4113
  /**
4115
4114
  * Returns true if this `FieldPath` is equal to the provided one.
@@ -4149,8 +4148,8 @@ var Dn = /** @class */ function() {
4149
4148
  * Returns a special sentinel `FieldPath` to refer to the ID of a document.
4150
4149
  * It can be used in queries to sort or filter by the document ID.
4151
4150
  */
4152
- function qn() {
4153
- return new Rn("__name__");
4151
+ function Rn() {
4152
+ return new Dn("__name__");
4154
4153
  }
4155
4154
 
4156
4155
  /**
@@ -4172,14 +4171,14 @@ function qn() {
4172
4171
  /**
4173
4172
  * Sentinel values that can be used when writing document fields with `set()`
4174
4173
  * or `update()`.
4175
- */ var xn =
4174
+ */ var qn =
4176
4175
  /**
4177
4176
  * @param _methodName - The public API endpoint that returns this class.
4178
4177
  * @hideconstructor
4179
4178
  */
4180
4179
  function(t) {
4181
4180
  this._methodName = t;
4182
- }, Cn = /** @class */ function() {
4181
+ }, xn = /** @class */ function() {
4183
4182
  /**
4184
4183
  * Creates a new immutable `GeoPoint` object with the provided latitude and
4185
4184
  * longitude values.
@@ -4187,8 +4186,8 @@ function(t) {
4187
4186
  * @param longitude - The longitude as number between -180 and 180.
4188
4187
  */
4189
4188
  function t(t, e) {
4190
- if (!isFinite(t) || t < -90 || t > 90) throw new z(V, "Latitude must be a number between -90 and 90, but was: " + t);
4191
- if (!isFinite(e) || e < -180 || e > 180) throw new z(V, "Longitude must be a number between -180 and 180, but was: " + e);
4189
+ if (!isFinite(t) || t < -90 || t > 90) throw new B(O, "Latitude must be a number between -90 and 90, but was: " + t);
4190
+ if (!isFinite(e) || e < -180 || e > 180) throw new B(O, "Longitude must be a number between -180 and 180, but was: " + e);
4192
4191
  this._lat = t, this._long = e;
4193
4192
  }
4194
4193
  return Object.defineProperty(t.prototype, "latitude", {
@@ -4230,23 +4229,23 @@ function(t) {
4230
4229
  * with an underscore.
4231
4230
  */
4232
4231
  t.prototype._compareTo = function(t) {
4233
- return St(this._lat, t._lat) || St(this._long, t._long);
4232
+ return Et(this._lat, t._lat) || Et(this._long, t._long);
4234
4233
  }, t;
4235
- }(), jn = /^__.*__$/, Ln = /** @class */ function() {
4234
+ }(), Cn = /^__.*__$/, jn = /** @class */ function() {
4236
4235
  function t(t, e, n) {
4237
4236
  this.data = t, this.fieldMask = e, this.fieldTransforms = n;
4238
4237
  }
4239
4238
  return t.prototype.toMutation = function(t, e) {
4240
- return null !== this.fieldMask ? new Le(t, this.data, this.fieldMask, e, this.fieldTransforms) : new je(t, this.data, e, this.fieldTransforms);
4239
+ return null !== this.fieldMask ? new je(t, this.data, this.fieldMask, e, this.fieldTransforms) : new Ce(t, this.data, e, this.fieldTransforms);
4241
4240
  }, t;
4242
- }(), Mn = /** @class */ function() {
4241
+ }(), Ln = /** @class */ function() {
4243
4242
  function t(t,
4244
4243
  // The fieldMask does not include document transforms.
4245
4244
  e, n) {
4246
4245
  this.data = t, this.fieldMask = e, this.fieldTransforms = n;
4247
4246
  }
4248
4247
  return t.prototype.toMutation = function(t, e) {
4249
- return new Le(t, this.data, this.fieldMask, e, this.fieldTransforms);
4248
+ return new je(t, this.data, this.fieldMask, e, this.fieldTransforms);
4250
4249
  }, t;
4251
4250
  }();
4252
4251
 
@@ -4272,7 +4271,7 @@ function(t) {
4272
4271
  *
4273
4272
  * Latitude values are in the range of [-90, 90].
4274
4273
  * Longitude values are in the range of [-180, 180].
4275
- */ function Un(t) {
4274
+ */ function Mn(t) {
4276
4275
  switch (t) {
4277
4276
  case 0 /* UserDataSource.Set */ :
4278
4277
  // fall through
@@ -4286,11 +4285,11 @@ function(t) {
4286
4285
  return !1;
4287
4286
 
4288
4287
  default:
4289
- throw I();
4288
+ throw k();
4290
4289
  }
4291
4290
  }
4292
4291
 
4293
- /** A "context" object passed around while parsing user data. */ var Bn = /** @class */ function() {
4292
+ /** A "context" object passed around while parsing user data. */ var Un = /** @class */ function() {
4294
4293
  /**
4295
4294
  * Initializes a ParseContext with the given source and path.
4296
4295
  *
@@ -4350,7 +4349,7 @@ function(t) {
4350
4349
  it: !0
4351
4350
  });
4352
4351
  }, t.prototype._t = function(t) {
4353
- return sr(t, this.settings.methodName, this.settings.ct || !1, this.path, this.settings.lt);
4352
+ return ur(t, this.settings.methodName, this.settings.ct || !1, this.path, this.settings.lt);
4354
4353
  },
4355
4354
  /** Returns 'true' if 'fieldPath' was traversed when creating this context. */ t.prototype.contains = function(t) {
4356
4355
  return void 0 !== this.fieldMask.find((function(e) {
@@ -4364,19 +4363,19 @@ function(t) {
4364
4363
  if (this.path) for (var t = 0; t < this.path.length; t++) this.st(this.path.get(t));
4365
4364
  }, t.prototype.st = function(t) {
4366
4365
  if (0 === t.length) throw this._t("Document fields must not be empty");
4367
- if (Un(this.et) && jn.test(t)) throw this._t('Document fields cannot begin and end with "__"');
4366
+ if (Mn(this.et) && Cn.test(t)) throw this._t('Document fields cannot begin and end with "__"');
4368
4367
  }, t;
4369
- }(), zn = /** @class */ function() {
4368
+ }(), Bn = /** @class */ function() {
4370
4369
  function t(t, e, n) {
4371
- this.databaseId = t, this.ignoreUndefinedProperties = e, this.serializer = n || ln(t)
4370
+ this.databaseId = t, this.ignoreUndefinedProperties = e, this.serializer = n || cn(t)
4372
4371
  /** Creates a new top-level parse context. */;
4373
4372
  }
4374
4373
  return t.prototype.ht = function(t, e, n, r) {
4375
- return void 0 === r && (r = !1), new Bn({
4374
+ return void 0 === r && (r = !1), new Un({
4376
4375
  et: t,
4377
4376
  methodName: e,
4378
4377
  lt: n,
4379
- path: it.emptyPath(),
4378
+ path: rt.emptyPath(),
4380
4379
  it: !1,
4381
4380
  ct: r
4382
4381
  }, this.databaseId, this.serializer, this.ignoreUndefinedProperties);
@@ -4386,30 +4385,30 @@ function(t) {
4386
4385
  /**
4387
4386
  * Helper for parsing raw user input (provided via the API) into internal model
4388
4387
  * classes.
4389
- */ function Gn(t) {
4390
- var e = t._freezeSettings(), n = ln(t._databaseId);
4391
- return new zn(t._databaseId, !!e.ignoreUndefinedProperties, n);
4388
+ */ function zn(t) {
4389
+ var e = t._freezeSettings(), n = cn(t._databaseId);
4390
+ return new Bn(t._databaseId, !!e.ignoreUndefinedProperties, n);
4392
4391
  }
4393
4392
 
4394
- /** Parse document data from a set() call. */ function Kn(t, e, n, r, i, o) {
4393
+ /** Parse document data from a set() call. */ function Gn(t, e, n, r, i, o) {
4395
4394
  void 0 === o && (o = {});
4396
4395
  var a = t.ht(o.merge || o.mergeFields ? 2 /* UserDataSource.MergeSet */ : 0 /* UserDataSource.Set */ , e, n, i);
4397
- ir("Data must be an object, but it was:", a, r);
4398
- var u, s, c = nr(r, a);
4396
+ rr("Data must be an object, but it was:", a, r);
4397
+ var u, s, c = er(r, a);
4399
4398
  if (o.merge) u = new ge(a.fieldMask), s = a.fieldTransforms; else if (o.mergeFields) {
4400
4399
  for (var l = [], f = 0, h = o.mergeFields; f < h.length; f++) {
4401
- var p = or(e, h[f], n);
4402
- if (!a.contains(p)) throw new z(V, "Field '".concat(p, "' is specified in your field mask but missing from your input data."));
4403
- cr(l, p) || l.push(p);
4400
+ var p = ir(e, h[f], n);
4401
+ if (!a.contains(p)) throw new B(O, "Field '".concat(p, "' is specified in your field mask but missing from your input data."));
4402
+ sr(l, p) || l.push(p);
4404
4403
  }
4405
4404
  u = new ge(l), s = a.fieldTransforms.filter((function(t) {
4406
4405
  return u.covers(t.field);
4407
4406
  }));
4408
4407
  } else u = null, s = a.fieldTransforms;
4409
- return new Ln(new we(c), u, s);
4408
+ return new jn(new ve(c), u, s);
4410
4409
  }
4411
4410
 
4412
- var Qn = /** @class */ function(e) {
4411
+ var Kn = /** @class */ function(e) {
4413
4412
  function n() {
4414
4413
  return null !== e && e.apply(this, arguments) || this;
4415
4414
  }
@@ -4421,7 +4420,7 @@ var Qn = /** @class */ function(e) {
4421
4420
  }, n.prototype.isEqual = function(t) {
4422
4421
  return t instanceof n;
4423
4422
  }, n;
4424
- }(xn);
4423
+ }(qn);
4425
4424
 
4426
4425
  /**
4427
4426
  * Creates a child context for parsing SerializableFieldValues.
@@ -4438,8 +4437,8 @@ var Qn = /** @class */ function(e) {
4438
4437
  * context.
4439
4438
  * @param context - The parent context.
4440
4439
  * @param arrayElement - Whether or not the FieldValue has an array.
4441
- */ function Yn(t, e, n) {
4442
- return new Bn({
4440
+ */ function Qn(t, e, n) {
4441
+ return new Un({
4443
4442
  et: 3 /* UserDataSource.Argument */ ,
4444
4443
  lt: e.settings.lt,
4445
4444
  methodName: t._methodName,
@@ -4447,98 +4446,98 @@ var Qn = /** @class */ function(e) {
4447
4446
  }, e.databaseId, e.serializer, e.ignoreUndefinedProperties);
4448
4447
  }
4449
4448
 
4450
- var Hn = /** @class */ function(e) {
4449
+ var Yn = /** @class */ function(e) {
4451
4450
  function n() {
4452
4451
  return null !== e && e.apply(this, arguments) || this;
4453
4452
  }
4454
4453
  return t(n, e), n.prototype._toFieldTransform = function(t) {
4455
- return new qe(t.path, new Ve);
4454
+ return new Re(t.path, new Oe);
4456
4455
  }, n.prototype.isEqual = function(t) {
4457
4456
  return t instanceof n;
4458
4457
  }, n;
4459
- }(xn), Wn = /** @class */ function(e) {
4458
+ }(qn), Hn = /** @class */ function(e) {
4460
4459
  function n(t, n) {
4461
4460
  var r = this;
4462
4461
  return (r = e.call(this, t) || this).dt = n, r;
4463
4462
  }
4464
4463
  return t(n, e), n.prototype._toFieldTransform = function(t) {
4465
- var e = Yn(this, t,
4464
+ var e = Qn(this, t,
4466
4465
  /*array=*/ !0), n = this.dt.map((function(t) {
4467
- return er(t, e);
4468
- })), r = new Ne(n);
4469
- return new qe(t.path, r);
4466
+ return tr(t, e);
4467
+ })), r = new Ve(n);
4468
+ return new Re(t.path, r);
4470
4469
  }, n.prototype.isEqual = function(t) {
4471
4470
  return t instanceof n && p(this.dt, t.dt);
4472
4471
  }, n;
4473
- }(xn), Jn = /** @class */ function(e) {
4472
+ }(qn), Wn = /** @class */ function(e) {
4474
4473
  function n(t, n) {
4475
4474
  var r = this;
4476
4475
  return (r = e.call(this, t) || this).dt = n, r;
4477
4476
  }
4478
4477
  return t(n, e), n.prototype._toFieldTransform = function(t) {
4479
- var e = Yn(this, t,
4478
+ var e = Qn(this, t,
4480
4479
  /*array=*/ !0), n = this.dt.map((function(t) {
4481
- return er(t, e);
4482
- })), r = new De(n);
4483
- return new qe(t.path, r);
4480
+ return tr(t, e);
4481
+ })), r = new Ne(n);
4482
+ return new Re(t.path, r);
4484
4483
  }, n.prototype.isEqual = function(t) {
4485
4484
  return t instanceof n && p(this.dt, t.dt);
4486
4485
  }, n;
4487
- }(xn), Xn = /** @class */ function(e) {
4486
+ }(qn), Jn = /** @class */ function(e) {
4488
4487
  function n(t, n) {
4489
4488
  var r = this;
4490
4489
  return (r = e.call(this, t) || this).ft = n, r;
4491
4490
  }
4492
4491
  return t(n, e), n.prototype._toFieldTransform = function(t) {
4493
- var e = new Re(t.serializer, Fe(t.serializer, this.ft));
4494
- return new qe(t.path, e);
4492
+ var e = new De(t.serializer, Pe(t.serializer, this.ft));
4493
+ return new Re(t.path, e);
4495
4494
  }, n.prototype.isEqual = function(t) {
4496
4495
  return t instanceof n && this.ft === t.ft;
4497
4496
  }, n;
4498
- }(xn);
4497
+ }(qn);
4499
4498
 
4500
- /** Parse update data from an update() call. */ function Zn(t, e, n, r) {
4499
+ /** Parse update data from an update() call. */ function Xn(t, e, n, r) {
4501
4500
  var i = t.ht(1 /* UserDataSource.Update */ , e, n);
4502
- ir("Data must be an object, but it was:", i, r);
4503
- var o = [], a = we.empty();
4504
- At(r, (function(t, r) {
4505
- var u = ur(e, t, n);
4501
+ rr("Data must be an object, but it was:", i, r);
4502
+ var o = [], a = ve.empty();
4503
+ It(r, (function(t, r) {
4504
+ var u = ar(e, t, n);
4506
4505
  // For Compat types, we have to "extract" the underlying types before
4507
4506
  // performing validation.
4508
4507
  r = d(r);
4509
4508
  var s = i.ot(u);
4510
- if (r instanceof Qn)
4509
+ if (r instanceof Kn)
4511
4510
  // Add it to the field mask, but don't add anything to updateData.
4512
4511
  o.push(u); else {
4513
- var c = er(r, s);
4512
+ var c = tr(r, s);
4514
4513
  null != c && (o.push(u), a.set(u, c));
4515
4514
  }
4516
4515
  }));
4517
4516
  var u = new ge(o);
4518
- return new Mn(a, u, i.fieldTransforms);
4517
+ return new Ln(a, u, i.fieldTransforms);
4519
4518
  }
4520
4519
 
4521
- /** Parse update data from a list of field/value arguments. */ function $n(t, e, n, r, i, o) {
4522
- var a = t.ht(1 /* UserDataSource.Update */ , e, n), u = [ or(e, r, n) ], s = [ i ];
4523
- if (o.length % 2 != 0) throw new z(V, "Function ".concat(e, "() needs to be called with an even number of arguments that alternate between field names and values."));
4524
- for (var c = 0; c < o.length; c += 2) u.push(or(e, o[c])), s.push(o[c + 1]);
4520
+ /** Parse update data from a list of field/value arguments. */ function Zn(t, e, n, r, i, o) {
4521
+ var a = t.ht(1 /* UserDataSource.Update */ , e, n), u = [ ir(e, r, n) ], s = [ i ];
4522
+ if (o.length % 2 != 0) throw new B(O, "Function ".concat(e, "() needs to be called with an even number of arguments that alternate between field names and values."));
4523
+ for (var c = 0; c < o.length; c += 2) u.push(ir(e, o[c])), s.push(o[c + 1]);
4525
4524
  // We iterate in reverse order to pick the last value for a field if the
4526
4525
  // user specified the field multiple times.
4527
- for (var l = [], f = we.empty(), h = u.length - 1; h >= 0; --h) if (!cr(l, u[h])) {
4526
+ for (var l = [], f = ve.empty(), h = u.length - 1; h >= 0; --h) if (!sr(l, u[h])) {
4528
4527
  var p = u[h], y = s[h];
4529
4528
  // For Compat types, we have to "extract" the underlying types before
4530
4529
  // performing validation.
4531
4530
  y = d(y);
4532
4531
  var m = a.ot(p);
4533
- if (y instanceof Qn)
4532
+ if (y instanceof Kn)
4534
4533
  // Add it to the field mask, but don't add anything to updateData.
4535
4534
  l.push(p); else {
4536
- var v = er(y, m);
4537
- null != v && (l.push(p), f.set(p, v));
4535
+ var g = tr(y, m);
4536
+ null != g && (l.push(p), f.set(p, g));
4538
4537
  }
4539
4538
  }
4540
- var g = new ge(l);
4541
- return new Mn(f, g, a.fieldTransforms);
4539
+ var v = new ge(l);
4540
+ return new Ln(f, v, a.fieldTransforms);
4542
4541
  }
4543
4542
 
4544
4543
  /**
@@ -4547,8 +4546,8 @@ var Hn = /** @class */ function(e) {
4547
4546
  *
4548
4547
  * @param allowArrays - Whether the query value is an array that may directly
4549
4548
  * contain additional arrays (e.g. the operand of an `in` query).
4550
- */ function tr(t, e, n, r) {
4551
- return void 0 === r && (r = !1), er(n, t.ht(r ? 4 /* UserDataSource.ArrayArgument */ : 3 /* UserDataSource.Argument */ , e));
4549
+ */ function $n(t, e, n, r) {
4550
+ return void 0 === r && (r = !1), tr(n, t.ht(r ? 4 /* UserDataSource.ArrayArgument */ : 3 /* UserDataSource.Argument */ , e));
4552
4551
  }
4553
4552
 
4554
4553
  /**
@@ -4559,12 +4558,12 @@ var Hn = /** @class */ function(e) {
4559
4558
  * the source of the data being parsed, etc.
4560
4559
  * @returns The parsed value, or null if the value was a FieldValue sentinel
4561
4560
  * that should not be included in the resulting parsed data.
4562
- */ function er(t, e) {
4563
- if (rr(
4561
+ */ function tr(t, e) {
4562
+ if (nr(
4564
4563
  // Unwrap the API type from the Compat SDK. This will return the API type
4565
4564
  // from firestore-exp.
4566
- t = d(t))) return ir("Unsupported field value:", e, t), nr(t, e);
4567
- if (t instanceof xn)
4565
+ t = d(t))) return rr("Unsupported field value:", e, t), er(t, e);
4566
+ if (t instanceof qn)
4568
4567
  // FieldValues usually parse into transforms (except deleteField())
4569
4568
  // in which case we do not want to include this field in our parsed data
4570
4569
  // (as doing so will overwrite the field directly prior to the transform
@@ -4576,7 +4575,7 @@ var Hn = /** @class */ function(e) {
4576
4575
  */
4577
4576
  return function(t, e) {
4578
4577
  // Sentinels are only supported with writes, and not within arrays.
4579
- if (!Un(e.et)) throw e._t("".concat(t._methodName, "() can only be used with update() and set()"));
4578
+ if (!Mn(e.et)) throw e._t("".concat(t._methodName, "() can only be used with update() and set()"));
4580
4579
  if (!e.path) throw e._t("".concat(t._methodName, "() is not currently supported inside arrays"));
4581
4580
  var n = t._toFieldTransform(e);
4582
4581
  n && e.fieldTransforms.push(n);
@@ -4599,7 +4598,7 @@ var Hn = /** @class */ function(e) {
4599
4598
  if (e.settings.it && 4 /* UserDataSource.ArrayArgument */ !== e.et) throw e._t("Nested arrays are not supported");
4600
4599
  return function(t, e) {
4601
4600
  for (var n = [], r = 0, i = 0, o = t; i < o.length; i++) {
4602
- var a = er(o[i], e.ut(r));
4601
+ var a = tr(o[i], e.ut(r));
4603
4602
  null == a && (
4604
4603
  // Just include nulls in the array for fields being replaced with a
4605
4604
  // sentinel.
@@ -4618,7 +4617,7 @@ var Hn = /** @class */ function(e) {
4618
4617
  if (null === (t = d(t))) return {
4619
4618
  nullValue: "NULL_VALUE"
4620
4619
  };
4621
- if ("number" == typeof t) return Fe(e.serializer, t);
4620
+ if ("number" == typeof t) return Pe(e.serializer, t);
4622
4621
  if ("boolean" == typeof t) return {
4623
4622
  booleanValue: t
4624
4623
  };
@@ -4626,41 +4625,41 @@ var Hn = /** @class */ function(e) {
4626
4625
  stringValue: t
4627
4626
  };
4628
4627
  if (t instanceof Date) {
4629
- var n = Rt.fromDate(t);
4628
+ var n = Dt.fromDate(t);
4630
4629
  return {
4631
- timestampValue: Qe(e.serializer, n)
4630
+ timestampValue: Ke(e.serializer, n)
4632
4631
  };
4633
4632
  }
4634
- if (t instanceof Rt) {
4633
+ if (t instanceof Dt) {
4635
4634
  // Firestore backend truncates precision down to microseconds. To ensure
4636
4635
  // offline mode works the same with regards to truncation, perform the
4637
4636
  // truncation immediately without waiting for the backend to do that.
4638
- var r = new Rt(t.seconds, 1e3 * Math.floor(t.nanoseconds / 1e3));
4637
+ var r = new Dt(t.seconds, 1e3 * Math.floor(t.nanoseconds / 1e3));
4639
4638
  return {
4640
- timestampValue: Qe(e.serializer, r)
4639
+ timestampValue: Ke(e.serializer, r)
4641
4640
  };
4642
4641
  }
4643
- if (t instanceof Cn) return {
4642
+ if (t instanceof xn) return {
4644
4643
  geoPointValue: {
4645
4644
  latitude: t.latitude,
4646
4645
  longitude: t.longitude
4647
4646
  }
4648
4647
  };
4649
- if (t instanceof Dn) return {
4650
- bytesValue: Ye(e.serializer, t._byteString)
4648
+ if (t instanceof Nn) return {
4649
+ bytesValue: Qe(e.serializer, t._byteString)
4651
4650
  };
4652
- if (t instanceof In) {
4651
+ if (t instanceof kn) {
4653
4652
  var i = e.databaseId, o = t.firestore._databaseId;
4654
4653
  if (!o.isEqual(i)) throw e._t("Document reference is for database ".concat(o.projectId, "/").concat(o.database, " but should be for database ").concat(i.projectId, "/").concat(i.database));
4655
4654
  return {
4656
- referenceValue: Je(t.firestore._databaseId || e.databaseId, t._key.path)
4655
+ referenceValue: We(t.firestore._databaseId || e.databaseId, t._key.path)
4657
4656
  };
4658
4657
  }
4659
- throw e._t("Unsupported field value: ".concat(ct(t)));
4658
+ throw e._t("Unsupported field value: ".concat(st(t)));
4660
4659
  }(t, e);
4661
4660
  }
4662
4661
 
4663
- function nr(t, e) {
4662
+ function er(t, e) {
4664
4663
  var n = {};
4665
4664
  return function(t) {
4666
4665
  for (var e in t) if (Object.prototype.hasOwnProperty.call(t, e)) return !1;
@@ -4668,8 +4667,8 @@ function nr(t, e) {
4668
4667
  }(t) ?
4669
4668
  // If we encounter an empty object, we explicitly add it to the update
4670
4669
  // mask to ensure that the server creates a map entry.
4671
- e.path && e.path.length > 0 && e.fieldMask.push(e.path) : At(t, (function(t, r) {
4672
- var i = er(r, e.nt(t));
4670
+ e.path && e.path.length > 0 && e.fieldMask.push(e.path) : It(t, (function(t, r) {
4671
+ var i = tr(r, e.nt(t));
4673
4672
  null != i && (n[t] = i);
4674
4673
  })), {
4675
4674
  mapValue: {
@@ -4678,35 +4677,35 @@ function nr(t, e) {
4678
4677
  };
4679
4678
  }
4680
4679
 
4681
- function rr(t) {
4682
- return !("object" != typeof t || null === t || t instanceof Array || t instanceof Date || t instanceof Rt || t instanceof Cn || t instanceof Dn || t instanceof In || t instanceof xn);
4680
+ function nr(t) {
4681
+ return !("object" != typeof t || null === t || t instanceof Array || t instanceof Date || t instanceof Dt || t instanceof xn || t instanceof Nn || t instanceof kn || t instanceof qn);
4683
4682
  }
4684
4683
 
4685
- function ir(t, e, n) {
4686
- if (!rr(n) || !function(t) {
4684
+ function rr(t, e, n) {
4685
+ if (!nr(n) || !function(t) {
4687
4686
  return "object" == typeof t && null !== t && (Object.getPrototypeOf(t) === Object.prototype || null === Object.getPrototypeOf(t));
4688
4687
  }(n)) {
4689
- var r = ct(n);
4688
+ var r = st(n);
4690
4689
  throw "an object" === r ? e._t(t + " a custom object") : e._t(t + " " + r);
4691
4690
  }
4692
4691
  }
4693
4692
 
4694
4693
  /**
4695
4694
  * Helper that calls fromDotSeparatedString() but wraps any error thrown.
4696
- */ function or(t, e, n) {
4695
+ */ function ir(t, e, n) {
4697
4696
  if (
4698
4697
  // If required, replace the FieldPath Compat class with with the firestore-exp
4699
4698
  // FieldPath.
4700
- (e = d(e)) instanceof Rn) return e._internalPath;
4701
- if ("string" == typeof e) return ur(t, e);
4702
- throw sr("Field path arguments must be of type string or ", t,
4699
+ (e = d(e)) instanceof Dn) return e._internalPath;
4700
+ if ("string" == typeof e) return ar(t, e);
4701
+ throw ur("Field path arguments must be of type string or ", t,
4703
4702
  /* hasConverter= */ !1,
4704
4703
  /* path= */ void 0, n);
4705
4704
  }
4706
4705
 
4707
4706
  /**
4708
4707
  * Matches any characters in a field path string that are reserved.
4709
- */ var ar = new RegExp("[~\\*/\\[\\]]");
4708
+ */ var or = new RegExp("[~\\*/\\[\\]]");
4710
4709
 
4711
4710
  /**
4712
4711
  * Wraps fromDotSeparatedString with an error message about the method that
@@ -4716,29 +4715,29 @@ function ir(t, e, n) {
4716
4715
  * split on dots.
4717
4716
  * @param targetDoc - The document against which the field path will be
4718
4717
  * evaluated.
4719
- */ function ur(t, e, n) {
4720
- if (e.search(ar) >= 0) throw sr("Invalid field path (".concat(e, "). Paths must not contain '~', '*', '/', '[', or ']'"), t,
4718
+ */ function ar(t, e, n) {
4719
+ if (e.search(or) >= 0) throw ur("Invalid field path (".concat(e, "). Paths must not contain '~', '*', '/', '[', or ']'"), t,
4721
4720
  /* hasConverter= */ !1,
4722
4721
  /* path= */ void 0, n);
4723
4722
  try {
4724
- return (new (Rn.bind.apply(Rn, r([ void 0 ], e.split("."), !1))))._internalPath;
4723
+ return (new (Dn.bind.apply(Dn, r([ void 0 ], e.split("."), !1))))._internalPath;
4725
4724
  } catch (r) {
4726
- throw sr("Invalid field path (".concat(e, "). Paths must not be empty, begin with '.', end with '.', or contain '..'"), t,
4725
+ throw ur("Invalid field path (".concat(e, "). Paths must not be empty, begin with '.', end with '.', or contain '..'"), t,
4727
4726
  /* hasConverter= */ !1,
4728
4727
  /* path= */ void 0, n);
4729
4728
  }
4730
4729
  }
4731
4730
 
4732
- function sr(t, e, n, r, i) {
4731
+ function ur(t, e, n, r, i) {
4733
4732
  var o = r && !r.isEmpty(), a = void 0 !== i, u = "Function ".concat(e, "() called with invalid data");
4734
4733
  n && (u += " (via `toFirestore()`)"), u += ". ";
4735
4734
  var s = "";
4736
4735
  return (o || a) && (s += " (found", o && (s += " in field ".concat(r)), a && (s += " in document ".concat(i)),
4737
- s += ")"), new z(V, u + t + s)
4736
+ s += ")"), new B(O, u + t + s)
4738
4737
  /** Checks `haystack` if FieldPath `needle` is present. Runs in O(n). */;
4739
4738
  }
4740
4739
 
4741
- function cr(t, e) {
4740
+ function sr(t, e) {
4742
4741
  return t.some((function(t) {
4743
4742
  return t.isEqual(e);
4744
4743
  }));
@@ -4768,7 +4767,7 @@ function cr(t, e) {
4768
4767
  * For a `DocumentSnapshot` that points to a non-existing document, any data
4769
4768
  * access will return 'undefined'. You can use the `exists()` method to
4770
4769
  * explicitly verify a document's existence.
4771
- */ var lr = /** @class */ function() {
4770
+ */ var cr = /** @class */ function() {
4772
4771
  // Note: This class is stripped down version of the DocumentSnapshot in
4773
4772
  // the legacy SDK. The changes are:
4774
4773
  // - No support for SnapshotMetadata.
@@ -4789,7 +4788,7 @@ function cr(t, e) {
4789
4788
  * The `DocumentReference` for the document included in the `DocumentSnapshot`.
4790
4789
  */
4791
4790
  get: function() {
4792
- return new In(this._firestore, this._converter, this._key);
4791
+ return new kn(this._firestore, this._converter, this._key);
4793
4792
  },
4794
4793
  enumerable: !1,
4795
4794
  configurable: !0
@@ -4814,7 +4813,7 @@ function cr(t, e) {
4814
4813
  if (this._converter) {
4815
4814
  // We only want to use the converter and create a new DocumentSnapshot
4816
4815
  // if a converter has been provided.
4817
- var t = new fr(this._firestore, this._userDataWriter, this._key, this._document,
4816
+ var t = new lr(this._firestore, this._userDataWriter, this._key, this._document,
4818
4817
  /* converter= */ null);
4819
4818
  return this._converter.fromFirestore(t);
4820
4819
  }
@@ -4834,11 +4833,11 @@ function cr(t, e) {
4834
4833
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
4835
4834
  t.prototype.get = function(t) {
4836
4835
  if (this._document) {
4837
- var e = this._document.data.field(dr("DocumentSnapshot.get", t));
4836
+ var e = this._document.data.field(pr("DocumentSnapshot.get", t));
4838
4837
  if (null !== e) return this._userDataWriter.convertValue(e);
4839
4838
  }
4840
4839
  }, t;
4841
- }(), fr = /** @class */ function(e) {
4840
+ }(), lr = /** @class */ function(e) {
4842
4841
  function n() {
4843
4842
  return null !== e && e.apply(this, arguments) || this;
4844
4843
  }
@@ -4850,7 +4849,7 @@ function cr(t, e) {
4850
4849
  */ return t(n, e), n.prototype.data = function() {
4851
4850
  return e.prototype.data.call(this);
4852
4851
  }, n;
4853
- }(lr), hr = /** @class */ function() {
4852
+ }(cr), fr = /** @class */ function() {
4854
4853
  /** @hideconstructor */
4855
4854
  function t(t, e) {
4856
4855
  this._docs = e, this.query = t;
@@ -4904,15 +4903,15 @@ function cr(t, e) {
4904
4903
  * @param right - A snapshot to compare.
4905
4904
  * @returns true if the snapshots are equal.
4906
4905
  */
4907
- function pr(t, e) {
4908
- return t = d(t), e = d(e), t instanceof lr && e instanceof lr ? 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 hr && e instanceof hr && Nn(t.query, e.query) && kt(t.docs, e.docs, pr)
4906
+ function hr(t, e) {
4907
+ return t = d(t), e = d(e), t instanceof cr && e instanceof cr ? 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 fr && e instanceof fr && Vn(t.query, e.query) && St(t.docs, e.docs, hr)
4909
4908
  /**
4910
4909
  * Helper that calls `fromDotSeparatedString()` but wraps any error thrown.
4911
4910
  */;
4912
4911
  }
4913
4912
 
4914
- function dr(t, e) {
4915
- return "string" == typeof e ? ur(t, e) : e instanceof Rn ? e._internalPath : e._delegate._internalPath;
4913
+ function pr(t, e) {
4914
+ return "string" == typeof e ? ar(t, e) : e instanceof Dn ? e._internalPath : e._delegate._internalPath;
4916
4915
  }
4917
4916
 
4918
4917
  /**
@@ -4934,12 +4933,12 @@ function dr(t, e) {
4934
4933
  /**
4935
4934
  * An `AppliableConstraint` is an abstraction of a constraint that can be applied
4936
4935
  * to a Firestore query.
4937
- */ var yr = function() {}, mr = /** @class */ function(e) {
4936
+ */ var dr = function() {}, yr = /** @class */ function(e) {
4938
4937
  function n() {
4939
4938
  return null !== e && e.apply(this, arguments) || this;
4940
4939
  }
4941
4940
  return t(n, e), n;
4942
- }(yr);
4941
+ }(dr);
4943
4942
 
4944
4943
  /**
4945
4944
  * A `QueryConstraint` is used to narrow the set of documents returned by a
@@ -4948,16 +4947,16 @@ function dr(t, e) {
4948
4947
  * (endBefore:1)}, {@link (endAt:1)}, {@link limit}, {@link limitToLast} and
4949
4948
  * can then be passed to {@link (query:1)} to create a new query instance that
4950
4949
  * also contains this `QueryConstraint`.
4951
- */ function vr(t, e) {
4950
+ */ function mr(t, e) {
4952
4951
  for (var n = [], r = 2; r < arguments.length; r++) n[r - 2] = arguments[r];
4953
4952
  var i = [];
4954
- e instanceof yr && i.push(e), function(t) {
4953
+ e instanceof dr && i.push(e), function(t) {
4955
4954
  var e = t.filter((function(t) {
4956
- return t instanceof _r;
4955
+ return t instanceof wr;
4957
4956
  })).length, n = t.filter((function(t) {
4958
4957
  return t instanceof gr;
4959
4958
  })).length;
4960
- if (e > 1 || e > 0 && n > 0) throw new z(V, "InvalidQuery. When using composite filters, you cannot use more than one filter at the top level. Consider nesting the multiple filters within an `and(...)` statement. For example: change `query(query, where(...), or(...))` to `query(query, and(where(...), or(...)))`.");
4959
+ if (e > 1 || e > 0 && n > 0) throw new B(O, "InvalidQuery. When using composite filters, you cannot use more than one filter at the top level. Consider nesting the multiple filters within an `and(...)` statement. For example: change `query(query, where(...), or(...))` to `query(query, and(where(...), or(...)))`.");
4961
4960
  }(i = i.concat(n));
4962
4961
  for (var o = 0, a = i; o < a.length; o++) {
4963
4962
  var u = a[o];
@@ -4986,32 +4985,32 @@ function dr(t, e) {
4986
4985
  return new n(t, e, r);
4987
4986
  }, n.prototype._apply = function(t) {
4988
4987
  var e = this._parse(t);
4989
- return Cr(t._query, e), new kn(t.firestore, t.converter, Pe(t._query, e));
4988
+ return xr(t._query, e), new Sn(t.firestore, t.converter, Ae(t._query, e));
4990
4989
  }, n.prototype._parse = function(t) {
4991
- var e = Gn(t.firestore), n = function(t, e, n, r, i, o, a) {
4990
+ var e = zn(t.firestore), n = function(t, e, n, r, i, o, a) {
4992
4991
  var u;
4993
4992
  if (i.isKeyField()) {
4994
- if ("array-contains" /* Operator.ARRAY_CONTAINS */ === o || "array-contains-any" /* Operator.ARRAY_CONTAINS_ANY */ === o) throw new z(V, "Invalid Query. You can't perform '".concat(o, "' queries on documentId()."));
4993
+ if ("array-contains" /* Operator.ARRAY_CONTAINS */ === o || "array-contains-any" /* Operator.ARRAY_CONTAINS_ANY */ === o) throw new B(O, "Invalid Query. You can't perform '".concat(o, "' queries on documentId()."));
4995
4994
  if ("in" /* Operator.IN */ === o || "not-in" /* Operator.NOT_IN */ === o) {
4996
- xr(a, o);
4995
+ qr(a, o);
4997
4996
  for (var s = [], c = 0, l = a; c < l.length; c++) {
4998
4997
  var f = l[c];
4999
- s.push(qr(r, t, f));
4998
+ s.push(Rr(r, t, f));
5000
4999
  }
5001
5000
  u = {
5002
5001
  arrayValue: {
5003
5002
  values: s
5004
5003
  }
5005
5004
  };
5006
- } else u = qr(r, t, a);
5007
- } else "in" /* Operator.IN */ !== o && "not-in" /* Operator.NOT_IN */ !== o && "array-contains-any" /* Operator.ARRAY_CONTAINS_ANY */ !== o || xr(a, o),
5008
- u = tr(n, e, a,
5005
+ } else u = Rr(r, t, a);
5006
+ } else "in" /* Operator.IN */ !== o && "not-in" /* Operator.NOT_IN */ !== o && "array-contains-any" /* Operator.ARRAY_CONTAINS_ANY */ !== o || qr(a, o),
5007
+ u = $n(n, e, a,
5009
5008
  /* allowArrays= */ "in" /* Operator.IN */ === o || "not-in" /* Operator.NOT_IN */ === o);
5010
- return $t.create(i, o, u);
5009
+ return Zt.create(i, o, u);
5011
5010
  }(t._query, "where", e, t.firestore._databaseId, this._field, this._op, this._value);
5012
5011
  return n;
5013
5012
  }, n;
5014
- }(mr);
5013
+ }(yr);
5015
5014
 
5016
5015
  /**
5017
5016
  * Creates a {@link QueryFieldFilterConstraint} that enforces that documents
@@ -5023,8 +5022,8 @@ function dr(t, e) {
5023
5022
  * "&lt;=", "!=").
5024
5023
  * @param value - The value for comparison
5025
5024
  * @returns The created {@link QueryFieldFilterConstraint}.
5026
- */ function wr(t, e, n) {
5027
- var r = e, i = dr("where", t);
5025
+ */ function vr(t, e, n) {
5026
+ var r = e, i = pr("where", t);
5028
5027
  return gr._create(i, r, n);
5029
5028
  }
5030
5029
 
@@ -5035,7 +5034,7 @@ function dr(t, e) {
5035
5034
  * `QueryCompositeFilterConstraint`s are created by invoking {@link or} or
5036
5035
  * {@link and} and can then be passed to {@link (query:1)} to create a new query
5037
5036
  * instance that also contains the `QueryCompositeFilterConstraint`.
5038
- */ var _r = /** @class */ function(e) {
5037
+ */ var wr = /** @class */ function(e) {
5039
5038
  /**
5040
5039
  * @internal
5041
5040
  */
@@ -5053,21 +5052,21 @@ function dr(t, e) {
5053
5052
  })).filter((function(t) {
5054
5053
  return t.getFilters().length > 0;
5055
5054
  }));
5056
- return 1 === e.length ? e[0] : te.create(e, this._getOperator());
5055
+ return 1 === e.length ? e[0] : $t.create(e, this._getOperator());
5057
5056
  }, n.prototype._apply = function(t) {
5058
5057
  var e = this._parse(t);
5059
5058
  return 0 === e.getFilters().length ? t : (function(t, e) {
5060
5059
  for (var n = t, r = 0, i = e.getFlattenedFilters(); r < i.length; r++) {
5061
5060
  var o = i[r];
5062
- Cr(n, o), n = Pe(n, o);
5061
+ xr(n, o), n = Ae(n, o);
5063
5062
  }
5064
- }(t._query, e), new kn(t.firestore, t.converter, Pe(t._query, e)));
5063
+ }(t._query, e), new Sn(t.firestore, t.converter, Ae(t._query, e)));
5065
5064
  }, n.prototype._getQueryConstraints = function() {
5066
5065
  return this._queryConstraints;
5067
5066
  }, n.prototype._getOperator = function() {
5068
5067
  return "and" === this.type ? "and" /* CompositeOperator.AND */ : "or" /* CompositeOperator.OR */;
5069
5068
  }, n;
5070
- }(yr);
5069
+ }(dr);
5071
5070
 
5072
5071
  /**
5073
5072
  * Creates a new {@link QueryCompositeFilterConstraint} that is a disjunction of
@@ -5078,12 +5077,12 @@ function dr(t, e) {
5078
5077
  * {@link QueryFilterConstraint}s to perform a disjunction for. These must be
5079
5078
  * created with calls to {@link where}, {@link or}, or {@link and}.
5080
5079
  * @returns The newly created {@link QueryCompositeFilterConstraint}.
5081
- */ function br() {
5080
+ */ function _r() {
5082
5081
  for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
5083
5082
  // Only support QueryFilterConstraints
5084
5083
  return t.forEach((function(t) {
5085
- return jr("or", t);
5086
- })), _r._create("or" /* CompositeOperator.OR */ , t)
5084
+ return Cr("or", t);
5085
+ })), wr._create("or" /* CompositeOperator.OR */ , t)
5087
5086
  /**
5088
5087
  * Creates a new {@link QueryCompositeFilterConstraint} that is a conjunction of
5089
5088
  * the given filter constraints. A conjunction filter includes a document if it
@@ -5096,12 +5095,12 @@ function dr(t, e) {
5096
5095
  */;
5097
5096
  }
5098
5097
 
5099
- function Tr() {
5098
+ function br() {
5100
5099
  for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
5101
5100
  // Only support QueryFilterConstraints
5102
5101
  return t.forEach((function(t) {
5103
- return jr("and", t);
5104
- })), _r._create("and" /* CompositeOperator.AND */ , t)
5102
+ return Cr("and", t);
5103
+ })), wr._create("and" /* CompositeOperator.AND */ , t)
5105
5104
  /**
5106
5105
  * A `QueryOrderByConstraint` is used to sort the set of documents returned by a
5107
5106
  * Firestore query. `QueryOrderByConstraint`s are created by invoking
@@ -5113,7 +5112,7 @@ function Tr() {
5113
5112
  */;
5114
5113
  }
5115
5114
 
5116
- var Er = /** @class */ function(e) {
5115
+ var Tr = /** @class */ function(e) {
5117
5116
  /**
5118
5117
  * @internal
5119
5118
  */
@@ -5127,17 +5126,17 @@ var Er = /** @class */ function(e) {
5127
5126
  return new n(t, e);
5128
5127
  }, n.prototype._apply = function(t) {
5129
5128
  var e = function(t, e, n) {
5130
- if (null !== t.startAt) throw new z(V, "Invalid query. You must not call startAt() or startAfter() before calling orderBy().");
5131
- if (null !== t.endAt) throw new z(V, "Invalid query. You must not call endAt() or endBefore() before calling orderBy().");
5132
- return new le(e, n);
5129
+ if (null !== t.startAt) throw new B(O, "Invalid query. You must not call startAt() or startAfter() before calling orderBy().");
5130
+ if (null !== t.endAt) throw new B(O, "Invalid query. You must not call endAt() or endBefore() before calling orderBy().");
5131
+ return new ce(e, n);
5133
5132
  }(t._query, this._field, this._direction);
5134
- return new kn(t.firestore, t.converter, function(t, e) {
5133
+ return new Sn(t.firestore, t.converter, function(t, e) {
5135
5134
  // TODO(dimond): validate that orderBy does not list the same key twice.
5136
5135
  var n = t.explicitOrderBy.concat([ e ]);
5137
- return new Ee(t.path, t.collectionGroup, n, t.filters.slice(), t.limit, t.limitType, t.startAt, t.endAt);
5136
+ return new Te(t.path, t.collectionGroup, n, t.filters.slice(), t.limit, t.limitType, t.startAt, t.endAt);
5138
5137
  }(t._query, e));
5139
5138
  }, n;
5140
- }(mr);
5139
+ }(yr);
5141
5140
 
5142
5141
  /**
5143
5142
  * Creates a {@link QueryOrderByConstraint} that sorts the query result by the
@@ -5150,10 +5149,10 @@ var Er = /** @class */ function(e) {
5150
5149
  * @param directionStr - Optional direction to sort by ('asc' or 'desc'). If
5151
5150
  * not specified, order will be ascending.
5152
5151
  * @returns The created {@link QueryOrderByConstraint}.
5153
- */ function Sr(t, e) {
5152
+ */ function Er(t, e) {
5154
5153
  void 0 === e && (e = "asc");
5155
- var n = e, r = dr("orderBy", t);
5156
- return Er._create(r, n);
5154
+ var n = e, r = pr("orderBy", t);
5155
+ return Tr._create(r, n);
5157
5156
  }
5158
5157
 
5159
5158
  /**
@@ -5162,7 +5161,7 @@ var Er = /** @class */ function(e) {
5162
5161
  * `QueryLimitConstraint`s are created by invoking {@link limit} or
5163
5162
  * {@link limitToLast} and can then be passed to {@link (query:1)} to create a new
5164
5163
  * query instance that also contains this `QueryLimitConstraint`.
5165
- */ var kr = /** @class */ function(e) {
5164
+ */ var Sr = /** @class */ function(e) {
5166
5165
  /**
5167
5166
  * @internal
5168
5167
  */
@@ -5175,11 +5174,11 @@ var Er = /** @class */ function(e) {
5175
5174
  return t(n, e), n._create = function(t, e, r) {
5176
5175
  return new n(t, e, r);
5177
5176
  }, n.prototype._apply = function(t) {
5178
- return new kn(t.firestore, t.converter, function(t, e, n) {
5179
- return new Ee(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), e, n, t.startAt, t.endAt);
5177
+ return new Sn(t.firestore, t.converter, function(t, e, n) {
5178
+ return new Te(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), e, n, t.startAt, t.endAt);
5180
5179
  }(t._query, this._limit, this._limitType));
5181
5180
  }, n;
5182
- }(mr);
5181
+ }(yr);
5183
5182
 
5184
5183
  /**
5185
5184
  * Creates a {@link QueryLimitConstraint} that only returns the first matching
@@ -5187,8 +5186,8 @@ var Er = /** @class */ function(e) {
5187
5186
  *
5188
5187
  * @param limit - The maximum number of items to return.
5189
5188
  * @returns The created {@link QueryLimitConstraint}.
5190
- */ function Ir(t) {
5191
- return ft("limit", t), kr._create("limit", t, "F" /* LimitType.First */)
5189
+ */ function kr(t) {
5190
+ return lt("limit", t), Sr._create("limit", t, "F" /* LimitType.First */)
5192
5191
  /**
5193
5192
  * Creates a {@link QueryLimitConstraint} that only returns the last matching
5194
5193
  * documents.
@@ -5201,8 +5200,8 @@ var Er = /** @class */ function(e) {
5201
5200
  */;
5202
5201
  }
5203
5202
 
5204
- function Ar(t) {
5205
- return ft("limitToLast", t), kr._create("limitToLast", t, "L" /* LimitType.Last */)
5203
+ function Ir(t) {
5204
+ return lt("limitToLast", t), Sr._create("limitToLast", t, "L" /* LimitType.Last */)
5206
5205
  /**
5207
5206
  * A `QueryStartAtConstraint` is used to exclude documents from the start of a
5208
5207
  * result set returned by a Firestore query.
@@ -5212,7 +5211,7 @@ function Ar(t) {
5212
5211
  */;
5213
5212
  }
5214
5213
 
5215
- var Pr = /** @class */ function(e) {
5214
+ var Ar = /** @class */ function(e) {
5216
5215
  /**
5217
5216
  * @internal
5218
5217
  */
@@ -5226,22 +5225,22 @@ var Pr = /** @class */ function(e) {
5226
5225
  return t(n, e), n._create = function(t, e, r) {
5227
5226
  return new n(t, e, r);
5228
5227
  }, n.prototype._apply = function(t) {
5229
- var e = Rr(t, this.type, this._docOrFields, this._inclusive);
5230
- return new kn(t.firestore, t.converter, function(t, e) {
5231
- return new Ee(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), t.limit, t.limitType, e, t.endAt);
5228
+ var e = Dr(t, this.type, this._docOrFields, this._inclusive);
5229
+ return new Sn(t.firestore, t.converter, function(t, e) {
5230
+ return new Te(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), t.limit, t.limitType, e, t.endAt);
5232
5231
  }(t._query, e));
5233
5232
  }, n;
5234
- }(mr);
5233
+ }(yr);
5235
5234
 
5236
- function Fr() {
5235
+ function Pr() {
5237
5236
  for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
5238
- return Pr._create("startAt", t,
5237
+ return Ar._create("startAt", t,
5239
5238
  /*inclusive=*/ !0);
5240
5239
  }
5241
5240
 
5242
- function Or() {
5241
+ function Fr() {
5243
5242
  for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
5244
- return Pr._create("startAfter", t,
5243
+ return Ar._create("startAfter", t,
5245
5244
  /*inclusive=*/ !1);
5246
5245
  }
5247
5246
 
@@ -5251,7 +5250,7 @@ function Or() {
5251
5250
  * `QueryEndAtConstraint`s are created by invoking {@link (endAt:1)} or
5252
5251
  * {@link (endBefore:1)} and can then be passed to {@link (query:1)} to create a new
5253
5252
  * query instance that also contains this `QueryEndAtConstraint`.
5254
- */ var Vr = /** @class */ function(e) {
5253
+ */ var Or = /** @class */ function(e) {
5255
5254
  /**
5256
5255
  * @internal
5257
5256
  */
@@ -5265,28 +5264,28 @@ function Or() {
5265
5264
  return t(n, e), n._create = function(t, e, r) {
5266
5265
  return new n(t, e, r);
5267
5266
  }, n.prototype._apply = function(t) {
5268
- var e = Rr(t, this.type, this._docOrFields, this._inclusive);
5269
- return new kn(t.firestore, t.converter, function(t, e) {
5270
- return new Ee(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), t.limit, t.limitType, t.startAt, e);
5267
+ var e = Dr(t, this.type, this._docOrFields, this._inclusive);
5268
+ return new Sn(t.firestore, t.converter, function(t, e) {
5269
+ return new Te(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), t.limit, t.limitType, t.startAt, e);
5271
5270
  }(t._query, e));
5272
5271
  }, n;
5273
- }(mr);
5272
+ }(yr);
5274
5273
 
5275
- function Nr() {
5274
+ function Vr() {
5276
5275
  for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
5277
- return Vr._create("endBefore", t,
5276
+ return Or._create("endBefore", t,
5278
5277
  /*inclusive=*/ !1);
5279
5278
  }
5280
5279
 
5281
- function Dr() {
5280
+ function Nr() {
5282
5281
  for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
5283
- return Vr._create("endAt", t,
5282
+ return Or._create("endAt", t,
5284
5283
  /*inclusive=*/ !0);
5285
5284
  }
5286
5285
 
5287
- /** Helper function to create a bound from a document or fields */ function Rr(t, e, n, r) {
5288
- if (n[0] = d(n[0]), n[0] instanceof lr) return function(t, e, n, r, i) {
5289
- if (!r) throw new z(D, "Can't use a DocumentSnapshot that doesn't exist for ".concat(n, "()."));
5286
+ /** Helper function to create a bound from a document or fields */ function Dr(t, e, n, r) {
5287
+ if (n[0] = d(n[0]), n[0] instanceof cr) return function(t, e, n, r, i) {
5288
+ if (!r) throw new B(N, "Can't use a DocumentSnapshot that doesn't exist for ".concat(n, "()."));
5290
5289
  // Because people expect to continue/end a query at the exact document
5291
5290
  // provided, we need to use the implicit sort order rather than the explicit
5292
5291
  // sort order, because it's guaranteed to contain the document key. That way
@@ -5294,60 +5293,60 @@ function Dr() {
5294
5293
  // the provided document. Without the key (by using the explicit sort
5295
5294
  // orders), multiple documents could match the position, yielding duplicate
5296
5295
  // results.
5297
- for (var o = [], a = 0, u = ke(t); a < u.length; a++) {
5296
+ for (var o = [], a = 0, u = Se(t); a < u.length; a++) {
5298
5297
  var s = u[a];
5299
- if (s.field.isKeyField()) o.push(Gt(e, r.key)); else {
5298
+ if (s.field.isKeyField()) o.push(zt(e, r.key)); else {
5300
5299
  var c = r.data.field(s.field);
5301
- if (qt(c)) throw new z(V, 'Invalid query. You are trying to start or end a query using a document for which the field "' + s.field + '" is an uncommitted server timestamp. (Since the value of this field is unknown, you cannot start/end a query with it.)');
5300
+ if (Rt(c)) throw new B(O, 'Invalid query. You are trying to start or end a query using a document for which the field "' + s.field + '" is an uncommitted server timestamp. (Since the value of this field is unknown, you cannot start/end a query with it.)');
5302
5301
  if (null === c) {
5303
5302
  var l = s.field.canonicalString();
5304
- throw new z(V, "Invalid query. You are trying to start or end a query using a document for which the field '".concat(l, "' (used as the orderBy) does not exist."));
5303
+ throw new B(O, "Invalid query. You are trying to start or end a query using a document for which the field '".concat(l, "' (used as the orderBy) does not exist."));
5305
5304
  }
5306
5305
  o.push(c);
5307
5306
  }
5308
5307
  }
5309
- return new Jt(o, i);
5308
+ return new Wt(o, i);
5310
5309
  }(t._query, t.firestore._databaseId, e, n[0]._document, r);
5311
- var i = Gn(t.firestore);
5310
+ var i = zn(t.firestore);
5312
5311
  return function(t, e, n, r, i, o) {
5313
5312
  // Use explicit order by's because it has to match the query the user made
5314
5313
  var a = t.explicitOrderBy;
5315
- if (i.length > a.length) throw new z(V, "Too many arguments provided to ".concat(r, "(). The number of arguments must be less than or equal to the number of orderBy() clauses"));
5314
+ if (i.length > a.length) throw new B(O, "Too many arguments provided to ".concat(r, "(). The number of arguments must be less than or equal to the number of orderBy() clauses"));
5316
5315
  for (var u = [], s = 0; s < i.length; s++) {
5317
5316
  var c = i[s];
5318
5317
  if (a[s].field.isKeyField()) {
5319
- if ("string" != typeof c) throw new z(V, "Invalid query. Expected a string for document ID in ".concat(r, "(), but got a ").concat(typeof c));
5320
- if (!Se(t) && -1 !== c.indexOf("/")) throw new z(V, "Invalid query. When querying a collection and ordering by documentId(), the value passed to ".concat(r, "() must be a plain document ID, but '").concat(c, "' contains a slash."));
5321
- var l = t.path.child(nt.fromString(c));
5322
- if (!ot.isDocumentKey(l)) throw new z(V, "Invalid query. When querying a collection group and ordering by documentId(), the value passed to ".concat(r, "() must result in a valid document path, but '").concat(l, "' is not because it contains an odd number of segments."));
5323
- var f = new ot(l);
5324
- u.push(Gt(e, f));
5318
+ if ("string" != typeof c) throw new B(O, "Invalid query. Expected a string for document ID in ".concat(r, "(), but got a ").concat(typeof c));
5319
+ if (!Ee(t) && -1 !== c.indexOf("/")) throw new B(O, "Invalid query. When querying a collection and ordering by documentId(), the value passed to ".concat(r, "() must be a plain document ID, but '").concat(c, "' contains a slash."));
5320
+ var l = t.path.child(et.fromString(c));
5321
+ if (!it.isDocumentKey(l)) throw new B(O, "Invalid query. When querying a collection group and ordering by documentId(), the value passed to ".concat(r, "() must result in a valid document path, but '").concat(l, "' is not because it contains an odd number of segments."));
5322
+ var f = new it(l);
5323
+ u.push(zt(e, f));
5325
5324
  } else {
5326
- var h = tr(n, r, c);
5325
+ var h = $n(n, r, c);
5327
5326
  u.push(h);
5328
5327
  }
5329
5328
  }
5330
- return new Jt(u, o);
5329
+ return new Wt(u, o);
5331
5330
  }(t._query, t.firestore._databaseId, i, e, n, r);
5332
5331
  }
5333
5332
 
5334
- function qr(t, e, n) {
5333
+ function Rr(t, e, n) {
5335
5334
  if ("string" == typeof (n = d(n))) {
5336
- if ("" === n) throw new z(V, "Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.");
5337
- if (!Se(e) && -1 !== n.indexOf("/")) throw new z(V, "Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '".concat(n, "' contains a '/' character."));
5338
- var r = e.path.child(nt.fromString(n));
5339
- if (!ot.isDocumentKey(r)) throw new z(V, "Invalid query. When querying a collection group by documentId(), the value provided must result in a valid document path, but '".concat(r, "' is not because it has an odd number of segments (").concat(r.length, ")."));
5340
- return Gt(t, new ot(r));
5335
+ if ("" === n) throw new B(O, "Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.");
5336
+ if (!Ee(e) && -1 !== n.indexOf("/")) throw new B(O, "Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '".concat(n, "' contains a '/' character."));
5337
+ var r = e.path.child(et.fromString(n));
5338
+ if (!it.isDocumentKey(r)) throw new B(O, "Invalid query. When querying a collection group by documentId(), the value provided must result in a valid document path, but '".concat(r, "' is not because it has an odd number of segments (").concat(r.length, ")."));
5339
+ return zt(t, new it(r));
5341
5340
  }
5342
- if (n instanceof In) return Gt(t, n._key);
5343
- throw new z(V, "Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ".concat(ct(n), "."));
5341
+ if (n instanceof kn) return zt(t, n._key);
5342
+ throw new B(O, "Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ".concat(st(n), "."));
5344
5343
  }
5345
5344
 
5346
5345
  /**
5347
5346
  * Validates that the value passed into a disjunctive filter satisfies all
5348
5347
  * array requirements.
5349
- */ function xr(t, e) {
5350
- if (!Array.isArray(t) || 0 === t.length) throw new z(V, "Invalid Query. A non-empty array is required for '".concat(e.toString(), "' filters."));
5348
+ */ function qr(t, e) {
5349
+ if (!Array.isArray(t) || 0 === t.length) throw new B(O, "Invalid Query. A non-empty array is required for '".concat(e.toString(), "' filters."));
5351
5350
  }
5352
5351
 
5353
5352
  /**
@@ -5359,7 +5358,7 @@ function qr(t, e, n) {
5359
5358
  * Operators in a query must adhere to the following set of rules:
5360
5359
  * 1. Only one inequality per query.
5361
5360
  * 2. `NOT_IN` cannot be used with array, disjunctive, or `NOT_EQUAL` operators.
5362
- */ function Cr(t, e) {
5361
+ */ function xr(t, e) {
5363
5362
  var n = function(t, e) {
5364
5363
  for (var n = 0, r = t; n < r.length; n++) for (var i = 0, o = r[n].getFlattenedFilters(); i < o.length; i++) {
5365
5364
  var a = o[i];
@@ -5384,11 +5383,11 @@ function qr(t, e, n) {
5384
5383
  }(e.op));
5385
5384
  if (null !== n)
5386
5385
  // Special case when it's a duplicate op to give a slightly clearer error message.
5387
- throw n === e.op ? new z(V, "Invalid query. You cannot use more than one '".concat(e.op.toString(), "' filter.")) : new z(V, "Invalid query. You cannot use '".concat(e.op.toString(), "' filters with '").concat(n.toString(), "' filters."));
5386
+ throw n === e.op ? new B(O, "Invalid query. You cannot use more than one '".concat(e.op.toString(), "' filter.")) : new B(O, "Invalid query. You cannot use '".concat(e.op.toString(), "' filters with '").concat(n.toString(), "' filters."));
5388
5387
  }
5389
5388
 
5390
- function jr(t, e) {
5391
- if (!(e instanceof gr || e instanceof _r)) throw new z(V, "Function ".concat(t, "() requires AppliableConstraints created with a call to 'where(...)', 'or(...)', or 'and(...)'."));
5389
+ function Cr(t, e) {
5390
+ if (!(e instanceof gr || e instanceof wr)) throw new B(O, "Function ".concat(t, "() requires AppliableConstraints created with a call to 'where(...)', 'or(...)', or 'and(...)'."));
5392
5391
  }
5393
5392
 
5394
5393
  /**
@@ -5415,28 +5414,28 @@ function jr(t, e) {
5415
5414
  * because we want to provide the user with a more specific error message if
5416
5415
  * their `set()` or fails due to invalid data originating from a `toFirestore()`
5417
5416
  * call.
5418
- */ function Lr(t, e, n) {
5417
+ */ function jr(t, e, n) {
5419
5418
  // Cast to `any` in order to satisfy the union type constraint on
5420
5419
  // toFirestore().
5421
5420
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
5422
5421
  return t ? n && (n.merge || n.mergeFields) ? t.toFirestore(e, n) : t.toFirestore(e) : e;
5423
5422
  }
5424
5423
 
5425
- var Mr = /** @class */ function(e) {
5424
+ var Lr = /** @class */ function(e) {
5426
5425
  function n(t) {
5427
5426
  var n = this;
5428
5427
  return (n = e.call(this) || this).firestore = t, n;
5429
5428
  }
5430
5429
  return t(n, e), n.prototype.convertBytes = function(t) {
5431
- return new Dn(t);
5430
+ return new Nn(t);
5432
5431
  }, n.prototype.convertReference = function(t) {
5433
5432
  var e = this.convertDocumentKey(t, this.firestore._databaseId);
5434
- return new In(this.firestore, /* converter= */ null, e);
5433
+ return new kn(this.firestore, /* converter= */ null, e);
5435
5434
  }, n;
5436
5435
  }(/** @class */ function() {
5437
5436
  function t() {}
5438
5437
  return t.prototype.convertValue = function(t, e) {
5439
- switch (void 0 === e && (e = "none"), Lt(t)) {
5438
+ switch (void 0 === e && (e = "none"), jt(t)) {
5440
5439
  case 0 /* TypeOrder.NullValue */ :
5441
5440
  return null;
5442
5441
 
@@ -5444,7 +5443,7 @@ var Mr = /** @class */ function(e) {
5444
5443
  return t.booleanValue;
5445
5444
 
5446
5445
  case 2 /* TypeOrder.NumberValue */ :
5447
- return Nt(t.integerValue || t.doubleValue);
5446
+ return Vt(t.integerValue || t.doubleValue);
5448
5447
 
5449
5448
  case 3 /* TypeOrder.TimestampValue */ :
5450
5449
  return this.convertTimestamp(t.timestampValue);
@@ -5456,7 +5455,7 @@ var Mr = /** @class */ function(e) {
5456
5455
  return t.stringValue;
5457
5456
 
5458
5457
  case 6 /* TypeOrder.BlobValue */ :
5459
- return this.convertBytes(Dt(t.bytesValue));
5458
+ return this.convertBytes(Nt(t.bytesValue));
5460
5459
 
5461
5460
  case 7 /* TypeOrder.RefValue */ :
5462
5461
  return this.convertReference(t.referenceValue);
@@ -5471,7 +5470,7 @@ var Mr = /** @class */ function(e) {
5471
5470
  return this.convertObject(t.mapValue, e);
5472
5471
 
5473
5472
  default:
5474
- throw I();
5473
+ throw k();
5475
5474
  }
5476
5475
  }, t.prototype.convertObject = function(t, e) {
5477
5476
  return this.convertObjectMap(t.fields, e);
@@ -5483,11 +5482,11 @@ var Mr = /** @class */ function(e) {
5483
5482
  var n = this;
5484
5483
  void 0 === e && (e = "none");
5485
5484
  var r = {};
5486
- return At(t, (function(t, i) {
5485
+ return It(t, (function(t, i) {
5487
5486
  r[t] = n.convertValue(i, e);
5488
5487
  })), r;
5489
5488
  }, t.prototype.convertGeoPoint = function(t) {
5490
- return new Cn(Nt(t.latitude), Nt(t.longitude));
5489
+ return new xn(Vt(t.latitude), Vt(t.longitude));
5491
5490
  }, t.prototype.convertArray = function(t, e) {
5492
5491
  var n = this;
5493
5492
  return (t.values || []).map((function(t) {
@@ -5496,25 +5495,25 @@ var Mr = /** @class */ function(e) {
5496
5495
  }, t.prototype.convertServerTimestamp = function(t, e) {
5497
5496
  switch (e) {
5498
5497
  case "previous":
5499
- var n = xt(t);
5498
+ var n = qt(t);
5500
5499
  return null == n ? null : this.convertValue(n, e);
5501
5500
 
5502
5501
  case "estimate":
5503
- return this.convertTimestamp(Ct(t));
5502
+ return this.convertTimestamp(xt(t));
5504
5503
 
5505
5504
  default:
5506
5505
  return null;
5507
5506
  }
5508
5507
  }, t.prototype.convertTimestamp = function(t) {
5509
- var e = Vt(t);
5510
- return new Rt(e.seconds, e.nanos);
5508
+ var e = Ot(t);
5509
+ return new Dt(e.seconds, e.nanos);
5511
5510
  }, t.prototype.convertDocumentKey = function(t, e) {
5512
- var n = nt.fromString(t);
5513
- A(cn(n));
5514
- var r = new tt(n.get(1), n.get(3)), i = new ot(n.popFirst(5));
5511
+ var n = et.fromString(t);
5512
+ I(sn(n));
5513
+ var r = new $(n.get(1), n.get(3)), i = new it(n.popFirst(5));
5515
5514
  return r.isEqual(e) ||
5516
5515
  // TODO(b/64130202): Somehow support foreign references.
5517
- E("Document ".concat(i, " contains a document reference within a different database (").concat(r.projectId, "/").concat(r.database, ") which is not supported. It will be treated as a reference in the current database (").concat(e.projectId, "/").concat(e.database, ") instead.")),
5516
+ T("Document ".concat(i, " contains a document reference within a different database (").concat(r.projectId, "/").concat(r.database, ") which is not supported. It will be treated as a reference in the current database (").concat(e.projectId, "/").concat(e.database, ") instead.")),
5518
5517
  i;
5519
5518
  }, t;
5520
5519
  }());
@@ -5531,12 +5530,12 @@ var Mr = /** @class */ function(e) {
5531
5530
  * @param reference - The reference of the document to fetch.
5532
5531
  * @returns A Promise resolved with a `DocumentSnapshot` containing the current
5533
5532
  * document contents.
5534
- */ function Ur(t) {
5535
- var e = mn((t = lt(t, In)).firestore), n = new Mr(t.firestore);
5536
- return dn(e, [ t._key ]).then((function(e) {
5537
- A(1 === e.length);
5533
+ */ function Mr(t) {
5534
+ var e = yn((t = ct(t, kn)).firestore), n = new Lr(t.firestore);
5535
+ return pn(e, [ t._key ]).then((function(e) {
5536
+ I(1 === e.length);
5538
5537
  var r = e[0];
5539
- return new lr(t.firestore, n, t._key, r.isFoundDocument() ? r : null, t.converter);
5538
+ return new cr(t.firestore, n, t._key, r.isFoundDocument() ? r : null, t.converter);
5540
5539
  }));
5541
5540
  }
5542
5541
 
@@ -5551,18 +5550,18 @@ var Mr = /** @class */ function(e) {
5551
5550
  *
5552
5551
  * @param query - The `Query` to execute.
5553
5552
  * @returns A Promise that will be resolved with the results of the query.
5554
- */ function Br(t) {
5553
+ */ function Ur(t) {
5555
5554
  !function(t) {
5556
- if ("L" /* LimitType.Last */ === t.limitType && 0 === t.explicitOrderBy.length) throw new z(M, "limitToLast() queries require specifying at least one orderBy() clause");
5557
- }((t = lt(t, kn))._query);
5558
- var r = mn(t.firestore), i = new Mr(t.firestore);
5555
+ if ("L" /* LimitType.Last */ === t.limitType && 0 === t.explicitOrderBy.length) throw new B(L, "limitToLast() queries require specifying at least one orderBy() clause");
5556
+ }((t = ct(t, Sn))._query);
5557
+ var r = yn(t.firestore), i = new Lr(t.firestore);
5559
5558
  return function(t, r) {
5560
5559
  return e(this, void 0, void 0, (function() {
5561
5560
  var e, i, o, a;
5562
5561
  return n(this, (function(n) {
5563
5562
  switch (n.label) {
5564
5563
  case 0:
5565
- return e = P(t), i = en(e.serializer, Ie(r)), o = i.B, a = i.parent, [ 4 /*yield*/ , e.g("RunQuery", e.serializer.databaseId, a, {
5564
+ return e = A(t), i = tn(e.serializer, ke(r)), o = i.B, a = i.parent, [ 4 /*yield*/ , e.g("RunQuery", e.serializer.databaseId, a, {
5566
5565
  structuredQuery: o.structuredQuery
5567
5566
  }) ];
5568
5567
 
@@ -5571,11 +5570,11 @@ var Mr = /** @class */ function(e) {
5571
5570
  return !!t.document;
5572
5571
  })).map((function(t) {
5573
5572
  return function(t, e, n) {
5574
- var r = $e(t, e.name), i = We(e.updateTime), o = e.createTime ? We(e.createTime) : he.min(), a = new we({
5573
+ var r = Ze(t, e.name), i = He(e.updateTime), o = e.createTime ? He(e.createTime) : fe.min(), a = new ve({
5575
5574
  mapValue: {
5576
5575
  fields: e.fields
5577
5576
  }
5578
- }), u = _e.newFoundDocument(r, i, o, a);
5577
+ }), u = we.newFoundDocument(r, i, o, a);
5579
5578
  return n && u.setHasCommittedMutations(), n ? u.setHasCommittedMutations() : u;
5580
5579
  }(e.serializer, t.document, void 0);
5581
5580
  })) ];
@@ -5584,28 +5583,28 @@ var Mr = /** @class */ function(e) {
5584
5583
  }));
5585
5584
  }(r, t._query).then((function(e) {
5586
5585
  var n = e.map((function(e) {
5587
- return new fr(t.firestore, i, e.key, e, t.converter);
5586
+ return new lr(t.firestore, i, e.key, e, t.converter);
5588
5587
  }));
5589
5588
  return "L" /* LimitType.Last */ === t._query.limitType &&
5590
5589
  // Limit to last queries reverse the orderBy constraint that was
5591
5590
  // specified by the user. As such, we need to reverse the order of the
5592
5591
  // results to return the documents in the expected order.
5593
- n.reverse(), new hr(t, n);
5592
+ n.reverse(), new fr(t, n);
5594
5593
  }));
5595
5594
  }
5596
5595
 
5597
- function zr(t, e, n) {
5598
- var r = Lr((t = lt(t, In)).converter, e, n), i = Kn(Gn(t.firestore), "setDoc", t._key, r, null !== t.converter, n);
5599
- return pn(mn(t.firestore), [ i.toMutation(t._key, xe.none()) ]);
5596
+ function Br(t, e, n) {
5597
+ var r = jr((t = ct(t, kn)).converter, e, n), i = Gn(zn(t.firestore), "setDoc", t._key, r, null !== t.converter, n);
5598
+ return hn(yn(t.firestore), [ i.toMutation(t._key, qe.none()) ]);
5600
5599
  }
5601
5600
 
5602
- function Gr(t, e, n) {
5601
+ function zr(t, e, n) {
5603
5602
  for (var r = [], i = 3; i < arguments.length; i++) r[i - 3] = arguments[i];
5604
- var o, a = Gn((t = lt(t, In)).firestore);
5603
+ var o, a = zn((t = ct(t, kn)).firestore);
5605
5604
  // For Compat types, we have to "extract" the underlying types before
5606
5605
  // performing validation.
5607
- return o = "string" == typeof (e = d(e)) || e instanceof Rn ? $n(a, "updateDoc", t._key, e, n, r) : Zn(a, "updateDoc", t._key, e),
5608
- pn(mn(t.firestore), [ o.toMutation(t._key, xe.exists(!0)) ]);
5606
+ return o = "string" == typeof (e = d(e)) || e instanceof Dn ? Zn(a, "updateDoc", t._key, e, n, r) : Xn(a, "updateDoc", t._key, e),
5607
+ hn(yn(t.firestore), [ o.toMutation(t._key, qe.exists(!0)) ]);
5609
5608
  }
5610
5609
 
5611
5610
  /**
@@ -5619,8 +5618,8 @@ function Gr(t, e, n) {
5619
5618
  * @param reference - A reference to the document to delete.
5620
5619
  * @returns A `Promise` resolved once the document has been successfully
5621
5620
  * deleted from the backend.
5622
- */ function Kr(t) {
5623
- return pn(mn((t = lt(t, In)).firestore), [ new Me(t._key, xe.none()) ]);
5621
+ */ function Gr(t) {
5622
+ return hn(yn((t = ct(t, kn)).firestore), [ new Le(t._key, qe.none()) ]);
5624
5623
  }
5625
5624
 
5626
5625
  /**
@@ -5637,9 +5636,9 @@ function Gr(t, e, n) {
5637
5636
  * @throws Error - If the provided input is not a valid Firestore document.
5638
5637
  * @returns A `Promise` resolved with a `DocumentReference` pointing to the
5639
5638
  * newly created document after it has been written to the backend.
5640
- */ function Qr(t, e) {
5641
- var n = On(t = lt(t, An)), r = Lr(t.converter, e), i = Kn(Gn(t.firestore), "addDoc", n._key, r, null !== n.converter, {});
5642
- return pn(mn(t.firestore), [ i.toMutation(n._key, xe.exists(!1)) ]).then((function() {
5639
+ */ function Kr(t, e) {
5640
+ var n = Fn(t = ct(t, In)), r = jr(t.converter, e), i = Gn(zn(t.firestore), "addDoc", n._key, r, null !== n.converter, {});
5641
+ return hn(yn(t.firestore), [ i.toMutation(n._key, qe.exists(!1)) ]).then((function() {
5643
5642
  return n;
5644
5643
  }));
5645
5644
  }
@@ -5673,9 +5672,9 @@ function Gr(t, e, n) {
5673
5672
  * @returns A Promise that will be resolved with the count; the count can be
5674
5673
  * retrieved from `snapshot.data().count`, where `snapshot` is the
5675
5674
  * `AggregateQuerySnapshot` to which the returned Promise resolves.
5676
- */ function Yr(t) {
5677
- return Hr(t, {
5678
- count: Xr()
5675
+ */ function Qr(t) {
5676
+ return Yr(t, {
5677
+ count: Jr()
5679
5678
  });
5680
5679
  }
5681
5680
 
@@ -5704,13 +5703,13 @@ function Gr(t, e, n) {
5704
5703
  * const totalHours: number = aggregateSnapshot.data().totalHours;
5705
5704
  * const averageScore: number | null = aggregateSnapshot.data().averageScore;
5706
5705
  * ```
5707
- */ function Hr(t, r) {
5708
- var i = lt(t.firestore, gn), o = mn(i), a = function(t, e) {
5706
+ */ function Yr(t, r) {
5707
+ var i = ct(t.firestore, gn), o = yn(i), a = function(t, e) {
5709
5708
  var n = [];
5710
5709
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && n.push(e(t[r], r, t));
5711
5710
  return n;
5712
5711
  }(r, (function(t, e) {
5713
- return new bt(e, t.aggregateType, t._internalFieldPath);
5712
+ return new _t(e, t.aggregateType, t._internalFieldPath);
5714
5713
  }));
5715
5714
  // Run the aggregation and convert the results
5716
5715
  return function(t, r, i) {
@@ -5719,8 +5718,8 @@ function Gr(t, e, n) {
5719
5718
  return n(this, (function(n) {
5720
5719
  switch (n.label) {
5721
5720
  case 0:
5722
- return o = P(t), a = function(t, e, n, r) {
5723
- var i = en(t, e), o = i.B, a = i.parent, u = {}, s = [], c = 0;
5721
+ return o = A(t), a = function(t, e, n, r) {
5722
+ var i = tn(t, e), o = i.B, a = i.parent, u = {}, s = [], c = 0;
5724
5723
  return n.forEach((function(t) {
5725
5724
  // Map all client-side aliases to a unique short-form
5726
5725
  // alias. This avoids issues with client-side aliases that
@@ -5732,12 +5731,12 @@ function Gr(t, e, n) {
5732
5731
  }) : "avg" === t.aggregateType ? s.push({
5733
5732
  alias: e,
5734
5733
  avg: {
5735
- field: an(t.fieldPath)
5734
+ field: on(t.fieldPath)
5736
5735
  }
5737
5736
  }) : "sum" === t.aggregateType && s.push({
5738
5737
  alias: e,
5739
5738
  sum: {
5740
- field: an(t.fieldPath)
5739
+ field: on(t.fieldPath)
5741
5740
  }
5742
5741
  });
5743
5742
  })), {
@@ -5752,10 +5751,10 @@ function Gr(t, e, n) {
5752
5751
  parent: a
5753
5752
  };
5754
5753
  }(o.serializer, function(t) {
5755
- var e = P(t);
5754
+ var e = A(t);
5756
5755
  return e.O || (
5757
5756
  // Do not include implicit order-bys for aggregate queries.
5758
- e.O = Ae(e, t.explicitOrderBy)), e.O;
5757
+ e.O = Ie(e, t.explicitOrderBy)), e.O;
5759
5758
  }(r), i), u = a.request, s = a.X, c = a.parent, o.connection.R || delete u.parent,
5760
5759
  [ 4 /*yield*/ , o.g("RunAggregationQuery", o.serializer.databaseId, c, u,
5761
5760
  /*expectedResponseCount=*/ 1) ];
@@ -5765,7 +5764,7 @@ function Gr(t, e, n) {
5765
5764
  return !!t.result;
5766
5765
  })),
5767
5766
  // Omit RunAggregationQueryResponse that only contain readTimes.
5768
- A(1 === l.length), f = null === (e = l[0].result) || void 0 === e ? void 0 : e.aggregateFields,
5767
+ I(1 === l.length), f = null === (e = l[0].result) || void 0 === e ? void 0 : e.aggregateFields,
5769
5768
  [ 2 /*return*/ , Object.keys(f).reduce((function(t, e) {
5770
5769
  return t[s[e]] = f[e], t;
5771
5770
  }), {}) ];
@@ -5774,29 +5773,29 @@ function Gr(t, e, n) {
5774
5773
  }));
5775
5774
  }(o, t._query, a).then((function(e) {
5776
5775
  return function(t, e, n) {
5777
- var r = new Mr(t);
5778
- return new Sn(e, r, n);
5776
+ var r = new Lr(t);
5777
+ return new En(e, r, n);
5779
5778
  }(i, t, e);
5780
5779
  }));
5781
5780
  }
5782
5781
 
5783
- function Wr(t) {
5784
- return new En("sum", or("sum", t));
5782
+ function Hr(t) {
5783
+ return new Tn("sum", ir("sum", t));
5785
5784
  }
5786
5785
 
5787
5786
  /**
5788
5787
  * Create an AggregateField object that can be used to compute the average of
5789
5788
  * a specified field over a range of documents in the result set of a query.
5790
5789
  * @param field Specifies the field to average across the result set.
5791
- */ function Jr(t) {
5792
- return new En("avg", or("average", t));
5790
+ */ function Wr(t) {
5791
+ return new Tn("avg", ir("average", t));
5793
5792
  }
5794
5793
 
5795
5794
  /**
5796
5795
  * Create an AggregateField object that can be used to compute the count of
5797
5796
  * documents in the result set of a query.
5798
- */ function Xr() {
5799
- return new En("count");
5797
+ */ function Jr() {
5798
+ return new Tn("count");
5800
5799
  }
5801
5800
 
5802
5801
  /**
@@ -5804,9 +5803,9 @@ function Wr(t) {
5804
5803
  *
5805
5804
  * @param left Compare this AggregateField to the `right`.
5806
5805
  * @param right Compare this AggregateField to the `left`.
5807
- */ function Zr(t, e) {
5806
+ */ function Xr(t, e) {
5808
5807
  var n, r;
5809
- return t instanceof En && e instanceof En && t.aggregateType === e.aggregateType && (null === (n = t._internalFieldPath) || void 0 === n ? void 0 : n.canonicalString()) === (null === (r = e._internalFieldPath) || void 0 === r ? void 0 : r.canonicalString());
5808
+ return t instanceof Tn && e instanceof Tn && t.aggregateType === e.aggregateType && (null === (n = t._internalFieldPath) || void 0 === n ? void 0 : n.canonicalString()) === (null === (r = e._internalFieldPath) || void 0 === r ? void 0 : r.canonicalString());
5810
5809
  }
5811
5810
 
5812
5811
  /**
@@ -5820,8 +5819,8 @@ function Wr(t) {
5820
5819
  *
5821
5820
  * @returns `true` if the objects are "equal", as defined above, or `false`
5822
5821
  * otherwise.
5823
- */ function $r(t, e) {
5824
- return Nn(t.query, e.query) && p(t.data(), e.data());
5822
+ */ function Zr(t, e) {
5823
+ return Vn(t.query, e.query) && p(t.data(), e.data());
5825
5824
  }
5826
5825
 
5827
5826
  /**
@@ -5843,15 +5842,15 @@ function Wr(t) {
5843
5842
  /**
5844
5843
  * Returns a sentinel for use with {@link @firebase/firestore/lite#(updateDoc:1)} or
5845
5844
  * {@link @firebase/firestore/lite#(setDoc:1)} with `{merge: true}` to mark a field for deletion.
5846
- */ function ti() {
5847
- return new Qn("deleteField");
5845
+ */ function $r() {
5846
+ return new Kn("deleteField");
5848
5847
  }
5849
5848
 
5850
5849
  /**
5851
5850
  * Returns a sentinel used with {@link @firebase/firestore/lite#(setDoc:1)} or {@link @firebase/firestore/lite#(updateDoc:1)} to
5852
5851
  * include a server-generated timestamp in the written data.
5853
- */ function ei() {
5854
- return new Hn("serverTimestamp");
5852
+ */ function ti() {
5853
+ return new Yn("serverTimestamp");
5855
5854
  }
5856
5855
 
5857
5856
  /**
@@ -5865,11 +5864,11 @@ function Wr(t) {
5865
5864
  * @param elements - The elements to union into the array.
5866
5865
  * @returns The `FieldValue` sentinel for use in a call to `setDoc()` or
5867
5866
  * `updateDoc()`.
5868
- */ function ni() {
5867
+ */ function ei() {
5869
5868
  for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
5870
5869
  // NOTE: We don't actually parse the data until it's used in set() or
5871
5870
  // update() since we'd need the Firestore instance to do this.
5872
- return new Wn("arrayUnion", t);
5871
+ return new Hn("arrayUnion", t);
5873
5872
  }
5874
5873
 
5875
5874
  /**
@@ -5882,11 +5881,11 @@ function Wr(t) {
5882
5881
  * @param elements - The elements to remove from the array.
5883
5882
  * @returns The `FieldValue` sentinel for use in a call to `setDoc()` or
5884
5883
  * `updateDoc()`
5885
- */ function ri() {
5884
+ */ function ni() {
5886
5885
  for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
5887
5886
  // NOTE: We don't actually parse the data until it's used in set() or
5888
5887
  // update() since we'd need the Firestore instance to do this.
5889
- return new Jn("arrayRemove", t);
5888
+ return new Wn("arrayRemove", t);
5890
5889
  }
5891
5890
 
5892
5891
  /**
@@ -5907,8 +5906,8 @@ function Wr(t) {
5907
5906
  * @param n - The value to increment by.
5908
5907
  * @returns The `FieldValue` sentinel for use in a call to `setDoc()` or
5909
5908
  * `updateDoc()`
5910
- */ function ii(t) {
5911
- return new Xn("increment", t);
5909
+ */ function ri(t) {
5910
+ return new Jn("increment", t);
5912
5911
  }
5913
5912
 
5914
5913
  /**
@@ -5934,24 +5933,24 @@ function Wr(t) {
5934
5933
  * provides methods for adding writes to the write batch. None of the writes
5935
5934
  * will be committed (or visible locally) until {@link WriteBatch.commit} is
5936
5935
  * called.
5937
- */ var oi = /** @class */ function() {
5936
+ */ var ii = /** @class */ function() {
5938
5937
  /** @hideconstructor */
5939
5938
  function t(t, e) {
5940
5939
  this._firestore = t, this._commitHandler = e, this._mutations = [], this._committed = !1,
5941
- this._dataReader = Gn(t);
5940
+ this._dataReader = zn(t);
5942
5941
  }
5943
5942
  return t.prototype.set = function(t, e, n) {
5944
5943
  this._verifyNotCommitted();
5945
- var r = ai(t, this._firestore), i = Lr(r.converter, e, n), o = Kn(this._dataReader, "WriteBatch.set", r._key, i, null !== r.converter, n);
5946
- return this._mutations.push(o.toMutation(r._key, xe.none())), this;
5944
+ var r = oi(t, this._firestore), i = jr(r.converter, e, n), o = Gn(this._dataReader, "WriteBatch.set", r._key, i, null !== r.converter, n);
5945
+ return this._mutations.push(o.toMutation(r._key, qe.none())), this;
5947
5946
  }, t.prototype.update = function(t, e, n) {
5948
5947
  for (var r = [], i = 3; i < arguments.length; i++) r[i - 3] = arguments[i];
5949
5948
  this._verifyNotCommitted();
5950
- var o, a = ai(t, this._firestore);
5949
+ var o, a = oi(t, this._firestore);
5951
5950
  // For Compat types, we have to "extract" the underlying types before
5952
5951
  // performing validation.
5953
- return o = "string" == typeof (e = d(e)) || e instanceof Rn ? $n(this._dataReader, "WriteBatch.update", a._key, e, n, r) : Zn(this._dataReader, "WriteBatch.update", a._key, e),
5954
- this._mutations.push(o.toMutation(a._key, xe.exists(!0))), this;
5952
+ return o = "string" == typeof (e = d(e)) || e instanceof Dn ? Zn(this._dataReader, "WriteBatch.update", a._key, e, n, r) : Xn(this._dataReader, "WriteBatch.update", a._key, e),
5953
+ this._mutations.push(o.toMutation(a._key, qe.exists(!0))), this;
5955
5954
  },
5956
5955
  /**
5957
5956
  * Deletes the document referred to by the provided {@link DocumentReference}.
@@ -5961,8 +5960,8 @@ function Wr(t) {
5961
5960
  */
5962
5961
  t.prototype.delete = function(t) {
5963
5962
  this._verifyNotCommitted();
5964
- var e = ai(t, this._firestore);
5965
- return this._mutations = this._mutations.concat(new Me(e._key, xe.none())), this;
5963
+ var e = oi(t, this._firestore);
5964
+ return this._mutations = this._mutations.concat(new Le(e._key, qe.none())), this;
5966
5965
  },
5967
5966
  /**
5968
5967
  * Commits all of the writes in this write batch as a single atomic unit.
@@ -5979,12 +5978,12 @@ function Wr(t) {
5979
5978
  t.prototype.commit = function() {
5980
5979
  return this._verifyNotCommitted(), this._committed = !0, this._mutations.length > 0 ? this._commitHandler(this._mutations) : Promise.resolve();
5981
5980
  }, t.prototype._verifyNotCommitted = function() {
5982
- if (this._committed) throw new z(C, "A write batch can no longer be used after commit() has been called.");
5981
+ if (this._committed) throw new B(x, "A write batch can no longer be used after commit() has been called.");
5983
5982
  }, t;
5984
5983
  }();
5985
5984
 
5986
- function ai(t, e) {
5987
- if ((t = d(t)).firestore !== e) throw new z(V, "Provided document reference is from a different Firestore instance.");
5985
+ function oi(t, e) {
5986
+ if ((t = d(t)).firestore !== e) throw new B(O, "Provided document reference is from a different Firestore instance.");
5988
5987
  return t;
5989
5988
  }
5990
5989
 
@@ -6000,10 +5999,10 @@ function ai(t, e) {
6000
5999
  *
6001
6000
  * @returns A `WriteBatch` that can be used to atomically execute multiple
6002
6001
  * writes.
6003
- */ function ui(t) {
6004
- var e = mn(t = lt(t, gn));
6005
- return new oi(t, (function(t) {
6006
- return pn(e, t);
6002
+ */ function ai(t) {
6003
+ var e = yn(t = ct(t, gn));
6004
+ return new ii(t, (function(t) {
6005
+ return hn(e, t);
6007
6006
  }));
6008
6007
  }
6009
6008
 
@@ -6026,7 +6025,7 @@ function ai(t, e) {
6026
6025
  /**
6027
6026
  * Internal transaction object responsible for accumulating the mutations to
6028
6027
  * perform and the base versions for any documents read.
6029
- */ var si = /** @class */ function() {
6028
+ */ var ui = /** @class */ function() {
6030
6029
  function t(t) {
6031
6030
  this.datastore = t,
6032
6031
  // The version of each document that was read during this transaction.
@@ -6050,9 +6049,9 @@ function ai(t, e) {
6050
6049
  return n(this, (function(n) {
6051
6050
  switch (n.label) {
6052
6051
  case 0:
6053
- if (this.ensureCommitNotCalled(), this.mutations.length > 0) throw this.lastTransactionError = new z(V, "Firestore transactions require all reads to be executed before all writes."),
6052
+ if (this.ensureCommitNotCalled(), this.mutations.length > 0) throw this.lastTransactionError = new B(O, "Firestore transactions require all reads to be executed before all writes."),
6054
6053
  this.lastTransactionError;
6055
- return [ 4 /*yield*/ , dn(this.datastore, t) ];
6054
+ return [ 4 /*yield*/ , pn(this.datastore, t) ];
6056
6055
 
6057
6056
  case 1:
6058
6057
  return [ 2 /*return*/ , ((e = n.sent()).forEach((function(t) {
@@ -6071,7 +6070,7 @@ function ai(t, e) {
6071
6070
  }
6072
6071
  this.writtenDocs.add(t.toString());
6073
6072
  }, t.prototype.delete = function(t) {
6074
- this.write(new Me(t, this.precondition(t))), this.writtenDocs.add(t.toString());
6073
+ this.write(new Le(t, this.precondition(t))), this.writtenDocs.add(t.toString());
6075
6074
  }, t.prototype.commit = function() {
6076
6075
  return e(this, void 0, void 0, (function() {
6077
6076
  var t, e = this;
@@ -6087,9 +6086,9 @@ function ai(t, e) {
6087
6086
  // For each document that was read but not written to, we want to perform
6088
6087
  // a `verify` operation.
6089
6088
  t.forEach((function(t, n) {
6090
- var r = ot.fromPath(n);
6091
- e.mutations.push(new Ue(r, e.precondition(r)));
6092
- })), [ 4 /*yield*/ , pn(this.datastore, this.mutations) ];
6089
+ var r = it.fromPath(n);
6090
+ e.mutations.push(new Me(r, e.precondition(r)));
6091
+ })), [ 4 /*yield*/ , hn(this.datastore, this.mutations) ];
6093
6092
 
6094
6093
  case 1:
6095
6094
  // For each mutation, note that the doc was written.
@@ -6100,15 +6099,15 @@ function ai(t, e) {
6100
6099
  }, t.prototype.recordVersion = function(t) {
6101
6100
  var e;
6102
6101
  if (t.isFoundDocument()) e = t.version; else {
6103
- if (!t.isNoDocument()) throw I();
6102
+ if (!t.isNoDocument()) throw k();
6104
6103
  // Represent a deleted doc using SnapshotVersion.min().
6105
- e = he.min();
6104
+ e = fe.min();
6106
6105
  }
6107
6106
  var n = this.readVersions.get(t.key.toString());
6108
6107
  if (n) {
6109
6108
  if (!e.isEqual(n))
6110
6109
  // This transaction will fail no matter what.
6111
- throw new z(j, "Document version changed between two reads.");
6110
+ throw new B(C, "Document version changed between two reads.");
6112
6111
  } else this.readVersions.set(t.key.toString(), e);
6113
6112
  },
6114
6113
  /**
@@ -6117,7 +6116,7 @@ function ai(t, e) {
6117
6116
  */
6118
6117
  t.prototype.precondition = function(t) {
6119
6118
  var e = this.readVersions.get(t.toString());
6120
- return !this.writtenDocs.has(t.toString()) && e ? e.isEqual(he.min()) ? xe.exists(!1) : xe.updateTime(e) : xe.none();
6119
+ return !this.writtenDocs.has(t.toString()) && e ? e.isEqual(fe.min()) ? qe.exists(!1) : qe.updateTime(e) : qe.none();
6121
6120
  },
6122
6121
  /**
6123
6122
  * Returns the precondition for a document if the operation is an update.
@@ -6127,7 +6126,7 @@ function ai(t, e) {
6127
6126
  // The first time a document is written, we want to take into account the
6128
6127
  // read time and existence
6129
6128
  if (!this.writtenDocs.has(t.toString()) && e) {
6130
- if (e.isEqual(he.min()))
6129
+ if (e.isEqual(fe.min()))
6131
6130
  // The document doesn't exist, so fail the transaction.
6132
6131
  // This has to be validated locally because you can't send a
6133
6132
  // precondition that a document does not exist without changing the
@@ -6137,22 +6136,22 @@ function ai(t, e) {
6137
6136
  // express that to the backend, we have to validate locally.
6138
6137
  // Note: this can change once we can send separate verify writes in the
6139
6138
  // transaction.
6140
- throw new z(V, "Can't update a document that doesn't exist.");
6139
+ throw new B(O, "Can't update a document that doesn't exist.");
6141
6140
  // Document exists, base precondition on document update time.
6142
- return xe.updateTime(e);
6141
+ return qe.updateTime(e);
6143
6142
  }
6144
6143
  // Document was not read, so we just use the preconditions for a blind
6145
6144
  // update.
6146
- return xe.exists(!0);
6145
+ return qe.exists(!0);
6147
6146
  }, t.prototype.write = function(t) {
6148
6147
  this.ensureCommitNotCalled(), this.mutations.push(t);
6149
6148
  }, t.prototype.ensureCommitNotCalled = function() {}, t;
6150
- }(), ci = {
6149
+ }(), si = {
6151
6150
  maxAttempts: 5
6152
- }, li = /** @class */ function() {
6151
+ }, ci = /** @class */ function() {
6153
6152
  function t(t, e, n, r, i) {
6154
6153
  this.asyncQueue = t, this.datastore = e, this.options = n, this.updateFunction = r,
6155
- this.deferred = i, this.Et = n.maxAttempts, this.At = new fn(this.asyncQueue, "transaction_retry" /* TimerId.TransactionRetry */)
6154
+ this.deferred = i, this.Et = n.maxAttempts, this.At = new ln(this.asyncQueue, "transaction_retry" /* TimerId.TransactionRetry */)
6156
6155
  /** Runs the transaction and sets the result on deferred. */;
6157
6156
  }
6158
6157
  return t.prototype.Tt = function() {
@@ -6163,7 +6162,7 @@ function ai(t, e) {
6163
6162
  return e(t, void 0, void 0, (function() {
6164
6163
  var t, e, r = this;
6165
6164
  return n(this, (function(n) {
6166
- return t = new si(this.datastore), (e = this.Pt(t)) && e.then((function(e) {
6165
+ return t = new ui(this.datastore), (e = this.Pt(t)) && e.then((function(e) {
6167
6166
  r.asyncQueue.enqueueAndForget((function() {
6168
6167
  return t.commit().then((function() {
6169
6168
  r.deferred.resolve(e);
@@ -6180,7 +6179,7 @@ function ai(t, e) {
6180
6179
  }, t.prototype.Pt = function(t) {
6181
6180
  try {
6182
6181
  var e = this.updateFunction(t);
6183
- return !dt(e) && e.catch && e.then ? e : (this.deferred.reject(Error("Transaction callback must return a Promise")),
6182
+ return !pt(e) && e.catch && e.then ? e : (this.deferred.reject(Error("Transaction callback must return a Promise")),
6184
6183
  null);
6185
6184
  } catch (t) {
6186
6185
  // Do not retry errors thrown by user provided updateFunction.
@@ -6206,30 +6205,30 @@ function ai(t, e) {
6206
6205
  function(t) {
6207
6206
  switch (t) {
6208
6207
  default:
6209
- return I();
6208
+ return k();
6210
6209
 
6210
+ case P:
6211
6211
  case F:
6212
- case O:
6213
- case N:
6214
- case x:
6212
+ case V:
6213
+ case q:
6214
+ case M:
6215
6215
  case U:
6216
- case B:
6217
6216
  // Unauthenticated means something went wrong with our token and we need
6218
6217
  // to retry with new credentials which will happen automatically.
6219
- case q:
6218
+ case R:
6220
6219
  return !1;
6221
6220
 
6222
- case V:
6223
- case D:
6221
+ case O:
6222
+ case N:
6224
6223
  case "already-exists":
6225
- case R:
6226
- case C:
6224
+ case D:
6225
+ case x:
6227
6226
  // Aborted might be retried in some scenarios, but that is dependant on
6228
6227
  // the context and should handled individually by the calling code.
6229
6228
  // See https://cloud.google.com/apis/design/errors.
6230
- case j:
6229
+ case C:
6230
+ case j:
6231
6231
  case L:
6232
- case M:
6233
6232
  case "data-loss":
6234
6233
  return !0;
6235
6234
  }
@@ -6271,7 +6270,7 @@ function ai(t, e) {
6271
6270
  * See the License for the specific language governing permissions and
6272
6271
  * limitations under the License.
6273
6272
  */
6274
- /** The Platform's 'document' implementation or null if not available. */ function fi() {
6273
+ /** The Platform's 'document' implementation or null if not available. */ function li() {
6275
6274
  // `document` is not always available, e.g. in ReactNative and WebWorkers.
6276
6275
  // eslint-disable-next-line no-restricted-globals
6277
6276
  return "undefined" != typeof document ? document : null;
@@ -6303,10 +6302,10 @@ function ai(t, e) {
6303
6302
  * Note: We implement `PromiseLike` instead of `Promise`, as the `Promise` type
6304
6303
  * in newer versions of TypeScript defines `finally`, which is not available in
6305
6304
  * IE.
6306
- */ var hi, pi = /** @class */ function() {
6305
+ */ var fi, hi = /** @class */ function() {
6307
6306
  function t(t, e, n, r, i) {
6308
6307
  this.asyncQueue = t, this.timerId = e, this.targetTimeMs = n, this.op = r, this.removalCallback = i,
6309
- this.deferred = new G, this.then = this.deferred.promise.then.bind(this.deferred.promise),
6308
+ this.deferred = new z, this.then = this.deferred.promise.then.bind(this.deferred.promise),
6310
6309
  // It's normal for the deferred promise to be canceled (due to cancellation)
6311
6310
  // and so we attach a dummy catch callback to avoid
6312
6311
  // 'UnhandledPromiseRejectionWarning' log spam.
@@ -6362,7 +6361,7 @@ function ai(t, e) {
6362
6361
  * guarantee that the operation will not be run.
6363
6362
  */
6364
6363
  t.prototype.cancel = function(t) {
6365
- null !== this.timerHandle && (this.clearTimeout(), this.deferred.reject(new z(F, "Operation cancelled" + (t ? ": " + t : ""))));
6364
+ null !== this.timerHandle && (this.clearTimeout(), this.deferred.reject(new B(P, "Operation cancelled" + (t ? ": " + t : ""))));
6366
6365
  }, t.prototype.handleDelayElapsed = function() {
6367
6366
  var t = this;
6368
6367
  this.asyncQueue.enqueueAndForget((function() {
@@ -6374,7 +6373,7 @@ function ai(t, e) {
6374
6373
  null !== this.timerHandle && (this.removalCallback(this), clearTimeout(this.timerHandle),
6375
6374
  this.timerHandle = null);
6376
6375
  }, t;
6377
- }(), di = /** @class */ function() {
6376
+ }(), pi = /** @class */ function() {
6378
6377
  function t() {
6379
6378
  var t = this;
6380
6379
  // The last promise in the queue.
@@ -6398,15 +6397,15 @@ function ai(t, e) {
6398
6397
  // List of TimerIds to fast-forward delays for.
6399
6398
  this.Ct = [],
6400
6399
  // Backoff timer used to schedule retries for retryable operations
6401
- this.At = new fn(this, "async_queue_retry" /* TimerId.AsyncQueueRetry */),
6400
+ this.At = new ln(this, "async_queue_retry" /* TimerId.AsyncQueueRetry */),
6402
6401
  // Visibility handler that triggers an immediate retry of all retryable
6403
6402
  // operations. Meant to speed up recovery when we regain file system access
6404
6403
  // after page comes into foreground.
6405
6404
  this.St = function() {
6406
- var e = fi();
6407
- e && T("AsyncQueue", "Visibility state changed to " + e.visibilityState), t.At.J();
6405
+ var e = li();
6406
+ e && b("AsyncQueue", "Visibility state changed to " + e.visibilityState), t.At.J();
6408
6407
  };
6409
- var e = fi();
6408
+ var e = li();
6410
6409
  e && "function" == typeof e.addEventListener && e.addEventListener("visibilitychange", this.St);
6411
6410
  }
6412
6411
  return Object.defineProperty(t.prototype, "isShuttingDown", {
@@ -6430,7 +6429,7 @@ function ai(t, e) {
6430
6429
  }, t.prototype.enterRestrictedMode = function(t) {
6431
6430
  if (!this.gt) {
6432
6431
  this.gt = !0, this.bt = t || !1;
6433
- var e = fi();
6432
+ var e = li();
6434
6433
  e && "function" == typeof e.removeEventListener && e.removeEventListener("visibilitychange", this.St);
6435
6434
  }
6436
6435
  }, t.prototype.enqueue = function(t) {
@@ -6441,7 +6440,7 @@ function ai(t, e) {
6441
6440
  // Create a deferred Promise that we can return to the callee. This
6442
6441
  // allows us to return a "hanging Promise" only to the callee and still
6443
6442
  // advance the queue even when the operation is not run.
6444
- var n = new G;
6443
+ var n = new z;
6445
6444
  return this.Ot((function() {
6446
6445
  return e.gt && e.bt ? Promise.resolve() : (t().then(n.resolve, n.reject), n.promise);
6447
6446
  })).then((function() {
@@ -6475,7 +6474,7 @@ function ai(t, e) {
6475
6474
  case 3:
6476
6475
  if (t = n.sent(), "IndexedDbTransactionError" !== t.name) throw t;
6477
6476
  // Failure will be handled by AsyncQueue
6478
- return T("AsyncQueue", "Operation failed with retryable error: " + t),
6477
+ return b("AsyncQueue", "Operation failed with retryable error: " + t),
6479
6478
  [ 3 /*break*/ , 4 ];
6480
6479
 
6481
6480
  case 4:
@@ -6517,7 +6516,7 @@ function ai(t, e) {
6517
6516
  // Re-throw the error so that this.tail becomes a rejected Promise and
6518
6517
  // all further attempts to chain (via .then) will just short-circuit
6519
6518
  // and return the rejected Promise.
6520
- throw E("INTERNAL UNHANDLED ERROR: ", n), t;
6519
+ throw T("INTERNAL UNHANDLED ERROR: ", n), t;
6521
6520
  })).then((function(t) {
6522
6521
  return e.Dt = !1, t;
6523
6522
  }));
@@ -6528,12 +6527,12 @@ function ai(t, e) {
6528
6527
  this.Nt(),
6529
6528
  // Fast-forward delays for timerIds that have been overriden.
6530
6529
  this.Ct.indexOf(t) > -1 && (e = 0);
6531
- var i = pi.createAndSchedule(this, t, e, n, (function(t) {
6530
+ var i = hi.createAndSchedule(this, t, e, n, (function(t) {
6532
6531
  return r.Bt(t);
6533
6532
  }));
6534
6533
  return this.Ft.push(i), i;
6535
6534
  }, t.prototype.Nt = function() {
6536
- this.vt && I();
6535
+ this.vt && k();
6537
6536
  }, t.prototype.verifyOperationInProgress = function() {},
6538
6537
  /**
6539
6538
  * Waits until all currently queued tasks are finished executing. Delayed
@@ -6603,10 +6602,10 @@ function ai(t, e) {
6603
6602
  var e = this.Ft.indexOf(t);
6604
6603
  this.Ft.splice(e, 1);
6605
6604
  }, t;
6606
- }(), yi = /** @class */ function() {
6605
+ }(), di = /** @class */ function() {
6607
6606
  /** @hideconstructor */
6608
6607
  function t(t, e) {
6609
- this._firestore = t, this._transaction = e, this._dataReader = Gn(t)
6608
+ this._firestore = t, this._transaction = e, this._dataReader = zn(t)
6610
6609
  /**
6611
6610
  * Reads the document referenced by the provided {@link DocumentReference}.
6612
6611
  *
@@ -6615,23 +6614,23 @@ function ai(t, e) {
6615
6614
  */;
6616
6615
  }
6617
6616
  return t.prototype.get = function(t) {
6618
- var e = this, n = ai(t, this._firestore), r = new Mr(this._firestore);
6617
+ var e = this, n = oi(t, this._firestore), r = new Lr(this._firestore);
6619
6618
  return this._transaction.lookup([ n._key ]).then((function(t) {
6620
- if (!t || 1 !== t.length) return I();
6619
+ if (!t || 1 !== t.length) return k();
6621
6620
  var i = t[0];
6622
- if (i.isFoundDocument()) return new lr(e._firestore, r, i.key, i, n.converter);
6623
- if (i.isNoDocument()) return new lr(e._firestore, r, n._key, null, n.converter);
6624
- throw I();
6621
+ if (i.isFoundDocument()) return new cr(e._firestore, r, i.key, i, n.converter);
6622
+ if (i.isNoDocument()) return new cr(e._firestore, r, n._key, null, n.converter);
6623
+ throw k();
6625
6624
  }));
6626
6625
  }, t.prototype.set = function(t, e, n) {
6627
- var r = ai(t, this._firestore), i = Lr(r.converter, e, n), o = Kn(this._dataReader, "Transaction.set", r._key, i, null !== r.converter, n);
6626
+ var r = oi(t, this._firestore), i = jr(r.converter, e, n), o = Gn(this._dataReader, "Transaction.set", r._key, i, null !== r.converter, n);
6628
6627
  return this._transaction.set(r._key, o), this;
6629
6628
  }, t.prototype.update = function(t, e, n) {
6630
6629
  for (var r = [], i = 3; i < arguments.length; i++) r[i - 3] = arguments[i];
6631
- var o, a = ai(t, this._firestore);
6630
+ var o, a = oi(t, this._firestore);
6632
6631
  // For Compat types, we have to "extract" the underlying types before
6633
6632
  // performing validation.
6634
- return o = "string" == typeof (e = d(e)) || e instanceof Rn ? $n(this._dataReader, "Transaction.update", a._key, e, n, r) : Zn(this._dataReader, "Transaction.update", a._key, e),
6633
+ return o = "string" == typeof (e = d(e)) || e instanceof Dn ? Zn(this._dataReader, "Transaction.update", a._key, e, n, r) : Xn(this._dataReader, "Transaction.update", a._key, e),
6635
6634
  this._transaction.update(a._key, o), this;
6636
6635
  },
6637
6636
  /**
@@ -6641,7 +6640,7 @@ function ai(t, e) {
6641
6640
  * @returns This `Transaction` instance. Used for chaining method calls.
6642
6641
  */
6643
6642
  t.prototype.delete = function(t) {
6644
- var e = ai(t, this._firestore);
6643
+ var e = oi(t, this._firestore);
6645
6644
  return this._transaction.delete(e._key), this;
6646
6645
  }, t;
6647
6646
  }();
@@ -6681,14 +6680,14 @@ function ai(t, e) {
6681
6680
  * `updateFunction `is returned here. Otherwise, if the transaction failed, a
6682
6681
  * rejected promise with the corresponding failure error is returned.
6683
6682
  */
6684
- function mi(t, e, n) {
6685
- var r = mn(t = lt(t, gn)), i = Object.assign(Object.assign({}, ci), n);
6683
+ function yi(t, e, n) {
6684
+ var r = yn(t = ct(t, gn)), i = Object.assign(Object.assign({}, si), n);
6686
6685
  !function(t) {
6687
- if (t.maxAttempts < 1) throw new z(V, "Max attempts must be at least 1");
6686
+ if (t.maxAttempts < 1) throw new B(O, "Max attempts must be at least 1");
6688
6687
  }(i);
6689
- var o = new G;
6690
- return new li(new di, r, i, (function(n) {
6691
- return e(new yi(t, n));
6688
+ var o = new z;
6689
+ return new ci(new pi, r, i, (function(n) {
6690
+ return e(new di(t, n));
6692
6691
  }), o).Tt(), o.promise
6693
6692
  /**
6694
6693
  * Firestore Lite
@@ -6700,15 +6699,15 @@ function mi(t, e, n) {
6700
6699
  */;
6701
6700
  }
6702
6701
 
6703
- hi = "".concat(i, "_lite"), w = hi, o(new c("firestore/lite", (function(t, e) {
6704
- var n = e.instanceIdentifier, r = e.options, i = t.getProvider("app").getImmediate(), o = new gn(new H(t.getProvider("auth-internal")), new Z(t.getProvider("app-check-internal")), function(t, e) {
6705
- if (!Object.prototype.hasOwnProperty.apply(t.options, [ "projectId" ])) throw new z(V, '"projectId" not provided in firebase.initializeApp.');
6706
- return new tt(t.options.projectId, e);
6702
+ fi = "".concat(i, "_lite"), v = fi, o(new c("firestore/lite", (function(t, e) {
6703
+ var n = e.instanceIdentifier, r = e.options, i = t.getProvider("app").getImmediate(), o = new gn(new Y(t.getProvider("auth-internal")), new X(t.getProvider("app-check-internal")), function(t, e) {
6704
+ if (!Object.prototype.hasOwnProperty.apply(t.options, [ "projectId" ])) throw new B(O, '"projectId" not provided in firebase.initializeApp.');
6705
+ return new $(t.options.projectId, e);
6707
6706
  }(i, n), i);
6708
6707
  return r && o._setSettings(r), o;
6709
6708
  }), "PUBLIC").setMultipleInstances(!0)),
6710
6709
  // RUNTIME_ENV and BUILD_TARGET are replaced by real values during the compilation
6711
- a("firestore-lite", v, ""), a("firestore-lite", v, "esm5");
6710
+ a("firestore-lite", "4.6.2-20240508213348", ""), a("firestore-lite", "4.6.2-20240508213348", "esm5");
6712
6711
 
6713
- export { En as AggregateField, Sn as AggregateQuerySnapshot, Dn as Bytes, An as CollectionReference, In as DocumentReference, lr as DocumentSnapshot, Rn as FieldPath, xn as FieldValue, gn as Firestore, z as FirestoreError, Cn as GeoPoint, kn as Query, _r as QueryCompositeFilterConstraint, mr as QueryConstraint, fr as QueryDocumentSnapshot, Vr as QueryEndAtConstraint, gr as QueryFieldFilterConstraint, kr as QueryLimitConstraint, Er as QueryOrderByConstraint, hr as QuerySnapshot, Pr as QueryStartAtConstraint, Rt as Timestamp, yi as Transaction, oi as WriteBatch, Qr as addDoc, Zr as aggregateFieldEqual, $r as aggregateQuerySnapshotEqual, Tr as and, ri as arrayRemove, ni as arrayUnion, Jr as average, Pn as collection, Fn as collectionGroup, bn as connectFirestoreEmulator, Xr as count, Kr as deleteDoc, ti as deleteField, On as doc, qn as documentId, Dr as endAt, Nr as endBefore, Hr as getAggregate, Yr as getCount, Ur as getDoc, Br as getDocs, _n as getFirestore, ii as increment, wn as initializeFirestore, Ir as limit, Ar as limitToLast, br as or, Sr as orderBy, vr as query, Nn as queryEqual, Vn as refEqual, mi as runTransaction, ei as serverTimestamp, zr as setDoc, b as setLogLevel, pr as snapshotEqual, Or as startAfter, Fr as startAt, Wr as sum, Tn as terminate, Gr as updateDoc, wr as where, ui as writeBatch };
6712
+ export { Tn as AggregateField, En as AggregateQuerySnapshot, Nn as Bytes, In as CollectionReference, kn as DocumentReference, cr as DocumentSnapshot, Dn as FieldPath, qn as FieldValue, gn as Firestore, B as FirestoreError, xn as GeoPoint, Sn as Query, wr as QueryCompositeFilterConstraint, yr as QueryConstraint, lr as QueryDocumentSnapshot, Or as QueryEndAtConstraint, gr as QueryFieldFilterConstraint, Sr as QueryLimitConstraint, Tr as QueryOrderByConstraint, fr as QuerySnapshot, Ar as QueryStartAtConstraint, Dt as Timestamp, di as Transaction, ii as WriteBatch, Kr as addDoc, Xr as aggregateFieldEqual, Zr as aggregateQuerySnapshotEqual, br as and, ni as arrayRemove, ei as arrayUnion, Wr as average, An as collection, Pn as collectionGroup, _n as connectFirestoreEmulator, Jr as count, Gr as deleteDoc, $r as deleteField, Fn as doc, Rn as documentId, Nr as endAt, Vr as endBefore, Yr as getAggregate, Qr as getCount, Mr as getDoc, Ur as getDocs, wn as getFirestore, ri as increment, vn as initializeFirestore, kr as limit, Ir as limitToLast, _r as or, Er as orderBy, mr as query, Vn as queryEqual, On as refEqual, yi as runTransaction, ti as serverTimestamp, Br as setDoc, _ as setLogLevel, hr as snapshotEqual, Fr as startAfter, Pr as startAt, Hr as sum, bn as terminate, zr as updateDoc, vr as where, ai as writeBatch };
6714
6713
  //# sourceMappingURL=index.browser.esm5.js.map