diff --git "a/src/backend/gradio_molecule3d/templates/component/index.js" "b/src/backend/gradio_molecule3d/templates/component/index.js" --- "a/src/backend/gradio_molecule3d/templates/component/index.js" +++ "b/src/backend/gradio_molecule3d/templates/component/index.js" @@ -3897,19 +3897,19 @@ void main() { return this.cache[o][w + p]; for (var v = this.basisVectors.length, a = [], l = [], g, M = 0; M < v; M++) a.push(this.basisVectors[M].clone().multiplyScalar(o)), a.push(this.basisVectors[M].clone().multiplyScalar(o)), g = this.basisVectors[M].clone().normalize(), l.push(g), l.push(g); - var L = [], T = 10, D = v, I = 0, z = Math.PI * 2, P = 0, B = Math.PI, F, N, $ = !1, k = !1; + var L = [], T = 10, D = v, I = 0, z = Math.PI * 2, P = 0, B = Math.PI, k, N, $ = !1, F = !1; for (N = 0; N <= T; N++) { - $ = N === 0 || N === T, k = N === T / 2; + $ = N === 0 || N === T, F = N === T / 2; var G = [], H = []; - for (F = 0; F <= D; F++) { - if (k) { - var U = F < D ? 2 * F : 0; + for (k = 0; k <= D; k++) { + if (F) { + var U = k < D ? 2 * k : 0; H.push(U + 1), G.push(U); continue; } - var V = F / D, Q = N / T; - if (!$ || F === 0) - if (F < D) { + var V = k / D, Q = N / T; + if (!$ || k === 0) + if (k < D) { var ae = new n.Vector3(); ae.x = -o * Math.cos(I + V * z) * Math.sin(P + Q * B), w == 1 ? ae.y = 0 : ae.y = o * Math.cos(P + Q * B), ae.z = o * Math.sin(I + V * z) * Math.sin(P + Q * B), Math.abs(ae.x) < 1e-5 && (ae.x = 0), Math.abs(ae.y) < 1e-5 && (ae.y = 0), Math.abs(ae.z) < 1e-5 && (ae.z = 0), w == f.FLAT ? (g = new n.Vector3(0, Math.cos(P + Q * B), 0), g.normalize()) : (g = new n.Vector3(ae.x, ae.y, ae.z), g.normalize()), a.push(ae), l.push(g), G.push(a.length - 1); } else @@ -3917,7 +3917,7 @@ void main() { else $ && G.push(a.length - 1); } - k && L.push(H), L.push(G); + F && L.push(H), L.push(G); } var oe = { vertices: a, @@ -3934,18 +3934,18 @@ void main() { if (!(!o || !w)) { var g = l || a; v = v || { r: 0, g: 0, b: 0 }; - var M = h(w.x - o.x, w.y - o.y, w.z - o.z), L = E.getVerticesForRadius(p, l, "to"), T = L.w, D = L.h, I = g ? D * T + 2 : 2 * T, z = s.updateGeoGroup(I), P = L.vertices, B = L.normals, F = L.verticesRows, N = F[D / 2], $ = F[D / 2 + 1], k = z.vertices, G, H, U, V, Q, ae, oe = z.vertexArray, q = z.normalArray, me = z.colorArray, ne = z.faceArray; + var M = h(w.x - o.x, w.y - o.y, w.z - o.z), L = E.getVerticesForRadius(p, l, "to"), T = L.w, D = L.h, I = g ? D * T + 2 : 2 * T, z = s.updateGeoGroup(I), P = L.vertices, B = L.normals, k = L.verticesRows, N = k[D / 2], $ = k[D / 2 + 1], F = z.vertices, G, H, U, V, Q, ae, oe = z.vertexArray, q = z.normalArray, me = z.colorArray, ne = z.faceArray; for (U = 0; U < T; ++U) { var fe = 2 * U; - V = M[0] * P[fe].x + M[3] * P[fe].y + M[6] * P[fe].z, Q = M[1] * P[fe].x + M[4] * P[fe].y + M[7] * P[fe].z, ae = M[5] * P[fe].y + M[8] * P[fe].z, G = 3 * (k + fe), H = z.faceidx, oe[G] = V + o.x, oe[G + 1] = Q + o.y, oe[G + 2] = ae + o.z, oe[G + 3] = V + w.x, oe[G + 4] = Q + w.y, oe[G + 5] = ae + w.z, q[G] = V, q[G + 3] = V, q[G + 1] = Q, q[G + 4] = Q, q[G + 2] = ae, q[G + 5] = ae, me[G] = v.r, me[G + 3] = v.r, me[G + 1] = v.g, me[G + 4] = v.g, me[G + 2] = v.b, me[G + 5] = v.b, ne[H] = $[U] + k, ne[H + 1] = $[U + 1] + k, ne[H + 2] = N[U] + k, ne[H + 3] = N[U] + k, ne[H + 4] = $[U + 1] + k, ne[H + 5] = N[U + 1] + k, z.faceidx += 6; + V = M[0] * P[fe].x + M[3] * P[fe].y + M[6] * P[fe].z, Q = M[1] * P[fe].x + M[4] * P[fe].y + M[7] * P[fe].z, ae = M[5] * P[fe].y + M[8] * P[fe].z, G = 3 * (F + fe), H = z.faceidx, oe[G] = V + o.x, oe[G + 1] = Q + o.y, oe[G + 2] = ae + o.z, oe[G + 3] = V + w.x, oe[G + 4] = Q + w.y, oe[G + 5] = ae + w.z, q[G] = V, q[G + 3] = V, q[G + 1] = Q, q[G + 4] = Q, q[G + 2] = ae, q[G + 5] = ae, me[G] = v.r, me[G + 3] = v.r, me[G + 1] = v.g, me[G + 4] = v.g, me[G + 2] = v.b, me[G + 5] = v.b, ne[H] = $[U] + F, ne[H + 1] = $[U + 1] + F, ne[H + 2] = N[U] + F, ne[H + 3] = N[U] + F, ne[H + 4] = $[U + 1] + F, ne[H + 5] = N[U + 1] + F, z.faceidx += 6; } if (g) { - var Ce = l ? 0 : D / 2, Me = a ? D + 1 : D / 2 + 1, Te, se, pe, we, ke, Ue, Ne, Be, ue, ye, ge, Se, ze, He, We, Y, K, ee, de, ve, Ie, Re, Z, ce, Ae, Fe, he, Oe, j, $e, Ve, R; + var Ce = l ? 0 : D / 2, Me = a ? D + 1 : D / 2 + 1, Te, se, pe, we, Fe, Ue, Ne, Be, ue, ye, ge, Se, ze, He, We, Y, K, ee, de, ve, Ie, Re, Z, ce, Ae, ke, he, Oe, j, $e, Ve, R; for (Q = Ce; Q < Me; Q++) if (Q !== D / 2) { var be = Q <= D / 2 ? w : o, Ee = E.getVerticesForRadius(p, l, "to"), X = E.getVerticesForRadius(p, a, "from"); - for (be === w ? (P = Ee.vertices, B = Ee.normals, F = Ee.verticesRows) : be == o && (P = X.vertices, B = X.normals, F = X.verticesRows), V = 0; V < T; V++) - H = z.faceidx, Te = F[Q][V + 1], j = (Te + k) * 3, se = F[Q][V], $e = (se + k) * 3, pe = F[Q + 1][V], Ve = (pe + k) * 3, we = F[Q + 1][V + 1], R = (we + k) * 3, ke = M[0] * P[Te].x + M[3] * P[Te].y + M[6] * P[Te].z, Ue = M[0] * P[se].x + M[3] * P[se].y + M[6] * P[se].z, Ne = M[0] * P[pe].x + M[3] * P[pe].y + M[6] * P[pe].z, Be = M[0] * P[we].x + M[3] * P[we].y + M[6] * P[we].z, ue = M[1] * P[Te].x + M[4] * P[Te].y + M[7] * P[Te].z, ye = M[1] * P[se].x + M[4] * P[se].y + M[7] * P[se].z, ge = M[1] * P[pe].x + M[4] * P[pe].y + M[7] * P[pe].z, Se = M[1] * P[we].x + M[4] * P[we].y + M[7] * P[we].z, ze = M[5] * P[Te].y + M[8] * P[Te].z, He = M[5] * P[se].y + M[8] * P[se].z, We = M[5] * P[pe].y + M[8] * P[pe].z, Y = M[5] * P[we].y + M[8] * P[we].z, oe[j] = ke + be.x, oe[$e] = Ue + be.x, oe[Ve] = Ne + be.x, oe[R] = Be + be.x, oe[j + 1] = ue + be.y, oe[$e + 1] = ye + be.y, oe[Ve + 1] = ge + be.y, oe[R + 1] = Se + be.y, oe[j + 2] = ze + be.z, oe[$e + 2] = He + be.z, oe[Ve + 2] = We + be.z, oe[R + 2] = Y + be.z, me[j] = v.r, me[$e] = v.r, me[Ve] = v.r, me[R] = v.r, me[j + 1] = v.g, me[$e + 1] = v.g, me[Ve + 1] = v.g, me[R + 1] = v.g, me[j + 2] = v.b, me[$e + 2] = v.b, me[Ve + 2] = v.b, me[R + 2] = v.b, K = M[0] * B[Te].x + M[3] * B[Te].y + M[6] * B[Te].z, ee = M[0] * B[se].x + M[3] * B[se].y + M[6] * B[se].z, de = M[0] * B[pe].x + M[3] * B[pe].y + M[6] * B[pe].z, ve = M[0] * B[we].x + M[3] * B[we].y + M[6] * B[we].z, Ie = M[1] * B[Te].x + M[4] * B[Te].y + M[7] * B[Te].z, Re = M[1] * B[se].x + M[4] * B[se].y + M[7] * B[se].z, Z = M[1] * B[pe].x + M[4] * B[pe].y + M[7] * B[pe].z, ce = M[1] * B[we].x + M[4] * B[we].y + M[7] * B[we].z, Ae = M[5] * B[Te].y + M[8] * B[Te].z, Fe = M[5] * B[se].y + M[8] * B[se].z, he = M[5] * B[pe].y + M[8] * B[pe].z, Oe = M[5] * B[we].y + M[8] * B[we].z, Q === 0 ? (q[j] = K, q[Ve] = de, q[R] = ve, q[j + 1] = Ie, q[Ve + 1] = Z, q[R + 1] = ce, q[j + 2] = Ae, q[Ve + 2] = he, q[R + 2] = Oe, ne[H] = Te + k, ne[H + 1] = pe + k, ne[H + 2] = we + k, z.faceidx += 3) : Q === Me - 1 ? (q[j] = K, q[$e] = ee, q[Ve] = de, q[j + 1] = Ie, q[$e + 1] = Re, q[Ve + 1] = Z, q[j + 2] = Ae, q[$e + 2] = Fe, q[Ve + 2] = he, ne[H] = Te + k, ne[H + 1] = se + k, ne[H + 2] = pe + k, z.faceidx += 3) : (q[j] = K, q[$e] = ee, q[R] = ve, q[j + 1] = Ie, q[$e + 1] = Re, q[R + 1] = ce, q[j + 2] = Ae, q[$e + 2] = Fe, q[R + 2] = Oe, q[$e] = ee, q[Ve] = de, q[R] = ve, q[$e + 1] = Re, q[Ve + 1] = Z, q[R + 1] = ce, q[$e + 2] = Fe, q[Ve + 2] = he, q[R + 2] = Oe, ne[H] = Te + k, ne[H + 1] = se + k, ne[H + 2] = we + k, ne[H + 3] = se + k, ne[H + 4] = pe + k, ne[H + 5] = we + k, z.faceidx += 6); + for (be === w ? (P = Ee.vertices, B = Ee.normals, k = Ee.verticesRows) : be == o && (P = X.vertices, B = X.normals, k = X.verticesRows), V = 0; V < T; V++) + H = z.faceidx, Te = k[Q][V + 1], j = (Te + F) * 3, se = k[Q][V], $e = (se + F) * 3, pe = k[Q + 1][V], Ve = (pe + F) * 3, we = k[Q + 1][V + 1], R = (we + F) * 3, Fe = M[0] * P[Te].x + M[3] * P[Te].y + M[6] * P[Te].z, Ue = M[0] * P[se].x + M[3] * P[se].y + M[6] * P[se].z, Ne = M[0] * P[pe].x + M[3] * P[pe].y + M[6] * P[pe].z, Be = M[0] * P[we].x + M[3] * P[we].y + M[6] * P[we].z, ue = M[1] * P[Te].x + M[4] * P[Te].y + M[7] * P[Te].z, ye = M[1] * P[se].x + M[4] * P[se].y + M[7] * P[se].z, ge = M[1] * P[pe].x + M[4] * P[pe].y + M[7] * P[pe].z, Se = M[1] * P[we].x + M[4] * P[we].y + M[7] * P[we].z, ze = M[5] * P[Te].y + M[8] * P[Te].z, He = M[5] * P[se].y + M[8] * P[se].z, We = M[5] * P[pe].y + M[8] * P[pe].z, Y = M[5] * P[we].y + M[8] * P[we].z, oe[j] = Fe + be.x, oe[$e] = Ue + be.x, oe[Ve] = Ne + be.x, oe[R] = Be + be.x, oe[j + 1] = ue + be.y, oe[$e + 1] = ye + be.y, oe[Ve + 1] = ge + be.y, oe[R + 1] = Se + be.y, oe[j + 2] = ze + be.z, oe[$e + 2] = He + be.z, oe[Ve + 2] = We + be.z, oe[R + 2] = Y + be.z, me[j] = v.r, me[$e] = v.r, me[Ve] = v.r, me[R] = v.r, me[j + 1] = v.g, me[$e + 1] = v.g, me[Ve + 1] = v.g, me[R + 1] = v.g, me[j + 2] = v.b, me[$e + 2] = v.b, me[Ve + 2] = v.b, me[R + 2] = v.b, K = M[0] * B[Te].x + M[3] * B[Te].y + M[6] * B[Te].z, ee = M[0] * B[se].x + M[3] * B[se].y + M[6] * B[se].z, de = M[0] * B[pe].x + M[3] * B[pe].y + M[6] * B[pe].z, ve = M[0] * B[we].x + M[3] * B[we].y + M[6] * B[we].z, Ie = M[1] * B[Te].x + M[4] * B[Te].y + M[7] * B[Te].z, Re = M[1] * B[se].x + M[4] * B[se].y + M[7] * B[se].z, Z = M[1] * B[pe].x + M[4] * B[pe].y + M[7] * B[pe].z, ce = M[1] * B[we].x + M[4] * B[we].y + M[7] * B[we].z, Ae = M[5] * B[Te].y + M[8] * B[Te].z, ke = M[5] * B[se].y + M[8] * B[se].z, he = M[5] * B[pe].y + M[8] * B[pe].z, Oe = M[5] * B[we].y + M[8] * B[we].z, Q === 0 ? (q[j] = K, q[Ve] = de, q[R] = ve, q[j + 1] = Ie, q[Ve + 1] = Z, q[R + 1] = ce, q[j + 2] = Ae, q[Ve + 2] = he, q[R + 2] = Oe, ne[H] = Te + F, ne[H + 1] = pe + F, ne[H + 2] = we + F, z.faceidx += 3) : Q === Me - 1 ? (q[j] = K, q[$e] = ee, q[Ve] = de, q[j + 1] = Ie, q[$e + 1] = Re, q[Ve + 1] = Z, q[j + 2] = Ae, q[$e + 2] = ke, q[Ve + 2] = he, ne[H] = Te + F, ne[H + 1] = se + F, ne[H + 2] = pe + F, z.faceidx += 3) : (q[j] = K, q[$e] = ee, q[R] = ve, q[j + 1] = Ie, q[$e + 1] = Re, q[R + 1] = ce, q[j + 2] = Ae, q[$e + 2] = ke, q[R + 2] = Oe, q[$e] = ee, q[Ve] = de, q[R] = ve, q[$e + 1] = Re, q[Ve + 1] = Z, q[R + 1] = ce, q[$e + 2] = ke, q[Ve + 2] = he, q[R + 2] = Oe, ne[H] = Te + F, ne[H + 1] = se + F, ne[H + 2] = we + F, ne[H + 3] = se + F, ne[H + 4] = pe + F, ne[H + 5] = we + F, z.faceidx += 6); } } z.vertices += I; @@ -3959,10 +3959,10 @@ void main() { let a = new n.Vector3(w.x - o.x, w.y - o.y, w.z - o.z); var l = h(a.x, a.y, a.z); a = a.normalize(); - var g = E.basisVectors.length, M = E.basisVectors, L = g + 2, T = s.updateGeoGroup(L), D = T.vertices, I, z, P, B, F, N, $ = T.vertexArray, k = T.normalArray, G = T.colorArray, H = T.faceArray; - for (I = D * 3, $[I] = o.x, $[I + 1] = o.y, $[I + 2] = o.z, k[I] = -a.x, k[I + 1] = -a.y, k[I + 2] = -a.z, G[I] = v.r, G[I + 1] = v.g, G[I + 2] = v.b, $[I + 3] = w.x, $[I + 4] = w.y, $[I + 5] = w.z, k[I + 3] = a.x, k[I + 4] = a.y, k[I + 5] = a.z, G[I + 3] = v.r, G[I + 4] = v.g, G[I + 5] = v.b, I += 6, P = 0; P < g; ++P) { + var g = E.basisVectors.length, M = E.basisVectors, L = g + 2, T = s.updateGeoGroup(L), D = T.vertices, I, z, P, B, k, N, $ = T.vertexArray, F = T.normalArray, G = T.colorArray, H = T.faceArray; + for (I = D * 3, $[I] = o.x, $[I + 1] = o.y, $[I + 2] = o.z, F[I] = -a.x, F[I + 1] = -a.y, F[I + 2] = -a.z, G[I] = v.r, G[I + 1] = v.g, G[I + 2] = v.b, $[I + 3] = w.x, $[I + 4] = w.y, $[I + 5] = w.z, F[I + 3] = a.x, F[I + 4] = a.y, F[I + 5] = a.z, G[I + 3] = v.r, G[I + 4] = v.g, G[I + 5] = v.b, I += 6, P = 0; P < g; ++P) { var U = M[P].clone(); - U.multiplyScalar(p), B = l[0] * U.x + l[3] * U.y + l[6] * U.z, F = l[1] * U.x + l[4] * U.y + l[7] * U.z, N = l[5] * U.y + l[8] * U.z, $[I] = B + o.x, $[I + 1] = F + o.y, $[I + 2] = N + o.z, k[I] = B, k[I + 1] = F, k[I + 2] = N, G[I] = v.r, G[I + 1] = v.g, G[I + 2] = v.b, I += 3; + U.multiplyScalar(p), B = l[0] * U.x + l[3] * U.y + l[6] * U.z, k = l[1] * U.x + l[4] * U.y + l[7] * U.z, N = l[5] * U.y + l[8] * U.z, $[I] = B + o.x, $[I + 1] = k + o.y, $[I + 2] = N + o.z, F[I] = B, F[I + 1] = k, F[I + 2] = N, G[I] = v.r, G[I + 1] = v.g, G[I + 2] = v.b, I += 3; } for (T.vertices += g + 2, z = T.faceidx, P = 0; P < g; P++) { var V = D + 2 + P, Q = D + 2 + (P + 1) % g; @@ -3990,9 +3990,9 @@ void main() { for (I = 0; I <= l; I++) { let P = []; for (D = 0; D <= a; D++) { - let B = D / a, F = I / l, N = -o * Math.cos(g + B * M) * Math.sin(L + F * T), $ = o * Math.cos(L + F * T), k = o * Math.sin(g + B * M) * Math.sin(L + F * T); - var z = new n.Vector3(N, $, k); - z.normalize(), v.vertices.push({ x: N, y: $, z: k }), v.normals.push(z), P.push(v.vertices.length - 1); + let B = D / a, k = I / l, N = -o * Math.cos(g + B * M) * Math.sin(L + k * T), $ = o * Math.cos(L + k * T), F = o * Math.sin(g + B * M) * Math.sin(L + k * T); + var z = new n.Vector3(N, $, F); + z.normalize(), v.vertices.push({ x: N, y: $, z: F }), v.normals.push(z), P.push(v.vertices.length - 1); } v.verticesRows.push(P); } @@ -4003,15 +4003,15 @@ void main() { function S(s, o, w, p, v) { var a = A.getVerticesForRadius(w, v), l = a.vertices, g = a.normals, M = s.updateGeoGroup(l.length), L = M.vertices, T = M.vertexArray, D = M.colorArray, I = M.faceArray, z = M.lineArray, P = M.normalArray; for (let N = 0, $ = l.length; N < $; ++N) { - let k = 3 * (L + N), G = l[N]; - T[k] = G.x + o.x, T[k + 1] = G.y + o.y, T[k + 2] = G.z + o.z, D[k] = p.r, D[k + 1] = p.g, D[k + 2] = p.b; + let F = 3 * (L + N), G = l[N]; + T[F] = G.x + o.x, T[F + 1] = G.y + o.y, T[F + 2] = G.z + o.z, D[F] = p.r, D[F + 1] = p.g, D[F + 2] = p.b; } M.vertices += l.length; - let B = a.verticesRows, F = B.length - 1; - for (let N = 0; N < F; N++) { + let B = a.verticesRows, k = B.length - 1; + for (let N = 0; N < k; N++) { let $ = B[N].length - 1; - for (let k = 0; k < $; k++) { - let G = M.faceidx, H = M.lineidx, U = B[N][k + 1] + L, V = U * 3, Q = B[N][k] + L, ae = Q * 3, oe = B[N + 1][k] + L, q = oe * 3, me = B[N + 1][k + 1] + L, ne = me * 3, fe = g[U - L], Ce = g[Q - L], Me = g[oe - L], Te = g[me - L]; + for (let F = 0; F < $; F++) { + let G = M.faceidx, H = M.lineidx, U = B[N][F + 1] + L, V = U * 3, Q = B[N][F] + L, ae = Q * 3, oe = B[N + 1][F] + L, q = oe * 3, me = B[N + 1][F + 1] + L, ne = me * 3, fe = g[U - L], Ce = g[Q - L], Me = g[oe - L], Te = g[me - L]; Math.abs(l[U - L].y) === w ? (P[V] = fe.x, P[q] = Me.x, P[ne] = Te.x, P[V + 1] = fe.y, P[q + 1] = Me.y, P[ne + 1] = Te.y, P[V + 2] = fe.z, P[q + 2] = Me.z, P[ne + 2] = Te.z, I[G] = U, I[G + 1] = oe, I[G + 2] = me, z[H] = U, z[H + 1] = oe, z[H + 2] = U, z[H + 3] = me, z[H + 4] = oe, z[H + 5] = me, M.faceidx += 3, M.lineidx += 6) : Math.abs(l[oe - L].y) === w ? (P[V] = fe.x, P[ae] = Ce.x, P[q] = Me.x, P[V + 1] = fe.y, P[ae + 1] = Ce.y, P[q + 1] = Me.y, P[V + 2] = fe.z, P[ae + 2] = Ce.z, P[q + 2] = Me.z, I[G] = U, I[G + 1] = Q, I[G + 2] = oe, z[H] = U, z[H + 1] = Q, z[H + 2] = U, z[H + 3] = oe, z[H + 4] = Q, z[H + 5] = oe, M.faceidx += 3, M.lineidx += 6) : (P[V] = fe.x, P[ae] = Ce.x, P[ne] = Te.x, P[V + 1] = fe.y, P[ae + 1] = Ce.y, P[ne + 1] = Te.y, P[V + 2] = fe.z, P[ae + 2] = Ce.z, P[ne + 2] = Te.z, P[ae] = Ce.x, P[q] = Me.x, P[ne] = Te.x, P[ae + 1] = Ce.y, P[q + 1] = Me.y, P[ne + 1] = Te.y, P[ae + 2] = Ce.z, P[q + 2] = Me.z, P[ne + 2] = Te.z, I[G] = U, I[G + 1] = Q, I[G + 2] = me, I[G + 3] = Q, I[G + 4] = oe, I[G + 5] = me, z[H] = U, z[H + 1] = Q, z[H + 2] = U, z[H + 3] = me, z[H + 4] = Q, z[H + 5] = oe, z[H + 6] = oe, z[H + 7] = me, M.faceidx += 6, M.lineidx += 8); } } @@ -4131,8 +4131,8 @@ void main() { for (var D = (0, E.getColorFromStyle)(p, a), I = g.vertexArray, z = g.colorArray, P = 0; P < 6; P++) { var B = g.vertices * 3; if (g.vertices++, I[B] = p.x + L[P][0], I[B + 1] = p.y + L[P][1], I[B + 2] = p.z + L[P][2], z[B] = D.r, z[B + 1] = D.g, z[B + 2] = D.b, T) { - var F = new u.Vector3(L[P][0], L[P][1], L[P][2]); - F.multiplyScalar(0.1), F.set(F.x + p.x, F.y + p.y, F.z + p.z), p.intersectionShape.line.push(F); + var k = new u.Vector3(L[P][0], L[P][1], L[P][2]); + k.multiplyScalar(0.1), k.set(k.x + p.x, k.y + p.y, k.z + p.z), p.intersectionShape.line.push(k); } } } @@ -4143,10 +4143,10 @@ void main() { if (p.bonds[L] != v.index) { let I = p.bonds[L], z = this.atoms[I], B = new u.Vector3(z.x, z.y, z.z).clone(); B.sub(a); - let F = B.clone(); - F.cross(l); - var D = F.lengthSq(); - if (D > M && (M = D, g = F, M > 0.1)) + let k = B.clone(); + k.cross(l); + var D = k.lengthSq(); + if (D > M && (M = D, g = k, M > 0.1)) return g; } return g; @@ -4182,10 +4182,10 @@ void main() { var g, M, L, T, D = l.linewidth || o.defaultlineWidth; a[D] || (a[D] = new n.Geometry()); for (var I = a[D].updateGeoGroup(6 * p.bonds.length), z = I.vertexArray, P = I.colorArray, B = 0; B < p.bonds.length; B++) { - var F = p.bonds[B], N = v[F]; + var k = p.bonds[B], N = v[k]; if (N.style.line && !(p.index >= N.index)) { - var $ = new u.Vector3(p.x, p.y, p.z), k = new u.Vector3(N.x, N.y, N.z), G = $.clone().add(k).multiplyScalar(0.5), H = !1, U = p.clickable || p.hoverable, V = N.clickable || N.hoverable; - (U || V) && (U && (p.intersectionShape === void 0 && (p.intersectionShape = { sphere: [], cylinder: [], line: [], triangle: [] }), p.intersectionShape.line.push($), p.intersectionShape.line.push(G)), V && (N.intersectionShape === void 0 && (N.intersectionShape = { sphere: [], cylinder: [], line: [], triangle: [] }), N.intersectionShape.line.push(G), N.intersectionShape.line.push(k))); + var $ = new u.Vector3(p.x, p.y, p.z), F = new u.Vector3(N.x, N.y, N.z), G = $.clone().add(F).multiplyScalar(0.5), H = !1, U = p.clickable || p.hoverable, V = N.clickable || N.hoverable; + (U || V) && (U && (p.intersectionShape === void 0 && (p.intersectionShape = { sphere: [], cylinder: [], line: [], triangle: [] }), p.intersectionShape.line.push($), p.intersectionShape.line.push(G)), V && (N.intersectionShape === void 0 && (N.intersectionShape = { sphere: [], cylinder: [], line: [], triangle: [] }), N.intersectionShape.line.push(G), N.intersectionShape.line.push(F))); var Q = (0, E.getColorFromStyle)(p, p.style.line), ae = (0, E.getColorFromStyle)(N, N.style.line); if (p.bondStyles && p.bondStyles[B]) { var oe = p.bondStyles[B]; @@ -4195,10 +4195,10 @@ void main() { } var q = I.vertices * 3, me, ne; if (p.bondOrder[B] > 1 && p.bondOrder[B] < 4 && !H) { - var fe = this.getSideBondV(p, N, B), Ce = k.clone(); - Ce.sub($), p.bondOrder[B] == 2 ? (fe.multiplyScalar(0.1), g = $.clone(), g.add(fe), M = $.clone(), M.sub(fe), L = g.clone(), L.add(Ce), T = M.clone(), T.add(Ce), Q == ae ? (I.vertices += 4, this.addLine(z, P, q, g, L, Q), this.addLine(z, P, q + 6, M, T, Q)) : (I.vertices += 8, Ce.multiplyScalar(0.5), me = g.clone(), me.add(Ce), ne = M.clone(), ne.add(Ce), this.addLine(z, P, q, g, me, Q), this.addLine(z, P, q + 6, me, L, ae), this.addLine(z, P, q + 12, M, ne, Q), this.addLine(z, P, q + 18, ne, T, ae))) : p.bondOrder[B] == 3 && (fe.multiplyScalar(0.1), g = $.clone(), g.add(fe), M = $.clone(), M.sub(fe), L = g.clone(), L.add(Ce), T = M.clone(), T.add(Ce), Q == ae ? (I.vertices += 6, this.addLine(z, P, q, $, k, Q), this.addLine(z, P, q + 6, g, L, Q), this.addLine(z, P, q + 12, M, T, Q)) : (I.vertices += 12, Ce.multiplyScalar(0.5), me = g.clone(), me.add(Ce), ne = M.clone(), ne.add(Ce), this.addLine(z, P, q, $, G, Q), this.addLine(z, P, q + 6, G, k, ae), this.addLine(z, P, q + 12, g, me, Q), this.addLine(z, P, q + 18, me, L, ae), this.addLine(z, P, q + 24, M, ne, Q), this.addLine(z, P, q + 30, ne, T, ae))); + var fe = this.getSideBondV(p, N, B), Ce = F.clone(); + Ce.sub($), p.bondOrder[B] == 2 ? (fe.multiplyScalar(0.1), g = $.clone(), g.add(fe), M = $.clone(), M.sub(fe), L = g.clone(), L.add(Ce), T = M.clone(), T.add(Ce), Q == ae ? (I.vertices += 4, this.addLine(z, P, q, g, L, Q), this.addLine(z, P, q + 6, M, T, Q)) : (I.vertices += 8, Ce.multiplyScalar(0.5), me = g.clone(), me.add(Ce), ne = M.clone(), ne.add(Ce), this.addLine(z, P, q, g, me, Q), this.addLine(z, P, q + 6, me, L, ae), this.addLine(z, P, q + 12, M, ne, Q), this.addLine(z, P, q + 18, ne, T, ae))) : p.bondOrder[B] == 3 && (fe.multiplyScalar(0.1), g = $.clone(), g.add(fe), M = $.clone(), M.sub(fe), L = g.clone(), L.add(Ce), T = M.clone(), T.add(Ce), Q == ae ? (I.vertices += 6, this.addLine(z, P, q, $, F, Q), this.addLine(z, P, q + 6, g, L, Q), this.addLine(z, P, q + 12, M, T, Q)) : (I.vertices += 12, Ce.multiplyScalar(0.5), me = g.clone(), me.add(Ce), ne = M.clone(), ne.add(Ce), this.addLine(z, P, q, $, G, Q), this.addLine(z, P, q + 6, G, F, ae), this.addLine(z, P, q + 12, g, me, Q), this.addLine(z, P, q + 18, me, L, ae), this.addLine(z, P, q + 24, M, ne, Q), this.addLine(z, P, q + 30, ne, T, ae))); } else - Q == ae ? (I.vertices += 2, this.addLine(z, P, q, $, k, Q)) : (I.vertices += 4, this.addLine(z, P, q, $, G, Q), this.addLine(z, P, q + 6, G, k, ae)); + Q == ae ? (I.vertices += 2, this.addLine(z, P, q, $, F, Q)) : (I.vertices += 4, this.addLine(z, P, q, $, G, Q), this.addLine(z, P, q + 6, G, F, ae)); } } } @@ -4276,11 +4276,11 @@ void main() { } } static drawStickImposter(p, v, a, l, g) { - for (var M = p.updateGeoGroup(4), L = M.vertices, T = L * 3, D = M.vertexArray, I = M.colorArray, z = M.radiusArray, P = M.normalArray, B = g.r, F = g.g, N = g.b, $ = function(V) { + for (var M = p.updateGeoGroup(4), L = M.vertices, T = L * 3, D = M.vertexArray, I = M.colorArray, z = M.radiusArray, P = M.normalArray, B = g.r, k = g.g, N = g.b, $ = function(V) { var Q = -V; return Q == 0 && (Q = -1e-4), Q; - }, k = T, G = 0; G < 4; G++) - D[k] = v.x, P[k] = a.x, I[k] = B, k++, D[k] = v.y, P[k] = a.y, I[k] = F, k++, D[k] = v.z, P[k] = a.z, G < 2 ? I[k] = N : I[k] = $(N), k++; + }, F = T, G = 0; G < 4; G++) + D[F] = v.x, P[F] = a.x, I[F] = B, F++, D[F] = v.y, P[F] = a.y, I[F] = k, F++, D[F] = v.z, P[F] = a.z, G < 2 ? I[F] = N : I[F] = $(N), F++; M.vertices += 4, z[L] = -l, z[L + 1] = l, z[L + 2] = -l, z[L + 3] = l; var H = M.faceArray, U = M.faceidx; H[U + 0] = L, H[U + 1] = L + 1, H[U + 2] = L + 2, H[U + 3] = L + 2, H[U + 4] = L + 3, H[U + 5] = L, M.faceidx += 6; @@ -4290,46 +4290,46 @@ void main() { if (p.style.stick) { var l = p.style.stick; if (!l.hidden) { - var g = l.radius || this.defaultStickRadius, M = l.doubleBondScaling || 0.4, L = l.tripleBondScaling || 0.25, T = g, D = l.singleBonds || !1, I = 0, z = 0, P, B, F, N, $, k, G, H, U, V, Q, ae = (0, E.getColorFromStyle)(p, l), oe, q, me; + var g = l.radius || this.defaultStickRadius, M = l.doubleBondScaling || 0.4, L = l.tripleBondScaling || 0.25, T = g, D = l.singleBonds || !1, I = 0, z = 0, P, B, k, N, $, F, G, H, U, V, Q, ae = (0, E.getColorFromStyle)(p, l), oe, q, me; !p.capDrawn && p.bonds.length < 4 && (I = 2); var ne = h.GLDraw.drawCylinder; - for (a.imposter && (ne = o.drawStickImposter), F = 0; F < p.bonds.length; F++) { - var fe = p.bonds[F], Ce = v[fe]; + for (a.imposter && (ne = o.drawStickImposter), k = 0; k < p.bonds.length; k++) { + var fe = p.bonds[k], Ce = v[fe]; if (oe = q = me = null, p.index < Ce.index) { var Me = Ce.style; if (!Me.stick || Me.stick.hidden) continue; var Te = (0, E.getColorFromStyle)(Ce, Me.stick); - if (T = g, N = D, p.bondStyles && p.bondStyles[F]) { - if ($ = p.bondStyles[F], $.iswire) + if (T = g, N = D, p.bondStyles && p.bondStyles[k]) { + if ($ = p.bondStyles[k], $.iswire) continue; $.radius && (T = $.radius), $.singleBond && (N = !0), typeof $.color1 < "u" && (ae = y.CC.color($.color1)), typeof $.color2 < "u" && (Te = y.CC.color($.color2)); } var se = new u.Vector3(p.x, p.y, p.z), pe = new u.Vector3(Ce.x, Ce.y, Ce.z); - if (p.bondOrder[F] <= 1 || N || p.bondOrder[F] > 3) { - if (p.bondOrder[F] < 1 && (T *= p.bondOrder[F]), !Ce.capDrawn && Ce.bonds.length < 4 && (z = 2), ae != Te ? (oe = new u.Vector3().addVectors(se, pe).multiplyScalar(0.5), ne(a, se, oe, T, ae, I, 0), ne(a, oe, pe, T, Te, 0, z)) : ne(a, se, pe, T, ae, I, z), P = p.clickable || p.hoverable, B = Ce.clickable || Ce.hoverable, P || B) { + if (p.bondOrder[k] <= 1 || N || p.bondOrder[k] > 3) { + if (p.bondOrder[k] < 1 && (T *= p.bondOrder[k]), !Ce.capDrawn && Ce.bonds.length < 4 && (z = 2), ae != Te ? (oe = new u.Vector3().addVectors(se, pe).multiplyScalar(0.5), ne(a, se, oe, T, ae, I, 0), ne(a, oe, pe, T, Te, 0, z)) : ne(a, se, pe, T, ae, I, z), P = p.clickable || p.hoverable, B = Ce.clickable || Ce.hoverable, P || B) { if (oe || (oe = new u.Vector3().addVectors(se, pe).multiplyScalar(0.5)), P) { - var we = new f.Cylinder(se, oe, T), ke = new f.Sphere(se, T); - p.intersectionShape.cylinder.push(we), p.intersectionShape.sphere.push(ke); + var we = new f.Cylinder(se, oe, T), Fe = new f.Sphere(se, T); + p.intersectionShape.cylinder.push(we), p.intersectionShape.sphere.push(Fe); } if (B) { var Ue = new f.Cylinder(pe, oe, T), Ne = new f.Sphere(pe, T); Ce.intersectionShape.cylinder.push(Ue), Ce.intersectionShape.sphere.push(Ne); } } - } else if (p.bondOrder[F] > 1) { + } else if (p.bondOrder[k] > 1) { var Be = 0, ue = 0; T != g && (Be = 2, ue = 2); var ye = pe.clone(), ge = null; ye.sub(se); var Se, ze, He, We, Y; - ge = this.getSideBondV(p, Ce, F), p.bondOrder[F] == 2 ? (Se = T * M, ge.multiplyScalar(Se * 1.5), ze = se.clone(), ze.add(ge), He = se.clone(), He.sub(ge), We = ze.clone(), We.add(ye), Y = He.clone(), Y.add(ye), ae != Te ? (oe = new u.Vector3().addVectors(ze, We).multiplyScalar(0.5), q = new u.Vector3().addVectors(He, Y).multiplyScalar(0.5), ne(a, ze, oe, Se, ae, Be, 0), ne(a, oe, We, Se, Te, 0, ue), ne(a, He, q, Se, ae, Be, 0), ne(a, q, Y, Se, Te, 0, ue)) : (ne(a, ze, We, Se, ae, Be, ue), ne(a, He, Y, Se, ae, Be, ue)), P = p.clickable || p.hoverable, B = Ce.clickable || Ce.hoverable, (P || B) && (oe || (oe = new u.Vector3().addVectors(ze, We).multiplyScalar(0.5)), q || (q = new u.Vector3().addVectors(He, Y).multiplyScalar(0.5)), P && (k = new f.Cylinder(ze, oe, Se), G = new f.Cylinder(He, q, Se), p.intersectionShape.cylinder.push(k), p.intersectionShape.cylinder.push(G)), B && (U = new f.Cylinder(We, oe, Se), V = new f.Cylinder(Y, q, Se), Ce.intersectionShape.cylinder.push(U), Ce.intersectionShape.cylinder.push(V)))) : p.bondOrder[F] == 3 && (Se = T * L, ge.cross(ye), ge.normalize(), ge.multiplyScalar(Se * 3), ze = se.clone(), ze.add(ge), He = se.clone(), He.sub(ge), We = ze.clone(), We.add(ye), Y = He.clone(), Y.add(ye), ae != Te ? (oe = new u.Vector3().addVectors(ze, We).multiplyScalar(0.5), q = new u.Vector3().addVectors(He, Y).multiplyScalar(0.5), me = new u.Vector3().addVectors(se, pe).multiplyScalar(0.5), ne(a, ze, oe, Se, ae, Be, 0), ne(a, oe, We, Se, Te, 0, ue), ne(a, se, me, Se, ae, I, 0), ne(a, me, pe, Se, Te, 0, z), ne(a, He, q, Se, ae, Be, 0), ne(a, q, Y, Se, Te, 0, ue)) : (ne(a, ze, We, Se, ae, Be, ue), ne(a, se, pe, Se, ae, I, z), ne(a, He, Y, Se, ae, Be, ue)), P = p.clickable || p.hoverable, B = Ce.clickable || Ce.hoverable, (P || B) && (oe || (oe = new u.Vector3().addVectors(ze, We).multiplyScalar(0.5)), q || (q = new u.Vector3().addVectors(He, Y).multiplyScalar(0.5)), me || (me = new u.Vector3().addVectors(se, pe).multiplyScalar(0.5)), P && (k = new f.Cylinder(ze.clone(), oe.clone(), Se), G = new f.Cylinder(He.clone(), q.clone(), Se), H = new f.Cylinder(se.clone(), me.clone(), Se), p.intersectionShape.cylinder.push(k), p.intersectionShape.cylinder.push(G), p.intersectionShape.cylinder.push(H)), B && (U = new f.Cylinder(We.clone(), oe.clone(), Se), V = new f.Cylinder(Y.clone(), q.clone(), Se), Q = new f.Cylinder(pe.clone(), me.clone(), Se), Ce.intersectionShape.cylinder.push(U), Ce.intersectionShape.cylinder.push(V), Ce.intersectionShape.cylinder.push(Q)))); + ge = this.getSideBondV(p, Ce, k), p.bondOrder[k] == 2 ? (Se = T * M, ge.multiplyScalar(Se * 1.5), ze = se.clone(), ze.add(ge), He = se.clone(), He.sub(ge), We = ze.clone(), We.add(ye), Y = He.clone(), Y.add(ye), ae != Te ? (oe = new u.Vector3().addVectors(ze, We).multiplyScalar(0.5), q = new u.Vector3().addVectors(He, Y).multiplyScalar(0.5), ne(a, ze, oe, Se, ae, Be, 0), ne(a, oe, We, Se, Te, 0, ue), ne(a, He, q, Se, ae, Be, 0), ne(a, q, Y, Se, Te, 0, ue)) : (ne(a, ze, We, Se, ae, Be, ue), ne(a, He, Y, Se, ae, Be, ue)), P = p.clickable || p.hoverable, B = Ce.clickable || Ce.hoverable, (P || B) && (oe || (oe = new u.Vector3().addVectors(ze, We).multiplyScalar(0.5)), q || (q = new u.Vector3().addVectors(He, Y).multiplyScalar(0.5)), P && (F = new f.Cylinder(ze, oe, Se), G = new f.Cylinder(He, q, Se), p.intersectionShape.cylinder.push(F), p.intersectionShape.cylinder.push(G)), B && (U = new f.Cylinder(We, oe, Se), V = new f.Cylinder(Y, q, Se), Ce.intersectionShape.cylinder.push(U), Ce.intersectionShape.cylinder.push(V)))) : p.bondOrder[k] == 3 && (Se = T * L, ge.cross(ye), ge.normalize(), ge.multiplyScalar(Se * 3), ze = se.clone(), ze.add(ge), He = se.clone(), He.sub(ge), We = ze.clone(), We.add(ye), Y = He.clone(), Y.add(ye), ae != Te ? (oe = new u.Vector3().addVectors(ze, We).multiplyScalar(0.5), q = new u.Vector3().addVectors(He, Y).multiplyScalar(0.5), me = new u.Vector3().addVectors(se, pe).multiplyScalar(0.5), ne(a, ze, oe, Se, ae, Be, 0), ne(a, oe, We, Se, Te, 0, ue), ne(a, se, me, Se, ae, I, 0), ne(a, me, pe, Se, Te, 0, z), ne(a, He, q, Se, ae, Be, 0), ne(a, q, Y, Se, Te, 0, ue)) : (ne(a, ze, We, Se, ae, Be, ue), ne(a, se, pe, Se, ae, I, z), ne(a, He, Y, Se, ae, Be, ue)), P = p.clickable || p.hoverable, B = Ce.clickable || Ce.hoverable, (P || B) && (oe || (oe = new u.Vector3().addVectors(ze, We).multiplyScalar(0.5)), q || (q = new u.Vector3().addVectors(He, Y).multiplyScalar(0.5)), me || (me = new u.Vector3().addVectors(se, pe).multiplyScalar(0.5)), P && (F = new f.Cylinder(ze.clone(), oe.clone(), Se), G = new f.Cylinder(He.clone(), q.clone(), Se), H = new f.Cylinder(se.clone(), me.clone(), Se), p.intersectionShape.cylinder.push(F), p.intersectionShape.cylinder.push(G), p.intersectionShape.cylinder.push(H)), B && (U = new f.Cylinder(We.clone(), oe.clone(), Se), V = new f.Cylinder(Y.clone(), q.clone(), Se), Q = new f.Cylinder(pe.clone(), me.clone(), Se), Ce.intersectionShape.cylinder.push(U), Ce.intersectionShape.cylinder.push(V), Ce.intersectionShape.cylinder.push(Q)))); } } } var K = !1, ee = 0, de = !1; - for (F = 0; F < p.bonds.length; F++) - N = D, p.bondStyles && p.bondStyles[F] && ($ = p.bondStyles[F], $.singleBond && (N = !0), $.radius && $.radius != g && (de = !0)), (N || p.bondOrder[F] == 1) && ee++; + for (k = 0; k < p.bonds.length; k++) + N = D, p.bondStyles && p.bondStyles[k] && ($ = p.bondStyles[k], $.singleBond && (N = !0), $.radius && $.radius != g && (de = !0)), (N || p.bondOrder[k] == 1) && ee++; de ? ee > 0 && (K = !0) : ee == 0 && (p.bonds.length > 0 || l.showNonBonded) && (K = !0), K && (T = g, a.imposter ? this.drawSphereImposter(a.sphereGeometry, p, T, ae) : h.GLDraw.drawSphere(a, p, T, ae)); } } @@ -4344,41 +4344,41 @@ void main() { v = v || {}; var a = new n.Object3D(), l = [], g = {}, M = {}, L = this.drawAtomSphere, T = null, D = null; v.supportsImposters ? (L = this.drawAtomImposter, T = new n.Geometry(!0), T.imposter = !0, D = new n.Geometry(!0, !0), D.imposter = !0, D.sphereGeometry = new n.Geometry(!0), D.sphereGeometry.imposter = !0, D.drawnCaps = {}) : v.supportsAIA ? (L = this.drawAtomInstanced, T = new n.Geometry(!1, !0, !0), T.instanced = !0, D = new n.Geometry(!0)) : (T = new n.Geometry(!0), D = new n.Geometry(!0)); - var I, z, P, B, F = {}, N = [Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINITY]; + var I, z, P, B, k = {}, N = [Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINITY]; for (I = 0, P = p.length; I < P; I++) { var $ = p[I]; if ($ && $.style) { ($.clickable || $.hoverable) && $.intersectionShape === void 0 && ($.intersectionShape = { sphere: [], cylinder: [], line: [], triangle: [] }), B = { line: void 0, cross: void 0, stick: void 0, sphere: void 0 }; for (z in B) - $.style[z] ? $.style[z].opacity ? B[z] = parseFloat($.style[z].opacity) : B[z] = 1 : B[z] = void 0, F[z] ? B[z] != null && F[z] != B[z] && (console.log("Warning: " + z + " opacity is ambiguous"), F[z] = 1) : F[z] = B[z]; + $.style[z] ? $.style[z].opacity ? B[z] = parseFloat($.style[z].opacity) : B[z] = 1 : B[z] = void 0, k[z] ? B[z] != null && k[z] != B[z] && (console.log("Warning: " + z + " opacity is ambiguous"), k[z] = 1) : k[z] = B[z]; L.call(this, $, T), this.drawAtomClickSphere($), this.drawAtomCross($, M), this.drawBondLines($, p, g), this.drawBondSticks($, p, D), typeof $.style.cartoon < "u" && !$.style.cartoon.hidden && ($.style.cartoon.color === "spectrum" && typeof $.resi == "number" && !$.hetflag && ($.resi < N[0] && (N[0] = $.resi), $.resi > N[1] && (N[1] = $.resi)), l.push($)); } } if (l.length > 0 && (0, _.drawCartoon)(a, l, N, this.defaultCartoonQuality), T && T.vertices > 0) { T.initTypedArrays(); - var k = null, G = null; - T.imposter ? k = new n.SphereImposterMaterial({ + var F = null, G = null; + T.imposter ? F = new n.SphereImposterMaterial({ ambient: 0, vertexColors: !0, reflectivity: 0 - }) : T.instanced ? (G = new n.Geometry(!0), h.GLDraw.drawSphere(G, { x: 0, y: 0, z: 0 }, 1, new y.Color(0.5, 0.5, 0.5)), G.initTypedArrays(), k = new n.InstancedMaterial({ + }) : T.instanced ? (G = new n.Geometry(!0), h.GLDraw.drawSphere(G, { x: 0, y: 0, z: 0 }, 1, new y.Color(0.5, 0.5, 0.5)), G.initTypedArrays(), F = new n.InstancedMaterial({ sphereMaterial: new n.MeshLambertMaterial({ ambient: 0, vertexColors: !0, reflectivity: 0 }), sphere: G - })) : k = new n.MeshLambertMaterial({ + })) : F = new n.MeshLambertMaterial({ ambient: 0, vertexColors: !0, reflectivity: 0 - }), F.sphere < 1 && F.sphere >= 0 && (k.transparent = !0, k.opacity = F.sphere), G = new n.Mesh(T, k), a.add(G); + }), k.sphere < 1 && k.sphere >= 0 && (F.transparent = !0, F.opacity = k.sphere), G = new n.Mesh(T, F), a.add(G); } if (D.vertices > 0) { var H = null, U = null, V = D.sphereGeometry; (!V || typeof V.vertices > "u" || V.vertices == 0) && (V = null), D.initTypedArrays(), V && V.initTypedArrays(); var Q = { ambient: 0, vertexColors: !0, reflectivity: 0 }; - D.imposter ? (H = new n.StickImposterMaterial(Q), U = new n.SphereImposterMaterial(Q)) : (H = new n.MeshLambertMaterial(Q), U = new n.MeshLambertMaterial(Q), H.wireframe && (D.setUpWireframe(), V && V.setUpWireframe())), F.stick < 1 && F.stick >= 0 && (H.transparent = !0, H.opacity = F.stick, U.transparent = !0, U.opacity = F.stick); + D.imposter ? (H = new n.StickImposterMaterial(Q), U = new n.SphereImposterMaterial(Q)) : (H = new n.MeshLambertMaterial(Q), U = new n.MeshLambertMaterial(Q), H.wireframe && (D.setUpWireframe(), V && V.setUpWireframe())), k.stick < 1 && k.stick >= 0 && (H.transparent = !0, H.opacity = k.stick, U.transparent = !0, U.opacity = k.stick); var ae = new n.Mesh(D, H); if (a.add(ae), V) { var oe = new n.Mesh(V, U); @@ -4393,7 +4393,7 @@ void main() { linewidth: q, vertexColors: !0 }); - F.line < 1 && F.line >= 0 && (me.transparent = !0, me.opacity = F.line), g[I].initTypedArrays(); + k.line < 1 && k.line >= 0 && (me.transparent = !0, me.opacity = k.line), g[I].initTypedArrays(); var ne = new n.Line(g[I], me, n.LineStyle.LinePieces); a.add(ne); } @@ -4404,7 +4404,7 @@ void main() { linewidth: q, vertexColors: !0 }); - F.cross < 1 && F.cross >= 0 && (fe.transparent = !0, fe.opacity = F.cross), M[I].initTypedArrays(); + k.cross < 1 && k.cross >= 0 && (fe.transparent = !0, fe.opacity = k.cross), M[I].initTypedArrays(); var Ce = new n.Line(M[I], fe, n.LineStyle.LinePieces); a.add(Ce); } @@ -4598,13 +4598,13 @@ void main() { continue; } for (var z = 0; z < this.atoms.length; z++) { - var P = (0, E.getAtomProperty)(this.atoms[z], "dx"), B = (0, E.getAtomProperty)(this.atoms[z], "dy"), F = (0, E.getAtomProperty)(this.atoms[z], "dz"), N = new u.Vector3(P, B, F), $ = new u.Vector3(this.atoms[z].x, this.atoms[z].y, this.atoms[z].z), k = T * v / p; - N.multiplyScalar(k), $.add(N); + var P = (0, E.getAtomProperty)(this.atoms[z], "dx"), B = (0, E.getAtomProperty)(this.atoms[z], "dy"), k = (0, E.getAtomProperty)(this.atoms[z], "dz"), N = new u.Vector3(P, B, k), $ = new u.Vector3(this.atoms[z].x, this.atoms[z].y, this.atoms[z].z), F = T * v / p; + N.multiplyScalar(F), $.add(N); var G = {}; for (var H in this.atoms[z]) G[H] = this.atoms[z][H]; if (G.x = $.x, G.y = $.y, G.z = $.z, D.push(G), l && g) { - var U = (0, E.extend)({}, g), V = new u.Vector3(P, B, F); + var U = (0, E.extend)({}, g), V = new u.Vector3(P, B, k); if (V.multiplyScalar(v), V.add($), U.start = $, U.end = V, U.frame = I, !U.color) { var Q = G.style.sphere; Q || (Q = G.style.stick), Q || (Q = G.style.line), U.color = (0, E.getColorFromStyle)(G, Q); @@ -4866,14 +4866,14 @@ void main() { var z = {}, P = [], B = []; for (let G = 0; G < a.length; G++) { let H = a[G]; - var F = H.chain, N = H.resi; - if (z[F] === void 0 && (z[F] = {}), H.hasOwnProperty("resi") && z[F][N] === void 0) { - for (z[F][N] = !0, B.push(H); B.length > 0; ) - if (H = B.pop(), F = H.chain, N = H.resi, P[H.index] === void 0) { + var k = H.chain, N = H.resi; + if (z[k] === void 0 && (z[k] = {}), H.hasOwnProperty("resi") && z[k][N] === void 0) { + for (z[k][N] = !0, B.push(H); B.length > 0; ) + if (H = B.pop(), k = H.chain, N = H.resi, P[H.index] === void 0) { P[H.index] = !0; for (var $ = 0; $ < H.bonds.length; $++) { - var k = this.atoms[H.bonds[$]]; - P[k.index] === void 0 && k.hasOwnProperty("resi") && k.chain == F && k.resi == N && (B.push(k), a.push(k)); + var F = this.atoms[H.bonds[$]]; + P[F.index] === void 0 && F.hasOwnProperty("resi") && F.chain == k && F.resi == N && (B.push(F), a.push(F)); } } } @@ -5187,8 +5187,8 @@ void main() { addResLabels(p, v, a, l = !1) { var g = [], M = function(T, D) { for (var I = T.selectedAtoms(p, I), z = {}, P = 0; P < I.length; P++) { - var B = I[P], F = B.chain, N = B.resn, $ = B.resi, k = N + "" + $; - z[F] || (z[F] = {}), z[F][k] || (z[F][k] = []), z[F][k].push(B); + var B = I[P], k = B.chain, N = B.resn, $ = B.resi, F = N + "" + $; + z[k] || (z[k] = {}), z[k][F] || (z[k][F] = []), z[k][F].push(B); } var G = (0, E.deepCopy)(a); for (let U in z) @@ -5509,20 +5509,20 @@ ATOM`, g); s.intersectionShape.cylinder.push(new f.Cylinder(z, D.clone(), a)), s.intersectionShape.sphere.push(new f.Sphere(z, a)); var P = []; P[0] = T.clone(), Math.abs(P[0].x) > 1e-4 ? P[0].y += 1 : P[0].x += 1, P[0].cross(T), P[0].normalize(), P[4] = P[0].clone(), P[4].crossVectors(P[0], T), P[4].normalize(), P[8] = P[0].clone().negate(), P[12] = P[4].clone().negate(), P[2] = P[0].clone().add(P[4]).normalize(), P[6] = P[4].clone().add(P[8]).normalize(), P[10] = P[8].clone().add(P[12]).normalize(), P[14] = P[12].clone().add(P[0]).normalize(), P[1] = P[0].clone().add(P[2]).normalize(), P[3] = P[2].clone().add(P[4]).normalize(), P[5] = P[4].clone().add(P[6]).normalize(), P[7] = P[6].clone().add(P[8]).normalize(), P[9] = P[8].clone().add(P[10]).normalize(), P[11] = P[10].clone().add(P[12]).normalize(), P[13] = P[12].clone().add(P[14]).normalize(), P[15] = P[14].clone().add(P[0]).normalize(); - var B = L.vertices, F = L.vertexArray, N = L.faceArray, $ = L.normalArray, k = L.lineArray, G, H, U; + var B = L.vertices, k = L.vertexArray, N = L.faceArray, $ = L.normalArray, F = L.lineArray, G, H, U; for (H = 0, U = P.length; H < U; ++H) { G = 3 * (B + 3 * H); var V = P[H].clone().multiplyScalar(a).add(p), Q = P[H].clone().multiplyScalar(a).add(D), ae = P[H].clone().multiplyScalar(a * l).add(D); - if (F[G] = V.x, F[G + 1] = V.y, F[G + 2] = V.z, F[G + 3] = Q.x, F[G + 4] = Q.y, F[G + 5] = Q.z, F[G + 6] = ae.x, F[G + 7] = ae.y, F[G + 8] = ae.z, H > 0) { - var oe = F[G - 3], q = F[G - 2], me = F[G - 1], ne = new u.Vector3(oe, q, me), fe = new u.Vector3(v.x, v.y, v.z), Ce = D.clone(), Me = new u.Vector3(ae.x, ae.y, ae.z); + if (k[G] = V.x, k[G + 1] = V.y, k[G + 2] = V.z, k[G + 3] = Q.x, k[G + 4] = Q.y, k[G + 5] = Q.z, k[G + 6] = ae.x, k[G + 7] = ae.y, k[G + 8] = ae.z, H > 0) { + var oe = k[G - 3], q = k[G - 2], me = k[G - 1], ne = new u.Vector3(oe, q, me), fe = new u.Vector3(v.x, v.y, v.z), Ce = D.clone(), Me = new u.Vector3(ae.x, ae.y, ae.z); s.intersectionShape.triangle.push(new f.Triangle(Me, fe, ne)), s.intersectionShape.triangle.push(new f.Triangle(ne.clone(), Ce, Me.clone())); } } - L.vertices += 48, G = L.vertices * 3, F[G] = p.x, F[G + 1] = p.y, F[G + 2] = p.z, F[G + 3] = D.x, F[G + 4] = D.y, F[G + 5] = D.z, F[G + 6] = v.x, F[G + 7] = v.y, F[G + 8] = v.z, L.vertices += 3; - var Te, se, pe, we, ke, Ue, Ne, Be, ue, ye, ge, Se, ze, He, We, Y, K, ee, de, ve = L.vertices - 3, Ie = L.vertices - 2, Re = L.vertices - 1, Z = ve * 3, ce = Ie * 3, Ae = Re * 3; + L.vertices += 48, G = L.vertices * 3, k[G] = p.x, k[G + 1] = p.y, k[G + 2] = p.z, k[G + 3] = D.x, k[G + 4] = D.y, k[G + 5] = D.z, k[G + 6] = v.x, k[G + 7] = v.y, k[G + 8] = v.z, L.vertices += 3; + var Te, se, pe, we, Fe, Ue, Ne, Be, ue, ye, ge, Se, ze, He, We, Y, K, ee, de, ve = L.vertices - 3, Ie = L.vertices - 2, Re = L.vertices - 1, Z = ve * 3, ce = Ie * 3, Ae = Re * 3; for (H = 0, U = P.length - 1; H < U; ++H) { - var Fe = B + 3 * H; - G = Fe * 3, se = L.faceidx, pe = L.lineidx, we = Fe, ye = we * 3, ke = Fe + 1, ge = ke * 3, Ue = Fe + 2, Se = Ue * 3, Ne = Fe + 4, ze = Ne * 3, Be = Fe + 5, He = Be * 3, ue = Fe + 3, We = ue * 3, Y = K = P[H], ee = de = P[H + 1], $[ye] = Y.x, $[ge] = K.x, $[We] = de.x, $[ye + 1] = Y.y, $[ge + 1] = K.y, $[We + 1] = de.y, $[ye + 2] = Y.z, $[ge + 2] = K.z, $[We + 2] = de.z, $[ge] = K.x, $[ze] = ee.x, $[We] = de.x, $[ge + 1] = K.y, $[ze + 1] = ee.y, $[We + 1] = de.y, $[ge + 2] = K.z, $[ze + 2] = ee.z, $[We + 2] = de.z, $[Se] = K.x, $[He] = ee.x, $[Se + 1] = K.y, $[He + 1] = ee.y, $[Se + 2] = K.z, $[He + 2] = ee.z, N[se] = we, N[se + 1] = ke, N[se + 2] = ue, N[se + 3] = ke, N[se + 4] = Ne, N[se + 5] = ue, N[se + 6] = we, N[se + 7] = ue, N[se + 8] = ve, N[se + 9] = Ue, N[se + 10] = Ie, N[se + 11] = Be, N[se + 12] = Ue, N[se + 13] = Re, N[se + 14] = Be, k[pe] = we, k[pe + 1] = ke, k[pe + 2] = we, k[pe + 3] = ue, k[pe + 4] = Ne, k[pe + 5] = ue, k[pe + 6] = we, k[pe + 7] = ue, k[pe + 8] = Ue, k[pe + 9] = ke, k[pe + 10] = Ue, k[pe + 11] = Be, k[pe + 12] = Ne, k[pe + 13] = Be, k[pe + 14] = Ue, k[pe + 15] = Re, k[pe + 16] = Ue, k[pe + 17] = Be, k[pe + 18] = Re, k[pe + 19] = Be, L.faceidx += 15, L.lineidx += 20; + var ke = B + 3 * H; + G = ke * 3, se = L.faceidx, pe = L.lineidx, we = ke, ye = we * 3, Fe = ke + 1, ge = Fe * 3, Ue = ke + 2, Se = Ue * 3, Ne = ke + 4, ze = Ne * 3, Be = ke + 5, He = Be * 3, ue = ke + 3, We = ue * 3, Y = K = P[H], ee = de = P[H + 1], $[ye] = Y.x, $[ge] = K.x, $[We] = de.x, $[ye + 1] = Y.y, $[ge + 1] = K.y, $[We + 1] = de.y, $[ye + 2] = Y.z, $[ge + 2] = K.z, $[We + 2] = de.z, $[ge] = K.x, $[ze] = ee.x, $[We] = de.x, $[ge + 1] = K.y, $[ze + 1] = ee.y, $[We + 1] = de.y, $[ge + 2] = K.z, $[ze + 2] = ee.z, $[We + 2] = de.z, $[Se] = K.x, $[He] = ee.x, $[Se + 1] = K.y, $[He + 1] = ee.y, $[Se + 2] = K.z, $[He + 2] = ee.z, N[se] = we, N[se + 1] = Fe, N[se + 2] = ue, N[se + 3] = Fe, N[se + 4] = Ne, N[se + 5] = ue, N[se + 6] = we, N[se + 7] = ue, N[se + 8] = ve, N[se + 9] = Ue, N[se + 10] = Ie, N[se + 11] = Be, N[se + 12] = Ue, N[se + 13] = Re, N[se + 14] = Be, F[pe] = we, F[pe + 1] = Fe, F[pe + 2] = we, F[pe + 3] = ue, F[pe + 4] = Ne, F[pe + 5] = ue, F[pe + 6] = we, F[pe + 7] = ue, F[pe + 8] = Ue, F[pe + 9] = Fe, F[pe + 10] = Ue, F[pe + 11] = Be, F[pe + 12] = Ne, F[pe + 13] = Be, F[pe + 14] = Ue, F[pe + 15] = Re, F[pe + 16] = Ue, F[pe + 17] = Be, F[pe + 18] = Re, F[pe + 19] = Be, L.faceidx += 15, L.lineidx += 20; } Te = [ B + 45, @@ -5531,7 +5531,7 @@ ATOM`, g); B, B + 47, B + 2 - ], se = L.faceidx, pe = L.lineidx, we = Te[0], ye = we * 3, ke = Te[1], ge = ke * 3, Ue = Te[4], Se = Ue * 3, Ne = Te[2], ze = Ne * 3, Be = Te[5], He = Be * 3, ue = Te[3], We = ue * 3, Y = K = P[15], ee = de = P[0], $[ye] = Y.x, $[ge] = K.x, $[We] = de.x, $[ye + 1] = Y.y, $[ge + 1] = K.y, $[We + 1] = de.y, $[ye + 2] = Y.z, $[ge + 2] = K.z, $[We + 2] = de.z, $[ge] = K.x, $[ze] = ee.x, $[We] = de.x, $[ge + 1] = K.y, $[ze + 1] = ee.y, $[We + 1] = de.y, $[ge + 2] = K.z, $[ze + 2] = ee.z, $[We + 2] = de.z, $[Se] = K.x, $[He] = ee.x, $[Se + 1] = K.y, $[He + 1] = ee.y, $[Se + 2] = K.z, $[He + 2] = ee.z, T.normalize(), I.normalize(), $[Z] = I.x, $[ce] = $[Ae] = T.x, $[Z + 1] = I.y, $[ce + 1] = $[Ae + 1] = T.y, $[Z + 2] = I.z, $[ce + 2] = $[Ae + 2] = T.z, N[se] = we, N[se + 1] = ke, N[se + 2] = ue, N[se + 3] = ke, N[se + 4] = Ne, N[se + 5] = ue, N[se + 6] = we, N[se + 7] = ue, N[se + 8] = ve, N[se + 9] = Ue, N[se + 10] = Ie, N[se + 11] = Be, N[se + 12] = Ue, N[se + 13] = Re, N[se + 14] = Be, k[pe] = we, k[pe + 1] = ke, k[pe + 2] = we, k[pe + 3] = ue, k[pe + 4] = Ne, k[pe + 5] = ue, k[pe + 6] = we, k[pe + 7] = ue, k[pe + 8] = Ue, k[pe + 9] = ke, k[pe + 10] = Ue, k[pe + 11] = Be, k[pe + 12] = Ne, k[pe + 13] = Be, k[pe + 14] = Ue, k[pe + 15] = Re, k[pe + 16] = Ue, k[pe + 17] = Be, k[pe + 18] = Re, k[pe + 19] = Be, L.faceidx += 15, L.lineidx += 20; + ], se = L.faceidx, pe = L.lineidx, we = Te[0], ye = we * 3, Fe = Te[1], ge = Fe * 3, Ue = Te[4], Se = Ue * 3, Ne = Te[2], ze = Ne * 3, Be = Te[5], He = Be * 3, ue = Te[3], We = ue * 3, Y = K = P[15], ee = de = P[0], $[ye] = Y.x, $[ge] = K.x, $[We] = de.x, $[ye + 1] = Y.y, $[ge + 1] = K.y, $[We + 1] = de.y, $[ye + 2] = Y.z, $[ge + 2] = K.z, $[We + 2] = de.z, $[ge] = K.x, $[ze] = ee.x, $[We] = de.x, $[ge + 1] = K.y, $[ze + 1] = ee.y, $[We + 1] = de.y, $[ge + 2] = K.z, $[ze + 2] = ee.z, $[We + 2] = de.z, $[Se] = K.x, $[He] = ee.x, $[Se + 1] = K.y, $[He + 1] = ee.y, $[Se + 2] = K.z, $[He + 2] = ee.z, T.normalize(), I.normalize(), $[Z] = I.x, $[ce] = $[Ae] = T.x, $[Z + 1] = I.y, $[ce + 1] = $[Ae + 1] = T.y, $[Z + 2] = I.z, $[ce + 2] = $[Ae + 2] = T.z, N[se] = we, N[se + 1] = Fe, N[se + 2] = ue, N[se + 3] = Fe, N[se + 4] = Ne, N[se + 5] = ue, N[se + 6] = we, N[se + 7] = ue, N[se + 8] = ve, N[se + 9] = Ue, N[se + 10] = Ie, N[se + 11] = Be, N[se + 12] = Ue, N[se + 13] = Re, N[se + 14] = Be, F[pe] = we, F[pe + 1] = Fe, F[pe + 2] = we, F[pe + 3] = ue, F[pe + 4] = Ne, F[pe + 5] = ue, F[pe + 6] = we, F[pe + 7] = ue, F[pe + 8] = Ue, F[pe + 9] = Fe, F[pe + 10] = Ue, F[pe + 11] = Be, F[pe + 12] = Ne, F[pe + 13] = Be, F[pe + 14] = Ue, F[pe + 15] = Re, F[pe + 16] = Ue, F[pe + 17] = Be, F[pe + 18] = Re, F[pe + 19] = Be, L.faceidx += 15, L.lineidx += 20; } // Update a bounding sphere's position and radius // from list of centroids and new points @@ -5558,9 +5558,9 @@ ATOM`, g); static addCustomGeo(s, o, w, p, v) { var a = o.addGeoGroup(), l = w.vertexArr, g = w.normalArr, M = w.faceArr; a.vertices = l.length, a.faceidx = M.length; - var L, T, D, I, z, P, B, F, N, $ = a.vertexArray, k = a.colorArray; - for (p.constructor !== Array && (F = p.r, N = p.g, I = p.b), P = 0, B = a.vertices; P < B; ++P) - L = P * 3, T = l[P], $[L] = T.x, $[L + 1] = T.y, $[L + 2] = T.z, p.constructor === Array && (z = p[P], F = z.r, N = z.g, I = z.b), k[L] = F, k[L + 1] = N, k[L + 2] = I; + var L, T, D, I, z, P, B, k, N, $ = a.vertexArray, F = a.colorArray; + for (p.constructor !== Array && (k = p.r, N = p.g, I = p.b), P = 0, B = a.vertices; P < B; ++P) + L = P * 3, T = l[P], $[L] = T.x, $[L + 1] = T.y, $[L + 2] = T.z, p.constructor === Array && (z = p[P], k = z.r, N = z.g, I = z.b), F[L] = k, F[L + 1] = N, F[L + 2] = I; if (v) for (P = 0, B = a.faceidx / 3; P < B; ++P) { L = P * 3, D = M[L], I = M[L + 1], z = M[L + 2]; @@ -5898,8 +5898,8 @@ ATOM`, g); var P = p >= 0 ? T[D] - p : p - T[D]; P > 0 && (z[D] |= b.ISDONE); } - var B = [], F = []; - h.MarchingCube.march(z, B, F, { + var B = [], k = []; + h.MarchingCube.march(z, B, k, { fulltable: !0, voxel: v, unitCube: s.unit, @@ -5908,8 +5908,8 @@ ATOM`, g); nX: l, nY: g, nZ: M - }), !v && a > 0 && h.MarchingCube.laplacianSmooth(a, B, F); - var N = [], $ = [], k = []; + }), !v && a > 0 && h.MarchingCube.laplacianSmooth(a, B, k); + var N = [], $ = [], F = []; if (o.selectedRegion && o.coords === void 0 && (o.coords = o.selectedRegion), o.coords !== void 0) { var G = o.coords[0].x, H = o.coords[0].y, U = o.coords[0].z, V = o.coords[0].x, Q = o.coords[0].y, ae = o.coords[0].z; for (let se = 0; se < o.coords.length; se++) @@ -5918,13 +5918,13 @@ ATOM`, g); o.radius !== void 0 && (oe = o.radius), o.selectedOffset !== void 0 && (oe = o.selectedOffset), o.seldist !== void 0 && (oe = o.seldist), V -= oe, G += oe, Q -= oe, H += oe, ae -= oe, U += oe; for (let se = 0; se < B.length; se++) B[se].x > V && B[se].x < G && B[se].y > Q && B[se].y < H && B[se].z > ae && B[se].z < U && b.inSelectedRegion(B[se], o.coords, oe) ? (N.push($.length), $.push(B[se])) : N.push(-1); - for (let se = 0; se + 2 < F.length; se += 3) - N[F[se]] !== -1 && N[F[se + 1]] !== -1 && N[F[se + 2]] !== -1 && (k.push(F[se] - (F[se] - N[F[se]])), k.push(F[se + 1] - (F[se + 1] - N[F[se + 1]])), k.push(F[se + 2] - (F[se + 2] - N[F[se + 2]]))); - B = $, F = k; + for (let se = 0; se + 2 < k.length; se += 3) + N[k[se]] !== -1 && N[k[se + 1]] !== -1 && N[k[se + 2]] !== -1 && (F.push(k[se] - (k[se] - N[k[se]])), F.push(k[se + 1] - (k[se + 1] - N[k[se + 1]])), F.push(k[se + 2] - (k[se + 2] - N[k[se + 2]]))); + B = $, k = F; } b.drawCustom(this, this.geo, { vertexArr: B, - faceArr: F, + faceArr: k, normalArr: [], clickable: o.clickable, hoverable: o.hoverable @@ -6324,9 +6324,9 @@ ATOM`, g); Array.isArray(a) || (a = [a], l = !0); let g = this.renderer.getXRatio(), M = this.renderer.getYRatio(), L = this.col, T = this.row, D = L * (this.WIDTH / g), I = (M - T - 1) * (this.HEIGHT / M), z = [], P = this.canvasOffset(); return a.forEach((B) => { - let F = new f.Vector3(B.x, B.y, B.z); - F.applyMatrix4(this.modelGroup.matrixWorld), this.projector.projectVector(F, this.camera); - let N = this.WIDTH / g * (F.x + 1) / 2 + P.left + D, $ = -(this.HEIGHT / M) * (F.y - 1) / 2 + P.top + I; + let k = new f.Vector3(B.x, B.y, B.z); + k.applyMatrix4(this.modelGroup.matrixWorld), this.projector.projectVector(k, this.camera); + let N = this.WIDTH / g * (k.x + 1) / 2 + P.left + D, $ = -(this.HEIGHT / M) * (k.y - 1) / 2 + P.top + I; z.push({ x: N, y: $ }); }), l && (z = z[0]), z; } @@ -6504,10 +6504,10 @@ ATOM`, g); let H = (0, S.decode)(z[G]); P.push((0, S.toRGBA8)(H)[0]); } - let B = l.getCanvas().width, F = l.getCanvas().height, N = (0, S.encode)(P, B, F, 0, D), $ = new Blob([N], { type: "image/png" }), k = new FileReader(); - k.onload = function(G) { + let B = l.getCanvas().width, k = l.getCanvas().height, N = (0, S.encode)(P, B, k, 0, D), $ = new Blob([N], { type: "image/png" }), F = new FileReader(); + F.onload = function(G) { g(G.target.result); - }, k.readAsDataURL($); + }, F.readAsDataURL($); })); }; }); @@ -6557,7 +6557,7 @@ ATOM`, g); } else a.targetTouches && a.targetTouches.length == 3 && (I = 1); z *= M, P *= L; - var F = Math.hypot(z, P), N; + var k = Math.hypot(z, P), N; if (I == 3 || this.mouseButton == 3 && a.ctrlKey) this.slabNear = this.cslabNear + z * 100, this.slabFar = this.cslabFar - P * 100; else if (I == 2 || this.mouseButton == 3 || a.shiftKey) @@ -6565,9 +6565,9 @@ ATOM`, g); else if (I == 1 || this.mouseButton == 2 || a.ctrlKey) { var $ = this.screenOffsetToModel(M * (l - this.mouseStartX), L * (g - this.mouseStartY)); this.modelGroup.position.addVectors(this.currentModelPos, $); - } else if ((I === 0 || this.mouseButton == 1) && F !== 0) { - var k = Math.sin(F * Math.PI) / F; - this.dq.x = Math.cos(F * Math.PI), this.dq.y = 0, this.dq.z = k * z, this.dq.w = -k * P, this.rotationGroup.quaternion.set(1, 0, 0, 0), this.rotationGroup.quaternion.multiply(this.dq), this.rotationGroup.quaternion.multiply(this.cq); + } else if ((I === 0 || this.mouseButton == 1) && k !== 0) { + var F = Math.sin(k * Math.PI) / k; + this.dq.x = Math.cos(k * Math.PI), this.dq.y = 0, this.dq.z = F * z, this.dq.w = -F * P, this.rotationGroup.quaternion.set(1, 0, 0, 0), this.rotationGroup.quaternion.multiply(this.dq), this.rotationGroup.quaternion.multiply(this.cq); } this.show(); } @@ -6760,28 +6760,28 @@ ATOM`, g); cam: this.lookingAt.clone() }; if (l) { - let F = new Array(I); + let k = new Array(I); for (let G = 0; G < I; G++) { let H = (G + 1) / I, U = { mpos: z.mpos, rz: z.rz, rot: z.rot }; - U.mpos = g.clone().sub(z.mpos).multiplyScalar(H).add(z.mpos), U.rz = z.rz + H * (M - z.rz), U.rot = s.slerp(z.rot, L, H), U.cam = T.clone().sub(z.cam).multiplyScalar(H).add(z.cam), F[G] = U; + U.mpos = g.clone().sub(z.mpos).multiplyScalar(H).add(z.mpos), U.rz = z.rz + H * (M - z.rz), U.rot = s.slerp(z.rot, L, H), U.cam = T.clone().sub(z.cam).multiplyScalar(H).add(z.cam), k[G] = U; } - let N = 0, $ = this, k = function() { - var G = F[N]; - N += 1, $.modelGroup.position = G.mpos, $.rotationGroup.position.z = G.rz, $.rotationGroup.quaternion = G.rot, $.camera.lookAt(G.cam), N < F.length ? setTimeout(k, D) : $.decAnim(), $.show(); + let N = 0, $ = this, F = function() { + var G = k[N]; + N += 1, $.modelGroup.position = G.mpos, $.rotationGroup.position.z = G.rz, $.rotationGroup.quaternion = G.rot, $.camera.lookAt(G.cam), N < k.length ? setTimeout(F, D) : $.decAnim(), $.show(); }; - setTimeout(k, D); + setTimeout(F, D); } else { var P = {}; - let F = 1 / I; - if (g && (P.mpos = g.clone().sub(z.mpos).multiplyScalar(F)), typeof M < "u" && M != null && (P.rz = F * (M - z.rz)), L) { - var B = s.slerp(z.rot, L, F); + let k = 1 / I; + if (g && (P.mpos = g.clone().sub(z.mpos).multiplyScalar(k)), typeof M < "u" && M != null && (P.rz = k * (M - z.rz)), L) { + var B = s.slerp(z.rot, L, k); P.rot = z.rot.clone().inverse().multiply(B); } - T && (P.cam = T.clone().sub(z.cam).multiplyScalar(F)); - let N = 0, $ = this, k = function() { - N += 1, P.mpos && $.modelGroup.position.add(P.mpos), P.rz && ($.rotationGroup.position.z += P.rz), P.rot && $.rotationGroup.quaternion.multiply(P.rot), P.cam && ($.lookingAt.add(P.cam), $.camera.lookAt($.lookingAt)), N < I ? setTimeout(k, D) : $.decAnim(), $.show(); + T && (P.cam = T.clone().sub(z.cam).multiplyScalar(k)); + let N = 0, $ = this, F = function() { + N += 1, P.mpos && $.modelGroup.position.add(P.mpos), P.rz && ($.rotationGroup.position.z += P.rz), P.rot && $.rotationGroup.quaternion.multiply(P.rot), P.cam && ($.lookingAt.add(P.cam), $.camera.lookAt($.lookingAt)), N < I ? setTimeout(F, D) : $.decAnim(), $.show(); }; - setTimeout(k, D); + setTimeout(F, D); } } /** @@ -6813,8 +6813,8 @@ ATOM`, g); L.applyQuaternion(this.rotationGroup.quaternion), l = { x: L.x, y: L.y, z: L.z }; } var T = function(P) { - var B = Math.sin(P / 2), F = Math.cos(P / 2), N = 0, $ = 0, k = 0; - return N = l.x * B, $ = l.y * B, k = l.z * B, new f.Quaternion(N, $, k, F).normalize(); + var B = Math.sin(P / 2), k = Math.cos(P / 2), N = 0, $ = 0, F = 0; + return N = l.x * B, $ = l.y * B, F = l.z * B, new f.Quaternion(N, $, F, k).normalize(); }, D = Math.PI * a / 180, I = T(D); if (g) { var z = new f.Quaternion().copy(this.rotationGroup.quaternion).multiply(I); @@ -7100,14 +7100,14 @@ ATOM`, g); V > 0 ? (T.push(new f.Vector3(U.x + V, U.y, U.z)), T.push(new f.Vector3(U.x - V, U.y, U.z)), T.push(new f.Vector3(U.x, U.y + V, U.z)), T.push(new f.Vector3(U.x, U.y - V, U.z)), T.push(new f.Vector3(U.x, U.y, U.z + V)), T.push(new f.Vector3(U.x, U.y, U.z - V))) : T.push(U); } }), D = (0, y.getExtent)(T), M = T, L = D) : (M = this.getAtomsFromSel({}), L = (0, y.getExtent)(M)); - var I = new f.Vector3(D[2][0], D[2][1], D[2][2]), z = L[1][0] - L[0][0], P = L[1][1] - L[0][1], B = L[1][2] - L[0][2], F = Math.hypot(z, P, B); - F < 5 && (F = 5), this.slabNear = -F / 1.9, this.slabFar = F / 2, z = D[1][0] - D[0][0], P = D[1][1] - D[0][1], B = D[1][2] - D[0][2], F = Math.hypot(z, P, B), F < 5 && (F = 5); + var I = new f.Vector3(D[2][0], D[2][1], D[2][2]), z = L[1][0] - L[0][0], P = L[1][1] - L[0][1], B = L[1][2] - L[0][2], k = Math.hypot(z, P, B); + k < 5 && (k = 5), this.slabNear = -k / 1.9, this.slabFar = k / 2, z = D[1][0] - D[0][0], P = D[1][1] - D[0][1], B = D[1][2] - D[0][2], k = Math.hypot(z, P, B), k < 5 && (k = 5); for (var N = 25, $ = 0; $ < T.length; $++) if (T[$]) { - var k = I.distanceToSquared(T[$]); - k > N && (N = k); + var F = I.distanceToSquared(T[$]); + F > N && (N = F); } - F = Math.sqrt(N) * 2; + k = Math.sqrt(N) * 2; var G = I.clone().multiplyScalar(-1); return l > 0 ? this.animateMotion(l, g, G, this.rotationGroup.position.z, this.rotationGroup.quaternion, this.lookingAt) : (this.modelGroup.position = G, this.show()), this; } @@ -7163,12 +7163,12 @@ ATOM`, g); } var D = new f.Vector3(L[2][0], L[2][1], L[2][2]), I = T[1][0] - T[0][0], z = T[1][1] - T[0][1], P = T[1][2] - T[0][2], B = Math.hypot(I, z, P); B < 5 && (B = 5), this.slabNear = -B / 1.9, this.slabFar = B / 2, Object.keys(a).length === 0 && (this.slabNear = Math.min(-B * 2, -50), this.slabFar = Math.max(B * 2, 50)); - var F = this.config.minimumZoomToDistance || 5; - I = L[1][0] - L[0][0], z = L[1][1] - L[0][1], P = L[1][2] - L[0][2], B = Math.hypot(I, z, P), B < F && (B = F); - for (var N = F * F, $ = 0; $ < M.length; $++) + var k = this.config.minimumZoomToDistance || 5; + I = L[1][0] - L[0][0], z = L[1][1] - L[0][1], P = L[1][2] - L[0][2], B = Math.hypot(I, z, P), B < k && (B = k); + for (var N = k * k, $ = 0; $ < M.length; $++) if (M[$]) { - var k = D.distanceToSquared(M[$]); - k > N && (N = k); + var F = D.distanceToSquared(M[$]); + F > N && (N = F); } B = Math.sqrt(N) * 2; var G = D.clone().multiplyScalar(-1), H = -(B * 0.5 / Math.tan(Math.PI / 180 * this.camera.fov / 2) - this.CAMERA_Z); @@ -7572,8 +7572,8 @@ ATOM`, g); else { var L = g.a, T = g.b, D = g.c, I = g.alpha, z = g.beta, P = g.gamma; I = I * Math.PI / 180, z = z * Math.PI / 180, P = P * Math.PI / 180; - var B, F, N; - B = Math.cos(z), F = (Math.cos(I) - Math.cos(z) * Math.cos(P)) / Math.sin(P), N = Math.sqrt(Math.max(0, 1 - B * B - F * F)), M = new f.Matrix3(L, T * Math.cos(P), D * B, 0, T * Math.sin(P), D * F, 0, 0, D * N); + var B, k, N; + B = Math.cos(z), k = (Math.cos(I) - Math.cos(z) * Math.cos(P)) / Math.sin(P), N = Math.sqrt(Math.max(0, 1 - B * B - k * k)), M = new f.Matrix3(L, T * Math.cos(P), D * B, 0, T * Math.sin(P), D * k, 0, 0, D * N); } var $ = [ new f.Vector3(0, 0, 0), @@ -7593,8 +7593,8 @@ ATOM`, g); $[G] = $[G].applyMatrix3(M); if (l.box && !l.box.hidden) { l.box.wireframe = !0; - var k = new c.GLShape(l.box); - k.shapePosition = this.shapes.length, k.addLine({ start: $[0], end: $[1] }), k.addLine({ start: $[0], end: $[2] }), k.addLine({ start: $[1], end: $[4] }), k.addLine({ start: $[2], end: $[4] }), k.addLine({ start: $[0], end: $[3] }), k.addLine({ start: $[3], end: $[5] }), k.addLine({ start: $[2], end: $[5] }), k.addLine({ start: $[1], end: $[6] }), k.addLine({ start: $[4], end: $[7] }), k.addLine({ start: $[6], end: $[7] }), k.addLine({ start: $[3], end: $[6] }), k.addLine({ start: $[5], end: $[7] }), this.shapes.push(k), a.unitCellObjects.shapes.push(k), k.finalize(); + var F = new c.GLShape(l.box); + F.shapePosition = this.shapes.length, F.addLine({ start: $[0], end: $[1] }), F.addLine({ start: $[0], end: $[2] }), F.addLine({ start: $[1], end: $[4] }), F.addLine({ start: $[2], end: $[4] }), F.addLine({ start: $[0], end: $[3] }), F.addLine({ start: $[3], end: $[5] }), F.addLine({ start: $[2], end: $[5] }), F.addLine({ start: $[1], end: $[6] }), F.addLine({ start: $[4], end: $[7] }), F.addLine({ start: $[6], end: $[7] }), F.addLine({ start: $[3], end: $[6] }), F.addLine({ start: $[5], end: $[7] }), this.shapes.push(F), a.unitCellObjects.shapes.push(F), F.finalize(); } if (!l.astyle.hidden) { l.astyle.start = $[0], l.astyle.end = $[1]; @@ -7682,16 +7682,16 @@ ATOM`, g); }; for (let P = 0; P < a; P++) for (let B = 0; B < l; B++) - for (let F = 0; F < g; F++) { - if (P == 0 && B == 0 && F == 0) + for (let k = 0; k < g; k++) { + if (P == 0 && B == 0 && k == 0) continue; - let N = new f.Vector3(z(P), z(B), z(F)); + let N = new f.Vector3(z(P), z(B), z(k)); N.applyMatrix3(I); let $ = []; - for (let k = 0; k < D.length; k++) { + for (let F = 0; F < D.length; F++) { let G = {}; - for (let H in D[k]) - G[H] = D[k][H]; + for (let H in D[F]) + G[H] = D[F][H]; G.x += N.x, G.y += N.y, G.z += N.z, $.push(G); } M.addAtoms($); @@ -7706,13 +7706,13 @@ ATOM`, g); a.start ? g = new f.Vector3(a.start.x || 0, a.start.y || 0, a.start.z || 0) : g = new f.Vector3(0, 0, 0); var M; a.end ? M = new f.Vector3(a.end.x, a.end.y || 0, a.end.z || 0) : M = new f.Vector3(0, 0, 0); - var L = new f.Vector3(), T = new f.Vector3(), D = new f.Vector3(), I, z, P, B = g.clone(), F = 0; - for (L.subVectors(M, g), I = L.length(), L.normalize(), T = L.clone(), D = L.clone(), T.multiplyScalar(a.dashLength), D.multiplyScalar(a.gapLength), z = T.length(), P = D.length(); F < I; ) { - if (F + z > I) { + var L = new f.Vector3(), T = new f.Vector3(), D = new f.Vector3(), I, z, P, B = g.clone(), k = 0; + for (L.subVectors(M, g), I = L.length(), L.normalize(), T = L.clone(), D = L.clone(), T.multiplyScalar(a.dashLength), D.multiplyScalar(a.gapLength), z = T.length(), P = D.length(); k < I; ) { + if (k + z > I) { a.start = g, a.end = M, l.addLine(a); break; } - B.addVectors(g, T), a.start = g, a.end = B, l.addLine(a), g = B.clone(), F += z, B.addVectors(g, D), g = B.clone(), F += P; + B.addVectors(g, T), a.start = g, a.end = B, l.addLine(a), g = B.clone(), k += z, B.addVectors(g, D), g = B.clone(), k += P; } return l.finalize(), l; } @@ -7884,23 +7884,23 @@ ATOM`, g); a.startFrame && (D = a.startFrame % L); var I = 1; a.step && (I = a.step, M /= I); - var z = 0, P = L * M, B = /* @__PURE__ */ new Date(), F, N, $ = function(k) { - B = /* @__PURE__ */ new Date(), k == "forward" ? T.setFrame(D).then(function() { - D = (D + I) % L, F(); - }) : k == "backward" ? T.setFrame(L - 1 - D).then(function() { - D = (D + I) % L, F(); + var z = 0, P = L * M, B = /* @__PURE__ */ new Date(), k, N, $ = function(F) { + B = /* @__PURE__ */ new Date(), F == "forward" ? T.setFrame(D).then(function() { + D = (D + I) % L, k(); + }) : F == "backward" ? T.setFrame(L - 1 - D).then(function() { + D = (D + I) % L, k(); }) : T.setFrame(D).then(function() { - D += I, I *= D % (L - 1) == 0 ? -1 : 1, F(); + D += I, I *= D % (L - 1) == 0 ? -1 : 1, k(); }); }; - return F = function() { + return k = function() { if (T.render(), !T.getCanvas().isConnected) T.stopAnimate(); else if (++z == P || !T.isAnimated()) N.cancel(), T.animationTimers.delete(N), T.decAnim(); else { - var k = l - ((/* @__PURE__ */ new Date()).getTime() - B.getTime()); - k = k > 0 ? k : 0, T.animationTimers.delete(N), N = new y.PausableTimer($, k, g), T.animationTimers.add(N); + var F = l - ((/* @__PURE__ */ new Date()).getTime() - B.getTime()); + F = F > 0 ? F : 0, T.animationTimers.delete(N), N = new y.PausableTimer($, F, g), T.animationTimers.add(N); } }, N = new y.PausableTimer($, 0, g), this.animationTimers.add(N), this; } @@ -8218,34 +8218,34 @@ ATOM`, g); */ carveUpExtent(a, l, g) { let M = [], L = {}; - for (let B = 0, F = l.length; B < F; B++) + for (let B = 0, k = l.length; B < k; B++) L[l[B].index] = B; let T = function(B) { - let F = []; + let k = []; for (let N = 0, $ = B.length; N < $; N++) - B[N].index in L && F.push(L[B[N].index]); - return F; + B[N].index in L && k.push(L[B[N].index]); + return k; }, D = function(B) { - let F = []; - return F[0] = [B[0][0], B[0][1], B[0][2]], F[1] = [B[1][0], B[1][1], B[1][2]], F; + let k = []; + return k[0] = [B[0][0], B[0][1], B[0][2]], k[1] = [B[1][0], B[1][1], B[1][2]], k; }, I = function(B) { if (s.volume(B) < s.maxVolume) return [B]; - var F = B[1][0] - B[0][0], N = B[1][1] - B[0][1], $ = B[1][2] - B[0][2], k; - F > N && F > $ ? k = 0 : N > F && N > $ ? k = 1 : k = 2; - var G = D(B), H = D(B), U = (B[1][k] - B[0][k]) / 2 + B[0][k]; - G[1][k] = U, H[0][k] = U; + var k = B[1][0] - B[0][0], N = B[1][1] - B[0][1], $ = B[1][2] - B[0][2], F; + k > N && k > $ ? F = 0 : N > k && N > $ ? F = 1 : F = 2; + var G = D(B), H = D(B), U = (B[1][F] - B[0][F]) / 2 + B[0][F]; + G[1][F] = U, H[0][F] = U; var V = I(G), Q = I(H); return V.concat(Q); }, z = I(a), P = 6; - for (let B = 0, F = z.length; B < F; B++) { + for (let B = 0, k = z.length; B < k; B++) { let N = D(z[B]); N[0][0] -= P, N[0][1] -= P, N[0][2] -= P, N[1][0] += P, N[1][1] += P, N[1][2] += P; - let $ = s.getAtomsWithin(l, N), k = s.getAtomsWithin(g, z[B]); + let $ = s.getAtomsWithin(l, N), F = s.getAtomsWithin(g, z[B]); M.push({ extent: z[B], atoms: T($), - toshow: T(k) + toshow: T(F) }); } return M; @@ -8274,9 +8274,9 @@ ATOM`, g); } var P = L.colorArray; if (g.voldata && g.volscheme) { - var B = g.volscheme, F = g.voldata, N = B.range() || [-1, 1]; + var B = g.volscheme, k = g.voldata, N = B.range() || [-1, 1]; for (let Me = 0, Te = z.length; Me < Te; Me++) { - let se = F.getVal(z[Me].x, z[Me].y, z[Me].z), pe = u.CC.color(B.valueToHex(se, N)), we = Me * 3; + let se = k.getVal(z[Me].x, z[Me].y, z[Me].z), pe = u.CC.color(B.valueToHex(se, N)), we = Me * 3; P[we] = pe.r, P[we + 1] = pe.g, P[we + 2] = pe.b; } } else if (T.length > 0) @@ -8286,10 +8286,10 @@ ATOM`, g); } var $ = l.faces; L.faceidx = $.length, M.initTypedArrays(); - var k = L.vertexArray, G = L.normalArray, H, U, V, Q; + var F = L.vertexArray, G = L.normalArray, H, U, V, Q; for (let Me = 0, Te = $.length; Me < Te; Me += 3) { var ae = $[Me], oe = $[Me + 1], q = $[Me + 2], me = ae * 3, ne = oe * 3, fe = q * 3; - H = new f.Vector3(k[me], k[me + 1], k[me + 2]), U = new f.Vector3(k[ne], k[ne + 1], k[ne + 2]), V = new f.Vector3(k[fe], k[fe + 1], k[fe + 2]), V.subVectors(V, U), H.subVectors(H, U), V.cross(H), Q = V, Q.normalize(), G[me] += Q.x, G[ne] += Q.x, G[fe] += Q.x, G[me + 1] += Q.y, G[ne + 1] += Q.y, G[fe + 1] += Q.y, G[me + 2] += Q.z, G[ne + 2] += Q.z, G[fe + 2] += Q.z; + H = new f.Vector3(F[me], F[me + 1], F[me + 2]), U = new f.Vector3(F[ne], F[ne + 1], F[ne + 2]), V = new f.Vector3(F[fe], F[fe + 1], F[fe + 2]), V.subVectors(V, U), H.subVectors(H, U), V.cross(H), Q = V, Q.normalize(), G[me] += Q.x, G[ne] += Q.x, G[fe] += Q.x, G[me + 1] += Q.y, G[ne + 1] += Q.y, G[fe + 1] += Q.y, G[me + 2] += Q.z, G[ne + 2] += Q.z, G[fe + 2] += Q.z; } L.faceArray = new Uint16Array($); var Ce = new n.Mesh(M, g); @@ -8369,19 +8369,19 @@ ATOM`, g); addSurface(a, l = {}, g = {}, M, L, T) { let D = this.nextSurfID(), I = null, z = this, P = b.SurfaceType.VDW; typeof a == "string" ? s.surfaceTypeMap[a.toUpperCase()] !== void 0 ? P = s.surfaceTypeMap[a] : console.log("Surface type : " + a + " is not recognized") : typeof a == "number" && (P = a); - var B = null, F = null, N = s.shallowCopy(this.getAtomsFromSel(g)); + var B = null, k = null, N = s.shallowCopy(this.getAtomsFromSel(g)); M ? B = s.shallowCopy(this.getAtomsFromSel(M)) : B = N, (0, y.adjustVolumeStyle)(l); - var $ = !1, k; - for (k = 0; k < this.models.length; k++) - if (this.models[k]) { - var G = this.models[k].getSymmetries(); + var $ = !1, F; + for (F = 0; F < this.models.length; F++) + if (this.models[F]) { + var G = this.models[F].getSymmetries(); if (G.length > 1 || G.length == 1 && !G[0].isIdentity()) { $ = !0; break; } } var H = function(me, ne, fe) { - L ? F = s.shallowCopy(z.getAtomsFromSel(L)) : F = fe; + L ? k = s.shallowCopy(z.getAtomsFromSel(L)) : k = fe; var Ce, Me = (0, y.getExtent)(fe, !0); if (l.map && l.map.prop) { var Te = l.map.prop; @@ -8391,8 +8391,8 @@ ATOM`, g); for (let Se = 0, ze = ne.length; Se < ze; Se++) Ce = ne[Se], Ce.surfaceColor = (0, y.getColorFromStyle)(Ce, l); var se = s.volume(Me), pe = z.carveUpExtent(Me, ne, fe); - if (F && F.length && F.length > 0) { - var we = (0, y.getExtent)(F, !0), ke = function(Se, ze) { + if (k && k.length && k.length > 0) { + var we = (0, y.getExtent)(k, !0), Fe = function(Se, ze) { var He = function(K, ee) { var de = K.extent, ve = de[1][0] - de[0][0], Ie = de[1][1] - de[0][1], Re = de[1][2] - de[0][2], Z = ve - ee[2][0]; Z *= Z; @@ -8403,7 +8403,7 @@ ATOM`, g); }, We = He(Se, we), Y = He(ze, we); return We - Y; }; - pe.sort(ke); + pe.sort(Fe); } var Ue = []; for (let Se = 0, ze = ne.length; Se < ze; Se++) @@ -8483,22 +8483,22 @@ ATOM`, g); var V = null; if ($) { var Q = {}, ae = {}; - for (k = 0; k < this.models.length; k++) - Q[k] = [], ae[k] = []; - for (k = 0; k < B.length; k++) - Q[B[k].model].push(B[k]); - for (k = 0; k < N.length; k++) - ae[N[k].model].push(N[k]); + for (F = 0; F < this.models.length; F++) + Q[F] = [], ae[F] = []; + for (F = 0; F < B.length; F++) + Q[B[F].model].push(B[F]); + for (F = 0; F < N.length; F++) + ae[N[F].model].push(N[F]); var oe = []; - for (k = 0; k < this.models.length; k++) - ae[k].length > 0 && (U.push({ + for (F = 0; F < this.models.length; F++) + ae[F].length > 0 && (U.push({ geo: new n.Geometry(!0), mat: I, done: !1, finished: !1, - symmetries: this.models[k].getSymmetries() + symmetries: this.models[F].getSymmetries() // also webgl initialized - }), oe.push(H(U[U.length - 1], Q[k], ae[k]))); + }), oe.push(H(U[U.length - 1], Q[F], ae[F]))); V = Promise.all(oe); } else U.push({ @@ -8541,8 +8541,8 @@ ATOM`, g); }); } else if (L.voldata && L.volscheme) { const T = L.volscheme, D = L.voldata, I = u.CC, z = T.range() || [-1, 1]; - g[M].geo.setColors(function(P, B, F) { - let N = D.getVal(P, B, F); + g[M].geo.setColors(function(P, B, k) { + let N = D.getVal(P, B, k); return I.color(T.valueToHex(N, z)); }); } @@ -8986,15 +8986,15 @@ ATOM`, g); A || (p = 0); var I = D + 2.5 * p + 2 * w, z = s * 1.25 + 2 * p + 2 * w; if (C.backgroundImage) { - var P = C.backgroundImage, B = C.backgroundWidth ? C.backgroundWidth : P.width, F = C.backgroundHeight ? C.backgroundHeight : P.height; - B > I && (I = B), F > z && (z = F); + var P = C.backgroundImage, B = C.backgroundWidth ? C.backgroundWidth : P.width, k = C.backgroundHeight ? C.backgroundHeight : P.height; + B > I && (I = B), k > z && (z = k); } if (this.canvas.width = I, this.canvas.height = z, this.context.clearRect(0, 0, this.canvas.width, this.canvas.height), L = "", C.bold && (L = "bold "), this.context.font = L + s + "px " + S, this.context.fillStyle = "rgba(" + v.r + "," + v.g + "," + v.b + "," + v.a + ")", this.context.strokeStyle = "rgba(" + a.r + "," + a.g + "," + a.b + "," + a.a + ")", C.backgroundGradient) { - let $ = this.context.createLinearGradient(0, z / 2, I, z / 2), k = f.Gradient.getGradient(C.backgroundGradient), G = k.range(), H = -1, U = 1; + let $ = this.context.createLinearGradient(0, z / 2, I, z / 2), F = f.Gradient.getGradient(C.backgroundGradient), G = F.range(), H = -1, U = 1; G && (H = G[0], U = G[1]); let V = U - H; for (let Q = 0; Q < 1.01; Q += 0.1) { - let ae = _(k.valueToHex(H + V * Q)), oe = "rgba(" + ae.r + "," + ae.g + "," + ae.b + "," + ae.a + ")"; + let ae = _(F.valueToHex(H + V * Q)), oe = "rgba(" + ae.r + "," + ae.g + "," + ae.b + "," + ae.a + ")"; $.addColorStop(Q, oe); } this.context.fillStyle = $; @@ -10111,31 +10111,31 @@ ATOM`, g); let T = new Int32Array(a * l * g), D, I; for (D = 0, I = T.length; D < I; ++D) T[D] = -1; - let z = function(N, $, k, G, H, U) { + let z = function(N, $, F, G, H, U) { let V = { x: 0, y: 0, z: 0 }, Q = !!(G & 1 << H), ae = !!(G & 1 << U), oe = H; - if (!Q && ae && (oe = U), oe & 1 && k++, oe & 2 && $++, oe & 4 && N++, v) { - let me = new n.Vector3(N, $, k); + if (!Q && ae && (oe = U), oe & 1 && F++, oe & 2 && $++, oe & 4 && N++, v) { + let me = new n.Vector3(N, $, F); me = me.applyMatrix4(v), V = { x: me.x, y: me.y, z: me.z }; } else - V.x = w.x + L.x * N, V.y = w.y + L.y * $, V.z = w.z + L.z * k; - let q = (l * N + $) * g + k; + V.x = w.x + L.x * N, V.y = w.y + L.y * $, V.z = w.z + L.z * F; + let q = (l * N + $) * g + F; return p ? (A.push(V), A.length - 1) : (T[q] < 0 && (T[q] = A.length, A.push(V)), T[q]); - }, P = new Int32Array(12), B = o ? this.edgeTable2 : this.edgeTable, F = o ? this.triTable2 : this.triTable; + }, P = new Int32Array(12), B = o ? this.edgeTable2 : this.edgeTable, k = o ? this.triTable2 : this.triTable; for (D = 0; D < a - 1; ++D) for (let N = 0; N < l - 1; ++N) for (let $ = 0; $ < g - 1; ++$) { - let k = 0; + let F = 0; for (let U = 0; U < 8; ++U) { let V = (l * (D + ((U & 4) >> 2)) + N + ((U & 2) >> 1)) * g + $ + (U & 1), Q = !!(b[V] & this.ISDONE); - k |= Q << U; + F |= Q << U; } - if (k === 0 || k === 255) + if (F === 0 || F === 255) continue; - let G = B[k]; + let G = B[F]; if (G === 0) continue; - let H = F[k]; - G & 1 && (P[0] = z(D, N, $, k, 0, 1)), G & 2 && (P[1] = z(D, N, $, k, 1, 3)), G & 4 && (P[2] = z(D, N, $, k, 3, 2)), G & 8 && (P[3] = z(D, N, $, k, 2, 0)), G & 16 && (P[4] = z(D, N, $, k, 4, 5)), G & 32 && (P[5] = z(D, N, $, k, 5, 7)), G & 64 && (P[6] = z(D, N, $, k, 7, 6)), G & 128 && (P[7] = z(D, N, $, k, 6, 4)), G & 256 && (P[8] = z(D, N, $, k, 0, 4)), G & 512 && (P[9] = z(D, N, $, k, 1, 5)), G & 1024 && (P[10] = z(D, N, $, k, 3, 7)), G & 2048 && (P[11] = z(D, N, $, k, 2, 6)); + let H = k[F]; + G & 1 && (P[0] = z(D, N, $, F, 0, 1)), G & 2 && (P[1] = z(D, N, $, F, 1, 3)), G & 4 && (P[2] = z(D, N, $, F, 3, 2)), G & 8 && (P[3] = z(D, N, $, F, 2, 0)), G & 16 && (P[4] = z(D, N, $, F, 4, 5)), G & 32 && (P[5] = z(D, N, $, F, 5, 7)), G & 64 && (P[6] = z(D, N, $, F, 7, 6)), G & 128 && (P[7] = z(D, N, $, F, 6, 4)), G & 256 && (P[8] = z(D, N, $, F, 0, 4)), G & 512 && (P[9] = z(D, N, $, F, 1, 5)), G & 1024 && (P[10] = z(D, N, $, F, 3, 7)), G & 2048 && (P[11] = z(D, N, $, F, 2, 6)); for (let U = 0; U < H.length; U += 3) { let V = P[H[U]], Q = P[H[U + 1]], ae = P[H[U + 2]]; p && U >= 3 && (A.push(A[V]), V = A.length - 1, A.push(A[Q]), Q = A.length - 1, A.push(A[ae]), ae = A.length - 1), S.push(V), S.push(Q), S.push(ae); @@ -10344,16 +10344,16 @@ ATOM`, g); if (M !== 0 && L !== 0 && T !== 0) { let D = M * a, I = T * g; for (let z = 0; z <= this.depty[w][p]; z++) { - let P = z * L, B = S + D, F = s + P, N = o + I; - if (B < 0 || F < 0 || N < 0 || B >= this.pLength || F >= this.pWidth || N >= this.pHeight) + let P = z * L, B = S + D, k = s + P, N = o + I; + if (B < 0 || k < 0 || N < 0 || B >= this.pLength || k >= this.pWidth || N >= this.pHeight) continue; - let $ = B * v + F * this.pHeight + N; + let $ = B * v + k * this.pHeight + N; if (!(this.vpBits[$] & this.INOUT)) this.vpBits[$] |= this.INOUT, this.vpAtomID[$] = b.serial; else { - let k = A[this.vpAtomID[$]]; - if (k.serial != b.serial) { - let G = S + D - Math.floor(0.5 + this.scaleFactor * (k.x + this.ptranx)), H = s + P - Math.floor(0.5 + this.scaleFactor * (k.y + this.ptrany)), U = o + I - Math.floor(0.5 + this.scaleFactor * (k.z + this.ptranz)); + let F = A[this.vpAtomID[$]]; + if (F.serial != b.serial) { + let G = S + D - Math.floor(0.5 + this.scaleFactor * (F.x + this.ptranx)), H = s + P - Math.floor(0.5 + this.scaleFactor * (F.y + this.ptrany)), U = o + I - Math.floor(0.5 + this.scaleFactor * (F.z + this.ptranz)); D * D + P * P + I * I < G * G + H * H + U * U && (this.vpAtomID[$] = b.serial); } } @@ -10382,16 +10382,16 @@ ATOM`, g); if (M !== 0 && L !== 0 && T !== 0) { let D = M * a, I = T * g; for (let z = 0; z <= this.depty[p][S]; z++) { - let P = z * L, B = s + D, F = o + P, N = w + I; - if (B < 0 || F < 0 || N < 0 || B >= this.pLength || F >= this.pWidth || N >= this.pHeight) + let P = z * L, B = s + D, k = o + P, N = w + I; + if (B < 0 || k < 0 || N < 0 || B >= this.pLength || k >= this.pWidth || N >= this.pHeight) continue; - let $ = B * v + F * this.pHeight + N; + let $ = B * v + k * this.pHeight + N; if (!(this.vpBits[$] & this.ISDONE)) this.vpBits[$] |= this.ISDONE, this.vpAtomID[$] = b.serial; else { - let k = A[this.vpAtomID[$]]; - if (k.serial != b.serial) { - let G = s + D - Math.floor(0.5 + this.scaleFactor * (k.x + this.ptranx)), H = o + P - Math.floor(0.5 + this.scaleFactor * (k.y + this.ptrany)), U = w + I - Math.floor(0.5 + this.scaleFactor * (k.z + this.ptranz)); + let F = A[this.vpAtomID[$]]; + if (F.serial != b.serial) { + let G = s + D - Math.floor(0.5 + this.scaleFactor * (F.x + this.ptranx)), H = o + P - Math.floor(0.5 + this.scaleFactor * (F.y + this.ptrany)), U = w + I - Math.floor(0.5 + this.scaleFactor * (F.z + this.ptranz)); D * D + P * P + I * I < G * G + H * H + U * U && (this.vpAtomID[$] = b.serial); } } @@ -10585,12 +10585,12 @@ ATOM`, g); z = Math.abs(z) / Math.pow(l, 3); var P = 1 / z; p.splice(0, 8 + a + 1); - var B = p[0].replace(/^\s+/, "").replace(/\s+/g, " ").split(" "), F = Math.abs(parseFloat(B[0])), N = Math.abs(parseFloat(B[1])), $ = Math.abs(parseFloat(B[2])), k = this.origin = new f.Vector3(0, 0, 0); - this.size = { x: F, y: N, z: $ }, this.unit = new f.Vector3(T.x, D.y, I.z), T = T.multiplyScalar(1 / (l * F)), D = D.multiplyScalar(1 / (l * N)), I = I.multiplyScalar(1 / (l * $)), (T.y != 0 || T.z != 0 || D.x != 0 || D.z != 0 || I.x != 0 || I.y != 0) && (this.matrix = new f.Matrix4(T.x, D.x, I.x, 0, T.y, D.y, I.y, 0, T.z, D.z, I.z, 0, 0, 0, 0, 1), this.matrix = this.matrix.multiplyMatrices(this.matrix, new f.Matrix4().makeTranslation(k.x, k.y, k.z)), this.origin = new f.Vector3(0, 0, 0), this.unit = new f.Vector3(1, 1, 1)), p.splice(0, 1); + var B = p[0].replace(/^\s+/, "").replace(/\s+/g, " ").split(" "), k = Math.abs(parseFloat(B[0])), N = Math.abs(parseFloat(B[1])), $ = Math.abs(parseFloat(B[2])), F = this.origin = new f.Vector3(0, 0, 0); + this.size = { x: k, y: N, z: $ }, this.unit = new f.Vector3(T.x, D.y, I.z), T = T.multiplyScalar(1 / (l * k)), D = D.multiplyScalar(1 / (l * N)), I = I.multiplyScalar(1 / (l * $)), (T.y != 0 || T.z != 0 || D.x != 0 || D.z != 0 || I.x != 0 || I.y != 0) && (this.matrix = new f.Matrix4(T.x, D.x, I.x, 0, T.y, D.y, I.y, 0, T.z, D.z, I.z, 0, 0, 0, 0, 1), this.matrix = this.matrix.multiplyMatrices(this.matrix, new f.Matrix4().makeTranslation(F.x, F.y, F.z)), this.origin = new f.Vector3(0, 0, 0), this.unit = new f.Vector3(1, 1, 1)), p.splice(0, 1); var G = p.join(" "); G = G.replace(/^\s+/, ""); var H = G.split(/[\s\r]+/); - H.splice(F * N * $ + 1); + H.splice(k * N * $ + 1); for (var U = Float32Array.from(H, parseFloat), V = 0; V < U.length; V++) U[V] = U[V] * P * g; this.data = U; @@ -10612,11 +10612,11 @@ ATOM`, g); console.log("Parse error in dx delta matrix"); return; } - var F = parseFloat(v[3]); - (parseFloat(v[1]) != 0 || parseFloat(v[2]) != 0) && console.log("Non-orthogonal delta matrix not currently supported in dx format"), this.unit = new f.Vector3(P, B, F); + var k = parseFloat(v[3]); + (parseFloat(v[1]) != 0 || parseFloat(v[2]) != 0) && console.log("Non-orthogonal delta matrix not currently supported in dx format"), this.unit = new f.Vector3(P, B, k); } else if (v = l.exec(T)) { - var N = parseFloat(v[1]), $ = parseFloat(v[2]), k = parseFloat(v[3]); - this.origin = new f.Vector3(N, $, k); + var N = parseFloat(v[1]), $ = parseFloat(v[2]), F = parseFloat(v[3]); + this.origin = new f.Vector3(N, $, F); } else if (v = M.exec(T)) break; } @@ -10790,8 +10790,8 @@ ATOM`, g); if (this.transferfunctionbuffer = new Uint8ClampedArray(this.transferfunctionbuffer), c.matrix) { let T = new f.Vector3(0, 0, 0), D = new f.Vector3(c.size.x, c.size.y, c.size.z), I = new f.Vector3(1, 1, 1); T.applyMatrix4(c.matrix), D.applyMatrix4(c.matrix), I.applyMatrix4(c.matrix).sub(T), this.extent = [[T.x, T.y, T.z], [D.x, D.y, D.z]]; - for (let F = 1; F < 7; F++) - D.x = F & 1 ? c.size.x : 0, D.y = F & 2 ? c.size.y : 0, D.z = F & 4 ? c.size.z : 0, D.applyMatrix4(c.matrix), this.extent[0][0] = Math.min(this.extent[0][0], D.x), this.extent[0][1] = Math.min(this.extent[0][1], D.y), this.extent[0][2] = Math.min(this.extent[0][2], D.z), this.extent[1][0] = Math.max(this.extent[1][0], D.x), this.extent[1][1] = Math.max(this.extent[1][1], D.y), this.extent[1][2] = Math.max(this.extent[1][2], D.z); + for (let k = 1; k < 7; k++) + D.x = k & 1 ? c.size.x : 0, D.y = k & 2 ? c.size.y : 0, D.z = k & 4 ? c.size.z : 0, D.applyMatrix4(c.matrix), this.extent[0][0] = Math.min(this.extent[0][0], D.x), this.extent[0][1] = Math.min(this.extent[0][1], D.y), this.extent[0][2] = Math.min(this.extent[0][2], D.z), this.extent[1][0] = Math.max(this.extent[1][0], D.x), this.extent[1][1] = Math.max(this.extent[1][1], D.y), this.extent[1][2] = Math.max(this.extent[1][2], D.z); let z = D.x - T.x, P = D.y - T.y, B = D.z - T.z; this.maxdepth = Math.sqrt(z * z + P * P + B * B), this.minunit = Math.min(Math.min(I.x, I.y), I.z), this.texmatrix = new f.Matrix4().identity().scale({ x: c.size.x, y: c.size.y, z: c.size.z }), this.texmatrix = this.texmatrix.multiplyMatrices(c.matrix, this.texmatrix), this.texmatrix = this.texmatrix.getInverse(this.texmatrix); } else { @@ -10813,9 +10813,9 @@ ATOM`, g); }), this.geo = L.finalize(), this.boundingSphere.center = new f.Vector3((this.extent[0][0] + this.extent[1][0]) / 2, (this.extent[0][1] + this.extent[1][1]) / 2, (this.extent[0][2] + this.extent[1][2]) / 2), this.boundingSphere.radius = this.maxdepth / 2, C.coords !== void 0 && C.seldist !== void 0) { let T = new Uint8Array(c.data.length), D = C.seldist, I = D * D; for (let z = 0, P = C.coords.length; z < P; z++) { - let B = C.coords[z], F = B.x - D, N = B.y - D, $ = B.z - D, k = B.x + D, G = B.y + D, H = B.z + D; - if (c.getIndex(F, N, $) >= 0 || c.getIndex(k, G, H) >= 0) - for (let U = F; U < k; U += this.minunit) + let B = C.coords[z], k = B.x - D, N = B.y - D, $ = B.z - D, F = B.x + D, G = B.y + D, H = B.z + D; + if (c.getIndex(k, N, $) >= 0 || c.getIndex(F, G, H) >= 0) + for (let U = k; U < F; U += this.minunit) for (let V = N; V < G; V += this.minunit) for (let Q = $; Q < H; Q += this.minunit) { let ae = c.getIndex(U, V, Q); @@ -11317,28 +11317,28 @@ ATOM`, g); ].join(` `), P = this.getShader("fragment", z + s), B = this.getShader("vertex", I + o); B != null && this._gl.attachShader(l, B), P != null && this._gl.attachShader(l, P), this._gl.linkProgram(l), this._gl.getProgramParameter(l, this._gl.LINK_STATUS) || console.error("Could not initialize shader"), l.uniforms = {}, l.attributes = {}; - var F, N, $; - F = [ + var k, N, $; + k = [ "viewMatrix", "modelViewMatrix", "projectionMatrix", "normalMatrix" ]; for (N in w) - F.push(N); - for ($ = 0; $ < F.length; $++) { - var k = F[$]; - l.uniforms[k] = this._gl.getUniformLocation(l, k); + k.push(N); + for ($ = 0; $ < k.length; $++) { + var F = k[$]; + l.uniforms[F] = this._gl.getUniformLocation(l, F); } - for (F = [ + for (k = [ "position", "normal", "color", "lineDistance", "offset", "radius" - ], $ = 0; $ < F.length; $++) { - var G = F[$]; + ], $ = 0; $ < k.length; $++) { + var G = k[$]; l.attributes[G] = this._gl.getAttribLocation(l, G); } return l.id = this._programs_counter++, this._programs.push({ @@ -11515,8 +11515,8 @@ ATOM`, g); if (L = M.object, T = M.buffer, D = M[w], !D) continue; l && this.setBlending(!0), this.setDepthTest(D.depthTest), this.setDepthWrite(D.depthWrite), this.setPolygonOffset(D.polygonOffset, D.polygonOffsetFactor, D.polygonOffsetUnits); - var F = L._modelViewMatrix.isReflected(); - this.setMaterialFaces(D, F), this.renderBuffer(p, v, a, D, T, L), (this._outlineEnabled || D.outline) && (D.shaderID == "sphereimposter" ? this.renderBuffer(p, v, a, this._outlineSphereImposterMaterial, T, L) : D.shaderID == "stickimposter" ? this.renderBuffer(p, v, a, this._outlineStickImposterMaterial, T, L) : !D.wireframe && D.shaderID !== "basic" && D.opacity !== 0 && this.renderBuffer(p, v, a, this._outlineMaterial, T, L)); + var k = L._modelViewMatrix.isReflected(); + this.setMaterialFaces(D, k), this.renderBuffer(p, v, a, D, T, L), (this._outlineEnabled || D.outline) && (D.shaderID == "sphereimposter" ? this.renderBuffer(p, v, a, this._outlineSphereImposterMaterial, T, L) : D.shaderID == "stickimposter" ? this.renderBuffer(p, v, a, this._outlineStickImposterMaterial, T, L) : !D.wireframe && D.shaderID !== "basic" && D.opacity !== 0 && this.renderBuffer(p, v, a, this._outlineMaterial, T, L)); } } renderSprites(s, o, w) { @@ -11585,15 +11585,15 @@ ATOM`, g); this.gl.useProgram(this.sprite.program), this.gl.enableVertexAttribArray(L.position), this.gl.enableVertexAttribArray(L.uv), this.gl.disable(this.gl.CULL_FACE), this.gl.enable(this.gl.BLEND), this.gl.bindBuffer(this.gl.ARRAY_BUFFER, this.sprite.vertexBuffer), this.gl.vertexAttribPointer(L.position, 2, this.gl.FLOAT, !1, 16, 0), this.gl.vertexAttribPointer(L.uv, 2, this.gl.FLOAT, !1, 16, 8), this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER, this.sprite.elementBuffer), this.gl.uniformMatrix4fv(T.projectionMatrix, !1, _.projectionMatrix.elements), this.gl.activeTexture(this.gl.TEXTURE0), this.gl.uniform1i(T.map, 0); var z = 0, P = 0, B = h.fog; B ? (this.gl.uniform3f(T.fogColor, B.color.r, B.color.g, B.color.b), this.gl.uniform1f(T.fogNear, B.near), this.gl.uniform1f(T.fogFar, B.far), this.gl.uniform1i(T.fogType, 1), z = 1, P = 1) : (this.gl.uniform1i(T.fogType, 0), z = 0, P = 0); - var F; - let N, $, k, G, H = []; - for (F = 0; F < M; F++) - N = g[F], $ = N.material, $ && ($.depthTest == !1 && !C || !N.visible || $.opacity === 0 || ($.useScreenCoordinates ? N.z = -N.position.z : (N._modelViewMatrix.multiplyMatrices(_.matrixWorldInverse, N.matrixWorld), N.z = -N._modelViewMatrix.elements[14]))); - for (g.sort(u), F = 0; F < M; F++) - if (N = g[F], $ = N.material, !!$ && !(!N.visible || $.opacity === 0) && $.map && $.map.image && $.map.image.width) { + var k; + let N, $, F, G, H = []; + for (k = 0; k < M; k++) + N = g[k], $ = N.material, $ && ($.depthTest == !1 && !C || !N.visible || $.opacity === 0 || ($.useScreenCoordinates ? N.z = -N.position.z : (N._modelViewMatrix.multiplyMatrices(_.matrixWorldInverse, N.matrixWorld), N.z = -N._modelViewMatrix.elements[14]))); + for (g.sort(u), k = 0; k < M; k++) + if (N = g[k], $ = N.material, !!$ && !(!N.visible || $.opacity === 0) && $.map && $.map.image && $.map.image.width) { this.gl.uniform1f((T == null ? void 0 : T.alphaTest) || null, $.alphaTest); var U = $.map.image.width, V = $.map.image.height; - H[0] = U * this.renderer.devicePixelRatio / E, H[1] = V * this.renderer.devicePixelRatio / c, $.useScreenCoordinates === !0 ? (this.gl.uniform1i(T.useScreenCoordinates, 1), this.gl.uniform3f(T.screenPosition, (N.position.x * this.renderer.devicePixelRatio - D) / D, (I - N.position.y * this.renderer.devicePixelRatio) / I, Math.max(0, Math.min(1, N.position.z)))) : (this.gl.uniform1i(T.useScreenCoordinates, 0), this.gl.uniformMatrix4fv(T.modelViewMatrix, !1, N._modelViewMatrix.elements)), h.fog && $.fog ? G = P : G = 0, z !== G && (this.gl.uniform1i(T.fogType, G), z = G), k = 1 / ($.scaleByViewport ? c : 1), H[0] *= k * N.scale.x, H[1] *= k * N.scale.y; + H[0] = U * this.renderer.devicePixelRatio / E, H[1] = V * this.renderer.devicePixelRatio / c, $.useScreenCoordinates === !0 ? (this.gl.uniform1i(T.useScreenCoordinates, 1), this.gl.uniform3f(T.screenPosition, (N.position.x * this.renderer.devicePixelRatio - D) / D, (I - N.position.y * this.renderer.devicePixelRatio) / I, Math.max(0, Math.min(1, N.position.z)))) : (this.gl.uniform1i(T.useScreenCoordinates, 0), this.gl.uniformMatrix4fv(T.modelViewMatrix, !1, N._modelViewMatrix.elements)), h.fog && $.fog ? G = P : G = 0, z !== G && (this.gl.uniform1i(T.fogType, G), z = G), F = 1 / ($.scaleByViewport ? c : 1), H[0] *= F * N.scale.x, H[1] *= F * N.scale.y; let Q = (A = $ == null ? void 0 : $.alignment) === null || A === void 0 ? void 0 : A.x, ae = (S = $ == null ? void 0 : $.alignment) === null || S === void 0 ? void 0 : S.y; $.screenOffset && (Q = (Q || 0) + 2 * $.screenOffset.x / U, ae = (ae || 0) + 2 * $.screenOffset.y / V), this.gl.uniform2f(T.uvScale, ((s = $ == null ? void 0 : $.uvScale) === null || s === void 0 ? void 0 : s.x) || 1, ((o = $ == null ? void 0 : $.uvScale) === null || o === void 0 ? void 0 : o.y) || 1), this.gl.uniform2f(T.uvOffset, ((w = $ == null ? void 0 : $.uvOffset) === null || w === void 0 ? void 0 : w.x) || 0, ((p = $ == null ? void 0 : $.uvOffset) === null || p === void 0 ? void 0 : p.y) || 0), this.gl.uniform2f(T.alignment, Q || 0, ae || 0), this.gl.uniform1f(T.opacity, $.opacity), this.gl.uniform3f(T.color, ((v = $ == null ? void 0 : $.color) === null || v === void 0 ? void 0 : v.r) || 0, ((a = $ == null ? void 0 : $.color) === null || a === void 0 ? void 0 : a.g) || 0, ((l = $ == null ? void 0 : $.color) === null || l === void 0 ? void 0 : l.b) || 0), this.gl.uniform1f(T.rotation, N.rotation), this.gl.uniform2fv(T.scale, H), this.renderer.setDepthTest($.depthTest), this.renderer.setDepthWrite($.depthWrite), this.renderer.setTexture($.map, 0), this.gl.drawElements(this.gl.TRIANGLES, 6, this.gl.UNSIGNED_SHORT, 0); } @@ -12075,10 +12075,10 @@ ATOM`, g); ` + b + ` coord Coordinate { ` + b + ` point [ `; - let N, $, k; + let N, $, F; for (let G = 0; G < this.vertices; ++G) { let H = G * 3; - N = (w = this.vertexArray) === null || w === void 0 ? void 0 : w[H], $ = (p = this.vertexArray) === null || p === void 0 ? void 0 : p[H + 1], k = (v = this.vertexArray) === null || v === void 0 ? void 0 : v[H + 2], P += b + " " + N + " " + $ + " " + k + `, + N = (w = this.vertexArray) === null || w === void 0 ? void 0 : w[H], $ = (p = this.vertexArray) === null || p === void 0 ? void 0 : p[H + 1], F = (v = this.vertexArray) === null || v === void 0 ? void 0 : v[H + 2], P += b + " " + N + " " + $ + " " + F + `, `; } if (P += b + ` ] @@ -12089,7 +12089,7 @@ ATOM`, g); `; for (let G = 0; G < this.vertices; ++G) { let H = G * 3; - N = this.colorArray[H], $ = this.colorArray[H + 1], k = this.colorArray[H + 2], P += b + " " + N + " " + $ + " " + k + `, + N = this.colorArray[H], $ = this.colorArray[H + 1], F = this.colorArray[H + 2], P += b + " " + N + " " + $ + " " + F + `, `; } P += b + ` ] @@ -12112,10 +12112,10 @@ ATOM`, g); `, P += b + ` coord Coordinate { ` + b + ` point [ `; - let N, $, k; + let N, $, F; for (let G = 0; G < this.vertices; ++G) { let H = G * 3; - N = (a = this.vertexArray) === null || a === void 0 ? void 0 : a[H], $ = (l = this.vertexArray) === null || l === void 0 ? void 0 : l[H + 1], k = (g = this.vertexArray) === null || g === void 0 ? void 0 : g[H + 2], P += b + " " + N + " " + $ + " " + k + `, + N = (a = this.vertexArray) === null || a === void 0 ? void 0 : a[H], $ = (l = this.vertexArray) === null || l === void 0 ? void 0 : l[H + 1], F = (g = this.vertexArray) === null || g === void 0 ? void 0 : g[H + 2], P += b + " " + N + " " + $ + " " + F + `, `; } P += b + ` ] @@ -12125,7 +12125,7 @@ ATOM`, g); `; for (let G = 0; G < this.vertices; ++G) { let H = G * 3; - N = (M = this.normalArray) === null || M === void 0 ? void 0 : M[H], $ = (L = this.normalArray) === null || L === void 0 ? void 0 : L[H + 1], k = (T = this.normalArray) === null || T === void 0 ? void 0 : T[H + 2], P += b + " " + N + " " + $ + " " + k + `, + N = (M = this.normalArray) === null || M === void 0 ? void 0 : M[H], $ = (L = this.normalArray) === null || L === void 0 ? void 0 : L[H + 1], F = (T = this.normalArray) === null || T === void 0 ? void 0 : T[H + 2], P += b + " " + N + " " + $ + " " + F + `, `; } if (P += b + ` ] @@ -12136,7 +12136,7 @@ ATOM`, g); `; for (let G = 0; G < this.vertices; ++G) { let H = G * 3; - N = this.colorArray[H], $ = this.colorArray[H + 1], k = this.colorArray[H + 2], P += b + " " + N + " " + $ + " " + k + `, + N = this.colorArray[H], $ = this.colorArray[H + 1], F = this.colorArray[H + 2], P += b + " " + N + " " + $ + " " + F + `, `; } P += b + ` ] @@ -12145,8 +12145,8 @@ ATOM`, g); } P += b + ` coordIndex [ `; - for (var F = 0; F < this.faceidx; F += 3) - N = (D = this.faceArray) === null || D === void 0 ? void 0 : D[F], $ = (I = this.faceArray) === null || I === void 0 ? void 0 : I[F + 1], k = (z = this.faceArray) === null || z === void 0 ? void 0 : z[F + 2], P += b + " " + N + ", " + $ + ", " + k + `, -1, + for (var k = 0; k < this.faceidx; k += 3) + N = (D = this.faceArray) === null || D === void 0 ? void 0 : D[k], $ = (I = this.faceArray) === null || I === void 0 ? void 0 : I[k + 1], F = (z = this.faceArray) === null || z === void 0 ? void 0 : z[k + 2], P += b + " " + N + ", " + $ + ", " + F + `, -1, `; P += b + ` ] `, P += b + `} @@ -12454,16 +12454,16 @@ ATOM`, g); var L = M * M; if (v.boundingSphere !== void 0 && v.boundingSphere instanceof f.Sphere && (E.copy(v.boundingSphere), E.applyMatrix4(p.matrixWorld), !a.ray.isIntersectionSphere(E))) return l; - var T, D, I, z, P, B, F, N, $, k, G, H, U, V; + var T, D, I, z, P, B, k, N, $, F, G, H, U, V; for (T = 0, D = g.triangle.length; T < D; T++) if (g.triangle[T] instanceof f.Triangle) { - if (C.copy(g.triangle[T]), C.applyMatrix4(p.matrixWorld), I = C.getNormal(), z = a.ray.direction.dot(I), z >= 0 || (b.subVectors(C.a, a.ray.origin), F = I.dot(b) / z, F < 0)) + if (C.copy(g.triangle[T]), C.applyMatrix4(p.matrixWorld), I = C.getNormal(), z = a.ray.direction.dot(I), z >= 0 || (b.subVectors(C.a, a.ray.origin), k = I.dot(b) / z, k < 0)) continue; - A.copy(a.ray.direction).multiplyScalar(F).add(a.ray.origin), A.sub(C.a), S.copy(C.b).sub(C.a), s.copy(C.c).sub(C.a); + A.copy(a.ray.direction).multiplyScalar(k).add(a.ray.origin), A.sub(C.a), S.copy(C.b).sub(C.a), s.copy(C.c).sub(C.a); var Q = S.dot(s), ae = S.lengthSq(), oe = s.lengthSq(); if (H = (ae * A.dot(s) - Q * A.dot(S)) / (ae * oe - Q * Q), H < 0 || H > 1 || (G = (A.dot(S) - H * Q) / ae, G < 0 || G > 1 || G + H > 1)) continue; - l.push({ clickable: v, distance: F }); + l.push({ clickable: v, distance: k }); } for (T = 0, D = g.cylinder.length; T < D; T++) if (g.cylinder[T] instanceof f.Cylinder) { @@ -12472,9 +12472,9 @@ ATOM`, g); U = (z * B - P) / $, V = (B - z * P) / $, A.copy(c.direction).multiplyScalar(U).add(c.c1), S.copy(a.ray.direction).multiplyScalar(V).add(a.ray.origin), N = s.subVectors(A, S).lengthSq(); var q = c.radius * c.radius; if (N <= q) { - if (k = (z * P - B) * (z * P - B) - $ * (b.lengthSq() - P * P - q), k <= 0 ? H = F = Math.sqrt(N) : H = F = (B - z * P - Math.sqrt(k)) / $, G = z * H - P, G < 0 || G * G > c.lengthSq() || H < 0) + if (F = (z * P - B) * (z * P - B) - $ * (b.lengthSq() - P * P - q), F <= 0 ? H = k = Math.sqrt(N) : H = k = (B - z * P - Math.sqrt(F)) / $, G = z * H - P, G < 0 || G * G > c.lengthSq() || H < 0) continue; - l.push({ clickable: v, distance: F }); + l.push({ clickable: v, distance: k }); } } for (T = 0, D = g.line.length; T < D; T += 2) { @@ -12488,9 +12488,9 @@ ATOM`, g); if (g.sphere[T] instanceof f.Sphere && (E.copy(g.sphere[T]), E.applyMatrix4(p.matrixWorld), a.ray.isIntersectionSphere(E))) { A.subVectors(E.center, a.ray.origin); var fe = A.dot(a.ray.direction); - if (k = fe * fe - (A.lengthSq() - E.radius * E.radius), fe < 0) + if (F = fe * fe - (A.lengthSq() - E.radius * E.radius), fe < 0) return l; - k <= 0 ? F = fe : F = fe - Math.sqrt(k), l.push({ clickable: v, distance: F }); + F <= 0 ? k = fe : k = fe - Math.sqrt(F), l.push({ clickable: v, distance: k }); } return l; } @@ -13933,8 +13933,8 @@ ATOM`, g); throw new Error("Method not implemented."); } set(s, o, w, p, v, a, l, g, M, L, T, D, I, z, P, B) { - const F = this.elements; - return F[0] = s, F[4] = o, F[8] = w, F[12] = p, F[1] = v, F[5] = a, F[9] = l, F[13] = g, F[2] = M, F[6] = L, F[10] = T, F[14] = D, F[3] = I, F[7] = z, F[11] = P, F[15] = B, this; + const k = this.elements; + return k[0] = s, k[4] = o, k[8] = w, k[12] = p, k[1] = v, k[5] = a, k[9] = l, k[13] = g, k[2] = M, k[6] = L, k[10] = T, k[14] = D, k[3] = I, k[7] = z, k[11] = P, k[15] = B, this; } identity() { return this.set(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1), this; @@ -13957,12 +13957,12 @@ ATOM`, g); return this; } setRotationFromQuaternion(s) { - const o = this.elements, { x: w, y: p, z: v, w: a } = s, l = w + w, g = p + p, M = v + v, L = w * l, T = w * g, D = w * M, I = p * g, z = p * M, P = v * M, B = a * l, F = a * g, N = a * M; - return o[0] = 1 - (I + P), o[4] = T - N, o[8] = D + F, o[1] = T + N, o[5] = 1 - (L + P), o[9] = z - B, o[2] = D - F, o[6] = z + B, o[10] = 1 - (L + I), this; + const o = this.elements, { x: w, y: p, z: v, w: a } = s, l = w + w, g = p + p, M = v + v, L = w * l, T = w * g, D = w * M, I = p * g, z = p * M, P = v * M, B = a * l, k = a * g, N = a * M; + return o[0] = 1 - (I + P), o[4] = T - N, o[8] = D + k, o[1] = T + N, o[5] = 1 - (L + P), o[9] = z - B, o[2] = D - k, o[6] = z + B, o[10] = 1 - (L + I), this; } multiplyMatrices(s, o) { - const w = s.elements, p = o.elements, v = this.elements, a = w[0], l = w[4], g = w[8], M = w[12], L = w[1], T = w[5], D = w[9], I = w[13], z = w[2], P = w[6], B = w[10], F = w[14], N = w[3], $ = w[7], k = w[11], G = w[15], H = p[0], U = p[4], V = p[8], Q = p[12], ae = p[1], oe = p[5], q = p[9], me = p[13], ne = p[2], fe = p[6], Ce = p[10], Me = p[14], Te = p[3], se = p[7], pe = p[11], we = p[15]; - return v[0] = a * H + l * ae + g * ne + M * Te, v[4] = a * U + l * oe + g * fe + M * se, v[8] = a * V + l * q + g * Ce + M * pe, v[12] = a * Q + l * me + g * Me + M * we, v[1] = L * H + T * ae + D * ne + I * Te, v[5] = L * U + T * oe + D * fe + I * se, v[9] = L * V + T * q + D * Ce + I * pe, v[13] = L * Q + T * me + D * Me + I * we, v[2] = z * H + P * ae + B * ne + F * Te, v[6] = z * U + P * oe + B * fe + F * se, v[10] = z * V + P * q + B * Ce + F * pe, v[14] = z * Q + P * me + B * Me + F * we, v[3] = N * H + $ * ae + k * ne + G * Te, v[7] = N * U + $ * oe + k * fe + G * se, v[11] = N * V + $ * q + k * Ce + G * pe, v[15] = N * Q + $ * me + k * Me + G * we, this; + const w = s.elements, p = o.elements, v = this.elements, a = w[0], l = w[4], g = w[8], M = w[12], L = w[1], T = w[5], D = w[9], I = w[13], z = w[2], P = w[6], B = w[10], k = w[14], N = w[3], $ = w[7], F = w[11], G = w[15], H = p[0], U = p[4], V = p[8], Q = p[12], ae = p[1], oe = p[5], q = p[9], me = p[13], ne = p[2], fe = p[6], Ce = p[10], Me = p[14], Te = p[3], se = p[7], pe = p[11], we = p[15]; + return v[0] = a * H + l * ae + g * ne + M * Te, v[4] = a * U + l * oe + g * fe + M * se, v[8] = a * V + l * q + g * Ce + M * pe, v[12] = a * Q + l * me + g * Me + M * we, v[1] = L * H + T * ae + D * ne + I * Te, v[5] = L * U + T * oe + D * fe + I * se, v[9] = L * V + T * q + D * Ce + I * pe, v[13] = L * Q + T * me + D * Me + I * we, v[2] = z * H + P * ae + B * ne + k * Te, v[6] = z * U + P * oe + B * fe + k * se, v[10] = z * V + P * q + B * Ce + k * pe, v[14] = z * Q + P * me + B * Me + k * we, v[3] = N * H + $ * ae + F * ne + G * Te, v[7] = N * U + $ * oe + F * fe + G * se, v[11] = N * V + $ * q + F * Ce + G * pe, v[15] = N * Q + $ * me + F * Me + G * we, this; } multiplyScalar(s) { const o = this.elements; @@ -13995,9 +13995,9 @@ ATOM`, g); return o[12] += s.x, o[13] += s.y, o[14] += s.z, this; } getInverse(s, o) { - const w = this.elements, p = s.elements, v = p[0], a = p[4], l = p[8], g = p[12], M = p[1], L = p[5], T = p[9], D = p[13], I = p[2], z = p[6], P = p[10], B = p[14], F = p[3], N = p[7], $ = p[11], k = p[15]; - w[0] = T * B * N - D * P * N + D * z * $ - L * B * $ - T * z * k + L * P * k, w[4] = g * P * N - l * B * N - g * z * $ + a * B * $ + l * z * k - a * P * k, w[8] = l * D * N - g * T * N + g * L * $ - a * D * $ - l * L * k + a * T * k, w[12] = g * T * z - l * D * z - g * L * P + a * D * P + l * L * B - a * T * B, w[1] = D * P * F - T * B * F - D * I * $ + M * B * $ + T * I * k - M * P * k, w[5] = l * B * F - g * P * F + g * I * $ - v * B * $ - l * I * k + v * P * k, w[9] = g * T * F - l * D * F - g * M * $ + v * D * $ + l * M * k - v * T * k, w[13] = l * D * I - g * T * I + g * M * P - v * D * P - l * M * B + v * T * B, w[2] = L * B * F - D * z * F + D * I * N - M * B * N - L * I * k + M * z * k, w[6] = g * z * F - a * B * F - g * I * N + v * B * N + a * I * k - v * z * k, w[10] = a * D * F - g * L * F + g * M * N - v * D * N - a * M * k + v * L * k, w[14] = g * L * I - a * D * I - g * M * z + v * D * z + a * M * B - v * L * B, w[3] = T * z * F - L * P * F - T * I * N + M * P * N + L * I * $ - M * z * $, w[7] = a * P * F - l * z * F + l * I * N - v * P * N - a * I * $ + v * z * $, w[11] = l * L * F - a * T * F - l * M * N + v * T * N + a * M * $ - v * L * $, w[15] = a * T * I - l * L * I + l * M * z - v * T * z - a * M * P + v * L * P; - const G = v * w[0] + M * w[4] + I * w[8] + F * w[12]; + const w = this.elements, p = s.elements, v = p[0], a = p[4], l = p[8], g = p[12], M = p[1], L = p[5], T = p[9], D = p[13], I = p[2], z = p[6], P = p[10], B = p[14], k = p[3], N = p[7], $ = p[11], F = p[15]; + w[0] = T * B * N - D * P * N + D * z * $ - L * B * $ - T * z * F + L * P * F, w[4] = g * P * N - l * B * N - g * z * $ + a * B * $ + l * z * F - a * P * F, w[8] = l * D * N - g * T * N + g * L * $ - a * D * $ - l * L * F + a * T * F, w[12] = g * T * z - l * D * z - g * L * P + a * D * P + l * L * B - a * T * B, w[1] = D * P * k - T * B * k - D * I * $ + M * B * $ + T * I * F - M * P * F, w[5] = l * B * k - g * P * k + g * I * $ - v * B * $ - l * I * F + v * P * F, w[9] = g * T * k - l * D * k - g * M * $ + v * D * $ + l * M * F - v * T * F, w[13] = l * D * I - g * T * I + g * M * P - v * D * P - l * M * B + v * T * B, w[2] = L * B * k - D * z * k + D * I * N - M * B * N - L * I * F + M * z * F, w[6] = g * z * k - a * B * k - g * I * N + v * B * N + a * I * F - v * z * F, w[10] = a * D * k - g * L * k + g * M * N - v * D * N - a * M * F + v * L * F, w[14] = g * L * I - a * D * I - g * M * z + v * D * z + a * M * B - v * L * B, w[3] = T * z * k - L * P * k - T * I * N + M * P * N + L * I * $ - M * z * $, w[7] = a * P * k - l * z * k + l * I * N - v * P * N - a * I * $ + v * z * $, w[11] = l * L * k - a * T * k - l * M * N + v * T * N + a * M * $ - v * L * $, w[15] = a * T * I - l * L * I + l * M * z - v * T * z - a * M * P + v * L * P; + const G = v * w[0] + M * w[4] + I * w[8] + k * w[12]; if (G === 0) { const H = "Matrix4.getInverse(): can't invert matrix, determinant is 0"; if (o) @@ -16618,10 +16618,10 @@ ATOM`, g); "./src/utilities.ts" ); function c(P, B) { - var F = [], N = P; + var k = [], N = P; N = [], N.push(P[0]); - var $, k, G, H, U, V, Q, ae, oe; - for ($ = 1, k = P.length - 1; $ < k; $++) + var $, F, G, H, U, V, Q, ae, oe; + for ($ = 1, F = P.length - 1; $ < F; $++) if (U = P[$], V = P[$ + 1], U.smoothen) { var q = new n.Vector3((U.x + V.x) / 2, (U.y + V.y) / 2, (U.z + V.z) / 2); q.atom = U.atom, N.push(q); @@ -16631,18 +16631,18 @@ ATOM`, g); if (H = N[$ === -1 ? 0 : $], U = N[$ + 1], V = N[$ + 2], Q = N[$ === G - 3 ? G - 1 : $ + 3], ae = new n.Vector3().subVectors(V, H).multiplyScalar(0.5), oe = new n.Vector3().subVectors(Q, U).multiplyScalar(0.5), !V.skip) for (var me = 0; me < B; me++) { var ne = 1 / B * me, fe = U.x + ne * ae.x + ne * ne * (-3 * U.x + 3 * V.x - 2 * ae.x - oe.x) + ne * ne * ne * (2 * U.x - 2 * V.x + ae.x + oe.x), Ce = U.y + ne * ae.y + ne * ne * (-3 * U.y + 3 * V.y - 2 * ae.y - oe.y) + ne * ne * ne * (2 * U.y - 2 * V.y + ae.y + oe.y), Me = U.z + ne * ae.z + ne * ne * (-3 * U.z + 3 * V.z - 2 * ae.z - oe.z) + ne * ne * ne * (2 * U.z - 2 * V.z + ae.z + oe.z), Te = new n.Vector3(fe, Ce, Me); - me < B / 2 ? Te.atom = U.atom : Te.atom = V.atom, F.push(Te); + me < B / 2 ? Te.atom = U.atom : Te.atom = V.atom, k.push(Te); } - return F.push(N[N.length - 1]), F; + return k.push(N[N.length - 1]), k; } const C = 0.5, b = 1.3, A = 0.8, S = 0.4, s = 0.4; - function o(P, B, F, N) { - for (var $, k, G, H, U = 0, V = B.length; U < V; U++) { + function o(P, B, k, N) { + for (var $, F, G, H, U = 0, V = B.length; U < V; U++) { H = Math.round(U * (N.length - 1) / V), G = h.CC.color(N[H]); var Q = P.updateGeoGroup(2), ae = Q.vertexArray, oe = Q.colorArray, q = Q.faceArray; - $ = Q.vertices, k = $ * 3, ae[k] = B[U].x, ae[k + 1] = B[U].y, ae[k + 2] = B[U].z, ae[k + 3] = F[U].x, ae[k + 4] = F[U].y, ae[k + 5] = F[U].z; + $ = Q.vertices, F = $ * 3, ae[F] = B[U].x, ae[F + 1] = B[U].y, ae[F + 2] = B[U].z, ae[F + 3] = k[U].x, ae[F + 4] = k[U].y, ae[F + 5] = k[U].z; for (var me = 0; me < 6; ++me) - oe[k + 3 * me] = G.r, oe[k + 1 + 3 * me] = G.g, oe[k + 2 + 3 * me] = G.b; + oe[F + 3 * me] = G.r, oe[F + 1 + 3 * me] = G.g, oe[F + 2 + 3 * me] = G.b; if (U > 0) { var ne = [$, $ + 1, $ - 1, $ - 2], fe = Q.faceidx; q[fe] = ne[0], q[fe + 1] = ne[1], q[fe + 2] = ne[3], q[fe + 3] = ne[1], q[fe + 4] = ne[2], q[fe + 5] = ne[3], Q.faceidx += 6; @@ -16650,14 +16650,14 @@ ATOM`, g); Q.vertices += 2; } } - function w(P, B, F, N, $, k, G) { + function w(P, B, k, N, $, F, G) { var H, U, V, Q; if (V = B.length, V < 2 || B[0].length < 2) return; for (H = 0; H < V; H++) B[H] = c(B[H], N); if (Q = B[0].length, !$) - return o(P, B[0], B[V - 1], F); + return o(P, B[0], B[V - 1], k); var ae, oe, q, me, ne, fe, Ce = [], Me = [], Te = []; for (U = 0; U < V; U++) Ce.push(0.25 + 1.5 * Math.sqrt((V - 1) * U - Math.pow(U, 2)) / (V - 1)), Me.push(0.5), Te.push(2 * (Math.pow(U / V, 2) - U / V) + 0.6); @@ -16670,11 +16670,11 @@ ATOM`, g); U + 1 - 4 * V, U - 2 * V ]; - var pe, we, ke, Ue, Ne, Be, ue, ye, ge, Se; + var pe, we, Fe, Ue, Ne, Be, ue, ye, ge, Se; let ze = P.updateGeoGroup(); for (H = 0; H < Q; H++) { let K = P.groups, ee = !1; - ze = P.updateGeoGroup(2 * V), K != P.groups && H > 0 && (H = H - 1, ee = !0), Be = Math.round(H * (F.length - 1) / Q), Ne = h.CC.color(F[Be]), ne = q, fe = me, q = [], me = [], ae = [], B[0][H].atom !== void 0 && (Ue = B[0][H].atom, G === "oval" ? oe = Ce : G === "rectangle" ? oe = Me : G === "parabola" && (oe = Te)), oe || (oe = Me); + ze = P.updateGeoGroup(2 * V), K != P.groups && H > 0 && (H = H - 1, ee = !0), Be = Math.round(H * (k.length - 1) / Q), Ne = h.CC.color(k[Be]), ne = q, fe = me, q = [], me = [], ae = [], B[0][H].atom !== void 0 && (Ue = B[0][H].atom, G === "oval" ? oe = Ce : G === "rectangle" ? oe = Me : G === "parabola" && (oe = Te)), oe || (oe = Me); var He, We; for (U = 0; U < V; U++) H < Q - 1 ? He = B[U][H + 1].clone().sub(B[U][H]) : He = B[U][H - 1].clone().sub(B[U][H]).negate(), U < V - 1 ? We = B[U + 1][H].clone().sub(B[U][H]) : We = B[U - 1][H].clone().sub(B[U][H]).negate(), ae[U] = We.cross(He).normalize().multiplyScalar($ * oe[U]); @@ -16695,7 +16695,7 @@ ATOM`, g); pe + se[U][1], pe + se[U][2], pe + se[U][3] - ], ke = ze.faceidx, ge[ke] = Se[0], ge[ke + 1] = Se[1], ge[ke + 2] = Se[3], ge[ke + 3] = Se[1], ge[ke + 4] = Se[2], ge[ke + 5] = Se[3], ze.faceidx += 6; + ], Fe = ze.faceidx, ge[Fe] = Se[0], ge[Fe + 1] = Se[1], ge[Fe + 2] = Se[3], ge[Fe + 3] = Se[1], ge[Fe + 4] = Se[2], ge[Fe + 5] = Se[3], ze.faceidx += 6; if (Ue.clickable || Ue.hoverable) { var Y = []; Y.push(new f.Triangle(ne[0], q[0], q[V - 1])), Y.push(new f.Triangle(ne[0], q[V - 1], ne[V - 1])), Y.push(new f.Triangle(ne[V - 1], q[V - 1], me[V - 1])), Y.push(new f.Triangle(ne[V - 1], me[V - 1], fe[V - 1])), Y.push(new f.Triangle(me[0], fe[0], fe[V - 1])), Y.push(new f.Triangle(me[V - 1], me[0], fe[V - 1])), Y.push(new f.Triangle(q[0], ne[0], fe[0])), Y.push(new f.Triangle(me[0], q[0], fe[0])); @@ -16705,29 +16705,29 @@ ATOM`, g); } ze.vertices += 2 * V; } - for (ue = ze.vertexArray, ye = ze.colorArray, ge = ze.faceArray, pe = ze.vertices, we = pe * 3, ke = ze.faceidx, H = 0; H < V - 1; H++) - Se = [H, H + 1, 2 * V - 2 - H, 2 * V - 1 - H], ke = ze.faceidx, ge[ke] = Se[0], ge[ke + 1] = Se[1], ge[ke + 2] = Se[3], ge[ke + 3] = Se[1], ge[ke + 4] = Se[2], ge[ke + 5] = Se[3], ze.faceidx += 6; + for (ue = ze.vertexArray, ye = ze.colorArray, ge = ze.faceArray, pe = ze.vertices, we = pe * 3, Fe = ze.faceidx, H = 0; H < V - 1; H++) + Se = [H, H + 1, 2 * V - 2 - H, 2 * V - 1 - H], Fe = ze.faceidx, ge[Fe] = Se[0], ge[Fe + 1] = Se[1], ge[Fe + 2] = Se[3], ge[Fe + 3] = Se[1], ge[Fe + 4] = Se[2], ge[Fe + 5] = Se[3], ze.faceidx += 6; for (H = 0; H < V - 1; H++) Se = [ pe - 1 - H, pe - 2 - H, pe - 2 * V + H + 1, pe - 2 * V + H - ], ke = ze.faceidx, ge[ke] = Se[0], ge[ke + 1] = Se[1], ge[ke + 2] = Se[3], ge[ke + 3] = Se[1], ge[ke + 4] = Se[2], ge[ke + 5] = Se[3], ze.faceidx += 6; + ], Fe = ze.faceidx, ge[Fe] = Se[0], ge[Fe + 1] = Se[1], ge[Fe + 2] = Se[3], ge[Fe + 3] = Se[1], ge[Fe + 4] = Se[2], ge[Fe + 5] = Se[3], ze.faceidx += 6; } - function p(P, B, F, N, $, k) { + function p(P, B, k, N, $, F) { if (!(B.length < 2)) { var G, H; if (G = B[0], H = B[B.length - 1], G = c(G, N), H = c(H, N), !$) - return o(P, G, H, F); + return o(P, G, H, k); var U = [], V, Q, ae, oe, q, me = [ [0, 2, -6, -8], [-4, -2, 6, 4], [7, -1, -5, 3], [-3, 5, 1, -7] - ], ne, fe, Ce, Me, Te, se, pe, we, ke, Ue, Ne, Be, ue, ye, ge, Se, ze; - for (we = 0, ke = G.length; we < ke; we++) { - if (Te = Math.round(we * (F.length - 1) / ke), Me = h.CC.color(F[Te]), U.push(Q = G[we]), U.push(Q), U.push(ae = H[we]), U.push(ae), we < ke - 1) { + ], ne, fe, Ce, Me, Te, se, pe, we, Fe, Ue, Ne, Be, ue, ye, ge, Se, ze; + for (we = 0, Fe = G.length; we < Fe; we++) { + if (Te = Math.round(we * (k.length - 1) / Fe), Me = h.CC.color(k[Te]), U.push(Q = G[we]), U.push(Q), U.push(ae = H[we]), U.push(ae), we < Fe - 1) { var He = G[we + 1].clone().sub(G[we]), We = H[we].clone().sub(G[we]); V = We.cross(He).normalize().multiplyScalar($); } @@ -16757,14 +16757,14 @@ ATOM`, g); var Ae = U.length - 8; for (ye = P.updateGeoGroup(8), ge = ye.vertexArray, Se = ye.colorArray, ze = ye.faceArray, ne = ye.vertices, fe = ne * 3, Ce = ye.faceidx, we = 0; we < 4; we++) { U.push(U[we * 2]), U.push(U[Ae + we * 2]); - var Fe = U[we * 2], he = U[Ae + we * 2]; - ge[fe + 6 * we] = Fe.x, ge[fe + 1 + 6 * we] = Fe.y, ge[fe + 2 + 6 * we] = Fe.z, ge[fe + 3 + 6 * we] = he.x, ge[fe + 4 + 6 * we] = he.y, ge[fe + 5 + 6 * we] = he.z, Se[fe + 6 * we] = Me.r, Se[fe + 1 + 6 * we] = Me.g, Se[fe + 2 + 6 * we] = Me.b, Se[fe + 3 + 6 * we] = Me.r, Se[fe + 4 + 6 * we] = Me.g, Se[fe + 5 + 6 * we] = Me.b; + var ke = U[we * 2], he = U[Ae + we * 2]; + ge[fe + 6 * we] = ke.x, ge[fe + 1 + 6 * we] = ke.y, ge[fe + 2 + 6 * we] = ke.z, ge[fe + 3 + 6 * we] = he.x, ge[fe + 4 + 6 * we] = he.y, ge[fe + 5 + 6 * we] = he.z, Se[fe + 6 * we] = Me.r, Se[fe + 1 + 6 * we] = Me.g, Se[fe + 2 + 6 * we] = Me.b, Se[fe + 3 + 6 * we] = Me.r, Se[fe + 4 + 6 * we] = Me.g, Se[fe + 5 + 6 * we] = Me.b; } Ae += 8, Ne = [ne, ne + 2, ne + 6, ne + 4], Be = [ne + 1, ne + 5, ne + 7, ne + 3], ze[Ce] = Ne[0], ze[Ce + 1] = Ne[1], ze[Ce + 2] = Ne[3], ze[Ce + 3] = Ne[1], ze[Ce + 4] = Ne[2], ze[Ce + 5] = Ne[3], ze[Ce + 6] = Be[0], ze[Ce + 7] = Be[1], ze[Ce + 8] = Be[3], ze[Ce + 9] = Be[1], ze[Ce + 10] = Be[2], ze[Ce + 11] = Be[3], ye.faceidx += 12, ye.vertices += 8; } } - function v(P, B, F, N, $, k, G) { - (!G || G === "default") && (G = "rectangle"), G === "edged" ? p(P, B, F, N, $) : (G === "rectangle" || G === "oval" || G === "parabola") && w(P, B, F, N, $, k, G); + function v(P, B, k, N, $, F, G) { + (!G || G === "default") && (G = "rectangle"), G === "edged" ? p(P, B, k, N, $) : (G === "rectangle" || G === "oval" || G === "parabola") && w(P, B, k, N, $, F, G); } function a(P) { return P && P.elem === "C" && P.atom === "CA"; @@ -16774,25 +16774,25 @@ ATOM`, g); if (!P.hetflag && !B.hetflag && P.reschain === B.reschain && (P.resi === B.resi || P.resi === B.resi - 1)) return !0; if (P.resi < B.resi) { - var F = P.x - B.x, N = P.y - B.y, $ = P.z - B.z, k = F * F + N * N + $ * $; - if (P.atom == "CA" && B.atom == "CA" && k < 16) + var k = P.x - B.x, N = P.y - B.y, $ = P.z - B.z, F = k * k + N * N + $ * $; + if (P.atom == "CA" && B.atom == "CA" && F < 16) return !0; - if ((P.atom == "P" || B.atom == "P") && k < 64) + if ((P.atom == "P" || B.atom == "P") && F < 64) return !0; } } return !1; } - function g(P, B, F, N, $) { + function g(P, B, k, N, $) { if (!(B == null || B.vertices == 0)) { $ && (B.initTypedArrays(), B.setUpNormals()); - var k = new u.MeshDoubleLambertMaterial(); - k.vertexColors = u.Coloring.FaceColors, typeof F == "number" && F >= 0 && F < 1 && (k.transparent = !0, k.opacity = F), k.outline = N; - var G = new u.Mesh(B, k); + var F = new u.MeshDoubleLambertMaterial(); + F.vertexColors = u.Coloring.FaceColors, typeof k == "number" && k >= 0 && k < 1 && (F.transparent = !0, F.opacity = k), F.outline = N; + var G = new u.Mesh(B, F); P.add(G); } } - function M(P, B, F, N, $, k, G, H, U) { + function M(P, B, k, N, $, F, G, H, U) { var V, Q, ae, oe, q, me; if (!(!N || !$ || !G)) { var ne = $.sub(N); @@ -16806,8 +16806,8 @@ ATOM`, g); var Me = fe.clone().cross(ne).normalize(); ne.rotateAboutVector(Me, 0.43); } - for (G.style.cartoon.ribbon ? V = G.style.cartoon.thickness || S : G.style.cartoon.width ? V = G.style.cartoon.width : G.ss === "c" ? G.atom === "P" ? V = A : V = C : G.ss === "arrow start" ? (V = b, q = !0) : G.ss === "arrow end" || G.ss === "h" && G.style.cartoon.tubes || G.ss === "tube start" ? V = C : V = b, k != null && ne.dot(k) < 0 && ne.negate(), ne.multiplyScalar(V), Q = 0; Q < B; Q++) - ae = -1 + Q * 2 / (B - 1), oe = new n.Vector3(N.x + ae * ne.x, N.y + ae * ne.y, N.z + ae * ne.z), oe.atom = G, F && G.ss === "s" && (oe.smoothen = !0), P[Q].push(oe); + for (G.style.cartoon.ribbon ? V = G.style.cartoon.thickness || S : G.style.cartoon.width ? V = G.style.cartoon.width : G.ss === "c" ? G.atom === "P" ? V = A : V = C : G.ss === "arrow start" ? (V = b, q = !0) : G.ss === "arrow end" || G.ss === "h" && G.style.cartoon.tubes || G.ss === "tube start" ? V = C : V = b, F != null && ne.dot(F) < 0 && ne.negate(), ne.multiplyScalar(V), Q = 0; Q < B; Q++) + ae = -1 + Q * 2 / (B - 1), oe = new n.Vector3(N.x + ae * ne.x, N.y + ae * ne.y, N.z + ae * ne.z), oe.atom = G, k && G.ss === "s" && (oe.smoothen = !0), P[Q].push(oe); if (q) for (ne.multiplyScalar(2), Q = 0; Q < B; Q++) ae = -1 + Q * 2 / (B - 1), oe = new n.Vector3(N.x + ae * ne.x, N.y + ae * ne.y, N.z + ae * ne.z), oe.atom = G, oe.smoothen = !1, oe.skip = !0, P[Q].push(oe); @@ -16832,13 +16832,13 @@ ATOM`, g); N1: !0, N3: !0 }, T = { DA: !0, DG: !0, A: !0, G: !0 }, D = { DT: !0, DC: !0, U: !0, C: !0, T: !0 }, I = { DA: !0, DG: !0, A: !0, G: !0, DT: !0, DC: !0, U: !0, C: !0, T: !0 }; - function z(P, B, F, N = 10) { - let $ = N, k = N; - var G, H, U, V, Q, ae, oe, q, me, ne, fe, Ce, Me, Te, se, pe, we, ke, Ue = new u.Geometry(!0), Ne = new u.Geometry(!0), Be = [], ue = [], ye = 1, ge = !1, Se = {}; + function z(P, B, k, N = 10) { + let $ = N, F = N; + var G, H, U, V, Q, ae, oe, q, me, ne, fe, Ce, Me, Te, se, pe, we, Fe, Ue = new u.Geometry(!0), Ne = new u.Geometry(!0), Be = [], ue = [], ye = 1, ge = !1, Se = {}; for (var ze in y.Gradient.builtinGradients) - y.Gradient.builtinGradients.hasOwnProperty(ze) && (Se[ze] = new y.Gradient.builtinGradients[ze](F[1], F[0])); + y.Gradient.builtinGradients.hasOwnProperty(ze) && (Se[ze] = new y.Gradient.builtinGradients[ze](k[1], k[0])); var He = function(j, $e) { - return F && $e.color === "spectrum" ? $e.colorscheme in Se ? Se[$e.colorscheme].valueToHex(j.resi) : Se.sinebow.valueToHex(j.resi) : (0, E.getColorFromStyle)(j, $e).getHex(); + return k && $e.color === "spectrum" ? $e.colorscheme in Se ? Se[$e.colorscheme].valueToHex(j.resi) : Se.sinebow.valueToHex(j.resi) : (0, E.getColorFromStyle)(j, $e).getHex(); }; for (q = 0; q < $; q++) ue[q] = []; @@ -16852,7 +16852,7 @@ ATOM`, g); } Y && U.style.cartoon.tubes && (U.ss = "tube end", Y = !1); var de = function(j) { - ue[0].length > 0 && v(Ne, ue, Be, k, oe, ye, ue.style); + ue[0].length > 0 && v(Ne, ue, Be, F, oe, ye, ue.style); var $e = [], Ve = null; if (j) { for (q = 0; q < $; q++) @@ -16880,8 +16880,8 @@ ATOM`, g); var Z = h.CC.color(ae); _.GLDraw.drawCylinder(Ue, U, V, oe, Z, 2, 2); } else { - var ce = new n.Vector3().addVectors(U, V).multiplyScalar(0.5), Ae = h.CC.color(Q), Fe = h.CC.color(ae); - _.GLDraw.drawCylinder(Ue, U, ce, oe, Ae, 2, 0), _.GLDraw.drawCylinder(Ue, ce, V, oe, Fe, 0, 2); + var ce = new n.Vector3().addVectors(U, V).multiplyScalar(0.5), Ae = h.CC.color(Q), ke = h.CC.color(ae); + _.GLDraw.drawCylinder(Ue, U, ce, oe, Ae, 2, 0), _.GLDraw.drawCylinder(Ue, ce, V, oe, ke, 0, 2); } if ((V.clickable === !0 || V.hoverable) && V.intersectionShape !== void 0) { var he = new n.Vector3(V.x, V.y, V.z); @@ -16892,15 +16892,15 @@ ATOM`, g); } } else { if (a(V) || Re && (V.atom === "P" || V.atom.indexOf("O5") == 0)) { - if (ke) + if (Fe) if (V.ss === "tube end") - ke = !1, we = new n.Vector3(V.x, V.y, V.z), _.GLDraw.drawCylinder(Ue, pe, we, 2, h.CC.color(Q), 1, 1), V.ss = "h"; + Fe = !1, we = new n.Vector3(V.x, V.y, V.z), _.GLDraw.drawCylinder(Ue, pe, we, 2, h.CC.color(Q), 1, 1), V.ss = "h"; else if (U.chain != V.chain || U.ss === "tube end") - ke = !1, U.ss = "h", we = new n.Vector3(U.x, U.y, U.z), _.GLDraw.drawCylinder(Ue, pe, we, 2, h.CC.color(Q), 1, 1); + Fe = !1, U.ss = "h", we = new n.Vector3(U.x, U.y, U.z), _.GLDraw.drawCylinder(Ue, pe, we, 2, h.CC.color(Q), 1, 1); else continue; if (U && (!l(U, V) || U.ss === "tube start")) { - for (U.ss === "tube start" && (ke = !0, pe = new n.Vector3(U.x, U.y, U.z), U.ss = "h"), se && (Ce ? Te = new n.Vector3().addVectors(U, Ce).multiplyScalar(0.5) : Te = new n.Vector3(U.x, U.y, U.z), _.GLDraw.drawCylinder(Ue, Te, se, s, h.CC.color(se.color), 0, 2), M(ue, $, !0, Ce, Me, fe, U, K, ve), Be.push(ae), Te = null, se = null), ue[0].length > 0 && v(Ne, ue, Be, k, oe, ye, ue.style), ue = [], q = 0; q < $; q++) + for (U.ss === "tube start" && (Fe = !0, pe = new n.Vector3(U.x, U.y, U.z), U.ss = "h"), se && (Ce ? Te = new n.Vector3().addVectors(U, Ce).multiplyScalar(0.5) : Te = new n.Vector3(U.x, U.y, U.z), _.GLDraw.drawCylinder(Ue, Te, se, s, h.CC.color(se.color), 0, 2), M(ue, $, !0, Ce, Me, fe, U, K, ve), Be.push(ae), Te = null, se = null), ue[0].length > 0 && v(Ne, ue, Be, F, oe, ye, ue.style), ue = [], q = 0; q < $; q++) ue[q] = []; Be = []; } @@ -17517,13 +17517,13 @@ ATOM`, g); } else l++; b.push({ symmetries: [] }), c.push([]); - var B = g._atom_site_id !== void 0 ? g._atom_site_id.length : g._atom_site_label.length, F; + var B = g._atom_site_id !== void 0 ? g._atom_site_id.length : g._atom_site_label.length, k; if (g._cell_length_a !== void 0) { - var N = parseFloat(g._cell_length_a), $ = parseFloat(g._cell_length_b), k = parseFloat(g._cell_length_c), G = parseFloat(g._cell_angle_alpha) || 90, H = parseFloat(g._cell_angle_beta) || 90, U = parseFloat(g._cell_angle_gamma) || 90; - F = (0, y.conversionMatrix3)(N, $, k, G, H, U), b[b.length - 1].cryst = { + var N = parseFloat(g._cell_length_a), $ = parseFloat(g._cell_length_b), F = parseFloat(g._cell_length_c), G = parseFloat(g._cell_angle_alpha) || 90, H = parseFloat(g._cell_angle_beta) || 90, U = parseFloat(g._cell_angle_gamma) || 90; + k = (0, y.conversionMatrix3)(N, $, F, G, H, U), b[b.length - 1].cryst = { a: N, b: $, - c: k, + c: F, alpha: G, beta: H, gamma: U @@ -17535,7 +17535,7 @@ ATOM`, g); if (g._atom_site_cartn_x !== void 0) Q.x = parseFloat(g._atom_site_cartn_x[V]), Q.y = parseFloat(g._atom_site_cartn_y[V]), Q.z = parseFloat(g._atom_site_cartn_z[V]); else { - var ae = S(F, parseFloat(g._atom_site_fract_x[V]), parseFloat(g._atom_site_fract_y[V]), parseFloat(g._atom_site_fract_z[V])); + var ae = S(k, parseFloat(g._atom_site_fract_x[V]), parseFloat(g._atom_site_fract_y[V]), parseFloat(g._atom_site_fract_z[V])); Q.x = ae.x, Q.y = ae.y, Q.z = ae.z; } Q.chain = g._atom_site_auth_asym_id ? g._atom_site_auth_asym_id[V] : void 0, Q.resi = g._atom_site_auth_seq_id ? parseInt(g._atom_site_auth_seq_id[V]) : void 0, Q.resn = g._atom_site_auth_comp_id ? g._atom_site_auth_comp_id[V].trim() : void 0, Q.atom = g._atom_site_auth_atom_id ? g._atom_site_auth_atom_id[V].replace(/"/gm, "") : void 0, Q.hetflag = !g._atom_site_group_pdb || g._atom_site_group_pdb[V] === "HETA" || g._atom_site_group_pdb[V] === "HETATM"; @@ -17544,7 +17544,7 @@ ATOM`, g); } if (g._pdbx_struct_oper_list_id !== void 0 && !C) for (let K = 0; K < g._pdbx_struct_oper_list_id.length; K++) { - var q = parseFloat(g["_pdbx_struct_oper_list_matrix[1][1]"][K]), me = parseFloat(g["_pdbx_struct_oper_list_matrix[1][2]"][K]), ne = parseFloat(g["_pdbx_struct_oper_list_matrix[1][3]"][K]), fe = parseFloat(g["_pdbx_struct_oper_list_vector[1]"][K]), Ce = parseFloat(g["_pdbx_struct_oper_list_matrix[2][1]"][K]), Me = parseFloat(g["_pdbx_struct_oper_list_matrix[2][2]"][K]), Te = parseFloat(g["_pdbx_struct_oper_list_matrix[2][3]"][K]), se = parseFloat(g["_pdbx_struct_oper_list_vector[2]"][K]), pe = parseFloat(g["_pdbx_struct_oper_list_matrix[3][1]"][K]), we = parseFloat(g["_pdbx_struct_oper_list_matrix[3][2]"][K]), ke = parseFloat(g["_pdbx_struct_oper_list_matrix[3][3]"][K]), Ue = parseFloat(g["_pdbx_struct_oper_list_vector[3]"][K]), Ne = new y.Matrix4(q, me, ne, fe, Ce, Me, Te, se, pe, we, ke, Ue); + var q = parseFloat(g["_pdbx_struct_oper_list_matrix[1][1]"][K]), me = parseFloat(g["_pdbx_struct_oper_list_matrix[1][2]"][K]), ne = parseFloat(g["_pdbx_struct_oper_list_matrix[1][3]"][K]), fe = parseFloat(g["_pdbx_struct_oper_list_vector[1]"][K]), Ce = parseFloat(g["_pdbx_struct_oper_list_matrix[2][1]"][K]), Me = parseFloat(g["_pdbx_struct_oper_list_matrix[2][2]"][K]), Te = parseFloat(g["_pdbx_struct_oper_list_matrix[2][3]"][K]), se = parseFloat(g["_pdbx_struct_oper_list_vector[2]"][K]), pe = parseFloat(g["_pdbx_struct_oper_list_matrix[3][1]"][K]), we = parseFloat(g["_pdbx_struct_oper_list_matrix[3][2]"][K]), Fe = parseFloat(g["_pdbx_struct_oper_list_matrix[3][3]"][K]), Ue = parseFloat(g["_pdbx_struct_oper_list_vector[3]"][K]), Ne = new y.Matrix4(q, me, ne, fe, Ce, Me, Te, se, pe, we, Fe, Ue); b[b.length - 1].symmetries.push(Ne); } var Be = function(K) { @@ -17569,7 +17569,7 @@ ATOM`, g); } } } - var We = F.getMatrix4(), Y = new y.Matrix4().getInverse(We, !0); + var We = k.getMatrix4(), Y = new y.Matrix4().getInverse(We, !0); K = new y.Matrix4().multiplyMatrices(K, Y), K = new y.Matrix4().multiplyMatrices(We, K), b[b.length - 1].symmetries.push(K); } } @@ -17800,11 +17800,11 @@ ATOM`, g); function C(b, A) { var S = !A.keepH, s = A.altLoc ? A.altLoc : "A", o = !!A.noSecondaryStructure, w = !A.noComputeSecondaryStructure, p = !A.doAssembly, v = A.assemblyIndex ? A.assemblyIndex : 0; typeof b == "string" ? b = (0, n.base64ToArray)(b) : b = new Uint8Array(b); - var a = h.decode(b), l = [[]], g = l.modelData = [], M = 0, L = 0, T = 0, D = a.secStructList, I = a.bFactorList, z = a.altLocList, P = a.occupancyList, B = a.bondAtomList, F = a.bondOrderList, N = a.numModels; + var a = h.decode(b), l = [[]], g = l.modelData = [], M = 0, L = 0, T = 0, D = a.secStructList, I = a.bFactorList, z = a.altLocList, P = a.occupancyList, B = a.bondAtomList, k = a.bondOrderList, N = a.numModels; if (N == 0) return l; A.multimodel || (N = 1); - var $, k, G, H, U, V, Q = []; + var $, F, G, H, U, V, Q = []; if (!p && a.bioAssemblyList && a.bioAssemblyList.length > 0) { var ae = a.bioAssemblyList[v].transformList; for ($ = 0, V = ae.length; $ < V; $++) { @@ -17829,13 +17829,13 @@ ATOM`, g); for (g.push({ symmetries: Q, cryst: q }), $ = 0; $ < Ce; ++$) { var se = a.groupsPerChain[M], pe = _(a.chainIdList.subarray(M * 4, M * 4 + 4)); a.chainNameList && (pe = _(a.chainNameList.subarray(M * 4, M * 4 + 4))); - var we = L, ke = ""; - for (k = 0; k < se; ++k) { + var we = L, Fe = ""; + for (F = 0; F < se; ++F) { var Ue = a.groupList[a.groupTypeList[L]], Ne = Ue.atomNameList.length, Be = 0, ue = !1, ye = !1; if (D) { Be = D[L]; var ge = E(Be); - (L == 0 || ge != ke) && (ue = !0), ke = ge; + (L == 0 || ge != Fe) && (ue = !0), Fe = ge; var Se = L + 1; (Se >= D.length || E(D[Se] != ge)) && (ye = !0); } @@ -17888,20 +17888,20 @@ ATOM`, g); b: K }), T += 1; } - var Fe = Ue.bondAtomList; + var ke = Ue.bondAtomList; for (G = 0, H = Ue.bondOrderList.length; G < H; ++G) { - var he = We + Fe[G * 2], Oe = We + Fe[G * 2 + 1], j = Ue.bondOrderList[G], $e = Te[he], Ve = Te[Oe], R = Me[$e], be = Me[Ve]; + var he = We + ke[G * 2], Oe = We + ke[G * 2 + 1], j = Ue.bondOrderList[G], $e = Te[he], Ve = Te[Oe], R = Me[$e], be = Me[Ve]; R && be && (R.bonds.push(Ve), R.bondOrder.push(j), be.bonds.push($e), be.bondOrder.push(j)); } L += 1; } - for (L = we, k = 0; k < se; ++k) + for (L = we, F = 0; F < se; ++F) L += 1; M += 1; } if (B) for (let Ee = fe, X = B.length; Ee < X; Ee += 2) { - let le = B[Ee], Le = B[Ee + 1], Ze = F ? F[Ee / 2] : 1; + let le = B[Ee], Le = B[Ee + 1], Ze = k ? k[Ee / 2] : 1; if (le >= T) { fe = Ee; break; @@ -18020,8 +18020,8 @@ ATOM`, g); if (D && s) for (w = 0; w < s; w++) { a = C[o++], A = a.replace(/^\s+/, "").replace(/\s+/g, " ").split(" "); - var I = parseInt(A[1]), z = h[h.length - 1][b[I]], P = parseInt(A[2]), B = h[h.length - 1][b[P]], F = parseInt(A[3]); - isNaN(F) && (F = 1), z !== void 0 && B !== void 0 && (z.bonds.push(b[P]), z.bondOrder.push(F), B.bonds.push(b[I]), B.bondOrder.push(F)); + var I = parseInt(A[1]), z = h[h.length - 1][b[I]], P = parseInt(A[2]), B = h[h.length - 1][b[P]], k = parseInt(A[3]); + isNaN(k) && (k = 1), z !== void 0 && B !== void 0 && (z.bonds.push(b[P]), z.bondOrder.push(k), B.bonds.push(b[I]), B.bondOrder.push(k)); } if (y.multimodel) { y.onemol || h.push([]), C.splice(0, o), u = C.join(` @@ -18115,7 +18115,7 @@ ATOM`, g); break; else if (A == "ATOM " || A == "HETATM") { var S; - let I = parseInt(b.substring(6, 11)), z = b.substring(12, 16).replace(/ /g, ""), P = b.substring(17, 20).trim(), B = b.substring(21, 22), F = parseInt(b.substring(22, 26)); + let I = parseInt(b.substring(6, 11)), z = b.substring(12, 16).replace(/ /g, ""), P = b.substring(17, 20).trim(), B = b.substring(21, 22), k = parseInt(b.substring(22, 26)); var s = b.substring(30).trim().split(/\s+/), o = parseFloat(s[0]), w = parseFloat(s[1]), p = parseFloat(s[2]), v = parseFloat(s[3]), a = parseFloat(s[4]), l = z[0]; z.length > 1 && z[1].toUpperCase() != z[1] && (l = z.substring(0, 2)), b[0] == "H" ? S = !0 : S = !1, c[I] = _[_.length - 1].length, _[_.length - 1].push({ resn: P, @@ -18125,7 +18125,7 @@ ATOM`, g); elem: l, hetflag: S, chain: B, - resi: F, + resi: k, serial: I, atom: z, bonds: [], @@ -19130,15 +19130,15 @@ ATOM`, g); var s = [], o = A.assignBonds === void 0 ? !0 : A.assignBonds, w = !A.keepH, p = !!A.noSecondaryStructure, v = !A.noComputeSecondaryStructure, a = !A.doAssembly, l = A.altLoc ? A.altLoc : "A", g = { symmetries: [] }, M, L = [], T = [], D, I = {}; for (let He = 0; He < b.length; He++) { D = b[He].replace(/^\s*/, ""); - var z = D.substring(0, 6), P, B, F; + var z = D.substring(0, 6), P, B, k; if (z.indexOf("END") == 0) { if (L = b.slice(He + 1), z == "END") for (var N in S) S.hasOwnProperty(N) && delete S[N]; break; } else if (z == "ATOM " || z == "HETATM") { - var $, k, G, H, U, V, Q, ae, oe, q, me, ne; - if (me = D.substring(16, 17), me != " " && me != l && l != "*" || (q = parseInt(D.substring(6, 11)), M = D.substring(12, 16).replace(/ /g, ""), $ = D.substring(17, 20).replace(/ /g, ""), k = D.substring(21, 22), G = parseInt(D.substring(22, 26)), H = D.substring(26, 27), U = parseFloat(D.substring(30, 38)), V = parseFloat(D.substring(38, 46)), Q = parseFloat(D.substring(46, 54)), ne = parseFloat(D.substring(60, 68)), oe = D.substring(76, 78).replace(/ /g, ""), oe === "" || typeof u.bondTable[oe] > "u" ? oe = (0, f.atomNameToElem)(D.substring(12, 14), D[0] == "A") : oe = oe[0].toUpperCase() + oe.substring(1).toLowerCase(), oe == "H" && w)) + var $, F, G, H, U, V, Q, ae, oe, q, me, ne; + if (me = D.substring(16, 17), me != " " && me != l && l != "*" || (q = parseInt(D.substring(6, 11)), M = D.substring(12, 16).replace(/ /g, ""), $ = D.substring(17, 20).replace(/ /g, ""), F = D.substring(21, 22), G = parseInt(D.substring(22, 26)), H = D.substring(26, 27), U = parseFloat(D.substring(30, 38)), V = parseFloat(D.substring(38, 46)), Q = parseFloat(D.substring(46, 54)), ne = parseFloat(D.substring(60, 68)), oe = D.substring(76, 78).replace(/ /g, ""), oe === "" || typeof u.bondTable[oe] > "u" ? oe = (0, f.atomNameToElem)(D.substring(12, 14), D[0] == "A") : oe = oe[0].toUpperCase() + oe.substring(1).toLowerCase(), oe == "H" && w)) continue; z[0] == "H" ? ae = !0 : ae = !1, T[q] = s.length, s.push({ resn: $, @@ -19148,7 +19148,7 @@ ATOM`, g); elem: oe, hetflag: ae, altLoc: me, - chain: k, + chain: F, resi: G, icode: H, rescode: G + (H != " " ? "^" + H : ""), @@ -19165,17 +19165,17 @@ ATOM`, g); pdbline: D }); } else if (z == "SHEET ") { - P = D.substring(21, 22), B = parseInt(D.substring(22, 26)), F = parseInt(D.substring(33, 37)), P in S || (S[P] = {}), S[P][B] = "s1"; - for (var fe = B + 1; fe < F; fe++) + P = D.substring(21, 22), B = parseInt(D.substring(22, 26)), k = parseInt(D.substring(33, 37)), P in S || (S[P] = {}), S[P][B] = "s1"; + for (var fe = B + 1; fe < k; fe++) S[P][fe] = "s"; - S[P][F] = "s2"; + S[P][k] = "s2"; } else if (z == "CONECT") { var Ce = parseInt(D.substring(6, 11)), Me = T[Ce], Te = s[Me], se = [11, 16, 21, 26]; for (let We = 0; We < 4; We++) { var pe = parseInt(D.substring(se[We], se[We] + 5)), we = T[pe]; let Y = Me + ":" + we; - var ke = s[we]; - if (Te !== void 0 && ke !== void 0) + var Fe = s[we]; + if (Te !== void 0 && Fe !== void 0) if (!I[Y]) I[Y] = 1, (Te.bonds.length == 0 || Te.bonds[Te.bonds.length - 1] != we) && (Te.bonds.push(we), Te.bondOrder.push(1)); else { @@ -19188,10 +19188,10 @@ ATOM`, g); } } } else if (z == "HELIX ") { - P = D.substring(19, 20), B = parseInt(D.substring(21, 25)), F = parseInt(D.substring(33, 37)), P in S || (S[P] = {}), S[P][B] = "h1"; - for (let We = B + 1; We < F; We++) + P = D.substring(19, 20), B = parseInt(D.substring(21, 25)), k = parseInt(D.substring(33, 37)), P in S || (S[P] = {}), S[P][B] = "h1"; + for (let We = B + 1; We < k; We++) S[P][We] = "h"; - S[P][F] = "h2"; + S[P][k] = "h2"; } else if (!a && z == "REMARK" && D.substring(13, 18) == "BIOMT") { var Ne, Be = new n.Matrix4(); for (Ne = 1; Ne <= 3; Ne++) @@ -20039,26 +20039,26 @@ ATOM`, g); var I = c.tabs.PLTE, z = c.tabs.tRNS, P = z ? z.length : 0; if (w == 1) for (var B = 0; B < E; B++) - for (var F = B * A, N = B * _, a = 0; a < _; a++) { - var T = N + a << 2, $ = h[F + (a >> 3)] >> 7 - ((a & 7) << 0) & 1, k = 3 * $; - S[T] = I[k], S[T + 1] = I[k + 1], S[T + 2] = I[k + 2], S[T + 3] = $ < P ? z[$] : 255; + for (var k = B * A, N = B * _, a = 0; a < _; a++) { + var T = N + a << 2, $ = h[k + (a >> 3)] >> 7 - ((a & 7) << 0) & 1, F = 3 * $; + S[T] = I[F], S[T + 1] = I[F + 1], S[T + 2] = I[F + 2], S[T + 3] = $ < P ? z[$] : 255; } if (w == 2) for (var B = 0; B < E; B++) - for (var F = B * A, N = B * _, a = 0; a < _; a++) { - var T = N + a << 2, $ = h[F + (a >> 2)] >> 6 - ((a & 3) << 1) & 3, k = 3 * $; - S[T] = I[k], S[T + 1] = I[k + 1], S[T + 2] = I[k + 2], S[T + 3] = $ < P ? z[$] : 255; + for (var k = B * A, N = B * _, a = 0; a < _; a++) { + var T = N + a << 2, $ = h[k + (a >> 2)] >> 6 - ((a & 3) << 1) & 3, F = 3 * $; + S[T] = I[F], S[T + 1] = I[F + 1], S[T + 2] = I[F + 2], S[T + 3] = $ < P ? z[$] : 255; } if (w == 4) for (var B = 0; B < E; B++) - for (var F = B * A, N = B * _, a = 0; a < _; a++) { - var T = N + a << 2, $ = h[F + (a >> 1)] >> 4 - ((a & 1) << 2) & 15, k = 3 * $; - S[T] = I[k], S[T + 1] = I[k + 1], S[T + 2] = I[k + 2], S[T + 3] = $ < P ? z[$] : 255; + for (var k = B * A, N = B * _, a = 0; a < _; a++) { + var T = N + a << 2, $ = h[k + (a >> 1)] >> 4 - ((a & 1) << 2) & 15, F = 3 * $; + S[T] = I[F], S[T + 1] = I[F + 1], S[T + 2] = I[F + 2], S[T + 3] = $ < P ? z[$] : 255; } if (w == 8) for (var a = 0; a < C; a++) { - var T = a << 2, $ = h[a], k = 3 * $; - S[T] = I[k], S[T + 1] = I[k + 1], S[T + 2] = I[k + 2], S[T + 3] = $ < P ? z[$] : 255; + var T = a << 2, $ = h[a], F = 3 * $; + S[T] = I[F], S[T + 1] = I[F + 1], S[T + 2] = I[F + 2], S[T + 3] = $ < P ? z[$] : 255; } } else if (o == 4) { if (w == 8) @@ -20186,23 +20186,23 @@ ATOM`, g); var I = Math.ceil(M * C / 8); u.decode._filterZero(h, _, s, M, L); for (var z = 0, P = o[a]; P < c; ) { - for (var B = w[a], F = s + z * I << 3; B < E; ) { + for (var B = w[a], k = s + z * I << 3; B < E; ) { if (C == 1) { - var N = h[F >> 3]; - N = N >> 7 - (F & 7) & 1, S[P * A + (B >> 3)] |= N << 7 - ((B & 3) << 0); + var N = h[k >> 3]; + N = N >> 7 - (k & 7) & 1, S[P * A + (B >> 3)] |= N << 7 - ((B & 3) << 0); } if (C == 2) { - var N = h[F >> 3]; - N = N >> 6 - (F & 7) & 3, S[P * A + (B >> 2)] |= N << 6 - ((B & 3) << 1); + var N = h[k >> 3]; + N = N >> 6 - (k & 7) & 3, S[P * A + (B >> 2)] |= N << 6 - ((B & 3) << 1); } if (C == 4) { - var N = h[F >> 3]; - N = N >> 4 - (F & 7) & 15, S[P * A + (B >> 1)] |= N << 4 - ((B & 1) << 2); + var N = h[k >> 3]; + N = N >> 4 - (k & 7) & 15, S[P * A + (B >> 1)] |= N << 4 - ((B & 1) << 2); } if (C >= 8) - for (var $ = P * A + B * b, k = 0; k < b; k++) - S[$ + k] = h[(F >> 3) + k]; - F += C, B += g; + for (var $ = P * A + B * b, F = 0; F < b; F++) + S[$ + F] = h[(k >> 3) + F]; + k += C, B += g; } z++, P += l; } @@ -20313,8 +20313,8 @@ ATOM`, g); if (A >= 0 && S >= 0 ? (p = a * _ + l << 2, v = (S + a) * C + A + l << 2) : (p = (-S + a) * _ - A + l << 2, v = a * C + l << 2), s == 0) c[v] = h[p], c[v + 1] = h[p + 1], c[v + 2] = h[p + 2], c[v + 3] = h[p + 3]; else if (s == 1) { - var g = h[p + 3] * 0.00392156862745098, M = h[p] * g, L = h[p + 1] * g, T = h[p + 2] * g, D = c[v + 3] * (1 / 255), I = c[v] * D, z = c[v + 1] * D, P = c[v + 2] * D, B = 1 - g, F = g + D * B, N = F == 0 ? 0 : 1 / F; - c[v + 3] = 255 * F, c[v + 0] = (M + I * B) * N, c[v + 1] = (L + z * B) * N, c[v + 2] = (T + P * B) * N; + var g = h[p + 3] * 0.00392156862745098, M = h[p] * g, L = h[p + 1] * g, T = h[p + 2] * g, D = c[v + 3] * (1 / 255), I = c[v] * D, z = c[v + 1] * D, P = c[v + 2] * D, B = 1 - g, k = g + D * B, N = k == 0 ? 0 : 1 / k; + c[v + 3] = 255 * k, c[v + 0] = (M + I * B) * N, c[v + 1] = (L + z * B) * N, c[v + 2] = (T + P * B) * N; } else if (s == 2) { var g = h[p + 3], M = h[p], L = h[p + 1], T = h[p + 2], D = c[v + 3], I = c[v], z = c[v + 1], P = c[v + 2]; g == D && M == I && L == z && T == P ? (c[v] = 0, c[v + 1] = 0, c[v + 2] = 0, c[v + 3] = 0) : (c[v] = M, c[v + 1] = L, c[v + 2] = T, c[v + 3] = g); @@ -20347,16 +20347,16 @@ ATOM`, g); o += L, v(A, o, p(A, o - L - 4, L + 4)), o += 4; } } - for (var B = 0, F = 0; F < g.frames.length; F++) { - var N = g.frames[F]; - M && (v(A, o, 26), o += 4, l(A, o, "fcTL"), o += 4, v(A, o, B++), o += 4, v(A, o, N.rect.width), o += 4, v(A, o, N.rect.height), o += 4, v(A, o, N.rect.x), o += 4, v(A, o, N.rect.y), o += 4, a(A, o, C[F]), o += 2, a(A, o, 1e3), o += 2, A[o] = N.dispose, o++, A[o] = N.blend, o++, v(A, o, p(A, o - 30, 30)), o += 4); + for (var B = 0, k = 0; k < g.frames.length; k++) { + var N = g.frames[k]; + M && (v(A, o, 26), o += 4, l(A, o, "fcTL"), o += 4, v(A, o, B++), o += 4, v(A, o, N.rect.width), o += 4, v(A, o, N.rect.height), o += 4, v(A, o, N.rect.x), o += 4, v(A, o, N.rect.y), o += 4, a(A, o, C[k]), o += 2, a(A, o, 1e3), o += 2, A[o] = N.dispose, o++, A[o] = N.blend, o++, v(A, o, p(A, o - 30, 30)), o += 4); var $ = N.cimg, L = $.length; - v(A, o, L + (F == 0 ? 0 : 4)), o += 4; - var k = o; - l(A, o, F == 0 ? "IDAT" : "fdAT"), o += 4, F != 0 && (v(A, o, B++), o += 4); + v(A, o, L + (k == 0 ? 0 : 4)), o += 4; + var F = o; + l(A, o, k == 0 ? "IDAT" : "fdAT"), o += 4, k != 0 && (v(A, o, B++), o += 4); for (var s = 0; s < L; s++) A[o + s] = $[s]; - o += L, v(A, o, p(A, k, o - k)), o += 4; + o += L, v(A, o, p(A, F, o - F)), o += 4; } return v(A, o, 0), o += 4, l(A, o, "IEND"), o += 4, v(A, o, p(A, o - 4, 4)), o += 4, A.buffer.slice(0, o); }, u.encode.compressPNG = function(h, _, E, c, C) { @@ -20390,49 +20390,49 @@ ATOM`, g); var I = l ? C : !1, z = M.length; z <= 256 && b == !1 && (z <= 2 ? S = 1 : z <= 4 ? S = 2 : z <= 16 ? S = 4 : S = 8, C && (S = 8), l = !0); for (var P = [], w = 0; w < h.length; w++) { - var B = new Uint8Array(h[w]), F = new Uint32Array(B.buffer), N = 0, $ = 0, k = _, G = E, H = 0; + var B = new Uint8Array(h[w]), k = new Uint32Array(B.buffer), N = 0, $ = 0, F = _, G = E, H = 0; if (w != 0 && !I) { for (var U = C || w == 1 || P[P.length - 2].dispose == 2 ? 1 : 2, V = 0, Q = 1e9, ae = 0; ae < U; ae++) { for (var se = new Uint8Array(h[w - 1 - ae]), oe = new Uint32Array(h[w - 1 - ae]), q = _, me = E, ne = -1, fe = -1, Ce = 0; Ce < E; Ce++) for (var Me = 0; Me < _; Me++) { var a = Ce * _ + Me; - F[a] != oe[a] && (Me < q && (q = Me), Me > ne && (ne = Me), Ce < me && (me = Ce), Ce > fe && (fe = Ce)); + k[a] != oe[a] && (Me < q && (q = Me), Me > ne && (ne = Me), Ce < me && (me = Ce), Ce > fe && (fe = Ce)); } var Te = ne == -1 ? 1 : (ne - q + 1) * (fe - me + 1); - Te < Q && (Q = Te, V = ae, ne == -1 ? (N = $ = 0, k = G = 1) : (N = q, $ = me, k = ne - q + 1, G = fe - me + 1)); + Te < Q && (Q = Te, V = ae, ne == -1 ? (N = $ = 0, F = G = 1) : (N = q, $ = me, F = ne - q + 1, G = fe - me + 1)); } var se = new Uint8Array(h[w - 1 - V]); V == 1 && (P[P.length - 1].dispose = 2); - var pe = new Uint8Array(k * G * 4); - new Uint32Array(pe.buffer), u._copyTile(se, _, E, pe, k, G, -N, -$, 0), u._copyTile(B, _, E, pe, k, G, -N, -$, 3) ? (u._copyTile(B, _, E, pe, k, G, -N, -$, 2), H = 1) : (u._copyTile(B, _, E, pe, k, G, -N, -$, 0), H = 0), B = pe, F = new Uint32Array(B.buffer); + var pe = new Uint8Array(F * G * 4); + new Uint32Array(pe.buffer), u._copyTile(se, _, E, pe, F, G, -N, -$, 0), u._copyTile(B, _, E, pe, F, G, -N, -$, 3) ? (u._copyTile(B, _, E, pe, F, G, -N, -$, 2), H = 1) : (u._copyTile(B, _, E, pe, F, G, -N, -$, 0), H = 0), B = pe, k = new Uint32Array(B.buffer); } - var we = 4 * k; + var we = 4 * F; if (z <= 256 && b == !1) { - we = Math.ceil(S * k / 8); + we = Math.ceil(S * F / 8); for (var pe = new Uint8Array(we * G), Ce = 0; Ce < G; Ce++) { - var a = Ce * we, ke = Ce * k; + var a = Ce * we, Fe = Ce * F; if (S == 8) - for (var Me = 0; Me < k; Me++) - pe[a + Me] = g[F[ke + Me]]; + for (var Me = 0; Me < F; Me++) + pe[a + Me] = g[k[Fe + Me]]; else if (S == 4) - for (var Me = 0; Me < k; Me++) - pe[a + (Me >> 1)] |= g[F[ke + Me]] << 4 - (Me & 1) * 4; + for (var Me = 0; Me < F; Me++) + pe[a + (Me >> 1)] |= g[k[Fe + Me]] << 4 - (Me & 1) * 4; else if (S == 2) - for (var Me = 0; Me < k; Me++) - pe[a + (Me >> 2)] |= g[F[ke + Me]] << 6 - (Me & 3) * 2; + for (var Me = 0; Me < F; Me++) + pe[a + (Me >> 2)] |= g[k[Fe + Me]] << 6 - (Me & 3) * 2; else if (S == 1) - for (var Me = 0; Me < k; Me++) - pe[a + (Me >> 3)] |= g[F[ke + Me]] << 7 - (Me & 7) * 1; + for (var Me = 0; Me < F; Me++) + pe[a + (Me >> 3)] |= g[k[Fe + Me]] << 7 - (Me & 7) * 1; } B = pe, A = 3, s = 1; } else if (l == !1 && h.length == 1) { - for (var pe = new Uint8Array(k * G * 3), Ue = k * G, a = 0; a < Ue; a++) { + for (var pe = new Uint8Array(F * G * 3), Ue = F * G, a = 0; a < Ue; a++) { var Ne = a * 3, Be = a * 4; pe[Ne] = B[Be], pe[Ne + 1] = B[Be + 1], pe[Ne + 2] = B[Be + 2]; } - B = pe, A = 2, s = 3, we = 3 * k; + B = pe, A = 2, s = 3, we = 3 * F; } - P.push({ rect: { x: N, y: $, width: k, height: G }, img: B, bpl: we, bpp: s, blend: H, dispose: I ? 1 : 0 }); + P.push({ rect: { x: N, y: $, width: F, height: G }, img: B, bpl: we, bpp: s, blend: H, dispose: I ? 1 : 0 }); } return { ctype: A, depth: S, plte: M, gotAlpha: l, frames: P }; }, u.encode._filterZero = function(h, _, E, c, C) { @@ -20531,9 +20531,9 @@ ATOM`, g); return V.bst.N - U.bst.N; }); for (var I = 0; I < c.length; I++) { - for (var z = u.quantize.planeDst, P = new Uint8Array(c[I].buffer), B = new Uint32Array(c[I].buffer), F = P.length, b = 0; b < F; b += 4) { - for (var N = P[b] * 0.00392156862745098, $ = P[b + 1] * (1 / 255), k = P[b + 2] * (1 / 255), G = P[b + 3] * (1 / 255), H = v; H.left; ) - H = z(H.est, N, $, k, G) <= 0 ? H.left : H.right; + for (var z = u.quantize.planeDst, P = new Uint8Array(c[I].buffer), B = new Uint32Array(c[I].buffer), k = P.length, b = 0; b < k; b += 4) { + for (var N = P[b] * 0.00392156862745098, $ = P[b + 1] * (1 / 255), F = P[b + 2] * (1 / 255), G = P[b + 3] * (1 / 255), H = v; H.left; ) + H = z(H.est, N, $, F, G) <= 0 ? H.left : H.right; B[b >> 2] = H.est.rgba; } c[I] = B.buffer; @@ -21070,8 +21070,8 @@ ATOM`, g); ), h = t( /*! ./messages */ "./node_modules/upng-js/node_modules/pako/lib/zlib/messages.js" - ), _ = 0, E = 1, c = 3, C = 4, b = 5, A = 0, S = 1, s = -2, o = -3, w = -5, p = -1, v = 1, a = 2, l = 3, g = 4, M = 0, L = 2, T = 8, D = 9, I = 15, z = 8, P = 29, B = 256, F = B + 1 + P, N = 30, $ = 19, k = 2 * F + 1, G = 15, H = 3, U = 258, V = U + H + 1, Q = 32, ae = 42, oe = 69, q = 73, me = 91, ne = 103, fe = 113, Ce = 666, Me = 1, Te = 2, se = 3, pe = 4, we = 3; - function ke(R, be) { + ), _ = 0, E = 1, c = 3, C = 4, b = 5, A = 0, S = 1, s = -2, o = -3, w = -5, p = -1, v = 1, a = 2, l = 3, g = 4, M = 0, L = 2, T = 8, D = 9, I = 15, z = 8, P = 29, B = 256, k = B + 1 + P, N = 30, $ = 19, F = 2 * k + 1, G = 15, H = 3, U = 258, V = U + H + 1, Q = 32, ae = 42, oe = 69, q = 73, me = 91, ne = 103, fe = 113, Ce = 666, Me = 1, Te = 2, se = 3, pe = 4, we = 3; + function Fe(R, be) { return R.msg = h[be], be; } function Ue(R) { @@ -21263,17 +21263,17 @@ ATOM`, g); R.window_size = 2 * R.w_size, Ne(R.head), R.max_lazy_match = Ie[R.level].max_lazy, R.good_match = Ie[R.level].good_length, R.nice_match = Ie[R.level].nice_length, R.max_chain_length = Ie[R.level].max_chain, R.strstart = 0, R.block_start = 0, R.lookahead = 0, R.insert = 0, R.match_length = R.prev_length = H - 1, R.match_available = 0, R.ins_h = 0; } function Z() { - this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = T, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new n.Buf16(k * 2), this.dyn_dtree = new n.Buf16((2 * N + 1) * 2), this.bl_tree = new n.Buf16((2 * $ + 1) * 2), Ne(this.dyn_ltree), Ne(this.dyn_dtree), Ne(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new n.Buf16(G + 1), this.heap = new n.Buf16(2 * F + 1), Ne(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new n.Buf16(2 * F + 1), Ne(this.depth), this.l_buf = 0, this.lit_bufsize = 0, this.last_lit = 0, this.d_buf = 0, this.opt_len = 0, this.static_len = 0, this.matches = 0, this.insert = 0, this.bi_buf = 0, this.bi_valid = 0; + this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = T, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new n.Buf16(F * 2), this.dyn_dtree = new n.Buf16((2 * N + 1) * 2), this.bl_tree = new n.Buf16((2 * $ + 1) * 2), Ne(this.dyn_ltree), Ne(this.dyn_dtree), Ne(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new n.Buf16(G + 1), this.heap = new n.Buf16(2 * k + 1), Ne(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new n.Buf16(2 * k + 1), Ne(this.depth), this.l_buf = 0, this.lit_bufsize = 0, this.last_lit = 0, this.d_buf = 0, this.opt_len = 0, this.static_len = 0, this.matches = 0, this.insert = 0, this.bi_buf = 0, this.bi_valid = 0; } function ce(R) { var be; - return !R || !R.state ? ke(R, s) : (R.total_in = R.total_out = 0, R.data_type = L, be = R.state, be.pending = 0, be.pending_out = 0, be.wrap < 0 && (be.wrap = -be.wrap), be.status = be.wrap ? ae : fe, R.adler = be.wrap === 2 ? 0 : 1, be.last_flush = _, f._tr_init(be), A); + return !R || !R.state ? Fe(R, s) : (R.total_in = R.total_out = 0, R.data_type = L, be = R.state, be.pending = 0, be.pending_out = 0, be.wrap < 0 && (be.wrap = -be.wrap), be.status = be.wrap ? ae : fe, R.adler = be.wrap === 2 ? 0 : 1, be.last_flush = _, f._tr_init(be), A); } function Ae(R) { var be = ce(R); return be === A && Re(R.state), be; } - function Fe(R, be) { + function ke(R, be) { return !R || !R.state || R.state.wrap !== 2 ? s : (R.state.gzhead = be, A); } function he(R, be, Ee, X, le, Le) { @@ -21281,7 +21281,7 @@ ATOM`, g); return s; var Ze = 1; if (be === p && (be = 6), X < 0 ? (Ze = 0, X = -X) : X > 15 && (Ze = 2, X -= 16), le < 1 || le > D || Ee !== T || X < 8 || X > 15 || be < 0 || be > 9 || Le < 0 || Le > g) - return ke(R, s); + return Fe(R, s); X === 8 && (X = 9); var Ke = new Z(); return R.state = Ke, Ke.strm = R, Ke.wrap = Ze, Ke.gzhead = null, Ke.w_bits = X, Ke.w_size = 1 << Ke.w_bits, Ke.w_mask = Ke.w_size - 1, Ke.hash_bits = le + 7, Ke.hash_size = 1 << Ke.hash_bits, Ke.hash_mask = Ke.hash_size - 1, Ke.hash_shift = ~~((Ke.hash_bits + H - 1) / H), Ke.window = new n.Buf8(Ke.w_size * 2), Ke.head = new n.Buf16(Ke.hash_size), Ke.prev = new n.Buf16(Ke.w_size), Ke.lit_bufsize = 1 << le + 6, Ke.pending_buf_size = Ke.lit_bufsize * 4, Ke.pending_buf = new n.Buf8(Ke.pending_buf_size), Ke.d_buf = 1 * Ke.lit_bufsize, Ke.l_buf = 3 * Ke.lit_bufsize, Ke.level = be, Ke.strategy = Le, Ke.method = Ee, Ae(R); @@ -21292,9 +21292,9 @@ ATOM`, g); function j(R, be) { var Ee, X, le, Le; if (!R || !R.state || be > b || be < 0) - return R ? ke(R, s) : s; + return R ? Fe(R, s) : s; if (X = R.state, !R.output || !R.input && R.avail_in !== 0 || X.status === Ce && be !== C) - return ke(R, R.avail_out === 0 ? w : s); + return Fe(R, R.avail_out === 0 ? w : s); if (X.strm = R, Ee = X.last_flush, X.last_flush = be, X.status === ae) if (X.wrap === 2) R.adler = 0, ye(X, 31), ye(X, 139), ye(X, 8), X.gzhead ? (ye( @@ -21342,9 +21342,9 @@ ATOM`, g); if (Be(R), R.avail_out === 0) return X.last_flush = -1, A; } else if (R.avail_in === 0 && Ue(be) <= Ue(Ee) && be !== C) - return ke(R, w); + return Fe(R, w); if (X.status === Ce && R.avail_in !== 0) - return ke(R, w); + return Fe(R, w); if (R.avail_in !== 0 || X.lookahead !== 0 || be !== _ && X.status !== Ce) { var je = X.strategy === a ? de(X, be) : X.strategy === l ? ee(X, be) : Ie[X.level].func(X, be); if ((je === se || je === pe) && (X.status = Ce), je === Me || je === se) @@ -21356,7 +21356,7 @@ ATOM`, g); } function $e(R) { var be; - return !R || !R.state ? s : (be = R.state.status, be !== ae && be !== oe && be !== q && be !== me && be !== ne && be !== fe && be !== Ce ? ke(R, s) : (R.state = null, be === fe ? ke(R, o) : A)); + return !R || !R.state ? s : (be = R.state.status, be !== ae && be !== oe && be !== q && be !== me && be !== ne && be !== fe && be !== Ce ? Fe(R, s) : (R.state = null, be === fe ? Fe(R, o) : A)); } function Ve(R, be) { var Ee = be.length, X, le, Le, Ze, Ke, je, Je, Lt; @@ -21371,7 +21371,7 @@ ATOM`, g); } return X.strstart += X.lookahead, X.block_start = X.strstart, X.insert = X.lookahead, X.lookahead = 0, X.match_length = X.prev_length = H - 1, X.match_available = 0, R.next_in = je, R.input = Je, R.avail_in = Ke, X.wrap = Ze, A; } - e.deflateInit = Oe, e.deflateInit2 = he, e.deflateReset = Ae, e.deflateResetKeep = ce, e.deflateSetHeader = Fe, e.deflate = j, e.deflateEnd = $e, e.deflateSetDictionary = Ve, e.deflateInfo = "pako deflate (from Nodeca project)"; + e.deflateInit = Oe, e.deflateInit2 = he, e.deflateReset = Ae, e.deflateResetKeep = ce, e.deflateSetHeader = ke, e.deflate = j, e.deflateEnd = $e, e.deflateSetDictionary = Ve, e.deflateInfo = "pako deflate (from Nodeca project)"; } ), /***/ @@ -21508,7 +21508,7 @@ ATOM`, g); ), h = t( /*! ./inftrees */ "./node_modules/upng-js/node_modules/pako/lib/zlib/inftrees.js" - ), _ = 0, E = 1, c = 2, C = 4, b = 5, A = 6, S = 0, s = 1, o = 2, w = -2, p = -3, v = -4, a = -5, l = 8, g = 1, M = 2, L = 3, T = 4, D = 5, I = 6, z = 7, P = 8, B = 9, F = 10, N = 11, $ = 12, k = 13, G = 14, H = 15, U = 16, V = 17, Q = 18, ae = 19, oe = 20, q = 21, me = 22, ne = 23, fe = 24, Ce = 25, Me = 26, Te = 27, se = 28, pe = 29, we = 30, ke = 31, Ue = 32, Ne = 852, Be = 592, ue = 15, ye = ue; + ), _ = 0, E = 1, c = 2, C = 4, b = 5, A = 6, S = 0, s = 1, o = 2, w = -2, p = -3, v = -4, a = -5, l = 8, g = 1, M = 2, L = 3, T = 4, D = 5, I = 6, z = 7, P = 8, B = 9, k = 10, N = 11, $ = 12, F = 13, G = 14, H = 15, U = 16, V = 17, Q = 18, ae = 19, oe = 20, q = 21, me = 22, ne = 23, fe = 24, Ce = 25, Me = 26, Te = 27, se = 28, pe = 29, we = 30, Fe = 31, Ue = 32, Ne = 852, Be = 592, ue = 15, ye = ue; function ge(he) { return (he >>> 24 & 255) + (he >>> 8 & 65280) + ((he & 65280) << 8) + ((he & 255) << 24); } @@ -21557,19 +21557,19 @@ ATOM`, g); return R.window === null && (R.wsize = 1 << R.wbits, R.wnext = 0, R.whave = 0, R.window = new n.Buf8(R.wsize)), $e >= R.wsize ? (n.arraySet(R.window, Oe, j - R.wsize, R.wsize, 0), R.wnext = 0, R.whave = R.wsize) : (Ve = R.wsize - R.wnext, Ve > $e && (Ve = $e), n.arraySet(R.window, Oe, j - $e, Ve, R.wnext), $e -= Ve, $e ? (n.arraySet(R.window, Oe, j - $e, $e, 0), R.wnext = $e, R.whave = R.wsize) : (R.wnext += Ve, R.wnext === R.wsize && (R.wnext = 0), R.whave < R.wsize && (R.whave += Ve))), 0; } function Z(he, Oe) { - var j, $e, Ve, R, be, Ee, X, le, Le, Ze, Ke, je, Je, Lt, rt = 0, it, tt, Et, lt, wt, Pt, vt, bt, mt = new n.Buf8(4), Tt, Ot, Ft = ( + var j, $e, Ve, R, be, Ee, X, le, Le, Ze, Ke, je, Je, Lt, rt = 0, it, tt, Et, lt, wt, Pt, vt, bt, mt = new n.Buf8(4), Tt, Ot, kt = ( /* permutation of code lengths */ [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15] ); if (!he || !he.state || !he.output || !he.input && he.avail_in !== 0) return w; - j = he.state, j.mode === $ && (j.mode = k), be = he.next_out, Ve = he.output, X = he.avail_out, R = he.next_in, $e = he.input, Ee = he.avail_in, le = j.hold, Le = j.bits, Ze = Ee, Ke = X, bt = S; + j = he.state, j.mode === $ && (j.mode = F), be = he.next_out, Ve = he.output, X = he.avail_out, R = he.next_in, $e = he.input, Ee = he.avail_in, le = j.hold, Le = j.bits, Ze = Ee, Ke = X, bt = S; e: for (; ; ) switch (j.mode) { case g: if (j.wrap === 0) { - j.mode = k; + j.mode = F; break; } for (; Le < 16; ) { @@ -21596,7 +21596,7 @@ ATOM`, g); he.msg = "invalid window size", j.mode = we; break; } - j.dmax = 1 << vt, he.adler = j.check = 1, j.mode = le & 512 ? F : $, le = 0, Le = 0; + j.dmax = 1 << vt, he.adler = j.check = 1, j.mode = le & 512 ? k : $, le = 0, Le = 0; break; case M: for (; Le < 16; ) { @@ -21692,7 +21692,7 @@ ATOM`, g); } j.head && (j.head.hcrc = j.flags >> 9 & 1, j.head.done = !0), he.adler = j.check = 0, j.mode = $; break; - case F: + case k: for (; Le < 32; ) { if (Ee === 0) break e; @@ -21706,7 +21706,7 @@ ATOM`, g); case $: if (Oe === b || Oe === A) break e; - case k: + case F: if (j.last) { le >>>= Le & 7, Le -= Le & 7, j.mode = Te; break; @@ -21775,10 +21775,10 @@ ATOM`, g); break e; Ee--, le += $e[R++] << Le, Le += 8; } - j.lens[Ft[j.have++]] = le & 7, le >>>= 3, Le -= 3; + j.lens[kt[j.have++]] = le & 7, le >>>= 3, Le -= 3; } for (; j.have < 19; ) - j.lens[Ft[j.have++]] = 0; + j.lens[kt[j.have++]] = 0; if (j.lencode = j.lendyn, j.lenbits = 7, Tt = { bits: j.lenbits }, bt = h(_, j.lens, 0, 19, j.lencode, 0, j.work, Tt), j.lenbits = Tt.bits, bt) { he.msg = "invalid code lengths set", j.mode = we; break; @@ -21977,7 +21977,7 @@ ATOM`, g); case we: bt = p; break e; - case ke: + case Fe: return v; case Ue: default: @@ -21996,11 +21996,11 @@ ATOM`, g); var j; return !he || !he.state || (j = he.state, !(j.wrap & 2)) ? w : (j.head = Oe, Oe.done = !1, S); } - function Fe(he, Oe) { + function ke(he, Oe) { var j = Oe.length, $e, Ve, R; - return !he || !he.state || ($e = he.state, $e.wrap !== 0 && $e.mode !== N) ? w : $e.mode === N && (Ve = 1, Ve = f(Ve, Oe, j, 0), Ve !== $e.check) ? p : (R = Re(he, Oe, j, j), R ? ($e.mode = ke, v) : ($e.havedict = 1, S)); + return !he || !he.state || ($e = he.state, $e.wrap !== 0 && $e.mode !== N) ? w : $e.mode === N && (Ve = 1, Ve = f(Ve, Oe, j, 0), Ve !== $e.check) ? p : (R = Re(he, Oe, j, j), R ? ($e.mode = Fe, v) : ($e.havedict = 1, S)); } - e.inflateReset = He, e.inflateReset2 = We, e.inflateResetKeep = ze, e.inflateInit = K, e.inflateInit2 = Y, e.inflate = Z, e.inflateEnd = ce, e.inflateGetHeader = Ae, e.inflateSetDictionary = Fe, e.inflateInfo = "pako inflate (from Nodeca project)"; + e.inflateReset = He, e.inflateReset2 = We, e.inflateResetKeep = ze, e.inflateInit = K, e.inflateInit2 = Y, e.inflate = Z, e.inflateEnd = ce, e.inflateGetHeader = Ae, e.inflateSetDictionary = ke, e.inflateInfo = "pako inflate (from Nodeca project)"; } ), /***/ @@ -22149,7 +22149,7 @@ ATOM`, g); 64 ]; r.exports = function(s, o, w, p, v, a, l, g) { - var M = g.bits, L = 0, T = 0, D = 0, I = 0, z = 0, P = 0, B = 0, F = 0, N = 0, $ = 0, k, G, H, U, V, Q = null, ae = 0, oe, q = new n.Buf16(f + 1), me = new n.Buf16(f + 1), ne = null, fe = 0, Ce, Me, Te; + var M = g.bits, L = 0, T = 0, D = 0, I = 0, z = 0, P = 0, B = 0, k = 0, N = 0, $ = 0, F, G, H, U, V, Q = null, ae = 0, oe, q = new n.Buf16(f + 1), me = new n.Buf16(f + 1), ne = null, fe = 0, Ce, Me, Te; for (L = 0; L <= f; L++) q[L] = 0; for (T = 0; T < p; T++) @@ -22160,10 +22160,10 @@ ATOM`, g); return v[a++] = 20971520, v[a++] = 20971520, g.bits = 1, 0; for (D = 1; D < I && q[D] === 0; D++) ; - for (z < D && (z = D), F = 1, L = 1; L <= f; L++) - if (F <<= 1, F -= q[L], F < 0) + for (z < D && (z = D), k = 1, L = 1; L <= f; L++) + if (k <<= 1, k -= q[L], k < 0) return -1; - if (F > 0 && (s === h || I !== 1)) + if (k > 0 && (s === h || I !== 1)) return -1; for (me[1] = 0, L = 1; L < f; L++) me[L + 1] = me[L] + q[L]; @@ -22172,20 +22172,20 @@ ATOM`, g); if (s === h ? (Q = ne = l, oe = 19) : s === _ ? (Q = c, ae -= 257, ne = C, fe -= 257, oe = 256) : (Q = b, ne = A, oe = -1), $ = 0, T = 0, L = D, V = a, P = z, B = 0, H = -1, N = 1 << z, U = N - 1, s === _ && N > u || s === E && N > y) return 1; for (; ; ) { - Ce = L - B, l[T] < oe ? (Me = 0, Te = l[T]) : l[T] > oe ? (Me = ne[fe + l[T]], Te = Q[ae + l[T]]) : (Me = 96, Te = 0), k = 1 << L - B, G = 1 << P, D = G; + Ce = L - B, l[T] < oe ? (Me = 0, Te = l[T]) : l[T] > oe ? (Me = ne[fe + l[T]], Te = Q[ae + l[T]]) : (Me = 96, Te = 0), F = 1 << L - B, G = 1 << P, D = G; do - G -= k, v[V + ($ >> B) + G] = Ce << 24 | Me << 16 | Te | 0; + G -= F, v[V + ($ >> B) + G] = Ce << 24 | Me << 16 | Te | 0; while (G !== 0); - for (k = 1 << L - 1; $ & k; ) - k >>= 1; - if (k !== 0 ? ($ &= k - 1, $ += k) : $ = 0, T++, --q[L] === 0) { + for (F = 1 << L - 1; $ & F; ) + F >>= 1; + if (F !== 0 ? ($ &= F - 1, $ += F) : $ = 0, T++, --q[L] === 0) { if (L === I) break; L = o[w + l[T]]; } if (L > z && ($ & U) !== H) { - for (B === 0 && (B = z), V += D, P = L - B, F = 1 << P; P + B < I && (F -= q[P + B], !(F <= 0)); ) - P++, F <<= 1; + for (B === 0 && (B = z), V += D, P = L - B, k = 1 << P; P + B < I && (k -= q[P + B], !(k <= 0)); ) + P++, k <<= 1; if (N += 1 << P, s === _ && N > u || s === E && N > y) return 1; H = $ & U, v[H] = z << 24 | P << 16 | V - a | 0; @@ -22248,27 +22248,27 @@ ATOM`, g); ), P = ( /* extra bits for each bit length code */ [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7] - ), B = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], F = 512, N = new Array((o + 2) * 2); + ), B = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], k = 512, N = new Array((o + 2) * 2); _(N); var $ = new Array(w * 2); _($); - var k = new Array(F); - _(k); + var F = new Array(k); + _(F); var G = new Array(A - b + 1); _(G); var H = new Array(S); _(H); var U = new Array(w); _(U); - function V(Z, ce, Ae, Fe, he) { - this.static_tree = Z, this.extra_bits = ce, this.extra_base = Ae, this.elems = Fe, this.max_length = he, this.has_stree = Z && Z.length; + function V(Z, ce, Ae, ke, he) { + this.static_tree = Z, this.extra_bits = ce, this.extra_base = Ae, this.elems = ke, this.max_length = he, this.has_stree = Z && Z.length; } var Q, ae, oe; function q(Z, ce) { this.dyn_tree = Z, this.max_code = 0, this.stat_desc = ce; } function me(Z) { - return Z < 256 ? k[Z] : k[256 + (Z >>> 7)]; + return Z < 256 ? F[Z] : F[256 + (Z >>> 7)]; } function ne(Z, ce) { Z.pending_buf[Z.pending++] = ce & 255, Z.pending_buf[Z.pending++] = ce >>> 8 & 255; @@ -22295,11 +22295,11 @@ ATOM`, g); Z.bi_valid === 16 ? (ne(Z, Z.bi_buf), Z.bi_buf = 0, Z.bi_valid = 0) : Z.bi_valid >= 8 && (Z.pending_buf[Z.pending++] = Z.bi_buf & 255, Z.bi_buf >>= 8, Z.bi_valid -= 8); } function se(Z, ce) { - var Ae = ce.dyn_tree, Fe = ce.max_code, he = ce.stat_desc.static_tree, Oe = ce.stat_desc.has_stree, j = ce.stat_desc.extra_bits, $e = ce.stat_desc.extra_base, Ve = ce.stat_desc.max_length, R, be, Ee, X, le, Le, Ze = 0; + var Ae = ce.dyn_tree, ke = ce.max_code, he = ce.stat_desc.static_tree, Oe = ce.stat_desc.has_stree, j = ce.stat_desc.extra_bits, $e = ce.stat_desc.extra_base, Ve = ce.stat_desc.max_length, R, be, Ee, X, le, Le, Ze = 0; for (X = 0; X <= a; X++) Z.bl_count[X] = 0; for (Ae[Z.heap[Z.heap_max] * 2 + 1] = 0, R = Z.heap_max + 1; R < v; R++) - be = Z.heap[R], X = Ae[Ae[be * 2 + 1] * 2 + 1] + 1, X > Ve && (X = Ve, Ze++), Ae[be * 2 + 1] = X, !(be > Fe) && (Z.bl_count[X]++, le = 0, be >= $e && (le = j[be - $e]), Le = Ae[be * 2], Z.opt_len += Le * (X + le), Oe && (Z.static_len += Le * (he[be * 2 + 1] + le))); + be = Z.heap[R], X = Ae[Ae[be * 2 + 1] * 2 + 1] + 1, X > Ve && (X = Ve, Ze++), Ae[be * 2 + 1] = X, !(be > ke) && (Z.bl_count[X]++, le = 0, be >= $e && (le = j[be - $e]), Le = Ae[be * 2], Z.opt_len += Le * (X + le), Oe && (Z.static_len += Le * (he[be * 2 + 1] + le))); if (Ze !== 0) { do { for (X = Ve - 1; Z.bl_count[X] === 0; ) @@ -22308,29 +22308,29 @@ ATOM`, g); } while (Ze > 0); for (X = Ve; X !== 0; X--) for (be = Z.bl_count[X]; be !== 0; ) - Ee = Z.heap[--R], !(Ee > Fe) && (Ae[Ee * 2 + 1] !== X && (Z.opt_len += (X - Ae[Ee * 2 + 1]) * Ae[Ee * 2], Ae[Ee * 2 + 1] = X), be--); + Ee = Z.heap[--R], !(Ee > ke) && (Ae[Ee * 2 + 1] !== X && (Z.opt_len += (X - Ae[Ee * 2 + 1]) * Ae[Ee * 2], Ae[Ee * 2 + 1] = X), be--); } } function pe(Z, ce, Ae) { - var Fe = new Array(a + 1), he = 0, Oe, j; + var ke = new Array(a + 1), he = 0, Oe, j; for (Oe = 1; Oe <= a; Oe++) - Fe[Oe] = he = he + Ae[Oe - 1] << 1; + ke[Oe] = he = he + Ae[Oe - 1] << 1; for (j = 0; j <= ce; j++) { var $e = Z[j * 2 + 1]; - $e !== 0 && (Z[j * 2] = Me(Fe[$e]++, $e)); + $e !== 0 && (Z[j * 2] = Me(ke[$e]++, $e)); } } function we() { - var Z, ce, Ae, Fe, he, Oe = new Array(a + 1); - for (Ae = 0, Fe = 0; Fe < S - 1; Fe++) - for (H[Fe] = Ae, Z = 0; Z < 1 << I[Fe]; Z++) - G[Ae++] = Fe; - for (G[Ae - 1] = Fe, he = 0, Fe = 0; Fe < 16; Fe++) - for (U[Fe] = he, Z = 0; Z < 1 << z[Fe]; Z++) - k[he++] = Fe; - for (he >>= 7; Fe < w; Fe++) - for (U[Fe] = he << 7, Z = 0; Z < 1 << z[Fe] - 7; Z++) - k[256 + he++] = Fe; + var Z, ce, Ae, ke, he, Oe = new Array(a + 1); + for (Ae = 0, ke = 0; ke < S - 1; ke++) + for (H[ke] = Ae, Z = 0; Z < 1 << I[ke]; Z++) + G[Ae++] = ke; + for (G[Ae - 1] = ke, he = 0, ke = 0; ke < 16; ke++) + for (U[ke] = he, Z = 0; Z < 1 << z[ke]; Z++) + F[he++] = ke; + for (he >>= 7; ke < w; ke++) + for (U[ke] = he << 7, Z = 0; Z < 1 << z[ke] - 7; Z++) + F[256 + he++] = ke; for (ce = 0; ce <= a; ce++) Oe[ce] = 0; for (Z = 0; Z <= 143; ) @@ -22345,7 +22345,7 @@ ATOM`, g); $[Z * 2 + 1] = 5, $[Z * 2] = Me(Z, 5); Q = new V(N, I, s + 1, o, a), ae = new V($, z, 0, w, a), oe = new V(new Array(0), P, 0, p, g); } - function ke(Z) { + function Fe(Z) { var ce; for (ce = 0; ce < o; ce++) Z.dyn_ltree[ce * 2] = 0; @@ -22358,32 +22358,32 @@ ATOM`, g); function Ue(Z) { Z.bi_valid > 8 ? ne(Z, Z.bi_buf) : Z.bi_valid > 0 && (Z.pending_buf[Z.pending++] = Z.bi_buf), Z.bi_buf = 0, Z.bi_valid = 0; } - function Ne(Z, ce, Ae, Fe) { - Ue(Z), Fe && (ne(Z, Ae), ne(Z, ~Ae)), n.arraySet(Z.pending_buf, Z.window, ce, Ae, Z.pending), Z.pending += Ae; + function Ne(Z, ce, Ae, ke) { + Ue(Z), ke && (ne(Z, Ae), ne(Z, ~Ae)), n.arraySet(Z.pending_buf, Z.window, ce, Ae, Z.pending), Z.pending += Ae; } - function Be(Z, ce, Ae, Fe) { + function Be(Z, ce, Ae, ke) { var he = ce * 2, Oe = Ae * 2; - return Z[he] < Z[Oe] || Z[he] === Z[Oe] && Fe[ce] <= Fe[Ae]; + return Z[he] < Z[Oe] || Z[he] === Z[Oe] && ke[ce] <= ke[Ae]; } function ue(Z, ce, Ae) { - for (var Fe = Z.heap[Ae], he = Ae << 1; he <= Z.heap_len && (he < Z.heap_len && Be(ce, Z.heap[he + 1], Z.heap[he], Z.depth) && he++, !Be(ce, Fe, Z.heap[he], Z.depth)); ) + for (var ke = Z.heap[Ae], he = Ae << 1; he <= Z.heap_len && (he < Z.heap_len && Be(ce, Z.heap[he + 1], Z.heap[he], Z.depth) && he++, !Be(ce, ke, Z.heap[he], Z.depth)); ) Z.heap[Ae] = Z.heap[he], Ae = he, he <<= 1; - Z.heap[Ae] = Fe; + Z.heap[Ae] = ke; } function ye(Z, ce, Ae) { - var Fe, he, Oe = 0, j, $e; + var ke, he, Oe = 0, j, $e; if (Z.last_lit !== 0) do - Fe = Z.pending_buf[Z.d_buf + Oe * 2] << 8 | Z.pending_buf[Z.d_buf + Oe * 2 + 1], he = Z.pending_buf[Z.l_buf + Oe], Oe++, Fe === 0 ? Ce(Z, he, ce) : (j = G[he], Ce(Z, j + s + 1, ce), $e = I[j], $e !== 0 && (he -= H[j], fe(Z, he, $e)), Fe--, j = me(Fe), Ce(Z, j, Ae), $e = z[j], $e !== 0 && (Fe -= U[j], fe(Z, Fe, $e))); + ke = Z.pending_buf[Z.d_buf + Oe * 2] << 8 | Z.pending_buf[Z.d_buf + Oe * 2 + 1], he = Z.pending_buf[Z.l_buf + Oe], Oe++, ke === 0 ? Ce(Z, he, ce) : (j = G[he], Ce(Z, j + s + 1, ce), $e = I[j], $e !== 0 && (he -= H[j], fe(Z, he, $e)), ke--, j = me(ke), Ce(Z, j, Ae), $e = z[j], $e !== 0 && (ke -= U[j], fe(Z, ke, $e))); while (Oe < Z.last_lit); Ce(Z, M, ce); } function ge(Z, ce) { - var Ae = ce.dyn_tree, Fe = ce.stat_desc.static_tree, he = ce.stat_desc.has_stree, Oe = ce.stat_desc.elems, j, $e, Ve = -1, R; + var Ae = ce.dyn_tree, ke = ce.stat_desc.static_tree, he = ce.stat_desc.has_stree, Oe = ce.stat_desc.elems, j, $e, Ve = -1, R; for (Z.heap_len = 0, Z.heap_max = v, j = 0; j < Oe; j++) Ae[j * 2] !== 0 ? (Z.heap[++Z.heap_len] = Ve = j, Z.depth[j] = 0) : Ae[j * 2 + 1] = 0; for (; Z.heap_len < 2; ) - R = Z.heap[++Z.heap_len] = Ve < 2 ? ++Ve : 0, Ae[R * 2] = 1, Z.depth[R] = 0, Z.opt_len--, he && (Z.static_len -= Fe[R * 2 + 1]); + R = Z.heap[++Z.heap_len] = Ve < 2 ? ++Ve : 0, Ae[R * 2] = 1, Z.depth[R] = 0, Z.opt_len--, he && (Z.static_len -= ke[R * 2 + 1]); for (ce.max_code = Ve, j = Z.heap_len >> 1; j >= 1; j--) ue(Z, Ae, j); R = Oe; @@ -22418,14 +22418,14 @@ ATOM`, g); ], se(Z, ce), pe(Ae, Ve, Z.bl_count); } function Se(Z, ce, Ae) { - var Fe, he = -1, Oe, j = ce[0 * 2 + 1], $e = 0, Ve = 7, R = 4; - for (j === 0 && (Ve = 138, R = 3), ce[(Ae + 1) * 2 + 1] = 65535, Fe = 0; Fe <= Ae; Fe++) - Oe = j, j = ce[(Fe + 1) * 2 + 1], !(++$e < Ve && Oe === j) && ($e < R ? Z.bl_tree[Oe * 2] += $e : Oe !== 0 ? (Oe !== he && Z.bl_tree[Oe * 2]++, Z.bl_tree[L * 2]++) : $e <= 10 ? Z.bl_tree[T * 2]++ : Z.bl_tree[D * 2]++, $e = 0, he = Oe, j === 0 ? (Ve = 138, R = 3) : Oe === j ? (Ve = 6, R = 3) : (Ve = 7, R = 4)); + var ke, he = -1, Oe, j = ce[0 * 2 + 1], $e = 0, Ve = 7, R = 4; + for (j === 0 && (Ve = 138, R = 3), ce[(Ae + 1) * 2 + 1] = 65535, ke = 0; ke <= Ae; ke++) + Oe = j, j = ce[(ke + 1) * 2 + 1], !(++$e < Ve && Oe === j) && ($e < R ? Z.bl_tree[Oe * 2] += $e : Oe !== 0 ? (Oe !== he && Z.bl_tree[Oe * 2]++, Z.bl_tree[L * 2]++) : $e <= 10 ? Z.bl_tree[T * 2]++ : Z.bl_tree[D * 2]++, $e = 0, he = Oe, j === 0 ? (Ve = 138, R = 3) : Oe === j ? (Ve = 6, R = 3) : (Ve = 7, R = 4)); } function ze(Z, ce, Ae) { - var Fe, he = -1, Oe, j = ce[0 * 2 + 1], $e = 0, Ve = 7, R = 4; - for (j === 0 && (Ve = 138, R = 3), Fe = 0; Fe <= Ae; Fe++) - if (Oe = j, j = ce[(Fe + 1) * 2 + 1], !(++$e < Ve && Oe === j)) { + var ke, he = -1, Oe, j = ce[0 * 2 + 1], $e = 0, Ve = 7, R = 4; + for (j === 0 && (Ve = 138, R = 3), ke = 0; ke <= Ae; ke++) + if (Oe = j, j = ce[(ke + 1) * 2 + 1], !(++$e < Ve && Oe === j)) { if ($e < R) do Ce(Z, Oe, Z.bl_tree); @@ -22441,9 +22441,9 @@ ATOM`, g); ; return Z.opt_len += 3 * (ce + 1) + 5 + 5 + 4, ce; } - function We(Z, ce, Ae, Fe) { + function We(Z, ce, Ae, ke) { var he; - for (fe(Z, ce - 257, 5), fe(Z, Ae - 1, 5), fe(Z, Fe - 4, 4), he = 0; he < Fe; he++) + for (fe(Z, ce - 257, 5), fe(Z, Ae - 1, 5), fe(Z, ke - 4, 4), he = 0; he < ke; he++) fe(Z, Z.bl_tree[B[he] * 2 + 1], 3); ze(Z, Z.dyn_ltree, ce - 1), ze(Z, Z.dyn_dtree, Ae - 1); } @@ -22461,17 +22461,17 @@ ATOM`, g); } var K = !1; function ee(Z) { - K || (we(), K = !0), Z.l_desc = new q(Z.dyn_ltree, Q), Z.d_desc = new q(Z.dyn_dtree, ae), Z.bl_desc = new q(Z.bl_tree, oe), Z.bi_buf = 0, Z.bi_valid = 0, ke(Z); + K || (we(), K = !0), Z.l_desc = new q(Z.dyn_ltree, Q), Z.d_desc = new q(Z.dyn_dtree, ae), Z.bl_desc = new q(Z.bl_tree, oe), Z.bi_buf = 0, Z.bi_valid = 0, Fe(Z); } - function de(Z, ce, Ae, Fe) { - fe(Z, (E << 1) + (Fe ? 1 : 0), 3), Ne(Z, ce, Ae, !0); + function de(Z, ce, Ae, ke) { + fe(Z, (E << 1) + (ke ? 1 : 0), 3), Ne(Z, ce, Ae, !0); } function ve(Z) { fe(Z, c << 1, 3), Ce(Z, M, N), Te(Z); } - function Ie(Z, ce, Ae, Fe) { + function Ie(Z, ce, Ae, ke) { var he, Oe, j = 0; - Z.level > 0 ? (Z.strm.data_type === h && (Z.strm.data_type = Y(Z)), ge(Z, Z.l_desc), ge(Z, Z.d_desc), j = He(Z), he = Z.opt_len + 3 + 7 >>> 3, Oe = Z.static_len + 3 + 7 >>> 3, Oe <= he && (he = Oe)) : he = Oe = Ae + 5, Ae + 4 <= he && ce !== -1 ? de(Z, ce, Ae, Fe) : Z.strategy === f || Oe === he ? (fe(Z, (c << 1) + (Fe ? 1 : 0), 3), ye(Z, N, $)) : (fe(Z, (C << 1) + (Fe ? 1 : 0), 3), We(Z, Z.l_desc.max_code + 1, Z.d_desc.max_code + 1, j + 1), ye(Z, Z.dyn_ltree, Z.dyn_dtree)), ke(Z), Fe && Ue(Z); + Z.level > 0 ? (Z.strm.data_type === h && (Z.strm.data_type = Y(Z)), ge(Z, Z.l_desc), ge(Z, Z.d_desc), j = He(Z), he = Z.opt_len + 3 + 7 >>> 3, Oe = Z.static_len + 3 + 7 >>> 3, Oe <= he && (he = Oe)) : he = Oe = Ae + 5, Ae + 4 <= he && ce !== -1 ? de(Z, ce, Ae, ke) : Z.strategy === f || Oe === he ? (fe(Z, (c << 1) + (ke ? 1 : 0), 3), ye(Z, N, $)) : (fe(Z, (C << 1) + (ke ? 1 : 0), 3), We(Z, Z.l_desc.max_code + 1, Z.d_desc.max_code + 1, j + 1), ye(Z, Z.dyn_ltree, Z.dyn_dtree)), Fe(Z), ke && Ue(Z); } function Re(Z, ce, Ae) { return Z.pending_buf[Z.d_buf + Z.last_lit * 2] = ce >>> 8 & 255, Z.pending_buf[Z.d_buf + Z.last_lit * 2 + 1] = ce & 255, Z.pending_buf[Z.l_buf + Z.last_lit] = Ae & 255, Z.last_lit++, ce === 0 ? Z.dyn_ltree[Ae * 2]++ : (Z.matches++, ce--, Z.dyn_ltree[(G[Ae] + s + 1) * 2]++, Z.dyn_dtree[me(ce) * 2]++), Z.last_lit === Z.lit_bufsize - 1; @@ -22642,8 +22642,8 @@ var ProteinSurface = ` + $3Dmol.ProteinSurface.toString() + `; ce += u(Y[Ae], K, ee + ce); else for (var Ae = 0; ve > Ae; Ae++) { - var Fe = Z[Ae]; - ce += u(Fe, K, ee + ce), ce += u(Y[Fe], K, ee + ce); + var ke = Z[Ae]; + ce += u(ke, K, ee + ce), ce += u(Y[ke], K, ee + ce); } return ce; } @@ -22877,7 +22877,7 @@ var ProteinSurface = ` + $3Dmol.ProteinSurface.toString() + `; function B(Y, K) { return g(a(Y, K)); } - function F(Y, K, ee) { + function k(Y, K, ee) { return v(M(Y, b(ee)), K, ee); } function N(Y, K, ee) { @@ -22886,9 +22886,9 @@ var ProteinSurface = ` + $3Dmol.ProteinSurface.toString() + `; function $(Y, K, ee) { return v(T(Y, b(ee)), K, ee); } - function k(Y, K, ee) { + function F(Y, K, ee) { var de = T(Y, b(ee)); - return F(de, K, A(de)); + return k(de, K, A(de)); } function G(Y, K, ee) { return D(N(Y, K), ee); @@ -22937,7 +22937,7 @@ var ProteinSurface = ` + $3Dmol.ProteinSurface.toString() + `; } function Ce(Y) { function K(ce) { - for (var Ae = {}, Fe = 0; ce > Fe; Fe++) { + for (var Ae = {}, ke = 0; ce > ke; ke++) { var he = Ie(); Ae[he] = Ie(); } @@ -22950,32 +22950,32 @@ var ProteinSurface = ` + $3Dmol.ProteinSurface.toString() + `; function de(ce) { var Ae = Y.subarray(Re, Re + ce); Re += ce; - var Fe = 65535; - if (ce > Fe) { - for (var he = [], Oe = 0; Oe < Ae.length; Oe += Fe) - he.push(String.fromCharCode.apply(null, Ae.subarray(Oe, Oe + Fe))); + var ke = 65535; + if (ce > ke) { + for (var he = [], Oe = 0; Oe < Ae.length; Oe += ke) + he.push(String.fromCharCode.apply(null, Ae.subarray(Oe, Oe + ke))); return he.join(""); } return String.fromCharCode.apply(null, Ae); } function ve(ce) { - for (var Ae = new Array(ce), Fe = 0; ce > Fe; Fe++) - Ae[Fe] = Ie(); + for (var Ae = new Array(ce), ke = 0; ce > ke; ke++) + Ae[ke] = Ie(); return Ae; } function Ie() { - var ce, Ae, Fe = Y[Re]; - if (!(128 & Fe)) - return Re++, Fe; - if ((240 & Fe) === 128) - return Ae = 15 & Fe, Re++, K(Ae); - if ((240 & Fe) === 144) - return Ae = 15 & Fe, Re++, ve(Ae); - if ((224 & Fe) === 160) - return Ae = 31 & Fe, Re++, de(Ae); - if ((224 & Fe) === 224) + var ce, Ae, ke = Y[Re]; + if (!(128 & ke)) + return Re++, ke; + if ((240 & ke) === 128) + return Ae = 15 & ke, Re++, K(Ae); + if ((240 & ke) === 144) + return Ae = 15 & ke, Re++, ve(Ae); + if ((224 & ke) === 160) + return Ae = 31 & ke, Re++, de(Ae); + if ((224 & ke) === 224) return ce = Z.getInt8(Re), Re++, ce; - switch (Fe) { + switch (ke) { case 192: return Re++, null; case 194: @@ -23019,7 +23019,7 @@ var ProteinSurface = ` + $3Dmol.ProteinSurface.toString() + `; case 223: return Ae = Z.getUint32(Re + 1), Re += 5, K(Ae); } - throw new Error("Unknown type 0x" + Fe.toString(16)); + throw new Error("Unknown type 0x" + ke.toString(16)); } var Re = 0, Z = new DataView(Y.buffer); return Ie(); @@ -23045,7 +23045,7 @@ var ProteinSurface = ` + $3Dmol.ProteinSurface.toString() + `; case 9: return P(o(K), o(de)[0]); case 10: - return k(S(K), o(de)[0]); + return F(S(K), o(de)[0]); case 11: return v(S(K), o(de)[0]); case 12: @@ -23071,10 +23071,10 @@ var ProteinSurface = ` + $3Dmol.ProteinSurface.toString() + `; } function pe(Y, K, ee) { ee = ee || {}; - var de, ve, Ie, Re, Z, ce, Ae = ee.firstModelOnly, Fe = K.onModel, he = K.onChain, Oe = K.onGroup, j = K.onAtom, $e = K.onBond, Ve = 0, R = 0, be = 0, Ee = 0, X = 0, le = -1, Le = Y.chainNameList, Ze = Y.secStructList, Ke = Y.insCodeList, je = Y.sequenceIndexList, Je = Y.atomIdList, Lt = Y.bFactorList, rt = Y.altLocList, it = Y.occupancyList, tt = Y.bondAtomList, Et = Y.bondOrderList; + var de, ve, Ie, Re, Z, ce, Ae = ee.firstModelOnly, ke = K.onModel, he = K.onChain, Oe = K.onGroup, j = K.onAtom, $e = K.onBond, Ve = 0, R = 0, be = 0, Ee = 0, X = 0, le = -1, Le = Y.chainNameList, Ze = Y.secStructList, Ke = Y.insCodeList, je = Y.sequenceIndexList, Je = Y.atomIdList, Lt = Y.bFactorList, rt = Y.altLocList, it = Y.occupancyList, tt = Y.bondAtomList, Et = Y.bondOrderList; for (de = 0, ve = Y.chainsPerModel.length; ve > de && !(Ae && Ve > 0); ++de) { var lt = Y.chainsPerModel[Ve]; - for (Fe && Fe({ chainCount: lt, modelIndex: Ve }), Ie = 0; lt > Ie; ++Ie) { + for (ke && ke({ chainCount: lt, modelIndex: Ve }), Ie = 0; lt > Ie; ++Ie) { var wt = Y.groupsPerChain[R]; if (he) { var Pt = se(Y.chainIdList.subarray(4 * R, 4 * R + 4)), vt = null; @@ -23087,19 +23087,19 @@ var ProteinSurface = ` + $3Dmol.ProteinSurface.toString() + `; Ze && (Tt = Ze[be]); var Ot = null; Y.insCodeList && (Ot = String.fromCharCode(Ke[be])); - var Ft = null; - je && (Ft = je[be]), Oe({ atomCount: mt, groupIndex: be, chainIndex: R, modelIndex: Ve, groupId: Y.groupIdList[be], groupType: Y.groupTypeList[be], groupName: bt.groupName, singleLetterCode: bt.singleLetterCode, chemCompType: bt.chemCompType, secStruct: Tt, insCode: Ot, sequenceIndex: Ft }); + var kt = null; + je && (kt = je[be]), Oe({ atomCount: mt, groupIndex: be, chainIndex: R, modelIndex: Ve, groupId: Y.groupIdList[be], groupType: Y.groupTypeList[be], groupName: bt.groupName, singleLetterCode: bt.singleLetterCode, chemCompType: bt.chemCompType, secStruct: Tt, insCode: Ot, sequenceIndex: kt }); } for (Z = 0; mt > Z; ++Z) { if (j) { var Qt = null; Je && (Qt = Je[Ee]); - var kt = null; - Lt && (kt = Lt[Ee]); + var Ft = null; + Lt && (Ft = Lt[Ee]); var Jt = null; rt && (Jt = String.fromCharCode(rt[Ee])); var qt = null; - it && (qt = it[Ee]), j({ atomIndex: Ee, groupIndex: be, chainIndex: R, modelIndex: Ve, atomId: Qt, element: bt.elementList[Z], atomName: bt.atomNameList[Z], formalCharge: bt.formalChargeList[Z], xCoord: Y.xCoordList[Ee], yCoord: Y.yCoordList[Ee], zCoord: Y.zCoordList[Ee], bFactor: kt, altLoc: Jt, occupancy: qt }); + it && (qt = it[Ee]), j({ atomIndex: Ee, groupIndex: be, chainIndex: R, modelIndex: Ve, atomId: Qt, element: bt.elementList[Z], atomName: bt.atomNameList[Z], formalCharge: bt.formalChargeList[Z], xCoord: Y.xCoordList[Ee], yCoord: Y.yCoordList[Ee], zCoord: Y.zCoordList[Ee], bFactor: Ft, altLoc: Jt, occupancy: qt }); } Ee += 1; } @@ -23123,7 +23123,7 @@ var ProteinSurface = ` + $3Dmol.ProteinSurface.toString() + `; function we(Y) { return h(fe(Y)); } - function ke(Y, K) { + function Fe(Y, K) { Y instanceof ArrayBuffer && (Y = new Uint8Array(Y)); var ee; return ee = Y instanceof Uint8Array ? Ce(Y) : Y, Te(ee, K); @@ -23131,7 +23131,7 @@ var ProteinSurface = ` + $3Dmol.ProteinSurface.toString() + `; function Ue(Y, K, ee, de) { function ve() { try { - var Re = ke(Ie.response); + var Re = Fe(Ie.response); ee(Re); } catch (Z) { de(Z); @@ -23147,7 +23147,7 @@ var ProteinSurface = ` + $3Dmol.ProteinSurface.toString() + `; Ue(Y, We, K, ee); } var ue = ["mmtfVersion", "mmtfProducer", "unitCell", "spaceGroup", "structureId", "title", "depositionDate", "releaseDate", "experimentalMethods", "resolution", "rFree", "rWork", "bioAssemblyList", "ncsOperatorList", "entityList", "groupList", "numBonds", "numAtoms", "numGroups", "numChains", "numModels", "groupsPerChain", "chainsPerModel"], ye = ["xCoordList", "yCoordList", "zCoordList", "groupIdList", "groupTypeList", "chainIdList", "bFactorList", "atomIdList", "altLocList", "occupancyList", "secStructList", "insCodeList", "sequenceIndexList", "chainNameList", "bondAtomList", "bondOrderList"], ge = ue.concat(ye), Se = "v1.0.1", ze = "//mmtf.rcsb.org/v1.0/", He = ze + "full/", We = ze + "reduced/"; - t.encode = we, t.decode = ke, t.traverse = pe, t.fetch = Ne, t.fetchReduced = Be, t.version = Se, t.fetchUrl = He, t.fetchReducedUrl = We, t.encodeMsgpack = h, t.encodeMmtf = fe, t.decodeMsgpack = Ce, t.decodeMmtf = Te; + t.encode = we, t.decode = Fe, t.traverse = pe, t.fetch = Ne, t.fetchReduced = Be, t.version = Se, t.fetchUrl = He, t.fetchReducedUrl = We, t.encodeMsgpack = h, t.encodeMmtf = fe, t.decodeMsgpack = Ce, t.decodeMmtf = Te; }); } ), @@ -23227,14 +23227,14 @@ var ProteinSurface = ` + $3Dmol.ProteinSurface.toString() + `; ), z = ( /* extra bits for each bit length code */ new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7]) - ), P = new Uint8Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), B = 512, F = new Array((s + 2) * 2); - h(F); + ), P = new Uint8Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), B = 512, k = new Array((s + 2) * 2); + h(k); const N = new Array(o * 2); h(N); const $ = new Array(B); h($); - const k = new Array(b - C + 1); - h(k); + const F = new Array(b - C + 1); + h(F); const G = new Array(A); h(G); const H = new Array(o); @@ -23296,8 +23296,8 @@ var ProteinSurface = ` + $3Dmol.ProteinSurface.toString() + `; const te = new Array(v + 1); for (O = 0, J = 0; J < A - 1; J++) for (G[J] = O, x = 0; x < 1 << D[J]; x++) - k[O++] = J; - for (k[O - 1] = J, ie = 0, J = 0; J < 16; J++) + F[O++] = J; + for (F[O - 1] = J, ie = 0, J = 0; J < 16; J++) for (H[J] = ie, x = 0; x < 1 << I[J]; x++) $[ie++] = J; for (ie >>= 7; J < o; J++) @@ -23306,16 +23306,16 @@ var ProteinSurface = ` + $3Dmol.ProteinSurface.toString() + `; for (W = 0; W <= v; W++) te[W] = 0; for (x = 0; x <= 143; ) - F[x * 2 + 1] = 8, x++, te[8]++; + k[x * 2 + 1] = 8, x++, te[8]++; for (; x <= 255; ) - F[x * 2 + 1] = 9, x++, te[9]++; + k[x * 2 + 1] = 9, x++, te[9]++; for (; x <= 279; ) - F[x * 2 + 1] = 7, x++, te[7]++; + k[x * 2 + 1] = 7, x++, te[7]++; for (; x <= 287; ) - F[x * 2 + 1] = 8, x++, te[8]++; - for (se(F, s + 1, te), x = 0; x < o; x++) + k[x * 2 + 1] = 8, x++, te[8]++; + for (se(k, s + 1, te), x = 0; x < o; x++) N[x * 2 + 1] = 5, N[x * 2] = Ce(x, 5); - V = new U(F, D, S + 1, s, v), Q = new U(N, I, 0, o, v), ae = new U(new Array(0), z, 0, w, l); + V = new U(k, D, S + 1, s, v), Q = new U(N, I, 0, o, v), ae = new U(new Array(0), z, 0, w, l); }, we = (x) => { let W; for (W = 0; W < s; W++) @@ -23325,7 +23325,7 @@ var ProteinSurface = ` + $3Dmol.ProteinSurface.toString() + `; for (W = 0; W < w; W++) x.bl_tree[W * 2] = 0; x.dyn_ltree[g * 2] = 1, x.opt_len = x.static_len = 0, x.sym_next = x.matches = 0; - }, ke = (x) => { + }, Fe = (x) => { x.bi_valid > 8 ? me(x, x.bi_buf) : x.bi_valid > 0 && (x.pending_buf[x.pending++] = x.bi_buf), x.bi_buf = 0, x.bi_valid = 0; }, Ue = (x, W, O, J) => { const ie = W * 2, te = O * 2; @@ -23340,7 +23340,7 @@ var ProteinSurface = ` + $3Dmol.ProteinSurface.toString() + `; let J, ie, te = 0, De, xe; if (x.sym_next !== 0) do - J = x.pending_buf[x.sym_buf + te++] & 255, J += (x.pending_buf[x.sym_buf + te++] & 255) << 8, ie = x.pending_buf[x.sym_buf + te++], J === 0 ? fe(x, ie, W) : (De = k[ie], fe(x, De + S + 1, W), xe = D[De], xe !== 0 && (ie -= G[De], ne(x, ie, xe)), J--, De = q(J), fe(x, De, O), xe = I[De], xe !== 0 && (J -= H[De], ne(x, J, xe))); + J = x.pending_buf[x.sym_buf + te++] & 255, J += (x.pending_buf[x.sym_buf + te++] & 255) << 8, ie = x.pending_buf[x.sym_buf + te++], J === 0 ? fe(x, ie, W) : (De = F[ie], fe(x, De + S + 1, W), xe = D[De], xe !== 0 && (ie -= G[De], ne(x, ie, xe)), J--, De = q(J), fe(x, De, O), xe = I[De], xe !== 0 && (J -= H[De], ne(x, J, xe))); while (te < x.sym_next); fe(x, g, W); }, ue = (x, W) => { @@ -23424,14 +23424,14 @@ var ProteinSurface = ` + $3Dmol.ProteinSurface.toString() + `; const Y = (x) => { We || (pe(), We = !0), x.l_desc = new oe(x.dyn_ltree, V), x.d_desc = new oe(x.dyn_dtree, Q), x.bl_desc = new oe(x.bl_tree, ae), x.bi_buf = 0, x.bi_valid = 0, we(x); }, K = (x, W, O, J) => { - ne(x, (_ << 1) + (J ? 1 : 0), 3), ke(x), me(x, O), me(x, ~O), O && x.pending_buf.set(x.window.subarray(W, W + O), x.pending), x.pending += O; + ne(x, (_ << 1) + (J ? 1 : 0), 3), Fe(x), me(x, O), me(x, ~O), O && x.pending_buf.set(x.window.subarray(W, W + O), x.pending), x.pending += O; }, ee = (x) => { - ne(x, E << 1, 3), fe(x, g, F), Me(x); + ne(x, E << 1, 3), fe(x, g, k), Me(x); }, de = (x, W, O, J) => { let ie, te, De = 0; - x.level > 0 ? (x.strm.data_type === y && (x.strm.data_type = He(x)), ue(x, x.l_desc), ue(x, x.d_desc), De = Se(x), ie = x.opt_len + 3 + 7 >>> 3, te = x.static_len + 3 + 7 >>> 3, te <= ie && (ie = te)) : ie = te = O + 5, O + 4 <= ie && W !== -1 ? K(x, W, O, J) : x.strategy === n || te === ie ? (ne(x, (E << 1) + (J ? 1 : 0), 3), Be(x, F, N)) : (ne(x, (c << 1) + (J ? 1 : 0), 3), ze(x, x.l_desc.max_code + 1, x.d_desc.max_code + 1, De + 1), Be(x, x.dyn_ltree, x.dyn_dtree)), we(x), J && ke(x); - }, ve = (x, W, O) => (x.pending_buf[x.sym_buf + x.sym_next++] = W, x.pending_buf[x.sym_buf + x.sym_next++] = W >> 8, x.pending_buf[x.sym_buf + x.sym_next++] = O, W === 0 ? x.dyn_ltree[O * 2]++ : (x.matches++, W--, x.dyn_ltree[(k[O] + S + 1) * 2]++, x.dyn_dtree[q(W) * 2]++), x.sym_next === x.sym_end); - var Ie = Y, Re = K, Z = de, ce = ve, Ae = ee, Fe = { + x.level > 0 ? (x.strm.data_type === y && (x.strm.data_type = He(x)), ue(x, x.l_desc), ue(x, x.d_desc), De = Se(x), ie = x.opt_len + 3 + 7 >>> 3, te = x.static_len + 3 + 7 >>> 3, te <= ie && (ie = te)) : ie = te = O + 5, O + 4 <= ie && W !== -1 ? K(x, W, O, J) : x.strategy === n || te === ie ? (ne(x, (E << 1) + (J ? 1 : 0), 3), Be(x, k, N)) : (ne(x, (c << 1) + (J ? 1 : 0), 3), ze(x, x.l_desc.max_code + 1, x.d_desc.max_code + 1, De + 1), Be(x, x.dyn_ltree, x.dyn_dtree)), we(x), J && Fe(x); + }, ve = (x, W, O) => (x.pending_buf[x.sym_buf + x.sym_next++] = W, x.pending_buf[x.sym_buf + x.sym_next++] = W >> 8, x.pending_buf[x.sym_buf + x.sym_next++] = O, W === 0 ? x.dyn_ltree[O * 2]++ : (x.matches++, W--, x.dyn_ltree[(F[O] + S + 1) * 2]++, x.dyn_dtree[q(W) * 2]++), x.sym_next === x.sym_end); + var Ie = Y, Re = K, Z = de, ce = ve, Ae = ee, ke = { _tr_init: Ie, _tr_stored_block: Re, _tr_flush_block: Z, @@ -23523,7 +23523,7 @@ var ProteinSurface = ` + $3Dmol.ProteinSurface.toString() + `; Z_DEFLATED: 8 //Z_NULL: null // Use -1 or null inline, depending on var type }; - const { _tr_init: X, _tr_stored_block: le, _tr_flush_block: Le, _tr_tally: Ze, _tr_align: Ke } = Fe, { + const { _tr_init: X, _tr_stored_block: le, _tr_flush_block: Le, _tr_tally: Ze, _tr_align: Ke } = ke, { Z_NO_FLUSH: je, Z_PARTIAL_FLUSH: Je, Z_FULL_FLUSH: Lt, @@ -23539,9 +23539,9 @@ var ProteinSurface = ` + $3Dmol.ProteinSurface.toString() + `; Z_HUFFMAN_ONLY: mt, Z_RLE: Tt, Z_FIXED: Ot, - Z_DEFAULT_STRATEGY: Ft, + Z_DEFAULT_STRATEGY: kt, Z_UNKNOWN: Qt, - Z_DEFLATED: kt + Z_DEFLATED: Ft } = Ee, Jt = 9, qt = 15, er = 8, Ht = 29, lr = 256 + 1 + Ht, Or = 30, Dr = 19, Pr = 2 * lr + 1, Ir = 15, at = 3, Bt = 258, pt = Bt + at + 1, yt = 32, At = 42, rr = 57, Rr = 69, $r = 73, Br = 91, zr = 103, Vt = 113, hr = 666, Dt = 1, ir = 2, jt = 3, nr = 4, nn = 3, Kt = (x, W) => (x.msg = be[W], W), Xr = (x) => x * 2 - (x > 4 ? 9 : 0), Gt = (x) => { let W = x.length; for (; --W >= 0; ) @@ -23568,7 +23568,7 @@ var ProteinSurface = ` + $3Dmol.ProteinSurface.toString() + `; x.pending_buf[x.pending++] = W; }, fr = (x, W) => { x.pending_buf[x.pending++] = W >>> 8 & 255, x.pending_buf[x.pending++] = W & 255; - }, Fr = (x, W, O, J) => { + }, kr = (x, W, O, J) => { let ie = x.avail_in; return ie > J && (ie = J), ie === 0 ? 0 : (x.avail_in -= ie, W.set(x.input.subarray(x.next_in, x.next_in + ie), O), x.state.wrap === 1 ? x.adler = Oe(x.adler, W, ie, O) : x.state.wrap === 2 && (x.adler = R(x.adler, W, ie, O)), x.next_in += ie, x.total_in += ie, ie); }, Qr = (x, W) => { @@ -23596,7 +23596,7 @@ var ProteinSurface = ` + $3Dmol.ProteinSurface.toString() + `; do { if (J = x.window_size - x.lookahead - x.strstart, x.strstart >= W + (W - pt) && (x.window.set(x.window.subarray(W, W + W - J), 0), x.match_start -= W, x.strstart -= W, x.block_start -= W, x.insert > x.strstart && (x.insert = x.strstart), sn(x), J += W), x.strm.avail_in === 0) break; - if (O = Fr(x.strm, x.window, x.strstart + x.lookahead, J), x.lookahead += O, x.lookahead + x.insert >= at) + if (O = kr(x.strm, x.window, x.strstart + x.lookahead, J), x.lookahead += O, x.lookahead + x.insert >= at) for (ie = x.strstart - x.insert, x.ins_h = x.window[ie], x.ins_h = Wt(x, x.ins_h, x.window[ie + 1]); x.insert && (x.ins_h = Wt(x, x.ins_h, x.window[ie + at - 1]), x.prev[ie & x.w_mask] = x.head[x.ins_h], x.head[x.ins_h] = ie, ie++, x.insert--, !(x.lookahead + x.insert < at)); ) ; } while (x.lookahead < pt && x.strm.avail_in !== 0); @@ -23605,10 +23605,10 @@ var ProteinSurface = ` + $3Dmol.ProteinSurface.toString() + `; do { if (J = 65535, te = x.bi_valid + 42 >> 3, x.strm.avail_out < te || (te = x.strm.avail_out - te, ie = x.strstart - x.block_start, J > ie + x.strm.avail_in && (J = ie + x.strm.avail_in), J > te && (J = te), J < O && (J === 0 && W !== rt || W === je || J !== ie + x.strm.avail_in))) break; - De = W === rt && J === ie + x.strm.avail_in ? 1 : 0, le(x, 0, 0, De), x.pending_buf[x.pending - 4] = J, x.pending_buf[x.pending - 3] = J >> 8, x.pending_buf[x.pending - 2] = ~J, x.pending_buf[x.pending - 1] = ~J >> 8, It(x.strm), ie && (ie > J && (ie = J), x.strm.output.set(x.window.subarray(x.block_start, x.block_start + ie), x.strm.next_out), x.strm.next_out += ie, x.strm.avail_out -= ie, x.strm.total_out += ie, x.block_start += ie, J -= ie), J && (Fr(x.strm, x.strm.output, x.strm.next_out, J), x.strm.next_out += J, x.strm.avail_out -= J, x.strm.total_out += J); + De = W === rt && J === ie + x.strm.avail_in ? 1 : 0, le(x, 0, 0, De), x.pending_buf[x.pending - 4] = J, x.pending_buf[x.pending - 3] = J >> 8, x.pending_buf[x.pending - 2] = ~J, x.pending_buf[x.pending - 1] = ~J >> 8, It(x.strm), ie && (ie > J && (ie = J), x.strm.output.set(x.window.subarray(x.block_start, x.block_start + ie), x.strm.next_out), x.strm.next_out += ie, x.strm.avail_out -= ie, x.strm.total_out += ie, x.block_start += ie, J -= ie), J && (kr(x.strm, x.strm.output, x.strm.next_out, J), x.strm.next_out += J, x.strm.avail_out -= J, x.strm.total_out += J); } while (De === 0); - return xe -= x.strm.avail_in, xe && (xe >= x.w_size ? (x.matches = 2, x.window.set(x.strm.input.subarray(x.strm.next_in - x.w_size, x.strm.next_in), 0), x.strstart = x.w_size, x.insert = x.strstart) : (x.window_size - x.strstart <= xe && (x.strstart -= x.w_size, x.window.set(x.window.subarray(x.w_size, x.w_size + x.strstart), 0), x.matches < 2 && x.matches++, x.insert > x.strstart && (x.insert = x.strstart)), x.window.set(x.strm.input.subarray(x.strm.next_in - xe, x.strm.next_in), x.strstart), x.strstart += xe, x.insert += xe > x.w_size - x.insert ? x.w_size - x.insert : xe), x.block_start = x.strstart), x.high_water < x.strstart && (x.high_water = x.strstart), De ? nr : W !== je && W !== rt && x.strm.avail_in === 0 && x.strstart === x.block_start ? ir : (te = x.window_size - x.strstart, x.strm.avail_in > te && x.block_start >= x.w_size && (x.block_start -= x.w_size, x.strstart -= x.w_size, x.window.set(x.window.subarray(x.w_size, x.w_size + x.strstart), 0), x.matches < 2 && x.matches++, te += x.w_size, x.insert > x.strstart && (x.insert = x.strstart)), te > x.strm.avail_in && (te = x.strm.avail_in), te && (Fr(x.strm, x.window, x.strstart, te), x.strstart += te, x.insert += te > x.w_size - x.insert ? x.w_size - x.insert : te), x.high_water < x.strstart && (x.high_water = x.strstart), te = x.bi_valid + 42 >> 3, te = x.pending_buf_size - te > 65535 ? 65535 : x.pending_buf_size - te, O = te > x.w_size ? x.w_size : te, ie = x.strstart - x.block_start, (ie >= O || (ie || W === rt) && W !== je && x.strm.avail_in === 0 && ie <= te) && (J = ie > te ? te : ie, De = W === rt && x.strm.avail_in === 0 && J === ie ? 1 : 0, le(x, x.block_start, J, De), x.block_start += J, It(x.strm)), De ? jt : Dt); - }, kr = (x, W) => { + return xe -= x.strm.avail_in, xe && (xe >= x.w_size ? (x.matches = 2, x.window.set(x.strm.input.subarray(x.strm.next_in - x.w_size, x.strm.next_in), 0), x.strstart = x.w_size, x.insert = x.strstart) : (x.window_size - x.strstart <= xe && (x.strstart -= x.w_size, x.window.set(x.window.subarray(x.w_size, x.w_size + x.strstart), 0), x.matches < 2 && x.matches++, x.insert > x.strstart && (x.insert = x.strstart)), x.window.set(x.strm.input.subarray(x.strm.next_in - xe, x.strm.next_in), x.strstart), x.strstart += xe, x.insert += xe > x.w_size - x.insert ? x.w_size - x.insert : xe), x.block_start = x.strstart), x.high_water < x.strstart && (x.high_water = x.strstart), De ? nr : W !== je && W !== rt && x.strm.avail_in === 0 && x.strstart === x.block_start ? ir : (te = x.window_size - x.strstart, x.strm.avail_in > te && x.block_start >= x.w_size && (x.block_start -= x.w_size, x.strstart -= x.w_size, x.window.set(x.window.subarray(x.w_size, x.w_size + x.strstart), 0), x.matches < 2 && x.matches++, te += x.w_size, x.insert > x.strstart && (x.insert = x.strstart)), te > x.strm.avail_in && (te = x.strm.avail_in), te && (kr(x.strm, x.window, x.strstart, te), x.strstart += te, x.insert += te > x.w_size - x.insert ? x.w_size - x.insert : te), x.high_water < x.strstart && (x.high_water = x.strstart), te = x.bi_valid + 42 >> 3, te = x.pending_buf_size - te > 65535 ? 65535 : x.pending_buf_size - te, O = te > x.w_size ? x.w_size : te, ie = x.strstart - x.block_start, (ie >= O || (ie || W === rt) && W !== je && x.strm.avail_in === 0 && ie <= te) && (J = ie > te ? te : ie, De = W === rt && x.strm.avail_in === 0 && J === ie ? 1 : 0, le(x, x.block_start, J, De), x.block_start += J, It(x.strm)), De ? jt : Dt); + }, Fr = (x, W) => { let O, J; for (; ; ) { if (x.lookahead < pt) { @@ -23696,11 +23696,11 @@ var ProteinSurface = ` + $3Dmol.ProteinSurface.toString() + `; /* good lazy nice chain */ new zt(0, 0, 0, 0, Jr), /* 0 store only */ - new zt(4, 4, 8, 4, kr), + new zt(4, 4, 8, 4, Fr), /* 1 max speed, no lazy matches */ - new zt(4, 5, 16, 8, kr), + new zt(4, 5, 16, 8, Fr), /* 2 */ - new zt(4, 6, 32, 32, kr), + new zt(4, 6, 32, 32, Fr), /* 3 */ new zt(4, 4, 16, 16, ar), /* 4 lazy matches */ @@ -23718,7 +23718,7 @@ var ProteinSurface = ` + $3Dmol.ProteinSurface.toString() + `; x.window_size = 2 * x.w_size, Gt(x.head), x.max_lazy_match = cr[x.level].max_lazy, x.good_match = cr[x.level].good_length, x.nice_match = cr[x.level].nice_length, x.max_chain_length = cr[x.level].max_chain, x.strstart = 0, x.block_start = 0, x.lookahead = 0, x.insert = 0, x.match_length = x.prev_length = at - 1, x.match_available = 0, x.ins_h = 0; }; function hn() { - this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = kt, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new Uint16Array(Pr * 2), this.dyn_dtree = new Uint16Array((2 * Or + 1) * 2), this.bl_tree = new Uint16Array((2 * Dr + 1) * 2), Gt(this.dyn_ltree), Gt(this.dyn_dtree), Gt(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new Uint16Array(Ir + 1), this.heap = new Uint16Array(2 * lr + 1), Gt(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new Uint16Array(2 * lr + 1), Gt(this.depth), this.sym_buf = 0, this.lit_bufsize = 0, this.sym_next = 0, this.sym_end = 0, this.opt_len = 0, this.static_len = 0, this.matches = 0, this.insert = 0, this.bi_buf = 0, this.bi_valid = 0; + this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = Ft, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new Uint16Array(Pr * 2), this.dyn_dtree = new Uint16Array((2 * Or + 1) * 2), this.bl_tree = new Uint16Array((2 * Dr + 1) * 2), Gt(this.dyn_ltree), Gt(this.dyn_dtree), Gt(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new Uint16Array(Ir + 1), this.heap = new Uint16Array(2 * lr + 1), Gt(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new Uint16Array(2 * lr + 1), Gt(this.depth), this.sym_buf = 0, this.lit_bufsize = 0, this.sym_next = 0, this.sym_end = 0, this.opt_len = 0, this.static_len = 0, this.matches = 0, this.insert = 0, this.bi_buf = 0, this.bi_valid = 0; } const ur = (x) => { if (!x) @@ -23744,12 +23744,12 @@ var ProteinSurface = ` + $3Dmol.ProteinSurface.toString() + `; if (!x) return lt; let De = 1; - if (W === vt && (W = 6), J < 0 ? (De = 0, J = -J) : J > 15 && (De = 2, J -= 16), ie < 1 || ie > Jt || O !== kt || J < 8 || J > 15 || W < 0 || W > 9 || te < 0 || te > Ot || J === 8 && De !== 1) + if (W === vt && (W = 6), J < 0 ? (De = 0, J = -J) : J > 15 && (De = 2, J -= 16), ie < 1 || ie > Jt || O !== Ft || J < 8 || J > 15 || W < 0 || W > 9 || te < 0 || te > Ot || J === 8 && De !== 1) return Kt(x, lt); J === 8 && (J = 9); const xe = new hn(); return x.state = xe, xe.strm = x, xe.status = At, xe.wrap = De, xe.gzhead = null, xe.w_bits = J, xe.w_size = 1 << xe.w_bits, xe.w_mask = xe.w_size - 1, xe.hash_bits = ie + 7, xe.hash_size = 1 << xe.hash_bits, xe.hash_mask = xe.hash_size - 1, xe.hash_shift = ~~((xe.hash_bits + at - 1) / at), xe.window = new Uint8Array(xe.w_size * 2), xe.head = new Uint16Array(xe.hash_size), xe.prev = new Uint16Array(xe.w_size), xe.lit_bufsize = 1 << ie + 6, xe.pending_buf_size = xe.lit_bufsize * 4, xe.pending_buf = new Uint8Array(xe.pending_buf_size), xe.sym_buf = xe.lit_bufsize, xe.sym_end = (xe.lit_bufsize - 1) * 3, xe.level = W, xe.strategy = te, xe.method = O, ei(x); - }, un = (x, W) => ti(x, W, kt, qt, er, Ft), dn = (x, W) => { + }, un = (x, W) => ti(x, W, Ft, qt, er, kt), dn = (x, W) => { if (ur(x) || W > it || W < 0) return x ? Kt(x, lt) : lt; const O = x.state; @@ -23764,7 +23764,7 @@ var ProteinSurface = ` + $3Dmol.ProteinSurface.toString() + `; if (O.status === hr && x.avail_in !== 0) return Kt(x, Pt); if (O.status === At && O.wrap === 0 && (O.status = Vt), O.status === At) { - let ie = kt + (O.w_bits - 8 << 4) << 8, te = -1; + let ie = Ft + (O.w_bits - 8 << 4) << 8, te = -1; if (O.strategy >= mt || O.level < 2 ? te = 0 : O.level < 6 ? te = 1 : O.level === 6 ? te = 2 : te = 3, ie |= te << 6, O.strstart !== 0 && (ie |= yt), ie += 31 - ie % 31, fr(O, ie), O.strstart !== 0 && (fr(O, x.adler >>> 16), fr(O, x.adler & 65535)), x.adler = 1, O.status = Vt, It(x), O.pending !== 0) return O.last_flush = -1, tt; } @@ -23979,18 +23979,18 @@ var ProteinSurface = ` + $3Dmol.ProteinSurface.toString() + `; Z_FINISH: Bn, Z_OK: xr, Z_STREAM_END: zn, - Z_DEFAULT_COMPRESSION: Fn, - Z_DEFAULT_STRATEGY: kn, + Z_DEFAULT_COMPRESSION: kn, + Z_DEFAULT_STRATEGY: Fn, Z_DEFLATED: Un } = Ee; function gr(x) { this.options = yr.assign({ - level: Fn, + level: kn, method: Un, chunkSize: 16384, windowBits: 15, memLevel: 8, - strategy: kn + strategy: Fn }, x || {}); let W = this.options; W.raw && W.windowBits > 0 ? W.windowBits = -W.windowBits : W.gzip && W.windowBits > 0 && W.windowBits < 16 && (W.windowBits += 16), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new ii(), this.strm.avail_out = 0; @@ -24345,7 +24345,7 @@ var ProteinSurface = ` + $3Dmol.ProteinSurface.toString() + `; Z_MEM_ERROR: di, Z_BUF_ERROR: ss, Z_DEFLATED: _i - } = Ee, Ar = 16180, pi = 16181, gi = 16182, mi = 16183, vi = 16184, bi = 16185, yi = 16186, xi = 16187, Ei = 16188, wi = 16189, Mr = 16190, Ut = 16191, Gr = 16192, Ai = 16193, Wr = 16194, Mi = 16195, Ci = 16196, Li = 16197, Si = 16198, Cr = 16199, Lr = 16200, Ti = 16201, Oi = 16202, Di = 16203, Pi = 16204, Ii = 16205, Hr = 16206, Ri = 16207, $i = 16208, Mt = 16209, Bi = 16210, zi = 16211, as = 852, os = 592, ls = 15, Fi = (x) => (x >>> 24 & 255) + (x >>> 8 & 65280) + ((x & 65280) << 8) + ((x & 255) << 24); + } = Ee, Ar = 16180, pi = 16181, gi = 16182, mi = 16183, vi = 16184, bi = 16185, yi = 16186, xi = 16187, Ei = 16188, wi = 16189, Mr = 16190, Ut = 16191, Gr = 16192, Ai = 16193, Wr = 16194, Mi = 16195, Ci = 16196, Li = 16197, Si = 16198, Cr = 16199, Lr = 16200, Ti = 16201, Oi = 16202, Di = 16203, Pi = 16204, Ii = 16205, Hr = 16206, Ri = 16207, $i = 16208, Mt = 16209, Bi = 16210, zi = 16211, as = 852, os = 592, ls = 15, ki = (x) => (x >>> 24 & 255) + (x >>> 8 & 65280) + ((x & 65280) << 8) + ((x & 255) << 24); function hs() { this.strm = null, this.mode = 0, this.last = !1, this.wrap = 0, this.havedict = !1, this.flags = 0, this.dmax = 0, this.check = 0, this.total = 0, this.head = null, this.wbits = 0, this.wsize = 0, this.whave = 0, this.wnext = 0, this.window = null, this.hold = 0, this.bits = 0, this.length = 0, this.offset = 0, this.extra = 0, this.lencode = null, this.distcode = null, this.lenbits = 0, this.distbits = 0, this.ncode = 0, this.nlen = 0, this.ndist = 0, this.have = 0, this.next = null, this.lens = new Uint16Array(320), this.work = new Uint16Array(288), this.lendyn = null, this.distdyn = null, this.sane = 0, this.back = 0, this.was = 0; } @@ -24354,7 +24354,7 @@ var ProteinSurface = ` + $3Dmol.ProteinSurface.toString() + `; return 1; const W = x.state; return !W || W.strm !== x || W.mode < Ar || W.mode > zi ? 1 : 0; - }, ki = (x) => { + }, Fi = (x) => { if (Yt(x)) return $t; const W = x.state; @@ -24363,7 +24363,7 @@ var ProteinSurface = ` + $3Dmol.ProteinSurface.toString() + `; if (Yt(x)) return $t; const W = x.state; - return W.wsize = 0, W.whave = 0, W.wnext = 0, ki(x); + return W.wsize = 0, W.whave = 0, W.wnext = 0, Fi(x); }, Ni = (x, W) => { let O; if (Yt(x)) @@ -24543,7 +24543,7 @@ var ProteinSurface = ` + $3Dmol.ProteinSurface.toString() + `; break e; xe--, _e += J[te++] << Pe, Pe += 8; } - x.adler = O.check = Fi(_e), _e = 0, Pe = 0, O.mode = Mr; + x.adler = O.check = ki(_e), _e = 0, Pe = 0, O.mode = Mr; case Mr: if (O.havedict === 0) return x.next_out = De, x.avail_out = Qe, x.next_in = te, x.avail_in = xe, O.hold = _e, O.bits = Pe, ns; @@ -24795,7 +24795,7 @@ var ProteinSurface = ` + $3Dmol.ProteinSurface.toString() + `; xe--, _e |= J[te++] << Pe, Pe += 8; } if (Xe -= Qe, x.total_out += Xe, O.total += Xe, O.wrap & 4 && Xe && (x.adler = O.check = /*UPDATE_CHECK(state.check, put - _out, _out);*/ - O.flags ? R(O.check, ie, Xe, De - Xe) : Oe(O.check, ie, Xe, De - Xe)), Xe = Qe, O.wrap & 4 && (O.flags ? _e : Fi(_e)) !== O.check) { + O.flags ? R(O.check, ie, Xe, De - Xe) : Oe(O.check, ie, Xe, De - Xe)), Xe = Qe, O.wrap & 4 && (O.flags ? _e : ki(_e)) !== O.check) { x.msg = "incorrect data check", O.mode = Mt; break; } @@ -24845,7 +24845,7 @@ var ProteinSurface = ` + $3Dmol.ProteinSurface.toString() + `; let J, ie, te; return Yt(x) || (J = x.state, J.wrap !== 0 && J.mode !== Mr) ? $t : J.mode === Mr && (ie = 1, ie = Oe(ie, W, O, 0), ie !== J.check) ? ui : (te = Hi(x, W, O, O), te ? (J.mode = Bi, di) : (J.havedict = 1, Zt)); }; - var gs = Ui, ms = Ni, vs = ki, bs = fs, ys = Gi, xs = us, Es = ds, ws = _s, As = ps, Ms = "pako inflate (from Nodeca project)", Nt = { + var gs = Ui, ms = Ni, vs = Fi, bs = fs, ys = Gi, xs = us, Es = ds, ws = _s, As = ps, Ms = "pako inflate (from Nodeca project)", Nt = { inflateReset: gs, inflateReset2: ms, inflateResetKeep: vs, @@ -24931,15 +24931,15 @@ var ProteinSurface = ` + $3Dmol.ProteinSurface.toString() + `; function Ps(x, W) { return W = W || {}, W.raw = !0, Yr(x, W); } - var Is = br, Rs = Yr, $s = Ps, Bs = Yr, zs = Ee, Fs = { + var Is = br, Rs = Yr, $s = Ps, Bs = Yr, zs = Ee, ks = { Inflate: Is, inflate: Rs, inflateRaw: $s, ungzip: Bs, constants: zs }; - const { Deflate: ks, deflate: Us, deflateRaw: Ns, gzip: Gs } = Zn, { Inflate: Ws, inflate: Hs, inflateRaw: Vs, ungzip: js } = Fs; - var Ki = ks, Zi = Us, Yi = Ns, Xi = Gs, Qi = Ws, Ji = Hs, qi = Vs, en = js, tn = Ee, Ks = { + const { Deflate: Fs, deflate: Us, deflateRaw: Ns, gzip: Gs } = Zn, { Inflate: Ws, inflate: Hs, inflateRaw: Vs, ungzip: js } = ks; + var Ki = Fs, Zi = Us, Yi = Ns, Xi = Gs, Qi = Ws, Ji = Hs, qi = Vs, en = js, tn = Ee, Ks = { Deflate: Ki, deflate: Zi, deflateRaw: Yi, @@ -25051,28 +25051,28 @@ function create_if_block_8$1(r) { ), g = text$3(" > 50)"), M = space$7(), L = element$7("div"), T = element$7("span"), T.textContent = " ", D = element$7("span"), I = text$3("Very low ("), z = text$3( /*confidenceLabel*/ r[2] - ), P = text$3(" < 50)"), attr$8(f, "class", "w-4 h-4 svelte-1ib1ln5"), set_style$3(f, "background-color", "rgb(0, 83, 214)"), attr$8(u, "class", "legendlabel svelte-1ib1ln5"), attr$8(n, "class", "flex space-x-1 py-1 items-center svelte-1ib1ln5"), attr$8(C, "class", "w-4 h-4 svelte-1ib1ln5"), set_style$3(C, "background-color", "rgb(101, 203, 243)"), attr$8(b, "class", "legendlabel svelte-1ib1ln5"), attr$8(c, "class", "flex space-x-1 py-1 items-center svelte-1ib1ln5"), attr$8(p, "class", "w-4 h-4 svelte-1ib1ln5"), set_style$3(p, "background-color", "rgb(255, 219, 19)"), attr$8(v, "class", "legendlabel svelte-1ib1ln5"), attr$8(w, "class", "flex space-x-1 py-1 items-center svelte-1ib1ln5"), attr$8(T, "class", "w-4 h-4 svelte-1ib1ln5"), set_style$3(T, "background-color", "rgb(255, 125, 69)"), attr$8(D, "class", "legendlabel svelte-1ib1ln5"), attr$8(L, "class", "flex space-x-1 py-1 items-center svelte-1ib1ln5"), attr$8(t, "class", "flex text-sm items-center space-x-2 justify-center svelte-1ib1ln5"), attr$8(e, "class", "absolute bottom-0 left-0 z-50 p-2 -mb-2 w-full bg-white svelte-1ib1ln5"); + ), P = text$3(" < 50)"), attr$8(f, "class", "w-4 h-4 svelte-1skivl7"), set_style$3(f, "background-color", "rgb(0, 83, 214)"), attr$8(u, "class", "legendlabel svelte-1skivl7"), attr$8(n, "class", "flex space-x-1 py-1 items-center svelte-1skivl7"), attr$8(C, "class", "w-4 h-4 svelte-1skivl7"), set_style$3(C, "background-color", "rgb(101, 203, 243)"), attr$8(b, "class", "legendlabel svelte-1skivl7"), attr$8(c, "class", "flex space-x-1 py-1 items-center svelte-1skivl7"), attr$8(p, "class", "w-4 h-4 svelte-1skivl7"), set_style$3(p, "background-color", "rgb(255, 219, 19)"), attr$8(v, "class", "legendlabel svelte-1skivl7"), attr$8(w, "class", "flex space-x-1 py-1 items-center svelte-1skivl7"), attr$8(T, "class", "w-4 h-4 svelte-1skivl7"), set_style$3(T, "background-color", "rgb(255, 125, 69)"), attr$8(D, "class", "legendlabel svelte-1skivl7"), attr$8(L, "class", "flex space-x-1 py-1 items-center svelte-1skivl7"), attr$8(t, "class", "flex text-sm items-center space-x-2 justify-center svelte-1skivl7"), attr$8(e, "class", "absolute bottom-0 left-0 z-50 p-2 -mb-2 w-full bg-white svelte-1skivl7"); }, - m(B, F) { - insert$a(B, e, F), append$8(e, t), append$8(t, n), append$8(n, f), append$8(n, u), append$8(u, y), append$8(u, h), append$8(u, _), append$8(t, E), append$8(t, c), append$8(c, C), append$8(c, b), append$8(b, A), append$8(b, S), append$8(b, s), append$8(t, o), append$8(t, w), append$8(w, p), append$8(w, v), append$8(v, a), append$8(v, l), append$8(v, g), append$8(t, M), append$8(t, L), append$8(L, T), append$8(L, D), append$8(D, I), append$8(D, z), append$8(D, P); + m(B, k) { + insert$a(B, e, k), append$8(e, t), append$8(t, n), append$8(n, f), append$8(n, u), append$8(u, y), append$8(u, h), append$8(u, _), append$8(t, E), append$8(t, c), append$8(c, C), append$8(c, b), append$8(b, A), append$8(b, S), append$8(b, s), append$8(t, o), append$8(t, w), append$8(w, p), append$8(w, v), append$8(v, a), append$8(v, l), append$8(v, g), append$8(t, M), append$8(t, L), append$8(L, T), append$8(L, D), append$8(D, I), append$8(D, z), append$8(D, P); }, - p(B, F) { - F[0] & /*confidenceLabel*/ + p(B, k) { + k[0] & /*confidenceLabel*/ 4 && set_data$3( h, /*confidenceLabel*/ B[2] - ), F[0] & /*confidenceLabel*/ + ), k[0] & /*confidenceLabel*/ 4 && set_data$3( S, /*confidenceLabel*/ B[2] - ), F[0] & /*confidenceLabel*/ + ), k[0] & /*confidenceLabel*/ 4 && set_data$3( l, /*confidenceLabel*/ B[2] - ), F[0] & /*confidenceLabel*/ + ), k[0] & /*confidenceLabel*/ 4 && set_data$3( z, /*confidenceLabel*/ @@ -25095,7 +25095,7 @@ function create_if_block_6$1(r) { let n = t(r), f = n(r); return { c() { - e = element$7("div"), f.c(), attr$8(e, "class", "absolute z-50 bottom-0 right-0 mr-2 flex divide-x border border-gray-200 mb-2 rounded items-center justify-center svelte-1ib1ln5"); + e = element$7("div"), f.c(), attr$8(e, "class", "absolute z-50 bottom-0 right-0 mr-2 flex divide-x border border-gray-200 mb-2 rounded items-center justify-center svelte-1skivl7"); }, m(u, y) { insert$a(u, e, y), f.m(e, null); @@ -25112,7 +25112,7 @@ function create_else_block$5(r) { let e, t, n; return { c() { - e = element$7("button"), e.innerHTML = '', attr$8(e, "class", "p-2 svelte-1ib1ln5"), attr$8(e, "title", "Pause"); + e = element$7("button"), e.innerHTML = '', attr$8(e, "class", "p-2 svelte-1skivl7"), attr$8(e, "title", "Pause"); }, m(f, u) { insert$a(f, e, u), t || (n = listen$2( @@ -25132,7 +25132,7 @@ function create_if_block_7$1(r) { let e, t, n; return { c() { - e = element$7("button"), e.innerHTML = '', attr$8(e, "class", "p-2 svelte-1ib1ln5"), attr$8(e, "title", "Play"); + e = element$7("button"), e.innerHTML = '', attr$8(e, "class", "p-2 svelte-1skivl7"), attr$8(e, "title", "Play"); }, m(f, u) { insert$a(f, e, u), t || (n = listen$2( @@ -25157,10 +25157,10 @@ function create_if_block_2$1(r) { v[a] = create_each_block_2(get_each_context_2(r, p, a)); return { c() { - e = element$7("div"), t = element$7("div"), n = element$7("h5"), n.textContent = "Settings", f = space$7(), u = element$7("button"), u.innerHTML = ' Close menu', y = space$7(); + e = element$7("div"), t = element$7("div"), n = element$7("h5"), n.textContent = "Settings", f = space$7(), u = element$7("button"), u.innerHTML = ' Close menu', y = space$7(); for (let a = 0; a < v.length; a += 1) v[a].c(); - h = space$7(), _ = element$7("div"), E = element$7("div"), c = element$7("label"), c.textContent = "Label atoms on hover", C = space$7(), b = element$7("label"), A = element$7("input"), S = space$7(), s = element$7("div"), attr$8(n, "id", "settings-drawer-label"), attr$8(n, "class", "inline-flex items-center mb-4 text-base font-semibold text-gray-500 dark:text-gray-400 svelte-1ib1ln5"), attr$8(u, "type", "button"), attr$8(u, "data-drawer-hide", "drawer-example"), attr$8(u, "aria-controls", "drawer-example"), attr$8(u, "class", "text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 absolute top-2.5 right-2.5 inline-flex items-center dark:hover:bg-gray-600 dark:hover:text-white svelte-1ib1ln5"), attr$8(t, "class", "p-4 svelte-1ib1ln5"), attr$8(c, "class", "text-sm font-medium text-gray-600 dark:text-gray-400 w-1/2 svelte-1ib1ln5"), attr$8(A, "type", "checkbox"), attr$8(A, "class", "sr-only peer svelte-1ib1ln5"), attr$8(s, "class", "w-11 h-6 bg-gray-200 rounded-full peer dark:bg-gray-700 peer-focus:ring-4 peer-focus:ring-orange-300 dark:peer-focus:ring-orange-800 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-orange-400 svelte-1ib1ln5"), attr$8(b, "class", "relative inline-flex items-center mr-5 cursor-pointer text-center justify-center svelte-1ib1ln5"), attr$8(E, "class", "flex items-center border-t border-b border-gray-200 bg-white px-4 py-2 space-x-2 svelte-1ib1ln5"), attr$8(_, "class", "bg-white svelte-1ib1ln5"), attr$8(e, "id", "settings-drawer"), attr$8(e, "class", "absolute top-0 right-0 z-50 h-full overflow-y-auto transition-transform bg-gray-100 w-80 dark:bg-gray-800 svelte-1ib1ln5"), attr$8(e, "tabindex", "-1"), attr$8(e, "aria-labelledby", "settings-drawer-label"); + h = space$7(), _ = element$7("div"), E = element$7("div"), c = element$7("label"), c.textContent = "Label atoms on hover", C = space$7(), b = element$7("label"), A = element$7("input"), S = space$7(), s = element$7("div"), attr$8(n, "id", "settings-drawer-label"), attr$8(n, "class", "inline-flex items-center mb-4 text-base font-semibold text-gray-500 dark:text-gray-400 svelte-1skivl7"), attr$8(u, "type", "button"), attr$8(u, "data-drawer-hide", "drawer-example"), attr$8(u, "aria-controls", "drawer-example"), attr$8(u, "class", "text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 absolute top-2.5 right-2.5 inline-flex items-center dark:hover:bg-gray-600 dark:hover:text-white svelte-1skivl7"), attr$8(t, "class", "p-4 svelte-1skivl7"), attr$8(c, "class", "text-sm font-medium text-gray-600 dark:text-gray-400 w-1/2 svelte-1skivl7"), attr$8(A, "type", "checkbox"), attr$8(A, "class", "sr-only peer svelte-1skivl7"), attr$8(s, "class", "w-11 h-6 bg-gray-200 rounded-full peer dark:bg-gray-700 peer-focus:ring-4 peer-focus:ring-orange-300 dark:peer-focus:ring-orange-800 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-orange-400 svelte-1skivl7"), attr$8(b, "class", "relative inline-flex items-center mr-5 cursor-pointer text-center justify-center svelte-1skivl7"), attr$8(E, "class", "flex items-center border-t border-b border-gray-200 bg-white px-4 py-2 space-x-2 svelte-1skivl7"), attr$8(_, "class", "bg-white svelte-1skivl7"), attr$8(e, "id", "settings-drawer"), attr$8(e, "class", "absolute top-0 right-0 z-50 h-full overflow-y-auto transition-transform bg-gray-100 w-80 dark:bg-gray-800 svelte-1skivl7"), attr$8(e, "tabindex", "-1"), attr$8(e, "aria-labelledby", "settings-drawer-label"); }, m(a, l) { insert$a(a, e, l), append$8(e, t), append$8(t, n), append$8(t, f), append$8(t, u), append$8(e, y); @@ -25224,7 +25224,7 @@ function create_if_block_5$1(r) { } return { c() { - e = element$7("label"), t = element$7("input"), n = space$7(), f = element$7("div"), attr$8(t, "type", "checkbox"), t.__value = "", set_input_value$1(t, t.__value), attr$8(t, "class", "sr-only peer svelte-1ib1ln5"), attr$8(f, "class", "w-11 h-6 bg-gray-200 rounded-full peer dark:bg-gray-700 peer-focus:ring-4 peer-focus:ring-orange-300 dark:peer-focus:ring-orange-800 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-orange-400 svelte-1ib1ln5"), attr$8(e, "class", "relative inline-flex items-center mr-5 cursor-pointer text-center justify-center svelte-1ib1ln5"); + e = element$7("label"), t = element$7("input"), n = space$7(), f = element$7("div"), attr$8(t, "type", "checkbox"), t.__value = "", set_input_value$1(t, t.__value), attr$8(t, "class", "sr-only peer svelte-1skivl7"), attr$8(f, "class", "w-11 h-6 bg-gray-200 rounded-full peer dark:bg-gray-700 peer-focus:ring-4 peer-focus:ring-orange-300 dark:peer-focus:ring-orange-800 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-orange-400 svelte-1skivl7"), attr$8(e, "class", "relative inline-flex items-center mr-5 cursor-pointer text-center justify-center svelte-1skivl7"); }, m(_, E) { insert$a(_, e, E), append$8(e, t), t.checked = /*config*/ @@ -25281,7 +25281,7 @@ function create_if_block_4$1(r) { r[12][ /*setting*/ r[59] - ].step), attr$8(t, "class", "w-2/3 h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 svelte-1ib1ln5"), attr$8(_, "class", "w-1/3 text-center text-sm font-medium text-gray-600 dark:text-gray-400 svelte-1ib1ln5"), attr$8(e, "class", "flex items-center svelte-1ib1ln5"); + ].step), attr$8(t, "class", "w-2/3 h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 svelte-1skivl7"), attr$8(_, "class", "w-1/3 text-center text-sm font-medium text-gray-600 dark:text-gray-400 svelte-1skivl7"), attr$8(e, "class", "flex items-center svelte-1skivl7"); }, m(S, s) { insert$a(S, e, s), append$8(e, t), append$8(e, h), append$8(e, _), append$8(_, c), C || (b = listen$2(t, "change", A), C = !0); @@ -25342,8 +25342,8 @@ function create_if_block_3$1(r) { for (let b = 0; b < c.length; b += 1) c[b].c(); attr$8(e, "for", n = /*setting*/ - r[59]), attr$8(e, "class", "sr-only svelte-1ib1ln5"), attr$8(u, "id", y = /*setting*/ - r[59]), attr$8(u, "class", "bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 svelte-1ib1ln5"), /*config*/ + r[59]), attr$8(e, "class", "sr-only svelte-1skivl7"), attr$8(u, "id", y = /*setting*/ + r[59]), attr$8(u, "class", "bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 svelte-1skivl7"), /*config*/ r[0][ /*setting*/ r[59] @@ -25414,7 +25414,7 @@ function create_each_block_3(r) { r[0][ /*setting*/ r[59] - ], attr$8(e, "class", "svelte-1ib1ln5"); + ], attr$8(e, "class", "svelte-1skivl7"); }, m(y, h) { insert$a(y, e, h), append$8(e, n); @@ -25463,7 +25463,7 @@ function create_each_block_2(r) { return { c() { e = element$7("div"), t = element$7("div"), n = element$7("label"), u = text$3(f), h = space$7(), c && c.c(), _ = space$7(), C && C.c(), E = space$7(), b && b.c(), attr$8(n, "for", y = /*setting*/ - r[59]), attr$8(n, "class", "text-sm font-medium text-gray-600 dark:text-gray-400 w-1/2 svelte-1ib1ln5"), attr$8(t, "class", "flex items-center border-t border-b border-gray-200 bg-white px-4 py-2 space-x-2 svelte-1ib1ln5"), attr$8(e, "class", "flex flex-col mb-4 divide-y svelte-1ib1ln5"); + r[59]), attr$8(n, "class", "text-sm font-medium text-gray-600 dark:text-gray-400 w-1/2 svelte-1skivl7"), attr$8(t, "class", "flex items-center border-t border-b border-gray-200 bg-white px-4 py-2 space-x-2 svelte-1skivl7"), attr$8(e, "class", "flex flex-col mb-4 divide-y svelte-1skivl7"); }, m(A, S) { insert$a(A, e, S), append$8(e, t), append$8(t, n), append$8(n, u), append$8(t, h), c && c.m(t, null), append$8(t, _), C && C.m(t, null), append$8(t, E), b && b.m(t, null); @@ -25501,10 +25501,10 @@ function create_if_block$6(r) { b[A] = create_each_block$2(get_each_context$2(r, C, A)); return { c() { - e = element$7("div"), t = element$7("div"), n = element$7("h5"), n.textContent = "Representations", f = space$7(), u = element$7("button"), u.innerHTML = ' Close menu', y = space$7(); + e = element$7("div"), t = element$7("div"), n = element$7("h5"), n.textContent = "Representations", f = space$7(), u = element$7("button"), u.innerHTML = ' Close menu', y = space$7(); for (let A = 0; A < b.length; A += 1) b[A].c(); - h = space$7(), _ = element$7("button"), _.innerHTML = '
Add representation
', attr$8(n, "id", "drawer-label"), attr$8(n, "class", "inline-flex items-center mb-4 text-base font-semibold text-gray-500 dark:text-gray-400 svelte-1ib1ln5"), attr$8(u, "type", "button"), attr$8(u, "data-drawer-hide", "drawer-example"), attr$8(u, "aria-controls", "drawer-example"), attr$8(u, "class", "text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 absolute top-2.5 right-2.5 inline-flex items-center dark:hover:bg-gray-600 dark:hover:text-white svelte-1ib1ln5"), attr$8(t, "class", "p-4 svelte-1ib1ln5"), attr$8(_, "class", "w-full flex text-orange-600 justify-center my-2 text-sm space-x-2 items-center hover:text-gray-600 cursor-pointer svelte-1ib1ln5"), attr$8(e, "id", "drawer-example"), attr$8(e, "class", "absolute top-0 right-0 z-50 h-full overflow-y-auto transition-transform bg-gray-100 w-80 dark:bg-gray-800 border-l border-gray-200 svelte-1ib1ln5"), attr$8(e, "tabindex", "-1"), attr$8(e, "aria-labelledby", "drawer-label"); + h = space$7(), _ = element$7("button"), _.innerHTML = '
Add representation
', attr$8(n, "id", "drawer-label"), attr$8(n, "class", "inline-flex items-center mb-4 text-base font-semibold text-gray-500 dark:text-gray-400 svelte-1skivl7"), attr$8(u, "type", "button"), attr$8(u, "data-drawer-hide", "drawer-example"), attr$8(u, "aria-controls", "drawer-example"), attr$8(u, "class", "text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 absolute top-2.5 right-2.5 inline-flex items-center dark:hover:bg-gray-600 dark:hover:text-white svelte-1skivl7"), attr$8(t, "class", "p-4 svelte-1skivl7"), attr$8(_, "class", "w-full flex text-orange-600 justify-center my-2 text-sm space-x-2 items-center hover:text-gray-600 cursor-pointer svelte-1skivl7"), attr$8(e, "id", "drawer-example"), attr$8(e, "class", "absolute top-0 right-0 z-50 h-full overflow-y-auto transition-transform bg-gray-100 w-80 dark:bg-gray-800 border-l border-gray-200 svelte-1skivl7"), attr$8(e, "tabindex", "-1"), attr$8(e, "aria-labelledby", "drawer-label"); }, m(A, S) { insert$a(A, e, S), append$8(e, t), append$8(t, n), append$8(t, f), append$8(t, u), append$8(e, y); @@ -25548,7 +25548,7 @@ function create_if_block$6(r) { }; } function create_if_block_1$5(r) { - let e, t, n, f, u, y, h, _, E, c, C, b, A, S, s, o, w, p, v, a, l, g, M, L, T, D, I, z, P, B, F, N, $, k, G, H, U, V, Q, ae, oe, q, me, ne, fe, Ce, Me, Te, se, pe, we, ke, Ue, Ne, Be, ue, ye, ge, Se, ze, He, We, Y, K, ee, de, ve, Ie, Re, Z, ce, Ae, Fe, he, Oe, j, $e, Ve, R, be, Ee, X, le, Le, Ze, Ke, je, Je, Lt, rt, it, tt, Et, lt = ensure_array_like$2( + let e, t, n, f, u, y, h, _, E, c, C, b, A, S, s, o, w, p, v, a, l, g, M, L, T, D, I, z, P, B, k, N, $, F, G, H, U, V, Q, ae, oe, q, me, ne, fe, Ce, Me, Te, se, pe, we, Fe, Ue, Ne, Be, ue, ye, ge, Se, ze, He, We, Y, K, ee, de, ve, Ie, Re, Z, ce, Ae, ke, he, Oe, j, $e, Ve, R, be, Ee, X, le, Le, Ze, Ke, je, Je, Lt, rt, it, tt, Et, lt = ensure_array_like$2( /*moldata*/ r[3] ), wt = []; @@ -25613,7 +25613,7 @@ function create_if_block_1$5(r) { ) ); } - function Ft() { + function kt() { r[35].call( z, /*each_value*/ @@ -25631,7 +25631,7 @@ function create_if_block_1$5(r) { r[55] ); } - function kt() { + function Ft() { r[37].call( fe, /*each_value*/ @@ -25802,46 +25802,46 @@ function create_if_block_1$5(r) { for (let pt = 0; pt < wt.length; pt += 1) wt[pt].c(); f = space$7(), u = element$7("input"), y = space$7(), h = element$7("div"), _ = element$7("input"), E = space$7(), c = element$7("input"), C = space$7(), b = element$7("div"), A = element$7("label"), A.textContent = "Select style", S = space$7(), s = element$7("select"), o = element$7("option"), o.textContent = "Stick", w = element$7("option"), w.textContent = "Cartoon", p = element$7("option"), p.textContent = "Surface", v = text$3(`$ - `), a = element$7("option"), a.textContent = "Sphere", l = space$7(), g = element$7("div"), M = element$7("div"), M.textContent = "Expand selection", L = space$7(), T = element$7("input"), I = space$7(), z = element$7("input"), P = space$7(), B = element$7("div"), B.textContent = "Å", F = space$7(), N = element$7("div"), $ = element$7("div"), k = element$7("span"), k.textContent = "Full residue", G = space$7(), H = element$7("label"), U = element$7("input"), V = space$7(), Q = element$7("div"), ae = space$7(), oe = element$7("div"), q = element$7("span"), q.textContent = "Only sidechain", me = space$7(), ne = element$7("label"), fe = element$7("input"), Ce = space$7(), Me = element$7("div"), Te = space$7(), se = element$7("div"), pe = element$7("button"), ke = space$7(), Ue = element$7("button"), Be = space$7(), ue = element$7("button"), ge = space$7(), Se = element$7("button"), He = space$7(), We = element$7("button"), K = space$7(), ee = element$7("button"), ve = space$7(), Ie = element$7("button"), Z = space$7(), ce = element$7("div"), Ae = element$7("button"), Fe = text$3("AlphaFold"), Oe = space$7(), j = element$7("button"), $e = text$3("PyMol"), R = space$7(), be = element$7("button"), Ee = text$3("Jmol"), le = space$7(), Le = element$7("button"), Ze = text$3("Chain"), je = space$7(), Je = element$7("button"), Lt = text$3("Spectrum"), attr$8(n, "id", "style"), attr$8(n, "class", "bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 svelte-1ib1ln5"), /*rep*/ - r[53].model === void 0 && add_render_callback(Pt), attr$8(u, "type", "text"), attr$8(u, "id", "chain"), attr$8(u, "class", "w-1/2 bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 svelte-1ib1ln5"), attr$8(u, "placeholder", "Chain"), attr$8(t, "class", "p-1 flex space-x-1 svelte-1ib1ln5"), attr$8(_, "type", "text"), attr$8(_, "id", "chain"), attr$8(_, "class", "w-1/2 bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 svelte-1ib1ln5"), attr$8(_, "placeholder", "Resname"), attr$8(c, "type", "text"), attr$8(c, "id", "residue_range"), attr$8(c, "class", "w-full bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 svelte-1ib1ln5"), attr$8(c, "placeholder", "Residue range"), attr$8(h, "class", "p-1 flex space-x-1 svelte-1ib1ln5"), attr$8(A, "for", "countries"), attr$8(A, "class", "block mb-2 text-sm w-1/3 font-medium text-gray-600 dark:text-white svelte-1ib1ln5"), o.__value = "stick", set_input_value$1(o, o.__value), attr$8(o, "class", "svelte-1ib1ln5"), w.__value = "cartoon", set_input_value$1(w, w.__value), attr$8(w, "class", "svelte-1ib1ln5"), p.__value = "surface", set_input_value$1(p, p.__value), attr$8(p, "class", "svelte-1ib1ln5"), a.__value = "sphere", set_input_value$1(a, a.__value), attr$8(a, "class", "svelte-1ib1ln5"), attr$8(s, "id", "style"), attr$8(s, "class", "bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 svelte-1ib1ln5"), /*rep*/ - r[53].style === void 0 && add_render_callback(Tt), attr$8(b, "class", "p-1 flex space-x-1 items-center svelte-1ib1ln5"), attr$8(M, "class", " svelte-1ib1ln5"), attr$8(T, "id", "around"), attr$8(T, "type", "range"), T.value = D = /*rep*/ - r[53].around, attr$8(T, "min", "0"), attr$8(T, "max", "10"), attr$8(T, "step", "0.5"), attr$8(T, "class", "h-2 w-1/3 bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 svelte-1ib1ln5"), attr$8(z, "type", "text"), attr$8(z, "class", "w-8 svelte-1ib1ln5"), attr$8(B, "class", "svelte-1ib1ln5"), attr$8(g, "class", "flex p-1 items-center text-gray-700 space-x-1 text-sm svelte-1ib1ln5"), attr$8(k, "class", "svelte-1ib1ln5"), attr$8(U, "type", "checkbox"), U.__value = "", set_input_value$1(U, U.__value), attr$8(U, "class", "sr-only peer svelte-1ib1ln5"), attr$8(Q, "class", "w-11 h-6 bg-gray-200 rounded-full peer dark:bg-gray-700 peer-focus:ring-4 peer-focus:ring-orange-300 dark:peer-focus:ring-orange-800 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-orange-400 svelte-1ib1ln5"), attr$8(H, "class", "relative inline-flex items-center mr-5 cursor-pointer text-center svelte-1ib1ln5"), attr$8($, "class", "flex space-x-1 w-1/2 svelte-1ib1ln5"), attr$8(q, "class", "svelte-1ib1ln5"), attr$8(fe, "type", "checkbox"), fe.__value = "", set_input_value$1(fe, fe.__value), attr$8(fe, "class", "sr-only peer svelte-1ib1ln5"), attr$8(Me, "class", "w-11 h-6 bg-gray-200 rounded-full peer dark:bg-gray-700 peer-focus:ring-4 peer-focus:ring-orange-300 dark:peer-focus:ring-orange-800 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-orange-400 svelte-1ib1ln5"), attr$8(ne, "class", "relative inline-flex items-center mr-5 cursor-pointer text-center svelte-1ib1ln5"), attr$8(oe, "class", "flex space-x-1 w-1/2 svelte-1ib1ln5"), attr$8(N, "class", "flex p-1 items-center text-gray-700 space-x-1 text-sm svelte-1ib1ln5"), attr$8(pe, "class", we = null_to_empty( + `), a = element$7("option"), a.textContent = "Sphere", l = space$7(), g = element$7("div"), M = element$7("div"), M.textContent = "Expand selection", L = space$7(), T = element$7("input"), I = space$7(), z = element$7("input"), P = space$7(), B = element$7("div"), B.textContent = "Å", k = space$7(), N = element$7("div"), $ = element$7("div"), F = element$7("span"), F.textContent = "Full residue", G = space$7(), H = element$7("label"), U = element$7("input"), V = space$7(), Q = element$7("div"), ae = space$7(), oe = element$7("div"), q = element$7("span"), q.textContent = "Only sidechain", me = space$7(), ne = element$7("label"), fe = element$7("input"), Ce = space$7(), Me = element$7("div"), Te = space$7(), se = element$7("div"), pe = element$7("button"), Fe = space$7(), Ue = element$7("button"), Be = space$7(), ue = element$7("button"), ge = space$7(), Se = element$7("button"), He = space$7(), We = element$7("button"), K = space$7(), ee = element$7("button"), ve = space$7(), Ie = element$7("button"), Z = space$7(), ce = element$7("div"), Ae = element$7("button"), ke = text$3("AlphaFold"), Oe = space$7(), j = element$7("button"), $e = text$3("PyMol"), R = space$7(), be = element$7("button"), Ee = text$3("Jmol"), le = space$7(), Le = element$7("button"), Ze = text$3("Chain"), je = space$7(), Je = element$7("button"), Lt = text$3("Spectrum"), attr$8(n, "id", "style"), attr$8(n, "class", "bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 svelte-1skivl7"), /*rep*/ + r[53].model === void 0 && add_render_callback(Pt), attr$8(u, "type", "text"), attr$8(u, "id", "chain"), attr$8(u, "class", "w-1/2 bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 svelte-1skivl7"), attr$8(u, "placeholder", "Chain"), attr$8(t, "class", "p-1 flex space-x-1 svelte-1skivl7"), attr$8(_, "type", "text"), attr$8(_, "id", "chain"), attr$8(_, "class", "w-1/2 bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 svelte-1skivl7"), attr$8(_, "placeholder", "Resname"), attr$8(c, "type", "text"), attr$8(c, "id", "residue_range"), attr$8(c, "class", "w-full bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 svelte-1skivl7"), attr$8(c, "placeholder", "Residue range"), attr$8(h, "class", "p-1 flex space-x-1 svelte-1skivl7"), attr$8(A, "for", "countries"), attr$8(A, "class", "block mb-2 text-sm w-1/3 font-medium text-gray-600 dark:text-white svelte-1skivl7"), o.__value = "stick", set_input_value$1(o, o.__value), attr$8(o, "class", "svelte-1skivl7"), w.__value = "cartoon", set_input_value$1(w, w.__value), attr$8(w, "class", "svelte-1skivl7"), p.__value = "surface", set_input_value$1(p, p.__value), attr$8(p, "class", "svelte-1skivl7"), a.__value = "sphere", set_input_value$1(a, a.__value), attr$8(a, "class", "svelte-1skivl7"), attr$8(s, "id", "style"), attr$8(s, "class", "bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 svelte-1skivl7"), /*rep*/ + r[53].style === void 0 && add_render_callback(Tt), attr$8(b, "class", "p-1 flex space-x-1 items-center svelte-1skivl7"), attr$8(M, "class", " svelte-1skivl7"), attr$8(T, "id", "around"), attr$8(T, "type", "range"), T.value = D = /*rep*/ + r[53].around, attr$8(T, "min", "0"), attr$8(T, "max", "10"), attr$8(T, "step", "0.5"), attr$8(T, "class", "h-2 w-1/3 bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 svelte-1skivl7"), attr$8(z, "type", "text"), attr$8(z, "class", "w-8 svelte-1skivl7"), attr$8(B, "class", "svelte-1skivl7"), attr$8(g, "class", "flex p-1 items-center text-gray-700 space-x-1 text-sm svelte-1skivl7"), attr$8(F, "class", "svelte-1skivl7"), attr$8(U, "type", "checkbox"), U.__value = "", set_input_value$1(U, U.__value), attr$8(U, "class", "sr-only peer svelte-1skivl7"), attr$8(Q, "class", "w-11 h-6 bg-gray-200 rounded-full peer dark:bg-gray-700 peer-focus:ring-4 peer-focus:ring-orange-300 dark:peer-focus:ring-orange-800 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-orange-400 svelte-1skivl7"), attr$8(H, "class", "relative inline-flex items-center mr-5 cursor-pointer text-center svelte-1skivl7"), attr$8($, "class", "flex space-x-1 w-1/2 svelte-1skivl7"), attr$8(q, "class", "svelte-1skivl7"), attr$8(fe, "type", "checkbox"), fe.__value = "", set_input_value$1(fe, fe.__value), attr$8(fe, "class", "sr-only peer svelte-1skivl7"), attr$8(Me, "class", "w-11 h-6 bg-gray-200 rounded-full peer dark:bg-gray-700 peer-focus:ring-4 peer-focus:ring-orange-300 dark:peer-focus:ring-orange-800 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-orange-400 svelte-1skivl7"), attr$8(ne, "class", "relative inline-flex items-center mr-5 cursor-pointer text-center svelte-1skivl7"), attr$8(oe, "class", "flex space-x-1 w-1/2 svelte-1skivl7"), attr$8(N, "class", "flex p-1 items-center text-gray-700 space-x-1 text-sm svelte-1skivl7"), attr$8(pe, "class", we = null_to_empty( /*rep*/ r[53].color === "orangeCarbon" ? "bg-orange-600 rounded-full w-8 h-8 border-4 border-gray-300 cursor-pointer" : "bg-orange-600 rounded-full w-8 h-8 border-4 border-white cursor-pointer" - ) + " svelte-1ib1ln5"), attr$8(Ue, "class", Ne = null_to_empty( + ) + " svelte-1skivl7"), attr$8(Ue, "class", Ne = null_to_empty( /*rep*/ r[53].color === "redCarbon" ? "bg-red-600 rounded-full w-8 h-8 border-4 border-gray-300 cursor-pointer" : "bg-red-600 rounded-full w-8 h-8 border-4 border-white cursor-pointer" - ) + " svelte-1ib1ln5"), attr$8(ue, "class", ye = null_to_empty( + ) + " svelte-1skivl7"), attr$8(ue, "class", ye = null_to_empty( /*rep*/ r[53].color === "blackCarbon" ? "bg-black rounded-full w-8 h-8 border-4 border-gray-300 cursor-pointer" : "bg-black rounded-full w-8 h-8 border-4 border-white cursor-pointer" - ) + " svelte-1ib1ln5"), attr$8(Se, "class", ze = null_to_empty( + ) + " svelte-1skivl7"), attr$8(Se, "class", ze = null_to_empty( /*rep*/ r[53].color === "blueCarbon" ? "bg-blue-600 rounded-full w-8 h-8 border-4 border-gray-300 cursor-pointer" : "bg-blue-600 rounded-full w-8 h-8 border-4 border-white cursor-pointer" - ) + " svelte-1ib1ln5"), attr$8(We, "class", Y = null_to_empty( + ) + " svelte-1skivl7"), attr$8(We, "class", Y = null_to_empty( /*rep*/ r[53].color === "grayCarbon" ? "bg-gray-600 rounded-full w-8 h-8 border-4 border-gray-300 cursor-pointer" : "bg-gray-600 rounded-full w-8 h-8 border-4 border-white cursor-pointer" - ) + " svelte-1ib1ln5"), attr$8(ee, "class", de = null_to_empty( + ) + " svelte-1skivl7"), attr$8(ee, "class", de = null_to_empty( /*rep*/ r[53].color === "greenCarbon" ? "bg-green-600 rounded-full w-8 h-8 border-4 border-gray-300 cursor-pointer" : "bg-green-600 rounded-full w-8 h-8 border-4 border-white cursor-pointer" - ) + " svelte-1ib1ln5"), attr$8(Ie, "class", Re = null_to_empty( + ) + " svelte-1skivl7"), attr$8(Ie, "class", Re = null_to_empty( /*rep*/ r[53].color === "cyanCarbon" ? "bg-cyan-600 rounded-full w-8 h-8 border-4 border-gray-300 cursor-pointer" : "bg-cyan-600 rounded-full w-8 h-8 border-4 border-white cursor-pointer" - ) + " svelte-1ib1ln5"), attr$8(se, "class", "flex space-x-2 mt-2 svelte-1ib1ln5"), attr$8(Ae, "class", he = null_to_empty( + ) + " svelte-1skivl7"), attr$8(se, "class", "flex space-x-2 mt-2 svelte-1skivl7"), attr$8(Ae, "class", he = null_to_empty( /*rep*/ r[53].color === "alphafold" ? "rounded-lg p-1 border border-gray-400 cursor-pointer bg-gray-200" : "rounded-lg p-1 border border-gray-200 cursor-pointer bg-white" - ) + " svelte-1ib1ln5"), attr$8(j, "class", Ve = null_to_empty( + ) + " svelte-1skivl7"), attr$8(j, "class", Ve = null_to_empty( /*rep*/ r[53].color === "default" ? "rounded-lg p-1 border border-gray-400 cursor-pointer bg-gray-200" : "rounded-lg p-1 border border-gray-200 cursor-pointer bg-white" - ) + " svelte-1ib1ln5"), attr$8(be, "class", X = null_to_empty( + ) + " svelte-1skivl7"), attr$8(be, "class", X = null_to_empty( /*rep*/ r[53].color === "Jmol" ? "rounded-lg p-1 border border-gray-400 cursor-pointer bg-gray-200" : "rounded-lg p-1 border border-gray-200 cursor-pointer bg-white" - ) + " svelte-1ib1ln5"), attr$8(Le, "class", Ke = null_to_empty( + ) + " svelte-1skivl7"), attr$8(Le, "class", Ke = null_to_empty( /*rep*/ r[53].color === "chain" ? "rounded-lg p-1 border border-gray-400 cursor-pointer bg-gray-200" : "rounded-lg p-1 border border-gray-200 cursor-pointer bg-white" - ) + " svelte-1ib1ln5"), attr$8(Je, "class", rt = null_to_empty( + ) + " svelte-1skivl7"), attr$8(Je, "class", rt = null_to_empty( /*rep*/ r[53].color === "spectrum" ? "rounded-lg p-1 border border-gray-400 cursor-pointer bg-gray-200" : "rounded-lg p-1 border border-gray-200 cursor-pointer bg-white" - ) + " svelte-1ib1ln5"), attr$8(ce, "class", "flex space-x-2 py-2 text-sm svelte-1ib1ln5"), attr$8(e, "class", "svelte-1ib1ln5"); + ) + " svelte-1skivl7"), attr$8(ce, "class", "flex space-x-2 py-2 text-sm svelte-1skivl7"), attr$8(e, "class", "svelte-1skivl7"); }, m(pt, yt) { insert$a(pt, e, yt), append$8(e, t), append$8(t, n); @@ -25873,18 +25873,18 @@ function create_if_block_1$5(r) { z, /*rep*/ r[53].around - ), append$8(g, P), append$8(g, B), append$8(e, F), append$8(e, N), append$8(N, $), append$8($, k), append$8($, G), append$8($, H), append$8(H, U), U.checked = /*rep*/ + ), append$8(g, P), append$8(g, B), append$8(e, k), append$8(e, N), append$8(N, $), append$8($, F), append$8($, G), append$8($, H), append$8(H, U), U.checked = /*rep*/ r[53].byres, append$8(H, V), append$8(H, Q), append$8(N, ae), append$8(N, oe), append$8(oe, q), append$8(oe, me), append$8(oe, ne), append$8(ne, fe), fe.checked = /*rep*/ - r[53].sidechain, append$8(ne, Ce), append$8(ne, Me), append$8(e, Te), append$8(e, se), append$8(se, pe), append$8(se, ke), append$8(se, Ue), append$8(se, Be), append$8(se, ue), append$8(se, ge), append$8(se, Se), append$8(se, He), append$8(se, We), append$8(se, K), append$8(se, ee), append$8(se, ve), append$8(se, Ie), append$8(e, Z), append$8(e, ce), append$8(ce, Ae), append$8(Ae, Fe), append$8(ce, Oe), append$8(ce, j), append$8(j, $e), append$8(ce, R), append$8(ce, be), append$8(be, Ee), append$8(ce, le), append$8(ce, Le), append$8(Le, Ze), append$8(ce, je), append$8(ce, Je), append$8(Je, Lt), tt || (Et = [ + r[53].sidechain, append$8(ne, Ce), append$8(ne, Me), append$8(e, Te), append$8(e, se), append$8(se, pe), append$8(se, Fe), append$8(se, Ue), append$8(se, Be), append$8(se, ue), append$8(se, ge), append$8(se, Se), append$8(se, He), append$8(se, We), append$8(se, K), append$8(se, ee), append$8(se, ve), append$8(se, Ie), append$8(e, Z), append$8(e, ce), append$8(ce, Ae), append$8(Ae, ke), append$8(ce, Oe), append$8(ce, j), append$8(j, $e), append$8(ce, R), append$8(ce, be), append$8(be, Ee), append$8(ce, le), append$8(ce, Le), append$8(Le, Ze), append$8(ce, je), append$8(ce, Je), append$8(Je, Lt), tt || (Et = [ listen$2(n, "change", Pt), listen$2(u, "input", vt), listen$2(_, "input", bt), listen$2(c, "input", mt), listen$2(s, "change", Tt), listen$2(T, "change", Ot), - listen$2(z, "input", Ft), + listen$2(z, "input", kt), listen$2(U, "change", Qt), - listen$2(fe, "change", kt), + listen$2(fe, "change", Ft), listen$2(pe, "click", Jt), listen$2(Ue, "click", qt), listen$2(ue, "click", er), @@ -25959,51 +25959,51 @@ function create_if_block_1$5(r) { 2 && we !== (we = null_to_empty( /*rep*/ r[53].color === "orangeCarbon" ? "bg-orange-600 rounded-full w-8 h-8 border-4 border-gray-300 cursor-pointer" : "bg-orange-600 rounded-full w-8 h-8 border-4 border-white cursor-pointer" - ) + " svelte-1ib1ln5") && attr$8(pe, "class", we), yt[0] & /*representations*/ + ) + " svelte-1skivl7") && attr$8(pe, "class", we), yt[0] & /*representations*/ 2 && Ne !== (Ne = null_to_empty( /*rep*/ r[53].color === "redCarbon" ? "bg-red-600 rounded-full w-8 h-8 border-4 border-gray-300 cursor-pointer" : "bg-red-600 rounded-full w-8 h-8 border-4 border-white cursor-pointer" - ) + " svelte-1ib1ln5") && attr$8(Ue, "class", Ne), yt[0] & /*representations*/ + ) + " svelte-1skivl7") && attr$8(Ue, "class", Ne), yt[0] & /*representations*/ 2 && ye !== (ye = null_to_empty( /*rep*/ r[53].color === "blackCarbon" ? "bg-black rounded-full w-8 h-8 border-4 border-gray-300 cursor-pointer" : "bg-black rounded-full w-8 h-8 border-4 border-white cursor-pointer" - ) + " svelte-1ib1ln5") && attr$8(ue, "class", ye), yt[0] & /*representations*/ + ) + " svelte-1skivl7") && attr$8(ue, "class", ye), yt[0] & /*representations*/ 2 && ze !== (ze = null_to_empty( /*rep*/ r[53].color === "blueCarbon" ? "bg-blue-600 rounded-full w-8 h-8 border-4 border-gray-300 cursor-pointer" : "bg-blue-600 rounded-full w-8 h-8 border-4 border-white cursor-pointer" - ) + " svelte-1ib1ln5") && attr$8(Se, "class", ze), yt[0] & /*representations*/ + ) + " svelte-1skivl7") && attr$8(Se, "class", ze), yt[0] & /*representations*/ 2 && Y !== (Y = null_to_empty( /*rep*/ r[53].color === "grayCarbon" ? "bg-gray-600 rounded-full w-8 h-8 border-4 border-gray-300 cursor-pointer" : "bg-gray-600 rounded-full w-8 h-8 border-4 border-white cursor-pointer" - ) + " svelte-1ib1ln5") && attr$8(We, "class", Y), yt[0] & /*representations*/ + ) + " svelte-1skivl7") && attr$8(We, "class", Y), yt[0] & /*representations*/ 2 && de !== (de = null_to_empty( /*rep*/ r[53].color === "greenCarbon" ? "bg-green-600 rounded-full w-8 h-8 border-4 border-gray-300 cursor-pointer" : "bg-green-600 rounded-full w-8 h-8 border-4 border-white cursor-pointer" - ) + " svelte-1ib1ln5") && attr$8(ee, "class", de), yt[0] & /*representations*/ + ) + " svelte-1skivl7") && attr$8(ee, "class", de), yt[0] & /*representations*/ 2 && Re !== (Re = null_to_empty( /*rep*/ r[53].color === "cyanCarbon" ? "bg-cyan-600 rounded-full w-8 h-8 border-4 border-gray-300 cursor-pointer" : "bg-cyan-600 rounded-full w-8 h-8 border-4 border-white cursor-pointer" - ) + " svelte-1ib1ln5") && attr$8(Ie, "class", Re), yt[0] & /*representations*/ + ) + " svelte-1skivl7") && attr$8(Ie, "class", Re), yt[0] & /*representations*/ 2 && he !== (he = null_to_empty( /*rep*/ r[53].color === "alphafold" ? "rounded-lg p-1 border border-gray-400 cursor-pointer bg-gray-200" : "rounded-lg p-1 border border-gray-200 cursor-pointer bg-white" - ) + " svelte-1ib1ln5") && attr$8(Ae, "class", he), yt[0] & /*representations*/ + ) + " svelte-1skivl7") && attr$8(Ae, "class", he), yt[0] & /*representations*/ 2 && Ve !== (Ve = null_to_empty( /*rep*/ r[53].color === "default" ? "rounded-lg p-1 border border-gray-400 cursor-pointer bg-gray-200" : "rounded-lg p-1 border border-gray-200 cursor-pointer bg-white" - ) + " svelte-1ib1ln5") && attr$8(j, "class", Ve), yt[0] & /*representations*/ + ) + " svelte-1skivl7") && attr$8(j, "class", Ve), yt[0] & /*representations*/ 2 && X !== (X = null_to_empty( /*rep*/ r[53].color === "Jmol" ? "rounded-lg p-1 border border-gray-400 cursor-pointer bg-gray-200" : "rounded-lg p-1 border border-gray-200 cursor-pointer bg-white" - ) + " svelte-1ib1ln5") && attr$8(be, "class", X), yt[0] & /*representations*/ + ) + " svelte-1skivl7") && attr$8(be, "class", X), yt[0] & /*representations*/ 2 && Ke !== (Ke = null_to_empty( /*rep*/ r[53].color === "chain" ? "rounded-lg p-1 border border-gray-400 cursor-pointer bg-gray-200" : "rounded-lg p-1 border border-gray-200 cursor-pointer bg-white" - ) + " svelte-1ib1ln5") && attr$8(Le, "class", Ke), yt[0] & /*representations*/ + ) + " svelte-1skivl7") && attr$8(Le, "class", Ke), yt[0] & /*representations*/ 2 && rt !== (rt = null_to_empty( /*rep*/ r[53].color === "spectrum" ? "rounded-lg p-1 border border-gray-400 cursor-pointer bg-gray-200" : "rounded-lg p-1 border border-gray-200 cursor-pointer bg-white" - ) + " svelte-1ib1ln5") && attr$8(Je, "class", rt); + ) + " svelte-1skivl7") && attr$8(Je, "class", rt); }, i(pt) { pt && (it || add_render_callback(() => { @@ -26027,7 +26027,7 @@ function create_each_block_1$1(r) { /*i*/ r[58] ), e.__value = /*i*/ - r[58], set_input_value$1(e, e.__value), attr$8(e, "class", "svelte-1ib1ln5"); + r[58], set_input_value$1(e, e.__value), attr$8(e, "class", "svelte-1skivl7"); }, m(y, h) { insert$a(y, e, h), append$8(e, n), append$8(e, f), append$8(e, u); @@ -26082,10 +26082,10 @@ function create_each_block$2(r) { return { c() { e = element$7("div"), t = element$7("div"), n = element$7("div"), f = element$7("button"), u = svg_element$3("svg"), y = svg_element$3("path"), _ = space$7(), E = element$7("span"), E.textContent = `Representation #${/*index*/ - r[55]}`, c = space$7(), C = element$7("button"), C.innerHTML = '', b = space$7(), A = element$7("button"), A.innerHTML = '', S = space$7(), a && a.c(), attr$8(y, "stroke-linecap", "round"), attr$8(y, "stroke-linejoin", "round"), attr$8(y, "d", "M8.25 4.5l7.5 7.5-7.5 7.5"), attr$8(y, "class", "svelte-1ib1ln5"), attr$8(u, "xmlns", "http://www.w3.org/2000/svg"), attr$8(u, "fill", "none"), attr$8(u, "viewBox", "0 0 24 24"), attr$8(u, "stroke-width", "1.5"), attr$8(u, "stroke", "currentColor"), attr$8(u, "class", h = null_to_empty( + r[55]}`, c = space$7(), C = element$7("button"), C.innerHTML = '', b = space$7(), A = element$7("button"), A.innerHTML = '', S = space$7(), a && a.c(), attr$8(y, "stroke-linecap", "round"), attr$8(y, "stroke-linejoin", "round"), attr$8(y, "d", "M8.25 4.5l7.5 7.5-7.5 7.5"), attr$8(y, "class", "svelte-1skivl7"), attr$8(u, "xmlns", "http://www.w3.org/2000/svg"), attr$8(u, "fill", "none"), attr$8(u, "viewBox", "0 0 24 24"), attr$8(u, "stroke-width", "1.5"), attr$8(u, "stroke", "currentColor"), attr$8(u, "class", h = null_to_empty( /*rep*/ r[53].visible ? "transform rotate-90 w-5 h-5 " : "w-5 h-5 " - ) + " svelte-1ib1ln5"), attr$8(E, "class", "svelte-1ib1ln5"), attr$8(f, "class", "flex items-center space-x-2 svelte-1ib1ln5"), attr$8(C, "class", "svelte-1ib1ln5"), attr$8(A, "title", "zoom to selection"), attr$8(A, "class", "svelte-1ib1ln5"), attr$8(n, "class", "flex space-x-2 items-center cursor-pointer p-1 svelte-1ib1ln5"), attr$8(t, "class", " svelte-1ib1ln5"), attr$8(e, "class", "bg-white border-b border-t border-gray-200 py-4 px-2 svelte-1ib1ln5"); + ) + " svelte-1skivl7"), attr$8(E, "class", "svelte-1skivl7"), attr$8(f, "class", "flex items-center space-x-2 svelte-1skivl7"), attr$8(C, "class", "svelte-1skivl7"), attr$8(A, "title", "zoom to selection"), attr$8(A, "class", "svelte-1skivl7"), attr$8(n, "class", "flex space-x-2 items-center cursor-pointer p-1 svelte-1skivl7"), attr$8(t, "class", " svelte-1skivl7"), attr$8(e, "class", "bg-white border-b border-t border-gray-200 py-4 px-2 svelte-1skivl7"); }, m(l, g) { insert$a(l, e, g), append$8(e, t), append$8(t, n), append$8(n, f), append$8(f, u), append$8(u, y), append$8(f, _), append$8(f, E), append$8(n, c), append$8(n, C), append$8(n, b), append$8(n, A), append$8(t, S), a && a.m(t, null), s || (o = [ @@ -26099,7 +26099,7 @@ function create_each_block$2(r) { 2 && h !== (h = null_to_empty( /*rep*/ r[53].visible ? "transform rotate-90 w-5 h-5 " : "w-5 h-5 " - ) + " svelte-1ib1ln5") && attr$8(u, "class", h), /*rep*/ + ) + " svelte-1skivl7") && attr$8(u, "class", h), /*rep*/ r[53].visible ? a ? (a.p(r, g), g[0] & /*representations*/ 2 && transition_in$7(a, 1)) : (a = create_if_block_1$5(r), a.c(), transition_in$7(a, 1), a.m(t, null)) : a && (a.d(1), a = null); }, @@ -26124,12 +26124,12 @@ function create_fragment$a(r) { ); return { c() { - e = element$7("div"), t = element$7("div"), n = element$7("div"), f = element$7("div"), u = element$7("button"), u.innerHTML = '', y = space$7(), h = element$7("button"), h.innerHTML = '', _ = space$7(), E = element$7("button"), E.innerHTML = '', c = space$7(), M && M.c(), C = space$7(), L && L.c(), b = space$7(), A = element$7("div"), S = element$7("button"), S.innerHTML = '', s = space$7(), o = element$7("span"), o.textContent = "Cite 3dmol.js as Rego & Koes, doi:10/gb5g5n", w = space$7(), p = element$7("div"), v = space$7(), T && T.c(), a = space$7(), D && D.c(), attr$8(u, "class", "p-2 svelte-1ib1ln5"), attr$8(u, "title", "Reset View"), attr$8(h, "class", "p-2 svelte-1ib1ln5"), attr$8(h, "title", "Settings"), attr$8(E, "class", "p-2 svelte-1ib1ln5"), attr$8(E, "title", "Representations"), attr$8(f, "class", "absolute z-50 top-0 right-0 mr-2 flex flex-col divide-y border border-gray-200 mt-2 rounded items-center justify-center bg-white dark:bg-gray-800 svelte-1ib1ln5"), attr$8(S, "class", "p-1 svelte-1ib1ln5"), attr$8(S, "title", "How to cite 3Dmol.js"), attr$8(o, "class", "absolute -top-1 left-6 w-max rounded bg-gray-900 px-2 py-1 text-sm font-medium text-gray-50 opacity-0 shadow transition-opacity svelte-1ib1ln5"), toggle_class$5( + e = element$7("div"), t = element$7("div"), n = element$7("div"), f = element$7("div"), u = element$7("button"), u.innerHTML = '', y = space$7(), h = element$7("button"), h.innerHTML = '', _ = space$7(), E = element$7("button"), E.innerHTML = '', c = space$7(), M && M.c(), C = space$7(), L && L.c(), b = space$7(), A = element$7("div"), S = element$7("button"), S.innerHTML = '', s = space$7(), o = element$7("span"), o.textContent = "Cite 3dmol.js as Rego & Koes, doi:10/gb5g5n", w = space$7(), p = element$7("div"), v = space$7(), T && T.c(), a = space$7(), D && D.c(), attr$8(u, "class", "p-2 svelte-1skivl7"), attr$8(u, "title", "Reset View"), attr$8(h, "class", "p-2 svelte-1skivl7"), attr$8(h, "title", "Settings"), attr$8(E, "class", "p-2 svelte-1skivl7"), attr$8(E, "title", "Representations"), attr$8(f, "class", "absolute z-50 top-0 right-0 mr-2 flex flex-col divide-y border border-gray-200 mt-2 rounded items-center justify-center bg-white dark:bg-gray-800 svelte-1skivl7"), attr$8(S, "class", "p-1 svelte-1skivl7"), attr$8(S, "title", "How to cite 3Dmol.js"), attr$8(o, "class", "absolute -top-1 left-6 w-max rounded bg-gray-900 px-2 py-1 text-sm font-medium text-gray-50 opacity-0 shadow transition-opacity svelte-1skivl7"), toggle_class$5( o, "opacity-100", /*showCiteTooltip*/ r[6] - ), attr$8(A, "class", "absolute z-50 bottom-0 left-0 ml-2 flex divide-x mb-2 rounded items-center justify-center svelte-1ib1ln5"), attr$8(p, "class", "viewer w-full h-full z-10 svelte-1ib1ln5"), attr$8(n, "class", "gr-block gr-box relative w-full overflow-hidden svelte-1ib1ln5"), attr$8(t, "class", "overflow-hidden flex gap-px w-full h-full flex-wrap svelte-1ib1ln5"), attr$8(e, "class", "bg-white w-full minh svelte-1ib1ln5"); + ), attr$8(A, "class", "absolute z-50 bottom-0 left-0 ml-2 flex divide-x mb-2 rounded items-center justify-center svelte-1skivl7"), attr$8(p, "class", "viewer w-full h-full z-10 svelte-1skivl7"), attr$8(n, "class", "gr-block gr-box relative w-full overflow-hidden svelte-1skivl7"), attr$8(t, "class", "overflow-hidden flex gap-px w-full h-full flex-wrap svelte-1skivl7"), attr$8(e, "class", "bg-white w-full minh svelte-1skivl7"); }, m(I, z) { insert$a(I, e, z), append$8(e, t), append$8(t, n), append$8(n, f), append$8(f, u), append$8(f, y), append$8(f, h), append$8(f, _), append$8(f, E), append$8(n, c), M && M.m(n, null), append$8(n, C), L && L.m(n, null), append$8(n, b), append$8(n, A), append$8(A, S), append$8(A, s), append$8(A, o), append$8(n, w), append$8(n, p), r[21](p), append$8(n, v), T && T.m(n, null), append$8(n, a), D && D.m(n, null), l || (g = [ @@ -26297,10 +26297,10 @@ function instance$9(r, e, t) { function B(ue) { _[ue] = select_value(this), t(0, _), t(12, h); } - function F() { + function k() { E = this.value, t(5, E); } - const N = (ue, ye, ge) => t(1, ye[ge].visible = !ue.visible, b), $ = (ue) => w(ue), k = (ue) => l(ue); + const N = (ue, ye, ge) => t(1, ye[ge].visible = !ue.visible, b), $ = (ue) => w(ue), F = (ue) => l(ue); function G(ue, ye) { ue[ye].model = select_value(this), t(1, b); } @@ -26328,7 +26328,7 @@ function instance$9(r, e, t) { function me(ue, ye) { ue[ye].sidechain = this.checked, t(1, b); } - const ne = (ue, ye, ge) => t(1, ye[ge].color = "orangeCarbon", b), fe = (ue, ye, ge) => t(1, ye[ge].color = "redCarbon", b), Ce = (ue, ye, ge) => t(1, ye[ge].color = "blackCarbon", b), Me = (ue, ye, ge) => t(1, ye[ge].color = "blueCarbon", b), Te = (ue, ye, ge) => t(1, ye[ge].color = "grayCarbon", b), se = (ue, ye, ge) => t(1, ye[ge].color = "greenCarbon", b), pe = (ue, ye, ge) => t(1, ye[ge].color = "cyanCarbon", b), we = (ue, ye, ge) => t(1, ye[ge].color = "alphafold", b), ke = (ue, ye, ge) => t(1, ye[ge].color = "default", b), Ue = (ue, ye, ge) => t(1, ye[ge].color = "Jmol", b), Ne = (ue, ye, ge) => t(1, ye[ge].color = "chain", b), Be = (ue, ye, ge) => t(1, ye[ge].color = "spectrum", b); + const ne = (ue, ye, ge) => t(1, ye[ge].color = "orangeCarbon", b), fe = (ue, ye, ge) => t(1, ye[ge].color = "redCarbon", b), Ce = (ue, ye, ge) => t(1, ye[ge].color = "blackCarbon", b), Me = (ue, ye, ge) => t(1, ye[ge].color = "blueCarbon", b), Te = (ue, ye, ge) => t(1, ye[ge].color = "grayCarbon", b), se = (ue, ye, ge) => t(1, ye[ge].color = "greenCarbon", b), pe = (ue, ye, ge) => t(1, ye[ge].color = "cyanCarbon", b), we = (ue, ye, ge) => t(1, ye[ge].color = "alphafold", b), Fe = (ue, ye, ge) => t(1, ye[ge].color = "default", b), Ue = (ue, ye, ge) => t(1, ye[ge].color = "Jmol", b), Ne = (ue, ye, ge) => t(1, ye[ge].color = "chain", b), Be = (ue, ye, ge) => t(1, ye[ge].color = "spectrum", b); return r.$$set = (ue) => { "confidenceLabel" in ue && t(2, u = ue.confidenceLabel), "moldata" in ue && t(3, y = ue.moldata), "config" in ue && t(0, _ = ue.config), "representations" in ue && t(1, b = ue.representations); }, r.$$.update = () => { @@ -26367,10 +26367,10 @@ function instance$9(r, e, t) { z, P, B, - F, + k, N, $, - k, + F, G, H, U, @@ -26388,7 +26388,7 @@ function instance$9(r, e, t) { se, pe, we, - ke, + Fe, Ue, Ne, Be @@ -26923,8 +26923,8 @@ function api_factory(r, e) { }; try { L = await P(a); - } catch (F) { - console.error(`Could not get api details: ${F.message}`); + } catch (k) { + console.error(`Could not get api details: ${k.message}`); } return { config: a, @@ -26940,10 +26940,10 @@ function api_factory(r, e) { `${s}//${o}`, c ); - const F = await M(a); - _(F); - } catch (F) { - console.error(F), E && E({ + const k = await M(a); + _(k); + } catch (k) { + console.error(k), E && E({ status: "error", message: "Could not load this space.", load_status: "error", @@ -26971,8 +26971,8 @@ function api_factory(r, e) { detail: "NOT_FOUND" }); } - function D(B, F, N) { - let $ = !1, k = !1, G; + function D(B, k, N) { + let $ = !1, F = !1, G; if (typeof B == "number") G = a.dependencies[B]; else { @@ -26984,22 +26984,22 @@ function api_factory(r, e) { "Cannot call predict on this function as it may run forever. Use submit instead" ); return new Promise((H, U) => { - const V = I(B, F, N); + const V = I(B, k, N); let Q; V.on("data", (ae) => { - k && (V.destroy(), H(ae)), $ = !0, Q = ae; + F && (V.destroy(), H(ae)), $ = !0, Q = ae; }).on("status", (ae) => { - ae.stage === "error" && U(ae), ae.stage === "complete" && (k = !0, $ && (V.destroy(), H(Q))); + ae.stage === "error" && U(ae), ae.stage === "complete" && (F = !0, $ && (V.destroy(), H(Q))); }); }); } - function I(B, F, N) { - let $, k; + function I(B, k, N) { + let $, F; if (typeof B == "number") - $ = B, k = L.unnamed_endpoints[$]; + $ = B, F = L.unnamed_endpoints[$]; else { const se = B.replace(/^\//, ""); - $ = l[se], k = L.named_endpoints[B.trim()]; + $ = l[se], F = L.named_endpoints[B.trim()]; } if (typeof $ != "number") throw new Error( @@ -27012,8 +27012,8 @@ function api_factory(r, e) { let me = ""; typeof window < "u" && (me = new URLSearchParams(window.location.search).toString()), u( `${s}//${resolve_root(o, a.path, !0)}`, - F, k, + F, c ).then((se) => { if (Q = { data: se || [], event_data: N, fn_index: $ }, skip_queue($, a)) @@ -27031,14 +27031,14 @@ function api_factory(r, e) { session_hash: p }, c - ).then(([we, ke]) => { + ).then(([we, Fe]) => { const Ue = A ? transform_output( we.data, - k, + F, a.root, a.root_url ) : we.data; - ke == 200 ? (ne({ + Fe == 200 ? (ne({ type: "data", endpoint: V, fn_index: $, @@ -27087,8 +27087,8 @@ function api_factory(r, e) { !0 )} /queue/join${me ? "?" + me : ""}`); - g && we.searchParams.set("__sign", g), G = e(we), G.onclose = (ke) => { - ke.wasClean || ne({ + g && we.searchParams.set("__sign", g), G = e(we), G.onclose = (Fe) => { + Fe.wasClean || ne({ type: "status", stage: "error", broken: !0, @@ -27098,8 +27098,8 @@ function api_factory(r, e) { fn_index: $, time: /* @__PURE__ */ new Date() }); - }, G.onmessage = function(ke) { - const Ue = JSON.parse(ke.data), { type: Ne, status: Be, data: ue } = handle_message( + }, G.onmessage = function(Fe) { + const Ue = JSON.parse(Fe.data), { type: Ne, status: Be, data: ue } = handle_message( Ue, v[$] ); @@ -27135,7 +27135,7 @@ function api_factory(r, e) { time: /* @__PURE__ */ new Date(), data: A ? transform_output( ue.data, - k, + F, a.root, a.root_url ) : ue.data, @@ -27174,8 +27174,8 @@ function api_factory(r, e) { !0 )}/queue/join?${pe}` ); - H = new EventSource(we), H.onmessage = async function(ke) { - const Ue = JSON.parse(ke.data), { type: Ne, status: Be, data: ue } = handle_message( + H = new EventSource(we), H.onmessage = async function(Fe) { + const Ue = JSON.parse(Fe.data), { type: Ne, status: Be, data: ue } = handle_message( Ue, v[$] ); @@ -27232,7 +27232,7 @@ function api_factory(r, e) { time: /* @__PURE__ */ new Date(), data: A ? transform_output( ue.data, - k, + F, a.root, a.root_url ) : ue.data, @@ -27252,16 +27252,16 @@ function api_factory(r, e) { }); function ne(se) { const we = q[se.type] || []; - we == null || we.forEach((ke) => ke(se)); + we == null || we.forEach((Fe) => Fe(se)); } function fe(se, pe) { - const we = q, ke = we[se] || []; - return we[se] = ke, ke == null || ke.push(pe), { on: fe, off: Ce, cancel: Me, destroy: Te }; + const we = q, Fe = we[se] || []; + return we[se] = Fe, Fe == null || Fe.push(pe), { on: fe, off: Ce, cancel: Me, destroy: Te }; } function Ce(se, pe) { const we = q; - let ke = we[se] || []; - return ke = ke == null ? void 0 : ke.filter((Ue) => Ue !== pe), we[se] = ke, { on: fe, off: Ce, cancel: Me, destroy: Te }; + let Fe = we[se] || []; + return Fe = Fe == null ? void 0 : Fe.filter((Ue) => Ue !== pe), we[se] = Fe, { on: fe, off: Ce, cancel: Me, destroy: Te }; } async function Me() { const se = { @@ -27311,10 +27311,10 @@ function api_factory(r, e) { destroy: Te }; } - async function z(B, F, N) { + async function z(B, k, N) { var $; - const k = { "Content-Type": "application/json" }; - c && (k.Authorization = `Bearer ${c}`); + const F = { "Content-Type": "application/json" }; + c && (F.Authorization = `Bearer ${c}`); let G, H = a.components.find( (Q) => Q.id === B ); @@ -27330,10 +27330,10 @@ function api_factory(r, e) { body: JSON.stringify({ data: N, component_id: B, - fn_name: F, + fn_name: k, session_hash: p }), - headers: k + headers: F } ); if (!U.ok) @@ -27345,8 +27345,8 @@ function api_factory(r, e) { async function P(B) { if (L) return L; - const F = { "Content-Type": "application/json" }; - c && (F.Authorization = `Bearer ${c}`); + const k = { "Content-Type": "application/json" }; + c && (k.Authorization = `Bearer ${c}`); let N; if (semiver(B.version || "2.0.0", "3.30") < 0 ? N = await r( "https://gradio-space-api-fetcher-v2.hf.space/api", @@ -27356,10 +27356,10 @@ function api_factory(r, e) { serialize: !1, config: JSON.stringify(B) }), - headers: F + headers: k } ) : N = await r(`${B.root}/info`, { - headers: F + headers: k }), !N.ok) throw new Error(BROKEN_CONNECTION_MSG); let $ = await N.json(); @@ -31150,55 +31150,55 @@ function instance$7(r, e, t) { function p() { C || (t(7, s.value = "", s), s.click()); } - async function v(F) { + async function v(k) { await tick$3(); - const N = await upload(F, b, S); + const N = await upload(k, b, S); return o("load", c === "single" ? _optionalChain([N, "optionalAccess", ($) => $[0]]) : N), N || []; } - async function a(F) { - if (!F.length) + async function a(k) { + if (!k.length) return; - let N = F.map((k) => new File([k], k.name)), $ = await prepare_files(N); + let N = k.map((F) => new File([F], F.name)), $ = await prepare_files(N); return await v($); } - async function l(F) { - const N = F.target; + async function l(k) { + const N = k.target; N.files && await a(Array.from(N.files)); } - async function g(F) { - if (t(11, y = !1), !_optionalChain([F, "access", ($) => $.dataTransfer, "optionalAccess", ($) => $.files])) + async function g(k) { + if (t(11, y = !1), !_optionalChain([k, "access", ($) => $.dataTransfer, "optionalAccess", ($) => $.files])) return; - const N = Array.from(F.dataTransfer.files).filter(($) => is_valid_mimetype(u, $.type) ? !0 : (o("error", `Invalid file type only ${u} allowed.`), !1)); + const N = Array.from(k.dataTransfer.files).filter(($) => is_valid_mimetype(u, $.type) ? !0 : (o("error", `Invalid file type only ${u} allowed.`), !1)); await a(N); } - function M(F) { - bubble$1.call(this, r, F); + function M(k) { + bubble$1.call(this, r, k); } - function L(F) { - bubble$1.call(this, r, F); + function L(k) { + bubble$1.call(this, r, k); } - function T(F) { - bubble$1.call(this, r, F); + function T(k) { + bubble$1.call(this, r, k); } - function D(F) { - bubble$1.call(this, r, F); + function D(k) { + bubble$1.call(this, r, k); } - function I(F) { - bubble$1.call(this, r, F); + function I(k) { + bubble$1.call(this, r, k); } - function z(F) { - bubble$1.call(this, r, F); + function z(k) { + bubble$1.call(this, r, k); } - function P(F) { - bubble$1.call(this, r, F); + function P(k) { + bubble$1.call(this, r, k); } - function B(F) { - binding_callbacks$2[F ? "unshift" : "push"](() => { - s = F, t(7, s); + function B(k) { + binding_callbacks$2[k ? "unshift" : "push"](() => { + s = k, t(7, s); }); } - return r.$$set = (F) => { - "filetype" in F && t(0, u = F.filetype), "dragging" in F && t(11, y = F.dragging), "boundedheight" in F && t(1, h = F.boundedheight), "center" in F && t(2, _ = F.center), "flex" in F && t(3, E = F.flex), "file_count" in F && t(4, c = F.file_count), "disable_click" in F && t(12, C = F.disable_click), "root" in F && t(13, b = F.root), "hidden" in F && t(5, A = F.hidden), "$$scope" in F && t(15, f = F.$$scope); + return r.$$set = (k) => { + "filetype" in k && t(0, u = k.filetype), "dragging" in k && t(11, y = k.dragging), "boundedheight" in k && t(1, h = k.boundedheight), "center" in k && t(2, _ = k.center), "flex" in k && t(3, E = k.flex), "file_count" in k && t(4, c = k.file_count), "disable_click" in k && t(12, C = k.disable_click), "root" in k && t(13, b = k.root), "hidden" in k && t(5, A = k.hidden), "$$scope" in k && t(15, f = k.$$scope); }, [ u, h, @@ -33030,13 +33030,13 @@ async function scroll_into_view(r, e = !0) { } } function instance$2(r, e, t) { - let n, { $$slots: f = {}, $$scope: u } = e, { i18n: y } = e, { eta: h = null } = e, { queue: _ = !1 } = e, { queue_position: E } = e, { queue_size: c } = e, { status: C } = e, { scroll_to_output: b = !1 } = e, { timer: A = !0 } = e, { show_progress: S = "full" } = e, { message: s = null } = e, { progress: o = null } = e, { variant: w = "default" } = e, { loading_text: p = "Loading..." } = e, { absolute: v = !0 } = e, { translucent: a = !1 } = e, { border: l = !1 } = e, { autoscroll: g } = e, M, L = !1, T = 0, D = 0, I = null, z = 0, P = null, B, F = null, N = !0; + let n, { $$slots: f = {}, $$scope: u } = e, { i18n: y } = e, { eta: h = null } = e, { queue: _ = !1 } = e, { queue_position: E } = e, { queue_size: c } = e, { status: C } = e, { scroll_to_output: b = !1 } = e, { timer: A = !0 } = e, { show_progress: S = "full" } = e, { message: s = null } = e, { progress: o = null } = e, { variant: w = "default" } = e, { loading_text: p = "Loading..." } = e, { absolute: v = !0 } = e, { translucent: a = !1 } = e, { border: l = !1 } = e, { autoscroll: g } = e, M, L = !1, T = 0, D = 0, I = null, z = 0, P = null, B, k = null, N = !0; const $ = () => { - t(25, T = performance.now()), t(26, D = 0), L = !0, k(); + t(25, T = performance.now()), t(26, D = 0), L = !0, F(); }; - function k() { + function F() { requestAnimationFrame(() => { - t(26, D = (performance.now() - T) / 1e3), L && k(); + t(26, D = (performance.now() - T) / 1e3), L && F(); }); } function G() { @@ -33048,7 +33048,7 @@ function instance$2(r, e, t) { let H = null; function U(Q) { binding_callbacks[Q ? "unshift" : "push"](() => { - F = Q, t(16, F), t(7, o), t(14, P), t(15, B); + k = Q, t(16, k), t(7, o), t(14, P), t(15, B); }); } function V(Q) { @@ -33068,7 +33068,7 @@ function instance$2(r, e, t) { return Q.index / Q.length; if (Q.progress != null) return Q.progress; - })) : t(14, P = null), P ? (t(15, B = P[P.length - 1]), F && (B === 0 ? t(16, F.style.transition = "0", F) : t(16, F.style.transition = "150ms", F))) : t(15, B = void 0)), r.$$.dirty[0] & /*status*/ + })) : t(14, P = null), P ? (t(15, B = P[P.length - 1]), k && (B === 0 ? t(16, k.style.transition = "0", k) : t(16, k.style.transition = "150ms", k))) : t(15, B = void 0)), r.$$.dirty[0] & /*status*/ 16 && (C === "pending" ? $() : G()), r.$$.dirty[0] & /*el, scroll_to_output, status, autoscroll*/ 20979728 && M && b && (C === "pending" || C === "complete") && scroll_into_view(M, g), r.$$.dirty[0] & /*status, message*/ 8388624, r.$$.dirty[0] & /*timer_diff*/ @@ -33090,7 +33090,7 @@ function instance$2(r, e, t) { M, P, B, - F, + k, z, N, H, @@ -33815,7 +33815,7 @@ function instance(r, e, t) { around: { type: Number, default: 0 }, byres: { type: Boolean, default: !1 }, visible: { type: Boolean, default: !0 } - }, P = null, B = ["pdb", "sdf", "mol2"], F = []; + }, P = null, B = ["pdb", "sdf", "mol2"], k = []; async function N(q) { if (q == null) return []; @@ -33824,7 +33824,7 @@ function instance(r, e, t) { for (const ne of q) { let fe = ne.orig_name.split(".").pop(); if (!B.includes(fe)) { - F.push(`Invalid file extension for ${ne.orig_name}. Expected one of ${B.join(", ")}, got ${fe}`), t(20, P = null); + k.push(`Invalid file extension for ${ne.orig_name}. Expected one of ${B.join(", ")}, got ${fe}`), t(20, P = null); continue; } me.push({ @@ -33838,7 +33838,7 @@ function instance(r, e, t) { } else if (typeof q == "object" && q !== null) { let me = q.orig_name.split(".").pop(); if (!B.includes(me)) - F.push(`Invalid file extension for ${q.orig_name}. Expected one of ${B.join(", ")}, got ${me}`), t(20, P = null); + k.push(`Invalid file extension for ${q.orig_name}. Expected one of ${B.join(", ")}, got ${me}`), t(20, P = null); else { let ne = await fetchFileContent(q.url); t(20, P = [ @@ -33853,9 +33853,9 @@ function instance(r, e, t) { } else t(20, P = null); } - let $ = 0, k = []; + let $ = 0, F = []; const G = ({ detail: q }) => M.dispatch("select", q), H = ({ detail: q }) => { - t(21, F = []), t(0, h = q); + t(21, k = []), t(0, h = q); }, U = ({ detail: q }) => t(23, I = q), V = () => M.dispatch("clear"), Q = ({ detail: q }) => M.dispatch("select", q), ae = () => M.dispatch("error", "identifier not found in database, check spelling"), oe = () => M.dispatch("upload"); return r.$$set = (q) => { "elem_id" in q && t(1, f = q.elem_id), "elem_classes" in q && t(2, u = q.elem_classes), "visible" in q && t(3, y = q.visible), "value" in q && t(0, h = q.value), "interactive" in q && t(4, _ = q.interactive), "root" in q && t(5, E = q.root), "label" in q && t(6, c = q.label), "show_label" in q && t(7, C = q.show_label), "height" in q && t(8, b = q.height), "reps" in q && t(25, A = q.reps), "config" in q && t(9, S = q.config), "confidenceLabel" in q && t(10, s = q.confidenceLabel), "showviewer" in q && t(11, o = q.showviewer), "proxy_url" in q && t(26, w = q.proxy_url), "_selectable" in q && t(12, p = q._selectable), "loading_status" in q && t(13, v = q.loading_status), "container" in q && t(14, a = q.container), "scale" in q && t(15, l = q.scale), "min_width" in q && t(16, g = q.min_width), "gradio" in q && t(17, M = q.gradio), "file_count" in q && t(18, L = q.file_count), "file_types" in q && t(19, T = q.file_types); @@ -33866,9 +33866,9 @@ function instance(r, e, t) { 1048576 && t(28, $ = P ? P.length : 0), r.$$.dirty[0] & /*reps, errors, lenMoldata*/ 304087040 && (A.forEach((q) => { for (const [me, ne] of Object.entries(z)) - q[me] === void 0 && (q[me] = ne.default), q[me].constructor != ne.type && F.push(`Invalid type for ${me} in reps. Expected ${ne.type}, got ${typeof q[me]}`); + q[me] === void 0 && (q[me] = ne.default), q[me].constructor != ne.type && k.push(`Invalid type for ${me} in reps. Expected ${ne.type}, got ${typeof q[me]}`); }), A.forEach((q) => { - q.model <= $ && k.push(q); + q.model <= $ && F.push(q); })), r.$$.dirty[0] & /*_value*/ 4194304 && N(n); }, [ @@ -33893,10 +33893,10 @@ function instance(r, e, t) { L, T, P, - F, + k, n, I, - k, + F, A, w, D,