@ridp/threejs 1.2.0 → 1.2.2

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.
@@ -125,8 +125,8 @@ class go extends Ds {
125
125
  );
126
126
  }
127
127
  let u;
128
- const c = this.workerNextTaskID++, l = s.byteLength, p = this._getWorker(c, l).then((h) => (u = h, new Promise((y, E) => {
129
- u._callbacks[c] = { resolve: y, reject: E }, u.postMessage({ type: "decode", id: c, taskConfig: o, buffer: s }, [s]);
128
+ const c = this.workerNextTaskID++, l = s.byteLength, p = this._getWorker(c, l).then((h) => (u = h, new Promise((y, A) => {
129
+ u._callbacks[c] = { resolve: y, reject: A }, u.postMessage({ type: "decode", id: c, taskConfig: o, buffer: s }, [s]);
130
130
  }))).then((h) => this._createGeometry(h.geometry));
131
131
  return p.catch(() => !0).then(() => {
132
132
  u && c && this._releaseTask(u, c);
@@ -219,16 +219,16 @@ function vo() {
219
219
  const p = l.data;
220
220
  switch (p.type) {
221
221
  case "init":
222
- C = p.decoderConfig, s = new Promise(function(E) {
222
+ C = p.decoderConfig, s = new Promise(function(A) {
223
223
  C.onModuleLoaded = function(w) {
224
- E({ draco: w });
224
+ A({ draco: w });
225
225
  }, DracoDecoderModule(C);
226
226
  });
227
227
  break;
228
228
  case "decode":
229
229
  const h = p.buffer, y = p.taskConfig;
230
- s.then((E) => {
231
- const w = E.draco, P = new w.Decoder();
230
+ s.then((A) => {
231
+ const w = A.draco, P = new w.Decoder();
232
232
  try {
233
233
  const L = o(w, P, new Int8Array(h), y), q = L.attributes.map((X) => X.array.buffer);
234
234
  L.index && q.push(L.index.array.buffer), self.postMessage({ type: "decode", id: p.id, geometry: L }, q);
@@ -242,7 +242,7 @@ function vo() {
242
242
  }
243
243
  };
244
244
  function o(l, p, h, y) {
245
- const E = y.attributeIDs, w = y.attributeTypes;
245
+ const A = y.attributeIDs, w = y.attributeTypes;
246
246
  let P, L;
247
247
  const q = p.GetEncodedGeometryType(h);
248
248
  if (q === l.TRIANGULAR_MESH)
@@ -254,13 +254,13 @@ function vo() {
254
254
  if (!L.ok() || P.ptr === 0)
255
255
  throw new Error("THREE.DRACOLoader: Decoding failed: " + L.error_msg());
256
256
  const X = { index: null, attributes: [] };
257
- for (const G in E) {
257
+ for (const G in A) {
258
258
  const W = self[w[G]];
259
259
  let Z, ce;
260
260
  if (y.useUniqueIDs)
261
- ce = E[G], Z = p.GetAttributeByUniqueId(P, ce);
261
+ ce = A[G], Z = p.GetAttributeByUniqueId(P, ce);
262
262
  else {
263
- if (ce = p.GetAttributeId(P, l[E[G]]), ce === -1) continue;
263
+ if (ce = p.GetAttributeId(P, l[A[G]]), ce === -1) continue;
264
264
  Z = p.GetAttribute(P, ce);
265
265
  }
266
266
  const Y = u(l, p, P, G, W, Z);
@@ -269,15 +269,15 @@ function vo() {
269
269
  return q === l.TRIANGULAR_MESH && (X.index = a(l, p, P)), l.destroy(P), X;
270
270
  }
271
271
  function a(l, p, h) {
272
- const E = h.num_faces() * 3, w = E * 4, P = l._malloc(w);
272
+ const A = h.num_faces() * 3, w = A * 4, P = l._malloc(w);
273
273
  p.GetTrianglesUInt32Array(h, w, P);
274
- const L = new Uint32Array(l.HEAPF32.buffer, P, E).slice();
274
+ const L = new Uint32Array(l.HEAPF32.buffer, P, A).slice();
275
275
  return l._free(P), { array: L, itemSize: 1 };
276
276
  }
277
- function u(l, p, h, y, E, w) {
278
- const P = w.num_components(), q = h.num_points() * P, X = q * E.BYTES_PER_ELEMENT, G = c(l, E), W = l._malloc(X);
277
+ function u(l, p, h, y, A, w) {
278
+ const P = w.num_components(), q = h.num_points() * P, X = q * A.BYTES_PER_ELEMENT, G = c(l, A), W = l._malloc(X);
279
279
  p.GetAttributeDataArrayForAllPoints(h, w, G, X, W);
280
- const Z = new E(l.HEAPF32.buffer, W, q).slice();
280
+ const Z = new A(l.HEAPF32.buffer, W, q).slice();
281
281
  return l._free(W), {
282
282
  name: y,
283
283
  array: Z,
@@ -371,11 +371,11 @@ class bo extends Ds {
371
371
  }, h = new Dn(this.manager);
372
372
  h.setPath(this.path), h.setResponseType("arraybuffer"), h.setRequestHeader(this.requestHeader), h.setWithCredentials(this.withCredentials), h.load(s, function(y) {
373
373
  try {
374
- c.parse(y, l, function(E) {
375
- o(E), c.manager.itemEnd(s);
374
+ c.parse(y, l, function(A) {
375
+ o(A), c.manager.itemEnd(s);
376
376
  }, p);
377
- } catch (E) {
378
- p(E);
377
+ } catch (A) {
378
+ p(A);
379
379
  }
380
380
  }, a, p);
381
381
  }
@@ -468,13 +468,13 @@ class bo extends Ds {
468
468
  meshoptDecoder: this.meshoptDecoder
469
469
  });
470
470
  y.fileLoader.setRequestHeader(this.requestHeader);
471
- for (let E = 0; E < this.pluginCallbacks.length; E++) {
472
- const w = this.pluginCallbacks[E](y);
471
+ for (let A = 0; A < this.pluginCallbacks.length; A++) {
472
+ const w = this.pluginCallbacks[A](y);
473
473
  w.name || console.error("THREE.GLTFLoader: Invalid plugin found: missing name"), p[w.name] = w, l[w.name] = !0;
474
474
  }
475
475
  if (c.extensionsUsed)
476
- for (let E = 0; E < c.extensionsUsed.length; ++E) {
477
- const w = c.extensionsUsed[E], P = c.extensionsRequired || [];
476
+ for (let A = 0; A < c.extensionsUsed.length; ++A) {
477
+ const w = c.extensionsUsed[A], P = c.extensionsRequired || [];
478
478
  switch (w) {
479
479
  case ne.KHR_MATERIALS_UNLIT:
480
480
  l[w] = new xo();
@@ -567,18 +567,18 @@ class _o {
567
567
  if (u) return u;
568
568
  const c = o.json, h = ((c.extensions && c.extensions[this.name] || {}).lights || [])[s];
569
569
  let y;
570
- const E = new Qe(16777215);
571
- h.color !== void 0 && E.setRGB(h.color[0], h.color[1], h.color[2], He);
570
+ const A = new Qe(16777215);
571
+ h.color !== void 0 && A.setRGB(h.color[0], h.color[1], h.color[2], He);
572
572
  const w = h.range !== void 0 ? h.range : 0;
573
573
  switch (h.type) {
574
574
  case "directional":
575
- y = new Ri(E), y.target.position.set(0, 0, -1), y.add(y.target);
575
+ y = new Ri(A), y.target.position.set(0, 0, -1), y.add(y.target);
576
576
  break;
577
577
  case "point":
578
- y = new Si(E), y.distance = w;
578
+ y = new Si(A), y.distance = w;
579
579
  break;
580
580
  case "spot":
581
- y = new Ai(E), y.distance = w, h.spot = h.spot || {}, h.spot.innerConeAngle = h.spot.innerConeAngle !== void 0 ? h.spot.innerConeAngle : 0, h.spot.outerConeAngle = h.spot.outerConeAngle !== void 0 ? h.spot.outerConeAngle : Math.PI / 4, y.angle = h.spot.outerConeAngle, y.penumbra = 1 - h.spot.innerConeAngle / h.spot.outerConeAngle, y.target.position.set(0, 0, -1), y.add(y.target);
581
+ y = new Ai(A), y.distance = w, h.spot = h.spot || {}, h.spot.innerConeAngle = h.spot.innerConeAngle !== void 0 ? h.spot.innerConeAngle : 0, h.spot.outerConeAngle = h.spot.outerConeAngle !== void 0 ? h.spot.outerConeAngle : Math.PI / 4, y.angle = h.spot.outerConeAngle, y.penumbra = 1 - h.spot.innerConeAngle / h.spot.outerConeAngle, y.target.position.set(0, 0, -1), y.add(y.target);
582
582
  break;
583
583
  default:
584
584
  throw new Error("THREE.GLTFLoader: Unexpected light type: " + h.type);
@@ -868,12 +868,12 @@ class Fo {
868
868
  return null;
869
869
  }
870
870
  return c.then(function(p) {
871
- const h = u.byteOffset || 0, y = u.byteLength || 0, E = u.count, w = u.byteStride, P = new Uint8Array(p, h, y);
872
- return l.decodeGltfBufferAsync ? l.decodeGltfBufferAsync(E, w, P, u.mode, u.filter).then(function(L) {
871
+ const h = u.byteOffset || 0, y = u.byteLength || 0, A = u.count, w = u.byteStride, P = new Uint8Array(p, h, y);
872
+ return l.decodeGltfBufferAsync ? l.decodeGltfBufferAsync(A, w, P, u.mode, u.filter).then(function(L) {
873
873
  return L.buffer;
874
874
  }) : l.ready.then(function() {
875
- const L = new ArrayBuffer(E * w);
876
- return l.decodeGltfBuffer(new Uint8Array(L), E, w, P, u.mode, u.filter), L;
875
+ const L = new ArrayBuffer(A * w);
876
+ return l.decodeGltfBuffer(new Uint8Array(L), A, w, P, u.mode, u.filter), L;
877
877
  });
878
878
  });
879
879
  } else
@@ -894,9 +894,9 @@ class Ko {
894
894
  return null;
895
895
  const l = a.extensions[this.name].attributes, p = [], h = {};
896
896
  for (const y in l)
897
- p.push(this.parser.getDependency("accessor", l[y]).then((E) => (h[y] = E, h[y])));
897
+ p.push(this.parser.getDependency("accessor", l[y]).then((A) => (h[y] = A, h[y])));
898
898
  return p.length < 1 ? null : (p.push(this.parser.createNodeMesh(s)), Promise.all(p).then((y) => {
899
- const E = y.pop(), w = E.isGroup ? E.children : [E], P = y[0].count, L = [];
899
+ const A = y.pop(), w = A.isGroup ? A.children : [A], P = y[0].count, L = [];
900
900
  for (const q of w) {
901
901
  const X = new Lt(), G = new le(), W = new Fs(), Z = new le(1, 1, 1), ce = new ki(q.geometry, q.material, P);
902
902
  for (let Y = 0; Y < P; Y++)
@@ -908,7 +908,7 @@ class Ko {
908
908
  } else Y !== "TRANSLATION" && Y !== "ROTATION" && Y !== "SCALE" && q.geometry.setAttribute(Y, h[Y]);
909
909
  Ks.prototype.copy.call(ce, q), this.parser.assignFinalMaterial(ce), L.push(ce);
910
910
  }
911
- return E.isGroup ? (E.clear(), E.add(...L), E) : L[0];
911
+ return A.isGroup ? (A.clear(), A.add(...L), A) : L[0];
912
912
  }));
913
913
  }
914
914
  }
@@ -952,20 +952,20 @@ class Bo {
952
952
  }
953
953
  decodePrimitive(s, o) {
954
954
  const a = this.json, u = this.dracoLoader, c = s.extensions[this.name].bufferView, l = s.extensions[this.name].attributes, p = {}, h = {}, y = {};
955
- for (const E in l) {
956
- const w = Cr[E] || E.toLowerCase();
957
- p[w] = l[E];
955
+ for (const A in l) {
956
+ const w = Cr[A] || A.toLowerCase();
957
+ p[w] = l[A];
958
958
  }
959
- for (const E in s.attributes) {
960
- const w = Cr[E] || E.toLowerCase();
961
- if (l[E] !== void 0) {
962
- const P = a.accessors[s.attributes[E]], L = It[P.componentType];
959
+ for (const A in s.attributes) {
960
+ const w = Cr[A] || A.toLowerCase();
961
+ if (l[A] !== void 0) {
962
+ const P = a.accessors[s.attributes[A]], L = It[P.componentType];
963
963
  y[w] = L.name, h[w] = P.normalized === !0;
964
964
  }
965
965
  }
966
- return o.getDependency("bufferView", c).then(function(E) {
966
+ return o.getDependency("bufferView", c).then(function(A) {
967
967
  return new Promise(function(w, P) {
968
- u.decodeDracoFile(E, function(L) {
968
+ u.decodeDracoFile(A, function(L) {
969
969
  for (const q in L.attributes) {
970
970
  const X = L.attributes[q], G = h[q];
971
971
  G !== void 0 && (X.normalized = G);
@@ -1000,9 +1000,9 @@ class Vs extends to {
1000
1000
  return o;
1001
1001
  }
1002
1002
  interpolate_(s, o, a, u) {
1003
- const c = this.resultBuffer, l = this.sampleValues, p = this.valueSize, h = p * 2, y = p * 3, E = u - o, w = (a - o) / E, P = w * w, L = P * w, q = s * y, X = q - y, G = -2 * L + 3 * P, W = L - P, Z = 1 - G, ce = W - P + w;
1003
+ const c = this.resultBuffer, l = this.sampleValues, p = this.valueSize, h = p * 2, y = p * 3, A = u - o, w = (a - o) / A, P = w * w, L = P * w, q = s * y, X = q - y, G = -2 * L + 3 * P, W = L - P, Z = 1 - G, ce = W - P + w;
1004
1004
  for (let Y = 0; Y !== p; Y++) {
1005
- const we = l[X + Y + p], ve = l[X + Y + h] * E, ae = l[q + Y + p], Le = l[q + Y] * E;
1005
+ const we = l[X + Y + p], ve = l[X + Y + h] * A, ae = l[q + Y + p], Le = l[q + Y] * A;
1006
1006
  c[Y] = Z * we + ce * ve + G * ae + W * Le;
1007
1007
  }
1008
1008
  return c;
@@ -1096,13 +1096,13 @@ function $e(C, s) {
1096
1096
  }
1097
1097
  function Xo(C, s, o) {
1098
1098
  let a = !1, u = !1, c = !1;
1099
- for (let y = 0, E = s.length; y < E; y++) {
1099
+ for (let y = 0, A = s.length; y < A; y++) {
1100
1100
  const w = s[y];
1101
1101
  if (w.POSITION !== void 0 && (a = !0), w.NORMAL !== void 0 && (u = !0), w.COLOR_0 !== void 0 && (c = !0), a && u && c) break;
1102
1102
  }
1103
1103
  if (!a && !u && !c) return Promise.resolve(C);
1104
1104
  const l = [], p = [], h = [];
1105
- for (let y = 0, E = s.length; y < E; y++) {
1105
+ for (let y = 0, A = s.length; y < A; y++) {
1106
1106
  const w = s[y];
1107
1107
  if (a) {
1108
1108
  const P = w.POSITION !== void 0 ? o.getDependency("accessor", w.POSITION) : C.attributes.position;
@@ -1122,8 +1122,8 @@ function Xo(C, s, o) {
1122
1122
  Promise.all(p),
1123
1123
  Promise.all(h)
1124
1124
  ]).then(function(y) {
1125
- const E = y[0], w = y[1], P = y[2];
1126
- return a && (C.morphAttributes.position = E), u && (C.morphAttributes.normal = w), c && (C.morphAttributes.color = P), C.morphTargetsRelative = !0, C;
1125
+ const A = y[0], w = y[1], P = y[2];
1126
+ return a && (C.morphAttributes.position = A), u && (C.morphAttributes.normal = w), c && (C.morphAttributes.color = P), C.morphTargetsRelative = !0, C;
1127
1127
  });
1128
1128
  }
1129
1129
  function Wo(C, s) {
@@ -1269,8 +1269,8 @@ class Jo {
1269
1269
  const u = a.clone(), c = (l, p) => {
1270
1270
  const h = this.associations.get(l);
1271
1271
  h != null && this.associations.set(p, h);
1272
- for (const [y, E] of l.children.entries())
1273
- c(E, p.children[y]);
1272
+ for (const [y, A] of l.children.entries())
1273
+ c(A, p.children[y]);
1274
1274
  };
1275
1275
  return c(a, u), u.name += "_instance_" + s.uses[o]++, u;
1276
1276
  }
@@ -1428,12 +1428,12 @@ class Jo {
1428
1428
  }
1429
1429
  const c = [];
1430
1430
  return u.bufferView !== void 0 ? c.push(this.getDependency("bufferView", u.bufferView)) : c.push(null), u.sparse !== void 0 && (c.push(this.getDependency("bufferView", u.sparse.indices.bufferView)), c.push(this.getDependency("bufferView", u.sparse.values.bufferView))), Promise.all(c).then(function(l) {
1431
- const p = l[0], h = Ar[u.type], y = It[u.componentType], E = y.BYTES_PER_ELEMENT, w = E * h, P = u.byteOffset || 0, L = u.bufferView !== void 0 ? a.bufferViews[u.bufferView].byteStride : void 0, q = u.normalized === !0;
1431
+ const p = l[0], h = Ar[u.type], y = It[u.componentType], A = y.BYTES_PER_ELEMENT, w = A * h, P = u.byteOffset || 0, L = u.bufferView !== void 0 ? a.bufferViews[u.bufferView].byteStride : void 0, q = u.normalized === !0;
1432
1432
  let X, G;
1433
1433
  if (L && L !== w) {
1434
1434
  const W = Math.floor(P / L), Z = "InterleavedBuffer:" + u.bufferView + ":" + u.componentType + ":" + W + ":" + u.count;
1435
1435
  let ce = o.cache.get(Z);
1436
- ce || (X = new y(p, W * L, u.count * L / E), ce = new Ci(X, L / E), o.cache.add(Z, ce)), G = new Ii(ce, h, P % L / E, q);
1436
+ ce || (X = new y(p, W * L, u.count * L / A), ce = new Ci(X, L / A), o.cache.add(Z, ce)), G = new Ii(ce, h, P % L / A, q);
1437
1437
  } else
1438
1438
  p === null ? X = new y(u.count * h) : X = new y(p, P, u.count * h), G = new Jt(X, h, q);
1439
1439
  if (u.sparse !== void 0) {
@@ -1468,10 +1468,10 @@ class Jo {
1468
1468
  const u = this, c = this.json, l = c.textures[s], p = c.images[o], h = (p.uri || p.bufferView) + ":" + l.sampler;
1469
1469
  if (this.textureCache[h])
1470
1470
  return this.textureCache[h];
1471
- const y = this.loadImageSource(o, a).then(function(E) {
1472
- E.flipY = !1, E.name = l.name || p.name || "", E.name === "" && typeof p.uri == "string" && p.uri.startsWith("data:image/") === !1 && (E.name = p.uri);
1471
+ const y = this.loadImageSource(o, a).then(function(A) {
1472
+ A.flipY = !1, A.name = l.name || p.name || "", A.name === "" && typeof p.uri == "string" && p.uri.startsWith("data:image/") === !1 && (A.name = p.uri);
1473
1473
  const P = (c.samplers || {})[l.sampler] || {};
1474
- return E.magFilter = Es[P.magFilter] || Mr, E.minFilter = Es[P.minFilter] || js, E.wrapS = As[P.wrapS] || Pr, E.wrapT = As[P.wrapT] || Pr, E.generateMipmaps = !E.isCompressedTexture && E.minFilter !== Bs && E.minFilter !== Mr, u.associations.set(E, { textures: s }), E;
1474
+ return A.magFilter = Es[P.magFilter] || Mr, A.minFilter = Es[P.minFilter] || js, A.wrapS = As[P.wrapS] || Pr, A.wrapT = As[P.wrapT] || Pr, A.generateMipmaps = !A.isCompressedTexture && A.minFilter !== Bs && A.minFilter !== Mr, u.associations.set(A, { textures: s }), A;
1475
1475
  }).catch(function() {
1476
1476
  return null;
1477
1477
  });
@@ -1491,7 +1491,7 @@ class Jo {
1491
1491
  });
1492
1492
  else if (l.uri === void 0)
1493
1493
  throw new Error("THREE.GLTFLoader: Image " + s + " is missing URI and bufferView");
1494
- const E = Promise.resolve(h).then(function(w) {
1494
+ const A = Promise.resolve(h).then(function(w) {
1495
1495
  return new Promise(function(P, L) {
1496
1496
  let q = P;
1497
1497
  o.isImageBitmapLoader === !0 && (q = function(X) {
@@ -1504,7 +1504,7 @@ class Jo {
1504
1504
  }).catch(function(w) {
1505
1505
  throw console.error("THREE.GLTFLoader: Couldn't load texture", h), w;
1506
1506
  });
1507
- return this.sourceCache[s] = E, E;
1507
+ return this.sourceCache[s] = A, A;
1508
1508
  }
1509
1509
  /**
1510
1510
  * Asynchronously assigns a texture to the given material parameters.
@@ -1591,8 +1591,8 @@ class Jo {
1591
1591
  })));
1592
1592
  }
1593
1593
  c.doubleSided === !0 && (p.side = Ui);
1594
- const E = c.alphaMode || Sr.OPAQUE;
1595
- if (E === Sr.BLEND ? (p.transparent = !0, p.depthWrite = !1) : (p.transparent = !1, E === Sr.MASK && (p.alphaTest = c.alphaCutoff !== void 0 ? c.alphaCutoff : 0.5)), c.normalTexture !== void 0 && l !== Qt && (y.push(o.assignTexture(p, "normalMap", c.normalTexture)), p.normalScale = new Nr(1, 1), c.normalTexture.scale !== void 0)) {
1594
+ const A = c.alphaMode || Sr.OPAQUE;
1595
+ if (A === Sr.BLEND ? (p.transparent = !0, p.depthWrite = !1) : (p.transparent = !1, A === Sr.MASK && (p.alphaTest = c.alphaCutoff !== void 0 ? c.alphaCutoff : 0.5)), c.normalTexture !== void 0 && l !== Qt && (y.push(o.assignTexture(p, "normalMap", c.normalTexture)), p.normalScale = new Nr(1, 1), c.normalTexture.scale !== void 0)) {
1596
1596
  const w = c.normalTexture.scale;
1597
1597
  p.normalScale.set(w, w);
1598
1598
  }
@@ -1634,12 +1634,12 @@ class Jo {
1634
1634
  }
1635
1635
  const l = [];
1636
1636
  for (let p = 0, h = s.length; p < h; p++) {
1637
- const y = s[p], E = Yo(y), w = u[E];
1637
+ const y = s[p], A = Yo(y), w = u[A];
1638
1638
  if (w)
1639
1639
  l.push(w.promise);
1640
1640
  else {
1641
1641
  let P;
1642
- y.extensions && y.extensions[ne.KHR_DRACO_MESH_COMPRESSION] ? P = c(y) : P = Ss(new Ns(), y, o), u[E] = { primitive: y, promise: P }, l.push(P);
1642
+ y.extensions && y.extensions[ne.KHR_DRACO_MESH_COMPRESSION] ? P = c(y) : P = Ss(new Ns(), y, o), u[A] = { primitive: y, promise: P }, l.push(P);
1643
1643
  }
1644
1644
  }
1645
1645
  return Promise.all(l);
@@ -1654,13 +1654,13 @@ class Jo {
1654
1654
  loadMesh(s) {
1655
1655
  const o = this, a = this.json, u = this.extensions, c = a.meshes[s], l = c.primitives, p = [];
1656
1656
  for (let h = 0, y = l.length; h < y; h++) {
1657
- const E = l[h].material === void 0 ? Vo(this.cache) : this.getDependency("material", l[h].material);
1658
- p.push(E);
1657
+ const A = l[h].material === void 0 ? Vo(this.cache) : this.getDependency("material", l[h].material);
1658
+ p.push(A);
1659
1659
  }
1660
1660
  return p.push(o.loadGeometries(l)), Promise.all(p).then(function(h) {
1661
- const y = h.slice(0, h.length - 1), E = h[h.length - 1], w = [];
1662
- for (let L = 0, q = E.length; L < q; L++) {
1663
- const X = E[L], G = l[L];
1661
+ const y = h.slice(0, h.length - 1), A = h[h.length - 1], w = [];
1662
+ for (let L = 0, q = A.length; L < q; L++) {
1663
+ const X = A[L], G = l[L];
1664
1664
  let W;
1665
1665
  const Z = y[L];
1666
1666
  if (G.mode === Ie.TRIANGLES || G.mode === Ie.TRIANGLE_STRIP || G.mode === Ie.TRIANGLE_FAN || G.mode === void 0)
@@ -1720,7 +1720,7 @@ class Jo {
1720
1720
  a.push(this._loadNodeShallow(o.joints[u]));
1721
1721
  return o.inverseBindMatrices !== void 0 ? a.push(this.getDependency("accessor", o.inverseBindMatrices)) : a.push(null), Promise.all(a).then(function(u) {
1722
1722
  const c = u.pop(), l = u, p = [], h = [];
1723
- for (let y = 0, E = l.length; y < E; y++) {
1723
+ for (let y = 0, A = l.length; y < A; y++) {
1724
1724
  const w = l[y];
1725
1725
  if (w) {
1726
1726
  p.push(w);
@@ -1740,17 +1740,17 @@ class Jo {
1740
1740
  * @return {Promise<AnimationClip>}
1741
1741
  */
1742
1742
  loadAnimation(s) {
1743
- const o = this.json, a = this, u = o.animations[s], c = u.name ? u.name : "animation_" + s, l = [], p = [], h = [], y = [], E = [];
1743
+ const o = this.json, a = this, u = o.animations[s], c = u.name ? u.name : "animation_" + s, l = [], p = [], h = [], y = [], A = [];
1744
1744
  for (let w = 0, P = u.channels.length; w < P; w++) {
1745
1745
  const L = u.channels[w], q = u.samplers[L.sampler], X = L.target, G = X.node, W = u.parameters !== void 0 ? u.parameters[q.input] : q.input, Z = u.parameters !== void 0 ? u.parameters[q.output] : q.output;
1746
- X.node !== void 0 && (l.push(this.getDependency("node", G)), p.push(this.getDependency("accessor", W)), h.push(this.getDependency("accessor", Z)), y.push(q), E.push(X));
1746
+ X.node !== void 0 && (l.push(this.getDependency("node", G)), p.push(this.getDependency("accessor", W)), h.push(this.getDependency("accessor", Z)), y.push(q), A.push(X));
1747
1747
  }
1748
1748
  return Promise.all([
1749
1749
  Promise.all(l),
1750
1750
  Promise.all(p),
1751
1751
  Promise.all(h),
1752
1752
  Promise.all(y),
1753
- Promise.all(E)
1753
+ Promise.all(A)
1754
1754
  ]).then(function(w) {
1755
1755
  const P = w[0], L = w[1], q = w[2], X = w[3], G = w[4], W = [];
1756
1756
  for (let Z = 0, ce = P.length; Z < ce; Z++) {
@@ -1785,7 +1785,7 @@ class Jo {
1785
1785
  */
1786
1786
  loadNode(s) {
1787
1787
  const o = this.json, a = this, u = o.nodes[s], c = a._loadNodeShallow(s), l = [], p = u.children || [];
1788
- for (let y = 0, E = p.length; y < E; y++)
1788
+ for (let y = 0, A = p.length; y < A; y++)
1789
1789
  l.push(a.getDependency("node", p[y]));
1790
1790
  const h = u.skin === void 0 ? Promise.resolve(null) : a.getDependency("skin", u.skin);
1791
1791
  return Promise.all([
@@ -1793,13 +1793,13 @@ class Jo {
1793
1793
  Promise.all(l),
1794
1794
  h
1795
1795
  ]).then(function(y) {
1796
- const E = y[0], w = y[1], P = y[2];
1797
- P !== null && E.traverse(function(L) {
1796
+ const A = y[0], w = y[1], P = y[2];
1797
+ P !== null && A.traverse(function(L) {
1798
1798
  L.isSkinnedMesh && L.bind(P, Qo);
1799
1799
  });
1800
1800
  for (let L = 0, q = w.length; L < q; L++)
1801
- E.add(w[L]);
1802
- return E;
1801
+ A.add(w[L]);
1802
+ return A;
1803
1803
  });
1804
1804
  }
1805
1805
  // ._loadNodeShallow() parses a single node.
@@ -1818,22 +1818,22 @@ class Jo {
1818
1818
  }).forEach(function(y) {
1819
1819
  p.push(y);
1820
1820
  }), this.nodeCache[s] = Promise.all(p).then(function(y) {
1821
- let E;
1822
- if (c.isBone === !0 ? E = new Ji() : y.length > 1 ? E = new xr() : y.length === 1 ? E = y[0] : E = new Ks(), E !== y[0])
1821
+ let A;
1822
+ if (c.isBone === !0 ? A = new Ji() : y.length > 1 ? A = new xr() : y.length === 1 ? A = y[0] : A = new Ks(), A !== y[0])
1823
1823
  for (let w = 0, P = y.length; w < P; w++)
1824
- E.add(y[w]);
1825
- if (c.name && (E.userData.name = c.name, E.name = l), $e(E, c), c.extensions && _t(a, E, c), c.matrix !== void 0) {
1824
+ A.add(y[w]);
1825
+ if (c.name && (A.userData.name = c.name, A.name = l), $e(A, c), c.extensions && _t(a, A, c), c.matrix !== void 0) {
1826
1826
  const w = new Lt();
1827
- w.fromArray(c.matrix), E.applyMatrix4(w);
1827
+ w.fromArray(c.matrix), A.applyMatrix4(w);
1828
1828
  } else
1829
- c.translation !== void 0 && E.position.fromArray(c.translation), c.rotation !== void 0 && E.quaternion.fromArray(c.rotation), c.scale !== void 0 && E.scale.fromArray(c.scale);
1830
- if (!u.associations.has(E))
1831
- u.associations.set(E, {});
1829
+ c.translation !== void 0 && A.position.fromArray(c.translation), c.rotation !== void 0 && A.quaternion.fromArray(c.rotation), c.scale !== void 0 && A.scale.fromArray(c.scale);
1830
+ if (!u.associations.has(A))
1831
+ u.associations.set(A, {});
1832
1832
  else if (c.mesh !== void 0 && u.meshCache.refs[c.mesh] > 1) {
1833
- const w = u.associations.get(E);
1834
- u.associations.set(E, { ...w });
1833
+ const w = u.associations.get(A);
1834
+ u.associations.set(A, { ...w });
1835
1835
  }
1836
- return u.associations.get(E).nodes = s, E;
1836
+ return u.associations.get(A).nodes = s, A;
1837
1837
  }), this.nodeCache[s];
1838
1838
  }
1839
1839
  /**
@@ -1850,13 +1850,13 @@ class Jo {
1850
1850
  for (let h = 0, y = l.length; h < y; h++)
1851
1851
  p.push(u.getDependency("node", l[h]));
1852
1852
  return Promise.all(p).then(function(h) {
1853
- for (let E = 0, w = h.length; E < w; E++)
1854
- c.add(h[E]);
1855
- const y = (E) => {
1853
+ for (let A = 0, w = h.length; A < w; A++)
1854
+ c.add(h[A]);
1855
+ const y = (A) => {
1856
1856
  const w = /* @__PURE__ */ new Map();
1857
1857
  for (const [P, L] of u.associations)
1858
1858
  (P instanceof _r || P instanceof gs) && w.set(P, L);
1859
- return E.traverse((P) => {
1859
+ return A.traverse((P) => {
1860
1860
  const L = u.associations.get(P);
1861
1861
  L != null && w.set(P, L);
1862
1862
  }), w;
@@ -1894,13 +1894,13 @@ class Jo {
1894
1894
  }
1895
1895
  break;
1896
1896
  }
1897
- const E = u.interpolation !== void 0 ? zo[u.interpolation] : Hs, w = this._getArrayFromAccessor(a);
1897
+ const A = u.interpolation !== void 0 ? zo[u.interpolation] : Hs, w = this._getArrayFromAccessor(a);
1898
1898
  for (let P = 0, L = h.length; P < L; P++) {
1899
1899
  const q = new y(
1900
1900
  h[P] + "." + at[c.path],
1901
1901
  o.array,
1902
1902
  w,
1903
- E
1903
+ A
1904
1904
  );
1905
1905
  u.interpolation === "CUBICSPLINE" && this._createCubicSplineTrackInterpolant(q), l.push(q);
1906
1906
  }
@@ -1932,8 +1932,8 @@ function Zo(C, s, o) {
1932
1932
  new le(h[0], h[1], h[2]),
1933
1933
  new le(y[0], y[1], y[2])
1934
1934
  ), p.normalized) {
1935
- const E = Ir(It[p.componentType]);
1936
- u.min.multiplyScalar(E), u.max.multiplyScalar(E);
1935
+ const A = Ir(It[p.componentType]);
1936
+ u.min.multiplyScalar(A), u.max.multiplyScalar(A);
1937
1937
  }
1938
1938
  } else {
1939
1939
  console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");
@@ -1944,7 +1944,7 @@ function Zo(C, s, o) {
1944
1944
  const c = s.targets;
1945
1945
  if (c !== void 0) {
1946
1946
  const p = new le(), h = new le();
1947
- for (let y = 0, E = c.length; y < E; y++) {
1947
+ for (let y = 0, A = c.length; y < A; y++) {
1948
1948
  const w = c[y];
1949
1949
  if (w.POSITION !== void 0) {
1950
1950
  const P = o.json.accessors[w.POSITION], L = P.min, q = P.max;
@@ -2203,7 +2203,7 @@ function fa(C, s) {
2203
2203
  s || {}
2204
2204
  );
2205
2205
  let a, u, c, l = [];
2206
- const p = Tr(!1), h = ao(), y = Tr(0), E = Tr(0), w = new so({
2206
+ const p = Tr(!1), h = ao(), y = Tr(0), A = Tr(0), w = new so({
2207
2207
  antialias: !0,
2208
2208
  alpha: !0,
2209
2209
  precision: "mediump",
@@ -2214,7 +2214,7 @@ function fa(C, s) {
2214
2214
  function G() {
2215
2215
  p.value = !1;
2216
2216
  const me = Le();
2217
- y.value = me[0], E.value = me[1], L.aspect = y.value / E.value, L.position.set(47, 39, 100), L.fov = 360 / Math.PI * Math.atan(q * (E.value / y.value)), L.lookAt(0, 0, 0), L.updateProjectionMatrix(), w.setSize(y.value, E.value), a.appendChild(w.domElement), o.stats && Me(), o.css3d && en();
2217
+ y.value = me[0], A.value = me[1], L.aspect = y.value / A.value, L.position.set(47, 39, 100), L.fov = 360 / Math.PI * Math.atan(q * (A.value / y.value)), L.lookAt(0, 0, 0), L.updateProjectionMatrix(), w.setSize(y.value, A.value), a.appendChild(w.domElement), o.stats && Me(), o.css3d && en();
2218
2218
  let Ne;
2219
2219
  if (o.control && o.control.init) {
2220
2220
  Ne = lo(L, w.domElement);
@@ -2251,7 +2251,7 @@ function fa(C, s) {
2251
2251
  function ae() {
2252
2252
  _s(() => {
2253
2253
  const me = Le();
2254
- y.value = me[0], E.value = me[1], L.aspect = y.value / E.value, L.fov = 360 / Math.PI * Math.atan(q * (E.value / y.value)), L.updateProjectionMatrix(), L.lookAt(P.position), w.setSize(y.value, E.value), c && c.setSize(y.value, E.value), we();
2254
+ y.value = me[0], A.value = me[1], L.aspect = y.value / A.value, L.fov = 360 / Math.PI * Math.atan(q * (A.value / y.value)), L.updateProjectionMatrix(), L.lookAt(P.position), w.setSize(y.value, A.value), c && c.setSize(y.value, A.value), we();
2255
2255
  });
2256
2256
  }
2257
2257
  function Le() {
@@ -2278,7 +2278,7 @@ function fa(C, s) {
2278
2278
  ), Pe.updateProjectionMatrix(), ze.target.copy(Te), ze.update(), Ve;
2279
2279
  }
2280
2280
  function en() {
2281
- c = new po(), c.setSize(y.value, E.value), c.domElement.style.position = "absolute", c.domElement.style.top = 0, c.domElement.style.left = 0, c.domElement.style.pointerEvents = "none", a.appendChild(c.domElement);
2281
+ c = new po(), c.setSize(y.value, A.value), c.domElement.style.position = "absolute", c.domElement.style.top = 0, c.domElement.style.left = 0, c.domElement.style.pointerEvents = "none", a.appendChild(c.domElement);
2282
2282
  }
2283
2283
  function ct() {
2284
2284
  fo(P);
@@ -2313,7 +2313,7 @@ function fa(C, s) {
2313
2313
  control: h,
2314
2314
  renderer: w,
2315
2315
  domWidth: y,
2316
- domHeight: E,
2316
+ domHeight: A,
2317
2317
  isReady: p
2318
2318
  };
2319
2319
  }
@@ -2322,19 +2322,19 @@ const ha = (C = "app") => {
2322
2322
  s.params.Line.threshold = 8;
2323
2323
  const o = new Nr(), a = document.getElementById(C);
2324
2324
  function u(p, h) {
2325
- const { scaleX: y, scaleY: E } = l(a), { clientWidth: w, clientHeight: P } = h, L = h.getBoundingClientRect(), q = w * y, X = P * E, G = p.clientX - L.left, W = p.clientY - L.top;
2325
+ const { scaleX: y, scaleY: A } = l(a), { clientWidth: w, clientHeight: P } = h, L = h.getBoundingClientRect(), q = w * y, X = P * A, G = p.clientX - L.left, W = p.clientY - L.top;
2326
2326
  return o.x = (p.clientX - L.left) / q * 2 - 1, o.y = -((p.clientY - L.top) / X) * 2 + 1, { pointer: o, x: G, y: W };
2327
2327
  }
2328
- function c(p, h, y, E) {
2328
+ function c(p, h, y, A) {
2329
2329
  const { pointer: w, x: P, y: L } = u(p, h);
2330
- return s.setFromCamera(w, y), { intersects: s.intersectObjects(E), pointer: w, x: P, y: L };
2330
+ return s.setFromCamera(w, y), { intersects: s.intersectObjects(A), pointer: w, x: P, y: L };
2331
2331
  }
2332
2332
  function l(p) {
2333
2333
  const h = window.getComputedStyle(p), y = h.transform || h.webkitTransform || h.mozTransform;
2334
2334
  if (y && y !== "none") {
2335
- const E = y.match(/^matrix\((.+)\)$/);
2336
- if (E) {
2337
- const w = E[1].split(", "), P = parseFloat(w[0]), L = parseFloat(w[3]);
2335
+ const A = y.match(/^matrix\((.+)\)$/);
2336
+ if (A) {
2337
+ const w = A[1].split(", "), P = parseFloat(w[0]), L = parseFloat(w[3]);
2338
2338
  return { scaleX: P, scaleY: L };
2339
2339
  }
2340
2340
  }
@@ -2368,7 +2368,7 @@ const ha = (C = "app") => {
2368
2368
  initObb: s,
2369
2369
  getObbObjectByParentUid: (p) => Ye.filter((h) => h.parentUid === p),
2370
2370
  addObbFromArray: (p, h) => {
2371
- for (let y = 0, E = h.length; y < E; y++)
2371
+ for (let y = 0, A = h.length; y < A; y++)
2372
2372
  o(p, h[y]);
2373
2373
  },
2374
2374
  removeObbFromArray: (p) => {
@@ -2414,9 +2414,9 @@ function ia() {
2414
2414
  }), e;
2415
2415
  }
2416
2416
  typeof Promise > "u" || c.Promise || (c.Promise = Promise);
2417
- var y = Object.getPrototypeOf, E = {}.hasOwnProperty;
2417
+ var y = Object.getPrototypeOf, A = {}.hasOwnProperty;
2418
2418
  function w(e, t) {
2419
- return E.call(e, t);
2419
+ return A.call(e, t);
2420
2420
  }
2421
2421
  function P(e, t) {
2422
2422
  typeof t == "function" && (t = t(y(e))), (typeof Reflect > "u" ? l : Reflect.ownKeys)(t).forEach(function(n) {
@@ -2675,8 +2675,8 @@ function ia() {
2675
2675
  var Hn = { get: function() {
2676
2676
  var e = z, t = hn;
2677
2677
  function n(r, i) {
2678
- var f = this, d = !e.global && (e !== z || t !== hn), m = d && !nt(), v = new U(function(_, A) {
2679
- zn(f, new Br(Hr(r, e, d, m), Hr(i, e, d, m), _, A, e));
2678
+ var f = this, d = !e.global && (e !== z || t !== hn), m = d && !nt(), v = new U(function(_, E) {
2679
+ zn(f, new Br(Hr(r, e, d, m), Hr(i, e, d, m), _, E, e));
2680
2680
  });
2681
2681
  return this._consoleTask && (v._consoleTask = this._consoleTask), v;
2682
2682
  }
@@ -2967,8 +2967,8 @@ function ia() {
2967
2967
  case "Array":
2968
2968
  return function(i, f) {
2969
2969
  for (var d = i.length, m = f.length, v = d < m ? d : m, _ = 0; _ < v; ++_) {
2970
- var A = re(i[_], f[_]);
2971
- if (A !== 0) return A;
2970
+ var E = re(i[_], f[_]);
2971
+ if (E !== 0) return E;
2972
2972
  }
2973
2973
  return d === m ? 0 : d < m ? -1 : 1;
2974
2974
  }(e, t);
@@ -2986,7 +2986,7 @@ function ia() {
2986
2986
  }
2987
2987
  var Yr = (fe.prototype._trans = function(e, t, n) {
2988
2988
  var r = this._tx || z.trans, i = this.name, f = Be && typeof console < "u" && console.createTask && console.createTask("Dexie: ".concat(e === "readonly" ? "read" : "write", " ").concat(this.name));
2989
- function d(_, A, g) {
2989
+ function d(_, E, g) {
2990
2990
  if (!g.schema[i]) throw new V.NotFound("Table " + i + " not part of transaction");
2991
2991
  return t(g.idbtrans, g);
2992
2992
  }
@@ -2994,14 +2994,14 @@ function ia() {
2994
2994
  try {
2995
2995
  var v = r && r.db._novip === this.db._novip ? r === z.trans ? r._promise(e, d, n) : tt(function() {
2996
2996
  return r._promise(e, d, n);
2997
- }, { trans: r, transless: z.transless || z }) : function _(A, g, R, b) {
2998
- if (A.idbdb && (A._state.openComplete || z.letThrough || A._vip)) {
2999
- var T = A._createTransaction(g, R, A._dbSchema);
2997
+ }, { trans: r, transless: z.transless || z }) : function _(E, g, R, b) {
2998
+ if (E.idbdb && (E._state.openComplete || z.letThrough || E._vip)) {
2999
+ var T = E._createTransaction(g, R, E._dbSchema);
3000
3000
  try {
3001
- T.create(), A._state.PR1398_maxLoop = 3;
3001
+ T.create(), E._state.PR1398_maxLoop = 3;
3002
3002
  } catch (S) {
3003
- return S.name === je.InvalidState && A.isOpen() && 0 < --A._state.PR1398_maxLoop ? (console.warn("Dexie: Need to reopen db"), A.close({ disableAutoOpen: !1 }), A.open().then(function() {
3004
- return _(A, g, R, b);
3003
+ return S.name === je.InvalidState && E.isOpen() && 0 < --E._state.PR1398_maxLoop ? (console.warn("Dexie: Need to reopen db"), E.close({ disableAutoOpen: !1 }), E.open().then(function() {
3004
+ return _(E, g, R, b);
3005
3005
  })) : ye(S);
3006
3006
  }
3007
3007
  return T._promise(g, function(S, x) {
@@ -3018,13 +3018,13 @@ function ia() {
3018
3018
  });
3019
3019
  });
3020
3020
  }
3021
- if (A._state.openComplete) return ye(new V.DatabaseClosed(A._state.dbOpenError));
3022
- if (!A._state.isBeingOpened) {
3023
- if (!A._state.autoOpen) return ye(new V.DatabaseClosed());
3024
- A.open().catch(ue);
3021
+ if (E._state.openComplete) return ye(new V.DatabaseClosed(E._state.dbOpenError));
3022
+ if (!E._state.isBeingOpened) {
3023
+ if (!E._state.autoOpen) return ye(new V.DatabaseClosed());
3024
+ E.open().catch(ue);
3025
3025
  }
3026
- return A._state.dbReadyPromise.then(function() {
3027
- return _(A, g, R, b);
3026
+ return E._state.dbReadyPromise.then(function() {
3027
+ return _(E, g, R, b);
3028
3028
  });
3029
3029
  }(this.db, e, [this.name], d);
3030
3030
  return f && (v._consoleTask = f, v = v.catch(function(_) {
@@ -3068,14 +3068,14 @@ function ia() {
3068
3068
  return re(m, v) === 0;
3069
3069
  }
3070
3070
  var d = t.reduce(function(g, v) {
3071
- var _ = g[0], A = g[1], g = r[v], R = e[v];
3072
- return [_ || g, _ || !g ? gt(A, g && g.multi ? function(b) {
3071
+ var _ = g[0], E = g[1], g = r[v], R = e[v];
3072
+ return [_ || g, _ || !g ? gt(E, g && g.multi ? function(b) {
3073
3073
  return b = ve(b, v), p(b) && b.some(function(T) {
3074
3074
  return i(R, T);
3075
3075
  });
3076
3076
  } : function(b) {
3077
3077
  return i(R, ve(b, v));
3078
- }) : A];
3078
+ }) : E];
3079
3079
  }, [null, null]), f = d[0], d = d[1];
3080
3080
  return f ? this.where(f.name).equals(e[f.keyPath]).filter(d) : n ? this.filter(d) : this.where(t).equals("");
3081
3081
  }, fe.prototype.filter = function(e) {
@@ -3103,10 +3103,10 @@ function ia() {
3103
3103
  }
3104
3104
  (this.schema.mappedClass = e).prototype instanceof Vr && (function(v, _) {
3105
3105
  if (typeof _ != "function" && _ !== null) throw new TypeError("Class extends value " + String(_) + " is not a constructor or null");
3106
- function A() {
3106
+ function E() {
3107
3107
  this.constructor = v;
3108
3108
  }
3109
- o(v, _), v.prototype = _ === null ? Object.create(_) : (A.prototype = _.prototype, new A());
3109
+ o(v, _), v.prototype = _ === null ? Object.create(_) : (E.prototype = _.prototype, new E());
3110
3110
  }(i, t = e), Object.defineProperty(i.prototype, "db", { get: function() {
3111
3111
  return n;
3112
3112
  }, enumerable: !1, configurable: !0 }), i.prototype.table = function() {
@@ -3117,12 +3117,12 @@ function ia() {
3117
3117
  });
3118
3118
  function m(v) {
3119
3119
  if (!v) return v;
3120
- var _, A = Object.create(e.prototype);
3120
+ var _, E = Object.create(e.prototype);
3121
3121
  for (_ in v) if (!f.has(_)) try {
3122
- A[_] = v[_];
3122
+ E[_] = v[_];
3123
3123
  } catch {
3124
3124
  }
3125
- return A;
3125
+ return E;
3126
3126
  }
3127
3127
  return this.schema.readHook && this.hook.reading.unsubscribe(this.schema.readHook), this.schema.readHook = m, this.hook("reading", m), e;
3128
3128
  }, fe.prototype.defineClass = function() {
@@ -3227,15 +3227,15 @@ function ia() {
3227
3227
  f.push(R), v.push(b), _.push(S);
3228
3228
  }
3229
3229
  });
3230
- var A = v.length;
3230
+ var E = v.length;
3231
3231
  return n.mutate({ trans: d, type: "put", keys: v, values: _, updates: { keys: r, changeSpecs: i } }).then(function(g) {
3232
3232
  var R = g.numFailures, b = g.failures;
3233
- if (R === 0) return A;
3233
+ if (R === 0) return E;
3234
3234
  for (var T = 0, S = Object.keys(b); T < S.length; T++) {
3235
3235
  var x, k = S[T], O = f[Number(k)];
3236
3236
  O != null && (x = b[k], delete b[k], b[O] = x);
3237
3237
  }
3238
- throw new Ke("".concat(t.name, ".bulkUpdate(): ").concat(R, " of ").concat(A, " operations failed"), b);
3238
+ throw new Ke("".concat(t.name, ".bulkUpdate(): ").concat(R, " of ").concat(E, " operations failed"), b);
3239
3239
  });
3240
3240
  });
3241
3241
  });
@@ -3267,14 +3267,14 @@ function ia() {
3267
3267
  if (typeof d != "object") {
3268
3268
  var _;
3269
3269
  m = m || Js;
3270
- var A = { subscribers: [], fire: v = v || ue, subscribe: function(g) {
3271
- A.subscribers.indexOf(g) === -1 && (A.subscribers.push(g), A.fire = m(A.fire, g));
3270
+ var E = { subscribers: [], fire: v = v || ue, subscribe: function(g) {
3271
+ E.subscribers.indexOf(g) === -1 && (E.subscribers.push(g), E.fire = m(E.fire, g));
3272
3272
  }, unsubscribe: function(g) {
3273
- A.subscribers = A.subscribers.filter(function(R) {
3273
+ E.subscribers = E.subscribers.filter(function(R) {
3274
3274
  return R !== g;
3275
- }), A.fire = A.subscribers.reduce(m, v);
3275
+ }), E.fire = E.subscribers.reduce(m, v);
3276
3276
  } };
3277
- return n[d] = t[d] = A;
3277
+ return n[d] = t[d] = E;
3278
3278
  }
3279
3279
  l(_ = d).forEach(function(g) {
3280
3280
  var R = _[g];
@@ -3322,12 +3322,12 @@ function ia() {
3322
3322
  var i = e.replayFilter ? gt(e.filter, e.replayFilter()) : e.filter;
3323
3323
  if (e.or) {
3324
3324
  var f = {}, d = function(m, v, _) {
3325
- var A, g;
3325
+ var E, g;
3326
3326
  i && !i(v, _, function(R) {
3327
3327
  return v.stop(R);
3328
3328
  }, function(R) {
3329
3329
  return v.fail(R);
3330
- }) || ((g = "" + (A = v.primaryKey)) == "[object ArrayBuffer]" && (g = "" + new Uint8Array(A)), w(f, g) || (f[g] = !0, t(m, v, _)));
3330
+ }) || ((g = "" + (E = v.primaryKey)) == "[object ArrayBuffer]" && (g = "" + new Uint8Array(E)), w(f, g) || (f[g] = !0, t(m, v, _)));
3331
3331
  };
3332
3332
  return Promise.all([e.or._iterate(d, n), Qr($r(e, r, n), e.algorithm, d, !e.keysOnly && e.valueMapper)]);
3333
3333
  }
@@ -3557,8 +3557,8 @@ function ia() {
3557
3557
  }
3558
3558
  return k;
3559
3559
  });
3560
- var m = n.table.core, g = m.schema.primaryKey, v = g.outbound, _ = g.extractKey, A = 200, g = t.db._options.modifyChunkSize;
3561
- g && (A = typeof g == "object" ? g[m.name] || g["*"] || 200 : g);
3560
+ var m = n.table.core, g = m.schema.primaryKey, v = g.outbound, _ = g.extractKey, E = 200, g = t.db._options.modifyChunkSize;
3561
+ g && (E = typeof g == "object" ? g[m.name] || g["*"] || 200 : g);
3562
3562
  function R(x, M) {
3563
3563
  var O = M.failures, M = M.numFailures;
3564
3564
  T += x - M;
@@ -3570,7 +3570,7 @@ function ia() {
3570
3570
  var b = [], T = 0, S = [];
3571
3571
  return t.clone().primaryKeys().then(function(x) {
3572
3572
  function k(M) {
3573
- var I = Math.min(A, x.length - M);
3573
+ var I = Math.min(E, x.length - M);
3574
3574
  return m.getMany({ trans: r, keys: x.slice(M, M + I), cache: "immutable" }).then(function(D) {
3575
3575
  for (var j = [], N = [], F = v ? [] : null, B = [], K = 0; K < I; ++K) {
3576
3576
  var H = D[K], J = { value: me(H), primKey: x[M + K] };
@@ -3588,7 +3588,7 @@ function ia() {
3588
3588
  return R(B.length, ee);
3589
3589
  });
3590
3590
  }).then(function() {
3591
- return x.length > M + I && k(M + A);
3591
+ return x.length > M + I && k(M + E);
3592
3592
  });
3593
3593
  });
3594
3594
  }
@@ -3634,7 +3634,7 @@ function ia() {
3634
3634
  }).limit(0);
3635
3635
  }
3636
3636
  function vn(e, t, n, r) {
3637
- var i, f, d, m, v, _, A, g = n.length;
3637
+ var i, f, d, m, v, _, E, g = n.length;
3638
3638
  if (!n.every(function(T) {
3639
3639
  return typeof T == "string";
3640
3640
  })) return ke(e, Gr);
@@ -3657,7 +3657,7 @@ function ia() {
3657
3657
  return x.upper;
3658
3658
  }), v = S.map(function(x) {
3659
3659
  return x.lower;
3660
- }), A = (_ = T) === "next" ? "" : r;
3660
+ }), E = (_ = T) === "next" ? "" : r;
3661
3661
  }
3662
3662
  R("next"), e = new e.Collection(e, function() {
3663
3663
  return st(m[0], v[g - 1] + r);
@@ -3682,7 +3682,7 @@ function ia() {
3682
3682
  D === null && M === null ? b = I + 1 : (M === null || 0 < d(M, D)) && (M = D);
3683
3683
  }
3684
3684
  return S(M !== null ? function() {
3685
- T.continue(M + A);
3685
+ T.continue(M + E);
3686
3686
  } : x), !1;
3687
3687
  }), e;
3688
3688
  }
@@ -3786,12 +3786,12 @@ function ia() {
3786
3786
  if (!k.every(function(O) {
3787
3787
  return O[0] !== void 0 && O[1] !== void 0 && i(O[0], O[1]) <= 0;
3788
3788
  })) return ke(this, "First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower", V.InvalidArgument);
3789
- var v = !t || t.includeLowers !== !1, _ = t && t.includeUppers === !0, A, g = i;
3789
+ var v = !t || t.includeLowers !== !1, _ = t && t.includeUppers === !0, E, g = i;
3790
3790
  function R(O, M) {
3791
3791
  return g(O[0], M[0]);
3792
3792
  }
3793
3793
  try {
3794
- (A = k.reduce(function(O, M) {
3794
+ (E = k.reduce(function(O, M) {
3795
3795
  for (var I = 0, D = O.length; I < D; ++I) {
3796
3796
  var j = O[I];
3797
3797
  if (r(M[0], j[1]) < 0 && 0 < r(M[1], j[0])) {
@@ -3805,22 +3805,22 @@ function ia() {
3805
3805
  return ke(this, Xe);
3806
3806
  }
3807
3807
  var b = 0, T = _ ? function(O) {
3808
- return 0 < i(O, A[b][1]);
3808
+ return 0 < i(O, E[b][1]);
3809
3809
  } : function(O) {
3810
- return 0 <= i(O, A[b][1]);
3810
+ return 0 <= i(O, E[b][1]);
3811
3811
  }, S = v ? function(O) {
3812
- return 0 < f(O, A[b][0]);
3812
+ return 0 < f(O, E[b][0]);
3813
3813
  } : function(O) {
3814
- return 0 <= f(O, A[b][0]);
3814
+ return 0 <= f(O, E[b][0]);
3815
3815
  }, x = T, k = new this.Collection(this, function() {
3816
- return st(A[0][0], A[A.length - 1][1], !v, !_);
3816
+ return st(E[0][0], E[E.length - 1][1], !v, !_);
3817
3817
  });
3818
3818
  return k._ondirectionchange = function(O) {
3819
- g = O === "next" ? (x = T, i) : (x = S, f), A.sort(R);
3819
+ g = O === "next" ? (x = T, i) : (x = S, f), E.sort(R);
3820
3820
  }, k._addAlgorithm(function(O, M, I) {
3821
- for (var D, j = O.key; x(j); ) if (++b === A.length) return M(I), !1;
3822
- return !T(D = j) && !S(D) || (n._cmp(j, A[b][1]) === 0 || n._cmp(j, A[b][0]) === 0 || M(function() {
3823
- g === i ? O.continue(A[b][0]) : O.continue(A[b][1]);
3821
+ for (var D, j = O.key; x(j); ) if (++b === E.length) return M(I), !1;
3822
+ return !T(D = j) && !S(D) || (n._cmp(j, E[b][1]) === 0 || n._cmp(j, E[b][0]) === 0 || M(function() {
3823
+ g === i ? O.continue(E[b][0]) : O.continue(E[b][1]);
3824
3824
  }), !1);
3825
3825
  }), k;
3826
3826
  }, xe.prototype.startsWithAnyOf = function() {
@@ -4093,7 +4093,7 @@ function ia() {
4093
4093
  });
4094
4094
  } };
4095
4095
  }
4096
- var f, d, m, A = (d = v, m = ns((f = e).objectStoreNames), { schema: { name: f.name, tables: m.map(function(R) {
4096
+ var f, d, m, E = (d = v, m = ns((f = e).objectStoreNames), { schema: { name: f.name, tables: m.map(function(R) {
4097
4097
  return d.objectStore(R);
4098
4098
  }).map(function(R) {
4099
4099
  var b = R.keyPath, x = R.autoIncrement, T = p(b), S = {}, x = { name: R.name, primaryKey: { name: null, isPrimaryKey: !0, outbound: b == null, compound: T, keyPath: b, autoIncrement: x, unique: !0, extractKey: nr(b) }, indexes: ns(R.indexNames).map(function(k) {
@@ -4105,8 +4105,8 @@ function ia() {
4105
4105
  return S[Xt(k)];
4106
4106
  } };
4107
4107
  return S[":id"] = x.primaryKey, b != null && (S[Xt(b)] = x.primaryKey), x;
4108
- }) }, hasGetAll: 0 < m.length && "getAll" in d.objectStore(m[0]) && !(typeof navigator < "u" && /Safari/.test(navigator.userAgent) && !/(Chrome\/|Edge\/)/.test(navigator.userAgent) && [].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1] < 604) }), v = A.schema, _ = A.hasGetAll, A = v.tables.map(i), g = {};
4109
- return A.forEach(function(R) {
4108
+ }) }, hasGetAll: 0 < m.length && "getAll" in d.objectStore(m[0]) && !(typeof navigator < "u" && /Safari/.test(navigator.userAgent) && !/(Chrome\/|Edge\/)/.test(navigator.userAgent) && [].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1] < 604) }), v = E.schema, _ = E.hasGetAll, E = v.tables.map(i), g = {};
4109
+ return E.forEach(function(R) {
4110
4110
  return g[R.name] = R;
4111
4111
  }), { stack: "dbcore", transaction: e.transaction.bind(e), table: function(R) {
4112
4112
  if (!g[R]) throw new Error("Table '".concat(R, "' not found"));
@@ -4132,8 +4132,8 @@ function ia() {
4132
4132
  n.forEach(function(i) {
4133
4133
  var f = r[i];
4134
4134
  t.forEach(function(d) {
4135
- var m = function v(_, A) {
4136
- return G(_, A) || (_ = y(_)) && v(_, A);
4135
+ var m = function v(_, E) {
4136
+ return G(_, E) || (_ = y(_)) && v(_, E);
4137
4137
  }(d, i);
4138
4138
  (!m || "value" in m && m.value === void 0) && (d === e.Transaction.prototype || d instanceof e.Transaction ? q(d, i, { get: function() {
4139
4139
  return this.table(i);
@@ -4158,12 +4158,12 @@ function ia() {
4158
4158
  f.create(n), f._completion.catch(r);
4159
4159
  var d = f._reject.bind(f), m = z.transless || z;
4160
4160
  tt(function() {
4161
- return z.trans = f, z.transless = m, t !== 0 ? (bn(e, n), _ = t, ((v = f).storeNames.includes("$meta") ? v.table("$meta").get("version").then(function(A) {
4162
- return A ?? _;
4163
- }) : U.resolve(_)).then(function(A) {
4164
- return R = A, b = f, T = n, S = [], A = (g = e)._versions, x = g._dbSchema = xn(0, g.idbdb, T), (A = A.filter(function(k) {
4161
+ return z.trans = f, z.transless = m, t !== 0 ? (bn(e, n), _ = t, ((v = f).storeNames.includes("$meta") ? v.table("$meta").get("version").then(function(E) {
4162
+ return E ?? _;
4163
+ }) : U.resolve(_)).then(function(E) {
4164
+ return R = E, b = f, T = n, S = [], E = (g = e)._versions, x = g._dbSchema = xn(0, g.idbdb, T), (E = E.filter(function(k) {
4165
4165
  return k._cfg.version >= R;
4166
- })).length !== 0 ? (A.forEach(function(k) {
4166
+ })).length !== 0 ? (E.forEach(function(k) {
4167
4167
  S.push(function() {
4168
4168
  var O = x, M = k._cfg.dbschema;
4169
4169
  Tn(g, O, T), Tn(g, M, T), x = g._dbSchema = M;
@@ -4212,8 +4212,8 @@ function ia() {
4212
4212
  rs(x, T);
4213
4213
  })) : U.resolve();
4214
4214
  var g, R, b, T, S, x;
4215
- }).catch(d)) : (l(i).forEach(function(A) {
4216
- ir(n, A, i[A].primKey, i[A].indexes);
4215
+ }).catch(d)) : (l(i).forEach(function(E) {
4216
+ ir(n, E, i[E].primKey, i[E].indexes);
4217
4217
  }), bn(e, n), void U.follow(function() {
4218
4218
  return e.on.populate.fire(f);
4219
4219
  }).catch(d));
@@ -4247,8 +4247,8 @@ function ia() {
4247
4247
  var m = i.idxByName, v = f.idxByName, _ = void 0;
4248
4248
  for (_ in m) v[_] || d.del.push(_);
4249
4249
  for (_ in v) {
4250
- var A = m[_], g = v[_];
4251
- A ? A.src !== g.src && d.change.push(g) : d.add.push(g);
4250
+ var E = m[_], g = v[_];
4251
+ E ? E.src !== g.src && d.change.push(g) : d.add.push(g);
4252
4252
  }
4253
4253
  (0 < d.del.length || 0 < d.add.length || 0 < d.change.length) && r.change.push(d);
4254
4254
  }
@@ -4274,8 +4274,8 @@ function ia() {
4274
4274
  var r = {};
4275
4275
  return Z(t.objectStoreNames, 0).forEach(function(i) {
4276
4276
  for (var f = n.objectStore(i), d = er(ts(_ = f.keyPath), _ || "", !0, !1, !!f.autoIncrement, _ && typeof _ != "string", !0), m = [], v = 0; v < f.indexNames.length; ++v) {
4277
- var A = f.index(f.indexNames[v]), _ = A.keyPath, A = er(A.name, _, !!A.unique, !!A.multiEntry, !1, _ && typeof _ != "string", !1);
4278
- m.push(A);
4277
+ var E = f.index(f.indexNames[v]), _ = E.keyPath, E = er(E.name, _, !!E.unique, !!E.multiEntry, !1, _ && typeof _ != "string", !1);
4278
+ m.push(E);
4279
4279
  }
4280
4280
  r[i] = tr(i, d, m);
4281
4281
  }), r;
@@ -4285,8 +4285,8 @@ function ia() {
4285
4285
  var f = r[i], d = n.objectStore(f);
4286
4286
  e._hasGetAll = "getAll" in d;
4287
4287
  for (var m = 0; m < d.indexNames.length; ++m) {
4288
- var v = d.indexNames[m], _ = d.index(v).keyPath, A = typeof _ == "string" ? _ : "[" + Z(_).join("+") + "]";
4289
- !t[f] || (_ = t[f].idxByName[A]) && (_.name = v, delete t[f].idxByName[A], t[f].idxByName[v] = _);
4288
+ var v = d.indexNames[m], _ = d.index(v).keyPath, E = typeof _ == "string" ? _ : "[" + Z(_).join("+") + "]";
4289
+ !t[f] || (_ = t[f].idxByName[E]) && (_.name = v, delete t[f].idxByName[E], t[f].idxByName[v] = _);
4290
4290
  }
4291
4291
  }
4292
4292
  typeof navigator < "u" && /Safari/.test(navigator.userAgent) && !/(Chrome\/|Edge\/)/.test(navigator.userAgent) && c.WorkerGlobalScope && c instanceof c.WorkerGlobalScope && [].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1] < 604 && (e._hasGetAll = !1);
@@ -4445,8 +4445,8 @@ function ia() {
4445
4445
  }
4446
4446
  function us(e, t, n, r) {
4447
4447
  for (var i = [], f = 0, d = Object.entries(e.queries.query); f < d.length; f++) {
4448
- for (var m = d[f], v = m[0], _ = [], A = 0, g = m[1]; A < g.length; A++) {
4449
- var R = g[A];
4448
+ for (var m = d[f], v = m[0], _ = [], E = 0, g = m[1]; E < g.length; E++) {
4449
+ var R = g[E];
4450
4450
  lr(t, R.obsSet) ? R.subscribers.forEach(function(x) {
4451
4451
  return n.add(x);
4452
4452
  }) : r && _.push(R);
@@ -4475,11 +4475,11 @@ function ia() {
4475
4475
  if (!S) throw new V.MissingAPI();
4476
4476
  S.onerror = Ue(b), S.onblocked = de(e._fireOnBlocked), S.onupgradeneeded = de(function(x) {
4477
4477
  var k;
4478
- A = S.transaction, t.autoSchema && !e._options.allowEmptyDB ? (S.onerror = Gt, A.abort(), S.result.close(), (k = n.deleteDatabase(T)).onsuccess = k.onerror = de(function() {
4478
+ E = S.transaction, t.autoSchema && !e._options.allowEmptyDB ? (S.onerror = Gt, E.abort(), S.result.close(), (k = n.deleteDatabase(T)).onsuccess = k.onerror = de(function() {
4479
4479
  b(new V.NoSuchDatabase("Database ".concat(T, " doesnt exist")));
4480
- })) : (A.onerror = Ue(b), x = x.oldVersion > Math.pow(2, 62) ? 0 : x.oldVersion, g = x < 1, e.idbdb = S.result, f && di(e, A), hi(e, x / 10, A, b));
4480
+ })) : (E.onerror = Ue(b), x = x.oldVersion > Math.pow(2, 62) ? 0 : x.oldVersion, g = x < 1, e.idbdb = S.result, f && di(e, E), hi(e, x / 10, E, b));
4481
4481
  }, b), S.onsuccess = de(function() {
4482
- A = null;
4482
+ E = null;
4483
4483
  var x, k, O, M, I, D = e.idbdb = S.result, j = Z(D.objectStoreNames);
4484
4484
  if (0 < j.length) try {
4485
4485
  var N = D.transaction((M = j).length === 1 ? M[0] : M, "readonly");
@@ -4507,7 +4507,7 @@ function ia() {
4507
4507
  return U.reject(R);
4508
4508
  });
4509
4509
  }
4510
- var v, _ = t.dbReadyResolve, A = null, g = !1;
4510
+ var v, _ = t.dbReadyResolve, E = null, g = !1;
4511
4511
  return U.race([r, (typeof navigator > "u" ? U.resolve() : !navigator.userAgentData && /Safari\//.test(navigator.userAgent) && !/Chrom(e|ium)\//.test(navigator.userAgent) && indexedDB.databases ? new Promise(function(R) {
4512
4512
  function b() {
4513
4513
  return indexedDB.databases().finally(R);
@@ -4531,7 +4531,7 @@ function ia() {
4531
4531
  }).catch(function(R) {
4532
4532
  t.dbOpenError = R;
4533
4533
  try {
4534
- A && A.abort();
4534
+ E && E.abort();
4535
4535
  } catch {
4536
4536
  }
4537
4537
  return r === t.openCanceller && e._close(), ye(R);
@@ -4579,19 +4579,19 @@ function ia() {
4579
4579
  var _ = v[m];
4580
4580
  d(_.keyPath, 0, _);
4581
4581
  }
4582
- function A(g) {
4582
+ function E(g) {
4583
4583
  var R, b = g.query.index;
4584
4584
  return b.isVirtual ? a(a({}, g), { query: { index: b.lowLevelIndex, range: (R = g.query.range, b = b.keyTail, { type: R.type === 1 ? 2 : R.type, lower: kn(R.lower, R.lowerOpen ? e.MAX_KEY : e.MIN_KEY, b), lowerOpen: !0, upper: kn(R.upper, R.upperOpen ? e.MIN_KEY : e.MAX_KEY, b), upperOpen: !0 }) } }) : g;
4585
4585
  }
4586
4586
  return a(a({}, n), { schema: a(a({}, r), { primaryKey: t, indexes: f, getIndexByKeyPath: function(g) {
4587
4587
  return (g = i[Xt(g)]) && g[0];
4588
4588
  } }), count: function(g) {
4589
- return n.count(A(g));
4589
+ return n.count(E(g));
4590
4590
  }, query: function(g) {
4591
- return n.query(A(g));
4591
+ return n.query(E(g));
4592
4592
  }, openCursor: function(g) {
4593
4593
  var R = g.query.index, b = R.keyTail, T = R.isVirtual, S = R.keyLength;
4594
- return T ? n.openCursor(A(g)).then(function(k) {
4594
+ return T ? n.openCursor(E(g)).then(function(k) {
4595
4595
  return k && x(k);
4596
4596
  }) : n.openCursor(g);
4597
4597
  function x(k) {
@@ -4631,17 +4631,17 @@ function ia() {
4631
4631
  case "add":
4632
4632
  if (v.fire === ue) break;
4633
4633
  return f._promise("readwrite", function() {
4634
- return A(i);
4634
+ return E(i);
4635
4635
  }, !0);
4636
4636
  case "put":
4637
4637
  if (v.fire === ue && _.fire === ue) break;
4638
4638
  return f._promise("readwrite", function() {
4639
- return A(i);
4639
+ return E(i);
4640
4640
  }, !0);
4641
4641
  case "delete":
4642
4642
  if (m.fire === ue) break;
4643
4643
  return f._promise("readwrite", function() {
4644
- return A(i);
4644
+ return E(i);
4645
4645
  }, !0);
4646
4646
  case "deleteRange":
4647
4647
  if (m.fire === ue) break;
@@ -4649,7 +4649,7 @@ function ia() {
4649
4649
  return function g(R, b, T) {
4650
4650
  return n.query({ trans: R, values: !1, query: { index: r, range: b }, limit: T }).then(function(S) {
4651
4651
  var x = S.result;
4652
- return A({ type: "delete", keys: x, trans: R }).then(function(k) {
4652
+ return E({ type: "delete", keys: x, trans: R }).then(function(k) {
4653
4653
  return 0 < k.numFailures ? Promise.reject(k.failures[0]) : x.length < T ? { failures: [], numFailures: 0, lastResult: void 0 } : g(R, a(a({}, b), { lower: x[x.length - 1], lowerOpen: !0 }), T);
4654
4654
  });
4655
4655
  });
@@ -4657,7 +4657,7 @@ function ia() {
4657
4657
  }, !0);
4658
4658
  }
4659
4659
  return n.mutate(i);
4660
- function A(g) {
4660
+ function E(g) {
4661
4661
  var R, b, T, S = z.trans, x = g.keys || yr(r, g);
4662
4662
  if (!x) throw new Error("Keys missing");
4663
4663
  return (g = g.type === "add" || g.type === "put" ? a(a({}, g), { keys: x }) : a({}, g)).type !== "delete" && (g.values = u([], g.values)), g.keys && (g.keys = u([], g.keys)), R = n, T = x, ((b = g).type === "add" ? Promise.resolve([]) : R.getMany({ trans: b.trans, keys: T, cache: "immutable" })).then(function(k) {
@@ -4728,7 +4728,7 @@ function ia() {
4728
4728
  }, table: function(r) {
4729
4729
  var i = e.table(r), f = i.schema, d = f.primaryKey, g = f.indexes, m = d.extractKey, v = d.outbound, _ = d.autoIncrement && g.filter(function(b) {
4730
4730
  return b.compound && b.keyPath.includes(d.keyPath);
4731
- }), A = a(a({}, i), { mutate: function(b) {
4731
+ }), E = a(a({}, i), { mutate: function(b) {
4732
4732
  function T(K) {
4733
4733
  return K = "idb://".concat(t, "/").concat(r, "/").concat(K), M[K] || (M[K] = new Ee());
4734
4734
  }
@@ -4770,7 +4770,7 @@ function ia() {
4770
4770
  return [d, new Ee().addKeys(b.keys)];
4771
4771
  }, count: g, query: g, openCursor: g };
4772
4772
  return l(R).forEach(function(b) {
4773
- A[b] = function(T) {
4773
+ E[b] = function(T) {
4774
4774
  var S = z.subscr, x = !!S, k = ls(z, i) && fs(b, T) ? T.obsSet = {} : S;
4775
4775
  if (x) {
4776
4776
  var O = function(F) {
@@ -4805,7 +4805,7 @@ function ia() {
4805
4805
  }
4806
4806
  return i[b].apply(this, arguments);
4807
4807
  };
4808
- }), A;
4808
+ }), E;
4809
4809
  } });
4810
4810
  } };
4811
4811
  function hs(e, t, n) {
@@ -4824,11 +4824,11 @@ function ia() {
4824
4824
  }
4825
4825
  function ds(e, t, R, r, i, f) {
4826
4826
  if (!R || R.length === 0) return e;
4827
- var d = t.query.index, m = d.multiEntry, v = t.query.range, _ = r.schema.primaryKey.extractKey, A = d.extractKey, g = (d.lowLevelIndex || d).extractKey, R = R.reduce(function(b, T) {
4827
+ var d = t.query.index, m = d.multiEntry, v = t.query.range, _ = r.schema.primaryKey.extractKey, E = d.extractKey, g = (d.lowLevelIndex || d).extractKey, R = R.reduce(function(b, T) {
4828
4828
  var S = b, x = [];
4829
4829
  if (T.type === "add" || T.type === "put") for (var k = new Ee(), O = T.values.length - 1; 0 <= O; --O) {
4830
4830
  var M, I = T.values[O], D = _(I);
4831
- k.hasKey(D) || (M = A(I), (m && p(M) ? M.some(function(K) {
4831
+ k.hasKey(D) || (M = E(I), (m && p(M) ? M.some(function(K) {
4832
4832
  return gr(K, v);
4833
4833
  }) : gr(M, v)) && (k.addKey(D), x.push(I)));
4834
4834
  }
@@ -4911,8 +4911,8 @@ function ia() {
4911
4911
  return r === "readwrite" && (d = (f = new AbortController()).signal, i = function(v) {
4912
4912
  return function() {
4913
4913
  if (f.abort(), r === "readwrite") {
4914
- for (var _ = /* @__PURE__ */ new Set(), A = 0, g = n; A < g.length; A++) {
4915
- var R = g[A], b = vt["idb://".concat(t, "/").concat(R)];
4914
+ for (var _ = /* @__PURE__ */ new Set(), E = 0, g = n; E < g.length; E++) {
4915
+ var R = g[E], b = vt["idb://".concat(t, "/").concat(R)];
4916
4916
  if (b) {
4917
4917
  var T = e.table(R), S = b.optimisticOps.filter(function(H) {
4918
4918
  return H.trans === m;
@@ -4951,9 +4951,9 @@ function ia() {
4951
4951
  }), d.catch(function() {
4952
4952
  Fe(m.optimisticOps, f), f.mutatedParts && Rn(f.mutatedParts);
4953
4953
  })) : d.then(function(v) {
4954
- var _ = hs(0, a(a({}, f), { values: f.values.map(function(A, g) {
4954
+ var _ = hs(0, a(a({}, f), { values: f.values.map(function(E, g) {
4955
4955
  var R;
4956
- return v.failures[g] ? A : (A = (R = i.keyPath) !== null && R !== void 0 && R.includes(".") ? me(A) : a({}, A), ae(A, i.keyPath, v.results[g]), A);
4956
+ return v.failures[g] ? E : (E = (R = i.keyPath) !== null && R !== void 0 && R.includes(".") ? me(E) : a({}, E), ae(E, i.keyPath, v.results[g]), E);
4957
4957
  }) }), v);
4958
4958
  m.optimisticOps.push(_), queueMicrotask(function() {
4959
4959
  return f.mutatedParts && Rn(f.mutatedParts);
@@ -4980,18 +4980,18 @@ function ia() {
4980
4980
  return ps(D.req.query.range, k.query.range);
4981
4981
  }), [I, !!I, O, M];
4982
4982
  }
4983
- }(t, n, "query", f), A = _[0], g = _[1], R = _[2], b = _[3];
4984
- return A && g ? A.obsSet = f.obsSet : (g = r.query(f).then(function(T) {
4983
+ }(t, n, "query", f), E = _[0], g = _[1], R = _[2], b = _[3];
4984
+ return E && g ? E.obsSet = f.obsSet : (g = r.query(f).then(function(T) {
4985
4985
  var S = T.result;
4986
- if (A && (A.res = S), d) {
4986
+ if (E && (E.res = S), d) {
4987
4987
  for (var x = 0, k = S.length; x < k; ++x) Object.freeze(S[x]);
4988
4988
  Object.freeze(S);
4989
4989
  } else T.result = me(S);
4990
4990
  return T;
4991
4991
  }).catch(function(T) {
4992
- return b && A && Fe(b, A), Promise.reject(T);
4993
- }), A = { obsSet: f.obsSet, promise: g, subscribers: /* @__PURE__ */ new Set(), type: "query", req: f, dirty: !1 }, b ? b.push(A) : (b = [A], (R = R || (vt["idb://".concat(t, "/").concat(n)] = { queries: { query: {}, count: {} }, objs: /* @__PURE__ */ new Map(), optimisticOps: [], unsignaledParts: {} })).queries.query[f.query.index.name || ""] = b)), _i(A, b, m, v), A.promise.then(function(T) {
4994
- return { result: ds(T.result, f, R == null ? void 0 : R.optimisticOps, r, A, d) };
4992
+ return b && E && Fe(b, E), Promise.reject(T);
4993
+ }), E = { obsSet: f.obsSet, promise: g, subscribers: /* @__PURE__ */ new Set(), type: "query", req: f, dirty: !1 }, b ? b.push(E) : (b = [E], (R = R || (vt["idb://".concat(t, "/").concat(n)] = { queries: { query: {}, count: {} }, objs: /* @__PURE__ */ new Map(), optimisticOps: [], unsignaledParts: {} })).queries.query[f.query.index.name || ""] = b)), _i(E, b, m, v), E.promise.then(function(T) {
4994
+ return { result: ds(T.result, f, R == null ? void 0 : R.optimisticOps, r, E, d) };
4995
4995
  });
4996
4996
  } });
4997
4997
  } });
@@ -5060,8 +5060,8 @@ function ia() {
5060
5060
  t.close(e);
5061
5061
  var m = t._deps.indexedDB.deleteDatabase(t.name);
5062
5062
  m.onsuccess = de(function() {
5063
- var v, _, A;
5064
- v = t._deps, _ = t.name, A = v.indexedDB, v = v.IDBKeyRange, ar(A) || _ === pn || or(A, v).delete(_).catch(ue), i();
5063
+ var v, _, E;
5064
+ v = t._deps, _ = t.name, E = v.indexedDB, v = v.IDBKeyRange, ar(E) || _ === pn || or(E, v).delete(_).catch(ue), i();
5065
5065
  }), m.onerror = Ue(f), m.onblocked = t._fireOnBlocked;
5066
5066
  }
5067
5067
  if (n) throw new V.InvalidArgument("Invalid closeOptions argument to db.delete()");
@@ -5118,19 +5118,19 @@ function ia() {
5118
5118
  }), m && i && !i.active && (i = null);
5119
5119
  }
5120
5120
  } catch (_) {
5121
- return i ? i._promise(null, function(A, g) {
5121
+ return i ? i._promise(null, function(E, g) {
5122
5122
  g(_);
5123
5123
  }) : ye(_);
5124
5124
  }
5125
- var v = (function _(A, g, R, b, T) {
5125
+ var v = (function _(E, g, R, b, T) {
5126
5126
  return U.resolve().then(function() {
5127
- var S = z.transless || z, x = A._createTransaction(g, R, A._dbSchema, b);
5127
+ var S = z.transless || z, x = E._createTransaction(g, R, E._dbSchema, b);
5128
5128
  if (x.explicit = !0, S = { trans: x, transless: S }, b) x.idbtrans = b.idbtrans;
5129
5129
  else try {
5130
- x.create(), x.idbtrans._explicit = !0, A._state.PR1398_maxLoop = 3;
5130
+ x.create(), x.idbtrans._explicit = !0, E._state.PR1398_maxLoop = 3;
5131
5131
  } catch (M) {
5132
- return M.name === je.InvalidState && A.isOpen() && 0 < --A._state.PR1398_maxLoop ? (console.warn("Dexie: Need to reopen db"), A.close({ disableAutoOpen: !1 }), A.open().then(function() {
5133
- return _(A, g, R, null, T);
5132
+ return M.name === je.InvalidState && E.isOpen() && 0 < --E._state.PR1398_maxLoop ? (console.warn("Dexie: Need to reopen db"), E.close({ disableAutoOpen: !1 }), E.open().then(function() {
5133
+ return _(E, g, R, null, T);
5134
5134
  })) : ye(M);
5135
5135
  }
5136
5136
  var k, O = nn(T);
@@ -5221,19 +5221,19 @@ function ia() {
5221
5221
  return R.on("versionchange").fire(g);
5222
5222
  });
5223
5223
  }, this.use(vi), this.use(xi), this.use(bi), this.use(yi), this.use(gi);
5224
- var A = new Proxy(this, { get: function(g, R, b) {
5224
+ var E = new Proxy(this, { get: function(g, R, b) {
5225
5225
  if (R === "_vip") return !0;
5226
5226
  if (R === "table") return function(S) {
5227
- return On(n.table(S), A);
5227
+ return On(n.table(S), E);
5228
5228
  };
5229
5229
  var T = Reflect.get(g, R, b);
5230
- return T instanceof Yr ? On(T, A) : R === "tables" ? T.map(function(S) {
5231
- return On(S, A);
5230
+ return T instanceof Yr ? On(T, E) : R === "tables" ? T.map(function(S) {
5231
+ return On(S, E);
5232
5232
  }) : R === "_createTransaction" ? function() {
5233
- return On(T.apply(this, arguments), A);
5233
+ return On(T.apply(this, arguments), E);
5234
5234
  } : T;
5235
5235
  } });
5236
- this.vip = A, r.forEach(function(g) {
5236
+ this.vip = E, r.forEach(function(g) {
5237
5237
  return g(n);
5238
5238
  });
5239
5239
  }
@@ -5252,12 +5252,12 @@ function ia() {
5252
5252
  }
5253
5253
  function ms(e) {
5254
5254
  var t, n = !1, r = new Ti(function(i) {
5255
- var f = nn(e), d, m = !1, v = {}, _ = {}, A = { get closed() {
5255
+ var f = nn(e), d, m = !1, v = {}, _ = {}, E = { get closed() {
5256
5256
  return m;
5257
5257
  }, unsubscribe: function() {
5258
5258
  m || (m = !0, d && d.abort(), g && it.storagemutated.unsubscribe(b));
5259
5259
  } };
5260
- i.start && i.start(A);
5260
+ i.start && i.start(E);
5261
5261
  var g = !1, R = function() {
5262
5262
  return Xn(T);
5263
5263
  }, b = function(S) {
@@ -5286,7 +5286,7 @@ function ia() {
5286
5286
  });
5287
5287
  }));
5288
5288
  };
5289
- return setTimeout(R, 0), A;
5289
+ return setTimeout(R, 0), E;
5290
5290
  });
5291
5291
  return r.hasValue = function() {
5292
5292
  return n;
@@ -5483,11 +5483,11 @@ const Aa = () => {
5483
5483
  async function u(c, l, p = !0, h) {
5484
5484
  In || (In = new aa());
5485
5485
  const y = await In.loadCachedModel(c, l);
5486
- return y ? p ? mo(y) : y : new Promise((E, w) => {
5487
- C.load(c, E, h, w);
5488
- }).then(async (E) => {
5489
- const w = yo(E);
5490
- return In.cacheModel(c, E.scene, l), p ? E.scene : w;
5486
+ return y ? p ? mo(y) : y : new Promise((A, w) => {
5487
+ C.load(c, A, h, w);
5488
+ }).then(async (A) => {
5489
+ const w = yo(A.scene);
5490
+ return In.cacheModel(c, w, l), p ? A.scene : w;
5491
5491
  });
5492
5492
  }
5493
5493
  return {