@firebase/firestore 3.11.0-canary.e0551fa13 → 3.11.0-canary.e45fea9b8

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.
@@ -67,7 +67,7 @@ v.MOCK_USER = new v("mock-user");
67
67
  * See the License for the specific language governing permissions and
68
68
  * limitations under the License.
69
69
  */
70
- var g = "9.21.0-canary.e0551fa13", w = new l("@firebase/firestore");
70
+ var g = "9.21.0-canary.e45fea9b8", w = 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 F = "cancelled", P = "unknown", O = "invalid-argument", V = "deadline-exceeded", D = "not-found", N = "permission-denied", q = "unauthenticated", R = "resource-exhausted", x = "failed-precondition", C = "aborted", j = "out-of-range", L = "unimplemented", M = "internal", U = "unavailable", B = /** @class */ function(e) {
228
+ */ var P = "cancelled", F = "unknown", O = "invalid-argument", V = "deadline-exceeded", D = "not-found", N = "permission-denied", q = "unauthenticated", R = "resource-exhausted", x = "failed-precondition", C = "aborted", j = "out-of-range", L = "unimplemented", M = "internal", U = "unavailable", B = /** @class */ function(e) {
229
229
  /** @hideconstructor */
230
230
  function n(
231
231
  /**
@@ -826,7 +826,7 @@ function pt(t) {
826
826
  * Code.UNKNOWN.
827
827
  */
828
828
  function gt(t) {
829
- if (void 0 === t) return T("RPC_ERROR", "HTTP error has no status"), P;
829
+ if (void 0 === t) return T("RPC_ERROR", "HTTP error has no status"), F;
830
830
  // The canonical error codes for Google APIs [1] specify mapping onto HTTP
831
831
  // status codes but the mapping is not bijective. In each case of ambiguity
832
832
  // this function chooses a primary error.
@@ -872,11 +872,11 @@ function gt(t) {
872
872
 
873
873
  case 499:
874
874
  // Client Closed Request
875
- return F;
875
+ return P;
876
876
 
877
877
  case 500:
878
878
  // Internal Server Error
879
- return P;
879
+ return F;
880
880
 
881
881
  // Other possibilities:
882
882
  // return Code.INTERNAL;
@@ -894,7 +894,7 @@ function gt(t) {
894
894
  return V;
895
895
 
896
896
  default:
897
- return t >= 200 && t < 300 ? "ok" : t >= 400 && t < 500 ? x : t >= 500 && t < 600 ? M : P;
897
+ return t >= 200 && t < 300 ? "ok" : t >= 400 && t < 500 ? x : t >= 500 && t < 600 ? M : F;
898
898
  }
899
899
  }
900
900
 
@@ -1187,7 +1187,7 @@ function It(t, e) {
1187
1187
  return (t = e.apply(this, arguments) || this).name = "Base64DecodeError", t;
1188
1188
  }
1189
1189
  return t(n, e), n;
1190
- }(Error), Ft = /** @class */ function() {
1190
+ }(Error), Pt = /** @class */ function() {
1191
1191
  function t(t) {
1192
1192
  this.binaryString = t;
1193
1193
  }
@@ -1286,9 +1286,9 @@ function It(t, e) {
1286
1286
  * the proto byte string in a common class that must be converted into a string
1287
1287
  * before being sent as a proto.
1288
1288
  * @internal
1289
- */ Ft.EMPTY_BYTE_STRING = new Ft("");
1289
+ */ Pt.EMPTY_BYTE_STRING = new Pt("");
1290
1290
 
1291
- var Pt = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
1291
+ var Ft = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
1292
1292
 
1293
1293
  /**
1294
1294
  * Converts the possible Proto values for a timestamp value into a "seconds and
@@ -1301,7 +1301,7 @@ var Pt = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
1301
1301
  // The date string can have higher precision (nanos) than the Date class
1302
1302
  // (millis), so we do some custom parsing here.
1303
1303
  // Parse the nanos right out of the string.
1304
- var e = 0, n = Pt.exec(t);
1304
+ var e = 0, n = Ft.exec(t);
1305
1305
  if (I(!!n), n[1]) {
1306
1306
  // Pad the fraction out to 9 digits (nanos).
1307
1307
  var r = n[1];
@@ -1329,7 +1329,7 @@ var Pt = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
1329
1329
  }
1330
1330
 
1331
1331
  /** Converts the possible Proto types for Blobs into a ByteString. */ function Dt(t) {
1332
- return "string" == typeof t ? Ft.fromBase64String(t) : Ft.fromUint8Array(t);
1332
+ return "string" == typeof t ? Pt.fromBase64String(t) : Pt.fromUint8Array(t);
1333
1333
  }
1334
1334
 
1335
1335
  /**
@@ -2833,7 +2833,7 @@ function Se(t) {
2833
2833
  return e.O;
2834
2834
  }
2835
2835
 
2836
- function Fe(t, e) {
2836
+ function Pe(t, e) {
2837
2837
  e.getFirstInequalityField(), Se(t);
2838
2838
  var n = t.filters.concat([ e ]);
2839
2839
  return new Te(t.path, t.collectionGroup, t.explicitOrderBy.slice(), n, t.limit, t.limitType, t.startAt, t.endAt);
@@ -2864,7 +2864,7 @@ function Fe(t, e) {
2864
2864
  * The return value is an IntegerValue if it can safely represent the value,
2865
2865
  * otherwise a DoubleValue is returned.
2866
2866
  */
2867
- function Pe(t, e) {
2867
+ function Fe(t, e) {
2868
2868
  return function(t) {
2869
2869
  return "number" == typeof t && Number.isInteger(t) && !dt(t) && t <= Number.MAX_SAFE_INTEGER && t >= Number.MIN_SAFE_INTEGER;
2870
2870
  }(e) ?
@@ -3350,7 +3350,7 @@ function ln(t) {
3350
3350
  return r.connection.v(t, e, n, o, a);
3351
3351
  })).catch((function(t) {
3352
3352
  throw "FirebaseError" === t.name ? (t.code === q && (r.authCredentials.invalidateToken(),
3353
- r.appCheckCredentials.invalidateToken()), t) : new B(P, t.toString());
3353
+ r.appCheckCredentials.invalidateToken()), t) : new B(F, t.toString());
3354
3354
  }));
3355
3355
  },
3356
3356
  /** Invokes the provided RPC with streamed results with auth and AppCheck tokens. */ n.prototype.R = function(t, e, n, r) {
@@ -3360,7 +3360,7 @@ function ln(t) {
3360
3360
  return i.connection.R(t, e, n, a, u, r);
3361
3361
  })).catch((function(t) {
3362
3362
  throw "FirebaseError" === t.name ? (t.code === q && (i.authCredentials.invalidateToken(),
3363
- i.appCheckCredentials.invalidateToken()), t) : new B(P, t.toString());
3363
+ i.appCheckCredentials.invalidateToken()), t) : new B(F, t.toString());
3364
3364
  }));
