@firebase/firestore 4.7.12-canary.f92069a21 → 4.7.12-eap-ai-hybridinference.c16cbf1a3

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.
package/dist/index.cjs.js CHANGED
@@ -9,7 +9,7 @@ var util = require('@firebase/util');
9
9
  var bloomBlob = require('@firebase/webchannel-wrapper/bloom-blob');
10
10
  var webchannelBlob = require('@firebase/webchannel-wrapper/webchannel-blob');
11
11
 
12
- const F = "@firebase/firestore", M = "4.7.12-canary.f92069a21";
12
+ const F = "@firebase/firestore", M = "4.7.12-eap-ai-hybridinference.c16cbf1a3";
13
13
 
14
14
  /**
15
15
  * @license
@@ -71,7 +71,7 @@ User.MOCK_USER = new User("mock-user");
71
71
  * See the License for the specific language governing permissions and
72
72
  * limitations under the License.
73
73
  */
74
- let x = "11.7.1-canary.f92069a21";
74
+ let x = "11.7.1-eap-ai-hybridinference.c16cbf1a3";
75
75
 
76
76
  /**
77
77
  * @license
@@ -2438,7 +2438,7 @@ function __PRIVATE_newDbDocumentMutationPrefixForPath(e, t) {
2438
2438
  * there is no useful information to store as the value. The raw (unencoded)
2439
2439
  * path cannot be stored because IndexedDb doesn't store prototype
2440
2440
  * information.
2441
- */ const re = {}, ie = "documentMutations", se = "remoteDocumentsV14", oe = [ "prefixPath", "collectionGroup", "readTime", "documentId" ], _e = "documentKeyIndex", ae = [ "prefixPath", "collectionGroup", "documentId" ], ue = "collectionGroupIndex", ce = [ "collectionGroup", "readTime", "prefixPath", "documentId" ], le = "remoteDocumentGlobal", he = "remoteDocumentGlobalKey", Pe = "targets", Te = "queryTargetsIndex", Ie = [ "canonicalId", "targetId" ], Ee = "targetDocuments", de = [ "targetId", "path" ], Ae = "documentTargetsIndex", Re = [ "path", "targetId" ], Ve = "targetGlobalKey", me = "targetGlobal", fe = "collectionParents", ge = [ "collectionId", "parent" ], pe = "clientMetadata", ye = "clientId", we = "bundles", Se = "bundleId", be = "namedQueries", De = "name", ve = "indexConfiguration", Ce = "indexId", Fe = "collectionGroupIndex", Me = "collectionGroup", xe = "indexState", Oe = [ "indexId", "uid" ], Ne = "sequenceNumberIndex", Be = [ "uid", "sequenceNumber" ], Le = "indexEntries", ke = [ "indexId", "uid", "arrayValue", "directionalValue", "orderedDocumentKey", "documentKey" ], qe = "documentKeyIndex", Qe = [ "indexId", "uid", "orderedDocumentKey" ], $e = "documentOverlays", Ue = [ "userId", "collectionPath", "documentId" ], Ke = "collectionPathOverlayIndex", We = [ "userId", "collectionPath", "largestBatchId" ], Ge = "collectionGroupOverlayIndex", ze = [ "userId", "collectionGroup", "largestBatchId" ], je = "globals", He = "name", Je = [ ...[ ...[ ...[ ...[ Y, X, ie, j, Pe, H, me, Ee ], pe ], le ], fe ], we, be ], Ye = [ ...Je, $e ], Ze = [ Y, X, ie, se, Pe, H, me, Ee, pe, le, fe, we, be, $e ], Xe = Ze, et = [ ...Xe, ve, xe, Le ], tt = et, nt = [ ...et, je ], rt = nt;
2441
+ */ const re = {}, ie = "documentMutations", se = "remoteDocumentsV14", oe = [ "prefixPath", "collectionGroup", "readTime", "documentId" ], _e = "documentKeyIndex", ae = [ "prefixPath", "collectionGroup", "documentId" ], ue = "collectionGroupIndex", ce = [ "collectionGroup", "readTime", "prefixPath", "documentId" ], le = "remoteDocumentGlobal", he = "remoteDocumentGlobalKey", Pe = "targets", Te = "queryTargetsIndex", Ie = [ "canonicalId", "targetId" ], Ee = "targetDocuments", de = [ "targetId", "path" ], Ae = "documentTargetsIndex", Re = [ "path", "targetId" ], Ve = "targetGlobalKey", me = "targetGlobal", fe = "collectionParents", ge = [ "collectionId", "parent" ], pe = "clientMetadata", ye = "clientId", we = "bundles", be = "bundleId", Se = "namedQueries", De = "name", ve = "indexConfiguration", Ce = "indexId", Fe = "collectionGroupIndex", Me = "collectionGroup", xe = "indexState", Oe = [ "indexId", "uid" ], Ne = "sequenceNumberIndex", Be = [ "uid", "sequenceNumber" ], Le = "indexEntries", ke = [ "indexId", "uid", "arrayValue", "directionalValue", "orderedDocumentKey", "documentKey" ], qe = "documentKeyIndex", Qe = [ "indexId", "uid", "orderedDocumentKey" ], $e = "documentOverlays", Ue = [ "userId", "collectionPath", "documentId" ], Ke = "collectionPathOverlayIndex", We = [ "userId", "collectionPath", "largestBatchId" ], Ge = "collectionGroupOverlayIndex", ze = [ "userId", "collectionGroup", "largestBatchId" ], je = "globals", He = "name", Je = [ ...[ ...[ ...[ ...[ Y, X, ie, j, Pe, H, me, Ee ], pe ], le ], fe ], we, Se ], Ye = [ ...Je, $e ], Ze = [ Y, X, ie, se, Pe, H, me, Ee, pe, le, fe, we, Se, $e ], Xe = Ze, et = [ ...Xe, ve, xe, Le ], tt = et, nt = [ ...et, je ], rt = nt;
2442
2442
 
