@firebase/firestore 3.4.8-canary.5ce067663 → 3.4.8-canary.63caee2a5

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 +224 -200
  12. package/dist/index.esm2017.js.map +1 -1
  13. package/dist/index.esm5.js +158 -135
  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 +95 -71
  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 +246 -223
  32. package/dist/lite/index.browser.esm2017.js.map +1 -1
  33. package/dist/lite/index.browser.esm5.js +118 -116
  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 +127 -104
  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 +28 -28
  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 +37 -36
  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
package/dist/index.rn.js CHANGED
@@ -70,7 +70,7 @@ x.MOCK_USER = new x("mock-user");
70
70
  * See the License for the specific language governing permissions and
71
71
  * limitations under the License.
72
72
  */
73
- let N = "9.7.0-canary.5ce067663";
73
+ let N = "9.7.0-canary.63caee2a5";
74
74
 
75
75
  /**
76
76
  * @license
@@ -15555,11 +15555,10 @@ class $a {
15555
15555
  /**
15556
15556
  * TransactionRunner encapsulates the logic needed to run and retry transactions
15557
15557
  * with backoff.
15558
- */
15559
- class Ba {
15560
- constructor(t, e, n, s) {
15561
- this.asyncQueue = t, this.datastore = e, this.updateFunction = n, this.deferred = s,
15562
- this.xa = 5, this.No = new Ho(this.asyncQueue, "transaction_retry" /* TransactionRetry */);
15558
+ */ class Ba {
15559
+ constructor(t, e, n, s, i) {
15560
+ this.asyncQueue = t, this.datastore = e, this.options = n, this.updateFunction = s,
15561
+ this.deferred = i, this.xa = n.maxAttempts, this.No = new Ho(this.asyncQueue, "transaction_retry" /* TransactionRetry */);
15563
15562
  }
15564
15563
  /** Runs the transaction and sets the result on deferred. */ run() {
15565
15564
  this.xa -= 1, this.Na();
@@ -15880,14 +15879,14 @@ function nc(t, e) {
15880
15879
  * accessed with the transaction will not reflect local changes that have not
15881
15880
  * been committed. For this reason, it is required that all reads are
15882
15881
  * performed before any writes. Transactions must be performed while online.
15883
- */ function sc(t, e) {
15884
- const n = new W;
15882
+ */ function sc(t, e, n) {
15883
+ const s = new W;
15885
15884
  return t.asyncQueue.enqueueAndForget((async () => {
15886
- const s = await function(t) {
15885
+ const i = await function(t) {
15887
15886
  return Ga(t).then((t => t.datastore));
15888
15887
  }(t);
15889
- new Ba(t.asyncQueue, s, e, n).run();
15890
- })), n.promise;
15888
+ new Ba(t.asyncQueue, i, n, e, s).run();
15889
+ })), s.promise;
15891
15890
  }
15892
15891
 
15893
15892
  function ic(t, e, n, s) {
@@ -18466,6 +18465,25 @@ function Jh(t, e, n) {
18466
18465
  if (!n.isEqual(e)) throw new j(Q.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.`);
18467
18466
  }
18468
18467
 
18468
+ /**
18469
+ * @license
18470
+ * Copyright 2022 Google LLC
18471
+ *
18472
+ * Licensed under the Apache License, Version 2.0 (the "License");
18473
+ * you may not use this file except in compliance with the License.
18474
+ * You may obtain a copy of the License at
18475
+ *
18476
+ * http://www.apache.org/licenses/LICENSE-2.0
18477
+ *
18478
+ * Unless required by applicable law or agreed to in writing, software
18479
+ * distributed under the License is distributed on an "AS IS" BASIS,
18480
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18481
+ * See the License for the specific language governing permissions and
18482
+ * limitations under the License.
18483
+ */ const Yh = {
18484
+ maxAttempts: 5
18485
+ };
18486
+
18469
18487
  /**
18470
18488
  * @license
18471
18489
  * Copyright 2020 Google LLC
@@ -18487,7 +18505,8 @@ function Jh(t, e, n) {
18487
18505
  * to the user.
18488
18506
  *
18489
18507
  * @internal
18490
- */ class Yh {
18508
+ */
18509
+ class Xh {
18491
18510
  convertValue(t, e = "none") {
18492
18511
  switch (Ft(t)) {
18493
18512
  case 0 /* NullValue */ :
@@ -18591,7 +18610,7 @@ function Jh(t, e, n) {
18591
18610
  * because we want to provide the user with a more specific error message if
18592
18611
  * their `set()` or fails due to invalid data originating from a `toFirestore()`
18593
18612
  * call.
18594
- */ function Xh(t, e, n) {
18613
+ */ function Zh(t, e, n) {
18595
18614
  let s;
18596
18615
  // Cast to `any` in order to satisfy the union type constraint on
18597
18616
  // toFirestore().
@@ -18600,7 +18619,7 @@ function Jh(t, e, n) {
18600
18619
  s;
18601
18620
  }
18602
18621
 
18603
- class Zh extends Yh {
18622
+ class tl extends Xh {
18604
18623
  constructor(t) {
18605
18624
  super(), this.firestore = t;
18606
18625
  }
@@ -18636,7 +18655,7 @@ class Zh extends Yh {
18636
18655
  * provides methods for adding writes to the write batch. None of the writes
18637
18656
  * will be committed (or visible locally) until {@link WriteBatch.commit} is
18638
18657
  * called.
18639
- */ class tl {
18658
+ */ class el {
18640
18659
  /** @hideconstructor */
18641
18660
  constructor(t, e) {
18642
18661
  this._firestore = t, this._commitHandler = e, this._mutations = [], this._committed = !1,
@@ -18644,12 +18663,12 @@ class Zh extends Yh {
18644
18663
  }
18645
18664
  set(t, e, n) {
18646
18665
  this._verifyNotCommitted();
18647
- const s = el(t, this._firestore), i = Xh(s.converter, e, n), r = sh(this._dataReader, "WriteBatch.set", s._key, i, null !== s.converter, n);
18666
+ const s = nl(t, this._firestore), i = Zh(s.converter, e, n), r = sh(this._dataReader, "WriteBatch.set", s._key, i, null !== s.converter, n);
18648
18667
  return this._mutations.push(r.toMutation(s._key, Pn.none())), this;
18649
18668
  }
18650
18669
  update(t, e, n, ...s) {
18651
18670
  this._verifyNotCommitted();
18652
- const i = el(t, this._firestore);
18671
+ const i = nl(t, this._firestore);
18653
18672
  // For Compat types, we have to "extract" the underlying types before
18654
18673
  // performing validation.
18655
18674
  let r;
@@ -18663,7 +18682,7 @@ class Zh extends Yh {
18663
18682
  * @returns This `WriteBatch` instance. Used for chaining method calls.
18664
18683
  */ delete(t) {
18665
18684
  this._verifyNotCommitted();
18666
- const e = el(t, this._firestore);
18685
+ const e = nl(t, this._firestore);
18667
18686
  return this._mutations = this._mutations.concat(new $n(e._key, Pn.none())), this;
18668
18687
  }
18669
18688
  /**
@@ -18685,7 +18704,7 @@ class Zh extends Yh {
18685
18704
  }
18686
18705
  }
18687
18706
 
18688
- function el(t, e) {
18707
+ function nl(t, e) {
18689
18708
  if ((t = I(t)).firestore !== e) throw new j(Q.INVALID_ARGUMENT, "Provided document reference is from a different Firestore instance.");
18690
18709
  return t;
18691
18710
  }
@@ -18743,13 +18762,13 @@ function el(t, e) {
18743
18762
  * @returns A Promise resolved with a `DocumentSnapshot` containing the
18744
18763
  * current document contents.
18745
18764
  */
18746
- function nl(t) {
18765
+ function sl(t) {
18747
18766
  t = fc(t, gc);
18748
18767
  const e = fc(t.firestore, Sc);
18749
- return Za(xc(e), t._key).then((n => ml(e, t, n)));
18768
+ return Za(xc(e), t._key).then((n => gl(e, t, n)));
18750
18769
  }
18751
18770
 
18752
- class sl extends Yh {
18771
+ class il extends Xh {
18753
18772
  constructor(t) {
18754
18773
  super(), this.firestore = t;
18755
18774
  }
@@ -18768,9 +18787,9 @@ class sl extends Yh {
18768
18787
  *
18769
18788
  * @returns A `Promise` resolved with a `DocumentSnapshot` containing the
18770
18789
  * current document contents.
18771
- */ function il(t) {
18790
+ */ function rl(t) {
18772
18791
  t = fc(t, gc);
18773
- const e = fc(t.firestore, Sc), n = xc(e), s = new sl(e);
18792
+ const e = fc(t.firestore, Sc), n = xc(e), s = new il(e);
18774
18793
  return Xa(n, t._key).then((n => new bh(e, s, t._key, n, new Ph(null !== n && n.hasLocalMutations,
18775
18794
  /* fromCache= */ !0), t.converter)));
18776
18795
  }
@@ -18781,12 +18800,12 @@ class sl extends Yh {
18781
18800
  *
18782
18801
  * @returns A `Promise` resolved with a `DocumentSnapshot` containing the
18783
18802
  * current document contents.
18784
- */ function rl(t) {
18803
+ */ function ol(t) {
18785
18804
  t = fc(t, gc);
18786
18805
  const e = fc(t.firestore, Sc);
18787
18806
  return Za(xc(e), t._key, {
18788
18807
  source: "server"
18789
- }).then((n => ml(e, t, n)));
18808
+ }).then((n => gl(e, t, n)));
18790
18809
  }
18791
18810
 
18792
18811
  /**
@@ -18798,9 +18817,9 @@ class sl extends Yh {
18798
18817
  * invoke {@link getDocsFromCache} or {@link getDocsFromServer}.
18799
18818
  *
18800
18819
  * @returns A `Promise` that will be resolved with the results of the query.
18801
- */ function ol(t) {
18820
+ */ function ul(t) {
18802
18821
  t = fc(t, yc);
18803
- const e = fc(t.firestore, Sc), n = xc(e), s = new sl(e);
18822
+ const e = fc(t.firestore, Sc), n = xc(e), s = new il(e);
18804
18823
  return Ch(t._query), ec(n, t._query).then((n => new vh(e, s, t, n)));
18805
18824
  }
18806
18825
 
@@ -18809,9 +18828,9 @@ class sl extends Yh {
18809
18828
  * Returns an error if the document is not currently cached.
18810
18829
  *
18811
18830
  * @returns A `Promise` that will be resolved with the results of the query.
18812
- */ function ul(t) {
18831
+ */ function al(t) {
18813
18832
  t = fc(t, yc);
18814
- const e = fc(t.firestore, Sc), n = xc(e), s = new sl(e);
18833
+ const e = fc(t.firestore, Sc), n = xc(e), s = new il(e);
18815
18834
  return tc(n, t._query).then((n => new vh(e, s, t, n)));
18816
18835
  }
18817
18836
 
@@ -18820,21 +18839,21 @@ class sl extends Yh {
18820
18839
  * server. Returns an error if the network is not available.
18821
18840
  *
18822
18841
  * @returns A `Promise` that will be resolved with the results of the query.
18823
- */ function al(t) {
18842
+ */ function cl(t) {
18824
18843
  t = fc(t, yc);
18825
- const e = fc(t.firestore, Sc), n = xc(e), s = new sl(e);
18844
+ const e = fc(t.firestore, Sc), n = xc(e), s = new il(e);
18826
18845
  return ec(n, t._query, {
18827
18846
  source: "server"
18828
18847
  }).then((n => new vh(e, s, t, n)));
18829
18848
  }
18830
18849
 
18831
- function cl(t, e, n) {
18850
+ function hl(t, e, n) {
18832
18851
  t = fc(t, gc);
18833
- const s = fc(t.firestore, Sc), i = Xh(t.converter, e, n);
18834
- return wl(s, [ sh(nh(s), "setDoc", t._key, i, null !== t.converter, n).toMutation(t._key, Pn.none()) ]);
18852
+ const s = fc(t.firestore, Sc), i = Zh(t.converter, e, n);
18853
+ return ml(s, [ sh(nh(s), "setDoc", t._key, i, null !== t.converter, n).toMutation(t._key, Pn.none()) ]);
18835
18854
  }
18836
18855
 
18837
- function hl(t, e, n, ...s) {
18856
+ function ll(t, e, n, ...s) {
18838
18857
  t = fc(t, gc);
18839
18858
  const i = fc(t.firestore, Sc), r = nh(i);
18840
18859
  let o;
@@ -18842,7 +18861,7 @@ function hl(t, e, n, ...s) {
18842
18861
  // For Compat types, we have to "extract" the underlying types before
18843
18862
  // performing validation.
18844
18863
  e = I(e)) || e instanceof Qc ? lh(r, "updateDoc", t._key, e, n, s) : hh(r, "updateDoc", t._key, e);
18845
- return wl(i, [ o.toMutation(t._key, Pn.exists(!0)) ]);
18864
+ return ml(i, [ o.toMutation(t._key, Pn.exists(!0)) ]);
18846
18865
  }
18847
18866
 
18848
18867
  /**
@@ -18851,8 +18870,8 @@ function hl(t, e, n, ...s) {
18851
18870
  * @param reference - A reference to the document to delete.
18852
18871
  * @returns A Promise resolved once the document has been successfully
18853
18872
  * deleted from the backend (note that it won't resolve while you're offline).
18854
- */ function ll(t) {
18855
- return wl(fc(t.firestore, Sc), [ new $n(t._key, Pn.none()) ]);
18873
+ */ function fl(t) {
18874
+ return ml(fc(t.firestore, Sc), [ new $n(t._key, Pn.none()) ]);
18856
18875
  }
18857
18876
 
18858
18877
  /**
@@ -18864,12 +18883,12 @@ function hl(t, e, n, ...s) {
18864
18883
  * @returns A `Promise` resolved with a `DocumentReference` pointing to the
18865
18884
  * newly created document after it has been written to the backend (Note that it
18866
18885
  * won't resolve while you're offline).
18867
- */ function fl(t, e) {
18868
- const n = fc(t.firestore, Sc), s = Ec(t), i = Xh(t.converter, e);
18869
- return wl(n, [ sh(nh(t.firestore), "addDoc", s._key, i, null !== t.converter, {}).toMutation(s._key, Pn.exists(!1)) ]).then((() => s));
18886
+ */ function dl(t, e) {
18887
+ const n = fc(t.firestore, Sc), s = Ec(t), i = Zh(t.converter, e);
18888
+ return ml(n, [ sh(nh(t.firestore), "addDoc", s._key, i, null !== t.converter, {}).toMutation(s._key, Pn.exists(!1)) ]).then((() => s));
18870
18889
  }
18871
18890
 
18872
- function dl(t, ...e) {
18891
+ function _l(t, ...e) {
18873
18892
  var n, s, i;
18874
18893
  t = I(t);
18875
18894
  let r = {
@@ -18887,14 +18906,14 @@ function dl(t, ...e) {
18887
18906
  let a, c, h;
18888
18907
  if (t instanceof gc) c = fc(t.firestore, Sc), h = Qe(t._key.path), a = {
18889
18908
  next: n => {
18890
- e[o] && e[o](ml(c, t, n));
18909
+ e[o] && e[o](gl(c, t, n));
18891
18910
  },
18892
18911
  error: e[o + 1],
18893
18912
  complete: e[o + 2]
18894
18913
  }; else {
18895
18914
  const n = fc(t, yc);
18896
18915
  c = fc(n.firestore, Sc), h = n._query;
18897
- const s = new sl(c);
18916
+ const s = new il(c);
18898
18917
  a = {
18899
18918
  next: t => {
18900
18919
  e[o] && e[o](new vh(c, s, n, t));
@@ -18911,7 +18930,7 @@ function dl(t, ...e) {
18911
18930
  }(xc(c), h, u, a);
18912
18931
  }
18913
18932
 
18914
- function _l(t, e) {
18933
+ function wl(t, e) {
18915
18934
  return nc(xc(t = fc(t, Sc)), bc(e) ? e : {
18916
18935
  next: e
18917
18936
  });
@@ -18920,7 +18939,7 @@ function _l(t, e) {
18920
18939
  /**
18921
18940
  * Locally writes `mutations` on the async queue.
18922
18941
  * @internal
18923
- */ function wl(t, e) {
18942
+ */ function ml(t, e) {
18924
18943
  return function(t, e) {
18925
18944
  const n = new W;
18926
18945
  return t.asyncQueue.enqueueAndForget((async () => na(await za(t), e, n))), n.promise;
@@ -18930,8 +18949,8 @@ function _l(t, e) {
18930
18949
  /**
18931
18950
  * Converts a {@link ViewSnapshot} that contains the single document specified by `ref`
18932
18951
  * to a {@link DocumentSnapshot}.
18933
- */ function ml(t, e, n) {
18934
- const s = n.docs.get(e._key), i = new sl(t);
18952
+ */ function gl(t, e, n) {
18953
+ const s = n.docs.get(e._key), i = new il(t);
18935
18954
  return new bh(t, i, e._key, s, new Ph(n.hasPendingWrites, n.fromCache), e.converter);
18936
18955
  }
18937
18956
 
@@ -18957,7 +18976,7 @@ function _l(t, e) {
18957
18976
  * The `Transaction` object passed to a transaction's `updateFunction` provides
18958
18977
  * the methods to read and write data within the transaction context. See
18959
18978
  * {@link runTransaction}.
18960
- */ class gl extends class {
18979
+ */ class yl extends class {
18961
18980
  /** @hideconstructor */
18962
18981
  constructor(t, e) {
18963
18982
  this._firestore = t, this._transaction = e, this._dataReader = nh(t);
@@ -18968,7 +18987,7 @@ function _l(t, e) {
18968
18987
  * @param documentRef - A reference to the document to be read.
18969
18988
  * @returns A `DocumentSnapshot` with the read data.
18970
18989
  */ get(t) {
18971
- const e = el(t, this._firestore), n = new Zh(this._firestore);
18990
+ const e = nl(t, this._firestore), n = new tl(this._firestore);
18972
18991
  return this._transaction.lookup([ e._key ]).then((t => {
18973
18992
  if (!t || 1 !== t.length) return U();
18974
18993
  const s = t[0];
@@ -18978,11 +18997,11 @@ function _l(t, e) {
18978
18997
  }));
18979
18998
  }
18980
18999
  set(t, e, n) {
18981
- const s = el(t, this._firestore), i = Xh(s.converter, e, n), r = sh(this._dataReader, "Transaction.set", s._key, i, null !== s.converter, n);
19000
+ const s = nl(t, this._firestore), i = Zh(s.converter, e, n), r = sh(this._dataReader, "Transaction.set", s._key, i, null !== s.converter, n);
18982
19001
  return this._transaction.set(s._key, r), this;
18983
19002
  }
18984
19003
  update(t, e, n, ...s) {
18985
- const i = el(t, this._firestore);
19004
+ const i = nl(t, this._firestore);
18986
19005
  // For Compat types, we have to "extract" the underlying types before
18987
19006
  // performing validation.
18988
19007
  let r;
@@ -18995,7 +19014,7 @@ function _l(t, e) {
18995
19014
  * @param documentRef - A reference to the document to be deleted.
18996
19015
  * @returns This `Transaction` instance. Used for chaining method calls.
18997
19016
  */ delete(t) {
18998
- const e = el(t, this._firestore);
19017
+ const e = nl(t, this._firestore);
18999
19018
  return this._transaction.delete(e._key), this;
19000
19019
  }
19001
19020
  } {
@@ -19011,7 +19030,7 @@ function _l(t, e) {
19011
19030
  * @param documentRef - A reference to the document to be read.
19012
19031
  * @returns A `DocumentSnapshot` with the read data.
19013
19032
  */ get(t) {
19014
- const e = el(t, this._firestore), n = new sl(this._firestore);
19033
+ const e = nl(t, this._firestore), n = new il(this._firestore);
19015
19034
  return super.get(t).then((t => new bh(this._firestore, n, e._key, t._document, new Ph(
19016
19035
  /* hasPendingWrites= */ !1,
19017
19036
  /* fromCache= */ !1), e.converter)));
@@ -19034,8 +19053,13 @@ function _l(t, e) {
19034
19053
  * (the `updateFunction` returned a failed promise), the promise returned by the
19035
19054
  * `updateFunction `is returned here. Otherwise, if the transaction failed, a
19036
19055
  * rejected promise with the corresponding failure error is returned.
19037
- */ function yl(t, e) {
19038
- return sc(xc(t = fc(t, Sc)), (n => e(new gl(t, n))));
19056
+ */ function pl(t, e, n) {
19057
+ t = fc(t, Sc);
19058
+ const s = Object.assign(Object.assign({}, Yh), n);
19059
+ !function(t) {
19060
+ if (t.maxAttempts < 1) throw new j(Q.INVALID_ARGUMENT, "Max attempts must be at least 1");
19061
+ }(s);
19062
+ return sc(xc(t), (n => e(new yl(t, n))), s);
19039
19063
  }
19040
19064
 
19041
19065
  /**
@@ -19057,14 +19081,14 @@ function _l(t, e) {
19057
19081
  /**
19058
19082
  * Returns a sentinel for use with {@link @firebase/firestore/lite#(updateDoc:1)} or
19059
19083
  * {@link @firebase/firestore/lite#(setDoc:1)} with `{merge: true}` to mark a field for deletion.
19060
- */ function pl() {
19084
+ */ function Il() {
19061
19085
  return new ih("deleteField");
19062
19086
  }
19063
19087
 
19064
19088
  /**
19065
19089
  * Returns a sentinel used with {@link @firebase/firestore/lite#(setDoc:1)} or {@link @firebase/firestore/lite#(updateDoc:1)} to
19066
19090
  * include a server-generated timestamp in the written data.
19067
- */ function Il() {
19091
+ */ function Tl() {
19068
19092
  return new oh("serverTimestamp");
19069
19093
  }
19070
19094
 
@@ -19079,7 +19103,7 @@ function _l(t, e) {
19079
19103
  * @param elements - The elements to union into the array.
19080
19104
  * @returns The `FieldValue` sentinel for use in a call to `setDoc()` or
19081
19105
  * `updateDoc()`.
19082
- */ function Tl(...t) {
19106
+ */ function El(...t) {
19083
19107
  // NOTE: We don't actually parse the data until it's used in set() or
19084
19108
  // update() since we'd need the Firestore instance to do this.
19085
19109
  return new uh("arrayUnion", t);
@@ -19095,7 +19119,7 @@ function _l(t, e) {
19095
19119
  * @param elements - The elements to remove from the array.
19096
19120
  * @returns The `FieldValue` sentinel for use in a call to `setDoc()` or
19097
19121
  * `updateDoc()`
19098
- */ function El(...t) {
19122
+ */ function Al(...t) {
19099
19123
  // NOTE: We don't actually parse the data until it's used in set() or
19100
19124
  // update() since we'd need the Firestore instance to do this.
19101
19125
  return new ah("arrayRemove", t);
@@ -19119,7 +19143,7 @@ function _l(t, e) {
19119
19143
  * @param n - The value to increment by.
19120
19144
  * @returns The `FieldValue` sentinel for use in a call to `setDoc()` or
19121
19145
  * `updateDoc()`
19122
- */ function Al(t) {
19146
+ */ function Rl(t) {
19123
19147
  return new ch("increment", t);
19124
19148
  }
19125
19149
 
@@ -19149,8 +19173,8 @@ function _l(t, e) {
19149
19173
  *
19150
19174
  * @returns A {@link WriteBatch} that can be used to atomically execute multiple
19151
19175
  * writes.
19152
- */ function Rl(t) {
19153
- return xc(t = fc(t, Sc)), new tl(t, (e => wl(t, e)));
19176
+ */ function Pl(t) {
19177
+ return xc(t = fc(t, Sc)), new el(t, (e => ml(t, e)));
19154
19178
  }
19155
19179
 
19156
19180
  /**
@@ -19168,7 +19192,7 @@ function _l(t, e) {
19168
19192
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19169
19193
  * See the License for the specific language governing permissions and
19170
19194
  * limitations under the License.
19171
- */ function Pl(t, e) {
19195
+ */ function bl(t, e) {
19172
19196
  xc(t = fc(t, Sc));
19173
19197
  const n = "string" == typeof e ? function(t) {
19174
19198
  try {
@@ -19180,9 +19204,9 @@ function _l(t, e) {
19180
19204
  // PORTING NOTE: We don't return an error if the user has not enabled
19181
19205
  // persistence since `enableIndexeddbPersistence()` can fail on the Web.
19182
19206
  if (Array.isArray(n.indexes)) for (const t of n.indexes) {
19183
- const e = bl(t, "collectionGroup"), n = [];
19207
+ const e = Vl(t, "collectionGroup"), n = [];
19184
19208
  if (Array.isArray(t.fields)) for (const e of t.fields) {
19185
- const t = ph("setIndexConfiguration", bl(e, "fieldPath"));
19209
+ const t = ph("setIndexConfiguration", Vl(e, "fieldPath"));
19186
19210
  "CONTAINS" === e.arrayConfig ? n.push(new ae(t, 2 /* CONTAINS */)) : "ASCENDING" === e.order ? n.push(new ae(t, 0 /* ASCENDING */)) : "DESCENDING" === e.order && n.push(new ae(t, 1 /* DESCENDING */));
19187
19211
  }
19188
19212
  s.push(new re(re.UNKNOWN_ID, e, n, ce.empty()));
@@ -19191,7 +19215,7 @@ function _l(t, e) {
19191
19215
  return Promise.resolve();
19192
19216
  }
19193
19217
 
19194
- function bl(t, e) {
19218
+ function Vl(t, e) {
19195
19219
  if ("string" != typeof t[e]) throw new j(Q.INVALID_ARGUMENT, "Missing string value for: " + e);
19196
19220
  return t[e];
19197
19221
  }
@@ -19219,10 +19243,10 @@ function bl(t, e) {
19219
19243
  return n = Object.assign({
19220
19244
  useFetchStreams: e
19221
19245
  }, n), i._setSettings(n), i;
19222
- }), "PUBLIC")), s(C, "3.4.8-canary.5ce067663", t),
19246
+ }), "PUBLIC")), s(C, "3.4.8-canary.63caee2a5", t),
19223
19247
  // BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation
19224
- s(C, "3.4.8-canary.5ce067663", "esm2017");
19248
+ s(C, "3.4.8-canary.63caee2a5", "esm2017");
19225
19249
  }("rn", /* useFetchStreams= */ !1);
19226
19250
 
19227
- export { Yh as AbstractUserDataWriter, Wc as Bytes, vc as CACHE_SIZE_UNLIMITED, pc as CollectionReference, gc as DocumentReference, bh as DocumentSnapshot, Qc as FieldPath, zc as FieldValue, Sc as Firestore, j as FirestoreError, Hc as GeoPoint, Vc as LoadBundleTask, yc as Query, xh as QueryConstraint, Vh as QueryDocumentSnapshot, vh as QuerySnapshot, Ph as SnapshotMetadata, ct as Timestamp, gl as Transaction, tl as WriteBatch, Dt as _DatabaseId, kt as _DocumentKey, nt as _EmptyAppCheckTokenProvider, H as _EmptyAuthCredentialsProvider, gt as _FieldPath, fc as _cast, K as _debugAssert, It as _isBase64Available, B as _logWarn, Pl as _setIndexConfiguration, ac as _validateIsNotUsedTogether, fl as addDoc, El as arrayRemove, Tl as arrayUnion, Fc as clearIndexedDbPersistence, Ic as collection, Tc as collectionGroup, mc as connectFirestoreEmulator, ll as deleteDoc, pl as deleteField, Lc as disableNetwork, Ec as doc, jc as documentId, kc as enableIndexedDbPersistence, Mc as enableMultiTabIndexedDbPersistence, Bc as enableNetwork, jh as endAt, Qh as endBefore, xc as ensureFirestoreConfigured, wl as executeWrite, nl as getDoc, il as getDocFromCache, rl as getDocFromServer, ol as getDocs, ul as getDocsFromCache, al as getDocsFromServer, Cc as getFirestore, Al as increment, Dc as initializeFirestore, Bh as limit, Lh as limitToLast, qc as loadBundle, Kc as namedQuery, dl as onSnapshot, _l as onSnapshotsInSync, Fh as orderBy, Nh as query, Rc as queryEqual, Ac as refEqual, yl as runTransaction, Il as serverTimestamp, cl as setDoc, O as setLogLevel, Dh as snapshotEqual, Kh as startAfter, qh as startAt, Uc as terminate, hl as updateDoc, $c as waitForPendingWrites, Mh as where, Rl as writeBatch };
19251
+ export { Xh as AbstractUserDataWriter, Wc as Bytes, vc as CACHE_SIZE_UNLIMITED, pc as CollectionReference, gc as DocumentReference, bh as DocumentSnapshot, Qc as FieldPath, zc as FieldValue, Sc as Firestore, j as FirestoreError, Hc as GeoPoint, Vc as LoadBundleTask, yc as Query, xh as QueryConstraint, Vh as QueryDocumentSnapshot, vh as QuerySnapshot, Ph as SnapshotMetadata, ct as Timestamp, yl as Transaction, el as WriteBatch, Dt as _DatabaseId, kt as _DocumentKey, nt as _EmptyAppCheckTokenProvider, H as _EmptyAuthCredentialsProvider, gt as _FieldPath, fc as _cast, K as _debugAssert, It as _isBase64Available, B as _logWarn, bl as _setIndexConfiguration, ac as _validateIsNotUsedTogether, dl as addDoc, Al as arrayRemove, El as arrayUnion, Fc as clearIndexedDbPersistence, Ic as collection, Tc as collectionGroup, mc as connectFirestoreEmulator, fl as deleteDoc, Il as deleteField, Lc as disableNetwork, Ec as doc, jc as documentId, kc as enableIndexedDbPersistence, Mc as enableMultiTabIndexedDbPersistence, Bc as enableNetwork, jh as endAt, Qh as endBefore, xc as ensureFirestoreConfigured, ml as executeWrite, sl as getDoc, rl as getDocFromCache, ol as getDocFromServer, ul as getDocs, al as getDocsFromCache, cl as getDocsFromServer, Cc as getFirestore, Rl as increment, Dc as initializeFirestore, Bh as limit, Lh as limitToLast, qc as loadBundle, Kc as namedQuery, _l as onSnapshot, wl as onSnapshotsInSync, Fh as orderBy, Nh as query, Rc as queryEqual, Ac as refEqual, pl as runTransaction, Tl as serverTimestamp, hl as setDoc, O as setLogLevel, Dh as snapshotEqual, Kh as startAfter, qh as startAt, Uc as terminate, ll as updateDoc, $c as waitForPendingWrites, Mh as where, Pl as writeBatch };
19228
19252
  //# sourceMappingURL=index.rn.js.map