@firebase/firestore 3.4.8-canary.69baecadd → 3.4.8-canary.6ceff4db0

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 (65) hide show
  1. package/dist/firestore/lite/index.d.ts +1 -0
  2. package/dist/firestore/src/api/transaction.d.ts +2 -1
  3. package/dist/firestore/src/api/transaction_options.d.ts +17 -0
  4. package/dist/firestore/src/api.d.ts +1 -0
  5. package/dist/firestore/src/core/firestore_client.d.ts +2 -1
  6. package/dist/firestore/src/core/transaction_options.d.ts +25 -0
  7. package/dist/firestore/src/core/transaction_runner.d.ts +3 -2
  8. package/dist/firestore/src/lite-api/transaction.d.ts +2 -1
  9. package/dist/firestore/src/lite-api/transaction_options.d.ts +23 -0
  10. package/dist/index.d.ts +24 -1
  11. package/dist/index.esm2017.js +95 -71
  12. package/dist/index.esm2017.js.map +1 -1
  13. package/dist/index.esm5.js +105 -82
  14. package/dist/index.esm5.js.map +1 -1
  15. package/dist/index.node.cjs.js +36 -9
  16. package/dist/index.node.cjs.js.map +1 -1
  17. package/dist/index.node.mjs +36 -9
  18. package/dist/index.node.mjs.map +1 -1
  19. package/dist/index.rn.js +241 -217
  20. package/dist/index.rn.js.map +1 -1
  21. package/dist/internal.d.ts +25 -1
  22. package/dist/lite/firestore/lite/index.d.ts +1 -0
  23. package/dist/lite/firestore/src/api/transaction.d.ts +2 -1
  24. package/dist/lite/firestore/src/api/transaction_options.d.ts +17 -0
  25. package/dist/lite/firestore/src/api.d.ts +1 -0
  26. package/dist/lite/firestore/src/core/firestore_client.d.ts +2 -1
  27. package/dist/lite/firestore/src/core/transaction_options.d.ts +25 -0
  28. package/dist/lite/firestore/src/core/transaction_runner.d.ts +3 -2
  29. package/dist/lite/firestore/src/lite-api/transaction.d.ts +2 -1
  30. package/dist/lite/firestore/src/lite-api/transaction_options.d.ts +23 -0
  31. package/dist/lite/index.browser.esm2017.js +180 -157
  32. package/dist/lite/index.browser.esm2017.js.map +1 -1
  33. package/dist/lite/index.browser.esm5.js +112 -110
  34. package/dist/lite/index.browser.esm5.js.map +1 -1
  35. package/dist/lite/index.d.ts +24 -1
  36. package/dist/lite/index.node.cjs.js +34 -7
  37. package/dist/lite/index.node.cjs.js.map +1 -1
  38. package/dist/lite/index.node.mjs +34 -7
  39. package/dist/lite/index.node.mjs.map +1 -1
  40. package/dist/lite/index.rn.esm2017.js +204 -181
  41. package/dist/lite/index.rn.esm2017.js.map +1 -1
  42. package/dist/lite/internal.d.ts +25 -1
  43. package/dist/lite/packages/firestore/dist/lite/index.browser.esm2017.d.ts +13 -13
  44. package/dist/lite/packages/firestore/lite/index.d.ts +1 -0
  45. package/dist/lite/packages/firestore/src/api/transaction.d.ts +2 -1
  46. package/dist/lite/packages/firestore/src/api/transaction_options.d.ts +17 -0
  47. package/dist/lite/packages/firestore/src/api.d.ts +1 -0
  48. package/dist/lite/packages/firestore/src/core/firestore_client.d.ts +2 -1
  49. package/dist/lite/packages/firestore/src/core/transaction_options.d.ts +25 -0
  50. package/dist/lite/packages/firestore/src/core/transaction_runner.d.ts +3 -2
  51. package/dist/lite/packages/firestore/src/lite-api/transaction.d.ts +2 -1
  52. package/dist/lite/packages/firestore/src/lite-api/transaction_options.d.ts +23 -0
  53. package/dist/lite/private.d.ts +25 -1
  54. package/dist/packages/firestore/dist/index.esm2017.d.ts +30 -29
  55. package/dist/packages/firestore/lite/index.d.ts +1 -0
  56. package/dist/packages/firestore/src/api/transaction.d.ts +2 -1
  57. package/dist/packages/firestore/src/api/transaction_options.d.ts +17 -0
  58. package/dist/packages/firestore/src/api.d.ts +1 -0
  59. package/dist/packages/firestore/src/core/firestore_client.d.ts +2 -1
  60. package/dist/packages/firestore/src/core/transaction_options.d.ts +25 -0
  61. package/dist/packages/firestore/src/core/transaction_runner.d.ts +3 -2
  62. package/dist/packages/firestore/src/lite-api/transaction.d.ts +2 -1
  63. package/dist/packages/firestore/src/lite-api/transaction_options.d.ts +23 -0
  64. package/dist/private.d.ts +25 -1
  65. package/package.json +10 -10
