@idetik/core 0.30.0 → 0.31.0

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.js CHANGED
@@ -102,7 +102,7 @@ class FQ {
102
102
  this.backgroundColor_ = X.from(A);
103
103
  }
104
104
  }
105
- var UE = `#version 300 es
105
+ var dE = `#version 300 es
106
106
 
107
107
  layout (location = 0) in vec3 a_position;
108
108
  layout (location = 3) in vec3 a_prevPosition;
@@ -162,7 +162,7 @@ void main() {
162
162
 
163
163
 
164
164
  gl_PointSize = 5.0;
165
- }`, dE = `#version 300 es
165
+ }`, UE = `#version 300 es
166
166
 
167
167
  precision mediump float;
168
168
 
@@ -523,8 +523,8 @@ void main() {
523
523
  }`;
524
524
  const uE = {
525
525
  projectedLine: {
526
- vertex: UE,
527
- fragment: dE
526
+ vertex: dE,
527
+ fragment: UE
528
528
  },
529
529
  points: {
530
530
  vertex: lE,
@@ -843,24 +843,24 @@ function SA() {
843
843
  var C = new DA(16);
844
844
  return DA != Float32Array && (C[1] = 0, C[2] = 0, C[3] = 0, C[4] = 0, C[6] = 0, C[7] = 0, C[8] = 0, C[9] = 0, C[11] = 0, C[12] = 0, C[13] = 0, C[14] = 0), C[0] = 1, C[5] = 1, C[10] = 1, C[15] = 1, C;
845
845
  }
846
- function WE(C, A, I, g, B, Q, E, i, o, s, t, e, n, D, F, U) {
846
+ function WE(C, A, I, g, B, Q, E, i, o, s, t, e, n, D, F, k) {
847
847
  var S = new DA(16);
848
- return S[0] = C, S[1] = A, S[2] = I, S[3] = g, S[4] = B, S[5] = Q, S[6] = E, S[7] = i, S[8] = o, S[9] = s, S[10] = t, S[11] = e, S[12] = n, S[13] = D, S[14] = F, S[15] = U, S;
848
+ return S[0] = C, S[1] = A, S[2] = I, S[3] = g, S[4] = B, S[5] = Q, S[6] = E, S[7] = i, S[8] = o, S[9] = s, S[10] = t, S[11] = e, S[12] = n, S[13] = D, S[14] = F, S[15] = k, S;
849
849
  }
850
- function Ug(C, A) {
851
- var I = A[0], g = A[1], B = A[2], Q = A[3], E = A[4], i = A[5], o = A[6], s = A[7], t = A[8], e = A[9], n = A[10], D = A[11], F = A[12], U = A[13], S = A[14], l = A[15], f = I * i - g * E, k = I * o - B * E, R = I * s - Q * E, L = g * o - B * i, M = g * s - Q * i, W = B * s - Q * o, $ = t * U - e * F, BA = t * S - n * F, IA = t * l - D * F, iA = e * S - n * U, uA = e * l - D * U, fA = n * l - D * S, oA = f * fA - k * uA + R * iA + L * IA - M * BA + W * $;
852
- return oA ? (oA = 1 / oA, C[0] = (i * fA - o * uA + s * iA) * oA, C[1] = (B * uA - g * fA - Q * iA) * oA, C[2] = (U * W - S * M + l * L) * oA, C[3] = (n * M - e * W - D * L) * oA, C[4] = (o * IA - E * fA - s * BA) * oA, C[5] = (I * fA - B * IA + Q * BA) * oA, C[6] = (S * R - F * W - l * k) * oA, C[7] = (t * W - n * R + D * k) * oA, C[8] = (E * uA - i * IA + s * $) * oA, C[9] = (g * IA - I * uA - Q * $) * oA, C[10] = (F * M - U * R + l * f) * oA, C[11] = (e * R - t * M - D * f) * oA, C[12] = (i * BA - E * iA - o * $) * oA, C[13] = (I * iA - g * BA + B * $) * oA, C[14] = (U * k - F * L - S * f) * oA, C[15] = (t * L - e * k + n * f) * oA, C) : null;
850
+ function dg(C, A) {
851
+ var I = A[0], g = A[1], B = A[2], Q = A[3], E = A[4], i = A[5], o = A[6], s = A[7], t = A[8], e = A[9], n = A[10], D = A[11], F = A[12], k = A[13], S = A[14], l = A[15], f = I * i - g * E, d = I * o - B * E, R = I * s - Q * E, L = g * o - B * i, M = g * s - Q * i, W = B * s - Q * o, $ = t * k - e * F, BA = t * S - n * F, IA = t * l - D * F, iA = e * S - n * k, uA = e * l - D * k, fA = n * l - D * S, oA = f * fA - d * uA + R * iA + L * IA - M * BA + W * $;
852
+ return oA ? (oA = 1 / oA, C[0] = (i * fA - o * uA + s * iA) * oA, C[1] = (B * uA - g * fA - Q * iA) * oA, C[2] = (k * W - S * M + l * L) * oA, C[3] = (n * M - e * W - D * L) * oA, C[4] = (o * IA - E * fA - s * BA) * oA, C[5] = (I * fA - B * IA + Q * BA) * oA, C[6] = (S * R - F * W - l * d) * oA, C[7] = (t * W - n * R + D * d) * oA, C[8] = (E * uA - i * IA + s * $) * oA, C[9] = (g * IA - I * uA - Q * $) * oA, C[10] = (F * M - k * R + l * f) * oA, C[11] = (e * R - t * M - D * f) * oA, C[12] = (i * BA - E * iA - o * $) * oA, C[13] = (I * iA - g * BA + B * $) * oA, C[14] = (k * d - F * L - S * f) * oA, C[15] = (t * L - e * d + n * f) * oA, C) : null;
853
853
  }
854
854
  function eI(C, A, I) {
855
- var g = A[0], B = A[1], Q = A[2], E = A[3], i = A[4], o = A[5], s = A[6], t = A[7], e = A[8], n = A[9], D = A[10], F = A[11], U = A[12], S = A[13], l = A[14], f = A[15], k = I[0], R = I[1], L = I[2], M = I[3];
856
- return C[0] = k * g + R * i + L * e + M * U, C[1] = k * B + R * o + L * n + M * S, C[2] = k * Q + R * s + L * D + M * l, C[3] = k * E + R * t + L * F + M * f, k = I[4], R = I[5], L = I[6], M = I[7], C[4] = k * g + R * i + L * e + M * U, C[5] = k * B + R * o + L * n + M * S, C[6] = k * Q + R * s + L * D + M * l, C[7] = k * E + R * t + L * F + M * f, k = I[8], R = I[9], L = I[10], M = I[11], C[8] = k * g + R * i + L * e + M * U, C[9] = k * B + R * o + L * n + M * S, C[10] = k * Q + R * s + L * D + M * l, C[11] = k * E + R * t + L * F + M * f, k = I[12], R = I[13], L = I[14], M = I[15], C[12] = k * g + R * i + L * e + M * U, C[13] = k * B + R * o + L * n + M * S, C[14] = k * Q + R * s + L * D + M * l, C[15] = k * E + R * t + L * F + M * f, C;
855
+ var g = A[0], B = A[1], Q = A[2], E = A[3], i = A[4], o = A[5], s = A[6], t = A[7], e = A[8], n = A[9], D = A[10], F = A[11], k = A[12], S = A[13], l = A[14], f = A[15], d = I[0], R = I[1], L = I[2], M = I[3];
856
+ return C[0] = d * g + R * i + L * e + M * k, C[1] = d * B + R * o + L * n + M * S, C[2] = d * Q + R * s + L * D + M * l, C[3] = d * E + R * t + L * F + M * f, d = I[4], R = I[5], L = I[6], M = I[7], C[4] = d * g + R * i + L * e + M * k, C[5] = d * B + R * o + L * n + M * S, C[6] = d * Q + R * s + L * D + M * l, C[7] = d * E + R * t + L * F + M * f, d = I[8], R = I[9], L = I[10], M = I[11], C[8] = d * g + R * i + L * e + M * k, C[9] = d * B + R * o + L * n + M * S, C[10] = d * Q + R * s + L * D + M * l, C[11] = d * E + R * t + L * F + M * f, d = I[12], R = I[13], L = I[14], M = I[15], C[12] = d * g + R * i + L * e + M * k, C[13] = d * B + R * o + L * n + M * S, C[14] = d * Q + R * s + L * D + M * l, C[15] = d * E + R * t + L * F + M * f, C;
857
857
  }
858
858
  function vE(C, A) {
859
859
  return C[0] = A[0], C[1] = 0, C[2] = 0, C[3] = 0, C[4] = 0, C[5] = A[1], C[6] = 0, C[7] = 0, C[8] = 0, C[9] = 0, C[10] = A[2], C[11] = 0, C[12] = 0, C[13] = 0, C[14] = 0, C[15] = 1, C;
860
860
  }
861
861
  function ZE(C, A, I, g) {
862
- var B = A[0], Q = A[1], E = A[2], i = A[3], o = B + B, s = Q + Q, t = E + E, e = B * o, n = B * s, D = B * t, F = Q * s, U = Q * t, S = E * t, l = i * o, f = i * s, k = i * t, R = g[0], L = g[1], M = g[2];
863
- return C[0] = (1 - (F + S)) * R, C[1] = (n + k) * R, C[2] = (D - f) * R, C[3] = 0, C[4] = (n - k) * L, C[5] = (1 - (e + S)) * L, C[6] = (U + l) * L, C[7] = 0, C[8] = (D + f) * M, C[9] = (U - l) * M, C[10] = (1 - (e + F)) * M, C[11] = 0, C[12] = I[0], C[13] = I[1], C[14] = I[2], C[15] = 1, C;
862
+ var B = A[0], Q = A[1], E = A[2], i = A[3], o = B + B, s = Q + Q, t = E + E, e = B * o, n = B * s, D = B * t, F = Q * s, k = Q * t, S = E * t, l = i * o, f = i * s, d = i * t, R = g[0], L = g[1], M = g[2];
863
+ return C[0] = (1 - (F + S)) * R, C[1] = (n + d) * R, C[2] = (D - f) * R, C[3] = 0, C[4] = (n - d) * L, C[5] = (1 - (e + S)) * L, C[6] = (k + l) * L, C[7] = 0, C[8] = (D + f) * M, C[9] = (k - l) * M, C[10] = (1 - (e + F)) * M, C[11] = 0, C[12] = I[0], C[13] = I[1], C[14] = I[2], C[15] = 1, C;
864
864
  }
865
865
  function PE(C, A, I, g, B) {
866
866
  var Q = 1 / Math.tan(A / 2);
@@ -880,12 +880,12 @@ var _E = VE;
880
880
  function XE(C, A, I, g) {
881
881
  var B = A[0], Q = A[1], E = A[2], i = g[0], o = g[1], s = g[2], t = B - I[0], e = Q - I[1], n = E - I[2], D = t * t + e * e + n * n;
882
882
  D > 0 && (D = 1 / Math.sqrt(D), t *= D, e *= D, n *= D);
883
- var F = o * n - s * e, U = s * t - i * n, S = i * e - o * t;
884
- return D = F * F + U * U + S * S, D > 0 && (D = 1 / Math.sqrt(D), F *= D, U *= D, S *= D), C[0] = F, C[1] = U, C[2] = S, C[3] = 0, C[4] = e * S - n * U, C[5] = n * F - t * S, C[6] = t * U - e * F, C[7] = 0, C[8] = t, C[9] = e, C[10] = n, C[11] = 0, C[12] = B, C[13] = Q, C[14] = E, C[15] = 1, C;
883
+ var F = o * n - s * e, k = s * t - i * n, S = i * e - o * t;
884
+ return D = F * F + k * k + S * S, D > 0 && (D = 1 / Math.sqrt(D), F *= D, k *= D, S *= D), C[0] = F, C[1] = k, C[2] = S, C[3] = 0, C[4] = e * S - n * k, C[5] = n * F - t * S, C[6] = t * k - e * F, C[7] = 0, C[8] = t, C[9] = e, C[10] = n, C[11] = 0, C[12] = B, C[13] = Q, C[14] = E, C[15] = 1, C;
885
885
  }
886
886
  function jE(C, A) {
887
- var I = C[0], g = C[1], B = C[2], Q = C[3], E = C[4], i = C[5], o = C[6], s = C[7], t = C[8], e = C[9], n = C[10], D = C[11], F = C[12], U = C[13], S = C[14], l = C[15], f = A[0], k = A[1], R = A[2], L = A[3], M = A[4], W = A[5], $ = A[6], BA = A[7], IA = A[8], iA = A[9], uA = A[10], fA = A[11], oA = A[12], BC = A[13], CC = A[14], QC = A[15];
888
- return Math.abs(I - f) <= AA * Math.max(1, Math.abs(I), Math.abs(f)) && Math.abs(g - k) <= AA * Math.max(1, Math.abs(g), Math.abs(k)) && Math.abs(B - R) <= AA * Math.max(1, Math.abs(B), Math.abs(R)) && Math.abs(Q - L) <= AA * Math.max(1, Math.abs(Q), Math.abs(L)) && Math.abs(E - M) <= AA * Math.max(1, Math.abs(E), Math.abs(M)) && Math.abs(i - W) <= AA * Math.max(1, Math.abs(i), Math.abs(W)) && Math.abs(o - $) <= AA * Math.max(1, Math.abs(o), Math.abs($)) && Math.abs(s - BA) <= AA * Math.max(1, Math.abs(s), Math.abs(BA)) && Math.abs(t - IA) <= AA * Math.max(1, Math.abs(t), Math.abs(IA)) && Math.abs(e - iA) <= AA * Math.max(1, Math.abs(e), Math.abs(iA)) && Math.abs(n - uA) <= AA * Math.max(1, Math.abs(n), Math.abs(uA)) && Math.abs(D - fA) <= AA * Math.max(1, Math.abs(D), Math.abs(fA)) && Math.abs(F - oA) <= AA * Math.max(1, Math.abs(F), Math.abs(oA)) && Math.abs(U - BC) <= AA * Math.max(1, Math.abs(U), Math.abs(BC)) && Math.abs(S - CC) <= AA * Math.max(1, Math.abs(S), Math.abs(CC)) && Math.abs(l - QC) <= AA * Math.max(1, Math.abs(l), Math.abs(QC));
887
+ var I = C[0], g = C[1], B = C[2], Q = C[3], E = C[4], i = C[5], o = C[6], s = C[7], t = C[8], e = C[9], n = C[10], D = C[11], F = C[12], k = C[13], S = C[14], l = C[15], f = A[0], d = A[1], R = A[2], L = A[3], M = A[4], W = A[5], $ = A[6], BA = A[7], IA = A[8], iA = A[9], uA = A[10], fA = A[11], oA = A[12], BC = A[13], CC = A[14], QC = A[15];
888
+ return Math.abs(I - f) <= AA * Math.max(1, Math.abs(I), Math.abs(f)) && Math.abs(g - d) <= AA * Math.max(1, Math.abs(g), Math.abs(d)) && Math.abs(B - R) <= AA * Math.max(1, Math.abs(B), Math.abs(R)) && Math.abs(Q - L) <= AA * Math.max(1, Math.abs(Q), Math.abs(L)) && Math.abs(E - M) <= AA * Math.max(1, Math.abs(E), Math.abs(M)) && Math.abs(i - W) <= AA * Math.max(1, Math.abs(i), Math.abs(W)) && Math.abs(o - $) <= AA * Math.max(1, Math.abs(o), Math.abs($)) && Math.abs(s - BA) <= AA * Math.max(1, Math.abs(s), Math.abs(BA)) && Math.abs(t - IA) <= AA * Math.max(1, Math.abs(t), Math.abs(IA)) && Math.abs(e - iA) <= AA * Math.max(1, Math.abs(e), Math.abs(iA)) && Math.abs(n - uA) <= AA * Math.max(1, Math.abs(n), Math.abs(uA)) && Math.abs(D - fA) <= AA * Math.max(1, Math.abs(D), Math.abs(fA)) && Math.abs(F - oA) <= AA * Math.max(1, Math.abs(F), Math.abs(oA)) && Math.abs(k - BC) <= AA * Math.max(1, Math.abs(k), Math.abs(BC)) && Math.abs(S - CC) <= AA * Math.max(1, Math.abs(S), Math.abs(CC)) && Math.abs(l - QC) <= AA * Math.max(1, Math.abs(l), Math.abs(QC));
889
889
  }
890
890
  function QA() {
891
891
  var C = new DA(3);
@@ -1009,8 +1009,8 @@ function oi(C, A, I) {
1009
1009
  return C[0] = g * t + E * i + B * s - Q * o, C[1] = B * t + E * o + Q * i - g * s, C[2] = Q * t + E * s + g * o - B * i, C[3] = E * t - g * i - B * o - Q * s, C;
1010
1010
  }
1011
1011
  function qg(C, A, I, g) {
1012
- var B = A[0], Q = A[1], E = A[2], i = A[3], o = I[0], s = I[1], t = I[2], e = I[3], n, D, F, U, S;
1013
- return D = B * o + Q * s + E * t + i * e, D < 0 && (D = -D, o = -o, s = -s, t = -t, e = -e), 1 - D > AA ? (n = Math.acos(D), F = Math.sin(n), U = Math.sin((1 - g) * n) / F, S = Math.sin(g * n) / F) : (U = 1 - g, S = g), C[0] = U * B + S * o, C[1] = U * Q + S * s, C[2] = U * E + S * t, C[3] = U * i + S * e, C;
1012
+ var B = A[0], Q = A[1], E = A[2], i = A[3], o = I[0], s = I[1], t = I[2], e = I[3], n, D, F, k, S;
1013
+ return D = B * o + Q * s + E * t + i * e, D < 0 && (D = -D, o = -o, s = -s, t = -t, e = -e), 1 - D > AA ? (n = Math.acos(D), F = Math.sin(n), k = Math.sin((1 - g) * n) / F, S = Math.sin(g * n) / F) : (k = 1 - g, S = g), C[0] = k * B + S * o, C[1] = k * Q + S * s, C[2] = k * E + S * t, C[3] = k * i + S * e, C;
1014
1014
  }
1015
1015
  function kQ(C, A) {
1016
1016
  var I = A[0] + A[4] + A[8], g;
@@ -1044,7 +1044,7 @@ var si = Bi, ti = Ci, RB = Ei;
1044
1044
  return C[0] = g[0], C[3] = g[1], C[6] = g[2], C[1] = B[0], C[4] = B[1], C[7] = B[2], C[2] = -I[0], C[5] = -I[1], C[8] = -I[2], RB(A, kQ(A, C));
1045
1045
  };
1046
1046
  })();
1047
- function UQ() {
1047
+ function dQ() {
1048
1048
  var C = new DA(2);
1049
1049
  return DA != Float32Array && (C[0] = 0, C[1] = 0), C;
1050
1050
  }
@@ -1076,7 +1076,7 @@ function pg(C, A) {
1076
1076
  return Math.abs(I - B) <= AA * Math.max(1, Math.abs(I), Math.abs(B)) && Math.abs(g - Q) <= AA * Math.max(1, Math.abs(g), Math.abs(Q));
1077
1077
  }
1078
1078
  (function() {
1079
- var C = UQ();
1079
+ var C = dQ();
1080
1080
  return function(A, I, g, B, Q, E) {
1081
1081
  var i, o;
1082
1082
  for (I || (I = 2), g || (g = 0), B ? o = Math.min(B * I + g, A.length) : o = A.length, i = g; i < o; i += I)
@@ -1126,7 +1126,7 @@ class AI {
1126
1126
  SB(Q, E, A), this.expandWithPoint(Q);
1127
1127
  }
1128
1128
  }
1129
- const dQ = {
1129
+ const UQ = {
1130
1130
  position: 0,
1131
1131
  normal: 1,
1132
1132
  uv: 2,
@@ -1225,7 +1225,7 @@ class ri {
1225
1225
  this.gl_.bindBuffer(B, Q), this.gl_.bufferData(B, g, this.gl_.STATIC_DRAW);
1226
1226
  const { attributes: E, strideBytes: i } = A;
1227
1227
  E.forEach((t) => {
1228
- const e = dQ[t.type];
1228
+ const e = UQ[t.type];
1229
1229
  this.gl_.vertexAttribPointer(
1230
1230
  e,
1231
1231
  t.itemSize,
@@ -1315,7 +1315,7 @@ function hi(C) {
1315
1315
  return [0, 1];
1316
1316
  }
1317
1317
  }
1318
- class UB extends GB {
1318
+ class dB extends GB {
1319
1319
  dataFormat = "rgba";
1320
1320
  dataType = "unsigned_byte";
1321
1321
  maxFilter = "nearest";
@@ -1871,10 +1871,10 @@ class aC extends FQ {
1871
1871
  );
1872
1872
  break;
1873
1873
  case "u_cameraPositionModel": {
1874
- const U = Ug(SA(), E), S = Qg(0, 0, 0, 1), l = pI(
1874
+ const k = dg(SA(), E), S = Qg(0, 0, 0, 1), l = pI(
1875
1875
  nI(),
1876
1876
  S,
1877
- U
1877
+ k
1878
1878
  );
1879
1879
  B.setUniform(
1880
1880
  F,
@@ -2062,7 +2062,7 @@ class ki {
2062
2062
  usage: GPUBufferUsage.INDEX,
2063
2063
  mappedAtCreation: !0
2064
2064
  }), new Uint32Array(B.getMappedRange()).set(A.indexData), B.unmap());
2065
- const { attributes: Q, attributesKey: E } = di(A), i = {
2065
+ const { attributes: Q, attributesKey: E } = Ui(A), i = {
2066
2066
  geometry: A,
2067
2067
  vertexBuffer: g,
2068
2068
  indexBuffer: B,
@@ -2083,7 +2083,7 @@ class ki {
2083
2083
  this.buffers_.length = 0;
2084
2084
  }
2085
2085
  }
2086
- function Ui(C) {
2086
+ function di(C) {
2087
2087
  switch (C) {
2088
2088
  case 2:
2089
2089
  return "float32x2";
@@ -2095,18 +2095,18 @@ function Ui(C) {
2095
2095
  throw new Error("Unsupported vertex format size");
2096
2096
  }
2097
2097
  }
2098
- function di(C) {
2098
+ function Ui(C) {
2099
2099
  const A = [];
2100
2100
  let I = "";
2101
2101
  for (const g of C.attributes)
2102
2102
  A.push({
2103
- shaderLocation: dQ[g.type],
2103
+ shaderLocation: UQ[g.type],
2104
2104
  offset: g.offset,
2105
- format: Ui(g.itemSize)
2105
+ format: di(g.itemSize)
2106
2106
  }), I += `${g.type},${g.offset},${g.itemSize}|`;
2107
2107
  return { attributes: A, attributesKey: I };
2108
2108
  }
2109
- class vI extends UB {
2109
+ class vI extends dB {
2110
2110
  width_;
2111
2111
  height_;
2112
2112
  depth_;
@@ -2270,7 +2270,7 @@ function Ji(C) {
2270
2270
  return "rgba32float";
2271
2271
  }
2272
2272
  }
2273
- const dB = (C, A) => ((C + A - 1) / A | 0) * A;
2273
+ const UB = (C, A) => ((C + A - 1) / A | 0) * A;
2274
2274
  function Yi(C) {
2275
2275
  return Object.keys(C);
2276
2276
  }
@@ -2370,14 +2370,14 @@ function Ki(C) {
2370
2370
  return C.size * B;
2371
2371
  {
2372
2372
  const Q = C, { align: E } = SI[Q.type];
2373
- return B > 1 ? dB(C.size, E) * B : C.size;
2373
+ return B > 1 ? UB(C.size, E) * B : C.size;
2374
2374
  }
2375
2375
  }
2376
2376
  }
2377
2377
  function DC(C, A, I, g) {
2378
2378
  const { size: B, type: Q } = C;
2379
2379
  try {
2380
- const { View: E, align: i, size: o } = SI[Q], s = g !== void 0, t = s ? dB(B, i) : o, e = t / E.BYTES_PER_ELEMENT, n = s ? g === 0 ? (A.byteLength - I) / t : g : 1;
2380
+ const { View: E, align: i, size: o } = SI[Q], s = g !== void 0, t = s ? UB(B, i) : o, e = t / E.BYTES_PER_ELEMENT, n = s ? g === 0 ? (A.byteLength - I) / t : g : 1;
2381
2381
  return new E(A, I, e * n);
2382
2382
  } catch {
2383
2383
  throw new Error(`unknown type: ${Q}`);
@@ -2466,7 +2466,7 @@ function YQ(C) {
2466
2466
  return {
2467
2467
  unalignedSize: Q,
2468
2468
  align: E,
2469
- size: dB(Q, E)
2469
+ size: UB(Q, E)
2470
2470
  };
2471
2471
  }
2472
2472
  const B = C.fields;
@@ -2586,7 +2586,7 @@ var sA;
2586
2586
  ((C) => {
2587
2587
  C[C.Uniform = 0] = "Uniform", C[C.Storage = 1] = "Storage", C[C.Immediate = 2] = "Immediate", C[C.Texture = 3] = "Texture", C[C.Sampler = 4] = "Sampler", C[C.StorageTexture = 5] = "StorageTexture";
2588
2588
  })(sA || (sA = {}));
2589
- class UI {
2589
+ class dI {
2590
2590
  constructor(A, I, g, B, Q, E, i) {
2591
2591
  this.relations = null, this.name = A, this.type = I, this.group = g, this.binding = B, this.attributes = Q, this.resourceType = E, this.access = i;
2592
2592
  }
@@ -2871,9 +2871,9 @@ function _(C, A, I, g, B) {
2871
2871
  return B;
2872
2872
  }
2873
2873
  const mg = { r8unorm: { bytesPerBlock: 1, blockWidth: 1, blockHeight: 1, isCompressed: !1, channels: 1 }, r8snorm: { bytesPerBlock: 1, blockWidth: 1, blockHeight: 1, isCompressed: !1, channels: 1 }, r8uint: { bytesPerBlock: 1, blockWidth: 1, blockHeight: 1, isCompressed: !1, channels: 1 }, r8sint: { bytesPerBlock: 1, blockWidth: 1, blockHeight: 1, isCompressed: !1, channels: 1 }, rg8unorm: { bytesPerBlock: 2, blockWidth: 1, blockHeight: 1, isCompressed: !1, channels: 2 }, rg8snorm: { bytesPerBlock: 2, blockWidth: 1, blockHeight: 1, isCompressed: !1, channels: 2 }, rg8uint: { bytesPerBlock: 2, blockWidth: 1, blockHeight: 1, isCompressed: !1, channels: 2 }, rg8sint: { bytesPerBlock: 2, blockWidth: 1, blockHeight: 1, isCompressed: !1, channels: 2 }, rgba8unorm: { bytesPerBlock: 4, blockWidth: 1, blockHeight: 1, isCompressed: !1, channels: 4 }, "rgba8unorm-srgb": { bytesPerBlock: 4, blockWidth: 1, blockHeight: 1, isCompressed: !1, channels: 4 }, rgba8snorm: { bytesPerBlock: 4, blockWidth: 1, blockHeight: 1, isCompressed: !1, channels: 4 }, rgba8uint: { bytesPerBlock: 4, blockWidth: 1, blockHeight: 1, isCompressed: !1, channels: 4 }, rgba8sint: { bytesPerBlock: 4, blockWidth: 1, blockHeight: 1, isCompressed: !1, channels: 4 }, bgra8unorm: { bytesPerBlock: 4, blockWidth: 1, blockHeight: 1, isCompressed: !1, channels: 4 }, "bgra8unorm-srgb": { bytesPerBlock: 4, blockWidth: 1, blockHeight: 1, isCompressed: !1, channels: 4 }, r16uint: { bytesPerBlock: 2, blockWidth: 1, blockHeight: 1, isCompressed: !1, channels: 1 }, r16sint: { bytesPerBlock: 2, blockWidth: 1, blockHeight: 1, isCompressed: !1, channels: 1 }, r16float: { bytesPerBlock: 2, blockWidth: 1, blockHeight: 1, isCompressed: !1, channels: 1 }, rg16uint: { bytesPerBlock: 4, blockWidth: 1, blockHeight: 1, isCompressed: !1, channels: 2 }, rg16sint: { bytesPerBlock: 4, blockWidth: 1, blockHeight: 1, isCompressed: !1, channels: 2 }, rg16float: { bytesPerBlock: 4, blockWidth: 1, blockHeight: 1, isCompressed: !1, channels: 2 }, rgba16uint: { bytesPerBlock: 8, blockWidth: 1, blockHeight: 1, isCompressed: !1, channels: 4 }, rgba16sint: { bytesPerBlock: 8, blockWidth: 1, blockHeight: 1, isCompressed: !1, channels: 4 }, rgba16float: { bytesPerBlock: 8, blockWidth: 1, blockHeight: 1, isCompressed: !1, channels: 4 }, r32uint: { bytesPerBlock: 4, blockWidth: 1, blockHeight: 1, isCompressed: !1, channels: 1 }, r32sint: { bytesPerBlock: 4, blockWidth: 1, blockHeight: 1, isCompressed: !1, channels: 1 }, r32float: { bytesPerBlock: 4, blockWidth: 1, blockHeight: 1, isCompressed: !1, channels: 1 }, rg32uint: { bytesPerBlock: 8, blockWidth: 1, blockHeight: 1, isCompressed: !1, channels: 2 }, rg32sint: { bytesPerBlock: 8, blockWidth: 1, blockHeight: 1, isCompressed: !1, channels: 2 }, rg32float: { bytesPerBlock: 8, blockWidth: 1, blockHeight: 1, isCompressed: !1, channels: 2 }, rgba32uint: { bytesPerBlock: 16, blockWidth: 1, blockHeight: 1, isCompressed: !1, channels: 4 }, rgba32sint: { bytesPerBlock: 16, blockWidth: 1, blockHeight: 1, isCompressed: !1, channels: 4 }, rgba32float: { bytesPerBlock: 16, blockWidth: 1, blockHeight: 1, isCompressed: !1, channels: 4 }, rgb10a2uint: { bytesPerBlock: 4, blockWidth: 1, blockHeight: 1, isCompressed: !1, channels: 4 }, rgb10a2unorm: { bytesPerBlock: 4, blockWidth: 1, blockHeight: 1, isCompressed: !1, channels: 4 }, rg11b10ufloat: { bytesPerBlock: 4, blockWidth: 1, blockHeight: 1, isCompressed: !1, channels: 4 }, stencil8: { bytesPerBlock: 1, blockWidth: 1, blockHeight: 1, isCompressed: !1, isDepthStencil: !0, hasDepth: !1, hasStencil: !0, channels: 1 }, depth16unorm: { bytesPerBlock: 2, blockWidth: 1, blockHeight: 1, isCompressed: !1, isDepthStencil: !0, hasDepth: !0, hasStencil: !1, channels: 1 }, depth24plus: { bytesPerBlock: 4, blockWidth: 1, blockHeight: 1, isCompressed: !1, isDepthStencil: !0, hasDepth: !0, hasStencil: !1, depthOnlyFormat: "depth32float", channels: 1 }, "depth24plus-stencil8": { bytesPerBlock: 8, blockWidth: 1, blockHeight: 1, isCompressed: !1, isDepthStencil: !0, hasDepth: !0, hasStencil: !0, depthOnlyFormat: "depth32float", channels: 1 }, depth32float: { bytesPerBlock: 4, blockWidth: 1, blockHeight: 1, isCompressed: !1, isDepthStencil: !0, hasDepth: !0, hasStencil: !1, channels: 1 }, "depth32float-stencil8": { bytesPerBlock: 8, blockWidth: 1, blockHeight: 1, isCompressed: !1, isDepthStencil: !0, hasDepth: !0, hasStencil: !0, stencilOnlyFormat: "depth32float", channels: 1 }, rgb9e5ufloat: { bytesPerBlock: 4, blockWidth: 1, blockHeight: 1, isCompressed: !1, channels: 4 }, "bc1-rgba-unorm": { bytesPerBlock: 8, blockWidth: 4, blockHeight: 4, isCompressed: !0, channels: 4 }, "bc1-rgba-unorm-srgb": { bytesPerBlock: 8, blockWidth: 4, blockHeight: 4, isCompressed: !0, channels: 4 }, "bc2-rgba-unorm": { bytesPerBlock: 16, blockWidth: 4, blockHeight: 4, isCompressed: !0, channels: 4 }, "bc2-rgba-unorm-srgb": { bytesPerBlock: 16, blockWidth: 4, blockHeight: 4, isCompressed: !0, channels: 4 }, "bc3-rgba-unorm": { bytesPerBlock: 16, blockWidth: 4, blockHeight: 4, isCompressed: !0, channels: 4 }, "bc3-rgba-unorm-srgb": { bytesPerBlock: 16, blockWidth: 4, blockHeight: 4, isCompressed: !0, channels: 4 }, "bc4-r-unorm": { bytesPerBlock: 8, blockWidth: 4, blockHeight: 4, isCompressed: !0, channels: 1 }, "bc4-r-snorm": { bytesPerBlock: 8, blockWidth: 4, blockHeight: 4, isCompressed: !0, channels: 1 }, "bc5-rg-unorm": { bytesPerBlock: 16, blockWidth: 4, blockHeight: 4, isCompressed: !0, channels: 2 }, "bc5-rg-snorm": { bytesPerBlock: 16, blockWidth: 4, blockHeight: 4, isCompressed: !0, channels: 2 }, "bc6h-rgb-ufloat": { bytesPerBlock: 16, blockWidth: 4, blockHeight: 4, isCompressed: !0, channels: 4 }, "bc6h-rgb-float": { bytesPerBlock: 16, blockWidth: 4, blockHeight: 4, isCompressed: !0, channels: 4 }, "bc7-rgba-unorm": { bytesPerBlock: 16, blockWidth: 4, blockHeight: 4, isCompressed: !0, channels: 4 }, "bc7-rgba-unorm-srgb": { bytesPerBlock: 16, blockWidth: 4, blockHeight: 4, isCompressed: !0, channels: 4 }, "etc2-rgb8unorm": { bytesPerBlock: 8, blockWidth: 4, blockHeight: 4, isCompressed: !0, channels: 4 }, "etc2-rgb8unorm-srgb": { bytesPerBlock: 8, blockWidth: 4, blockHeight: 4, isCompressed: !0, channels: 4 }, "etc2-rgb8a1unorm": { bytesPerBlock: 8, blockWidth: 4, blockHeight: 4, isCompressed: !0, channels: 4 }, "etc2-rgb8a1unorm-srgb": { bytesPerBlock: 8, blockWidth: 4, blockHeight: 4, isCompressed: !0, channels: 4 }, "etc2-rgba8unorm": { bytesPerBlock: 16, blockWidth: 4, blockHeight: 4, isCompressed: !0, channels: 4 }, "etc2-rgba8unorm-srgb": { bytesPerBlock: 16, blockWidth: 4, blockHeight: 4, isCompressed: !0, channels: 4 }, "eac-r11unorm": { bytesPerBlock: 8, blockWidth: 1, blockHeight: 1, isCompressed: !0, channels: 1 }, "eac-r11snorm": { bytesPerBlock: 8, blockWidth: 1, blockHeight: 1, isCompressed: !0, channels: 1 }, "eac-rg11unorm": { bytesPerBlock: 16, blockWidth: 1, blockHeight: 1, isCompressed: !0, channels: 2 }, "eac-rg11snorm": { bytesPerBlock: 16, blockWidth: 1, blockHeight: 1, isCompressed: !0, channels: 2 }, "astc-4x4-unorm": { bytesPerBlock: 16, blockWidth: 4, blockHeight: 4, isCompressed: !0, channels: 4 }, "astc-4x4-unorm-srgb": { bytesPerBlock: 16, blockWidth: 4, blockHeight: 4, isCompressed: !0, channels: 4 }, "astc-5x4-unorm": { bytesPerBlock: 16, blockWidth: 5, blockHeight: 4, isCompressed: !0, channels: 4 }, "astc-5x4-unorm-srgb": { bytesPerBlock: 16, blockWidth: 5, blockHeight: 4, isCompressed: !0, channels: 4 }, "astc-5x5-unorm": { bytesPerBlock: 16, blockWidth: 5, blockHeight: 5, isCompressed: !0, channels: 4 }, "astc-5x5-unorm-srgb": { bytesPerBlock: 16, blockWidth: 5, blockHeight: 5, isCompressed: !0, channels: 4 }, "astc-6x5-unorm": { bytesPerBlock: 16, blockWidth: 6, blockHeight: 5, isCompressed: !0, channels: 4 }, "astc-6x5-unorm-srgb": { bytesPerBlock: 16, blockWidth: 6, blockHeight: 5, isCompressed: !0, channels: 4 }, "astc-6x6-unorm": { bytesPerBlock: 16, blockWidth: 6, blockHeight: 6, isCompressed: !0, channels: 4 }, "astc-6x6-unorm-srgb": { bytesPerBlock: 16, blockWidth: 6, blockHeight: 6, isCompressed: !0, channels: 4 }, "astc-8x5-unorm": { bytesPerBlock: 16, blockWidth: 8, blockHeight: 5, isCompressed: !0, channels: 4 }, "astc-8x5-unorm-srgb": { bytesPerBlock: 16, blockWidth: 8, blockHeight: 5, isCompressed: !0, channels: 4 }, "astc-8x6-unorm": { bytesPerBlock: 16, blockWidth: 8, blockHeight: 6, isCompressed: !0, channels: 4 }, "astc-8x6-unorm-srgb": { bytesPerBlock: 16, blockWidth: 8, blockHeight: 6, isCompressed: !0, channels: 4 }, "astc-8x8-unorm": { bytesPerBlock: 16, blockWidth: 8, blockHeight: 8, isCompressed: !0, channels: 4 }, "astc-8x8-unorm-srgb": { bytesPerBlock: 16, blockWidth: 8, blockHeight: 8, isCompressed: !0, channels: 4 }, "astc-10x5-unorm": { bytesPerBlock: 16, blockWidth: 10, blockHeight: 5, isCompressed: !0, channels: 4 }, "astc-10x5-unorm-srgb": { bytesPerBlock: 16, blockWidth: 10, blockHeight: 5, isCompressed: !0, channels: 4 }, "astc-10x6-unorm": { bytesPerBlock: 16, blockWidth: 10, blockHeight: 6, isCompressed: !0, channels: 4 }, "astc-10x6-unorm-srgb": { bytesPerBlock: 16, blockWidth: 10, blockHeight: 6, isCompressed: !0, channels: 4 }, "astc-10x8-unorm": { bytesPerBlock: 16, blockWidth: 10, blockHeight: 8, isCompressed: !0, channels: 4 }, "astc-10x8-unorm-srgb": { bytesPerBlock: 16, blockWidth: 10, blockHeight: 8, isCompressed: !0, channels: 4 }, "astc-10x10-unorm": { bytesPerBlock: 16, blockWidth: 10, blockHeight: 10, isCompressed: !0, channels: 4 }, "astc-10x10-unorm-srgb": { bytesPerBlock: 16, blockWidth: 10, blockHeight: 10, isCompressed: !0, channels: 4 }, "astc-12x10-unorm": { bytesPerBlock: 16, blockWidth: 12, blockHeight: 10, isCompressed: !0, channels: 4 }, "astc-12x10-unorm-srgb": { bytesPerBlock: 16, blockWidth: 12, blockHeight: 10, isCompressed: !0, channels: 4 }, "astc-12x12-unorm": { bytesPerBlock: 16, blockWidth: 12, blockHeight: 12, isCompressed: !0, channels: 4 }, "astc-12x12-unorm-srgb": { bytesPerBlock: 16, blockWidth: 12, blockHeight: 12, isCompressed: !0, channels: 4 } };
2874
- class dA {
2874
+ class UA {
2875
2875
  constructor() {
2876
- this.id = dA._id++, this.line = 0;
2876
+ this.id = UA._id++, this.line = 0;
2877
2877
  }
2878
2878
  get isAstNode() {
2879
2879
  return !0;
@@ -2899,15 +2899,15 @@ class dA {
2899
2899
  return (g = (I = this.constEvaluate(A)) === null || I === void 0 ? void 0 : I.toString()) !== null && g !== void 0 ? g : "";
2900
2900
  }
2901
2901
  }
2902
- dA._id = 0;
2903
- class Eg extends dA {
2902
+ UA._id = 0;
2903
+ class Eg extends UA {
2904
2904
  }
2905
2905
  Eg.instance = new Eg();
2906
- class ig extends dA {
2906
+ class ig extends UA {
2907
2907
  }
2908
2908
  ig.instance = new ig();
2909
2909
  const fQ = /* @__PURE__ */ new Set(["all", "any", "select", "arrayLength", "abs", "acos", "acosh", "asin", "asinh", "atan", "atanh", "atan2", "ceil", "clamp", "cos", "cosh", "countLeadingZeros", "countOneBits", "countTrailingZeros", "cross", "degrees", "determinant", "distance", "dot", "dot4U8Packed", "dot4I8Packed", "exp", "exp2", "extractBits", "faceForward", "firstLeadingBit", "firstTrailingBit", "floor", "fma", "fract", "frexp", "insertBits", "inverseSqrt", "ldexp", "length", "log", "log2", "max", "min", "mix", "modf", "normalize", "pow", "quantizeToF16", "radians", "reflect", "refract", "reverseBits", "round", "saturate", "sign", "sin", "sinh", "smoothstep", "sqrt", "step", "tan", "tanh", "transpose", "trunc", "dpdx", "dpdxCoarse", "dpdxFine", "dpdy", "dpdyCoarse", "dpdyFine", "fwidth", "fwidthCoarse", "fwidthFine", "textureDimensions", "textureGather", "textureGatherCompare", "textureLoad", "textureNumLayers", "textureNumLevels", "textureNumSamples", "textureSample", "textureSampleBias", "textureSampleCompare", "textureSampleCompareLevel", "textureSampleGrad", "textureSampleLevel", "textureSampleBaseClampToEdge", "textureStore", "atomicLoad", "atomicStore", "atomicAdd", "atomicSub", "atomicMax", "atomicMin", "atomicAnd", "atomicOr", "atomicXor", "atomicExchange", "atomicCompareExchangeWeak", "pack4x8snorm", "pack4x8unorm", "pack4xI8", "pack4xU8", "pack4x8Clamp", "pack4xU8Clamp", "pack2x16snorm", "pack2x16unorm", "pack2x16float", "unpack4x8snorm", "unpack4x8unorm", "unpack4xI8", "unpack4xU8", "unpack2x16snorm", "unpack2x16unorm", "unpack2x16float", "storageBarrier", "textureBarrier", "workgroupBarrier", "workgroupUniformLoad", "subgroupAdd", "subgroupExclusiveAdd", "subgroupInclusiveAdd", "subgroupAll", "subgroupAnd", "subgroupAny", "subgroupBallot", "subgroupBroadcast", "subgroupBroadcastFirst", "subgroupElect", "subgroupMax", "subgroupMin", "subgroupMul", "subgroupExclusiveMul", "subgroupInclusiveMul", "subgroupOr", "subgroupShuffle", "subgroupShuffleDown", "subgroupShuffleUp", "subgroupShuffleXor", "subgroupXor", "quadBroadcast", "quadSwapDiagonal", "quadSwapX", "quadSwapY"]);
2910
- class EA extends dA {
2910
+ class EA extends UA {
2911
2911
  }
2912
2912
  class xI extends EA {
2913
2913
  constructor(A, I, g, B, Q, E) {
@@ -3275,7 +3275,7 @@ class LI extends N {
3275
3275
  return "sampler";
3276
3276
  }
3277
3277
  }
3278
- class YA extends dA {
3278
+ class YA extends UA {
3279
3279
  constructor() {
3280
3280
  super(), this.postfix = null, this.hasParen = !1;
3281
3281
  }
@@ -3436,7 +3436,7 @@ class LA extends VQ {
3436
3436
  this.left.search(A), this.right.search(A);
3437
3437
  }
3438
3438
  }
3439
- class _Q extends dA {
3439
+ class _Q extends UA {
3440
3440
  constructor(A) {
3441
3441
  super(), this.body = A;
3442
3442
  }
@@ -3471,7 +3471,7 @@ class jQ extends _Q {
3471
3471
  this.searchBlock(this.body, A);
3472
3472
  }
3473
3473
  }
3474
- class FC extends dA {
3474
+ class FC extends UA {
3475
3475
  constructor(A, I, g) {
3476
3476
  super(), this.name = A, this.type = I, this.attributes = g;
3477
3477
  }
@@ -3479,7 +3479,7 @@ class FC extends dA {
3479
3479
  return "argument";
3480
3480
  }
3481
3481
  }
3482
- class zi extends dA {
3482
+ class zi extends UA {
3483
3483
  constructor(A, I) {
3484
3484
  super(), this.condition = A, this.body = I;
3485
3485
  }
@@ -3490,7 +3490,7 @@ class zi extends dA {
3490
3490
  this.condition.search(A), this.searchBlock(this.body, A);
3491
3491
  }
3492
3492
  }
3493
- class SC extends dA {
3493
+ class SC extends UA {
3494
3494
  constructor(A, I, g) {
3495
3495
  super(), this.name = A, this.type = I, this.attributes = g;
3496
3496
  }
@@ -3498,7 +3498,7 @@ class SC extends dA {
3498
3498
  return "member";
3499
3499
  }
3500
3500
  }
3501
- class zQ extends dA {
3501
+ class zQ extends UA {
3502
3502
  constructor(A, I) {
3503
3503
  super(), this.name = A, this.value = I;
3504
3504
  }
@@ -3920,13 +3920,13 @@ class CA extends MA {
3920
3920
  let n = "f";
3921
3921
  const D = [];
3922
3922
  for (let F = 0; F < t.length; ++F) {
3923
- const U = t[F].toLowerCase();
3923
+ const k = t[F].toLowerCase();
3924
3924
  let S = 0;
3925
- if (U === "x" || U === "r") S = 0;
3926
- else if (U === "y" || U === "g") S = 1;
3927
- else if (U === "z" || U === "b") S = 2;
3925
+ if (k === "x" || k === "r") S = 0;
3926
+ else if (k === "y" || k === "g") S = 1;
3927
+ else if (k === "z" || k === "b") S = 2;
3928
3928
  else {
3929
- if (U !== "w" && U !== "a") return console.error(`Unknown member ${t}`), null;
3929
+ if (k !== "w" && k !== "a") return console.error(`Unknown member ${t}`), null;
3930
3930
  S = 3;
3931
3931
  }
3932
3932
  if (t.length === 1) {
@@ -4066,77 +4066,77 @@ class xA extends MA {
4066
4066
  }
4067
4067
  setPixel(A, I, g, B, Q) {
4068
4068
  const E = this.texelByteSize, i = this.bytesPerRow, o = this.height, s = this.data[B];
4069
- (function(t, e, n, D, F, U, S, l, f, k) {
4070
- const R = D * (S >>= F) * (U >>= F) + n * S + e * l;
4069
+ (function(t, e, n, D, F, k, S, l, f, d) {
4070
+ const R = D * (S >>= F) * (k >>= F) + n * S + e * l;
4071
4071
  switch (f) {
4072
4072
  case "r8unorm":
4073
- return void _(t, R, "8unorm", 1, k);
4073
+ return void _(t, R, "8unorm", 1, d);
4074
4074
  case "r8snorm":
4075
- return void _(t, R, "8snorm", 1, k);
4075
+ return void _(t, R, "8snorm", 1, d);
4076
4076
  case "r8uint":
4077
- return void _(t, R, "8uint", 1, k);
4077
+ return void _(t, R, "8uint", 1, d);
4078
4078
  case "r8sint":
4079
- return void _(t, R, "8sint", 1, k);
4079
+ return void _(t, R, "8sint", 1, d);
4080
4080
  case "rg8unorm":
4081
- return void _(t, R, "8unorm", 2, k);
4081
+ return void _(t, R, "8unorm", 2, d);
4082
4082
  case "rg8snorm":
4083
- return void _(t, R, "8snorm", 2, k);
4083
+ return void _(t, R, "8snorm", 2, d);
4084
4084
  case "rg8uint":
4085
- return void _(t, R, "8uint", 2, k);
4085
+ return void _(t, R, "8uint", 2, d);
4086
4086
  case "rg8sint":
4087
- return void _(t, R, "8sint", 2, k);
4087
+ return void _(t, R, "8sint", 2, d);
4088
4088
  case "rgba8unorm-srgb":
4089
4089
  case "rgba8unorm":
4090
4090
  case "bgra8unorm-srgb":
4091
4091
  case "bgra8unorm":
4092
- return void _(t, R, "8unorm", 4, k);
4092
+ return void _(t, R, "8unorm", 4, d);
4093
4093
  case "rgba8snorm":
4094
- return void _(t, R, "8snorm", 4, k);
4094
+ return void _(t, R, "8snorm", 4, d);
4095
4095
  case "rgba8uint":
4096
- return void _(t, R, "8uint", 4, k);
4096
+ return void _(t, R, "8uint", 4, d);
4097
4097
  case "rgba8sint":
4098
- return void _(t, R, "8sint", 4, k);
4098
+ return void _(t, R, "8sint", 4, d);
4099
4099
  case "r16uint":
4100
- return void _(t, R, "16uint", 1, k);
4100
+ return void _(t, R, "16uint", 1, d);
4101
4101
  case "r16sint":
4102
- return void _(t, R, "16sint", 1, k);
4102
+ return void _(t, R, "16sint", 1, d);
4103
4103
  case "r16float":
4104
- return void _(t, R, "16float", 1, k);
4104
+ return void _(t, R, "16float", 1, d);
4105
4105
  case "rg16uint":
4106
- return void _(t, R, "16uint", 2, k);
4106
+ return void _(t, R, "16uint", 2, d);
4107
4107
  case "rg16sint":
4108
- return void _(t, R, "16sint", 2, k);
4108
+ return void _(t, R, "16sint", 2, d);
4109
4109
  case "rg16float":
4110
- return void _(t, R, "16float", 2, k);
4110
+ return void _(t, R, "16float", 2, d);
4111
4111
  case "rgba16uint":
4112
- return void _(t, R, "16uint", 4, k);
4112
+ return void _(t, R, "16uint", 4, d);
4113
4113
  case "rgba16sint":
4114
- return void _(t, R, "16sint", 4, k);
4114
+ return void _(t, R, "16sint", 4, d);
4115
4115
  case "rgba16float":
4116
- return void _(t, R, "16float", 4, k);
4116
+ return void _(t, R, "16float", 4, d);
4117
4117
  case "r32uint":
4118
- return void _(t, R, "32uint", 1, k);
4118
+ return void _(t, R, "32uint", 1, d);
4119
4119
  case "r32sint":
4120
- return void _(t, R, "32sint", 1, k);
4120
+ return void _(t, R, "32sint", 1, d);
4121
4121
  case "depth16unorm":
4122
4122
  case "depth24plus":
4123
4123
  case "depth24plus-stencil8":
4124
4124
  case "depth32float":
4125
4125
  case "depth32float-stencil8":
4126
4126
  case "r32float":
4127
- return void _(t, R, "32float", 1, k);
4127
+ return void _(t, R, "32float", 1, d);
4128
4128
  case "rg32uint":
4129
- return void _(t, R, "32uint", 2, k);
4129
+ return void _(t, R, "32uint", 2, d);
4130
4130
  case "rg32sint":
4131
- return void _(t, R, "32sint", 2, k);
4131
+ return void _(t, R, "32sint", 2, d);
4132
4132
  case "rg32float":
4133
- return void _(t, R, "32float", 2, k);
4133
+ return void _(t, R, "32float", 2, d);
4134
4134
  case "rgba32uint":
4135
- return void _(t, R, "32uint", 4, k);
4135
+ return void _(t, R, "32uint", 4, d);
4136
4136
  case "rgba32sint":
4137
- return void _(t, R, "32sint", 4, k);
4137
+ return void _(t, R, "32sint", 4, d);
4138
4138
  case "rgba32float":
4139
- return void _(t, R, "32float", 4, k);
4139
+ return void _(t, R, "32float", 4, d);
4140
4140
  case "rg11b10ufloat":
4141
4141
  console.error("TODO: rg11b10ufloat not supported for writing");
4142
4142
  }
@@ -4174,7 +4174,7 @@ class RC {
4174
4174
  return this.isArrayType() || this.isTemplateType();
4175
4175
  }
4176
4176
  }
4177
- class dg {
4177
+ class Ug {
4178
4178
  constructor(A) {
4179
4179
  this._tokens = [], this._start = 0, this._current = 0, this._line = 1, this._source = A ?? "";
4180
4180
  }
@@ -4270,7 +4270,7 @@ class dg {
4270
4270
  return this._current >= this._source.length;
4271
4271
  }
4272
4272
  _isAlpha(A) {
4273
- return !this._isNumeric(A) && !this._isWhitespace(A) && A !== "_" && !dg._operators.has(A);
4273
+ return !this._isNumeric(A) && !this._isWhitespace(A) && A !== "_" && !Ug._operators.has(A);
4274
4274
  }
4275
4275
  _isNumeric(A) {
4276
4276
  return A >= "0" && A <= "9";
@@ -4296,7 +4296,7 @@ class dg {
4296
4296
  function J(C) {
4297
4297
  return Array.isArray(C) || C?.buffer instanceof ArrayBuffer;
4298
4298
  }
4299
- dg._operators = /* @__PURE__ */ new Set([".", "(", ")", "[", "]", "{", "}", ",", ";", ":", "=", "!", "<", ">", "+", "-", "*", "/", "%", "&", "|", "^", "~", "@", "#", "?", "'", "`", '"', "\\", `
4299
+ Ug._operators = /* @__PURE__ */ new Set([".", "(", ")", "[", "]", "{", "}", ",", ";", ":", "=", "!", "<", ">", "+", "-", "*", "/", "%", "&", "|", "^", "~", "@", "#", "?", "'", "`", '"', "\\", `
4300
4300
  `, "\r", " ", "\0"]);
