@firebase/firestore 3.4.6 → 3.4.7-canary.05dc9d6a0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/firestore/src/core/bundle.d.ts +2 -2
  3. package/dist/firestore/src/core/bundle_impl.d.ts +2 -0
  4. package/dist/firestore/src/core/query.d.ts +7 -0
  5. package/dist/firestore/src/core/snapshot_version.d.ts +1 -0
  6. package/dist/firestore/src/core/sync_engine_impl.d.ts +1 -1
  7. package/dist/firestore/src/local/index_manager.d.ts +3 -2
  8. package/dist/firestore/src/local/indexeddb_index_manager.d.ts +11 -3
  9. package/dist/firestore/src/local/indexeddb_mutation_batch_impl.d.ts +2 -1
  10. package/dist/firestore/src/local/indexeddb_remote_document_cache.d.ts +7 -15
  11. package/dist/firestore/src/local/indexeddb_schema.d.ts +23 -15
  12. package/dist/firestore/src/local/indexeddb_schema_converter.d.ts +1 -0
  13. package/dist/firestore/src/local/indexeddb_schema_legacy.d.ts +29 -0
  14. package/dist/firestore/src/local/indexeddb_sentinels.d.ts +31 -19
  15. package/dist/firestore/src/local/local_documents_view.d.ts +3 -4
  16. package/dist/firestore/src/local/local_serializer.d.ts +2 -1
  17. package/dist/firestore/src/local/local_store_impl.d.ts +1 -7
  18. package/dist/firestore/src/local/memory_index_manager.d.ts +3 -2
  19. package/dist/firestore/src/local/remote_document_cache.d.ts +13 -4
  20. package/dist/firestore/src/local/shared_client_state.d.ts +6 -3
  21. package/dist/firestore/src/local/shared_client_state_schema.d.ts +1 -1
  22. package/dist/firestore/src/local/shared_client_state_syncer.d.ts +1 -1
  23. package/dist/firestore/src/local/simple_db.d.ts +2 -0
  24. package/dist/firestore/src/model/field_index.d.ts +14 -1
  25. package/dist/firestore/test/unit/local/test_index_manager.d.ts +3 -2
  26. package/dist/firestore/test/unit/local/test_remote_document_cache.d.ts +3 -5
  27. package/dist/index.esm2017.js +3531 -3400
  28. package/dist/index.esm2017.js.map +1 -1
  29. package/dist/index.esm5.js +4157 -3978
  30. package/dist/index.esm5.js.map +1 -1
  31. package/dist/index.node.cjs.js +589 -362
  32. package/dist/index.node.cjs.js.map +1 -1
  33. package/dist/index.node.mjs +589 -362
  34. package/dist/index.node.mjs.map +1 -1
  35. package/dist/index.rn.js +3643 -3512
  36. package/dist/index.rn.js.map +1 -1
  37. package/dist/internal.d.ts +20 -6
  38. package/dist/lite/firestore/src/core/bundle.d.ts +2 -2
  39. package/dist/lite/firestore/src/core/bundle_impl.d.ts +2 -0
  40. package/dist/lite/firestore/src/core/query.d.ts +7 -0
  41. package/dist/lite/firestore/src/core/snapshot_version.d.ts +1 -0
  42. package/dist/lite/firestore/src/core/sync_engine_impl.d.ts +1 -1
  43. package/dist/lite/firestore/src/local/index_manager.d.ts +3 -2
  44. package/dist/lite/firestore/src/local/indexeddb_index_manager.d.ts +11 -3
  45. package/dist/lite/firestore/src/local/indexeddb_mutation_batch_impl.d.ts +2 -1
  46. package/dist/lite/firestore/src/local/indexeddb_remote_document_cache.d.ts +7 -15
  47. package/dist/lite/firestore/src/local/indexeddb_schema.d.ts +23 -15
  48. package/dist/lite/firestore/src/local/indexeddb_schema_converter.d.ts +1 -0
  49. package/dist/lite/firestore/src/local/indexeddb_schema_legacy.d.ts +29 -0
  50. package/dist/lite/firestore/src/local/indexeddb_sentinels.d.ts +31 -19
  51. package/dist/lite/firestore/src/local/local_documents_view.d.ts +3 -4
  52. package/dist/lite/firestore/src/local/local_serializer.d.ts +2 -1
  53. package/dist/lite/firestore/src/local/local_store_impl.d.ts +1 -7
  54. package/dist/lite/firestore/src/local/memory_index_manager.d.ts +3 -2
  55. package/dist/lite/firestore/src/local/remote_document_cache.d.ts +13 -4
  56. package/dist/lite/firestore/src/local/shared_client_state.d.ts +6 -3
  57. package/dist/lite/firestore/src/local/shared_client_state_schema.d.ts +1 -1
  58. package/dist/lite/firestore/src/local/shared_client_state_syncer.d.ts +1 -1
  59. package/dist/lite/firestore/src/local/simple_db.d.ts +2 -0
  60. package/dist/lite/firestore/src/model/field_index.d.ts +14 -1
  61. package/dist/lite/firestore/test/unit/local/test_index_manager.d.ts +3 -2
  62. package/dist/lite/firestore/test/unit/local/test_remote_document_cache.d.ts +3 -5
  63. package/dist/lite/index.browser.esm2017.js +5 -2
  64. package/dist/lite/index.browser.esm2017.js.map +1 -1
  65. package/dist/lite/index.browser.esm5.js +94 -92
  66. package/dist/lite/index.browser.esm5.js.map +1 -1
  67. package/dist/lite/index.node.cjs.js +5 -2
  68. package/dist/lite/index.node.cjs.js.map +1 -1
  69. package/dist/lite/index.node.mjs +5 -2
  70. package/dist/lite/index.node.mjs.map +1 -1
  71. package/dist/lite/index.rn.esm2017.js +5 -2
  72. package/dist/lite/index.rn.esm2017.js.map +1 -1
  73. package/dist/lite/internal.d.ts +1 -0
  74. package/dist/lite/packages/firestore/src/core/bundle.d.ts +2 -2
  75. package/dist/lite/packages/firestore/src/core/bundle_impl.d.ts +2 -0
  76. package/dist/lite/packages/firestore/src/core/query.d.ts +7 -0
  77. package/dist/lite/packages/firestore/src/core/snapshot_version.d.ts +1 -0
  78. package/dist/lite/packages/firestore/src/core/sync_engine_impl.d.ts +1 -1
  79. package/dist/lite/packages/firestore/src/local/index_manager.d.ts +3 -2
  80. package/dist/lite/packages/firestore/src/local/indexeddb_index_manager.d.ts +11 -3
  81. package/dist/lite/packages/firestore/src/local/indexeddb_mutation_batch_impl.d.ts +2 -1
  82. package/dist/lite/packages/firestore/src/local/indexeddb_remote_document_cache.d.ts +7 -15
  83. package/dist/lite/packages/firestore/src/local/indexeddb_schema.d.ts +23 -15
  84. package/dist/lite/packages/firestore/src/local/indexeddb_schema_converter.d.ts +1 -0
  85. package/dist/lite/packages/firestore/src/local/indexeddb_schema_legacy.d.ts +29 -0
  86. package/dist/lite/packages/firestore/src/local/indexeddb_sentinels.d.ts +31 -19
  87. package/dist/lite/packages/firestore/src/local/local_documents_view.d.ts +3 -4
  88. package/dist/lite/packages/firestore/src/local/local_serializer.d.ts +2 -1
  89. package/dist/lite/packages/firestore/src/local/local_store_impl.d.ts +1 -7
  90. package/dist/lite/packages/firestore/src/local/memory_index_manager.d.ts +3 -2
  91. package/dist/lite/packages/firestore/src/local/remote_document_cache.d.ts +13 -4
  92. package/dist/lite/packages/firestore/src/local/shared_client_state.d.ts +6 -3
  93. package/dist/lite/packages/firestore/src/local/shared_client_state_schema.d.ts +1 -1
  94. package/dist/lite/packages/firestore/src/local/shared_client_state_syncer.d.ts +1 -1
  95. package/dist/lite/packages/firestore/src/local/simple_db.d.ts +2 -0
  96. package/dist/lite/packages/firestore/src/model/field_index.d.ts +14 -1
  97. package/dist/lite/packages/firestore/test/unit/local/test_index_manager.d.ts +3 -2
  98. package/dist/lite/packages/firestore/test/unit/local/test_remote_document_cache.d.ts +3 -5
  99. package/dist/lite/private.d.ts +1 -0
  100. package/dist/packages/firestore/dist/index.esm2017.d.ts +180 -180
  101. package/dist/packages/firestore/src/core/bundle.d.ts +2 -2
  102. package/dist/packages/firestore/src/core/bundle_impl.d.ts +2 -0
  103. package/dist/packages/firestore/src/core/query.d.ts +7 -0
  104. package/dist/packages/firestore/src/core/snapshot_version.d.ts +1 -0
  105. package/dist/packages/firestore/src/core/sync_engine_impl.d.ts +1 -1
  106. package/dist/packages/firestore/src/local/index_manager.d.ts +3 -2
  107. package/dist/packages/firestore/src/local/indexeddb_index_manager.d.ts +11 -3
  108. package/dist/packages/firestore/src/local/indexeddb_mutation_batch_impl.d.ts +2 -1
  109. package/dist/packages/firestore/src/local/indexeddb_remote_document_cache.d.ts +7 -15
  110. package/dist/packages/firestore/src/local/indexeddb_schema.d.ts +23 -15
  111. package/dist/packages/firestore/src/local/indexeddb_schema_converter.d.ts +1 -0
  112. package/dist/packages/firestore/src/local/indexeddb_schema_legacy.d.ts +29 -0
  113. package/dist/packages/firestore/src/local/indexeddb_sentinels.d.ts +31 -19
  114. package/dist/packages/firestore/src/local/local_documents_view.d.ts +3 -4
  115. package/dist/packages/firestore/src/local/local_serializer.d.ts +2 -1
  116. package/dist/packages/firestore/src/local/local_store_impl.d.ts +1 -7
  117. package/dist/packages/firestore/src/local/memory_index_manager.d.ts +3 -2
  118. package/dist/packages/firestore/src/local/remote_document_cache.d.ts +13 -4
  119. package/dist/packages/firestore/src/local/shared_client_state.d.ts +6 -3
  120. package/dist/packages/firestore/src/local/shared_client_state_schema.d.ts +1 -1
  121. package/dist/packages/firestore/src/local/shared_client_state_syncer.d.ts +1 -1
  122. package/dist/packages/firestore/src/local/simple_db.d.ts +2 -0
  123. package/dist/packages/firestore/src/model/field_index.d.ts +14 -1
  124. package/dist/packages/firestore/test/unit/local/test_index_manager.d.ts +3 -2
  125. package/dist/packages/firestore/test/unit/local/test_remote_document_cache.d.ts +3 -5
  126. package/dist/private.d.ts +20 -6
  127. package/package.json +9 -9