@@ -66,7 +66,7 @@ C.MOCK_USER = new C("mock-user");
66
66
  * See the License for the specific language governing permissions and
67
67
  * limitations under the License.
68
68
  */
69
- let x = "9.7.0-canary.69baecadd";
69
+ let x = "9.7.0-canary.6ceff4db0";
70
70
 
71
71
  /**
72
72
  * @license
@@ -15538,11 +15538,10 @@ class Oa {
15538
15538
  /**
15539
15539
  * TransactionRunner encapsulates the logic needed to run and retry transactions
15540
15540
  * with backoff.
15541
- */
15542
- class Fa {
15543
- constructor(t, e, n, s) {
15544
- this.asyncQueue = t, this.datastore = e, this.updateFunction = n, this.deferred = s,
15545
- this.xa = 5, this.No = new Wo(this.asyncQueue, "transaction_retry" /* TransactionRetry */);
15541
+ */ class Fa {
15542
+ constructor(t, e, n, s, i) {
15543
+ this.asyncQueue = t, this.datastore = e, this.options = n, this.updateFunction = s,
15544
+ this.deferred = i, this.xa = n.maxAttempts, this.No = new Wo(this.asyncQueue, "transaction_retry" /* TransactionRetry */);
15546
15545
  }
15547
15546
  /** Runs the transaction and sets the result on deferred. */ run() {
15548
15547
  this.xa -= 1, this.Na();
@@ -15863,14 +15862,14 @@ function tc(t, e) {
15863
15862
  * accessed with the transaction will not reflect local changes that have not
15864
15863
  * been committed. For this reason, it is required that all reads are
15865
15864
  * performed before any writes. Transactions must be performed while online.
15866
- */ function ec(t, e) {
15867
- const n = new j;
15865
+ */ function ec(t, e, n) {
15866
+ const s = new j;
15868
15867
  return t.asyncQueue.enqueueAndForget((async () => {
15869
- const s = await function(t) {
15868
+ const i = await function(t) {
15870
15869
  return qa(t).then((t => t.datastore));
15871
15870
  }(t);
15872
- new Fa(t.asyncQueue, s, e, n).run();
15873
- })), n.promise;
15871
+ new Fa(t.asyncQueue, i, n, e, s).run();
15872
+ })), s.promise;
15874
15873
  }
15875
15874
 
15876
15875
  function nc(t, e, n, s) {
@@ -18449,6 +18448,25 @@ function zh(t, e, n) {
18449
18448
  if (!n.isEqual(e)) throw new Q(G.INVALID_ARGUMENT, `Invalid query. You have a where filter with an inequality (<, <=, !=, not-in, >, or >=) on field '${e.toString()}' and so you must also use '${e.toString()}' as your first argument to orderBy(), but your first orderBy() is on field '${n.toString()}' instead.`);
18450
18449
  }
18451
18450
 
18451
+ /**
18452
+ * @license
18453
+ * Copyright 2022 Google LLC
18454
+ *
18455
+ * Licensed under the Apache License, Version 2.0 (the "License");
18456
+ * you may not use this file except in compliance with the License.
18457
+ * You may obtain a copy of the License at
18458
+ *
18459
+ * http://www.apache.org/licenses/LICENSE-2.0
18460
+ *
18461
+ * Unless required by applicable law or agreed to in writing, software
18462
+ * distributed under the License is distributed on an "AS IS" BASIS,
18463
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18464
+ * See the License for the specific language governing permissions and
18465
+ * limitations under the License.
18466
+ */ const Hh = {
18467
+ maxAttempts: 5
18468
+ };
18469
+
18452
18470
  /**
18453
18471
  * @license
18454
18472
  * Copyright 2020 Google LLC
@@ -18470,7 +18488,8 @@ function zh(t, e, n) {
18470
18488
  * to the user.
18471
18489
  *
18472
18490
  * @internal
18473
- */ class Hh {
18491
+ */
18492
+ class Jh {
18474
18493
  convertValue(t, e = "none") {
18475
18494
  switch (Mt(t)) {
18476
18495
  case 0 /* NullValue */ :
@@ -18574,7 +18593,7 @@ function zh(t, e, n) {
18574
18593
  * because we want to provide the user with a more specific error message if
18575
18594
  * their `set()` or fails due to invalid data originating from a `toFirestore()`
18576
18595
  * call.
18577
- */ function Jh(t, e, n) {
18596
+ */ function Yh(t, e, n) {
18578
18597
  let s;
18579
18598
  // Cast to `any` in order to satisfy the union type constraint on
18580
18599
  // toFirestore().
@@ -18583,7 +18602,7 @@ function zh(t, e, n) {
18583
18602
  s;
18584
18603
  }
18585
18604
 
18586
- class Yh extends Hh {
18605
+ class Xh extends Jh {
18587
18606
  constructor(t) {
18588
18607
  super(), this.firestore = t;
18589
18608
  }
@@ -18619,7 +18638,7 @@ class Yh extends Hh {
18619
18638
  * provides methods for adding writes to the write batch. None of the writes
18620
18639
  * will be committed (or visible locally) until {@link WriteBatch.commit} is
18621
18640
  * called.
18622
- */ class Xh {
18641
+ */ class Zh {
18623
18642
  /** @hideconstructor */
18624
18643
  constructor(t, e) {
18625
18644
  this._firestore = t, this._commitHandler = e, this._mutations = [], this._committed = !1,
@@ -18627,12 +18646,12 @@ class Yh extends Hh {
18627
18646
  }
18628
18647
  set(t, e, n) {
18629
18648
  this._verifyNotCommitted();
18630
- const s = Zh(t, this._firestore), i = Jh(s.converter, e, n), r = eh(this._dataReader, "WriteBatch.set", s._key, i, null !== s.converter, n);
18649
+ const s = tl(t, this._firestore), i = Yh(s.converter, e, n), r = eh(this._dataReader, "WriteBatch.set", s._key, i, null !== s.converter, n);
18631
18650
  return this._mutations.push(r.toMutation(s._key, An.none())), this;
18632
18651
  }
18633
18652
  update(t, e, n, ...s) {
18634
18653
  this._verifyNotCommitted();
18635
- const i = Zh(t, this._firestore);
18654
+ const i = tl(t, this._firestore);
18636
18655
  // For Compat types, we have to "extract" the underlying types before
18637
18656
  // performing validation.
18638
18657
  let r;
@@ -18646,7 +18665,7 @@ class Yh extends Hh {
18646
18665
  * @returns This `WriteBatch` instance. Used for chaining method calls.
18647
18666
  */ delete(t) {
18648
18667
  this._verifyNotCommitted();
18649
- const e = Zh(t, this._firestore);
18668
+ const e = tl(t, this._firestore);
18650
18669
  return this._mutations = this._mutations.concat(new On(e._key, An.none())), this;
18651
18670
  }
18652
18671
  /**
@@ -18668,7 +18687,7 @@ class Yh extends Hh {
18668
18687
  }
18669
18688
  }
18670
18689
 
18671
- function Zh(t, e) {
18690
+ function tl(t, e) {
18672
18691
  if ((t = getModularInstance(t)).firestore !== e) throw new Q(G.INVALID_ARGUMENT, "Provided document reference is from a different Firestore instance.");
18673
18692
  return t;
18674
18693
  }
@@ -18726,13 +18745,13 @@ function Zh(t, e) {
18726
18745
  * @returns A Promise resolved with a `DocumentSnapshot` containing the
18727
18746
  * current document contents.
18728
18747
  */
18729
- function tl(t) {
18748
+ function el(t) {
18730
18749
  t = hc(t, wc);
18731
18750
  const e = hc(t.firestore, Vc);
18732
- return Ya(Dc(e), t._key).then((n => _l(e, t, n)));
18751
+ return Ya(Dc(e), t._key).then((n => wl(e, t, n)));
18733
18752
  }
18734
18753
 
18735
- class el extends Hh {
18754
+ class nl extends Jh {
18736
18755
  constructor(t) {
18737
18756
  super(), this.firestore = t;
18738
18757
  }
@@ -18751,9 +18770,9 @@ class el extends Hh {
18751
18770
  *
18752
18771
  * @returns A `Promise` resolved with a `DocumentSnapshot` containing the
18753
18772
  * current document contents.
18754
- */ function nl(t) {
18773
+ */ function sl(t) {
18755
18774
  t = hc(t, wc);
18756
- const e = hc(t.firestore, Vc), n = Dc(e), s = new el(e);
18775
+ const e = hc(t.firestore, Vc), n = Dc(e), s = new nl(e);
18757
18776
  return Ja(n, t._key).then((n => new Rh(e, s, t._key, n, new Ah(null !== n && n.hasLocalMutations,
18758
18777
  /* fromCache= */ !0), t.converter)));
18759
18778
  }
@@ -18764,12 +18783,12 @@ class el extends Hh {
18764
18783
  *
18765
18784
  * @returns A `Promise` resolved with a `DocumentSnapshot` containing the
18766
18785
  * current document contents.
18767
- */ function sl(t) {
18786
+ */ function il(t) {
18768
18787
  t = hc(t, wc);
18769
18788
  const e = hc(t.firestore, Vc);
18770
18789
  return Ya(Dc(e), t._key, {
18771
18790
  source: "server"
18772
- }).then((n => _l(e, t, n)));
18791
+ }).then((n => wl(e, t, n)));
18773
18792
  }
18774
18793
 
18775
18794
  /**
@@ -18781,9 +18800,9 @@ class el extends Hh {
18781
18800
  * invoke {@link getDocsFromCache} or {@link getDocsFromServer}.
18782
18801
  *
18783
18802
  * @returns A `Promise` that will be resolved with the results of the query.
18784
- */ function il(t) {
18803
+ */ function rl(t) {
18785
18804
  t = hc(t, mc);
18786
- const e = hc(t.firestore, Vc), n = Dc(e), s = new el(e);
18805
+ const e = hc(t.firestore, Vc), n = Dc(e), s = new nl(e);
18787
18806
  return Sh(t._query), Za(n, t._query).then((n => new Ph(e, s, t, n)));
18788
18807
  }
18789
18808
 
@@ -18792,9 +18811,9 @@ class el extends Hh {
18792
18811
  * Returns an error if the document is not currently cached.
18793
18812
  *
18794
18813
  * @returns A `Promise` that will be resolved with the results of the query.
18795
- */ function rl(t) {
18814
+ */ function ol(t) {
18796
18815
  t = hc(t, mc);
18797
- const e = hc(t.firestore, Vc), n = Dc(e), s = new el(e);
18816
+ const e = hc(t.firestore, Vc), n = Dc(e), s = new nl(e);
18798
18817
  return Xa(n, t._query).then((n => new Ph(e, s, t, n)));
18799
18818
  }
18800
18819
 
@@ -18803,21 +18822,21 @@ class el extends Hh {
18803
18822
  * server. Returns an error if the network is not available.
18804
18823
  *
18805
18824
  * @returns A `Promise` that will be resolved with the results of the query.
18806
- */ function ol(t) {
18825
+ */ function ul(t) {
18807
18826
  t = hc(t, mc);
18808
- const e = hc(t.firestore, Vc), n = Dc(e), s = new el(e);
18827
+ const e = hc(t.firestore, Vc), n = Dc(e), s = new nl(e);
18809
18828
  return Za(n, t._query, {
18810
18829
  source: "server"
18811
18830
  }).then((n => new Ph(e, s, t, n)));
18812
18831
  }
18813
18832
 
18814
- function ul(t, e, n) {
18833
+ function al(t, e, n) {
18815
18834
  t = hc(t, wc);
18816
- const s = hc(t.firestore, Vc), i = Jh(t.converter, e, n);
18817
- return dl(s, [ eh(th(s), "setDoc", t._key, i, null !== t.converter, n).toMutation(t._key, An.none()) ]);
18835
+ const s = hc(t.firestore, Vc), i = Yh(t.converter, e, n);
18836
+ return _l(s, [ eh(th(s), "setDoc", t._key, i, null !== t.converter, n).toMutation(t._key, An.none()) ]);
18818
18837
  }
18819
18838
 
18820
- function al(t, e, n, ...s) {
18839
+ function cl(t, e, n, ...s) {
18821
18840
  t = hc(t, wc);
18822
18841
  const i = hc(t.firestore, Vc), r = th(i);
18823
18842
  let o;
@@ -18825,7 +18844,7 @@ function al(t, e, n, ...s) {
18825
18844
  // For Compat types, we have to "extract" the underlying types before
18826
18845
  // performing validation.
18827
18846
  e = getModularInstance(e)) || e instanceof Kc ? ch(r, "updateDoc", t._key, e, n, s) : ah(r, "updateDoc", t._key, e);
18828
- return dl(i, [ o.toMutation(t._key, An.exists(!0)) ]);
18847
+ return _l(i, [ o.toMutation(t._key, An.exists(!0)) ]);
18829
18848
  }
18830
18849
 
18831
18850
  /**
@@ -18834,8 +18853,8 @@ function al(t, e, n, ...s) {
18834
18853
  * @param reference - A reference to the document to delete.
18835
18854
  * @returns A Promise resolved once the document has been successfully
18836
18855
  * deleted from the backend (note that it won't resolve while you're offline).
18837
- */ function cl(t) {
18838
- return dl(hc(t.firestore, Vc), [ new On(t._key, An.none()) ]);
18856
+ */ function hl(t) {
18857
+ return _l(hc(t.firestore, Vc), [ new On(t._key, An.none()) ]);
18839
18858
  }
18840
18859
 
18841
18860
  /**
@@ -18847,12 +18866,12 @@ function al(t, e, n, ...s) {
18847
18866
  * @returns A `Promise` resolved with a `DocumentReference` pointing to the
18848
18867
  * newly created document after it has been written to the backend (Note that it
18849
18868
  * won't resolve while you're offline).
18850
- */ function hl(t, e) {
18851
- const n = hc(t.firestore, Vc), s = Ic(t), i = Jh(t.converter, e);
18852
- return dl(n, [ eh(th(t.firestore), "addDoc", s._key, i, null !== t.converter, {}).toMutation(s._key, An.exists(!1)) ]).then((() => s));
18869
+ */ function ll(t, e) {
18870
+ const n = hc(t.firestore, Vc), s = Ic(t), i = Yh(t.converter, e);
18871
+ return _l(n, [ eh(th(t.firestore), "addDoc", s._key, i, null !== t.converter, {}).toMutation(s._key, An.exists(!1)) ]).then((() => s));
18853
18872
  }
18854
18873
 
18855
- function ll(t, ...e) {
18874
+ function fl(t, ...e) {
18856
18875
  var n, s, i;
18857
18876
  t = getModularInstance(t);
18858
18877
  let r = {
@@ -18870,14 +18889,14 @@ function ll(t, ...e) {
18870
18889
  let a, c, h;
18871
18890
  if (t instanceof wc) c = hc(t.firestore, Vc), h = Ke(t._key.path), a = {
18872
18891
  next: n => {
18873
- e[o] && e[o](_l(c, t, n));
18892
+ e[o] && e[o](wl(c, t, n));
18874
18893
  },
18875
18894
  error: e[o + 1],
18876
18895
  complete: e[o + 2]
18877
18896
  }; else {
18878
18897
  const n = hc(t, mc);
18879
18898
  c = hc(n.firestore, Vc), h = n._query;
18880
- const s = new el(c);
18899
+ const s = new nl(c);
18881
18900
  a = {
18882
18901
  next: t => {
18883
18902
  e[o] && e[o](new Ph(c, s, n, t));
@@ -18894,7 +18913,7 @@ function ll(t, ...e) {
18894
18913
  }(Dc(c), h, u, a);
18895
18914
  }
18896
18915
 
18897
- function fl(t, e) {
18916
+ function dl(t, e) {
18898
18917
  return tc(Dc(t = hc(t, Vc)), Rc(e) ? e : {
18899
18918
  next: e
18900
18919
  });
@@ -18903,7 +18922,7 @@ function fl(t, e) {
18903
18922
  /**
18904
18923
  * Locally writes `mutations` on the async queue.
18905
18924
  * @internal
18906
- */ function dl(t, e) {
18925
+ */ function _l(t, e) {
18907
18926
  return function(t, e) {
18908
18927
  const n = new j;
18909
18928
  return t.asyncQueue.enqueueAndForget((async () => ta(await ja(t), e, n))), n.promise;
@@ -18913,8 +18932,8 @@ function fl(t, e) {
18913
18932
  /**
18914
18933
  * Converts a {@link ViewSnapshot} that contains the single document specified by `ref`
18915
18934
  * to a {@link DocumentSnapshot}.
18916
- */ function _l(t, e, n) {
18917
- const s = n.docs.get(e._key), i = new el(t);
18935
+ */ function wl(t, e, n) {
18936
+ const s = n.docs.get(e._key), i = new nl(t);
18918
18937
  return new Rh(t, i, e._key, s, new Ah(n.hasPendingWrites, n.fromCache), e.converter);
18919
18938
  }
18920
18939
 
@@ -18940,7 +18959,7 @@ function fl(t, e) {
18940
18959
  * The `Transaction` object passed to a transaction's `updateFunction` provides
18941
18960
  * the methods to read and write data within the transaction context. See
18942
18961
  * {@link runTransaction}.
18943
- */ class wl extends class {
18962
+ */ class ml extends class {
18944
18963
  /** @hideconstructor */
18945
18964
  constructor(t, e) {
18946
18965
  this._firestore = t, this._transaction = e, this._dataReader = th(t);
@@ -18951,7 +18970,7 @@ function fl(t, e) {
18951
18970
  * @param documentRef - A reference to the document to be read.
18952
18971
  * @returns A `DocumentSnapshot` with the read data.
18953
18972
  */ get(t) {
18954
- const e = Zh(t, this._firestore), n = new Yh(this._firestore);
18973
+ const e = tl(t, this._firestore), n = new Xh(this._firestore);
18955
18974
  return this._transaction.lookup([ e._key ]).then((t => {
18956
18975
  if (!t || 1 !== t.length) return L();
18957
18976
  const s = t[0];
@@ -18961,11 +18980,11 @@ function fl(t, e) {
18961
18980
  }));
18962
18981
  }
18963
18982
  set(t, e, n) {
18964
- const s = Zh(t, this._firestore), i = Jh(s.converter, e, n), r = eh(this._dataReader, "Transaction.set", s._key, i, null !== s.converter, n);
18983
+ const s = tl(t, this._firestore), i = Yh(s.converter, e, n), r = eh(this._dataReader, "Transaction.set", s._key, i, null !== s.converter, n);
18965
18984
  return this._transaction.set(s._key, r), this;
18966
18985
  }
18967
18986
  update(t, e, n, ...s) {
18968
- const i = Zh(t, this._firestore);
18987
+ const i = tl(t, this._firestore);
18969
18988
  // For Compat types, we have to "extract" the underlying types before
18970
18989
  // performing validation.
18971
18990
  let r;
@@ -18978,7 +18997,7 @@ function fl(t, e) {
18978
18997
  * @param documentRef - A reference to the document to be deleted.
18979
18998
  * @returns This `Transaction` instance. Used for chaining method calls.
18980
18999
  */ delete(t) {
18981
- const e = Zh(t, this._firestore);
19000
+ const e = tl(t, this._firestore);
18982
19001
  return this._transaction.delete(e._key), this;
18983
19002
  }
18984
19003
  } {
@@ -18994,7 +19013,7 @@ function fl(t, e) {
18994
19013
  * @param documentRef - A reference to the document to be read.
18995
19014
  * @returns A `DocumentSnapshot` with the read data.
18996
19015
  */ get(t) {
18997
- const e = Zh(t, this._firestore), n = new el(this._firestore);
19016
+ const e = tl(t, this._firestore), n = new nl(this._firestore);
18998
19017
  return super.get(t).then((t => new Rh(this._firestore, n, e._key, t._document, new Ah(
18999
19018
  /* hasPendingWrites= */ !1,
19000
19019
  /* fromCache= */ !1), e.converter)));
@@ -19017,8 +19036,13 @@ function fl(t, e) {
19017
19036
  * (the `updateFunction` returned a failed promise), the promise returned by the
19018
19037
  * `updateFunction `is returned here. Otherwise, if the transaction failed, a
19019
19038
  * rejected promise with the corresponding failure error is returned.
19020
- */ function ml(t, e) {
19021
- return ec(Dc(t = hc(t, Vc)), (n => e(new wl(t, n))));
19039
+ */ function gl(t, e, n) {
19040
+ t = hc(t, Vc);
19041
+ const s = Object.assign(Object.assign({}, Hh), n);
19042
+ !function(t) {
19043
+ if (t.maxAttempts < 1) throw new Q(G.INVALID_ARGUMENT, "Max attempts must be at least 1");
19044
+ }(s);
19045
+ return ec(Dc(t), (n => e(new ml(t, n))), s);
19022
19046
  }
19023
19047
 
19024
19048
  /**
@@ -19040,14 +19064,14 @@ function fl(t, e) {
19040
19064
  /**
19041
19065
  * Returns a sentinel for use with {@link @firebase/firestore/lite#(updateDoc:1)} or
19042
19066
  * {@link @firebase/firestore/lite#(setDoc:1)} with `{merge: true}` to mark a field for deletion.
19043
- */ function gl() {
19067
+ */ function yl() {
19044
19068
  return new nh("deleteField");
19045
19069
  }
19046
19070
 
19047
19071
  /**
19048
19072
  * Returns a sentinel used with {@link @firebase/firestore/lite#(setDoc:1)} or {@link @firebase/firestore/lite#(updateDoc:1)} to
19049
19073
  * include a server-generated timestamp in the written data.
19050
- */ function yl() {
19074
+ */ function pl() {
19051
19075
  return new ih("serverTimestamp");
19052
19076
  }
19053
19077
 
@@ -19062,7 +19086,7 @@ function fl(t, e) {
19062
19086
  * @param elements - The elements to union into the array.
19063
19087
  * @returns The `FieldValue` sentinel for use in a call to `setDoc()` or
19064
19088
  * `updateDoc()`.
19065
- */ function pl(...t) {
19089
+ */ function Il(...t) {
19066
19090
  // NOTE: We don't actually parse the data until it's used in set() or
19067
19091
  // update() since we'd need the Firestore instance to do this.
19068
19092
  return new rh("arrayUnion", t);
@@ -19078,7 +19102,7 @@ function fl(t, e) {
19078
19102
  * @param elements - The elements to remove from the array.
19079
19103
  * @returns The `FieldValue` sentinel for use in a call to `setDoc()` or
19080
19104
  * `updateDoc()`
19081
- */ function Il(...t) {
19105
+ */ function Tl(...t) {
19082
19106
  // NOTE: We don't actually parse the data until it's used in set() or
19083
19107
  // update() since we'd need the Firestore instance to do this.
19084
19108
  return new oh("arrayRemove", t);
@@ -19102,7 +19126,7 @@ function fl(t, e) {
19102
19126
  * @param n - The value to increment by.
19103
19127
  * @returns The `FieldValue` sentinel for use in a call to `setDoc()` or
19104
19128
  * `updateDoc()`
19105
- */ function Tl(t) {
19129
+ */ function El(t) {
19106
19130
  return new uh("increment", t);
19107
19131
  }
19108
19132
 
@@ -19132,8 +19156,8 @@ function fl(t, e) {
19132
19156
  *
19133
19157
  * @returns A {@link WriteBatch} that can be used to atomically execute multiple
19134
19158
  * writes.
19135
- */ function El(t) {
19136
- return Dc(t = hc(t, Vc)), new Xh(t, (e => dl(t, e)));
19159
+ */ function Al(t) {
19160
+ return Dc(t = hc(t, Vc)), new Zh(t, (e => _l(t, e)));
19137
19161
  }
19138
19162
 
19139
19163
  /**
@@ -19151,7 +19175,7 @@ function fl(t, e) {
19151
19175
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19152
19176
  * See the License for the specific language governing permissions and
19153
19177
  * limitations under the License.
19154
- */ function Al(t, e) {
19178
+ */ function Rl(t, e) {
19155
19179
  Dc(t = hc(t, Vc));
19156
19180
  const n = "string" == typeof e ? function(t) {
19157
19181
  try {
@@ -19163,9 +19187,9 @@ function fl(t, e) {
19163
19187
  // PORTING NOTE: We don't return an error if the user has not enabled
19164
19188
  // persistence since `enableIndexeddbPersistence()` can fail on the Web.
19165
19189
  if (Array.isArray(n.indexes)) for (const t of n.indexes) {
19166
- const e = Rl(t, "collectionGroup"), n = [];
19190
+ const e = bl(t, "collectionGroup"), n = [];
19167
19191
  if (Array.isArray(t.fields)) for (const e of t.fields) {
19168
- const t = gh("setIndexConfiguration", Rl(e, "fieldPath"));
19192
+ const t = gh("setIndexConfiguration", bl(e, "fieldPath"));
19169
19193
  "CONTAINS" === e.arrayConfig ? n.push(new oe(t, 2 /* CONTAINS */)) : "ASCENDING" === e.order ? n.push(new oe(t, 0 /* ASCENDING */)) : "DESCENDING" === e.order && n.push(new oe(t, 1 /* DESCENDING */));
19170
19194
  }
19171
19195
  s.push(new se(se.UNKNOWN_ID, e, n, ue.empty()));
@@ -19174,7 +19198,7 @@ function fl(t, e) {
19174
19198
  return Promise.resolve();
19175
19199
  }
19176
19200
 
19177
- function Rl(t, e) {
19201
+ function bl(t, e) {
19178
19202
  if ("string" != typeof t[e]) throw new Q(G.INVALID_ARGUMENT, "Missing string value for: " + e);
19179
19203
  return t[e];
19180
19204
  }
@@ -19191,10 +19215,10 @@ function Rl(t, e) {
19191
19215
  return n = Object.assign({
19192
19216
  useFetchStreams: e
19193
19217
  }, n), i._setSettings(n), i;
19194
- }), "PUBLIC")), registerVersion(D, "3.4.8-canary.69baecadd", t),
19218
+ }), "PUBLIC")), registerVersion(D, "3.4.8-canary.6ceff4db0", t),
19195
19219
  // BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation
19196
- registerVersion(D, "3.4.8-canary.69baecadd", "esm2017");
19220
+ registerVersion(D, "3.4.8-canary.6ceff4db0", "esm2017");
19197
19221
  }();
19198
19222
 
19199
- export { Hh as AbstractUserDataWriter, Qc as Bytes, Pc as CACHE_SIZE_UNLIMITED, gc as CollectionReference, wc as DocumentReference, Rh as DocumentSnapshot, Kc as FieldPath, jc as FieldValue, Vc as Firestore, Q as FirestoreError, Wc as GeoPoint, bc as LoadBundleTask, mc as Query, Dh as QueryConstraint, bh as QueryDocumentSnapshot, Ph as QuerySnapshot, Ah as SnapshotMetadata, at as Timestamp, wl as Transaction, Xh as WriteBatch, vt as _DatabaseId, xt as _DocumentKey, et as _EmptyAppCheckTokenProvider, z as _EmptyAuthCredentialsProvider, mt as _FieldPath, hc as _cast, q as _debugAssert, yt as _isBase64Available, $ as _logWarn, Al as _setIndexConfiguration, oc as _validateIsNotUsedTogether, hl as addDoc, Il as arrayRemove, pl as arrayUnion, Mc as clearIndexedDbPersistence, yc as collection, pc as collectionGroup, _c as connectFirestoreEmulator, cl as deleteDoc, gl as deleteField, $c as disableNetwork, Ic as doc, Gc as documentId, xc as enableIndexedDbPersistence, Nc as enableMultiTabIndexedDbPersistence, Fc as enableNetwork, Gh as endAt, Kh as endBefore, Dc as ensureFirestoreConfigured, dl as executeWrite, tl as getDoc, nl as getDocFromCache, sl as getDocFromServer, il as getDocs, rl as getDocsFromCache, ol as getDocsFromServer, Sc as getFirestore, Tl as increment, vc as initializeFirestore, Fh as limit, $h as limitToLast, Lc as loadBundle, Uc as namedQuery, ll as onSnapshot, fl as onSnapshotsInSync, Mh as orderBy, Ch as query, Ec as queryEqual, Tc as refEqual, ml as runTransaction, yl as serverTimestamp, ul as setDoc, M as setLogLevel, vh as snapshotEqual, Uh as startAfter, Lh as startAt, Bc as terminate, al as updateDoc, Oc as waitForPendingWrites, Nh as where, El as writeBatch };
19223
+ export { Jh as AbstractUserDataWriter, Qc as Bytes, Pc as CACHE_SIZE_UNLIMITED, gc as CollectionReference, wc as DocumentReference, Rh as DocumentSnapshot, Kc as FieldPath, jc as FieldValue, Vc as Firestore, Q as FirestoreError, Wc as GeoPoint, bc as LoadBundleTask, mc as Query, Dh as QueryConstraint, bh as QueryDocumentSnapshot, Ph as QuerySnapshot, Ah as SnapshotMetadata, at as Timestamp, ml as Transaction, Zh as WriteBatch, vt as _DatabaseId, xt as _DocumentKey, et as _EmptyAppCheckTokenProvider, z as _EmptyAuthCredentialsProvider, mt as _FieldPath, hc as _cast, q as _debugAssert, yt as _isBase64Available, $ as _logWarn, Rl as _setIndexConfiguration, oc as _validateIsNotUsedTogether, ll as addDoc, Tl as arrayRemove, Il as arrayUnion, Mc as clearIndexedDbPersistence, yc as collection, pc as collectionGroup, _c as connectFirestoreEmulator, hl as deleteDoc, yl as deleteField, $c as disableNetwork, Ic as doc, Gc as documentId, xc as enableIndexedDbPersistence, Nc as enableMultiTabIndexedDbPersistence, Fc as enableNetwork, Gh as endAt, Kh as endBefore, Dc as ensureFirestoreConfigured, _l as executeWrite, el as getDoc, sl as getDocFromCache, il as getDocFromServer, rl as getDocs, ol as getDocsFromCache, ul as getDocsFromServer, Sc as getFirestore, El as increment, vc as initializeFirestore, Fh as limit, $h as limitToLast, Lc as loadBundle, Uc as namedQuery, fl as onSnapshot, dl as onSnapshotsInSync, Mh as orderBy, Ch as query, Ec as queryEqual, Tc as refEqual, gl as runTransaction, pl as serverTimestamp, al as setDoc, M as setLogLevel, vh as snapshotEqual, Uh as startAfter, Lh as startAt, Bc as terminate, cl as updateDoc, Oc as waitForPendingWrites, Nh as where, Al as writeBatch };
19200
19224
  //# sourceMappingURL=index.esm2017.js.map