2443
2443
  /**
2444
2444
  * @license
@@ -6051,7 +6051,7 @@ class BloomFilter {
6051
6051
  r.modulo(this.ye).toNumber();
6052
6052
  }
6053
6053
  // Return whether the bit on the given index in the bitmap is set to 1.
6054
- Se(e) {
6054
+ be(e) {
6055
6055
  return !!(this.bitmap[Math.floor(e / 8)] & 1 << e % 8);
6056
6056
  }
6057
6057
  mightContain(e) {
@@ -6060,7 +6060,7 @@ class BloomFilter {
6060
6060
  const t = __PRIVATE_getMd5HashValue(e), [n, r] = __PRIVATE_get64BitUints(t);
6061
6061
  for (let e = 0; e < this.hashCount; e++) {
6062
6062
  const t = this.we(n, r, e);
6063
- if (!this.Se(t)) return !1;
6063
+ if (!this.be(t)) return !1;
6064
6064
  }
6065
6065
  return !0;
6066
6066
  }
@@ -6073,10 +6073,10 @@ class BloomFilter {
6073
6073
  const t = __PRIVATE_getMd5HashValue(e), [n, r] = __PRIVATE_get64BitUints(t);
6074
6074
  for (let e = 0; e < this.hashCount; e++) {
6075
6075
  const t = this.we(n, r, e);
6076
- this.be(t);
6076
+ this.Se(t);
6077
6077
  }
6078
6078
  }
6079
- be(e) {
6079
+ Se(e) {
6080
6080
  const t = Math.floor(e / 8), n = e % 8;
6081
6081
  this.bitmap[t] |= 1 << n;
6082
6082
  }
@@ -6703,7 +6703,7 @@ const wt = (() => {
6703
6703
  desc: "DESCENDING"
6704
6704
  };
6705
6705
  return e;
6706
- })(), St = (() => {
6706
+ })(), bt = (() => {
6707
6707
  const e = {
6708
6708
  "<": "LESS_THAN",
6709
6709
  "<=": "LESS_THAN_OR_EQUAL",
@@ -6717,7 +6717,7 @@ const wt = (() => {
6717
6717
  "array-contains-any": "ARRAY_CONTAINS_ANY"
6718
6718
  };
6719
6719
  return e;
6720
- })(), bt = (() => {
6720
+ })(), St = (() => {
6721
6721
  const e = {
6722
6722
  and: "AND",
6723
6723
  or: "OR"
@@ -7322,11 +7322,11 @@ function __PRIVATE_toDirection(e) {
7322
7322
  }
7323
7323
 
7324
7324
  function __PRIVATE_toOperatorName(e) {
7325
- return St[e];
7325
+ return bt[e];
7326
7326
  }
7327
7327
 
7328
7328
  function __PRIVATE_toCompositeOperatorName(e) {
7329
- return bt[e];
7329
+ return St[e];
7330
7330
  }
7331
7331
 
7332
7332
  function __PRIVATE_toFieldPathReference(e) {
@@ -7737,7 +7737,7 @@ function __PRIVATE_toDbIndexState(e, t, n, r) {
7737
7737
  /**
7738
7738
  * Helper to get a typed SimpleDbStore for the namedQueries object store.
7739
7739
  */ function __PRIVATE_namedQueriesStore(e) {
7740
- return __PRIVATE_getStore(e, be);
7740
+ return __PRIVATE_getStore(e, Se);
7741
7741
  }
7742
7742
 