@@ -67,7 +67,7 @@ m.MOCK_USER = new m("mock-user");
67
67
  * See the License for the specific language governing permissions and
68
68
  * limitations under the License.
69
69
  */
70
- var y = "9.6.9", v = new l("@firebase/firestore");
70
+ var y = "9.6.10-canary.05dc9d6a0", v = new l("@firebase/firestore");
71
71
 
72
72
  /**
73
73
  * @license
@@ -225,7 +225,7 @@ e) {
225
225
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
226
226
  * See the License for the specific language governing permissions and
227
227
  * limitations under the License.
228
- */ var A = "cancelled", k = "unknown", V = "invalid-argument", D = "deadline-exceeded", P = "not-found", N = "permission-denied", q = "unauthenticated", F = "resource-exhausted", O = "failed-precondition", C = "aborted", L = "out-of-range", j = "unimplemented", R = "internal", M = "unavailable", U = /** @class */ function(e) {
228
+ */ var A = "cancelled", k = "unknown", V = "invalid-argument", D = "deadline-exceeded", P = "not-found", N = "permission-denied", q = "unauthenticated", F = "resource-exhausted", O = "failed-precondition", C = "aborted", L = "out-of-range", j = "unimplemented", R = "internal", M = "unavailable", x = /** @class */ function(e) {
229
229
  /** @hideconstructor */
230
230
  function n(
231
231
  /**
@@ -246,7 +246,7 @@ e) {
246
246
  }, r;
247
247
  }
248
248
  return t(n, e), n;
249
- }(h), x = function() {
249
+ }(h), U = function() {
250
250
  var t = this;
251
251
  this.promise = new Promise((function(e, n) {
252
252
  t.resolve = e, t.reject = n;
@@ -446,7 +446,7 @@ function(t, e, n, r, i, o, a, s) {
446
446
  // for legacy reasons and should not be used frequently).
447
447
  for (var r = [], i = 0, o = t; i < o.length; i++) {
448
448
  var a = o[i];
449
- if (a.indexOf("//") >= 0) throw new U(V, "Invalid segment (" + a + "). Paths must not contain // in them.");
449
+ if (a.indexOf("//") >= 0) throw new x(V, "Invalid segment (" + a + "). Paths must not contain // in them.");
450
450
  // Strip leading and traling slashed.
451
451
  r.push.apply(r, a.split("/").filter((function(t) {
452
452
  return t.length > 0;
@@ -501,18 +501,18 @@ function(t, e, n, r, i, o, a, s) {
501
501
  */
502
502
  n.fromServerFormat = function(t) {
503
503
  for (var e = [], r = "", i = 0, o = function() {
504
- if (0 === r.length) throw new U(V, "Invalid field path (" + t + "). Paths must not be empty, begin with '.', end with '.', or contain '..'");
504
+ if (0 === r.length) throw new x(V, "Invalid field path (" + t + "). Paths must not be empty, begin with '.', end with '.', or contain '..'");
505
505
  e.push(r), r = "";
506
506
  }, a = !1; i < t.length; ) {
507
507
  var s = t[i];
508
508
  if ("\\" === s) {
509
- if (i + 1 === t.length) throw new U(V, "Path has trailing escape character: " + t);
509
+ if (i + 1 === t.length) throw new x(V, "Path has trailing escape character: " + t);
510
510
  var u = t[i + 1];
511
- if ("\\" !== u && "." !== u && "`" !== u) throw new U(V, "Path has invalid escape sequence: " + t);
511
+ if ("\\" !== u && "." !== u && "`" !== u) throw new x(V, "Path has invalid escape sequence: " + t);
512
512
  r += u, i += 2;
513
513
  } else "`" === s ? (a = !a, i++) : "." !== s || a ? (r += s, i++) : (o(), i++);
514
514
  }
515
- if (o(), a) throw new U(V, "Unterminated ` in path: " + t);
515
+ if (o(), a) throw new x(V, "Unterminated ` in path: " + t);
516
516
  return new n(e);
517
517
  }, n.emptyPath = function() {
518
518
  return new n([]);
@@ -580,7 +580,7 @@ function(t, e, n, r, i, o, a, s) {
580
580
  * limitations under the License.
581
581
  */
582
582
  function rt(t, e, n) {
583
- if (!n) throw new U(V, "Function " + t + "() cannot be called with an empty " + e + ".");
583
+ if (!n) throw new x(V, "Function " + t + "() cannot be called with an empty " + e + ".");
584
584
  }
585
585
 
586
586
  /**
@@ -591,14 +591,14 @@ function rt(t, e, n) {
591
591
  * Validates that `path` refers to a document (indicated by the fact it contains
592
592
  * an even numbers of segments).
593
593
  */ function it(t) {
594
- if (!nt.isDocumentKey(t)) throw new U(V, "Invalid document reference. Document references must have an even number of segments, but " + t + " has " + t.length + ".");
594
+ if (!nt.isDocumentKey(t)) throw new x(V, "Invalid document reference. Document references must have an even number of segments, but " + t + " has " + t.length + ".");
595
595
  }
596
596
 
597
597
  /**
598
598
  * Validates that `path` refers to a collection (indicated by the fact it
599
599
  * contains an odd numbers of segments).
600
600
  */ function ot(t) {
601
- if (nt.isDocumentKey(t)) throw new U(V, "Invalid collection reference. Collection references must have an odd number of segments, but " + t + " has " + t.length + ".");
601
+ if (nt.isDocumentKey(t)) throw new x(V, "Invalid collection reference. Collection references must have an odd number of segments, but " + t + " has " + t.length + ".");
602
602
  }
603
603
 
604
604
  /**
@@ -630,15 +630,15 @@ e) {
630
630
  // Unwrap Compat types
631
631
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
632
632
  t = t._delegate), !(t instanceof e)) {
633
- if (e.name === t.constructor.name) throw new U(V, "Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");
633
+ if (e.name === t.constructor.name) throw new x(V, "Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");
634
634
  var n = at(t);
635
- throw new U(V, "Expected type '" + e.name + "', but it was: " + n);
635
+ throw new x(V, "Expected type '" + e.name + "', but it was: " + n);
636
636
  }
637
637
  return t;
638
638
  }
639
639
 
640
640
  function ut(t, e) {
641
- if (e <= 0) throw new U(V, "Function " + t + "() requires a positive number, but it was: " + e + ".");
641
+ if (e <= 0) throw new x(V, "Function " + t + "() requires a positive number, but it was: " + e + ".");
642
642
  }
643
643
 
644
644
  /**
@@ -867,10 +867,10 @@ var mt = /** @class */ function(r) {
867
867
  return e = n.sent(), [ 3 /*break*/ , 4 ];
868
868
 
869
869
  case 3:
870
- throw a = n.sent(), new U(dt(a.status), "Request failed with error: " + a.statusText);
870
+ throw a = n.sent(), new x(dt(a.status), "Request failed with error: " + a.statusText);
871
871
 
872
872
  case 4:
873
- if (!e.ok) throw new U(dt(e.status), "Request failed with error: " + e.statusText);
873
+ if (!e.ok) throw new x(dt(e.status), "Request failed with error: " + e.statusText);
874
874
  return [ 2 /*return*/ , e.json() ];
875
875
  }
876
876
  }));
@@ -1058,11 +1058,11 @@ function gt(t, e) {
1058
1058
  * The fractions of a second at nanosecond resolution.*
1059
1059
  */
1060
1060
  e) {
1061
- if (this.seconds = t, this.nanoseconds = e, e < 0) throw new U(V, "Timestamp nanoseconds out of range: " + e);
1062
- if (e >= 1e9) throw new U(V, "Timestamp nanoseconds out of range: " + e);
1063
- if (t < -62135596800) throw new U(V, "Timestamp seconds out of range: " + t);
1061
+ if (this.seconds = t, this.nanoseconds = e, e < 0) throw new x(V, "Timestamp nanoseconds out of range: " + e);
1062
+ if (e >= 1e9) throw new x(V, "Timestamp nanoseconds out of range: " + e);
1063
+ if (t < -62135596800) throw new x(V, "Timestamp seconds out of range: " + t);
1064
1064
  // This will break in the year 10,000.
1065
- if (t >= 253402300800) throw new U(V, "Timestamp seconds out of range: " + t);
1065
+ if (t >= 253402300800) throw new x(V, "Timestamp seconds out of range: " + t);
1066
1066
  }
1067
1067
  /**
1068
1068
  * Creates a new timestamp with the current date, with millisecond precision.
@@ -1159,6 +1159,8 @@ function gt(t, e) {
1159
1159
  return new t(e);
1160
1160
  }, t.min = function() {
1161
1161
  return new t(new bt(0, 0));
1162
+ }, t.max = function() {
1163
+ return new t(new bt(253402300799, 999999999));
1162
1164
  }, t.prototype.compareTo = function(t) {
1163
1165
  return this.timestamp._compareTo(t.timestamp);
1164
1166
  }, t.prototype.isEqual = function(t) {
@@ -1651,11 +1653,11 @@ function Rt(t, e) {
1651
1653
  return !!t && "arrayValue" in t;
1652
1654
  }
1653
1655
 
1654
- /** Returns true if `value` is a NullValue. */ function Ut(t) {
1656
+ /** Returns true if `value` is a NullValue. */ function xt(t) {
1655
1657
  return !!t && "nullValue" in t;
1656
1658
  }
1657
1659
 
1658
- /** Returns true if `value` is NaN. */ function xt(t) {
1660
+ /** Returns true if `value` is NaN. */ function Ut(t) {
1659
1661
  return !!t && "doubleValue" in t && isNaN(Number(t.doubleValue));
1660
1662
  }
1661
1663
 
@@ -2396,8 +2398,8 @@ function Le(t, e) {
2396
2398
  var e = Z.fromString(t);
2397
2399
  return E(ze(e)), e;
2398
2400
  }(e);
2399
- if (r.get(1) !== t.databaseId.projectId) throw new U(V, "Tried to deserialize key from different project: " + r.get(1) + " vs " + t.databaseId.projectId);
2400
- if (r.get(3) !== t.databaseId.database) throw new U(V, "Tried to deserialize key from different database: " + r.get(3) + " vs " + t.databaseId.database);
2401
+ if (r.get(1) !== t.databaseId.projectId) throw new x(V, "Tried to deserialize key from different project: " + r.get(1) + " vs " + t.databaseId.projectId);
2402
+ if (r.get(3) !== t.databaseId.database) throw new x(V, "Tried to deserialize key from different database: " + r.get(3) + " vs " + t.databaseId.database);
2401
2403
  return new nt((E((n = r).length > 4 && "documents" === n.get(4)), n.popFirst(5)));
2402
2404
  }
2403
2405
 
@@ -2416,12 +2418,12 @@ function Me(t, e, n) {
2416
2418
  };
2417
2419
  }
2418
2420
 
2419
- function Ue(t) {
2421
+ function xe(t) {
2420
2422
  return ke[t];
2421
2423
  }
2422
2424
 
2423
2425
  // visible for testing
2424
- function xe(t) {
2426
+ function Ue(t) {
2425
2427
  return Ve[t];
2426
2428
  }
2427
2429
 
@@ -2569,7 +2571,7 @@ function ze(t) {
2569
2571
  o.K = r, o.q = i, o.J = !1, o;
2570
2572
  }
2571
2573
  return t(n, e), n.prototype.X = function() {
2572
- if (this.J) throw new U(O, "The client has already been terminated.");
2574
+ if (this.J) throw new x(O, "The client has already been terminated.");
2573
2575
  },
2574
2576
  /** Invokes the provided RPC with auth and AppCheck tokens. */ n.prototype.m = function(t, e, n) {
2575
2577
  var r = this;
@@ -2578,7 +2580,7 @@ function ze(t) {
2578
2580
  return r.K.m(t, e, n, o, a);
2579
2581
  })).catch((function(t) {
2580
2582
  throw "FirebaseError" === t.name ? (t.code === q && (r.authCredentials.invalidateToken(),
2581
- r.appCheckCredentials.invalidateToken()), t) : new U(k, t.toString());
2583
+ r.appCheckCredentials.invalidateToken()), t) : new x(k, t.toString());
2582
2584
  }));
2583
2585
  },