4301
4301
  const og = new Float32Array(1), Ao = new Uint32Array(og.buffer), Io = new Uint32Array(og.buffer), sg = new Int32Array(1), go = new Float32Array(sg.buffer), Bo = new Uint32Array(sg.buffer), tg = new Uint32Array(1), Co = new Float32Array(tg.buffer), Qo = new Int32Array(tg.buffer);
4302
4302
  function kC(C, A, I) {
@@ -4344,27 +4344,27 @@ class qA {
4344
4344
  continue;
4345
4345
  }
4346
4346
  if (this._isUniformVar(I)) {
4347
- const g = I, B = this._getAttributeNum(g.attributes, "group", 0), Q = this._getAttributeNum(g.attributes, "binding", 0), E = this.getTypeInfo(g.type, g.attributes), i = new UI(g.name, E, B, Q, g.attributes, sA.Uniform, g.access);
4347
+ const g = I, B = this._getAttributeNum(g.attributes, "group", 0), Q = this._getAttributeNum(g.attributes, "binding", 0), E = this.getTypeInfo(g.type, g.attributes), i = new dI(g.name, E, B, Q, g.attributes, sA.Uniform, g.access);
4348
4348
  i.access || (i.access = "read"), this.uniforms.push(i);
4349
4349
  continue;
4350
4350
  }
4351
4351
  if (this._isImmediateVar(I)) {
4352
- const g = I, B = this._getAttributeNum(g.attributes, "group", 0), Q = this._getAttributeNum(g.attributes, "binding", 0), E = this.getTypeInfo(g.type, g.attributes), i = new UI(g.name, E, B, Q, g.attributes, sA.Immediate, g.access);
4352
+ const g = I, B = this._getAttributeNum(g.attributes, "group", 0), Q = this._getAttributeNum(g.attributes, "binding", 0), E = this.getTypeInfo(g.type, g.attributes), i = new dI(g.name, E, B, Q, g.attributes, sA.Immediate, g.access);
4353
4353
  i.access || (i.access = "read"), this.immediates.push(i);
4354
4354
  continue;
4355
4355
  }
4356
4356
  if (this._isStorageVar(I)) {
4357
- const g = I, B = this._getAttributeNum(g.attributes, "group", 0), Q = this._getAttributeNum(g.attributes, "binding", 0), E = this.getTypeInfo(g.type, g.attributes), i = this._isStorageTexture(E), o = new UI(g.name, E, B, Q, g.attributes, i ? sA.StorageTexture : sA.Storage, g.access);
4357
+ const g = I, B = this._getAttributeNum(g.attributes, "group", 0), Q = this._getAttributeNum(g.attributes, "binding", 0), E = this.getTypeInfo(g.type, g.attributes), i = this._isStorageTexture(E), o = new dI(g.name, E, B, Q, g.attributes, i ? sA.StorageTexture : sA.Storage, g.access);
4358
4358
  o.access || (o.access = "read"), this.storage.push(o);
4359
4359
  continue;
4360
4360
  }
4361
4361
  if (this._isTextureVar(I)) {
4362
- const g = I, B = this._getAttributeNum(g.attributes, "group", 0), Q = this._getAttributeNum(g.attributes, "binding", 0), E = this.getTypeInfo(g.type, g.attributes), i = this._isStorageTexture(E), o = i ? E.access : g.access, s = new UI(g.name, E, B, Q, g.attributes, i ? sA.StorageTexture : sA.Texture, o || g.access);
4362
+ const g = I, B = this._getAttributeNum(g.attributes, "group", 0), Q = this._getAttributeNum(g.attributes, "binding", 0), E = this.getTypeInfo(g.type, g.attributes), i = this._isStorageTexture(E), o = i ? E.access : g.access, s = new dI(g.name, E, B, Q, g.attributes, i ? sA.StorageTexture : sA.Texture, o || g.access);
4363
4363
  s.access || (s.access = "read"), i ? this.storage.push(s) : this.textures.push(s);
4364
4364
  continue;
4365
4365
  }
4366
4366
  if (this._isSamplerVar(I)) {
4367
- const g = I, B = this._getAttributeNum(g.attributes, "group", 0), Q = this._getAttributeNum(g.attributes, "binding", 0), E = this.getTypeInfo(g.type, g.attributes), i = new UI(g.name, E, B, Q, g.attributes, sA.Sampler, g.access);
4367
+ const g = I, B = this._getAttributeNum(g.attributes, "group", 0), Q = this._getAttributeNum(g.attributes, "binding", 0), E = this.getTypeInfo(g.type, g.attributes), i = new dI(g.name, E, B, Q, g.attributes, sA.Sampler, g.access);
4368
4368
  this.samplers.push(i);
4369
4369
  continue;
4370
4370
  }
@@ -5617,22 +5617,22 @@ class gA extends io {
5617
5617
  e === null && console.error(`Function ${A} not found in reflection data`);
5618
5618
  for (const n in g) for (const D in g[n]) {
5619
5619
  const F = g[n][D];
5620
- Q.variables.forEach((U) => {
5620
+ Q.variables.forEach((k) => {
5621
5621
  var S;
5622
- const l = U.node;
5622
+ const l = k.node;
5623
5623
  if (l?.attributes) {
5624
- let f = null, k = null;
5625
- for (const R of l.attributes) R.name === "binding" ? f = R.value : R.name === "group" && (k = R.value);
5626
- if (D === f && n === k) {
5624
+ let f = null, d = null;
5625
+ for (const R of l.attributes) R.name === "binding" ? f = R.value : R.name === "group" && (d = R.value);
5626
+ if (D === f && n === d) {
5627
5627
  let R = !1;
5628
- for (const L of e.resources) if (L.name === U.name && L.group === parseInt(n) && L.binding === parseInt(D)) {
5628
+ for (const L of e.resources) if (L.name === k.name && L.group === parseInt(n) && L.binding === parseInt(D)) {
5629
5629
  R = !0;
5630
5630
  break;
5631
5631
  }
5632
5632
  if (R) if (F.texture !== void 0 && F.descriptor !== void 0) {
5633
5633
  const L = new xA(F.texture, this.getTypeInfo(l.type), F.descriptor, (S = F.texture.view) !== null && S !== void 0 ? S : null);
5634
- U.value = L;
5635
- } else F.uniform !== void 0 ? U.value = new CA(F.uniform, this.getTypeInfo(l.type)) : U.value = new CA(F, this.getTypeInfo(l.type));
5634
+ k.value = L;
5635
+ } else F.uniform !== void 0 ? k.value = new CA(F.uniform, this.getTypeInfo(l.type)) : k.value = new CA(F, this.getTypeInfo(l.type));
5636
5636
  }
5637
5637
  }
5638
5638
  });
@@ -5716,8 +5716,8 @@ class gA extends io {
5716
5716
  g.setVariable("@workgroup_size", new r(B, Q));
5717
5717
  const i = B[0], o = B[1], s = B[2];
5718
5718
  for (let t = 0, e = 0; t < s; ++t) for (let n = 0; n < o; ++n) for (let D = 0; D < i; ++D, ++e) {
5719
- const F = [D, n, t], U = [D + I[0] * B[0], n + I[1] * B[1], t + I[2] * B[2]];
5720
- g.setVariable("@local_invocation_id", new r(F, Q)), g.setVariable("@global_invocation_id", new r(U, Q)), g.setVariable("@local_invocation_index", new c(e, E)), this._dispatchExec(A, g);
5719
+ const F = [D, n, t], k = [D + I[0] * B[0], n + I[1] * B[1], t + I[2] * B[2]];
5720
+ g.setVariable("@local_invocation_id", new r(F, Q)), g.setVariable("@global_invocation_id", new r(k, Q)), g.setVariable("@local_invocation_index", new c(e, E)), this._dispatchExec(A, g);
5721
5721
  }
5722
5722
  }
5723
5723
  _dispatchExec(A, I) {
@@ -6267,10 +6267,10 @@ class gA extends io {
6267
6267
  if (J(Q) && J(E)) {
6268
6268
  const t = Q, e = E;
6269
6269
  if (this._isMatrixType(g) && this._isMatrixType(B)) {
6270
- const n = (function(S, l, f, k) {
6271
- if (cA[l.name] === void 0 || cA[k.name] === void 0) return null;
6272
- const R = cA[l.name][0], L = cA[l.name][1], M = cA[k.name][0];
6273
- if (R !== cA[k.name][1]) return null;
6270
+ const n = (function(S, l, f, d) {
6271
+ if (cA[l.name] === void 0 || cA[d.name] === void 0) return null;
6272
+ const R = cA[l.name][0], L = cA[l.name][1], M = cA[d.name][0];
6273
+ if (R !== cA[d.name][1]) return null;
6274
6274
  const W = new Array(M * L);
6275
6275
  for (let $ = 0; $ < L; $++) for (let BA = 0; BA < M; BA++) {
6276
6276
  let IA = 0;
@@ -6280,36 +6280,36 @@ class gA extends io {
6280
6280
  return W;
6281
6281
  })(t, g.typeInfo, e, B.typeInfo);
6282
6282
  if (n === null) return console.error(`Matrix multiplication failed. Line ${A.line}.`), null;
6283
- const D = cA[B.typeInfo.name][0], F = cA[g.typeInfo.name][1], U = this.getTypeInfo(`mat${D}x${F}f`);
6284
- return new p(n, U);
6283
+ const D = cA[B.typeInfo.name][0], F = cA[g.typeInfo.name][1], k = this.getTypeInfo(`mat${D}x${F}f`);
6284
+ return new p(n, k);
6285
6285
  }
6286
6286
  if (this._isMatrixType(g) && this._isVectorType(B)) {
6287
- const n = (function(D, F, U, S) {
6287
+ const n = (function(D, F, k, S) {
6288
6288
  if (cA[F.name] === void 0 || xg[S.name] === void 0) return null;
6289
6289
  const l = cA[F.name][0], f = cA[F.name][1];
6290
- if (l !== U.length) return null;
6291
- const k = new Array(f);
6290
+ if (l !== k.length) return null;
6291
+ const d = new Array(f);
6292
6292
  for (let R = 0; R < f; R++) {
6293
6293
  let L = 0;
6294
- for (let M = 0; M < l; M++) L += D[M * f + R] * U[M];
6295
- k[R] = L;
6294
+ for (let M = 0; M < l; M++) L += D[M * f + R] * k[M];
6295
+ d[R] = L;
6296
6296
  }
6297
- return k;
6297
+ return d;
6298
6298
  })(t, g.typeInfo, e, B.typeInfo);
6299
6299
  return n === null ? (console.error(`Matrix vector multiplication failed. Line ${A.line}.`), null) : new r(n, B.typeInfo);
6300
6300
  }
6301
6301
  if (this._isVectorType(g) && this._isMatrixType(B)) {
6302
- const n = (function(D, F, U, S) {
6302
+ const n = (function(D, F, k, S) {
6303
6303
  if (xg[F.name] === void 0 || cA[S.name] === void 0) return null;
6304
6304
  const l = cA[S.name][0], f = cA[S.name][1];
6305
6305
  if (f !== D.length) return null;
6306
- const k = [];
6306
+ const d = [];
6307
6307
  for (let R = 0; R < l; R++) {
6308
6308
  let L = 0;
6309
- for (let M = 0; M < f; M++) L += D[M] * U[M * l + R];
6310
- k[R] = L;
6309
+ for (let M = 0; M < f; M++) L += D[M] * k[M * l + R];
6310
+ d[R] = L;
6311
6311
  }
6312
- return k;
6312
+ return d;
6313
6313
  })(t, g.typeInfo, e, B.typeInfo);
6314
6314
  return n === null ? (console.error(`Matrix vector multiplication failed. Line ${A.line}.`), null) : new r(n, g.typeInfo);
6315
6315
  }
@@ -7002,7 +7002,7 @@ class to {
7002
7002
  }
7003
7003
  _initialize(A) {
7004
7004
  if (A) if (typeof A == "string") {
7005
- const I = new dg(A);
7005
+ const I = new Ug(A);
7006
7006
  this._tokens = I.scanTokens();
7007
7007
  } else this._tokens = A;
7008
7008
  else this._tokens = [];
@@ -7902,7 +7902,7 @@ function Do(C) {
7902
7902
  throw new Error("unknown texture sample type");
7903
7903
  }
7904
7904
  }
7905
- function UC(C) {
7905
+ function dC(C) {
7906
7906
  return C.name.includes("2d_array") ? "2d-array" : C.name.includes("cube_array") ? "cube-array" : C.name.includes("3d") ? "3d" : C.name.includes("1d") ? "1d" : C.name.includes("cube") ? "cube" : "2d";
7907
7907
  }
7908
7908
  function ho(C) {
@@ -7953,7 +7953,7 @@ function co(C, A) {
7953
7953
  visibility: A,
7954
7954
  texture: {
7955
7955
  sampleType: Do(B),
7956
- viewDimension: UC(B),
7956
+ viewDimension: dC(B),
7957
7957
  multisampled: Q
7958
7958
  }
7959
7959
  };
@@ -7973,7 +7973,7 @@ function co(C, A) {
7973
7973
  storageTexture: {
7974
7974
  access: ho(B),
7975
7975
  format: B.format.name,
7976
- viewDimension: UC(B)
7976
+ viewDimension: dC(B)
7977
7977
  }
7978
7978
  };
7979
7979
  default:
@@ -8703,7 +8703,7 @@ let eg = 0, ag = 0;
8703
8703
  function po(C, A) {
8704
8704
  C.data && (eg -= C.data.byteLength, ag -= 1), C.data = A, eg += A.byteLength, ag += 1;
8705
8705
  }
8706
- function dC(C) {
8706
+ function UC(C) {
8707
8707
  C.data && (eg -= C.data.byteLength, ag -= 1), C.data = void 0, C.texture?.releaseCpuData();
8708
8708
  }
8709
8709
  function mo() {
@@ -8789,28 +8789,28 @@ class To {
8789
8789
  H.warn(
8790
8790
  "ChunkStoreView",
8791
8791
  "updateChunkViewStates called with no chunks initialized"
8792
- ), this.chunkViewStates_.forEach(dI);
8792
+ ), this.chunkViewStates_.forEach(UI);
8793
8793
  return;
8794
8794
  }
8795
- const t = UQ();
8795
+ const t = dQ();
8796
8796
  ni(t, g.min, g.max, 0.5);
8797
8797
  const [e, n] = this.getZBounds(A), D = new AI(
8798
8798
  P(g.min[0], g.min[1], e),
8799
8799
  P(g.max[0], g.max[1], n)
8800
8800
  );
8801
- this.chunkViewStates_.forEach(dI);
8802
- const F = this.channelsOfInterest(A), U = this.fallbackLOD(), S = this.getPaddedBounds(D), l = this.currentLOD_ === U ? [this.currentLOD_] : [this.currentLOD_, U];
8801
+ this.chunkViewStates_.forEach(UI);
8802
+ const F = this.channelsOfInterest(A), k = this.fallbackLOD(), S = this.getPaddedBounds(D), l = this.currentLOD_ === k ? [this.currentLOD_] : [this.currentLOD_, k];
8803
8803
  for (const f of l) {
8804
- const k = f === this.currentLOD_, R = f === U;
8804
+ const d = f === this.currentLOD_, R = f === k;
8805
8805
  this.iterateChunksInBox(
8806
8806
  s,
8807
8807
  f,
8808
8808
  F,
8809
8809
  S,
8810
8810
  (L, M) => {
8811
- const W = AI.intersects(M, D), $ = k && !W, BA = this.computePriority(
8811
+ const W = AI.intersects(M, D), $ = d && !W, BA = this.computePriority(
8812
8812
  R,
8813
- k,
8813
+ d,
8814
8814
  W,
8815
8815
  $,
8816
8816
  !0
@@ -8838,10 +8838,10 @@ class To {
8838
8838
  H.warn(
8839
8839
  "ChunkStoreView",
8840
8840
  "updateChunksForVolume called with no chunks initialized"
8841
- ), this.chunkViewStates_.forEach(dI);
8841
+ ), this.chunkViewStates_.forEach(UI);
8842
8842
  return;
8843
8843
  }
8844
- this.currentLOD_ = this.policy_.lod.min, this.chunkViewStates_.forEach(dI);
8844
+ this.currentLOD_ = this.policy_.lod.min, this.chunkViewStates_.forEach(UI);
8845
8845
  const Q = this.channelsOfInterest(A), E = this.fallbackLOD(), i = (o) => {
8846
8846
  const s = o.lod === E, t = o.lod === this.currentLOD_, e = this.computePriority(
8847
8847
  s,
@@ -8885,7 +8885,7 @@ class To {
8885
8885
  I && (I.visible || I.prefetch || I.priority !== null) || this.chunkViewStates_.delete(A);
8886
8886
  }
8887
8887
  dispose() {
8888
- this.isDisposed_ = !0, this.chunkViewStates_.forEach(dI);
8888
+ this.isDisposed_ = !0, this.chunkViewStates_.forEach(UI);
8889
8889
  }
8890
8890
  setImageSourcePolicy(A, I) {
8891
8891
  if (I !== lg)
@@ -8907,49 +8907,47 @@ class To {
8907
8907
  t !== this.currentLOD_ && (this.currentLOD_ = t);
8908
8908
  }
8909
8909
  markTimeChunksForPrefetchImage(A, I, g, B) {
8910
- const Q = this.store_.dimensions.t?.lods[0].size ?? 1, E = Math.min(
8911
- Q - 1,
8912
- A + this.policy_.prefetch.t
8913
- ), i = this.fallbackLOD(), o = this.policy_.priorityMap.prefetchTime, s = this.channelsOfInterest(I);
8914
- for (let t = A + 1; t <= E; ++t)
8910
+ const Q = this.store_.dimensions.t?.lods[0].size ?? 1, E = Math.min(this.policy_.prefetch.t, Q - 1), i = this.fallbackLOD(), o = this.policy_.priorityMap.prefetchTime, s = this.channelsOfInterest(I);
8911
+ for (let t = 1; t <= E; ++t) {
8912
+ const e = (A + t) % Q;
8915
8913
  this.iterateChunksInBox(
8916
- t,
8914
+ e,
8917
8915
  i,
8918
8916
  s,
8919
8917
  g,
8920
- (e) => {
8921
- const n = this.squareDistance2D(
8922
- e,
8918
+ (n) => {
8919
+ const D = this.squareDistance2D(
8920
+ n,
8923
8921
  B
8924
- ), D = TA(
8925
- n / this.sourceMaxSquareDistance2D_,
8922
+ ), F = TA(
8923
+ D / this.sourceMaxSquareDistance2D_,
8926
8924
  0,
8927
8925
  1 - Number.EPSILON
8928
- ), F = t - A + D;
8929
- this.chunkViewStates_.set(e, {
8926
+ ), k = t + F;
8927
+ this.chunkViewStates_.set(n, {
8930
8928
  visible: !1,
8931
8929
  prefetch: !0,
8932
8930
  priority: o,
8933
- orderKey: F
8931
+ orderKey: k
8934
8932
  });
8935
8933
  }
8936
8934
  );
8935
+ }
8937
8936
  }
8938
8937
  markTimeChunksForPrefetchVolume(A, I) {
8939
- const g = this.store_.dimensions.t?.lods[0].size ?? 1, B = Math.min(
8940
- g - 1,
8941
- A + this.policy_.prefetch.t
8942
- ), Q = this.fallbackLOD(), E = this.policy_.priorityMap.prefetchTime, i = this.channelsOfInterest(I);
8943
- for (let o = A + 1; o <= B; ++o)
8944
- this.iterateAllChunksAtLod(o, Q, i, (s) => {
8945
- const t = o - A;
8946
- this.chunkViewStates_.set(s, {
8938
+ const g = this.store_.dimensions.t?.lods[0].size ?? 1, B = Math.min(this.policy_.prefetch.t, g - 1), Q = this.fallbackLOD(), E = this.policy_.priorityMap.prefetchTime, i = this.channelsOfInterest(I);
8939
+ for (let o = 1; o <= B; ++o) {
8940
+ const s = (A + o) % g;
8941
+ this.iterateAllChunksAtLod(s, Q, i, (t) => {
8942
+ const e = o;
8943
+ this.chunkViewStates_.set(t, {
8947
8944
  visible: !1,
8948
8945
  prefetch: !0,
8949
8946
  priority: E,
8950
- orderKey: t
8947
+ orderKey: e
8951
8948
  });
8952
8949
  });
8950
+ }
8953
8951
  }
8954
8952
  computePriority(A, I, g, B, Q) {
8955
8953
  if (!Q) return null;
@@ -8962,8 +8960,8 @@ class To {
8962
8960
  // Half-open chunk-index range [min, max) at a given LOD that covers `bounds`.
8963
8961
  // Returns null if the bounds don't overlap the data grid.
8964
8962
  chunkIndexRange(A, I) {
8965
- const g = this.store_.dimensions, B = g.x.lods[I], Q = g.y.lods[I], E = g.z?.lods[I], i = Math.ceil(B.size / B.chunkSize), o = Math.ceil(Q.size / Q.chunkSize), s = E ? Math.ceil(E.size / E.chunkSize) : 1, t = B.chunkSize * B.scale, e = Q.chunkSize * Q.scale, n = E ? E.chunkSize * E.scale : 1, D = B.translation, F = Q.translation, U = E?.translation ?? 0, S = Math.max(0, Math.floor((A.min[0] - D) / t)), l = Math.min(i, Math.ceil((A.max[0] - D) / t)), f = Math.max(0, Math.floor((A.min[1] - F) / e)), k = Math.min(o, Math.ceil((A.max[1] - F) / e)), R = E ? Math.max(0, Math.floor((A.min[2] - U) / n)) : 0, L = E ? Math.min(s, Math.ceil((A.max[2] - U) / n)) : 1;
8966
- return S >= l || f >= k || R >= L ? null : { xMin: S, xMax: l, yMin: f, yMax: k, zMin: R, zMax: L };
8963
+ const g = this.store_.dimensions, B = g.x.lods[I], Q = g.y.lods[I], E = g.z?.lods[I], i = Math.ceil(B.size / B.chunkSize), o = Math.ceil(Q.size / Q.chunkSize), s = E ? Math.ceil(E.size / E.chunkSize) : 1, t = B.chunkSize * B.scale, e = Q.chunkSize * Q.scale, n = E ? E.chunkSize * E.scale : 1, D = B.translation, F = Q.translation, k = E?.translation ?? 0, S = Math.max(0, Math.floor((A.min[0] - D) / t)), l = Math.min(i, Math.ceil((A.max[0] - D) / t)), f = Math.max(0, Math.floor((A.min[1] - F) / e)), d = Math.min(o, Math.ceil((A.max[1] - F) / e)), R = E ? Math.max(0, Math.floor((A.min[2] - k) / n)) : 0, L = E ? Math.min(s, Math.ceil((A.max[2] - k) / n)) : 1;
8964
+ return S >= l || f >= d || R >= L ? null : { xMin: S, xMax: l, yMin: f, yMax: d, zMin: R, zMax: L };
8967
8965
  }
8968
8966
  iterateChunksInBox(A, I, g, B, Q) {
8969
8967
  const E = this.chunkIndexRange(B, I);
@@ -9065,7 +9063,7 @@ class To {
9065
9063
  return B * B + Q * Q;
9066
9064
  }
9067
9065
  }
9068
- function dI(C) {
9066
+ function UI(C) {
9069
9067
  C.visible = !1, C.prefetch = !1, C.priority = null, C.orderKey = null;
9070
9068
  }
9071
9069
  class Wo {
@@ -9080,17 +9078,17 @@ class Wo {
9080
9078
  const { size: I } = this.getAndValidateTimeDimension(), { size: g } = this.getAndValidateChannelDimension(), B = this.dimensions_.numLods;
9081
9079
  this.chunks_ = new Array(B);
9082
9080
  for (let Q = 0; Q < B; ++Q) {
9083
- const E = this.dimensions_.x.lods[Q], i = this.dimensions_.y.lods[Q], o = this.dimensions_.z?.lods[Q], s = E.chunkSize, t = i.chunkSize, e = o?.chunkSize ?? 1, n = Math.ceil(E.size / s), D = Math.ceil(i.size / t), F = o ? Math.ceil(o.size / e) : 1, U = new Array(I);
9084
- this.chunks_[Q] = U;
9081
+ const E = this.dimensions_.x.lods[Q], i = this.dimensions_.y.lods[Q], o = this.dimensions_.z?.lods[Q], s = E.chunkSize, t = i.chunkSize, e = o?.chunkSize ?? 1, n = Math.ceil(E.size / s), D = Math.ceil(i.size / t), F = o ? Math.ceil(o.size / e) : 1, k = new Array(I);
9082
+ this.chunks_[Q] = k;
9085
9083
  for (let S = 0; S < I; ++S) {
9086
9084
  const l = new Array(g);
9087
- U[S] = l;
9085
+ k[S] = l;
9088
9086
  for (let f = 0; f < g; ++f) {
9089
- const k = new Array(F);
9090
- l[f] = k;
9087
+ const d = new Array(F);
9088
+ l[f] = d;
9091
9089
  for (let R = 0; R < F; ++R) {
9092
9090
  const L = o !== void 0 ? o.translation + R * e * o.scale : 0, M = new Array(D);
9093
- k[R] = M;
9091
+ d[R] = M;
9094
9092
  for (let W = 0; W < D; ++W) {
9095
9093
  const $ = i.translation + W * t * i.scale, BA = new Array(n);
9096
9094
  M[W] = BA;
@@ -9274,7 +9272,7 @@ class Po {
9274
9272
  A.releasedAt ??= performance.now();
9275
9273
  return;
9276
9274
  }
9277
- dC(A), A.state === "loaded" && (A.state = "unloaded");
9275
+ UC(A), A.state === "loaded" && (A.state = "unloaded");
9278
9276
  }
9279
9277
  enqueueWithinBudget(A) {
9280
9278
  if (A.length === 0) return;
@@ -9323,7 +9321,7 @@ class Po {
9323
9321
  const g = Math.min(I.length, this.maxGpuUploadsPerUpdate_);
9324
9322
  for (let B = 0; B < g; B++) {
9325
9323
  const Q = I[B], E = vI.createWithChunk(Q);
9326
- this.uploadTexture_(E), Q.texture = E, this.resident_.add(Q), dC(Q);
9324
+ this.uploadTexture_(E), Q.texture = E, this.resident_.add(Q), UC(Q);
9327
9325
  }
9328
9326
  }
9329
9327
  disposeChunkTexture(A) {
@@ -9372,13 +9370,13 @@ var KI = function(C = 1) {
9372
9370
  };
9373
9371
  };
9374
9372
  KI.Panel = function(C, A, I, g) {
9375
- var B = 1 / 0, Q = 0, E = Math.round, i = E(window.devicePixelRatio || 1), o = E(80 * i * g), s = E(48 * i * g), t = E(3 * i * g), e = E(2 * i * g), n = E(3 * i * g), D = E(15 * i * g), F = E(74 * i * g), U = E(30 * i * g), S = document.createElement("canvas");
9373
+ var B = 1 / 0, Q = 0, E = Math.round, i = E(window.devicePixelRatio || 1), o = E(80 * i * g), s = E(48 * i * g), t = E(3 * i * g), e = E(2 * i * g), n = E(3 * i * g), D = E(15 * i * g), F = E(74 * i * g), k = E(30 * i * g), S = document.createElement("canvas");
9376
9374
  S.width = o, S.height = s, S.style.cssText = `width:${E(g * 80)}px;height:${E(g * 48)}px`;
9377
9375
  var l = S.getContext("2d");
9378
- return l.font = "bold " + E(9 * i * g) + "px Helvetica,Arial,sans-serif", l.textBaseline = "top", l.fillStyle = I, l.fillRect(0, 0, o, s), l.fillStyle = A, l.fillText(C, t, e), l.fillRect(n, D, F, U), l.fillStyle = I, l.globalAlpha = 0.9, l.fillRect(n, D, F, U), {
9376
+ return l.font = "bold " + E(9 * i * g) + "px Helvetica,Arial,sans-serif", l.textBaseline = "top", l.fillStyle = I, l.fillRect(0, 0, o, s), l.fillStyle = A, l.fillText(C, t, e), l.fillRect(n, D, F, k), l.fillStyle = I, l.globalAlpha = 0.9, l.fillRect(n, D, F, k), {
9379
9377
  dom: S,
9380
- update: function(f, k) {
9381
- B = Math.min(B, f), Q = Math.max(Q, f), l.fillStyle = I, l.globalAlpha = 1, l.fillRect(0, 0, o, D), l.fillStyle = A, l.fillText(E(f) + " " + C + " (" + E(B) + "-" + E(Q) + ")", t, e), l.drawImage(S, n + i, D, F - i, U, n, D, F - i, U), l.fillRect(n + F - i, D, i, U), l.fillStyle = I, l.globalAlpha = 0.9, l.fillRect(n + F - i, D, i, E((1 - f / k) * U));
9378
+ update: function(f, d) {
9379
+ B = Math.min(B, f), Q = Math.max(Q, f), l.fillStyle = I, l.globalAlpha = 1, l.fillRect(0, 0, o, D), l.fillStyle = A, l.fillText(E(f) + " " + C + " (" + E(B) + "-" + E(Q) + ")", t, e), l.drawImage(S, n + i, D, F - i, k, n, D, F - i, k), l.fillRect(n + F - i, D, i, k), l.fillStyle = I, l.globalAlpha = 0.9, l.fillRect(n + F - i, D, i, E((1 - f / d) * k));
9382
9380
  }
9383
9381
  };
9384
9382
  };
@@ -10686,8 +10684,8 @@ class hg {
10686
10684
  let t;
10687
10685
  o.length && (t = (n, D) => {
10688
10686
  let F = D;
10689
- for (let U of o)
10690
- F = U(n, F);
10687
+ for (let k of o)
10688
+ F = k(n, F);
10691
10689
  return F;
10692
10690
  });
10693
10691
  let e = JSON.stringify(s, t, I);
@@ -10882,11 +10880,11 @@ class VB {
10882
10880
  return new Uint8Array(I);
10883
10881
  }
10884
10882
  }
10885
- function Us() {
10883
+ function ds() {
10886
10884
  let C = () => import("./blosc-D1xNXZJs.js").then((Q) => Q.default), A = () => import("./lz4-1Ws5oVWR.js").then((Q) => Q.default), I = () => import("./zstd-C4EcZnjq.js").then((Q) => Q.default), g = () => vB, B = () => VB;
10887
10885
  return (/* @__PURE__ */ new Map()).set("blosc", C).set("lz4", A).set("zstd", I).set("gzip", g).set("zlib", B).set("transpose", () => OB).set("bytes", () => Lg).set("crc32c", () => TB).set("vlen-utf8", () => yg).set("json2", () => hg).set("bitround", () => ng).set("cast_value", () => bB).set("scale_offset", () => ZB).set("numcodecs.blosc", C).set("numcodecs.lz4", A).set("numcodecs.zstd", I).set("numcodecs.gzip", g).set("numcodecs.zlib", B).set("numcodecs.vlen-utf8", () => yg).set("numcodecs.shuffle", () => PB).set("numcodecs.delta", () => WB).set("numcodecs.bitround", () => ng).set("numcodecs.json2", () => hg);
10888
10886
  }
10889
- const ds = Us();
10887
+ const Us = ds();
10890
10888
  function tB(C) {
10891
10889
  let A;
10892
10890
  function I() {
@@ -10937,7 +10935,7 @@ function vC(C, A, I) {
10937
10935
  }
10938
10936
  async function ls(C) {
10939
10937
  let A = C.codecs.map(async (E) => {
10940
- let i = await ds.get(E.name)?.();
10938
+ let i = await Us.get(E.name)?.();
10941
10939
  if (!i)
10942
10940
  throw new gs(E.name);
10943
10941
  return { Codec: i, meta: E };
@@ -11002,15 +11000,15 @@ function Js(C, A, I, g) {
11002
11000
  let D = await o[n];
11003
11001
  if (D === null)
11004
11002
  return;
11005
- let { data: F, shape: U, stride: S } = D, l = s.map((R, L) => R % U[L]).reduce((R, L, M) => R + L * S[M], 0), f = F[l], k = F[l + 1];
11006
- if (!(f === ZC && k === ZC))
11003
+ let { data: F, shape: k, stride: S } = D, l = s.map((R, L) => R % k[L]).reduce((R, L, M) => R + L * S[M], 0), f = F[l], d = F[l + 1];
11004
+ if (!(f === ZC && d === ZC))
11007
11005
  return B(n, {
11008
11006
  offset: Number(f),
11009
- length: Number(k)
11007
+ length: Number(d)
11010
11008
  }, t);
11011
11009
  };
11012
11010
  }
11013
- class UA {
11011
+ class dA {
11014
11012
  store;
11015
11013
  path;
11016
11014
  constructor(A, I = "/") {
@@ -11018,10 +11016,10 @@ class UA {
11018
11016
  }
11019
11017
  resolve(A) {
11020
11018
  let I = new URL(`file://${this.path.endsWith("/") ? this.path : `${this.path}/`}`);
11021
- return new UA(this.store, decodeURIComponent(new URL(A, I).pathname));
11019
+ return new dA(this.store, decodeURIComponent(new URL(A, I).pathname));
11022
11020
  }
11023
11021
  }
11024
- class _B extends UA {
11022
+ class _B extends dA {
11025
11023
  kind = "group";
11026
11024
  #A;
11027
11025
  constructor(A, I, g) {
@@ -11079,7 +11077,7 @@ function Ys(C, A) {
11079
11077
  }
11080
11078
  };
11081
11079
  }
11082
- let cg = class extends UA {
11080
+ let cg = class extends dA {
11083
11081
  kind = "array";
11084
11082
  #A;
11085
11083
  [$I];
@@ -11188,7 +11186,7 @@ async function Ks(C, A) {
11188
11186
  return I ? VI(I) : {};
11189
11187
  }
11190
11188
  async function Hs(C, A = {}) {
11191
- let I = "store" in C ? C : new UA(C), { signal: g } = A, B = {};
11189
+ let I = "store" in C ? C : new dA(C), { signal: g } = A, B = {};
11192
11190
  return (A.attrs ?? !0) && (B = await Ks(I, g)), g?.throwIfAborted(), A.kind === "array" ? OC(I, B, g) : A.kind === "group" ? VC(I, B, g) : OC(I, B, g).catch((Q) => (CE(Q, NI, nA), VC(I, B, g)));
11193
11191
  }
11194
11192
  async function OC(C, A, I) {
@@ -11211,7 +11209,7 @@ async function qs(C, A) {
11211
11209
  return Q.node_type === "array" && (Q.fill_value = BE(Q)), Q.node_type === "array" ? iE(new cg(I, C.path, Q)) : new _B(I, C.path, Q);
11212
11210
  }
11213
11211
  async function ps(C, A = {}) {
11214
- let I = "store" in C ? C : new UA(C), g = await qs(I, A.signal);
11212
+ let I = "store" in C ? C : new dA(C), g = await qs(I, A.signal);
11215
11213
  if (Jg.increment(I.store, "v3"), A.kind === void 0 || A.kind === "array" && g instanceof cg || A.kind === "group" && g instanceof _B)
11216
11214
  return g;
11217
11215
  let B = g instanceof cg ? "array" : "group";
@@ -11296,11 +11294,11 @@ async function bs(C) {
11296
11294
  switch (C.type) {
11297
11295
  case "fetch": {
11298
11296
  const g = new ZI(C.url);
11299
- A = new UA(g);
11297
+ A = new dA(g);
11300
11298
  break;
11301
11299
  }
11302
11300
  case "filesystem": {
11303
- A = new UA(
11301
+ A = new dA(
11304
11302
  new XB(C.directoryHandle),
11305
11303
  C.path
11306
11304
  );
@@ -11356,17 +11354,17 @@ function vs(C, A, I, g) {
11356
11354
  throw new Error(
11357
11355
  `Received chunk too small: expected ${JSON.stringify(B)}, got ${JSON.stringify(o)}`
11358
11356
  );
11359
- const s = g.cChunkSize ? Q.c % g.cChunkSize : 0, t = g.tChunkSize ? Q.t % g.tChunkSize : 0, e = B.x * B.y * B.z, n = E.c !== void 0 ? I[E.c] : 0, D = E.t !== void 0 ? I[E.t] : 0, F = t * D + s * n, U = o.x === B.x && o.y === B.y && o.z === B.z;
11360
- if (F === 0 && C.length === e && U)
11357
+ const s = g.cChunkSize ? Q.c % g.cChunkSize : 0, t = g.tChunkSize ? Q.t % g.tChunkSize : 0, e = B.x * B.y * B.z, n = E.c !== void 0 ? I[E.c] : 0, D = E.t !== void 0 ? I[E.t] : 0, F = t * D + s * n, k = o.x === B.x && o.y === B.y && o.z === B.z;
11358
+ if (F === 0 && C.length === e && k)
11361
11359
  return C;
11362
11360
  const l = new C.constructor(
11363
11361
  e
11364
- ), f = E.z !== void 0 ? I[E.z] : 0, k = I[E.y];
11362
+ ), f = E.z !== void 0 ? I[E.z] : 0, d = I[E.y];
11365
11363
  let R = 0;
11366
11364
  for (let L = 0; L < B.z; L++) {
11367
11365
  const M = F + L * f;
11368
11366
  for (let W = 0; W < B.y; W++) {
11369
- const $ = M + W * k, BA = $ + B.x;
11367
+ const $ = M + W * d, BA = $ + B.x;
11370
11368
  l.set(C.subarray($, BA), R), R += B.x;
11371
11369
  }
11372
11370
  }
@@ -15276,7 +15274,7 @@ function gt(C, A) {
15276
15274
  const I = C.axes.map((e) => e.name), g = C.axes.length, B = zC(I, "x"), Q = zC(I, "y"), E = (e, n) => {
15277
15275
  const D = [];
15278
15276
  for (let F = 0; F < C.datasets.length; F++) {
15279
- const U = C.datasets[F], S = A[F], l = U.coordinateTransformations[0].scale, f = U.coordinateTransformations.length === 2 ? U.coordinateTransformations[1].translation : new Array(g).fill(0);
15277
+ const k = C.datasets[F], S = A[F], l = k.coordinateTransformations[0].scale, f = k.coordinateTransformations.length === 2 ? k.coordinateTransformations[1].translation : new Array(g).fill(0);
15280
15278
  D.push({
15281
15279
  size: S.shape[n],
15282
15280
  chunkSize: S.chunks[n],
@@ -15412,7 +15410,7 @@ const u = O.arrayToEnum([
15412
15410
  default:
15413
15411
  return u.unknown;
15414
15412
  }
15415
- }, d = O.arrayToEnum([
15413
+ }, U = O.arrayToEnum([
15416
15414
  "invalid_type",
15417
15415
  "invalid_literal",
15418
15416
  "custom",
@@ -15497,52 +15495,52 @@ WA.create = (C) => new WA(C);
15497
15495
  const eB = (C, A) => {
15498
15496
  let I;
15499
15497
  switch (C.code) {
15500
- case d.invalid_type:
15498
+ case U.invalid_type:
15501
15499
  C.received === u.undefined ? I = "Required" : I = `Expected ${C.expected}, received ${C.received}`;
15502
15500
  break;
15503
- case d.invalid_literal:
15501
+ case U.invalid_literal:
15504
15502
  I = `Invalid literal value, expected ${JSON.stringify(C.expected, O.jsonStringifyReplacer)}`;
15505
15503
  break;
15506
- case d.unrecognized_keys:
15504
+ case U.unrecognized_keys:
15507
15505
  I = `Unrecognized key(s) in object: ${O.joinValues(C.keys, ", ")}`;
15508
15506
  break;
15509
- case d.invalid_union:
15507
+ case U.invalid_union:
15510
15508
  I = "Invalid input";
15511
15509
  break;
15512
- case d.invalid_union_discriminator:
15510
+ case U.invalid_union_discriminator:
15513
15511
  I = `Invalid discriminator value. Expected ${O.joinValues(C.options)}`;
15514
15512
  break;
15515
- case d.invalid_enum_value:
15513
+ case U.invalid_enum_value:
15516
15514
  I = `Invalid enum value. Expected ${O.joinValues(C.options)}, received '${C.received}'`;
15517
15515
  break;
15518
- case d.invalid_arguments:
15516
+ case U.invalid_arguments:
15519
15517
  I = "Invalid function arguments";
15520
15518
  break;
15521
- case d.invalid_return_type:
15519
+ case U.invalid_return_type:
15522
15520
  I = "Invalid function return type";
15523
15521
  break;
15524
- case d.invalid_date:
15522
+ case U.invalid_date:
15525
15523
  I = "Invalid date";
15526
15524
  break;
15527
- case d.invalid_string:
15525
+ case U.invalid_string:
15528
15526
  typeof C.validation == "object" ? "includes" in C.validation ? (I = `Invalid input: must include "${C.validation.includes}"`, typeof C.validation.position == "number" && (I = `${I} at one or more positions greater than or equal to ${C.validation.position}`)) : "startsWith" in C.validation ? I = `Invalid input: must start with "${C.validation.startsWith}"` : "endsWith" in C.validation ? I = `Invalid input: must end with "${C.validation.endsWith}"` : O.assertNever(C.validation) : C.validation !== "regex" ? I = `Invalid ${C.validation}` : I = "Invalid";
15529
15527
  break;
15530
- case d.too_small:
15528
+ case U.too_small:
15531
15529
  C.type === "array" ? I = `Array must contain ${C.exact ? "exactly" : C.inclusive ? "at least" : "more than"} ${C.minimum} element(s)` : C.type === "string" ? I = `String must contain ${C.exact ? "exactly" : C.inclusive ? "at least" : "over"} ${C.minimum} character(s)` : C.type === "number" ? I = `Number must be ${C.exact ? "exactly equal to " : C.inclusive ? "greater than or equal to " : "greater than "}${C.minimum}` : C.type === "bigint" ? I = `Number must be ${C.exact ? "exactly equal to " : C.inclusive ? "greater than or equal to " : "greater than "}${C.minimum}` : C.type === "date" ? I = `Date must be ${C.exact ? "exactly equal to " : C.inclusive ? "greater than or equal to " : "greater than "}${new Date(Number(C.minimum))}` : I = "Invalid input";
15532
15530
  break;
15533
- case d.too_big:
15531
+ case U.too_big:
15534
15532
  C.type === "array" ? I = `Array must contain ${C.exact ? "exactly" : C.inclusive ? "at most" : "less than"} ${C.maximum} element(s)` : C.type === "string" ? I = `String must contain ${C.exact ? "exactly" : C.inclusive ? "at most" : "under"} ${C.maximum} character(s)` : C.type === "number" ? I = `Number must be ${C.exact ? "exactly" : C.inclusive ? "less than or equal to" : "less than"} ${C.maximum}` : C.type === "bigint" ? I = `BigInt must be ${C.exact ? "exactly" : C.inclusive ? "less than or equal to" : "less than"} ${C.maximum}` : C.type === "date" ? I = `Date must be ${C.exact ? "exactly" : C.inclusive ? "smaller than or equal to" : "smaller than"} ${new Date(Number(C.maximum))}` : I = "Invalid input";
15535
15533
  break;
15536
- case d.custom:
15534
+ case U.custom:
15537
15535
  I = "Invalid input";
15538
15536
  break;
15539
- case d.invalid_intersection_types:
15537
+ case U.invalid_intersection_types:
15540
15538
  I = "Intersection results could not be merged";
15541
15539
  break;
15542
- case d.not_multiple_of:
15540
+ case U.not_multiple_of:
15543
15541
  I = `Number must be a multiple of ${C.multipleOf}`;
15544
15542
  break;
15545
- case d.not_finite:
15543
+ case U.not_finite:
15546
15544
  I = "Number must be finite";
15547
15545
  break;
15548
15546
  default:
@@ -15793,7 +15791,7 @@ class Z {
15793
15791
  const g = (B) => typeof I == "string" || typeof I > "u" ? { message: I } : typeof I == "function" ? I(B) : I;
15794
15792
  return this._refinement((B, Q) => {
15795
15793
  const E = A(B), i = () => Q.addIssue({
15796
- code: d.custom,
15794
+ code: U.custom,
15797
15795
  ...g(B)
15798
15796
  });
15799
15797
  return typeof Promise < "u" && E instanceof Promise ? E.then((o) => o ? !0 : (i(), !1)) : E ? !0 : (i(), !1);
@@ -15910,10 +15908,10 @@ function kt(C) {
15910
15908
  const I = [];
15911
15909
  return I.push(C.local ? "Z?" : "Z"), C.offset && I.push("([+-]\\d{2}:?\\d{2})"), A = `${A}(${I.join("|")})`, new RegExp(`^${A}$`);
15912
15910
  }
15913
- function Ut(C, A) {
15911
+ function dt(C, A) {
15914
15912
  return !!((A === "v4" || !A) && yt.test(C) || (A === "v6" || !A) && wt.test(C));
15915
15913
  }
15916
- function dt(C, A) {
15914
+ function Ut(C, A) {
15917
15915
  if (!nt.test(C))
15918
15916
  return !1;
15919
15917
  try {
@@ -15934,7 +15932,7 @@ class PA extends Z {
15934
15932
  if (this._def.coerce && (A.data = String(A.data)), this._getType(A) !== u.string) {
15935
15933
  const Q = this._getOrReturnCtx(A);
15936
15934
  return Y(Q, {
15937
- code: d.invalid_type,
15935
+ code: U.invalid_type,
15938
15936
  expected: u.string,
15939
15937
  received: Q.parsedType
15940
15938
  }), m;
@@ -15944,7 +15942,7 @@ class PA extends Z {
15944
15942
  for (const Q of this._def.checks)
15945
15943
  if (Q.kind === "min")
15946
15944
  A.data.length < Q.value && (B = this._getOrReturnCtx(A, B), Y(B, {
15947
- code: d.too_small,
15945
+ code: U.too_small,
15948
15946
  minimum: Q.value,
15949
15947
  type: "string",
15950
15948
  inclusive: !0,
@@ -15953,7 +15951,7 @@ class PA extends Z {
15953
15951
  }), g.dirty());
15954
15952
  else if (Q.kind === "max")
15955
15953
  A.data.length > Q.value && (B = this._getOrReturnCtx(A, B), Y(B, {
15956
- code: d.too_big,
15954
+ code: U.too_big,
15957
15955
  maximum: Q.value,
15958
15956
  type: "string",
15959
15957
  inclusive: !0,
@@ -15963,14 +15961,14 @@ class PA extends Z {
15963
15961
  else if (Q.kind === "length") {
15964
15962
  const E = A.data.length > Q.value, i = A.data.length < Q.value;
15965
15963
  (E || i) && (B = this._getOrReturnCtx(A, B), E ? Y(B, {
15966
- code: d.too_big,
15964
+ code: U.too_big,
15967
15965
  maximum: Q.value,
15968
15966
  type: "string",
15969
15967
  inclusive: !0,
15970
15968
  exact: !0,
15971
15969
  message: Q.message
15972
15970
  }) : i && Y(B, {
15973
- code: d.too_small,
15971
+ code: U.too_small,
15974
15972
  minimum: Q.value,
15975
15973
  type: "string",
15976
15974
  inclusive: !0,
@@ -15980,43 +15978,43 @@ class PA extends Z {
15980
15978
  } else if (Q.kind === "email")
15981
15979
  Dt.test(A.data) || (B = this._getOrReturnCtx(A, B), Y(B, {
15982
15980
  validation: "email",
15983
- code: d.invalid_string,
15981
+ code: U.invalid_string,
15984
15982
  message: Q.message
15985
15983
  }), g.dirty());
15986
15984
  else if (Q.kind === "emoji")
15987
15985
  Vg || (Vg = new RegExp(ht, "u")), Vg.test(A.data) || (B = this._getOrReturnCtx(A, B), Y(B, {
15988
15986
  validation: "emoji",
15989
- code: d.invalid_string,
15987
+ code: U.invalid_string,
15990
15988
  message: Q.message
15991
15989
  }), g.dirty());
15992
15990
  else if (Q.kind === "uuid")
15993
15991
  et.test(A.data) || (B = this._getOrReturnCtx(A, B), Y(B, {
15994
15992
  validation: "uuid",
15995
- code: d.invalid_string,
15993
+ code: U.invalid_string,
15996
15994
  message: Q.message
15997
15995
  }), g.dirty());
15998
15996
  else if (Q.kind === "nanoid")
15999
15997
  at.test(A.data) || (B = this._getOrReturnCtx(A, B), Y(B, {
16000
15998
  validation: "nanoid",
16001
- code: d.invalid_string,
15999
+ code: U.invalid_string,
16002
16000
  message: Q.message
16003
16001
  }), g.dirty());
16004
16002
  else if (Q.kind === "cuid")
16005
16003
  ot.test(A.data) || (B = this._getOrReturnCtx(A, B), Y(B, {
16006
16004
  validation: "cuid",
16007
- code: d.invalid_string,
16005
+ code: U.invalid_string,
16008
16006
  message: Q.message
16009
16007
  }), g.dirty());
16010
16008
  else if (Q.kind === "cuid2")
16011
16009
  st.test(A.data) || (B = this._getOrReturnCtx(A, B), Y(B, {
16012
16010
  validation: "cuid2",
16013
- code: d.invalid_string,
16011
+ code: U.invalid_string,
16014
16012
  message: Q.message
16015
16013
  }), g.dirty());
16016
16014
  else if (Q.kind === "ulid")
16017
16015
  tt.test(A.data) || (B = this._getOrReturnCtx(A, B), Y(B, {
16018
16016
  validation: "ulid",
16019
- code: d.invalid_string,
16017
+ code: U.invalid_string,
16020
16018
  message: Q.message
16021
16019
  }), g.dirty());
16022
16020
  else if (Q.kind === "url")
@@ -16025,61 +16023,61 @@ class PA extends Z {
16025
16023
  } catch {
16026
16024
  B = this._getOrReturnCtx(A, B), Y(B, {
16027
16025
  validation: "url",
16028
- code: d.invalid_string,
16026
+ code: U.invalid_string,
16029
16027
  message: Q.message
16030
16028
  }), g.dirty();
16031
16029
  }
16032
16030
  else Q.kind === "regex" ? (Q.regex.lastIndex = 0, Q.regex.test(A.data) || (B = this._getOrReturnCtx(A, B), Y(B, {
16033
16031
  validation: "regex",
16034
- code: d.invalid_string,
16032
+ code: U.invalid_string,
16035
16033
  message: Q.message
16036
16034
  }), g.dirty())) : Q.kind === "trim" ? A.data = A.data.trim() : Q.kind === "includes" ? A.data.includes(Q.value, Q.position) || (B = this._getOrReturnCtx(A, B), Y(B, {
16037
- code: d.invalid_string,
16035
+ code: U.invalid_string,
16038
16036
  validation: { includes: Q.value, position: Q.position },
16039
16037
  message: Q.message
16040
16038
  }), g.dirty()) : Q.kind === "toLowerCase" ? A.data = A.data.toLowerCase() : Q.kind === "toUpperCase" ? A.data = A.data.toUpperCase() : Q.kind === "startsWith" ? A.data.startsWith(Q.value) || (B = this._getOrReturnCtx(A, B), Y(B, {
16041
- code: d.invalid_string,
16039
+ code: U.invalid_string,
16042
16040
  validation: { startsWith: Q.value },
16043
16041
  message: Q.message
16044
16042
  }), g.dirty()) : Q.kind === "endsWith" ? A.data.endsWith(Q.value) || (B = this._getOrReturnCtx(A, B), Y(B, {
16045
- code: d.invalid_string,
16043
+ code: U.invalid_string,
16046
16044
  validation: { endsWith: Q.value },
16047
16045
  message: Q.message
16048
16046
  }), g.dirty()) : Q.kind === "datetime" ? kt(Q).test(A.data) || (B = this._getOrReturnCtx(A, B), Y(B, {
16049
- code: d.invalid_string,
16047
+ code: U.invalid_string,
16050
16048
  validation: "datetime",
16051
16049
  message: Q.message
16052
16050
  }), g.dirty()) : Q.kind === "date" ? Nt.test(A.data) || (B = this._getOrReturnCtx(A, B), Y(B, {
16053
- code: d.invalid_string,
16051
+ code: U.invalid_string,
16054
16052
  validation: "date",
16055
16053
  message: Q.message
16056
16054
  }), g.dirty()) : Q.kind === "time" ? Rt(Q).test(A.data) || (B = this._getOrReturnCtx(A, B), Y(B, {
16057
- code: d.invalid_string,
16055
+ code: U.invalid_string,
16058
16056
  validation: "time",
16059
16057
  message: Q.message
16060
16058
  }), g.dirty()) : Q.kind === "duration" ? rt.test(A.data) || (B = this._getOrReturnCtx(A, B), Y(B, {
16061
16059
  validation: "duration",
16062
- code: d.invalid_string,
16060
+ code: U.invalid_string,
16063
16061
  message: Q.message
16064
- }), g.dirty()) : Q.kind === "ip" ? Ut(A.data, Q.version) || (B = this._getOrReturnCtx(A, B), Y(B, {
16062
+ }), g.dirty()) : Q.kind === "ip" ? dt(A.data, Q.version) || (B = this._getOrReturnCtx(A, B), Y(B, {
16065
16063
  validation: "ip",
16066
- code: d.invalid_string,
16064
+ code: U.invalid_string,
16067
16065
  message: Q.message
16068
- }), g.dirty()) : Q.kind === "jwt" ? dt(A.data, Q.alg) || (B = this._getOrReturnCtx(A, B), Y(B, {
16066
+ }), g.dirty()) : Q.kind === "jwt" ? Ut(A.data, Q.alg) || (B = this._getOrReturnCtx(A, B), Y(B, {
16069
16067
  validation: "jwt",
16070
- code: d.invalid_string,
16068
+ code: U.invalid_string,
16071
16069
  message: Q.message
16072
16070
  }), g.dirty()) : Q.kind === "cidr" ? lt(A.data, Q.version) || (B = this._getOrReturnCtx(A, B), Y(B, {
16073
16071
  validation: "cidr",
16074
- code: d.invalid_string,
16072
+ code: U.invalid_string,
16075
16073
  message: Q.message
16076
16074
  }), g.dirty()) : Q.kind === "base64" ? Ft.test(A.data) || (B = this._getOrReturnCtx(A, B), Y(B, {
16077
16075
  validation: "base64",
16078
- code: d.invalid_string,
16076
+ code: U.invalid_string,
16079
16077
  message: Q.message
16080
16078
  }), g.dirty()) : Q.kind === "base64url" ? St.test(A.data) || (B = this._getOrReturnCtx(A, B), Y(B, {
16081
16079
  validation: "base64url",
16082
- code: d.invalid_string,
16080
+ code: U.invalid_string,
16083
16081
  message: Q.message
16084
16082
  }), g.dirty()) : O.assertNever(Q);
16085
16083
  return { status: g.value, value: A.data };
@@ -16087,7 +16085,7 @@ class PA extends Z {
16087
16085
  _regex(A, I, g) {
16088
16086
  return this.refinement((B) => A.test(B), {
16089
16087
  validation: I,
16090
- code: d.invalid_string,
16088
+ code: U.invalid_string,
16091
16089
  ...K.errToObj(g)
16092
16090
  });
16093
16091
  }
@@ -16324,7 +16322,7 @@ class hI extends Z {
16324
16322
  if (this._def.coerce && (A.data = Number(A.data)), this._getType(A) !== u.number) {
16325
16323
  const Q = this._getOrReturnCtx(A);
16326
16324
  return Y(Q, {
16327
- code: d.invalid_type,
16325
+ code: U.invalid_type,
16328
16326
  expected: u.number,
16329
16327
  received: Q.parsedType
16330
16328
  }), m;
@@ -16333,30 +16331,30 @@ class hI extends Z {
16333
16331
  const B = new NA();
16334
16332
  for (const Q of this._def.checks)
16335
16333
  Q.kind === "int" ? O.isInteger(A.data) || (g = this._getOrReturnCtx(A, g), Y(g, {
16336
- code: d.invalid_type,
16334
+ code: U.invalid_type,
16337
16335
  expected: "integer",
16338
16336
  received: "float",
16339
16337
  message: Q.message
16340
16338
  }), B.dirty()) : Q.kind === "min" ? (Q.inclusive ? A.data < Q.value : A.data <= Q.value) && (g = this._getOrReturnCtx(A, g), Y(g, {
16341
- code: d.too_small,
16339
+ code: U.too_small,
16342
16340
  minimum: Q.value,
16343
16341
  type: "number",
16344
16342
  inclusive: Q.inclusive,
16345
16343
  exact: !1,
16346
16344
  message: Q.message
16347
16345
  }), B.dirty()) : Q.kind === "max" ? (Q.inclusive ? A.data > Q.value : A.data >= Q.value) && (g = this._getOrReturnCtx(A, g), Y(g, {
16348
- code: d.too_big,
16346
+ code: U.too_big,
16349
16347
  maximum: Q.value,
16350
16348
  type: "number",
16351
16349
  inclusive: Q.inclusive,
16352
16350
  exact: !1,
16353
16351
  message: Q.message
16354
16352
  }), B.dirty()) : Q.kind === "multipleOf" ? Lt(A.data, Q.value) !== 0 && (g = this._getOrReturnCtx(A, g), Y(g, {
16355
- code: d.not_multiple_of,
16353
+ code: U.not_multiple_of,
16356
16354
  multipleOf: Q.value,
16357
16355
  message: Q.message
16358
16356
  }), B.dirty()) : Q.kind === "finite" ? Number.isFinite(A.data) || (g = this._getOrReturnCtx(A, g), Y(g, {
16359
- code: d.not_finite,
16357
+ code: U.not_finite,
16360
16358
  message: Q.message
16361
16359
  }), B.dirty()) : O.assertNever(Q);
16362
16360
  return { status: B.value, value: A.data };
@@ -16505,19 +16503,19 @@ class bI extends Z {
16505
16503
  const B = new NA();
16506
16504
  for (const Q of this._def.checks)
16507
16505
  Q.kind === "min" ? (Q.inclusive ? A.data < Q.value : A.data <= Q.value) && (g = this._getOrReturnCtx(A, g), Y(g, {
16508
- code: d.too_small,
16506
+ code: U.too_small,
16509
16507
  type: "bigint",
16510
16508
  minimum: Q.value,
16511
16509
  inclusive: Q.inclusive,
16512
16510
  message: Q.message
16513
16511
  }), B.dirty()) : Q.kind === "max" ? (Q.inclusive ? A.data > Q.value : A.data >= Q.value) && (g = this._getOrReturnCtx(A, g), Y(g, {
16514
- code: d.too_big,
16512
+ code: U.too_big,
16515
16513
  type: "bigint",
16516
16514
  maximum: Q.value,
16517
16515
  inclusive: Q.inclusive,
16518
16516
  message: Q.message
16519
16517
  }), B.dirty()) : Q.kind === "multipleOf" ? A.data % Q.value !== BigInt(0) && (g = this._getOrReturnCtx(A, g), Y(g, {
16520
- code: d.not_multiple_of,
16518
+ code: U.not_multiple_of,
16521
16519
  multipleOf: Q.value,
16522
16520
  message: Q.message
16523
16521
  }), B.dirty()) : O.assertNever(Q);
@@ -16526,7 +16524,7 @@ class bI extends Z {
16526
16524
  _getInvalidInput(A) {
16527
16525
  const I = this._getOrReturnCtx(A);
16528
16526
  return Y(I, {
16529
- code: d.invalid_type,
16527
+ code: U.invalid_type,
16530
16528
  expected: u.bigint,
16531
16529
  received: I.parsedType
16532
16530
  }), m;
@@ -16626,7 +16624,7 @@ class aB extends Z {
16626
16624
  if (this._def.coerce && (A.data = !!A.data), this._getType(A) !== u.boolean) {
16627
16625
  const g = this._getOrReturnCtx(A);
16628
16626
  return Y(g, {
16629
- code: d.invalid_type,
16627
+ code: U.invalid_type,
16630
16628
  expected: u.boolean,
16631
16629
  received: g.parsedType
16632
16630
  }), m;
@@ -16644,7 +16642,7 @@ class Fg extends Z {
16644
16642
  if (this._def.coerce && (A.data = new Date(A.data)), this._getType(A) !== u.date) {
16645
16643
  const Q = this._getOrReturnCtx(A);
16646
16644
  return Y(Q, {
16647
- code: d.invalid_type,
16645
+ code: U.invalid_type,
16648
16646
  expected: u.date,
16649
16647
  received: Q.parsedType
16650
16648
  }), m;
@@ -16652,21 +16650,21 @@ class Fg extends Z {
16652
16650
  if (Number.isNaN(A.data.getTime())) {
16653
16651
  const Q = this._getOrReturnCtx(A);
16654
16652
  return Y(Q, {
16655
- code: d.invalid_date
16653
+ code: U.invalid_date
16656
16654
  }), m;
16657
16655
  }
16658
16656
  const g = new NA();
16659
16657
  let B;
16660
16658
  for (const Q of this._def.checks)
16661
16659
  Q.kind === "min" ? A.data.getTime() < Q.value && (B = this._getOrReturnCtx(A, B), Y(B, {
16662
- code: d.too_small,
16660
+ code: U.too_small,
16663
16661
  message: Q.message,
16664
16662
  inclusive: !0,
16665
16663
  exact: !1,
16666
16664
  minimum: Q.value,
16667
16665
  type: "date"
16668
16666
  }), g.dirty()) : Q.kind === "max" ? A.data.getTime() > Q.value && (B = this._getOrReturnCtx(A, B), Y(B, {
16669
- code: d.too_big,
16667
+ code: U.too_big,
16670
16668
  message: Q.message,
16671
16669
  inclusive: !0,
16672
16670
  exact: !1,
@@ -16722,7 +16720,7 @@ class BQ extends Z {
16722
16720
  if (this._getType(A) !== u.symbol) {
16723
16721
  const g = this._getOrReturnCtx(A);
16724
16722
  return Y(g, {
16725
- code: d.invalid_type,
16723
+ code: U.invalid_type,
16726
16724
  expected: u.symbol,
16727
16725
  received: g.parsedType
16728
16726
  }), m;
@@ -16739,7 +16737,7 @@ class CQ extends Z {
16739
16737
  if (this._getType(A) !== u.undefined) {
16740
16738
  const g = this._getOrReturnCtx(A);
16741
16739
  return Y(g, {
16742
- code: d.invalid_type,
16740
+ code: U.invalid_type,
16743
16741
  expected: u.undefined,
16744
16742
  received: g.parsedType
16745
16743
  }), m;
@@ -16756,7 +16754,7 @@ class QQ extends Z {
16756
16754
  if (this._getType(A) !== u.null) {
16757
16755
  const g = this._getOrReturnCtx(A);
16758
16756
  return Y(g, {
16759
- code: d.invalid_type,
16757
+ code: U.invalid_type,
16760
16758
  expected: u.null,
16761
16759
  received: g.parsedType
16762
16760
  }), m;
@@ -16796,7 +16794,7 @@ class jA extends Z {
16796
16794
  _parse(A) {
16797
16795
  const I = this._getOrReturnCtx(A);
16798
16796
  return Y(I, {
16799
- code: d.invalid_type,
16797
+ code: U.invalid_type,
16800
16798
  expected: u.never,
16801
16799
  received: I.parsedType
16802
16800
  }), m;
@@ -16811,7 +16809,7 @@ class iQ extends Z {
16811
16809
  if (this._getType(A) !== u.undefined) {
16812
16810
  const g = this._getOrReturnCtx(A);
16813
16811
  return Y(g, {
16814
- code: d.invalid_type,
16812
+ code: U.invalid_type,
16815
16813
  expected: u.void,
16816
16814
  received: g.parsedType
16817
16815
  }), m;
@@ -16828,14 +16826,14 @@ class pA extends Z {
16828
16826
  const { ctx: I, status: g } = this._processInputParams(A), B = this._def;
16829
16827
  if (I.parsedType !== u.array)
16830
16828
  return Y(I, {
16831
- code: d.invalid_type,
16829
+ code: U.invalid_type,
16832
16830
  expected: u.array,
16833
16831
  received: I.parsedType
16834
16832
  }), m;
16835
16833
  if (B.exactLength !== null) {
16836
16834
  const E = I.data.length > B.exactLength.value, i = I.data.length < B.exactLength.value;
16837
16835
  (E || i) && (Y(I, {
16838
- code: E ? d.too_big : d.too_small,
16836
+ code: E ? U.too_big : U.too_small,
16839
16837
  minimum: i ? B.exactLength.value : void 0,
16840
16838
  maximum: E ? B.exactLength.value : void 0,
16841
16839
  type: "array",
@@ -16845,14 +16843,14 @@ class pA extends Z {
16845
16843
  }), g.dirty());
16846
16844
  }
16847
16845
  if (B.minLength !== null && I.data.length < B.minLength.value && (Y(I, {
16848
- code: d.too_small,
16846
+ code: U.too_small,
16849
16847
  minimum: B.minLength.value,
16850
16848
  type: "array",
16851
16849
  inclusive: !0,
16852
16850
  exact: !1,
16853
16851
  message: B.minLength.message
16854
16852
  }), g.dirty()), B.maxLength !== null && I.data.length > B.maxLength.value && (Y(I, {
16855
- code: d.too_big,
16853
+ code: U.too_big,
16856
16854
  maximum: B.maxLength.value,
16857
16855
  type: "array",
16858
16856
  inclusive: !0,
@@ -16926,7 +16924,7 @@ class eA extends Z {
16926
16924
  if (this._getType(A) !== u.object) {
16927
16925
  const s = this._getOrReturnCtx(A);
16928
16926
  return Y(s, {
16929
- code: d.invalid_type,
16927
+ code: U.invalid_type,
16930
16928
  expected: u.object,
16931
16929
  received: s.parsedType
16932
16930
  }), m;
@@ -16954,7 +16952,7 @@ class eA extends Z {
16954
16952
  });
16955
16953
  else if (s === "strict")
16956
16954
  i.length > 0 && (Y(B, {
16957
- code: d.unrecognized_keys,
16955
+ code: U.unrecognized_keys,
16958
16956
  keys: i
16959
16957
  }), g.dirty());
16960
16958
  else if (s !== "strip") throw new Error("Internal ZodObject error: invalid unknownKeys value.");
@@ -17211,7 +17209,7 @@ class Sg extends Z {
17211
17209
  return I.common.issues.push(...i.ctx.common.issues), i.result;
17212
17210
  const E = Q.map((i) => new WA(i.ctx.common.issues));
17213
17211
  return Y(I, {
17214
- code: d.invalid_union,
17212
+ code: U.invalid_union,
17215
17213
  unionErrors: E
17216
17214
  }), m;
17217
17215
  }
@@ -17258,7 +17256,7 @@ class Sg extends Z {
17258
17256
  return I.common.issues.push(...Q.ctx.common.issues), Q.result;
17259
17257
  const i = E.map((o) => new WA(o));
17260
17258
  return Y(I, {
17261
- code: d.invalid_union,
17259
+ code: U.invalid_union,
17262
17260
  unionErrors: i
17263
17261
  }), m;
17264
17262
  }
@@ -17305,7 +17303,7 @@ class Ng extends Z {
17305
17303
  return m;
17306
17304
  const i = rB(Q.value, E.value);
17307
17305
  return i.valid ? ((IQ(Q) || IQ(E)) && I.dirty(), { status: I.value, value: i.data }) : (Y(g, {
17308
- code: d.invalid_intersection_types
17306
+ code: U.invalid_intersection_types
17309
17307
  }), m);
17310
17308
  };
17311
17309
  return g.common.async ? Promise.all([
@@ -17341,20 +17339,20 @@ class QI extends Z {
17341
17339
  const { status: I, ctx: g } = this._processInputParams(A);
17342
17340
  if (g.parsedType !== u.array)
17343
17341
  return Y(g, {
17344
- code: d.invalid_type,
17342
+ code: U.invalid_type,
17345
17343
  expected: u.array,
17346
17344
  received: g.parsedType
17347
17345
  }), m;
17348
17346
  if (g.data.length < this._def.items.length)
17349
17347
  return Y(g, {
17350
- code: d.too_small,
17348
+ code: U.too_small,
17351
17349
  minimum: this._def.items.length,
17352
17350
  inclusive: !0,
17353
17351
  exact: !1,
17354
17352
  type: "array"
17355
17353
  }), m;
17356
17354
  !this._def.rest && g.data.length > this._def.items.length && (Y(g, {
17357
- code: d.too_big,
17355
+ code: U.too_big,
17358
17356
  maximum: this._def.items.length,
17359
17357
  inclusive: !0,
17360
17358
  exact: !1,
@@ -17397,7 +17395,7 @@ class oQ extends Z {
17397
17395
  const { status: I, ctx: g } = this._processInputParams(A);
17398
17396
  if (g.parsedType !== u.map)
17399
17397
  return Y(g, {
17400
- code: d.invalid_type,
17398
+ code: U.invalid_type,
17401
17399
  expected: u.map,
17402
17400
  received: g.parsedType
17403
17401
  }), m;
@@ -17439,20 +17437,20 @@ class TI extends Z {
17439
17437
  const { status: I, ctx: g } = this._processInputParams(A);
17440
17438
  if (g.parsedType !== u.set)
17441
17439
  return Y(g, {
17442
- code: d.invalid_type,
17440
+ code: U.invalid_type,
17443
17441
  expected: u.set,
17444
17442
  received: g.parsedType
17445
17443
  }), m;
17446
17444
  const B = this._def;
17447
17445
  B.minSize !== null && g.data.size < B.minSize.value && (Y(g, {
17448
- code: d.too_small,
17446
+ code: U.too_small,
17449
17447
  minimum: B.minSize.value,
17450
17448
  type: "set",
17451
17449
  inclusive: !0,
17452
17450
  exact: !1,
17453
17451
  message: B.minSize.message
17454
17452
  }), I.dirty()), B.maxSize !== null && g.data.size > B.maxSize.value && (Y(g, {
17455
- code: d.too_big,
17453
+ code: U.too_big,
17456
17454
  maximum: B.maxSize.value,
17457
17455
  type: "set",
17458
17456
  inclusive: !0,
@@ -17518,7 +17516,7 @@ class DB extends Z {
17518
17516
  const I = this._getOrReturnCtx(A);
17519
17517
  return Y(I, {
17520
17518
  received: I.data,
17521
- code: d.invalid_literal,
17519
+ code: U.invalid_literal,
17522
17520
  expected: this._def.value
17523
17521
  }), m;
17524
17522
  }
@@ -17547,14 +17545,14 @@ class yI extends Z {
17547
17545
  return Y(I, {
17548
17546
  expected: O.joinValues(g),
17549
17547
  received: I.parsedType,
17550
- code: d.invalid_type
17548
+ code: U.invalid_type
17551
17549
  }), m;
17552
17550
  }
17553
17551
  if (this._cache || (this._cache = new Set(this._def.values)), !this._cache.has(A.data)) {
17554
17552
  const I = this._getOrReturnCtx(A), g = this._def.values;
17555
17553
  return Y(I, {
17556
17554
  received: I.data,
17557
- code: d.invalid_enum_value,
17555
+ code: U.invalid_enum_value,
17558
17556
  options: g
17559
17557
  }), m;
17560
17558
  }
@@ -17603,14 +17601,14 @@ class tQ extends Z {
17603
17601
  return Y(g, {
17604
17602
  expected: O.joinValues(B),
17605
17603
  received: g.parsedType,
17606
- code: d.invalid_type
17604
+ code: U.invalid_type
17607
17605
  }), m;
17608
17606
  }
17609
17607
  if (this._cache || (this._cache = new Set(O.getValidEnumValues(this._def.values))), !this._cache.has(A.data)) {
17610
17608
  const B = O.objectValues(I);
17611
17609
  return Y(g, {
17612
17610
  received: g.data,
17613
- code: d.invalid_enum_value,
17611
+ code: U.invalid_enum_value,
17614
17612
  options: B
17615
17613
  }), m;
17616
17614
  }
@@ -17633,7 +17631,7 @@ class Rg extends Z {
17633
17631
  const { ctx: I } = this._processInputParams(A);
17634
17632
  if (I.parsedType !== u.promise && I.common.async === !1)
17635
17633
  return Y(I, {
17636
- code: d.invalid_type,
17634
+ code: U.invalid_type,
17637
17635
  expected: u.promise,
17638
17636
  received: I.parsedType
17639
17637
  }), m;
@@ -17835,7 +17833,7 @@ class eQ extends Z {
17835
17833
  if (this._getType(A) !== u.nan) {
17836
17834
  const g = this._getOrReturnCtx(A);
17837
17835
  return Y(g, {
17838
- code: d.invalid_type,
17836
+ code: U.invalid_type,
17839
17837
  expected: u.nan,
17840
17838
  received: g.parsedType
17841
17839
  }), m;
@@ -18364,8 +18362,8 @@ function hE(C, A) {
18364
18362
  const I = { ...C };
18365
18363
  return delete I[A], I;
18366
18364
  }
18367
- async function de(C, A) {
18368
- const I = new ZI(C), g = new UA(I), B = GI(A), Q = await _I(g, B);
18365
+ async function Ue(C, A) {
18366
+ const I = new ZI(C), g = new dA(I), B = GI(A), Q = await _I(g, B);
18369
18367
  try {
18370
18368
  return xt(Q.attrs);
18371
18369
  } catch {
@@ -18424,7 +18422,7 @@ function Wt(C) {
18424
18422
  }
18425
18423
  }
18426
18424
  async function le(C, A, I) {
18427
- const g = C + "/" + A, B = new ZI(g), Q = new UA(B), E = GI(I), i = await _I(Q, E);
18425
+ const g = C + "/" + A, B = new ZI(g), Q = new dA(B), E = GI(I), i = await _I(Q, E);
18428
18426
  try {
18429
18427
  return Wt(i.attrs);
18430
18428
  } catch {
@@ -18518,7 +18516,7 @@ class MI {
18518
18516
  * @param props.version OME-Zarr version
18519
18517
  */
18520
18518
  static async fromHttp(A) {
18521
- const I = new UA(new ZI(A.url)), g = await MI.openLoader(I, A.version);
18519
+ const I = new dA(new ZI(A.url)), g = await MI.openLoader(I, A.version);
18522
18520
  return new MI({ location: I, version: A.version, loader: g });
18523
18521
  }
18524
18522
  /**
@@ -18531,7 +18529,7 @@ class MI {
18531
18529
  * ask the user once for permission to the root directory
18532
18530
  */
18533
18531
  static async fromFileSystem(A) {
18534
- const I = new UA(
18532
+ const I = new dA(
18535
18533
  new XB(A.directory),
18536
18534
  A.path
18537
18535
  ), g = await MI.openLoader(I, A.version);
@@ -18730,7 +18728,7 @@ class _t {
18730
18728
  return this.dirty_ && (this.computeMatrix(), this.dirty_ = !1), this.matrix_;
18731
18729
  }
18732
18730
  get inverse() {
18733
- return Ug(SA(), this.matrix);
18731
+ return dg(SA(), this.matrix);
18734
18732
  }
18735
18733
  computeMatrix() {
18736
18734
  ZE(
@@ -18906,15 +18904,15 @@ class cE extends FI {
18906
18904
  const Q = [], E = [], i = g, o = B, s = i + 1, t = o + 1, e = A / i, n = I / o;
18907
18905
  for (let D = 0; D < t; ++D) {
18908
18906
  const F = D * n;
18909
- for (let U = 0; U < s; ++U) {
18910
- const S = U * e, l = U / i, f = D / o, k = [S, F, 0], R = [0, 0, 1], L = [l, f];
18911
- Q.push(...k, ...R, ...L);
18907
+ for (let k = 0; k < s; ++k) {
18908
+ const S = k * e, l = k / i, f = D / o, d = [S, F, 0], R = [0, 0, 1], L = [l, f];
18909
+ Q.push(...d, ...R, ...L);
18912
18910
  }
18913
18911
  }
18914
18912
  for (let D = 0; D < o; ++D)
18915
18913
  for (let F = 0; F < i; ++F) {
18916
- const U = F + s * D, S = F + s * (D + 1), l = F + 1 + s * (D + 1), f = F + 1 + s * D;
18917
- E.push(U, S, f), E.push(S, l, f);
18914
+ const k = F + s * D, S = F + s * (D + 1), l = F + 1 + s * (D + 1), f = F + 1 + s * D;
18915
+ E.push(k, S, f), E.push(S, l, f);
18918
18916
  }
18919
18917
  this.vertexData_ = new Float32Array(Q), this.indexData_ = new Uint32Array(E), this.addAttribute({
18920
18918
  type: "position",
@@ -19251,10 +19249,10 @@ class Ae extends FI {
19251
19249
  });
19252
19250
  }
19253
19251
  buildFace(A, I, g, B, Q, E, i, o, s, t, e, n, D) {
19254
- const F = E / s, U = i / t, S = E / 2, l = i / 2, f = o / 2 * e, k = s + 1, R = t + 1, L = n.length / 8;
19252
+ const F = E / s, k = i / t, S = E / 2, l = i / 2, f = o / 2 * e, d = s + 1, R = t + 1, L = n.length / 8;
19255
19253
  for (let M = 0; M < R; M++) {
19256
- const W = -l + M * U;
19257
- for (let $ = 0; $ < k; $++) {
19254
+ const W = -l + M * k;
19255
+ for (let $ = 0; $ < d; $++) {
19258
19256
  const BA = -S + $ * F, IA = { x: 0, y: 0, z: 0 };
19259
19257
  IA[A] = BA * B, IA[I] = W * Q, IA[g] = f;
19260
19258
  const iA = { x: 0, y: 0, z: 0 };
@@ -19274,7 +19272,7 @@ class Ae extends FI {
19274
19272
  }
19275
19273
  for (let M = 0; M < t; M++)
19276
19274
  for (let W = 0; W < s; W++) {
19277
- const $ = L + W + k * M, BA = L + W + k * (M + 1), IA = L + (W + 1) + k * (M + 1), iA = L + (W + 1) + k * M;
19275
+ const $ = L + W + d * M, BA = L + W + d * (M + 1), IA = L + (W + 1) + d * (M + 1), iA = L + (W + 1) + d * M;
19278
19276
  D.push($, BA, iA, BA, IA, iA);
19279
19277
  }
19280
19278
  }
@@ -19569,7 +19567,7 @@ function ie(C) {
19569
19567
  `align${C.rowAlignmentBytes}`
19570
19568
  ].join(":");
19571
19569
  }
19572
- class nQ extends UB {
19570
+ class nQ extends dB {
19573
19571
  width_;
19574
19572
  height_;
19575
19573
  constructor(A, I, g) {
@@ -19849,7 +19847,7 @@ class FE extends Yg {
19849
19847
  }
19850
19848
  }
19851
19849
  }
19852
- class re extends UB {
19850
+ class re extends dB {
19853
19851
  width_;
19854
19852
  height_;
19855
19853
  depth_;
@@ -20146,7 +20144,7 @@ class NE extends kI {
20146
20144
  return this.transform.translation;
20147
20145
  }
20148
20146
  clipToWorld(A) {
20149
- const I = Qg(A[0], A[1], A[2], 1), g = Ug(
20147
+ const I = Qg(A[0], A[1], A[2], 1), g = dg(
20150
20148
  SA(),
20151
20149
  this.projectionMatrix_
20152
20150
  ), B = pI(
@@ -20205,7 +20203,7 @@ class Ke extends NE {
20205
20203
  }
20206
20204
  getWorldViewRect() {
20207
20205
  let A = Qg(-1, -1, 0, 1), I = Qg(1, 1, 0, 1);
20208
- const g = Ug(SA(), this.getViewProjection());
20206
+ const g = dg(SA(), this.getViewProjection());
20209
20207
  return A = pI(nI(), A, g), I = pI(nI(), I, g), new GA(
20210
20208
  aA(A[0], A[1]),
20211
20209
  aA(I[0], I[1])
@@ -20436,7 +20434,7 @@ export {
20436
20434
  IC as createImageSourcePolicy,
20437
20435
  xe as createNoPrefetchPolicy,
20438
20436
  me as createPlaybackPolicy,
20439
- de as loadOmeZarrPlate,
20437
+ Ue as loadOmeZarrPlate,
20440
20438
  le as loadOmeZarrWell,
20441
20439
  Le as loadOmeroChannels,
20442
20440
  Je as loadOmeroDefaults