molstar-partial-charges
Version:
Molstar plugin for partial charges
1,563 lines • 5.59 MB
JavaScript
var Vfe = Object.defineProperty, Rfe = Object.defineProperties;
var Bfe = Object.getOwnPropertyDescriptors;
var u3 = Object.getOwnPropertySymbols;
var zj = Object.prototype.hasOwnProperty, Gj = Object.prototype.propertyIsEnumerable;
var l3 = Math.pow, yI = (e, t, r) => t in e ? Vfe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, ae = (e, t) => {
for (var r in t || (t = {}))
zj.call(t, r) && yI(e, r, t[r]);
if (u3)
for (var r of u3(t))
Gj.call(t, r) && yI(e, r, t[r]);
return e;
}, Ve = (e, t) => Rfe(e, Bfe(t));
var Hj = (e, t) => {
var r = {};
for (var n in e)
zj.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
if (e != null && u3)
for (var n of u3(e))
t.indexOf(n) < 0 && Gj.call(e, n) && (r[n] = e[n]);
return r;
};
var Uo = (e, t, r) => yI(e, typeof t != "symbol" ? t + "" : t, r);
var we = (e, t, r) => new Promise((n, i) => {
var s = (m) => {
try {
c(r.next(m));
} catch (u) {
i(u);
}
}, a = (m) => {
try {
c(r.throw(m));
} catch (u) {
i(u);
}
}, c = (m) => m.done ? n(m.value) : Promise.resolve(m.value).then(s, a);
c((r = r.apply(e, t)).next());
});
var Mh = typeof globalThis != "undefined" ? globalThis : typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : {};
function QO(e) {
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
function YO(e) {
if (Object.prototype.hasOwnProperty.call(e, "__esModule")) return e;
var t = e.default;
if (typeof t == "function") {
var r = function n() {
return this instanceof n ? Reflect.construct(t, arguments, this.constructor) : t.apply(this, arguments);
};
r.prototype = t.prototype;
} else r = {};
return Object.defineProperty(r, "__esModule", { value: !0 }), Object.keys(e).forEach(function(n) {
var i = Object.getOwnPropertyDescriptor(e, n);
Object.defineProperty(r, n, i.get ? i : {
enumerable: !0,
get: function() {
return e[n];
}
});
}), r;
}
var c3 = {}, vI = { exports: {} }, Dr = {};
/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var Wj;
function Ofe() {
if (Wj) return Dr;
Wj = 1;
var e = Symbol.for("react.element"), t = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), n = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), s = Symbol.for("react.provider"), a = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), u = Symbol.for("react.memo"), l = Symbol.for("react.lazy"), y = Symbol.iterator;
function p(L) {
return L === null || typeof L != "object" ? null : (L = y && L[y] || L["@@iterator"], typeof L == "function" ? L : null);
}
var o = { isMounted: function() {
return !1;
}, enqueueForceUpdate: function() {
}, enqueueReplaceState: function() {
}, enqueueSetState: function() {
} }, f = Object.assign, d = {};
function v(L, G, U) {
this.props = L, this.context = G, this.refs = d, this.updater = U || o;
}
v.prototype.isReactComponent = {}, v.prototype.setState = function(L, G) {
if (typeof L != "object" && typeof L != "function" && L != null) throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
this.updater.enqueueSetState(this, L, G, "setState");
}, v.prototype.forceUpdate = function(L) {
this.updater.enqueueForceUpdate(this, L, "forceUpdate");
};
function h() {
}
h.prototype = v.prototype;
function g(L, G, U) {
this.props = L, this.context = G, this.refs = d, this.updater = U || o;
}
var b = g.prototype = new h();
b.constructor = g, f(b, v.prototype), b.isPureReactComponent = !0;
var P = Array.isArray, S = Object.prototype.hasOwnProperty, _ = { current: null }, C = { key: !0, ref: !0, __self: !0, __source: !0 };
function x(L, G, U) {
var j, N = {}, F = null, z = null;
if (G != null) for (j in G.ref !== void 0 && (z = G.ref), G.key !== void 0 && (F = "" + G.key), G) S.call(G, j) && !C.hasOwnProperty(j) && (N[j] = G[j]);
var H = arguments.length - 2;
if (H === 1) N.children = U;
else if (1 < H) {
for (var W = Array(H), Q = 0; Q < H; Q++) W[Q] = arguments[Q + 2];
N.children = W;
}
if (L && L.defaultProps) for (j in H = L.defaultProps, H) N[j] === void 0 && (N[j] = H[j]);
return { $$typeof: e, type: L, key: F, ref: z, props: N, _owner: _.current };
}
function A(L, G) {
return { $$typeof: e, type: L.type, key: G, ref: L.ref, props: L.props, _owner: L._owner };
}
function T(L) {
return typeof L == "object" && L !== null && L.$$typeof === e;
}
function M(L) {
var G = { "=": "=0", ":": "=2" };
return "$" + L.replace(/[=:]/g, function(U) {
return G[U];
});
}
var D = /\/+/g;
function I(L, G) {
return typeof L == "object" && L !== null && L.key != null ? M("" + L.key) : G.toString(36);
}
function w(L, G, U, j, N) {
var F = typeof L;
(F === "undefined" || F === "boolean") && (L = null);
var z = !1;
if (L === null) z = !0;
else switch (F) {
case "string":
case "number":
z = !0;
break;
case "object":
switch (L.$$typeof) {
case e:
case t:
z = !0;
}
}
if (z) return z = L, N = N(z), L = j === "" ? "." + I(z, 0) : j, P(N) ? (U = "", L != null && (U = L.replace(D, "$&/") + "/"), w(N, G, U, "", function(Q) {
return Q;
})) : N != null && (T(N) && (N = A(N, U + (!N.key || z && z.key === N.key ? "" : ("" + N.key).replace(D, "$&/") + "/") + L)), G.push(N)), 1;
if (z = 0, j = j === "" ? "." : j + ":", P(L)) for (var H = 0; H < L.length; H++) {
F = L[H];
var W = j + I(F, H);
z += w(F, G, U, W, N);
}
else if (W = p(L), typeof W == "function") for (L = W.call(L), H = 0; !(F = L.next()).done; ) F = F.value, W = j + I(F, H++), z += w(F, G, U, W, N);
else if (F === "object") throw G = String(L), Error("Objects are not valid as a React child (found: " + (G === "[object Object]" ? "object with keys {" + Object.keys(L).join(", ") + "}" : G) + "). If you meant to render a collection of children, use an array instead.");
return z;
}
function E(L, G, U) {
if (L == null) return L;
var j = [], N = 0;
return w(L, j, "", "", function(F) {
return G.call(U, F, N++);
}), j;
}
function R(L) {
if (L._status === -1) {
var G = L._result;
G = G(), G.then(function(U) {
(L._status === 0 || L._status === -1) && (L._status = 1, L._result = U);
}, function(U) {
(L._status === 0 || L._status === -1) && (L._status = 2, L._result = U);
}), L._status === -1 && (L._status = 0, L._result = G);
}
if (L._status === 1) return L._result.default;
throw L._result;
}
var V = { current: null }, B = { transition: null }, k = { ReactCurrentDispatcher: V, ReactCurrentBatchConfig: B, ReactCurrentOwner: _ };
return Dr.Children = { map: E, forEach: function(L, G, U) {
E(L, function() {
G.apply(this, arguments);
}, U);
}, count: function(L) {
var G = 0;
return E(L, function() {
G++;
}), G;
}, toArray: function(L) {
return E(L, function(G) {
return G;
}) || [];
}, only: function(L) {
if (!T(L)) throw Error("React.Children.only expected to receive a single React element child.");
return L;
} }, Dr.Component = v, Dr.Fragment = r, Dr.Profiler = i, Dr.PureComponent = g, Dr.StrictMode = n, Dr.Suspense = m, Dr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = k, Dr.cloneElement = function(L, G, U) {
if (L == null) throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + L + ".");
var j = f({}, L.props), N = L.key, F = L.ref, z = L._owner;
if (G != null) {
if (G.ref !== void 0 && (F = G.ref, z = _.current), G.key !== void 0 && (N = "" + G.key), L.type && L.type.defaultProps) var H = L.type.defaultProps;
for (W in G) S.call(G, W) && !C.hasOwnProperty(W) && (j[W] = G[W] === void 0 && H !== void 0 ? H[W] : G[W]);
}
var W = arguments.length - 2;
if (W === 1) j.children = U;
else if (1 < W) {
H = Array(W);
for (var Q = 0; Q < W; Q++) H[Q] = arguments[Q + 2];
j.children = H;
}
return { $$typeof: e, type: L.type, key: N, ref: F, props: j, _owner: z };
}, Dr.createContext = function(L) {
return L = { $$typeof: a, _currentValue: L, _currentValue2: L, _threadCount: 0, Provider: null, Consumer: null, _defaultValue: null, _globalName: null }, L.Provider = { $$typeof: s, _context: L }, L.Consumer = L;
}, Dr.createElement = x, Dr.createFactory = function(L) {
var G = x.bind(null, L);
return G.type = L, G;
}, Dr.createRef = function() {
return { current: null };
}, Dr.forwardRef = function(L) {
return { $$typeof: c, render: L };
}, Dr.isValidElement = T, Dr.lazy = function(L) {
return { $$typeof: l, _payload: { _status: -1, _result: L }, _init: R };
}, Dr.memo = function(L, G) {
return { $$typeof: u, type: L, compare: G === void 0 ? null : G };
}, Dr.startTransition = function(L) {
var G = B.transition;
B.transition = {};
try {
L();
} finally {
B.transition = G;
}
}, Dr.unstable_act = function() {
throw Error("act(...) is not supported in production builds of React.");
}, Dr.useCallback = function(L, G) {
return V.current.useCallback(L, G);
}, Dr.useContext = function(L) {
return V.current.useContext(L);
}, Dr.useDebugValue = function() {
}, Dr.useDeferredValue = function(L) {
return V.current.useDeferredValue(L);
}, Dr.useEffect = function(L, G) {
return V.current.useEffect(L, G);
}, Dr.useId = function() {
return V.current.useId();
}, Dr.useImperativeHandle = function(L, G, U) {
return V.current.useImperativeHandle(L, G, U);
}, Dr.useInsertionEffect = function(L, G) {
return V.current.useInsertionEffect(L, G);
}, Dr.useLayoutEffect = function(L, G) {
return V.current.useLayoutEffect(L, G);
}, Dr.useMemo = function(L, G) {
return V.current.useMemo(L, G);
}, Dr.useReducer = function(L, G, U) {
return V.current.useReducer(L, G, U);
}, Dr.useRef = function(L) {
return V.current.useRef(L);
}, Dr.useState = function(L) {
return V.current.useState(L);
}, Dr.useSyncExternalStore = function(L, G, U) {
return V.current.useSyncExternalStore(L, G, U);
}, Dr.useTransition = function() {
return V.current.useTransition();
}, Dr.version = "18.2.0", Dr;
}
var $j;
function un() {
return $j || ($j = 1, vI.exports = Ofe()), vI.exports;
}
var ya = {}, DO = function(e, t) {
return DO = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, n) {
r.__proto__ = n;
} || function(r, n) {
for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (r[i] = n[i]);
}, DO(e, t);
};
function qie(e, t) {
if (typeof t != "function" && t !== null)
throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
DO(e, t);
function r() {
this.constructor = e;
}
e.prototype = t === null ? Object.create(t) : (r.prototype = t.prototype, new r());
}
var gM = function() {
return gM = Object.assign || function(t) {
for (var r, n = 1, i = arguments.length; n < i; n++) {
r = arguments[n];
for (var s in r) Object.prototype.hasOwnProperty.call(r, s) && (t[s] = r[s]);
}
return t;
}, gM.apply(this, arguments);
};
function zie(e, t) {
var r = {};
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
if (e != null && typeof Object.getOwnPropertySymbols == "function")
for (var i = 0, n = Object.getOwnPropertySymbols(e); i < n.length; i++)
t.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[i]) && (r[n[i]] = e[n[i]]);
return r;
}
function Gie(e, t, r, n) {
var i = arguments.length, s = i < 3 ? t : n === null ? n = Object.getOwnPropertyDescriptor(t, r) : n, a;
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") s = Reflect.decorate(e, t, r, n);
else for (var c = e.length - 1; c >= 0; c--) (a = e[c]) && (s = (i < 3 ? a(s) : i > 3 ? a(t, r, s) : a(t, r)) || s);
return i > 3 && s && Object.defineProperty(t, r, s), s;
}
function Hie(e, t) {
return function(r, n) {
t(r, n, e);
};
}
function Wie(e, t, r, n, i, s) {
function a(h) {
if (h !== void 0 && typeof h != "function") throw new TypeError("Function expected");
return h;
}
for (var c = n.kind, m = c === "getter" ? "get" : c === "setter" ? "set" : "value", u = !t && e ? n.static ? e : e.prototype : null, l = t || (u ? Object.getOwnPropertyDescriptor(u, n.name) : {}), y, p = !1, o = r.length - 1; o >= 0; o--) {
var f = {};
for (var d in n) f[d] = d === "access" ? {} : n[d];
for (var d in n.access) f.access[d] = n.access[d];
f.addInitializer = function(h) {
if (p) throw new TypeError("Cannot add initializers after decoration has completed");
s.push(a(h || null));
};
var v = (0, r[o])(c === "accessor" ? { get: l.get, set: l.set } : l[m], f);
if (c === "accessor") {
if (v === void 0) continue;
if (v === null || typeof v != "object") throw new TypeError("Object expected");
(y = a(v.get)) && (l.get = y), (y = a(v.set)) && (l.set = y), (y = a(v.init)) && i.unshift(y);
} else (y = a(v)) && (c === "field" ? i.unshift(y) : l[m] = y);
}
u && Object.defineProperty(u, n.name, l), p = !0;
}
function $ie(e, t, r) {
for (var n = arguments.length > 2, i = 0; i < t.length; i++)
r = n ? t[i].call(e, r) : t[i].call(e);
return n ? r : void 0;
}
function Xie(e) {
return typeof e == "symbol" ? e : "".concat(e);
}
function Qie(e, t, r) {
return typeof t == "symbol" && (t = t.description ? "[".concat(t.description, "]") : ""), Object.defineProperty(e, "name", { configurable: !0, value: r ? "".concat(r, " ", t) : t });
}
function Yie(e, t) {
if (typeof Reflect == "object" && typeof Reflect.metadata == "function") return Reflect.metadata(e, t);
}
function Kie(e, t, r, n) {
function i(s) {
return s instanceof r ? s : new r(function(a) {
a(s);
});
}
return new (r || (r = Promise))(function(s, a) {
function c(l) {
try {
u(n.next(l));
} catch (y) {
a(y);
}
}
function m(l) {
try {
u(n.throw(l));
} catch (y) {
a(y);
}
}
function u(l) {
l.done ? s(l.value) : i(l.value).then(c, m);
}
u((n = n.apply(e, t || [])).next());
});
}
function Zie(e, t) {
var r = { label: 0, sent: function() {
if (s[0] & 1) throw s[1];
return s[1];
}, trys: [], ops: [] }, n, i, s, a = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
return a.next = c(0), a.throw = c(1), a.return = c(2), typeof Symbol == "function" && (a[Symbol.iterator] = function() {
return this;
}), a;
function c(u) {
return function(l) {
return m([u, l]);
};
}
function m(u) {
if (n) throw new TypeError("Generator is already executing.");
for (; a && (a = 0, u[0] && (r = 0)), r; ) try {
if (n = 1, i && (s = u[0] & 2 ? i.return : u[0] ? i.throw || ((s = i.return) && s.call(i), 0) : i.next) && !(s = s.call(i, u[1])).done) return s;
switch (i = 0, s && (u = [u[0] & 2, s.value]), u[0]) {
case 0:
case 1:
s = u;
break;
case 4:
return r.label++, { value: u[1], done: !1 };
case 5:
r.label++, i = u[1], u = [0];
continue;
case 7:
u = r.ops.pop(), r.trys.pop();
continue;
default:
if (s = r.trys, !(s = s.length > 0 && s[s.length - 1]) && (u[0] === 6 || u[0] === 2)) {
r = 0;
continue;
}
if (u[0] === 3 && (!s || u[1] > s[0] && u[1] < s[3])) {
r.label = u[1];
break;
}
if (u[0] === 6 && r.label < s[1]) {
r.label = s[1], s = u;
break;
}
if (s && r.label < s[2]) {
r.label = s[2], r.ops.push(u);
break;
}
s[2] && r.ops.pop(), r.trys.pop();
continue;
}
u = t.call(e, r);
} catch (l) {
u = [6, l], i = 0;
} finally {
n = s = 0;
}
if (u[0] & 5) throw u[1];
return { value: u[0] ? u[1] : void 0, done: !0 };
}
}
var AM = Object.create ? function(e, t, r, n) {
n === void 0 && (n = r);
var i = Object.getOwnPropertyDescriptor(t, r);
(!i || ("get" in i ? !t.__esModule : i.writable || i.configurable)) && (i = { enumerable: !0, get: function() {
return t[r];
} }), Object.defineProperty(e, n, i);
} : function(e, t, r, n) {
n === void 0 && (n = r), e[n] = t[r];
};
function Jie(e, t) {
for (var r in e) r !== "default" && !Object.prototype.hasOwnProperty.call(t, r) && AM(t, e, r);
}
function yM(e) {
var t = typeof Symbol == "function" && Symbol.iterator, r = t && e[t], n = 0;
if (r) return r.call(e);
if (e && typeof e.length == "number") return {
next: function() {
return e && n >= e.length && (e = void 0), { value: e && e[n++], done: !e };
}
};
throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
}
function KO(e, t) {
var r = typeof Symbol == "function" && e[Symbol.iterator];
if (!r) return e;
var n = r.call(e), i, s = [], a;
try {
for (; (t === void 0 || t-- > 0) && !(i = n.next()).done; ) s.push(i.value);
} catch (c) {
a = { error: c };
} finally {
try {
i && !i.done && (r = n.return) && r.call(n);
} finally {
if (a) throw a.error;
}
}
return s;
}
function eoe() {
for (var e = [], t = 0; t < arguments.length; t++)
e = e.concat(KO(arguments[t]));
return e;
}
function toe() {
for (var e = 0, t = 0, r = arguments.length; t < r; t++) e += arguments[t].length;
for (var n = Array(e), i = 0, t = 0; t < r; t++)
for (var s = arguments[t], a = 0, c = s.length; a < c; a++, i++)
n[i] = s[a];
return n;
}
function roe(e, t, r) {
if (r || arguments.length === 2) for (var n = 0, i = t.length, s; n < i; n++)
(s || !(n in t)) && (s || (s = Array.prototype.slice.call(t, 0, n)), s[n] = t[n]);
return e.concat(s || Array.prototype.slice.call(t));
}
function Ih(e) {
return this instanceof Ih ? (this.v = e, this) : new Ih(e);
}
function noe(e, t, r) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var n = r.apply(e, t || []), i, s = [];
return i = Object.create((typeof AsyncIterator == "function" ? AsyncIterator : Object).prototype), c("next"), c("throw"), c("return", a), i[Symbol.asyncIterator] = function() {
return this;
}, i;
function a(o) {
return function(f) {
return Promise.resolve(f).then(o, y);
};
}
function c(o, f) {
n[o] && (i[o] = function(d) {
return new Promise(function(v, h) {
s.push([o, d, v, h]) > 1 || m(o, d);
});
}, f && (i[o] = f(i[o])));
}
function m(o, f) {
try {
u(n[o](f));
} catch (d) {
p(s[0][3], d);
}
}
function u(o) {
o.value instanceof Ih ? Promise.resolve(o.value.v).then(l, y) : p(s[0][2], o);
}
function l(o) {
m("next", o);
}
function y(o) {
m("throw", o);
}
function p(o, f) {
o(f), s.shift(), s.length && m(s[0][0], s[0][1]);
}
}
function ioe(e) {
var t, r;
return t = {}, n("next"), n("throw", function(i) {
throw i;
}), n("return"), t[Symbol.iterator] = function() {
return this;
}, t;
function n(i, s) {
t[i] = e[i] ? function(a) {
return (r = !r) ? { value: Ih(e[i](a)), done: !1 } : s ? s(a) : a;
} : s;
}
}
function ooe(e) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var t = e[Symbol.asyncIterator], r;
return t ? t.call(e) : (e = typeof yM == "function" ? yM(e) : e[Symbol.iterator](), r = {}, n("next"), n("throw"), n("return"), r[Symbol.asyncIterator] = function() {
return this;
}, r);
function n(s) {
r[s] = e[s] && function(a) {
return new Promise(function(c, m) {
a = e[s](a), i(c, m, a.done, a.value);
});
};
}
function i(s, a, c, m) {
Promise.resolve(m).then(function(u) {
s({ value: u, done: c });
}, a);
}
}
function aoe(e, t) {
return Object.defineProperty ? Object.defineProperty(e, "raw", { value: t }) : e.raw = t, e;
}
var kfe = Object.create ? function(e, t) {
Object.defineProperty(e, "default", { enumerable: !0, value: t });
} : function(e, t) {
e.default = t;
}, wO = function(e) {
return wO = Object.getOwnPropertyNames || function(t) {
var r = [];
for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (r[r.length] = n);
return r;
}, wO(e);
};
function soe(e) {
if (e && e.__esModule) return e;
var t = {};
if (e != null) for (var r = wO(e), n = 0; n < r.length; n++) r[n] !== "default" && AM(t, e, r[n]);
return kfe(t, e), t;
}
function uoe(e) {
return e && e.__esModule ? e : { default: e };
}
function loe(e, t, r, n) {
if (r === "a" && !n) throw new TypeError("Private accessor was defined without a getter");
if (typeof t == "function" ? e !== t || !n : !t.has(e)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
return r === "m" ? n : r === "a" ? n.call(e) : n ? n.value : t.get(e);
}
function coe(e, t, r, n, i) {
if (n === "m") throw new TypeError("Private method is not writable");
if (n === "a" && !i) throw new TypeError("Private accessor was defined without a setter");
if (typeof t == "function" ? e !== t || !i : !t.has(e)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
return n === "a" ? i.call(e, r) : i ? i.value = r : t.set(e, r), r;
}
function doe(e, t) {
if (t === null || typeof t != "object" && typeof t != "function") throw new TypeError("Cannot use 'in' operator on non-object");
return typeof e == "function" ? t === e : e.has(t);
}
function foe(e, t, r) {
if (t != null) {
if (typeof t != "object" && typeof t != "function") throw new TypeError("Object expected.");
var n, i;
if (r) {
if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
n = t[Symbol.asyncDispose];
}
if (n === void 0) {
if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
n = t[Symbol.dispose], r && (i = n);
}
if (typeof n != "function") throw new TypeError("Object not disposable.");
i && (n = function() {
try {
i.call(this);
} catch (s) {
return Promise.reject(s);
}
}), e.stack.push({ value: t, dispose: n, async: r });
} else r && e.stack.push({ async: !0 });
return t;
}
var Lfe = typeof SuppressedError == "function" ? SuppressedError : function(e, t, r) {
var n = new Error(r);
return n.name = "SuppressedError", n.error = e, n.suppressed = t, n;
};
function moe(e) {
function t(s) {
e.error = e.hasError ? new Lfe(s, e.error, "An error was suppressed during disposal.") : s, e.hasError = !0;
}
var r, n = 0;
function i() {
for (; r = e.stack.pop(); )
try {
if (!r.async && n === 1) return n = 0, e.stack.push(r), Promise.resolve().then(i);
if (r.dispose) {
var s = r.dispose.call(r.value);
if (r.async) return n |= 2, Promise.resolve(s).then(i, function(a) {
return t(a), i();
});
} else n |= 1;
} catch (a) {
t(a);
}
if (n === 1) return e.hasError ? Promise.reject(e.error) : Promise.resolve();
if (e.hasError) throw e.error;
}
return i();
}
function poe(e, t) {
return typeof e == "string" && /^\.\.?\//.test(e) ? e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(r, n, i, s, a) {
return n ? t ? ".jsx" : ".js" : i && (!s || !a) ? r : i + s + "." + a.toLowerCase() + "js";
}) : e;
}
const Ffe = {
__extends: qie,
__assign: gM,
__rest: zie,
__decorate: Gie,
__param: Hie,
__esDecorate: Wie,
__runInitializers: $ie,
__propKey: Xie,
__setFunctionName: Qie,
__metadata: Yie,
__awaiter: Kie,
__generator: Zie,
__createBinding: AM,
__exportStar: Jie,
__values: yM,
__read: KO,
__spread: eoe,
__spreadArrays: toe,
__spreadArray: roe,
__await: Ih,
__asyncGenerator: noe,
__asyncDelegator: ioe,
__asyncValues: ooe,
__makeTemplateObject: aoe,
__importStar: soe,
__importDefault: uoe,
__classPrivateFieldGet: loe,
__classPrivateFieldSet: coe,
__classPrivateFieldIn: doe,
__addDisposableResource: foe,
__disposeResources: moe,
__rewriteRelativeImportExtension: poe
}, jfe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
__addDisposableResource: foe,
get __assign() {
return gM;
},
__asyncDelegator: ioe,
__asyncGenerator: noe,
__asyncValues: ooe,
__await: Ih,
__awaiter: Kie,
__classPrivateFieldGet: loe,
__classPrivateFieldIn: doe,
__classPrivateFieldSet: coe,
__createBinding: AM,
__decorate: Gie,
__disposeResources: moe,
__esDecorate: Wie,
__exportStar: Jie,
__extends: qie,
__generator: Zie,
__importDefault: uoe,
__importStar: soe,
__makeTemplateObject: aoe,
__metadata: Yie,
__param: Hie,
__propKey: Xie,
__read: KO,
__rest: zie,
__rewriteRelativeImportExtension: poe,
__runInitializers: $ie,
__setFunctionName: Qie,
__spread: eoe,
__spreadArray: roe,
__spreadArrays: toe,
__values: yM,
default: Ffe
}, Symbol.toStringTag, { value: "Module" })), Ot = /* @__PURE__ */ YO(jfe);
var bI = { exports: {} }, Hg = {};
/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var Xj;
function Nfe() {
if (Xj) return Hg;
Xj = 1;
var e = un(), t = Symbol.for("react.element"), r = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, i = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
function a(c, m, u) {
var l, y = {}, p = null, o = null;
u !== void 0 && (p = "" + u), m.key !== void 0 && (p = "" + m.key), m.ref !== void 0 && (o = m.ref);
for (l in m) n.call(m, l) && !s.hasOwnProperty(l) && (y[l] = m[l]);
if (c && c.defaultProps) for (l in m = c.defaultProps, m) y[l] === void 0 && (y[l] = m[l]);
return { $$typeof: t, type: c, key: p, ref: o, props: y, _owner: i.current };
}
return Hg.Fragment = r, Hg.jsx = a, Hg.jsxs = a, Hg;
}
var Qj;
function _r() {
return Qj || (Qj = 1, bI.exports = Nfe()), bI.exports;
}
var _I = {}, Wg = {}, Yj;
function MM() {
if (Yj) return Wg;
Yj = 1, Object.defineProperty(Wg, "__esModule", { value: !0 }), Wg.BitFlags = void 0;
var e;
return function(t) {
function r(s) {
return s;
}
t.create = r;
function n(s, a) {
return (s & a) !== 0;
}
t.has = n;
function i(s, a) {
return !!a && (s & a) === a;
}
t.hasAll = i;
}(e || (Wg.BitFlags = e = {})), Wg;
}
var $g = {}, Kj;
function hoe() {
if (Kj) return $g;
Kj = 1, Object.defineProperty($g, "__esModule", { value: !0 }), $g.StringBuilder = void 0;
var e;
return function(t) {
function r(S = 512) {
return {
current: [],
offset: 0,
capacity: S,
chunks: []
};
}
t.create = r;
function n(S) {
return S.chunks.length ? (S.offset > 0 && (S.chunks[S.chunks.length] = S.current.length === S.offset ? S.current.join("") : S.current.slice(0, S.offset).join("")), S.chunks.join("")) : S.current.length === S.offset ? S.current.join("") : S.current.splice(0, S.offset).join("");
}
t.getString = n;
function i(S) {
let _ = 0;
for (const C of S.chunks)
_ += C.length;
for (let C = 0; C < S.offset; C++)
_ += S.current[C].length;
return _;
}
t.getSize = i;
function s(S) {
return S.offset > 0 && (S.current.length === S.offset ? S.chunks[S.chunks.length] = S.current.join("") : S.chunks[S.chunks.length] = S.current.slice(0, S.offset).join(""), S.offset = 0), S.chunks;
}
t.getChunks = s;
const a = [];
(function() {
let S = "";
for (let _ = 0; _ < 512; _++)
a[_] = S, S = S + " ";
})();
function c(S) {
y(S, `
`);
}
t.newline = c;
function m(S, _) {
_ > 0 && y(S, a[_]);
}
t.whitespace = m;
function u(S) {
y(S, " ");
}
t.whitespace1 = u;
function l(S, _) {
_ && (S.offset === S.capacity && (S.chunks[S.chunks.length] = S.current.join(""), S.offset = 0), S.current[S.offset++] = _);
}
t.write = l;
function y(S, _) {
S.offset === S.capacity && (S.chunks[S.chunks.length] = S.current.join(""), S.offset = 0), S.current[S.offset++] = _;
}
t.writeSafe = y;
function p(S, _, C) {
if (!_) {
m(S, C);
return;
}
const x = C - _.length;
m(S, x), y(S, _);
}
t.writePadLeft = p;
function o(S, _, C) {
if (!_) {
m(S, C);
return;
}
const x = C - _.length;
y(S, _), m(S, x);
}
t.writePadRight = o;
function f(S, _) {
y(S, "" + _);
}
t.writeInteger = f;
function d(S, _) {
y(S, "" + _ + " ");
}
t.writeIntegerAndSpace = d;
function v(S, _, C) {
const x = "" + _, A = C - x.length;
m(S, A), y(S, x);
}
t.writeIntegerPadLeft = v;
function h(S, _, C) {
const x = "" + _, A = C - x.length;
y(S, x), m(S, A);
}
t.writeIntegerPadRight = h;
function g(S, _, C) {
y(S, "" + Math.round(C * _) / C);
}
t.writeFloat = g;
function b(S, _, C, x) {
const A = "" + Math.round(C * _) / C, T = x - A.length;
m(S, T), y(S, A);
}
t.writeFloatPadLeft = b;
function P(S, _, C, x) {
const A = "" + Math.round(C * _) / C, T = x - A.length;
y(S, A), m(S, T);
}
t.writeFloatPadRight = P;
}(e || ($g.StringBuilder = e = {})), $g;
}
var Xg = {}, np = {}, Zj;
function ra() {
if (Zj) return np;
Zj = 1, Object.defineProperty(np, "__esModule", { value: !0 }), np.now = void 0, np.formatTimespan = t;
const e = function() {
if (typeof window != "undefined" && window.performance) {
const r = window.performance;
return () => r.now();
} else return typeof process != "undefined" && process.hrtime !== "undefined" && typeof process.hrtime == "function" ? () => {
const r = process.hrtime();
return r[0] * 1e3 + r[1] / 1e6;
} : Date.now ? () => Date.now() : () => +/* @__PURE__ */ new Date();
}();
np.now = e;
function t(r, n = !0) {
if (isNaN(r))
return "n/a";
const i = Math.floor(r / (60 * 60 * 1e3)), s = Math.floor(r / (60 * 1e3) % 60), a = Math.floor(r / 1e3 % 60);
let c = Math.floor(r % 1e3).toString();
for (; c.length < 3; )
c = "0" + c;
for (; !n && c.length > 1 && c[c.length - 1] === "0"; )
c = c.substr(0, c.length - 1);
return i > 0 ? `${i}h${s}m${a}.${c}s` : s > 0 ? `${s}m${a}.${c}s` : a > 0 ? `${a}.${c}s` : `${r.toFixed(0)}ms`;
}
return np;
}
var Jj;
function cx() {
if (Jj) return Xg;
Jj = 1, Object.defineProperty(Xg, "__esModule", { value: !0 }), Xg.UUID = void 0;
const e = ra();
var t;
return function(r) {
const n = typeof btoa != "undefined" ? btoa : (m) => Buffer.from(m).toString("base64"), i = [];
function s() {
let m = +/* @__PURE__ */ new Date() + (0, e.now)();
for (let u = 0; u < 16; u++)
i[u] = String.fromCharCode((m + Math.random() * 255) % 255 | 0), m = Math.floor(m / 255);
return n(i.join("")).replace(/\+/g, "-").replace(/\//g, "_").substr(0, 22);
}
r.create22 = s;
function a() {
let m = +/* @__PURE__ */ new Date() + (0, e.now)();
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(l) {
const y = (m + Math.random() * 16) % 16 | 0;
return m = Math.floor(m / 16), (l === "x" ? y : y & 3 | 8).toString(16);
});
}
r.createv4 = a;
function c(m) {
return typeof m == "string";
}
r.is = c;
}(t || (Xg.UUID = t = {})), Xg;
}
var ip = {}, e5;
function Ufe() {
if (e5) return ip;
e5 = 1, Object.defineProperty(ip, "__esModule", { value: !0 }), ip.Mask = void 0, ip.sortAsc = t;
function e(n, i) {
return n - i;
}
function t(n) {
return Array.prototype.sort.call(n, e), n;
}
var r;
return function(n) {
class i {
has(h) {
return !1;
}
forEach(h, g) {
return g;
}
constructor() {
this.size = 0;
}
}
class s {
has(h) {
return h === this.idx;
}
forEach(h, g) {
return h(this.idx, g), g;
}
constructor(h) {
this.idx = h, this.size = 1;
}
}
class a {
has(h) {
return h < this.length && !!this.mask[h];
}
_forEach(h, g) {
for (let b = 0; b < this.length; b++)
this.mask[b] && h(b, g);
}
forEach(h, g) {
return this._forEach(h, g), g;
}
constructor(h, g) {
this.mask = h, this.size = g, this.length = h.length;
}
}
class c {
has(h) {
return !0;
}
_forEach(h, g) {
for (let b = 0; b < this.size; b++)
h(b, g);
}
forEach(h, g) {
return this._forEach(h, g), g;
}
constructor(h) {
this.size = h;
}
}
class m {
has(h) {
return this.set.has(h);
}
_forEach(h, g) {
for (const b of this.flatten())
h(b, g);
}
flatten() {
if (this._flat)
return this._flat;
const h = new Int32Array(this.size);
let g = 0;
return this.set.forEach((b) => h[g++] = b), t(h), this._flat = h, this._flat;
}
forEach(h, g) {
return this._forEach(h, g), g;
}
constructor(h) {
this.set = h, this._flat = void 0, this.size = h.size;
}
}
function u(v) {
return new c(v);
}
n.always = u, n.never = new i();
function l(v) {
return new m(v);
}
n.ofSet = l;
function y(v) {
return new s(v);
}
n.singleton = y;
function p(v) {
const h = v.length;
if (h === 0)
return new i();
if (h === 1)
return new s(v[0]);
let g = 0;
for (const S of v)
S > g && (g = S);
if (h === g)
return new c(h);
if (h / g < 1 / 12) {
const S = /* @__PURE__ */ new Set();
for (const _ of v)
S.add(_);
return new m(S);
}
const P = new Int8Array(g + 1);
for (const S of v)
P[S] = 1;
return new a(P, v.length);
}
n.ofUniqueIndices = p;
function o(v, h) {
return new a(v, h);
}
n.ofMask = o;
function f(v, h) {
for (const g of h)
if (v.has(g))
return !0;
return !1;
}
n.hasAny = f;
function d(v, h) {
let g = 0, b = 0;
if (h.forEach((P) => {
v.has(P) || (g++, P > b && (b = P));
}), g / b < 1 / 12) {
const P = /* @__PURE__ */ new Set();
return h.forEach((S) => {
v.has(S) || P.add(S);
}), l(P);
} else {
const P = new Uint8Array(b + 1);
return h.forEach((S) => {
v.has(S) || (P[S] = 1);
}), o(P, g);
}
}
n.complement = d;
}(r || (ip.Mask = r = {})), ip;
}
var _u = {}, d3 = {}, t5;
function fo() {
if (t5) return d3;
t5 = 1, Object.defineProperty(d3, "__esModule", { value: !0 }), d3.idFactory = e;
function e(t = 0, r = Number.MAX_SAFE_INTEGER) {
let n = t;
return () => {
const i = n;
return n = (n + 1) % r, i;
};
}
return d3;
}
var r5;
function Eo() {
if (r5) return _u;
r5 = 1, Object.defineProperty(_u, "__esModule", { value: !0 }), _u.ValueCell = _u.ValueBox = _u.ValueRef = void 0;
const e = fo();
var t;
(function(s) {
function a(m) {
return { ref: m };
}
s.create = a;
function c(m, u) {
return m.ref = u, m;
}
s.set = c;
})(t || (_u.ValueRef = t = {}));
const r = (0, e.idFactory)(0, 2147483647);
var n;
(function(s) {
function a(m, u) {
return { id: r(), version: 0, value: m, metadata: u };
}
s.create = a;
function c(m, u) {
return { id: m.id, version: m.version + 1, value: u, metadata: m.metadata };
}
s.withValue = c;
})(n || (_u.ValueBox = n = {}));
var i;
return function(s) {
function a(l, y) {
return t.create(n.create(l, y));
}
s.create = a;
function c(l, y) {
return t.set(l, n.withValue(l.ref, y));
}
s.update = c;
function m(l, y) {
return t.set(l, y);
}
s.set = m;
function u(l, y) {
return l.ref.value !== y ? c(l, y) : l;
}
s.updateIfChanged = u;
}(i || (_u.ValueCell = i = {})), _u;
}
var n5;
function vt() {
return n5 || (n5 = 1, function(e) {
Object.defineProperty(e, "__esModule", { value: !0 }), e.merge = e.assign = e.noop = e.Mask = e.UUID = e.StringBuilder = e.BitFlags = void 0, e.round = c, e.arrayEqual = m, e.deepEqual = l, e.shallowEqual = y, e.shallowEqualObjects = p, e.shallowEqualArrays = o, e.defaults = f, e.extend = d, e.shallowClone = v, e.formatTime = S, e.formatProgress = _, e.formatBytes = C;
const t = Ot, r = MM();
Object.defineProperty(e, "BitFlags", { enumerable: !0, get: function() {
return r.BitFlags;
} });
const n = hoe();
Object.defineProperty(e, "StringBuilder", { enumerable: !0, get: function() {
return n.StringBuilder;
} });
const i = cx();
Object.defineProperty(e, "UUID", { enumerable: !0, get: function() {
return i.UUID;
} });
const s = Ufe();
Object.defineProperty(e, "Mask", { enumerable: !0, get: function() {
return s.Mask;
} }), t.__exportStar(Eo(), e);
const a = function() {
};
e.noop = a;
function c(x, A) {
const T = Math.pow(10, A);
return Math.round(T * x) / T;
}
function m(x, A) {
const T = x.length;
if (T !== A.length)
return !1;
for (let M = 0; M < T; M++)
if (x[M] !== A[M])
return !1;
return !0;
}
const u = Object.prototype.hasOwnProperty;
function l(x, A) {
if (x === A)
return !0;
const T = Array.isArray(x), M = Array.isArray(A);
if (T && M) {
if (x.length !== A.length)
return !1;
for (let D = 0; D < x.length; D++)
if (!l(x[D], A[D]))
return !1;
return !0;
}
if (T !== M)
return !1;
if (x && A && typeof x == "object" && typeof A == "object") {
const D = Object.keys(x);
if (D.length !== Object.keys(A).length)
return !1;
const I = x instanceof Date, w = A instanceof Date;
if (I && w)
return x.getTime() === A.getTime();
if (I !== w)
return !1;
const E = x instanceof RegExp, R = A instanceof RegExp;
if (E && R)
return x.toString() === A.toString();
if (E !== R)
return !1;
for (let V = 0; V < D.length; V++)
if (!u.call(A, D[V]))
return !1;
for (let V = 0; V < D.length; V++)
if (!l(x[D[V]], A[D[V]]))
return !1;
return !0;
}
return !1;
}
function y(x, A) {
if (x === A)
return !0;
const T = Array.isArray(x), M = Array.isArray(A);
return T && M ? o(x, A) : T !== M ? !1 : x && A && typeof x == "object" && typeof A == "object" ? p(x, A) : !1;
}
function p(x, A) {
if (x === A)
return !0;
if (!x || !A)
return !1;
const T = Object.keys(x);
if (Object.keys(A).length !== T.length)
return !1;
for (const M of T)
if (!u.call(x, M) || x[M] !== A[M])
return !1;
return !0;
}
function o(x, A) {
if (x === A)
return !0;
if (!x || !A || x.length !== A.length)
return !1;
for (let T = 0, M = x.length; T < M; ++T)
if (x[T] !== A[T])
return !1;
return !0;
}
function f(x, A) {
return x !== void 0 ? x : A;
}
function d(x, A, T) {
let M;
const D = A, I = x, w = T;
for (const E of Object.keys(A))
M = D[E], M !== void 0 ? I[E] = M : T && (I[E] = w[E]);
if (T)
for (const E of Object.keys(T))
M = I[E], M === void 0 && (I[E] = w[E]);
return x;
}
function v(x) {
return d({}, x);
}
function h(x) {
for (let A = 1; A < arguments.length; A++) {
const T = arguments[A];
for (const M of Object.keys(T))
u.call(T, M) && (x[M] = T[M]);
}
return x;
}
e.assign = Object.assign || h;
function g(x, A) {
let T = !1;
for (const M of Object.keys(A))
if (u.call(A, M) && A[M] !== x[M]) {
T = !0;
break;
}
return T ? (0, e.assign)(v(x), A) : x;
}
function b(x) {
let A = x;
for (let T = 1; T < arguments.length; T++)
if (arguments[T] && (A = g(x, arguments[T]), A !== x)) {
for (let M = T + 1; M < arguments.length; M++)
A = (0, e.assign)(A, arguments[M]);
break;
}
return A;
}
e.merge = b;
function P(x) {
return (x < 10 ? "0" : "") + x;
}
function S(x) {
const A = x.getHours(), T = x.getMinutes(), M = x.getSeconds();
return `${A}:${P(T)}:${P(M)}`;
}
function _(x) {
const A = x.root.progress;
if (A.isIndeterminate)
return A.message;
const T = (100 * A.current / A.max).toFixed(2);
return `${A.message} ${T}%`;
}
function C(x) {
const A = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"], T = Math.floor(Math.log(x) / Math.log(1024));
return `${(x / Math.pow(1024, T)).toFixed(2)} ${A[T]}`;
}
}(_I)), _I;
}
var SI = {}, Ti = {}, CI = {}, xs = {}, Qg = {}, PI = {}, i5;
function Jr() {
return i5 || (i5 = 1, function(e) {
Object.defineProperty(e, "__esModule", { value: !0 }), e.PiDiv180 = e.halfPI = void 0, e.degToRad = t, e.radToDeg = r, e.isPowerOfTwo = n, e.absMax = i, e.arcLength = s, e.spiral2d = a, e.halfPI = Math.PI / 2, e.PiDiv180 = Math.PI / 180;
function t(c) {
return c * e.PiDiv180;
}
function r(c) {
return c / e.PiDiv180;
}
function n(c) {
return c !== 0 && (c & c - 1) === 0;
}
function i(...c) {
let m = 0, u = 0;
for (let l = 0, y = c.length; l < y; ++l) {
const p = c[l], o = Math.abs(p);
o > u && (m = p, u = o);
}
return m;
}
function s(c, m) {
return c * m;
}
function a(c) {
let m = 0, u = 0, l = 0, y = -1;
const p = c * 2 + 1, o = p / 2, f = [];
for (let d = Math.pow(p, 2); d > 0; --d) {
if (-o < m && m <= o && -o < u && u <= o && f.push([m, u]), m === u || m < 0 && m === -u || m > 0 && m === 1 - u) {
const v = l;
l = -y, y = v;
}
m += l, u += y;
}
return f;
}
}(PI)), PI;
}
var Yg = {}, ro = {}, o5;
function Zr() {
if (o5) return ro;
o5 = 1, Object.defineProperty(ro, "__esModule", { value: !0 }), ro.normalize = e, ro.clamp = t, ro.pclamp = r, ro.saturate = n, ro.damp = i, ro.lerp = s, ro.spline = a, ro.quadraticBezier = c, ro.smoothstep = m, ro.smootherstep = u, ro.smootheststep = l, ro.almostIdentity = y;
function e(p, o, f) {
return (p - o) / (f - o);
}
function t(p, o, f) {
return Math.max(o, Math.min(f, p));
}
function r(p) {
return t(p, 0, 100);
}
function n(p) {
return t(p, 0, 1);
}
function i(p, o) {
const f = p * o;
return Math.abs(f) < 0.1 ? 0 : f;
}
function s(p, o, f) {
return p + (o - p) * f;
}
function a(p, o, f, d, v, h) {
const g = (f - p) * h, b = (d - o) * h, P = v * v, S = v * P;
return (2 * o - 2 * f + g + b) * S + (-3 * o + 3 * f - 2 * g - b) * P + g * v + o;
}
function c(p, o, f, d) {
const v = 1 - d;
return v * v * p + 2 * v * d * o + d * d * f;
}
function m(p, o, f) {
return f = n(e(f, p, o)), f * f * (3 - 2 * f);
}
function u(p, o, f) {
return f = n(e(f, p, o)), f * f * f * (f * (f * 6 - 15) + 10);
}
function l(p, o, f) {
return f = n(e(f, p, o)), -20 * Math.pow(f, 7) + 70 * Math.pow(f, 6) - 84 * Math.pow(f, 5) + 35 * Math.pow(f, 4);
}
function y(p, o, f) {
if (p > o)
return p;
const d = 2 * f - o, v = 2 * o - 3 * f, h = p / o;
return (d * h + v) * h * h + f;
}
return ro;
}
var a5;
function ZO() {
if (a5) return Yg;
a5 = 1, Object.defineProperty(Yg, "__esModule", { value: !0 }), Yg.Lab = i;
const e = Vo(), t = JO(), r = Jr(), n = Zr();
function i() {
return i.zero();
}
return function(s) {
function a() {
const V = [0.1, 0, 0];
return V[0] = 0, V;
}
s.zero = a;
function c(V, B, k) {
const L = a();
return L[0] = V, L[1] = B, L[2] = k, L;
}
s.create = c;
function m(V, B, k, L) {
return V[0] = B, V[1] = k, V[2] = L, V;
}
s.set = m;
function u(V, B) {
const k = B[0] - V[0], L = B[1] - V[1], G = B[2] - V[2];
return Math.sqrt(k * k + L * L + G * G);
}
s.distance = u;
function l(V, B) {
const [k, L, G] = e.Color.toRgb(B), [U, j, N] = R(k, L, G), F = 116 * j - 16;
return V[0] = F < 0 ? 0 : F, V[1] = 500 * (U - j), V[2] = 200 * (j - N), V;
}
s.fromColor = l;
function y(V, B) {
return t.Hcl.toLab(V, B);
}
s.fromHcl = y;
function p(V) {
let B = (V[0] + 16) / 116, k = isNaN(V[1]) ? B : B + V[1] / 500, L = isNaN(V[2]) ? B : B - V[2] / 200;
B = _ * I(B), k = S * I(k), L = C * I(L);
const G = D(3.2404542 * k - 1.5371385 * B - 0.4985314 * L), U = D(-0.969266 * k + 1.8760108 * B + 0.041556 * L), j = D(0.0556434 * k - 0.2040259 * B + 1.0572252 * L);
return e.Color.fromRgb(Math.round((0, n.clamp)(G, 0, 255)), Math.round((0, n.clamp)(U, 0, 255)), Math.round((0, n.clamp)(j, 0, 255)));
}
s.toColor = p;
function o(V, B) {
const [k, L, G] = B, U = Math.sqrt(L * L + G * G);
let j = ((0, r.radToDeg)(Math.atan2(G, L)) + 360) % 360;
return Math.round(U * 1e4) === 0 && (j = Number.NaN), V[0] = j, V[1] = U, V[2] = k, V;
}
s.toHcl = o;
function f(V, B) {
return V[0] = B[0], V[1] = B[1], V[2] = B[2], V;
}
s.copy = f;
function d(V, B, k) {
return V[0] = B[0] - P * k, V[1] = B[1], V[2] = B[2], V;
}
s.darken = d;
function v(V, B, k) {
return d(V, B, -k);
}
s.lighten = v;
const h = [0, 0, 0];
function g(V, B, k) {
return o(h, B), t.Hcl.toLab(V, t.Hcl.saturate(h, h, k));
}
s.saturate = g;
function b(V, B, k) {
return g(V, B, -k);
}
s.desaturate = b;
const P = 18, S = 0.95047, _ = 1, C = 1.08883, x = 0.137931034, A = 0.206896552, T = 0.12841855, M = 8856452e-9;
function D(V) {
return 255 * (V <= 304e-5 ? 12.92 * V : 1.055 * Math.pow(V, 1 / 2.4) - 0.055);
}
function I(V) {
return V > A ? V * V * V : T * (V - x);
}
function w(V) {
return (V /= 255) <= 0.04045 ? V / 12.92 : Math.pow((V + 0.055) / 1.055, 2.4);
}
function E(V) {
return V > M ? Math.pow(V, 1 / 3) : V / T + x;
}
function R(V, B, k) {
V = w(V), B = w(B), k = w(k);
const L = E((0.4124564 * V + 0.3575761 * B + 0.1804375 * k) / S), G = E((0.2126729 * V + 0.7151522 * B + 0.072175 * k) / _), U = E((0.0193339 * V + 0.119192 * B + 0.9503041 * k) / C);
return [L, G, U];
}
}(i || (Yg.Lab = i = {})), Yg;
}
var s5;
function JO() {
if (s5) return Qg;
s5 = 1, Object.defineProperty(Qg, "__esModule", { value: !0 }), Qg.Hcl = r;
const e = Jr(), t = ZO();
function r() {
return r.zero();
}
return function(n) {
function i() {
const S = [0.1, 0, 0];
return S[0] = 0, S;
}
n.zero = i;
function s(S, _, C) {
const x = i();
return x[0] = S, x[1] = _, x[2] = C, x;
}
n.create = s;
function a(S, _, C, x) {
return S[0] = _, S[1] = C, S[2] = x, S;
}
n.set = a;
function c(S) {
return !isNaN(S[0]);
}
n.hasHue = c;
const m = [0, 0, 0];
function u(S, _) {
return t.Lab.toHcl(S, t.Lab.fromColor(m, _));
}
n.fromColor = u;
function l(S, _) {
return t.Lab.toHcl(S, _);
}
n.fromLab = l;
const y = [0, 0, 0];
function p(S) {
return t.Lab.toColor(o(y, S));
}
n.toColor = p;
function o(S, _) {
let [C, x, A] = _;
return isNaN(C) && (C = 0), C = (0, e.degToRad)(C), S[0] = A, S[1] = Math.cos(C) * x, S[2] = Math.sin(C) * x, S;
}
n.toLab = o;
function f(S, _) {
return S[0] = _[0], S[1] = _[1], S[2] = _[2], S;
}
n.copy = f;
function d(S, _, C) {
return S[0] = _[0], S[1] = Math.max(0, _[1] + P * C), S[2] = _[2], S;
}
n.saturate = d;
function v(S, _, C) {
return d(S, _, -C);
}
n.desaturate = v;
const h = [0, 0, 0];
function g(S, _, C) {
return o(h, _), t.Lab.to