2584
2586
  /** Invokes the provided RPC with streamed results with auth and AppCheck tokens. */ n.prototype.T = function(t, e, n) {
@@ -2588,7 +2590,7 @@ function ze(t) {
2588
2590
  return r.K.T(t, e, n, o, a);
2589
2591
  })).catch((function(t) {
2590
2592
  throw "FirebaseError" === t.name ? (t.code === q && (r.authCredentials.invalidateToken(),
2591
- r.appCheckCredentials.invalidateToken()), t) : new U(k, t.toString());
2593
+ r.appCheckCredentials.invalidateToken()), t) : new x(k, t.toString());
2592
2594
  }));
2593
2595
  }, n.prototype.terminate = function() {
2594
2596
  this.J = !0;
@@ -2750,26 +2752,26 @@ function $e(t, r) {
2750
2752
  // visible for testing
2751
2753
  return function(t) {
2752
2754
  if ("==" /* EQUAL */ === t.op) {
2753
- if (xt(t.value)) return {
2755
+ if (Ut(t.value)) return {
2754
2756
  unaryFilter: {
2755
2757
  field: Be(t.field),
2756
2758
  op: "IS_NAN"
2757
2759
  }
2758
2760
  };
2759
- if (Ut(t.value)) return {
2761
+ if (xt(t.value)) return {
2760
2762
  unaryFilter: {
2761
2763
  field: Be(t.field),
2762
2764
  op: "IS_NULL"
2763
2765
  }
2764
2766
  };
2765
2767
  } else if ("!=" /* NOT_EQUAL */ === t.op) {
2766
- if (xt(t.value)) return {
2768
+ if (Ut(t.value)) return {
2767
2769
  unaryFilter: {
2768
2770
  field: Be(t.field),
2769
2771
  op: "IS_NOT_NAN"
2770
2772
  }
2771
2773
  };
2772
- if (Ut(t.value)) return {
2774
+ if (xt(t.value)) return {
2773
2775
  unaryFilter: {
2774
2776
  field: Be(t.field),
2775
2777
  op: "IS_NOT_NULL"
@@ -2779,7 +2781,7 @@ function $e(t, r) {
2779
2781
  return {
2780
2782
  fieldFilter: {
2781
2783
  field: Be(t.field),
2782
- op: xe(t.op),
2784
+ op: Ue(t.op),
2783
2785
  value: t.value
2784
2786
  }
2785
2787
  };
@@ -2800,7 +2802,7 @@ function $e(t, r) {
2800
2802
  return function(t) {
2801
2803
  return {
2802
2804
  field: Be(t.field),
2803
- direction: Ue(t.dir)
2805
+ direction: xe(t.dir)
2804
2806
  };
2805
2807
  }(t);
2806
2808
  }));
@@ -2868,7 +2870,7 @@ function $e(t, r) {
2868
2870
  * instance. Callers must invoke removeComponents() when the Firestore
2869
2871
  * instance is terminated.
2870
2872
  */ function Je(t) {
2871
- if (t._terminated) throw new U(O, "The client has already been terminated.");
2873
+ if (t._terminated) throw new x(O, "The client has already been terminated.");
2872
2874
  if (!Xe.has(t)) {
2873
2875
  w("ComponentProvider", "Initializing Datastore");
2874
2876
  var e = function(t) {
@@ -2910,17 +2912,17 @@ function $e(t, r) {
2910
2912
  function t(t) {
2911
2913
  var e;
2912
2914
  if (void 0 === t.host) {
2913
- if (void 0 !== t.ssl) throw new U(V, "Can't provide ssl option if host option is not set");
2915
+ if (void 0 !== t.ssl) throw new x(V, "Can't provide ssl option if host option is not set");
2914
2916
  this.host = "firestore.googleapis.com", this.ssl = !0;
2915
2917
  } else this.host = t.host, this.ssl = null === (e = t.ssl) || void 0 === e || e;
2916
2918
  if (this.credentials = t.credentials, this.ignoreUndefinedProperties = !!t.ignoreUndefinedProperties,
2917
2919
  void 0 === t.cacheSizeBytes) this.cacheSizeBytes = 41943040; else {
2918
- if (-1 !== t.cacheSizeBytes && t.cacheSizeBytes < 1048576) throw new U(V, "cacheSizeBytes must be at least 1048576");
2920
+ if (-1 !== t.cacheSizeBytes && t.cacheSizeBytes < 1048576) throw new x(V, "cacheSizeBytes must be at least 1048576");
2919
2921
  this.cacheSizeBytes = t.cacheSizeBytes;
2920
2922
  }
2921
2923
  this.experimentalForceLongPolling = !!t.experimentalForceLongPolling, this.experimentalAutoDetectLongPolling = !!t.experimentalAutoDetectLongPolling,
2922
2924
  this.useFetchStreams = !!t.useFetchStreams, function(t, e, n, r) {
2923
- if (!0 === e && !0 === r) throw new U(V, "experimentalForceLongPolling and experimentalAutoDetectLongPolling cannot be used together.");
2925
+ if (!0 === e && !0 === r) throw new x(V, "experimentalForceLongPolling and experimentalAutoDetectLongPolling cannot be used together.");
2924
2926
  }(0, t.experimentalForceLongPolling, 0, t.experimentalAutoDetectLongPolling);
2925
2927
  }
2926
2928
  return t.prototype.isEqual = function(t) {
@@ -2936,7 +2938,7 @@ function $e(t, r) {
2936
2938
  this.type = "firestore-lite", this._persistenceKey = "(lite)", this._settings = new Ze({}),
2937
2939
  this._settingsFrozen = !1, t instanceof X ? this._databaseId = t : (this._app = t,
2938
2940
  this._databaseId = function(t) {
2939
- if (!Object.prototype.hasOwnProperty.apply(t.options, [ "projectId" ])) throw new U(V, '"projectId" not provided in firebase.initializeApp.');
2941
+ if (!Object.prototype.hasOwnProperty.apply(t.options, [ "projectId" ])) throw new x(V, '"projectId" not provided in firebase.initializeApp.');
2940
2942
  return new X(t.options.projectId);
2941
2943
  }(t));
2942
2944
  }
@@ -2946,7 +2948,7 @@ function $e(t, r) {
2946
2948
  * instance.
2947
2949
  */
2948
2950
  get: function() {
2949
- if (!this._app) throw new U(O, "Firestore was not initialized using the Firebase SDK. 'app' is not available");
2951
+ if (!this._app) throw new x(O, "Firestore was not initialized using the Firebase SDK. 'app' is not available");
2950
2952
  return this._app;
2951
2953
  },
2952
2954
  enumerable: !1,
@@ -2964,7 +2966,7 @@ function $e(t, r) {
2964
2966
  enumerable: !1,
2965
2967
  configurable: !0
2966
2968
  }), t.prototype._setSettings = function(t) {
2967
- if (this._settingsFrozen) throw new U(O, "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.");
2969
+ if (this._settingsFrozen) throw new x(O, "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.");
2968
2970
  this._settings = new Ze(t), void 0 !== t.credentials && (this._authCredentials = function(t) {
2969
2971
  if (!t) return new G;
2970
2972
  switch (t.type) {
@@ -2978,7 +2980,7 @@ function $e(t, r) {
2978
2980
  return t.client;
2979
2981
 
2980
2982
  default:
2981
- throw new U(V, "makeAuthCredentialsProvider failed due to invalid credential type");
2983
+ throw new x(V, "makeAuthCredentialsProvider failed due to invalid credential type");
2982
2984
  }
2983
2985
  }(t.credentials));
2984
2986
  }, t.prototype._getSettings = function() {
@@ -3031,7 +3033,7 @@ function $e(t, r) {
3031
3033
  * Do not call this constructor directly. Instead, use {@link getFirestore}.
3032
3034
  */ function en(t, e) {
3033
3035
  var n = _getProvider(t, "firestore/lite");
3034
- if (n.isInitialized()) throw new U(O, "Firestore can only be initialized once per app.");
3036
+ if (n.isInitialized()) throw new x(O, "Firestore can only be initialized once per app.");
3035
3037
  return n.initialize({
3036
3038
  options: e
3037
3039
  });
@@ -3076,7 +3078,7 @@ function $e(t, r) {
3076
3078
  // invalid field "uid" and missing field "sub" / "user_id".)
3077
3079
  a = d(r.mockUserToken, null === (i = t._app) || void 0 === i ? void 0 : i.options.projectId);
3078
3080
  var u = r.mockUserToken.sub || r.mockUserToken.user_id;
3079
- if (!u) throw new U(V, "mockUserToken must contain 'sub' or 'user_id' field!");
3081
+ if (!u) throw new x(V, "mockUserToken must contain 'sub' or 'user_id' field!");
3080
3082
  s = new m(u);
3081
3083
  }
3082
3084
  t._authCredentials = new z(new B(a, s));
@@ -3256,7 +3258,7 @@ var an = /** @class */ function() {
3256
3258
  var o = Z.fromString.apply(Z, r([ e ], n));
3257
3259
  return ot(o), new un(t, /* converter= */ null, o);
3258
3260
  }
3259
- if (!(t instanceof an || t instanceof un)) throw new U(V, "Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");
3261
+ if (!(t instanceof an || t instanceof un)) throw new x(V, "Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");
3260
3262
  var a = t._path.child(Z.fromString.apply(Z, r([ e ], n)));
3261
3263
  return ot(a), new un(t.firestore,
3262
3264
  /* converter= */ null, a);
@@ -3275,7 +3277,7 @@ var an = /** @class */ function() {
3275
3277
  * will be included. Cannot contain a slash.
3276
3278
  * @returns The created `Query`.
3277
3279
  */ function ln(t, e) {
3278
- if (t = st(t, tn), rt("collectionGroup", "collection id", e), e.indexOf("/") >= 0) throw new U(V, "Invalid collection ID '" + e + "' passed to function collectionGroup(). Collection IDs must not contain '/'.");
3280
+ if (t = st(t, tn), rt("collectionGroup", "collection id", e), e.indexOf("/") >= 0) throw new x(V, "Invalid collection ID '" + e + "' passed to function collectionGroup(). Collection IDs must not contain '/'.");
3279
3281
  return new sn(t,
3280
3282
  /* converter= */ null,
3281
3283
  /**
@@ -3297,7 +3299,7 @@ function fn(t, e) {
3297
3299
  return it(o), new an(t,
3298
3300
  /* converter= */ null, new nt(o));
3299
3301
  }
3300
- if (!(t instanceof an || t instanceof un)) throw new U(V, "Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");
3302
+ if (!(t instanceof an || t instanceof un)) throw new x(V, "Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");
3301
3303
  var a = t._path.child(Z.fromString.apply(Z, r([ e ], n)));
3302
3304
  return it(a), new an(t.firestore, t instanceof un ? t.converter : null, new nt(a));
3303
3305
  }
@@ -3370,7 +3372,7 @@ var dn = /** @class */ function() {
3370
3372
  */
3371
3373
  function t() {
3372
3374
  for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
3373
- for (var n = 0; n < t.length; ++n) if (0 === t[n].length) throw new U(V, "Invalid field name at argument $(i + 1). Field names must not be empty.");
3375
+ for (var n = 0; n < t.length; ++n) if (0 === t[n].length) throw new x(V, "Invalid field name at argument $(i + 1). Field names must not be empty.");
3374
3376
  this._internalPath = new et(t);
3375
3377
  }
3376
3378
  /**
@@ -3422,7 +3424,7 @@ var dn = /** @class */ function() {
3422
3424
  try {
3423
3425
  return new t(It.fromBase64String(e));
3424
3426
  } catch (e) {
3425
- throw new U(V, "Failed to construct data from Base64 string: " + e);
3427
+ throw new x(V, "Failed to construct data from Base64 string: " + e);
3426
3428
  }
3427
3429
  },
3428
3430
  /**
@@ -3481,8 +3483,8 @@ function(t) {
3481
3483
  * @param longitude - The longitude as number between -180 and 180.
3482
3484
  */
3483
3485
  function t(t, e) {
3484
- if (!isFinite(t) || t < -90 || t > 90) throw new U(V, "Latitude must be a number between -90 and 90, but was: " + t);
3485
- if (!isFinite(e) || e < -180 || e > 180) throw new U(V, "Longitude must be a number between -180 and 180, but was: " + e);
3486
+ if (!isFinite(t) || t < -90 || t > 90) throw new x(V, "Latitude must be a number between -90 and 90, but was: " + t);
3487
+ if (!isFinite(e) || e < -180 || e > 180) throw new x(V, "Longitude must be a number between -180 and 180, but was: " + e);
3486
3488
  this._lat = t, this._long = e;
3487
3489
  }
3488
3490
  return Object.defineProperty(t.prototype, "latitude", {
@@ -3689,8 +3691,8 @@ function(t) {
3689
3691
  var s, u, c = jn(r, a);
3690
3692
  if (o.merge) s = new Et(a.fieldMask), u = a.fieldTransforms; else if (o.mergeFields) {
3691
3693
  for (var l = [], f = 0, h = o.mergeFields; f < h.length; f++) {
3692
- var p = Un(e, h[f], n);
3693
- if (!a.contains(p)) throw new U(V, "Field '" + p + "' is specified in your field mask but missing from your input data.");
3694
+ var p = xn(e, h[f], n);
3695
+ if (!a.contains(p)) throw new x(V, "Field '" + p + "' is specified in your field mask but missing from your input data.");
3694
3696
  zn(l, p) || l.push(p);
3695
3697
  }
3696
3698
  s = new Et(l), u = a.fieldTransforms.filter((function(t) {
@@ -3813,9 +3815,9 @@ var Dn = /** @class */ function(e) {
3813
3815
  }
3814
3816
 
3815
3817
  /** Parse update data from a list of field/value arguments. */ function On(t, e, n, r, i, o) {
3816
- var a = t.ht(1 /* Update */ , e, n), s = [ Un(e, r, n) ], u = [ i ];
3817
- if (o.length % 2 != 0) throw new U(V, "Function " + e + "() needs to be called with an even number of arguments that alternate between field names and values.");
3818
- for (var c = 0; c < o.length; c += 2) s.push(Un(e, o[c])), u.push(o[c + 1]);
3818
+ var a = t.ht(1 /* Update */ , e, n), s = [ xn(e, r, n) ], u = [ i ];
3819
+ if (o.length % 2 != 0) throw new x(V, "Function " + e + "() needs to be called with an even number of arguments that alternate between field names and values.");
3820
+ for (var c = 0; c < o.length; c += 2) s.push(xn(e, o[c])), u.push(o[c + 1]);
3819
3821
  // We iterate in reverse order to pick the last value for a field if the
3820
3822
  // user specified the field multiple times.
3821
3823
  for (var l = [], f = zt.empty(), h = s.length - 1; h >= 0; --h) if (!zn(l, s[h])) {
@@ -3987,7 +3989,7 @@ function Mn(t, e, n) {
3987
3989
 
3988
3990
  /**
3989
3991
  * Helper that calls fromDotSeparatedString() but wraps any error thrown.
3990
- */ function Un(t, e, n) {
3992
+ */ function xn(t, e, n) {
3991
3993
  if (
3992
3994
  // If required, replace the FieldPath Compat class with with the firestore-exp
3993
3995
  // FieldPath.
@@ -4000,7 +4002,7 @@ function Mn(t, e, n) {
4000
4002
 
4001
4003
  /**
4002
4004
  * Matches any characters in a field path string that are reserved.
4003
- */ var xn = new RegExp("[~\\*/\\[\\]]");
4005
+ */ var Un = new RegExp("[~\\*/\\[\\]]");
4004
4006
 
4005
4007
  /**
4006
4008
  * Wraps fromDotSeparatedString with an error message about the method that
@@ -4011,7 +4013,7 @@ function Mn(t, e, n) {
4011
4013
  * @param targetDoc - The document against which the field path will be
4012
4014
  * evaluated.
4013
4015
  */ function Bn(t, e, n) {
4014
- if (e.search(xn) >= 0) throw Gn("Invalid field path (" + e + "). Paths must not contain '~', '*', '/', '[', or ']'", t,
4016
+ if (e.search(Un) >= 0) throw Gn("Invalid field path (" + e + "). Paths must not contain '~', '*', '/', '[', or ']'", t,
4015
4017
  /* hasConverter= */ !1,
4016
4018
  /* path= */ void 0, n);
4017
4019
  try {
@@ -4028,7 +4030,7 @@ function Gn(t, e, n, r, i) {
4028
4030
  n && (s += " (via `toFirestore()`)");
4029
4031
  var u = "";
4030
4032
  return (o || a) && (u += " (found", o && (u += " in field " + r), a && (u += " in document " + i),
4031
- u += ")"), new U(V, (s += ". ") + t + u)
4033
+ u += ")"), new x(V, (s += ". ") + t + u)
4032
4034
  /** Checks `haystack` if FieldPath `needle` is present. Runs in O(n). */;
4033
4035
  }
4034
4036
 
@@ -4261,7 +4263,7 @@ var Jn = /** @class */ function(e) {
4261
4263
  var e = In(t.firestore), n = function(t, e, n, r, i, o, a) {
4262
4264
  var s;
4263
4265
  if (i.isKeyField()) {
4264
- if ("array-contains" /* ARRAY_CONTAINS */ === o || "array-contains-any" /* ARRAY_CONTAINS_ANY */ === o) throw new U(V, "Invalid Query. You can't perform '" + o + "' queries on documentId().");
4266
+ if ("array-contains" /* ARRAY_CONTAINS */ === o || "array-contains-any" /* ARRAY_CONTAINS_ANY */ === o) throw new x(V, "Invalid Query. You can't perform '" + o + "' queries on documentId().");
4265
4267
  if ("in" /* IN */ === o || "not-in" /* NOT_IN */ === o) {
4266
4268
  pr(a, o);
4267
4269
  for (var u = [], c = 0, l = a; c < l.length; c++) {
@@ -4281,7 +4283,7 @@ var Jn = /** @class */ function(e) {
4281
4283
  return function(t, e) {
4282
4284
  if (e.N()) {
4283
4285
  var n = le(t);
4284
- if (null !== n && !n.isEqual(e.field)) throw new U(V, "Invalid query. All where filters with an inequality (<, <=, !=, not-in, >, or >=) must be on the same field. But you have inequality filters on '" + n.toString() + "' and '" + e.field.toString() + "'");
4286
+ if (null !== n && !n.isEqual(e.field)) throw new x(V, "Invalid query. All where filters with an inequality (<, <=, !=, not-in, >, or >=) must be on the same field. But you have inequality filters on '" + n.toString() + "' and '" + e.field.toString() + "'");
4285
4287
  var r = ce(t);
4286
4288
  null !== r && dr(t, e.field, r);
4287
4289
  }
@@ -4327,7 +4329,7 @@ var Jn = /** @class */ function(e) {
4327
4329
  }(e.op));
4328
4330
  if (null !== i)
4329
4331
  // Special case when it's a duplicate op to give a slightly clearer error message.
4330
- throw i === e.op ? new U(V, "Invalid query. You cannot use more than one '" + e.op.toString() + "' filter.") : new U(V, "Invalid query. You cannot use '" + e.op.toString() + "' filters with '" + i.toString() + "' filters.");
4332
+ throw i === e.op ? new x(V, "Invalid query. You cannot use more than one '" + e.op.toString() + "' filter.") : new x(V, "Invalid query. You cannot use '" + e.op.toString() + "' filters with '" + i.toString() + "' filters.");
4331
4333
  }(t, h), h;
4332
4334
  }(t._query, 0, e, t.firestore._databaseId, this.dt, this.wt, this.yt);
4333
4335
  return new sn(t.firestore, t.converter, function(t, e) {
@@ -4359,8 +4361,8 @@ var tr = /** @class */ function(e) {
4359
4361
  }
4360
4362
  return t(n, e), n.prototype._apply = function(t) {
4361
4363
  var e = function(t, e, n) {
4362
- if (null !== t.startAt) throw new U(V, "Invalid query. You must not call startAt() or startAfter() before calling orderBy().");
4363
- if (null !== t.endAt) throw new U(V, "Invalid query. You must not call endAt() or endBefore() before calling orderBy().");
4364
+ if (null !== t.startAt) throw new x(V, "Invalid query. You must not call startAt() or startAfter() before calling orderBy().");
4365
+ if (null !== t.endAt) throw new x(V, "Invalid query. You must not call endAt() or endBefore() before calling orderBy().");
4364
4366
  var r = new ie(e, n);
4365
4367
  return function(t, e) {
4366
4368
  if (null === ce(t)) {
@@ -4477,7 +4479,7 @@ function lr() {
4477
4479
 
4478
4480
  /** Helper function to create a bound from a document or fields */ function fr(t, e, n, r) {
4479
4481
  if (n[0] = p(n[0]), n[0] instanceof Qn) return function(t, e, n, r, i) {
4480
- if (!r) throw new U(P, "Can't use a DocumentSnapshot that doesn't exist for " + n + "().");
4482
+ if (!r) throw new x(P, "Can't use a DocumentSnapshot that doesn't exist for " + n + "().");
4481
4483
  // Because people expect to continue/end a query at the exact document
4482
4484
  // provided, we need to use the implicit sort order rather than the explicit
4483
4485
  // sort order, because it's guaranteed to contain the document key. That way
@@ -4489,10 +4491,10 @@ function lr() {
4489
4491
  var u = s[a];
4490
4492
  if (u.field.isKeyField()) o.push(Rt(e, r.key)); else {
4491
4493
  var c = r.data.field(u.field);
4492
- if (Pt(c)) throw new U(V, 'Invalid query. You are trying to start or end a query using a document for which the field "' + u.field + '" is an uncommitted server timestamp. (Since the value of this field is unknown, you cannot start/end a query with it.)');
4494
+ if (Pt(c)) throw new x(V, 'Invalid query. You are trying to start or end a query using a document for which the field "' + u.field + '" is an uncommitted server timestamp. (Since the value of this field is unknown, you cannot start/end a query with it.)');
4493
4495
  if (null === c) {
4494
4496
  var l = u.field.canonicalString();
4495
- throw new U(V, "Invalid query. You are trying to start or end a query using a document for which the field '" + l + "' (used as the orderBy) does not exist.");
4497
+ throw new x(V, "Invalid query. You are trying to start or end a query using a document for which the field '" + l + "' (used as the orderBy) does not exist.");
4496
4498
  }
4497
4499
  o.push(c);
4498
4500
  }
@@ -4503,14 +4505,14 @@ function lr() {
4503
4505
  return function(t, e, n, r, i, o) {
4504
4506
  // Use explicit order by's because it has to match the query the user made
4505
4507
  var a = t.explicitOrderBy;
4506
- if (i.length > a.length) throw new U(V, "Too many arguments provided to " + r + "(). The number of arguments must be less than or equal to the number of orderBy() clauses");
4508
+ if (i.length > a.length) throw new x(V, "Too many arguments provided to " + r + "(). The number of arguments must be less than or equal to the number of orderBy() clauses");
4507
4509
  for (var s = [], u = 0; u < i.length; u++) {
4508
4510
  var c = i[u];
4509
4511
  if (a[u].field.isKeyField()) {
4510
- if ("string" != typeof c) throw new U(V, "Invalid query. Expected a string for document ID in " + r + "(), but got a " + typeof c);
4511
- if (!fe(t) && -1 !== c.indexOf("/")) throw new U(V, "Invalid query. When querying a collection and ordering by documentId(), the value passed to " + r + "() must be a plain document ID, but '" + c + "' contains a slash.");
4512
+ if ("string" != typeof c) throw new x(V, "Invalid query. Expected a string for document ID in " + r + "(), but got a " + typeof c);
4513
+ if (!fe(t) && -1 !== c.indexOf("/")) throw new x(V, "Invalid query. When querying a collection and ordering by documentId(), the value passed to " + r + "() must be a plain document ID, but '" + c + "' contains a slash.");
4512
4514
  var l = t.path.child(Z.fromString(c));
4513
- if (!nt.isDocumentKey(l)) throw new U(V, "Invalid query. When querying a collection group and ordering by documentId(), the value passed to " + r + "() must result in a valid document path, but '" + l + "' is not because it contains an odd number of segments.");
4515
+ if (!nt.isDocumentKey(l)) throw new x(V, "Invalid query. When querying a collection group and ordering by documentId(), the value passed to " + r + "() must result in a valid document path, but '" + l + "' is not because it contains an odd number of segments.");
4514
4516
  var f = new nt(l);
4515
4517
  s.push(Rt(e, f));
4516
4518
  } else {
@@ -4524,26 +4526,26 @@ function lr() {
4524
4526
 
4525
4527
  function hr(t, e, n) {
4526
4528
  if ("string" == typeof (n = p(n))) {
4527
- if ("" === n) throw new U(V, "Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.");
4528
- if (!fe(e) && -1 !== n.indexOf("/")) throw new U(V, "Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '" + n + "' contains a '/' character.");
4529
+ if ("" === n) throw new x(V, "Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.");
4530
+ if (!fe(e) && -1 !== n.indexOf("/")) throw new x(V, "Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '" + n + "' contains a '/' character.");
4529
4531
  var r = e.path.child(Z.fromString(n));
4530
- if (!nt.isDocumentKey(r)) throw new U(V, "Invalid query. When querying a collection group by documentId(), the value provided must result in a valid document path, but '" + r + "' is not because it has an odd number of segments (" + r.length + ").");
4532
+ if (!nt.isDocumentKey(r)) throw new x(V, "Invalid query. When querying a collection group by documentId(), the value provided must result in a valid document path, but '" + r + "' is not because it has an odd number of segments (" + r.length + ").");
4531
4533
  return Rt(t, new nt(r));
4532
4534
  }
4533
4535
  if (n instanceof an) return Rt(t, n._key);
4534
- throw new U(V, "Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: " + at(n) + ".");
4536
+ throw new x(V, "Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: " + at(n) + ".");
4535
4537
  }
4536
4538
 
4537
4539
  /**
4538
4540
  * Validates that the value passed into a disjunctive filter satisfies all
4539
4541
  * array requirements.
4540
4542
  */ function pr(t, e) {
4541
- if (!Array.isArray(t) || 0 === t.length) throw new U(V, "Invalid Query. A non-empty array is required for '" + e.toString() + "' filters.");
4542
- if (t.length > 10) throw new U(V, "Invalid Query. '" + e.toString() + "' filters support a maximum of 10 elements in the value array.");
4543
+ if (!Array.isArray(t) || 0 === t.length) throw new x(V, "Invalid Query. A non-empty array is required for '" + e.toString() + "' filters.");
4544
+ if (t.length > 10) throw new x(V, "Invalid Query. '" + e.toString() + "' filters support a maximum of 10 elements in the value array.");
4543
4545
  }
4544
4546
 
4545
4547
  function dr(t, e, n) {
4546
- if (!n.isEqual(e)) throw new U(V, "Invalid query. You have a where filter with an inequality (<, <=, !=, not-in, >, or >=) on field '" + e.toString() + "' and so you must also use '" + e.toString() + "' as your first argument to orderBy(), but your first orderBy() is on field '" + n.toString() + "' instead.");
4548
+ if (!n.isEqual(e)) throw new x(V, "Invalid query. You have a where filter with an inequality (<, <=, !=, not-in, >, or >=) on field '" + e.toString() + "' and so you must also use '" + e.toString() + "' as your first argument to orderBy(), but your first orderBy() is on field '" + n.toString() + "' instead.");
4547
4549
  }
4548
4550
 
4549
4551
  /**
@@ -4722,7 +4724,7 @@ var yr = /** @class */ function(e) {
4722
4724
  * @returns A Promise that will be resolved with the results of the query.
4723
4725
  */ function gr(t) {
4724
4726
  !function(t) {
4725
- if (ue(t) && 0 === t.explicitOrderBy.length) throw new U(j, "limitToLast() queries require specifying at least one orderBy() clause");
4727
+ if (ue(t) && 0 === t.explicitOrderBy.length) throw new x(j, "limitToLast() queries require specifying at least one orderBy() clause");
4726
4728
  }((t = st(t, sn))._query);
4727
4729
  var e = Je(t.firestore), n = new yr(t.firestore);
4728
4730
  return $e(e, t._query).then((function(e) {
@@ -4942,12 +4944,12 @@ function br(t, e, n) {
4942
4944
  t.prototype.commit = function() {
4943
4945
  return this._verifyNotCommitted(), this._committed = !0, this._mutations.length > 0 ? this._commitHandler(this._mutations) : Promise.resolve();
4944
4946
  }, t.prototype._verifyNotCommitted = function() {
4945
- if (this._committed) throw new U(O, "A write batch can no longer be used after commit() has been called.");
4947
+ if (this._committed) throw new x(O, "A write batch can no longer be used after commit() has been called.");
4946
4948
  }, t;
4947
4949
  }();
4948
4950
 
4949
4951
  function Dr(t, e) {
4950
- if ((t = p(t)).firestore !== e) throw new U(V, "Provided document reference is from a different Firestore instance.");
4952
+ if ((t = p(t)).firestore !== e) throw new x(V, "Provided document reference is from a different Firestore instance.");
4951
4953
  return t;
4952
4954
  }
4953
4955
 
@@ -5013,7 +5015,7 @@ function Dr(t, e) {
5013
5015
  return n(this, (function(n) {
5014
5016
  switch (n.label) {
5015
5017
  case 0:
5016
- if (this.ensureCommitNotCalled(), this.mutations.length > 0) throw new U(V, "Firestore transactions require all reads to be executed before all writes.");
5018
+ if (this.ensureCommitNotCalled(), this.mutations.length > 0) throw new x(V, "Firestore transactions require all reads to be executed before all writes.");
5017
5019
  return [ 4 /*yield*/ , Ye(this.datastore, t) ];
5018
5020
 
5019
5021
  case 1:
@@ -5070,7 +5072,7 @@ function Dr(t, e) {
5070
5072
  if (n) {
5071
5073
  if (!e.isEqual(n))
5072
5074
  // This transaction will fail no matter what.
5073
- throw new U(C, "Document version changed between two reads.");
5075
+ throw new x(C, "Document version changed between two reads.");
5074
5076
  } else this.readVersions.set(t.key.toString(), e);
5075
5077
  },
5076
5078
  /**
@@ -5099,7 +5101,7 @@ function Dr(t, e) {
5099
5101
  // express that to the backend, we have to validate locally.
5100
5102
  // Note: this can change once we can send separate verify writes in the
5101
5103
  // transaction.
5102
- throw new U(V, "Can't update a document that doesn't exist.");
5104
+ throw new x(V, "Can't update a document that doesn't exist.");
5103
5105
  // Document exists, base precondition on document update time.
5104
5106
  return _e.updateTime(e);
5105
5107
  }
@@ -5270,7 +5272,7 @@ function Dr(t, e) {
5270
5272
  */ var Or = /** @class */ function() {
5271
5273
  function t(t, e, n, r, i) {
5272
5274
  this.asyncQueue = t, this.timerId = e, this.targetTimeMs = n, this.op = r, this.removalCallback = i,
5273
- this.deferred = new x, this.then = this.deferred.promise.then.bind(this.deferred.promise),
5275
+ this.deferred = new U, this.then = this.deferred.promise.then.bind(this.deferred.promise),
5274
5276
  // It's normal for the deferred promise to be canceled (due to cancellation)
5275
5277
  // and so we attach a dummy catch callback to avoid
5276
5278
  // 'UnhandledPromiseRejectionWarning' log spam.
@@ -5319,7 +5321,7 @@ function Dr(t, e) {
5319
5321
  * guarantee that the operation will not be run.
5320
5322
  */
5321
5323
  t.prototype.cancel = function(t) {
5322
- null !== this.timerHandle && (this.clearTimeout(), this.deferred.reject(new U(A, "Operation cancelled" + (t ? ": " + t : ""))));
5324
+ null !== this.timerHandle && (this.clearTimeout(), this.deferred.reject(new x(A, "Operation cancelled" + (t ? ": " + t : ""))));
5323
5325
  }, t.prototype.handleDelayElapsed = function() {
5324
5326
  var t = this;
5325
5327
  this.asyncQueue.enqueueAndForget((function() {
@@ -5398,7 +5400,7 @@ function Dr(t, e) {
5398
5400
  // Create a deferred Promise that we can return to the callee. This
5399
5401
  // allows us to return a "hanging Promise" only to the callee and still
5400
5402
  // advance the queue even when the operation is not run.
5401
- var n = new x;
5403
+ var n = new U;
5402
5404
  return this.Ut((function() {
5403
5405
  return e.$t && e.qt ? Promise.resolve() : (t().then(n.resolve, n.reject), n.promise);
5404
5406
  })).then((function() {
@@ -5637,7 +5639,7 @@ function Dr(t, e) {
5637
5639
  * rejected promise with the corresponding failure error is returned.
5638
5640
  */
5639
5641
  function jr(t, e) {
5640
- var n = Je(t = st(t, tn)), r = new x;
5642
+ var n = Je(t = st(t, tn)), r = new U;
5641
5643
  return new qr(new Cr, n, (function(n) {
5642
5644
  return e(new Lr(t, n));
5643
5645
  }), r).run(), r.promise
@@ -5656,7 +5658,7 @@ y = i + "_lite", o(new c("firestore/lite", (function(t, e) {
5656
5658
  return n && i._setSettings(n), i;
5657
5659
  }), "PUBLIC")),
5658
5660
  // RUNTIME_ENV and BUILD_TARGET are replaced by real values during the compilation
5659
- a("firestore-lite", "3.4.6", ""), a("firestore-lite", "3.4.6", "esm5");
5661
+ a("firestore-lite", "3.4.7-canary.05dc9d6a0", ""), a("firestore-lite", "3.4.7-canary.05dc9d6a0", "esm5");
5660
5662
 
5661
- export { yn as Bytes, un as CollectionReference, an as DocumentReference, Qn as DocumentSnapshot, dn as FieldPath, vn as FieldValue, tn as Firestore, U as FirestoreError, gn as GeoPoint, sn as Query, $n as QueryConstraint, Kn as QueryDocumentSnapshot, Hn as QuerySnapshot, bt as Timestamp, Lr as Transaction, Vr as WriteBatch, Tr as addDoc, Ar as arrayRemove, Ir as arrayUnion, cn as collection, ln as collectionGroup, rn as connectFirestoreEmulator, _r as deleteDoc, Sr as deleteField, fn as doc, mn as documentId, lr as endAt, cr as endBefore, vr as getDoc, gr as getDocs, nn as getFirestore, kr as increment, en as initializeFirestore, rr as limit, ir as limitToLast, er as orderBy, Xn as query, pn as queryEqual, hn as refEqual, jr as runTransaction, Er as serverTimestamp, wr as setDoc, g as setLogLevel, Wn as snapshotEqual, sr as startAfter, ar as startAt, on as terminate, br as updateDoc, Zn as where, Pr as writeBatch };
5663
+ export { yn as Bytes, un as CollectionReference, an as DocumentReference, Qn as DocumentSnapshot, dn as FieldPath, vn as FieldValue, tn as Firestore, x as FirestoreError, gn as GeoPoint, sn as Query, $n as QueryConstraint, Kn as QueryDocumentSnapshot, Hn as QuerySnapshot, bt as Timestamp, Lr as Transaction, Vr as WriteBatch, Tr as addDoc, Ar as arrayRemove, Ir as arrayUnion, cn as collection, ln as collectionGroup, rn as connectFirestoreEmulator, _r as deleteDoc, Sr as deleteField, fn as doc, mn as documentId, lr as endAt, cr as endBefore, vr as getDoc, gr as getDocs, nn as getFirestore, kr as increment, en as initializeFirestore, rr as limit, ir as limitToLast, er as orderBy, Xn as query, pn as queryEqual, hn as refEqual, jr as runTransaction, Er as serverTimestamp, wr as setDoc, g as setLogLevel, Wn as snapshotEqual, sr as startAfter, ar as startAt, on as terminate, br as updateDoc, Zn as where, Pr as writeBatch };
5662
5664
  //# sourceMappingURL=index.browser.esm5.js.map