3365
3365
  }, n.prototype.terminate = function() {
3366
3366
  this.J = !0;
@@ -3579,7 +3579,7 @@ var mn = new Map;
3579
3579
  !function(t, e, n, r) {
3580
3580
  if (!0 === e && !0 === r) throw new B(O, "".concat("experimentalForceLongPolling", " and ").concat("experimentalAutoDetectLongPolling", " cannot be used together."));
3581
3581
  }(0, t.experimentalForceLongPolling, 0, t.experimentalAutoDetectLongPolling), this.experimentalForceLongPolling = !!t.experimentalForceLongPolling,
3582
- this.experimentalForceLongPolling || void 0 === t.experimentalAutoDetectLongPolling ? this.experimentalAutoDetectLongPolling = !1 :
3582
+ this.experimentalForceLongPolling ? this.experimentalAutoDetectLongPolling = !1 : void 0 === t.experimentalAutoDetectLongPolling ? this.experimentalAutoDetectLongPolling = !0 :
3583
3583
  // For backwards compatibility, coerce the value to boolean even though
3584
3584
  // the TypeScript compiler has narrowed the type to boolean already.
3585
3585
  // noinspection PointlessBooleanExpressionJS
@@ -3864,7 +3864,7 @@ t, e) {
3864
3864
  * The collection this `DocumentReference` belongs to.
3865
3865
  */
3866
3866
  get: function() {
3867
- return new Fn(this.firestore, this.converter, this._key.path.popLast());
3867
+ return new Pn(this.firestore, this.converter, this._key.path.popLast());
3868
3868
  },
3869
3869
  enumerable: !1,
3870
3870
  configurable: !0
@@ -3886,7 +3886,7 @@ t, e) {
3886
3886
  return t.prototype.withConverter = function(e) {
3887
3887
  return new t(this.firestore, e, this._query);
3888
3888
  }, t;
3889
- }(), Fn = /** @class */ function(e) {
3889
+ }(), Pn = /** @class */ function(e) {
3890
3890
  /** @hideconstructor */
3891
3891
  function n(t, n, r) {
3892
3892
  var i = this;
@@ -3929,15 +3929,15 @@ t, e) {
3929
3929
 
3930
3930
  /**
3931
3931
  * The results of executing an aggregation query.
3932
- */ function Pn(t, e) {
3932
+ */ function Fn(t, e) {
3933
3933
  for (var n = [], i = 2; i < arguments.length; i++) n[i - 2] = arguments[i];
3934
3934
  if (t = p(t), ot("collection", "path", e), t instanceof wn) {
3935
3935
  var o = et.fromString.apply(et, r([ e ], n, !1));
3936
- return ut(o), new Fn(t, /* converter= */ null, o);
3936
+ return ut(o), new Pn(t, /* converter= */ null, o);
3937
3937
  }
3938
- if (!(t instanceof In || t instanceof Fn)) throw new B(O, "Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");
3938
+ if (!(t instanceof In || t instanceof Pn)) throw new B(O, "Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");
3939
3939
  var a = t._path.child(et.fromString.apply(et, r([ e ], n, !1)));
3940
- return ut(a), new Fn(t.firestore,
3940
+ return ut(a), new Pn(t.firestore,
3941
3941
  /* converter= */ null, a);
3942
3942
  }
3943
3943
 
@@ -3971,9 +3971,9 @@ function Vn(t, e) {
3971
3971
  return at(o), new In(t,
3972
3972
  /* converter= */ null, new it(o));
3973
3973
  }
3974
- if (!(t instanceof In || t instanceof Fn)) throw new B(O, "Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");
3974
+ if (!(t instanceof In || t instanceof Pn)) throw new B(O, "Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");
3975
3975
  var a = t._path.child(et.fromString.apply(et, r([ e ], n, !1)));
3976
- return at(a), new In(t.firestore, t instanceof Fn ? t.converter : null, new it(a));
3976
+ return at(a), new In(t.firestore, t instanceof Pn ? t.converter : null, new it(a));
3977
3977
  }
3978
3978
 
3979
3979
  /**
@@ -3984,7 +3984,7 @@ function Vn(t, e) {
3984
3984
  * @returns true if the references point to the same location in the same
3985
3985
  * Firestore database.
3986
3986
  */ function Dn(t, e) {
3987
- return t = p(t), e = p(e), (t instanceof In || t instanceof Fn) && (e instanceof In || e instanceof Fn) && t.firestore === e.firestore && t.path === e.path && t.converter === e.converter
3987
+ return t = p(t), e = p(e), (t instanceof In || t instanceof Pn) && (e instanceof In || e instanceof Pn) && t.firestore === e.firestore && t.path === e.path && t.converter === e.converter
3988
3988
  /**
3989
3989
  * Returns true if the provided queries point to the same collection and apply
3990
3990
  * the same constraints.
@@ -4040,7 +4040,7 @@ var qn = /** @class */ function() {
4040
4040
  * @param base64 - The Base64 string used to create the `Bytes` object.
4041
4041
  */ return t.fromBase64String = function(e) {
4042
4042
  try {
4043
- return new t(Ft.fromBase64String(e));
4043
+ return new t(Pt.fromBase64String(e));
4044
4044
  } catch (e) {
4045
4045
  throw new B(O, "Failed to construct data from Base64 string: " + e);
4046
4046
  }
@@ -4051,7 +4051,7 @@ var qn = /** @class */ function() {
4051
4051
  * @param array - The Uint8Array used to create the `Bytes` object.
4052
4052
  */
4053
4053
  t.fromUint8Array = function(e) {
4054
- return new t(Ft.fromUint8Array(e));
4054
+ return new t(Pt.fromUint8Array(e));
4055
4055
  },
4056
4056
  /**
4057
4057
  * Returns the underlying bytes as a Base64-encoded string.
@@ -4479,7 +4479,7 @@ var Hn = /** @class */ function(e) {
4479
4479
  return (r = e.call(this, t) || this).dt = n, r;
4480
4480
  }
4481
4481
  return t(n, e), n.prototype._toFieldTransform = function(t) {
4482
- var e = new qe(t.serializer, Pe(t.serializer, this.dt));
4482
+ var e = new qe(t.serializer, Fe(t.serializer, this.dt));
4483
4483
  return new Re(t.path, e);
4484
4484
  }, n.prototype.isEqual = function(t) {
4485
4485
  // TODO(mrschmidt): Implement isEquals
@@ -4608,7 +4608,7 @@ var Hn = /** @class */ function(e) {
4608
4608
  if (null === (t = p(t))) return {
4609
4609
  nullValue: "NULL_VALUE"
4610
4610
  };
4611
- if ("number" == typeof t) return Pe(e.serializer, t);
4611
+ if ("number" == typeof t) return Fe(e.serializer, t);
4612
4612
  if ("boolean" == typeof t) return {
4613
4613
  booleanValue: t
4614
4614
  };
@@ -4976,7 +4976,7 @@ function yr(t, e) {
4976
4976
  return new n(t, e, r);
4977
4977
  }, n.prototype._apply = function(t) {
4978
4978
  var e = this._parse(t);
4979
- return jr(t._query, e), new An(t.firestore, t.converter, Fe(t._query, e));
4979
+ return jr(t._query, e), new An(t.firestore, t.converter, Pe(t._query, e));
4980
4980
  }, n.prototype._parse = function(t) {
4981
4981
  var e = Kn(t.firestore), n = function(t, e, n, r, i, o, a) {
4982
4982
  var u;
@@ -5049,9 +5049,9 @@ function yr(t, e) {
5049
5049
  return 0 === e.getFilters().length ? t : (function(t, e) {
5050
5050
  for (var n = t, r = 0, i = e.getFlattenedFilters(); r < i.length; r++) {
5051
5051
  var o = i[r];
5052
- jr(n, o), n = Fe(n, o);
5052
+ jr(n, o), n = Pe(n, o);
5053
5053
  }
5054
- }(t._query, e), new An(t.firestore, t.converter, Fe(t._query, e)));
5054
+ }(t._query, e), new An(t.firestore, t.converter, Pe(t._query, e)));
5055
5055
  }, n.prototype._getQueryConstraints = function() {
5056
5056
  return this._queryConstraints;
5057
5057
  }, n.prototype._getOperator = function() {
@@ -5198,7 +5198,7 @@ var Sr = /** @class */ function(e) {
5198
5198
  */;
5199
5199
  }
5200
5200
 
5201
- function Fr(t) {
5201
+ function Pr(t) {
5202
5202
  return lt("limitToLast", t), Ir._create("limitToLast", t, "L" /* LimitType.Last */)
5203
5203
  /**
5204
5204
  * A `QueryStartAtConstraint` is used to exclude documents from the start of a
@@ -5209,7 +5209,7 @@ function Fr(t) {
5209
5209
  */;
5210
5210
  }
5211
5211
 
5212
- var Pr = /** @class */ function(e) {
5212
+ var Fr = /** @class */ function(e) {
5213
5213
  /**
5214
5214
  * @internal
5215
5215
  */
@@ -5232,13 +5232,13 @@ var Pr = /** @class */ function(e) {
5232
5232
 
5233
5233
  function Or() {
5234
5234
  for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
5235
- return Pr._create("startAt", t,
5235
+ return Fr._create("startAt", t,
5236
5236
  /*inclusive=*/ !0);
5237
5237
  }
5238
5238
 
5239
5239
  function Vr() {
5240
5240
  for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
5241
- return Pr._create("startAfter", t,
5241
+ return Fr._create("startAfter", t,
5242
5242
  /*inclusive=*/ !1);
5243
5243
  }
5244
5244
 
@@ -5645,7 +5645,7 @@ function Gr(t, e, n) {
5645
5645
  * @returns A `Promise` resolved with a `DocumentReference` pointing to the
5646
5646
  * newly created document after it has been written to the backend.
5647
5647
  */ function Yr(t, e) {
5648
- var n = Vn(t = ct(t, Fn)), r = Ur(t.converter, e), i = Gn(Kn(t.firestore), "addDoc", n._key, r, null !== n.converter, {});
5648
+ var n = Vn(t = ct(t, Pn)), r = Ur(t.converter, e), i = Gn(Kn(t.firestore), "addDoc", n._key, r, null !== n.converter, {});
5649
5649
  return dn(vn(t.firestore), [ i.toMutation(n._key, xe.exists(!1)) ]).then((function() {
5650
5650
  return n;
5651
5651
  }));
@@ -6211,8 +6211,8 @@ function si(t, e) {
6211
6211
  default:
6212
6212
  return k();
6213
6213
 
6214
- case F:
6215
6214
  case P:
6215
+ case F:
6216
6216
  case V:
6217
6217
  case R:
6218
6218
  case M:
@@ -6358,7 +6358,7 @@ function si(t, e) {
6358
6358
  * guarantee that the operation will not be run.
6359
6359
  */
6360
6360
  t.prototype.cancel = function(t) {
6361
- null !== this.timerHandle && (this.clearTimeout(), this.deferred.reject(new B(F, "Operation cancelled" + (t ? ": " + t : ""))));
6361
+ null !== this.timerHandle && (this.clearTimeout(), this.deferred.reject(new B(P, "Operation cancelled" + (t ? ": " + t : ""))));
6362
6362
  }, t.prototype.handleDelayElapsed = function() {
6363
6363
  var t = this;
6364
6364
  this.asyncQueue.enqueueAndForget((function() {
@@ -6704,7 +6704,7 @@ di = "".concat(i, "_lite"), g = di, o(new c("firestore/lite", (function(t, e) {
6704
6704
  return r && o._setSettings(r), o;
6705
6705
  }), "PUBLIC").setMultipleInstances(!0)),
6706
6706
  // RUNTIME_ENV and BUILD_TARGET are replaced by real values during the compilation
6707
- a("firestore-lite", "3.11.0-canary.e0551fa13", ""), a("firestore-lite", "3.11.0-canary.e0551fa13", "esm5");
6707
+ a("firestore-lite", "3.11.0-canary.e45fea9b8", ""), a("firestore-lite", "3.11.0-canary.e45fea9b8", "esm5");
6708
6708
 
6709
- export { Sn as AggregateField, kn as AggregateQuerySnapshot, qn as Bytes, Fn as CollectionReference, In as DocumentReference, fr as DocumentSnapshot, Rn as FieldPath, Cn as FieldValue, wn as Firestore, B as FirestoreError, jn as GeoPoint, An as Query, br as QueryCompositeFilterConstraint, vr as QueryConstraint, hr as QueryDocumentSnapshot, Dr as QueryEndAtConstraint, wr as QueryFieldFilterConstraint, Ir as QueryLimitConstraint, Sr as QueryOrderByConstraint, pr as QuerySnapshot, Pr as QueryStartAtConstraint, Nt as Timestamp, vi as Transaction, ui as WriteBatch, Yr as addDoc, ti as aggregateFieldEqual, ei as aggregateQuerySnapshotEqual, Er as and, oi as arrayRemove, ii as arrayUnion, $r as average, Pn as collection, On as collectionGroup, Tn as connectFirestoreEmulator, Zr as count, Wr as deleteDoc, ni as deleteField, Vn as doc, xn as documentId, qr as endAt, Nr as endBefore, Jr as getAggregate, Hr as getCount, zr as getDoc, Qr as getDocs, bn as getFirestore, ai as increment, _n as initializeFirestore, Ar as limit, Fr as limitToLast, Tr as or, kr as orderBy, gr as query, Nn as queryEqual, Dn as refEqual, gi as runTransaction, ri as serverTimestamp, Kr as setDoc, _ as setLogLevel, dr as snapshotEqual, Vr as startAfter, Or as startAt, Xr as sum, En as terminate, Gr as updateDoc, _r as where, ci as writeBatch };
6709
+ export { Sn as AggregateField, kn as AggregateQuerySnapshot, qn as Bytes, Pn as CollectionReference, In as DocumentReference, fr as DocumentSnapshot, Rn as FieldPath, Cn as FieldValue, wn as Firestore, B as FirestoreError, jn as GeoPoint, An as Query, br as QueryCompositeFilterConstraint, vr as QueryConstraint, hr as QueryDocumentSnapshot, Dr as QueryEndAtConstraint, wr as QueryFieldFilterConstraint, Ir as QueryLimitConstraint, Sr as QueryOrderByConstraint, pr as QuerySnapshot, Fr as QueryStartAtConstraint, Nt as Timestamp, vi as Transaction, ui as WriteBatch, Yr as addDoc, ti as aggregateFieldEqual, ei as aggregateQuerySnapshotEqual, Er as and, oi as arrayRemove, ii as arrayUnion, $r as average, Fn as collection, On as collectionGroup, Tn as connectFirestoreEmulator, Zr as count, Wr as deleteDoc, ni as deleteField, Vn as doc, xn as documentId, qr as endAt, Nr as endBefore, Jr as getAggregate, Hr as getCount, zr as getDoc, Qr as getDocs, bn as getFirestore, ai as increment, _n as initializeFirestore, Ar as limit, Pr as limitToLast, Tr as or, kr as orderBy, gr as query, Nn as queryEqual, Dn as refEqual, gi as runTransaction, ri as serverTimestamp, Kr as setDoc, _ as setLogLevel, dr as snapshotEqual, Vr as startAfter, Or as startAt, Xr as sum, En as terminate, Gr as updateDoc, _r as where, ci as writeBatch };
6710
6710
  //# sourceMappingURL=index.browser.esm5.js.map