7743
7743
  /**
@@ -7766,7 +7766,7 @@ function __PRIVATE_toDbIndexState(e, t, n, r) {
7766
7766
  constructor(e, t) {
7767
7767
  this.serializer = e, this.userId = t;
7768
7768
  }
7769
- static St(e, t) {
7769
+ static bt(e, t) {
7770
7770
  const n = t.uid || "";
7771
7771
  return new __PRIVATE_IndexedDbDocumentOverlayCache(e, n);
7772
7772
  }
@@ -7783,7 +7783,7 @@ function __PRIVATE_toDbIndexState(e, t, n, r) {
7783
7783
  const r = [];
7784
7784
  return n.forEach(((n, i) => {
7785
7785
  const s = new Overlay(t, i);
7786
- r.push(this.bt(e, s));
7786
+ r.push(this.St(e, s));
7787
7787
  })), PersistencePromise.waitFor(r);
7788
7788
  }
7789
7789
  removeOverlaysForBatchId(e, t, n) {
@@ -7828,7 +7828,7 @@ function __PRIVATE_toDbIndexState(e, t, n, r) {
7828
7828
  i.size() < r || o.largestBatchId === s ? (i.set(o.getKey(), o), s = o.largestBatchId) : n.done();
7829
7829
  })).next((() => i));
7830
7830
  }
7831
- bt(e, t) {
7831
+ St(e, t) {
7832
7832
  return __PRIVATE_documentOverlayStore(e).put(function __PRIVATE_toDbDocumentOverlay(e, t, n) {
7833
7833
  const [r, i, s] = __PRIVATE_toDbDocumentOverlayKey(t, n.mutation.key);
7834
7834
  return {
@@ -8406,11 +8406,11 @@ class __PRIVATE_TargetIndexMatcher {
8406
8406
  return !1;
8407
8407
  // If there is an array element, find a matching filter.
8408
8408
  const t = __PRIVATE_fieldIndexGetArraySegment(e);
8409
- if (void 0 !== t && !this.Sn(t)) return !1;
8409
+ if (void 0 !== t && !this.bn(t)) return !1;
8410
8410
  const n = __PRIVATE_fieldIndexGetDirectionalSegments(e);
8411
8411
  let r = new Set, i = 0, s = 0;
8412
8412
  // Process all equalities first. Equalities can appear out of order.
8413
- for (;i < n.length && this.Sn(n[i]); ++i) r = r.add(n[i].fieldPath.canonicalString());
8413
+ for (;i < n.length && this.bn(n[i]); ++i) r = r.add(n[i].fieldPath.canonicalString());
8414
8414
  // If we already have processed all segments, all segments are used to serve
8415
8415
  // the equality filters and we do not need to map any segments to the
8416
8416
  // target's inequality and orderBy clauses.
@@ -8423,7 +8423,7 @@ class __PRIVATE_TargetIndexMatcher {
8423
8423
  // and the first orderBy clause.
8424
8424
  if (!r.has(e.field.canonicalString())) {
8425
8425
  const t = n[i];
8426
- if (!this.bn(e, t) || !this.Dn(this.gn[s++], t)) return !1;
8426
+ if (!this.Sn(e, t) || !this.Dn(this.gn[s++], t)) return !1;
8427
8427
  }
8428
8428
  ++i;
8429
8429
  }
@@ -8465,11 +8465,11 @@ class __PRIVATE_TargetIndexMatcher {
8465
8465
  n.field.isKeyField() || e.has(n.field) || (e = e.add(n.field), t.push(new IndexSegment(n.field, "asc" /* Direction.ASCENDING */ === n.dir ? 0 /* IndexKind.ASCENDING */ : 1 /* IndexKind.DESCENDING */)));
8466
8466
  return new FieldIndex(FieldIndex.UNKNOWN_ID, this.collectionId, t, IndexState.empty());
8467
8467
  }
8468
- Sn(e) {
8469
- for (const t of this.pn) if (this.bn(t, e)) return !0;
8468
+ bn(e) {
8469
+ for (const t of this.pn) if (this.Sn(t, e)) return !0;
8470
8470
  return !1;
8471
8471
  }
8472
- bn(e, t) {
8472
+ Sn(e, t) {
8473
8473
  if (void 0 === e || !e.field.isEqual(t.fieldPath)) return !1;
8474
8474
  const n = "array-contains" /* Operator.ARRAY_CONTAINS */ === e.op || "array-contains-any" /* Operator.ARRAY_CONTAINS_ANY */ === e.op;
8475
8475
  return 2 /* IndexKind.CONTAINS */ === t.kind === n;
@@ -9439,7 +9439,7 @@ class __PRIVATE_IndexedDbMutationQueue {
9439
9439
  * Creates a new mutation queue for the given user.
9440
9440
  * @param user - The user for which to create a mutation queue.
9441
9441
  * @param serializer - The serializer to use when persisting to IndexedDb.
9442
- */ static St(e, t, n, r) {
9442
+ */ static bt(e, t, n, r) {
9443
9443
  // TODO(mcg): Figure out what constraints there are on userIDs
9444
9444
  // In particular, are there any reserved characters? are empty ids allowed?
9445
9445
  // For the moment store these together in the same mutations table assuming
@@ -10123,10 +10123,10 @@ function __PRIVATE_newLruGarbageCollector(e, t) {
10123
10123
  this.db = e, this.garbageCollector = __PRIVATE_newLruGarbageCollector(this, t);
10124
10124
  }
10125
10125
  pr(e) {
10126
- const t = this.Sr(e);
10126
+ const t = this.br(e);
10127
10127
  return this.db.getTargetCache().getTargetCount(e).next((e => t.next((t => e + t))));
10128
10128
  }
10129
- Sr(e) {
10129
+ br(e) {
10130
10130
  let t = 0;
10131
10131
  return this.yr(e, (e => {
10132
10132
  t++;
@@ -10136,7 +10136,7 @@ function __PRIVATE_newLruGarbageCollector(e, t) {
10136
10136
  return this.db.getTargetCache().forEachTarget(e, t);
10137
10137
  }
10138
10138
  yr(e, t) {
10139
- return this.br(e, ((e, n) => t(n)));
10139
+ return this.Sr(e, ((e, n) => t(n)));
10140
10140
  }
10141
10141
  addReference(e, t, n) {
10142
10142
  return __PRIVATE_writeSentinelKey(e, n);
@@ -10165,7 +10165,7 @@ function __PRIVATE_newLruGarbageCollector(e, t) {
10165
10165
  removeOrphanedDocuments(e, t) {
10166
10166
  const n = this.db.getRemoteDocumentCache().newChangeBuffer(), r = [];
10167
10167
  let i = 0;
10168
- return this.br(e, ((s, o) => {
10168
+ return this.Sr(e, ((s, o) => {
10169
10169
  if (o <= t) {
10170
10170
  const t = this.Dr(e, s).next((t => {
10171
10171
  if (!t)
@@ -10196,7 +10196,7 @@ function __PRIVATE_newLruGarbageCollector(e, t) {
10196
10196
  * means not a part of any target, so the only entry in the target-document index for
10197
10197
  * that document will be the sentinel row (targetId 0), which will also have the sequence
10198
10198
  * number for the last time the document was accessed.
10199
- */ br(e, t) {
10199
+ */ Sr(e, t) {
10200
10200
  const n = __PRIVATE_documentTargetStore(e);
10201
10201
  let r, i = __PRIVATE_ListenSequence.le;
10202
10202
  return n.te({
@@ -11032,7 +11032,7 @@ class OverlayedDocument {
11032
11032
  }
11033
11033
  saveOverlays(e, t, n) {
11034
11034
  return n.forEach(((n, r) => {
11035
- this.bt(e, t, r);
11035
+ this.St(e, t, r);
11036
11036
  })), PersistencePromise.resolve();
11037
11037
  }
11038
11038
  removeOverlaysForBatchId(e, t, n) {
@@ -11067,7 +11067,7 @@ class OverlayedDocument {
11067
11067
  }
11068
11068
  return PersistencePromise.resolve(o);
11069
11069
  }
11070
- bt(e, t, n) {
11070
+ St(e, t, n) {
11071
11071
  // Remove the association of the overlay to its batch id.
11072
11072
  const r = this.overlays.get(n.key);
11073
11073
  if (null !== r) {
@@ -11780,10 +11780,10 @@ class __PRIVATE_MemoryLruDelegate {
11780
11780
  return this.persistence.getTargetCache().forEachTarget(e, t);
11781
11781
  }
11782
11782
  pr(e) {
11783
- const t = this.Sr(e);
11783
+ const t = this.br(e);
11784
11784
  return this.persistence.getTargetCache().getTargetCount(e).next((e => t.next((t => e + t))));
11785
11785
  }
11786
- Sr(e) {
11786
+ br(e) {
11787
11787
  let t = 0;
11788
11788
  return this.yr(e, (e => {
11789
11789
  t++;
@@ -11931,7 +11931,7 @@ class __PRIVATE_MemoryLruDelegate {
11931
11931
  }(e);
11932
11932
  }))), n < 5 && r >= 5 && (s = s.next((() => this.wi(i)))), n < 6 && r >= 6 && (s = s.next((() => (function __PRIVATE_createDocumentGlobalStore(e) {
11933
11933
  e.createObjectStore(le);
11934
- }(e), this.Si(i))))), n < 7 && r >= 7 && (s = s.next((() => this.bi(i)))), n < 8 && r >= 8 && (s = s.next((() => this.Di(e, i)))),
11934
+ }(e), this.bi(i))))), n < 7 && r >= 7 && (s = s.next((() => this.Si(i)))), n < 8 && r >= 8 && (s = s.next((() => this.Di(e, i)))),
11935
11935
  n < 9 && r >= 9 && (s = s.next((() => {
11936
11936
  // Multi-Tab used to manage its own changelog, but this has been moved
11937
11937
  // to the DbRemoteDocument object store itself. Since the previous change
@@ -11944,10 +11944,10 @@ class __PRIVATE_MemoryLruDelegate {
11944
11944
  }))), n < 10 && r >= 10 && (s = s.next((() => this.Ci(i)))), n < 11 && r >= 11 && (s = s.next((() => {
11945
11945
  !function __PRIVATE_createBundlesStore(e) {
11946
11946
  e.createObjectStore(we, {
11947
- keyPath: Se
11947
+ keyPath: be
11948
11948
  });
11949
11949
  }(e), function __PRIVATE_createNamedQueriesStore(e) {
11950
- e.createObjectStore(be, {
11950
+ e.createObjectStore(Se, {
11951
11951
  keyPath: De
11952
11952
  });
11953
11953
  }(e);
@@ -12006,7 +12006,7 @@ class __PRIVATE_MemoryLruDelegate {
12006
12006
  t.objectStore(Le).clear();
12007
12007
  }))), s;
12008
12008
  }
12009
- Si(e) {
12009
+ bi(e) {
12010
12010
  let t = 0;
12011
12011
  return e.store(j).te(((e, n) => {
12012
12012
  t += __PRIVATE_dbDocumentSize(n);
@@ -12033,7 +12033,7 @@ class __PRIVATE_MemoryLruDelegate {
12033
12033
  /**
12034
12034
  * Ensures that every document in the remote document cache has a corresponding sentinel row
12035
12035
  * with a sequence number. Missing rows are given the most recently used sequence number.
12036
- */ bi(e) {
12036
+ */ Si(e) {
12037
12037
  const t = e.store(Ee), n = e.store(j);
12038
12038
  return e.store(me).get(Ve).next((e => {
12039
12039
  const r = [];
@@ -12128,7 +12128,7 @@ class __PRIVATE_MemoryLruDelegate {
12128
12128
  __PRIVATE_fromDbMutationBatch(this.serializer, e).keys().forEach((e => r = r.add(e))),
12129
12129
  n.set(e.userId, r);
12130
12130
  })), PersistencePromise.forEach(n, ((e, n) => {
12131
- const s = new User(n), o = __PRIVATE_IndexedDbDocumentOverlayCache.St(this.serializer, s), _ = i.getIndexManager(s), a = __PRIVATE_IndexedDbMutationQueue.St(s, this.serializer, _, i.referenceDelegate);
12131
+ const s = new User(n), o = __PRIVATE_IndexedDbDocumentOverlayCache.bt(this.serializer, s), _ = i.getIndexManager(s), a = __PRIVATE_IndexedDbMutationQueue.bt(s, this.serializer, _, i.referenceDelegate);
12132
12132
  return new LocalDocumentsView(r, a, o, _).recalculateAndSaveOverlaysForDocumentKeys(new __PRIVATE_IndexedDbTransaction(t, __PRIVATE_ListenSequence.le), e).next();
12133
12133
  }));
12134
12134
  }));
@@ -12437,7 +12437,7 @@ class __PRIVATE_IndexedDbPersistence {
12437
12437
  return this.Pi;
12438
12438
  }
12439
12439
  getMutationQueue(e, t) {
12440
- return __PRIVATE_IndexedDbMutationQueue.St(e, this.serializer, t, this.referenceDelegate);
12440
+ return __PRIVATE_IndexedDbMutationQueue.bt(e, this.serializer, t, this.referenceDelegate);
12441
12441
  }
12442
12442
  getTargetCache() {
12443
12443
  return this.Ti;
@@ -12449,7 +12449,7 @@ class __PRIVATE_IndexedDbPersistence {
12449
12449
  return new __PRIVATE_IndexedDbIndexManager(e, this.serializer.wt.databaseId);
12450
12450
  }
12451
12451
  getDocumentOverlayCache(e) {
12452
- return __PRIVATE_IndexedDbDocumentOverlayCache.St(this.serializer, e);
12452
+ return __PRIVATE_IndexedDbDocumentOverlayCache.bt(this.serializer, e);
12453
12453
  }
12454
12454
  getBundleCache() {
12455
12455
  return this.Ei;
@@ -12769,13 +12769,13 @@ class __PRIVATE_QueryEngine {
12769
12769
  return this.ws(e, t).next((e => {
12770
12770
  i.result = e;
12771
12771
  })).next((() => {
12772
- if (!i.result) return this.Ss(e, t, r, n).next((e => {
12772
+ if (!i.result) return this.bs(e, t, r, n).next((e => {
12773
12773
  i.result = e;
12774
12774
  }));
12775
12775
  })).next((() => {
12776
12776
  if (i.result) return;
12777
12777
  const n = new QueryContext;
12778
- return this.bs(e, t, n).next((r => {
12778
+ return this.Ss(e, t, n).next((r => {
12779
12779
  if (i.result = r, this.fs) return this.Ds(e, t, n, r.size);
12780
12780
  }));
12781
12781
  })).next((() => i.result));
@@ -12816,7 +12816,7 @@ class __PRIVATE_QueryEngine {
12816
12816
  /**
12817
12817
  * Performs a query based on the target's persisted query mapping. Returns
12818
12818
  * `null` if the mapping is not available or cannot be used.
12819
- */ Ss(e, t, n, r) {
12819
+ */ bs(e, t, n, r) {
12820
12820
  return __PRIVATE_queryMatchesAllDocuments(t) || r.isEqual(SnapshotVersion.min()) ? PersistencePromise.resolve(null) : this.ys.getDocuments(e, n).next((i => {
12821
12821
  const s = this.vs(t, i);
12822
12822
  return this.Cs(t, s, n, r) ? PersistencePromise.resolve(null) : (__PRIVATE_getLogLevel() <= logger.LogLevel.DEBUG && __PRIVATE_logDebug("QueryEngine", "Re-using previous result from %s to execute query: %s", r.toString(), __PRIVATE_stringifyQuery(t)),
@@ -12863,7 +12863,7 @@ class __PRIVATE_QueryEngine {
12863
12863
  const i = "F" /* LimitType.First */ === e.limitType ? t.last() : t.first();
12864
12864
  return !!i && (i.hasPendingWrites || i.version.compareTo(r) > 0);
12865
12865
  }
12866
- bs(e, t, n) {
12866
+ Ss(e, t, n) {
12867
12867
  return __PRIVATE_getLogLevel() <= logger.LogLevel.DEBUG && __PRIVATE_logDebug("QueryEngine", "Using full collection scan to execute query:", __PRIVATE_stringifyQuery(t)),
12868
12868
  this.ys.getDocumentsMatchingQuery(e, t, IndexOffset.min(), n);
12869
12869
  }
@@ -13739,7 +13739,7 @@ class __PRIVATE_LocalClientState {
13739
13739
  } else if (this.oo.test(t.key)) {
13740
13740
  if (null !== t.newValue) {
13741
13741
  const e = this.wo(t.key, t.newValue);
13742
- if (e) return this.So(e);
13742
+ if (e) return this.bo(e);
13743
13743
  }
13744
13744
  } else if (t.key === this._o) {
13745
13745
  if (null !== t.newValue) {
@@ -13752,7 +13752,7 @@ class __PRIVATE_LocalClientState {
13752
13752
  if (null != e) try {
13753
13753
  const n = JSON.parse(e);
13754
13754
  __PRIVATE_hardAssert("number" == typeof n, 30636, {
13755
- bo: e
13755
+ So: e
13756
13756
  }), t = n;
13757
13757
  } catch (e) {
13758
13758
  __PRIVATE_logError(Gt, "Failed to read sequence number from WebStorage", e);
@@ -13843,7 +13843,7 @@ class __PRIVATE_LocalClientState {
13843
13843
  if (e.user.uid === this.currentUser.uid) return this.syncEngine.Co(e.batchId, e.state, e.error);
13844
13844
  __PRIVATE_logDebug(Gt, `Ignoring mutation for non-active user ${e.user.uid}`);
13845
13845
  }
13846
- So(e) {
13846
+ bo(e) {
13847
13847
  return this.syncEngine.Fo(e.targetId, e.state, e.error);
13848
13848
  }
13849
13849
  mo(e, t) {
@@ -14615,7 +14615,7 @@ class __PRIVATE_PersistentStream {
14615
14615
  * getCloseGuardedDispatcher() to invalidate callbacks that happen after
14616
14616
  * close.
14617
14617
  */
14618
- this.S_ = 0, this.b_ = null, this.D_ = null, this.stream = null,
14618
+ this.b_ = 0, this.S_ = null, this.D_ = null, this.stream = null,
14619
14619
  /**
14620
14620
  * Count of response messages received.
14621
14621
  */
@@ -14675,7 +14675,7 @@ class __PRIVATE_PersistentStream {
14675
14675
  */ N_() {
14676
14676
  // Starts the idle time if we are in state 'Open' and are not yet already
14677
14677
  // running a timer (in which case the previous idle timeout still applies).
14678
- this.M_() && null === this.b_ && (this.b_ = this.xi.enqueueAfterDelay(this.y_, 6e4, (() => this.B_())));
14678
+ this.M_() && null === this.S_ && (this.S_ = this.xi.enqueueAfterDelay(this.y_, 6e4, (() => this.B_())));
14679
14679
  }
14680
14680
  /** Sends a message to the underlying stream. */ L_(e) {
14681
14681
  this.k_(), this.stream.send(e);
@@ -14687,7 +14687,7 @@ class __PRIVATE_PersistentStream {
14687
14687
  return this.close(0 /* PersistentStreamState.Initial */);
14688
14688
  }
14689
14689
  /** Marks the stream as active again. */ k_() {
14690
- this.b_ && (this.b_.cancel(), this.b_ = null);
14690
+ this.S_ && (this.S_.cancel(), this.S_ = null);
14691
14691
  }
14692
14692
  /** Cancels the health check delayed operation. */ q_() {
14693
14693
  this.D_ && (this.D_.cancel(), this.D_ = null);
@@ -14709,7 +14709,7 @@ class __PRIVATE_PersistentStream {
14709
14709
  this.k_(), this.q_(), this.C_.cancel(),
14710
14710
  // Invalidates any stream-related callbacks (e.g. from auth or the
14711
14711
  // underlying stream), guaranteeing they won't execute.
14712
- this.S_++, 4 /* PersistentStreamState.Error */ !== e ?
14712
+ this.b_++, 4 /* PersistentStreamState.Error */ !== e ?
14713
14713
  // If this is an intentional close ensure we don't delay our next connection attempt.
14714
14714
  this.C_.reset() : t && t.code === N.RESOURCE_EXHAUSTED ? (
14715
14715
  // Log the error. (Probably either 'quota exceeded' or 'max queue length reached'.)
@@ -14736,14 +14736,14 @@ class __PRIVATE_PersistentStream {
14736
14736
  */ Q_() {}
14737
14737
  auth() {
14738
14738
  this.state = 1 /* PersistentStreamState.Starting */;
14739
- const e = this.U_(this.S_), t = this.S_;
14739
+ const e = this.U_(this.b_), t = this.b_;
14740
14740
  // TODO(mikelehen): Just use dispatchIfNotClosed, but see TODO below.
14741
14741
  Promise.all([ this.authCredentialsProvider.getToken(), this.appCheckCredentialsProvider.getToken() ]).then((([e, n]) => {
14742
14742
  // Stream can be stopped while waiting for authentication.
14743
14743
  // TODO(mikelehen): We really should just use dispatchIfNotClosed
14744
14744
  // and let this dispatch onto the queue, but that opened a spec test can
14745
14745
  // of worms that I don't want to deal with in this PR.
14746
- this.S_ === t &&
14746
+ this.b_ === t &&
14747
14747
  // Normally we'd have to schedule the callback on the AsyncQueue.
14748
14748
  // However, the following calls are safe to be called outside the
14749
14749
  // AsyncQueue since they don't chain asynchronous calls
@@ -14756,7 +14756,7 @@ class __PRIVATE_PersistentStream {
14756
14756
  }));
14757
14757
  }
14758
14758
  K_(e, t) {
14759
- const n = this.U_(this.S_);
14759
+ const n = this.U_(this.b_);
14760
14760
  this.stream = this.G_(e, t), this.stream.e_((() => {
14761
14761
  n((() => this.listener.e_()));
14762
14762
  })), this.stream.n_((() => {
@@ -14788,7 +14788,7 @@ class __PRIVATE_PersistentStream {
14788
14788
  * re-opened, etc.
14789
14789
  */ U_(e) {
14790
14790
  return t => {
14791
- this.xi.enqueueAndForget((() => this.S_ === e ? t() : (__PRIVATE_logDebug(Zt, "stream callback skipped by getCloseGuardedDispatcher."),
14791
+ this.xi.enqueueAndForget((() => this.b_ === e ? t() : (__PRIVATE_logDebug(Zt, "stream callback skipped by getCloseGuardedDispatcher."),
14792
14792
  Promise.resolve())));
14793
14793
  };
14794
14794
  }
@@ -15838,14 +15838,14 @@ class ViewSnapshot {
15838
15838
  }
15839
15839
  // Helper methods that checks if the query has listeners that listening to remote store
15840
15840
  wa() {
15841
- return this.ya.some((e => e.Sa()));
15841
+ return this.ya.some((e => e.ba()));
15842
15842
  }
15843
15843
  }
15844
15844
 
15845
15845
  class __PRIVATE_EventManagerImpl {
15846
15846
  constructor() {
15847
15847
  this.queries = __PRIVATE_newQueriesObjectMap(), this.onlineState = "Unknown" /* OnlineState.Unknown */ ,
15848
- this.ba = new Set;
15848
+ this.Sa = new Set;
15849
15849
  }
15850
15850
  terminate() {
15851
15851
  !function __PRIVATE_errorAllTargets(e, t) {
@@ -15869,10 +15869,10 @@ async function __PRIVATE_eventManagerListen(e, t) {
15869
15869
  let r = 3 /* ListenerSetupAction.NoActionRequired */;
15870
15870
  const i = t.query;
15871
15871
  let s = n.queries.get(i);
15872
- s ? !s.wa() && t.Sa() && (
15872
+ s ? !s.wa() && t.ba() && (
15873
15873
  // Query has been listening to local cache, and tries to add a new listener sourced from watch.
15874
15874
  r = 2 /* ListenerSetupAction.RequireWatchConnectionOnly */) : (s = new __PRIVATE_QueryListenersInfo,
15875
- r = t.Sa() ? 0 /* ListenerSetupAction.InitializeLocalListenAndRequireWatchConnection */ : 1 /* ListenerSetupAction.InitializeLocalListenOnly */);
15875
+ r = t.ba() ? 0 /* ListenerSetupAction.InitializeLocalListenAndRequireWatchConnection */ : 1 /* ListenerSetupAction.InitializeLocalListenOnly */);
15876
15876
  try {
15877
15877
  switch (r) {
15878
15878
  case 0 /* ListenerSetupAction.InitializeLocalListenAndRequireWatchConnection */ :
@@ -15905,7 +15905,7 @@ async function __PRIVATE_eventManagerUnlisten(e, t) {
15905
15905
  const s = n.queries.get(r);
15906
15906
  if (s) {
15907
15907
  const e = s.ya.indexOf(t);
15908
- e >= 0 && (s.ya.splice(e, 1), 0 === s.ya.length ? i = t.Sa() ? 0 /* ListenerRemovalAction.TerminateLocalListenAndRequireWatchDisconnection */ : 1 /* ListenerRemovalAction.TerminateLocalListenOnly */ : !s.wa() && t.Sa() && (
15908
+ e >= 0 && (s.ya.splice(e, 1), 0 === s.ya.length ? i = t.ba() ? 0 /* ListenerRemovalAction.TerminateLocalListenAndRequireWatchDisconnection */ : 1 /* ListenerRemovalAction.TerminateLocalListenOnly */ : !s.wa() && t.ba() && (
15909
15909
  // The removed listener is the last one that sourced from watch.
15910
15910
  i = 2 /* ListenerRemovalAction.RequireWatchDisconnectionOnly */));
15911
15911
  }
@@ -15948,7 +15948,7 @@ function __PRIVATE_eventManagerOnWatchError(e, t, n) {
15948
15948
  }
15949
15949
 
15950
15950
  function __PRIVATE_raiseSnapshotsInSyncEvent(e) {
15951
- e.ba.forEach((e => {
15951
+ e.Sa.forEach((e => {
15952
15952
  e.next();
15953
15953
  }));
15954
15954
  }
@@ -16006,7 +16006,7 @@ class __PRIVATE_QueryListener {
16006
16006
  // Always raise the first event when we're synced
16007
16007
  if (!e.fromCache) return !0;
16008
16008
  // Always raise event if listening to cache
16009
- if (!this.Sa()) return !0;
16009
+ if (!this.ba()) return !0;
16010
16010
  // NOTE: We consider OnlineState.Unknown as online (it should become Offline
16011
16011
  // or Online if we wait long enough).
16012
16012
  const n = "Offline" /* OnlineState.Offline */ !== t;
@@ -16032,7 +16032,7 @@ class __PRIVATE_QueryListener {
16032
16032
  e = ViewSnapshot.fromInitialDocuments(e.query, e.docs, e.mutatedKeys, e.fromCache, e.hasCachedResults),
16033
16033
  this.Ma = !0, this.Fa.next(e);
16034
16034
  }
16035
- Sa() {
16035
+ ba() {
16036
16036
  return this.options.source !== en.Cache;
16037
16037
  }
16038
16038
  }
@@ -17332,12 +17332,12 @@ class __PRIVATE_MemoryOfflineComponentProvider {
17332
17332
  async initialize(e) {
17333
17333
  this.serializer = __PRIVATE_newSerializer(e.databaseInfo.databaseId), this.sharedClientState = this.pu(e),
17334
17334
  this.persistence = this.yu(e), await this.persistence.start(), this.localStore = this.wu(e),
17335
- this.gcScheduler = this.Su(e, this.localStore), this.indexBackfillerScheduler = this.bu(e, this.localStore);
17335
+ this.gcScheduler = this.bu(e, this.localStore), this.indexBackfillerScheduler = this.Su(e, this.localStore);
17336
17336
  }
17337
- Su(e, t) {
17337
+ bu(e, t) {
17338
17338
  return null;
17339
17339
  }
17340
- bu(e, t) {
17340
+ Su(e, t) {
17341
17341
  return null;
17342
17342
  }
17343
17343
  wu(e) {
@@ -17364,7 +17364,7 @@ class __PRIVATE_LruGcMemoryOfflineComponentProvider extends __PRIVATE_MemoryOffl
17364
17364
  constructor(e) {
17365
17365
  super(), this.cacheSizeBytes = e;
17366
17366
  }
17367
- Su(e, t) {
17367
+ bu(e, t) {
17368
17368
  __PRIVATE_hardAssert(this.persistence.referenceDelegate instanceof __PRIVATE_MemoryLruDelegate, 46915);
17369
17369
  const n = this.persistence.referenceDelegate.garbageCollector;
17370
17370
  return new __PRIVATE_LruScheduler(n, e.asyncQueue, t);
@@ -17395,11 +17395,11 @@ class __PRIVATE_LruGcMemoryOfflineComponentProvider extends __PRIVATE_MemoryOffl
17395
17395
  wu(e) {
17396
17396
  return __PRIVATE_newLocalStore(this.persistence, new __PRIVATE_QueryEngine, e.initialUser, this.serializer);
17397
17397
  }
17398
- Su(e, t) {
17398
+ bu(e, t) {
17399
17399
  const n = this.persistence.referenceDelegate.garbageCollector;
17400
17400
  return new __PRIVATE_LruScheduler(n, e.asyncQueue, t);
17401
17401
  }
17402
- bu(e, t) {
17402
+ Su(e, t) {
17403
17403
  const n = new __PRIVATE_IndexBackfiller(t, this.persistence);
17404
17404
  return new __PRIVATE_IndexBackfillerScheduler(e.asyncQueue, n);
17405
17405
  }
@@ -18242,13 +18242,13 @@ function __PRIVATE_firestoreClientRunAggregateQuery(e, t, n) {
18242
18242
  function __PRIVATE_firestoreClientAddSnapshotsInSyncListener(e, t) {
18243
18243
  const n = new __PRIVATE_AsyncObserver(t);
18244
18244
  return e.asyncQueue.enqueueAndForget((async () => function __PRIVATE_addSnapshotsInSyncListener(e, t) {
18245
- __PRIVATE_debugCast(e).ba.add(t),
18245
+ __PRIVATE_debugCast(e).Sa.add(t),
18246
18246
  // Immediately fire an initial event, indicating all existing listeners
18247
18247
  // are in-sync.
18248
18248
  t.next();
18249
18249
  }(await __PRIVATE_getEventManager(e), n))), () => {
18250
18250
  n.Cu(), e.asyncQueue.enqueueAndForget((async () => function __PRIVATE_removeSnapshotsInSyncListener(e, t) {
18251
- __PRIVATE_debugCast(e).ba.delete(t);
18251
+ __PRIVATE_debugCast(e).Sa.delete(t);
18252
18252
  }(await __PRIVATE_getEventManager(e), n)));
18253
18253
  };
18254
18254
  }
@@ -22565,7 +22565,7 @@ function _internalQueryToProtoQueryTarget(e) {
22565
22565
  * The implementation of `TestingHooksSpi`.
22566
22566
  */ class __PRIVATE_TestingHooksSpiImpl {
22567
22567
  constructor() {
22568
- this.Sc = new Map;
22568
+ this.bc = new Map;
22569
22569
  }
22570
22570
  static get instance() {
22571
22571
  return Tn || (Tn = new __PRIVATE_TestingHooksSpiImpl, function __PRIVATE_setTestingHooksSpi(e) {
@@ -22574,10 +22574,10 @@ function _internalQueryToProtoQueryTarget(e) {
22574
22574
  }(Tn)), Tn;
22575
22575
  }
22576
22576
  ht(e) {
22577
- this.Sc.forEach((t => t(e)));
22577
+ this.bc.forEach((t => t(e)));
22578
22578
  }
22579
22579
  onExistenceFilterMismatch(e) {
22580
- const t = Symbol(), n = this.Sc;
22580
+ const t = Symbol(), n = this.bc;
22581
22581
  return n.set(t, e), () => n.delete(t);
22582
22582
  }
22583
22583
  }