UNPKG

our-medical

Version:

medical image vue component

1,513 lines 168 kB
const Yr = { Int8Array: 1, Uint8Array: 1, Uint8ClampedArray: 1, Int16Array: 2, Uint16Array: 2, Int32Array: 4, Uint32Array: 4, Float32Array: 4, Float64Array: 8 }, At = { VOID: "", // not sure to know what that should be CHAR: "Int8Array", SIGNED_CHAR: "Int8Array", UNSIGNED_CHAR: "Uint8Array", UNSIGNED_CHAR_CLAMPED: "Uint8ClampedArray", // should be used for VTK.js internal purpose only SHORT: "Int16Array", UNSIGNED_SHORT: "Uint16Array", INT: "Int32Array", UNSIGNED_INT: "Uint32Array", FLOAT: "Float32Array", DOUBLE: "Float64Array" }, Qr = At.FLOAT; var on = { DefaultDataType: Qr, DataTypeByteSize: Yr, VtkDataTypes: At }, b = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; function un(e) { return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; } function qr(e) { if (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 a = Object.getOwnPropertyDescriptor(e, n); Object.defineProperty(r, n, a.get ? a : { enumerable: !0, get: function() { return e[n]; } }); }), r; } var Ir = function e(t, r) { if (t === r) return !0; if (t && r && typeof t == "object" && typeof r == "object") { if (t.constructor !== r.constructor) return !1; var n, a, s; if (Array.isArray(t)) { if (n = t.length, n != r.length) return !1; for (a = n; a-- !== 0; ) if (!e(t[a], r[a])) return !1; return !0; } if (t.constructor === RegExp) return t.source === r.source && t.flags === r.flags; if (t.valueOf !== Object.prototype.valueOf) return t.valueOf() === r.valueOf(); if (t.toString !== Object.prototype.toString) return t.toString() === r.toString(); if (s = Object.keys(t), n = s.length, n !== Object.keys(r).length) return !1; for (a = n; a-- !== 0; ) if (!Object.prototype.hasOwnProperty.call(r, s[a])) return !1; for (a = n; a-- !== 0; ) { var i = s[a]; if (!e(t[i], r[i])) return !1; } return !0; } return t !== t && r !== r; }, Zr = /* @__PURE__ */ un(Ir), Ve = Object.prototype.toString, fn = function(t) { var r = Ve.call(t), n = r === "[object Arguments]"; return n || (n = r !== "[object Array]" && t !== null && typeof t == "object" && typeof t.length == "number" && t.length >= 0 && Ve.call(t.callee) === "[object Function]"), n; }, Wt, Ae; function Jr() { if (Ae) return Wt; Ae = 1; var e; if (!Object.keys) { var t = Object.prototype.hasOwnProperty, r = Object.prototype.toString, n = fn, a = Object.prototype.propertyIsEnumerable, s = !a.call({ toString: null }, "toString"), i = a.call(function() { }, "prototype"), u = [ "toString", "toLocaleString", "valueOf", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "constructor" ], o = function(y) { var l = y.constructor; return l && l.prototype === y; }, f = { $applicationCache: !0, $console: !0, $external: !0, $frame: !0, $frameElement: !0, $frames: !0, $innerHeight: !0, $innerWidth: !0, $onmozfullscreenchange: !0, $onmozfullscreenerror: !0, $outerHeight: !0, $outerWidth: !0, $pageXOffset: !0, $pageYOffset: !0, $parent: !0, $scrollLeft: !0, $scrollTop: !0, $scrollX: !0, $scrollY: !0, $self: !0, $webkitIndexedDB: !0, $webkitStorageInfo: !0, $window: !0 }, c = function() { if (typeof window > "u") return !1; for (var y in window) try { if (!f["$" + y] && t.call(window, y) && window[y] !== null && typeof window[y] == "object") try { o(window[y]); } catch { return !0; } } catch { return !0; } return !1; }(), g = function(y) { if (typeof window > "u" || !c) return o(y); try { return o(y); } catch { return !1; } }; e = function(l) { var p = l !== null && typeof l == "object", h = r.call(l) === "[object Function]", v = n(l), N = p && r.call(l) === "[object String]", L = []; if (!p && !h && !v) throw new TypeError("Object.keys called on a non-object"); var w = i && h; if (N && l.length > 0 && !t.call(l, 0)) for (var T = 0; T < l.length; ++T) L.push(String(T)); if (v && l.length > 0) for (var C = 0; C < l.length; ++C) L.push(String(C)); else for (var O in l) !(w && O === "prototype") && t.call(l, O) && L.push(String(O)); if (s) for (var E = g(l), m = 0; m < u.length; ++m) !(E && u[m] === "constructor") && t.call(l, u[m]) && L.push(u[m]); return L; }; } return Wt = e, Wt; } var Pr = Array.prototype.slice, t1 = fn, je = Object.keys, xt = je ? function(t) { return je(t); } : Jr(), Ge = Object.keys; xt.shim = function() { if (Object.keys) { var t = function() { var r = Object.keys(arguments); return r && r.length === arguments.length; }(1, 2); t || (Object.keys = function(n) { return t1(n) ? Ge(Pr.call(n)) : Ge(n); }); } else Object.keys = xt; return Object.keys || xt; }; var e1 = xt, n1 = function() { if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function") return !1; if (typeof Symbol.iterator == "symbol") return !0; var t = {}, r = Symbol("test"), n = Object(r); if (typeof r == "string" || Object.prototype.toString.call(r) !== "[object Symbol]" || Object.prototype.toString.call(n) !== "[object Symbol]") return !1; var a = 42; t[r] = a; for (r in t) return !1; if (typeof Object.keys == "function" && Object.keys(t).length !== 0 || typeof Object.getOwnPropertyNames == "function" && Object.getOwnPropertyNames(t).length !== 0) return !1; var s = Object.getOwnPropertySymbols(t); if (s.length !== 1 || s[0] !== r || !Object.prototype.propertyIsEnumerable.call(t, r)) return !1; if (typeof Object.getOwnPropertyDescriptor == "function") { var i = Object.getOwnPropertyDescriptor(t, r); if (i.value !== a || i.enumerable !== !0) return !1; } return !0; }, Be = typeof Symbol < "u" && Symbol, r1 = n1, a1 = function() { return typeof Be != "function" || typeof Symbol != "function" || typeof Be("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : r1(); }, ze = { foo: {} }, s1 = Object, i1 = function() { return { __proto__: ze }.foo === ze.foo && !({ __proto__: null } instanceof s1); }, o1 = "Function.prototype.bind called on incompatible ", Kt = Array.prototype.slice, u1 = Object.prototype.toString, f1 = "[object Function]", c1 = function(t) { var r = this; if (typeof r != "function" || u1.call(r) !== f1) throw new TypeError(o1 + r); for (var n = Kt.call(arguments, 1), a, s = function() { if (this instanceof a) { var c = r.apply( this, n.concat(Kt.call(arguments)) ); return Object(c) === c ? c : this; } else return r.apply( t, n.concat(Kt.call(arguments)) ); }, i = Math.max(0, r.length - n.length), u = [], o = 0; o < i; o++) u.push("$" + o); if (a = Function("binder", "return function (" + u.join(",") + "){ return binder.apply(this,arguments); }")(s), r.prototype) { var f = function() { }; f.prototype = r.prototype, a.prototype = new f(), f.prototype = null; } return a; }, g1 = c1, cn = Function.prototype.bind || g1, l1 = cn, y1 = l1.call(Function.call, Object.prototype.hasOwnProperty), M, pt = SyntaxError, gn = Function, yt = TypeError, Xt = function(e) { try { return gn('"use strict"; return (' + e + ").constructor;")(); } catch { } }, at = Object.getOwnPropertyDescriptor; if (at) try { at({}, ""); } catch { at = null; } var Ht = function() { throw new yt(); }, p1 = at ? function() { try { return arguments.callee, Ht; } catch { try { return at(arguments, "callee").get; } catch { return Ht; } } }() : Ht, ft = a1(), h1 = i1(), j = Object.getPrototypeOf || (h1 ? function(e) { return e.__proto__; } : null), gt = {}, v1 = typeof Uint8Array > "u" || !j ? M : j(Uint8Array), st = { "%AggregateError%": typeof AggregateError > "u" ? M : AggregateError, "%Array%": Array, "%ArrayBuffer%": typeof ArrayBuffer > "u" ? M : ArrayBuffer, "%ArrayIteratorPrototype%": ft && j ? j([][Symbol.iterator]()) : M, "%AsyncFromSyncIteratorPrototype%": M, "%AsyncFunction%": gt, "%AsyncGenerator%": gt, "%AsyncGeneratorFunction%": gt, "%AsyncIteratorPrototype%": gt, "%Atomics%": typeof Atomics > "u" ? M : Atomics, "%BigInt%": typeof BigInt > "u" ? M : BigInt, "%BigInt64Array%": typeof BigInt64Array > "u" ? M : BigInt64Array, "%BigUint64Array%": typeof BigUint64Array > "u" ? M : BigUint64Array, "%Boolean%": Boolean, "%DataView%": typeof DataView > "u" ? M : DataView, "%Date%": Date, "%decodeURI%": decodeURI, "%decodeURIComponent%": decodeURIComponent, "%encodeURI%": encodeURI, "%encodeURIComponent%": encodeURIComponent, "%Error%": Error, "%eval%": eval, // eslint-disable-line no-eval "%EvalError%": EvalError, "%Float32Array%": typeof Float32Array > "u" ? M : Float32Array, "%Float64Array%": typeof Float64Array > "u" ? M : Float64Array, "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? M : FinalizationRegistry, "%Function%": gn, "%GeneratorFunction%": gt, "%Int8Array%": typeof Int8Array > "u" ? M : Int8Array, "%Int16Array%": typeof Int16Array > "u" ? M : Int16Array, "%Int32Array%": typeof Int32Array > "u" ? M : Int32Array, "%isFinite%": isFinite, "%isNaN%": isNaN, "%IteratorPrototype%": ft && j ? j(j([][Symbol.iterator]())) : M, "%JSON%": typeof JSON == "object" ? JSON : M, "%Map%": typeof Map > "u" ? M : Map, "%MapIteratorPrototype%": typeof Map > "u" || !ft || !j ? M : j((/* @__PURE__ */ new Map())[Symbol.iterator]()), "%Math%": Math, "%Number%": Number, "%Object%": Object, "%parseFloat%": parseFloat, "%parseInt%": parseInt, "%Promise%": typeof Promise > "u" ? M : Promise, "%Proxy%": typeof Proxy > "u" ? M : Proxy, "%RangeError%": RangeError, "%ReferenceError%": ReferenceError, "%Reflect%": typeof Reflect > "u" ? M : Reflect, "%RegExp%": RegExp, "%Set%": typeof Set > "u" ? M : Set, "%SetIteratorPrototype%": typeof Set > "u" || !ft || !j ? M : j((/* @__PURE__ */ new Set())[Symbol.iterator]()), "%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? M : SharedArrayBuffer, "%String%": String, "%StringIteratorPrototype%": ft && j ? j(""[Symbol.iterator]()) : M, "%Symbol%": ft ? Symbol : M, "%SyntaxError%": pt, "%ThrowTypeError%": p1, "%TypedArray%": v1, "%TypeError%": yt, "%Uint8Array%": typeof Uint8Array > "u" ? M : Uint8Array, "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? M : Uint8ClampedArray, "%Uint16Array%": typeof Uint16Array > "u" ? M : Uint16Array, "%Uint32Array%": typeof Uint32Array > "u" ? M : Uint32Array, "%URIError%": URIError, "%WeakMap%": typeof WeakMap > "u" ? M : WeakMap, "%WeakRef%": typeof WeakRef > "u" ? M : WeakRef, "%WeakSet%": typeof WeakSet > "u" ? M : WeakSet }; if (j) try { null.error; } catch (e) { var T1 = j(j(e)); st["%Error.prototype%"] = T1; } var O1 = function e(t) { var r; if (t === "%AsyncFunction%") r = Xt("async function () {}"); else if (t === "%GeneratorFunction%") r = Xt("function* () {}"); else if (t === "%AsyncGeneratorFunction%") r = Xt("async function* () {}"); else if (t === "%AsyncGenerator%") { var n = e("%AsyncGeneratorFunction%"); n && (r = n.prototype); } else if (t === "%AsyncIteratorPrototype%") { var a = e("%AsyncGenerator%"); a && j && (r = j(a.prototype)); } return st[t] = r, r; }, be = { "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"], "%ArrayPrototype%": ["Array", "prototype"], "%ArrayProto_entries%": ["Array", "prototype", "entries"], "%ArrayProto_forEach%": ["Array", "prototype", "forEach"], "%ArrayProto_keys%": ["Array", "prototype", "keys"], "%ArrayProto_values%": ["Array", "prototype", "values"], "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"], "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"], "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"], "%BooleanPrototype%": ["Boolean", "prototype"], "%DataViewPrototype%": ["DataView", "prototype"], "%DatePrototype%": ["Date", "prototype"], "%ErrorPrototype%": ["Error", "prototype"], "%EvalErrorPrototype%": ["EvalError", "prototype"], "%Float32ArrayPrototype%": ["Float32Array", "prototype"], "%Float64ArrayPrototype%": ["Float64Array", "prototype"], "%FunctionPrototype%": ["Function", "prototype"], "%Generator%": ["GeneratorFunction", "prototype"], "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"], "%Int8ArrayPrototype%": ["Int8Array", "prototype"], "%Int16ArrayPrototype%": ["Int16Array", "prototype"], "%Int32ArrayPrototype%": ["Int32Array", "prototype"], "%JSONParse%": ["JSON", "parse"], "%JSONStringify%": ["JSON", "stringify"], "%MapPrototype%": ["Map", "prototype"], "%NumberPrototype%": ["Number", "prototype"], "%ObjectPrototype%": ["Object", "prototype"], "%ObjProto_toString%": ["Object", "prototype", "toString"], "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"], "%PromisePrototype%": ["Promise", "prototype"], "%PromiseProto_then%": ["Promise", "prototype", "then"], "%Promise_all%": ["Promise", "all"], "%Promise_reject%": ["Promise", "reject"], "%Promise_resolve%": ["Promise", "resolve"], "%RangeErrorPrototype%": ["RangeError", "prototype"], "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"], "%RegExpPrototype%": ["RegExp", "prototype"], "%SetPrototype%": ["Set", "prototype"], "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"], "%StringPrototype%": ["String", "prototype"], "%SymbolPrototype%": ["Symbol", "prototype"], "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"], "%TypedArrayPrototype%": ["TypedArray", "prototype"], "%TypeErrorPrototype%": ["TypeError", "prototype"], "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"], "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"], "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"], "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"], "%URIErrorPrototype%": ["URIError", "prototype"], "%WeakMapPrototype%": ["WeakMap", "prototype"], "%WeakSetPrototype%": ["WeakSet", "prototype"] }, Ot = cn, Lt = y1, C1 = Ot.call(Function.call, Array.prototype.concat), E1 = Ot.call(Function.apply, Array.prototype.splice), We = Ot.call(Function.call, String.prototype.replace), kt = Ot.call(Function.call, String.prototype.slice), m1 = Ot.call(Function.call, RegExp.prototype.exec), w1 = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, x1 = /\\(\\)?/g, d1 = function(t) { var r = kt(t, 0, 1), n = kt(t, -1); if (r === "%" && n !== "%") throw new pt("invalid intrinsic syntax, expected closing `%`"); if (n === "%" && r !== "%") throw new pt("invalid intrinsic syntax, expected opening `%`"); var a = []; return We(t, w1, function(s, i, u, o) { a[a.length] = u ? We(o, x1, "$1") : i || s; }), a; }, S1 = function(t, r) { var n = t, a; if (Lt(be, n) && (a = be[n], n = "%" + a[0] + "%"), Lt(st, n)) { var s = st[n]; if (s === gt && (s = O1(n)), typeof s > "u" && !r) throw new yt("intrinsic " + t + " exists, but is not available. Please file an issue!"); return { alias: a, name: n, value: s }; } throw new pt("intrinsic " + t + " does not exist!"); }, N1 = function(t, r) { if (typeof t != "string" || t.length === 0) throw new yt("intrinsic name must be a non-empty string"); if (arguments.length > 1 && typeof r != "boolean") throw new yt('"allowMissing" argument must be a boolean'); if (m1(/^%?[^%]*%?$/, t) === null) throw new pt("`%` may not be present anywhere but at the beginning and end of the intrinsic name"); var n = d1(t), a = n.length > 0 ? n[0] : "", s = S1("%" + a + "%", r), i = s.name, u = s.value, o = !1, f = s.alias; f && (a = f[0], E1(n, C1([0, 1], f))); for (var c = 1, g = !0; c < n.length; c += 1) { var y = n[c], l = kt(y, 0, 1), p = kt(y, -1); if ((l === '"' || l === "'" || l === "`" || p === '"' || p === "'" || p === "`") && l !== p) throw new pt("property names with quotes must have matching quotes"); if ((y === "constructor" || !g) && (o = !0), a += "." + y, i = "%" + a + "%", Lt(st, i)) u = st[i]; else if (u != null) { if (!(y in u)) { if (!r) throw new yt("base intrinsic for " + t + " exists, but the property is not available."); return; } if (at && c + 1 >= n.length) { var h = at(u, y); g = !!h, g && "get" in h && !("originalValue" in h.get) ? u = h.get : u = u[y]; } else g = Lt(u, y), u = u[y]; g && !o && (st[i] = u); } } return u; }, D1 = N1, Jt = D1("%Object.defineProperty%", !0), Pt = function() { if (Jt) try { return Jt({}, "a", { value: 1 }), !0; } catch { return !1; } return !1; }; Pt.hasArrayLengthDefineBug = function() { if (!Pt()) return null; try { return Jt([], "length", { value: 1 }).length !== 1; } catch { return !0; } }; var L1 = Pt, k1 = e1, $1 = typeof Symbol == "function" && typeof Symbol("foo") == "symbol", M1 = Object.prototype.toString, _1 = Array.prototype.concat, ln = Object.defineProperty, F1 = function(e) { return typeof e == "function" && M1.call(e) === "[object Function]"; }, U1 = L1(), yn = ln && U1, R1 = function(e, t, r, n) { if (t in e) { if (n === !0) { if (e[t] === r) return; } else if (!F1(n) || !n()) return; } yn ? ln(e, t, { configurable: !0, enumerable: !1, value: r, writable: !0 }) : e[t] = r; }, pn = function(e, t) { var r = arguments.length > 2 ? arguments[2] : {}, n = k1(t); $1 && (n = _1.call(n, Object.getOwnPropertySymbols(t))); for (var a = 0; a < n.length; a += 1) R1(e, n[a], t[n[a]], r[n[a]]); }; pn.supportsDescriptors = !!yn; var hn = pn, dt = { exports: {} }; typeof self < "u" ? dt.exports = self : typeof window < "u" ? dt.exports = window : dt.exports = Function("return this")(); var vn = dt.exports, V1 = vn, Tn = function() { return typeof b != "object" || !b || b.Math !== Math || b.Array !== Array ? V1 : b; }, A1 = hn, j1 = Tn, G1 = function() { var t = j1(); if (A1.supportsDescriptors) { var r = Object.getOwnPropertyDescriptor(t, "globalThis"); (!r || r.configurable && (r.enumerable || !r.writable || globalThis !== t)) && Object.defineProperty(t, "globalThis", { configurable: !0, enumerable: !1, value: t, writable: !0 }); } else (typeof globalThis != "object" || globalThis !== t) && (t.globalThis = t); return t; }, B1 = hn, z1 = vn, On = Tn, b1 = G1, W1 = On(), Cn = function() { return W1; }; B1(Cn, { getPolyfill: On, implementation: z1, shim: b1 }); var K1 = Cn, X1 = /* @__PURE__ */ un(K1); const K = X1(), En = { vtkObject: () => null }; function X(e) { if (e == null || e.isA) return e; if (!e.vtkClass) return K.console && K.console.error && K.console.error("Invalid VTK object"), null; const t = En[e.vtkClass]; if (!t) return K.console && K.console.error && K.console.error(`No vtk class found for Object of type ${e.vtkClass}`), null; const r = { ...e }; Object.keys(r).forEach((a) => { r[a] && typeof r[a] == "object" && r[a].vtkClass && (r[a] = X(r[a])); }); const n = t(r); return n && n.modified && n.modified(), n; } function H1(e, t) { En[e] = t; } X.register = H1; class Yt extends Array { push() { for (let t = 0; t < arguments.length; t++) this.includes(arguments[t]) || super.push(arguments[t]); return this.length; } } let te = 0; const mn = Symbol("void"); function Y1() { return te; } const wn = {}; function rt() { } const Q1 = ["log", "debug", "info", "warn", "error", "time", "timeEnd", "group", "groupEnd"]; Q1.forEach((e) => { wn[e] = rt; }); K.console = console.hasOwnProperty("log") ? console : wn; const tt = { debug: rt, // Don't print debug by default error: K.console.error || rt, info: K.console.info || rt, log: K.console.log || rt, warn: K.console.warn || rt }; function xn(e, t) { tt[e] && (tt[e] = t || rt); } function dn() { tt.log(...arguments); } function Sn() { tt.info(...arguments); } function $t() { tt.debug(...arguments); } function A() { tt.error(...arguments); } function fe() { tt.warn(...arguments); } const Ke = {}; function Nn(e) { Ke[e] || (tt.error(e), Ke[e] = !0); } const B = /* @__PURE__ */ Object.create(null); B.Float32Array = Float32Array; B.Float64Array = Float64Array; B.Uint8Array = Uint8Array; B.Int8Array = Int8Array; B.Uint16Array = Uint16Array; B.Int16Array = Int16Array; B.Uint32Array = Uint32Array; B.Int32Array = Int32Array; B.Uint8ClampedArray = Uint8ClampedArray; try { B.BigInt64Array = BigInt64Array, B.BigUint64Array = BigUint64Array; } catch { } function jt(e) { for (var t = arguments.length, r = new Array(t > 1 ? t - 1 : 0), n = 1; n < t; n++) r[n - 1] = arguments[n]; return new (B[e] || Float64Array)(...r); } function ce(e) { for (var t = arguments.length, r = new Array(t > 1 ? t - 1 : 0), n = 1; n < t; n++) r[n - 1] = arguments[n]; return (B[e] || Float64Array).from(...r); } function Gt(e) { return e.charAt(0).toUpperCase() + e.slice(1); } function V(e) { return Gt(e[0] === "_" ? e.slice(1) : e); } function Dn(e) { return e.charAt(0).toLowerCase() + e.slice(1); } function Ln(e) { let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 2, r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1e3; const n = ["TB", "GB", "MB", "KB"]; let a = Number(e), s = "B"; for (; a > r; ) a /= r, s = n.pop(); return `${a.toFixed(t)} ${s}`; } function kn(e) { let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : " "; const r = []; let n = e; for (; n > 1e3; ) r.push(`000${n % 1e3}`.slice(-3)), n = Math.floor(n / 1e3); return n > 0 && r.push(n), r.reverse(), r.join(t); } function $n(e) { Object.keys(e).forEach((t) => { Array.isArray(e[t]) && (e[t] = [].concat(e[t])); }); } function q1(e) { return Object.values(B).some((t) => e instanceof t); } function I1(e, t) { if (e === t) return !0; if (Array.isArray(e) && Array.isArray(t)) { if (e.length !== t.length) return !1; for (let r = 0; r < e.length; r++) if (e[r] !== t[r]) return !1; return !0; } return !1; } function Z1(e, t) { return Object.keys(e).find((r) => e[r] === t); } function Mn(e) { return e && e.isA ? e.getState() : e; } function ge(e) { setTimeout(e, 0); } function _n(e, t) { const r = performance.now(); e.finally(() => { const n = performance.now() - r; t(n); }); } function le() { let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; $n(t); const r = []; if (Number.isInteger(t.mtime) || (t.mtime = ++te), !("classHierarchy" in t)) t.classHierarchy = new Yt("vtkObject"); else if (!(t.classHierarchy instanceof Yt)) { const s = new Yt(); for (let i = 0; i < t.classHierarchy.length; i++) s.push(t.classHierarchy[i]); t.classHierarchy = s; } function n(s) { r[s] = null; } function a(s) { function i() { n(s); } return Object.freeze({ unsubscribe: i }); } return e.isDeleted = () => !!t.deleted, e.modified = (s) => { if (t.deleted) { A("instance deleted - cannot call any method"); return; } s && s < e.getMTime() || (t.mtime = ++te, r.forEach((i) => i && i(e))); }, e.onModified = (s) => { if (t.deleted) return A("instance deleted - cannot call any method"), null; const i = r.length; return r.push(s), a(i); }, e.getMTime = () => t.mtime, e.isA = (s) => { let i = t.classHierarchy.length; for (; i--; ) if (t.classHierarchy[i] === s) return !0; return !1; }, e.getClassName = function() { let s = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0; return t.classHierarchy[t.classHierarchy.length - 1 - s]; }, e.set = function() { let s = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, u = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, o = !1; return Object.keys(s).forEach((f) => { const c = u ? null : e[`set${Gt(f)}`]; c && Array.isArray(s[f]) && c.length > 1 ? o = c(...s[f]) || o : c ? o = c(s[f]) || o : (["mtime"].indexOf(f) === -1 && !i && fe(`Warning: Set value to model directly ${f}, ${s[f]}`), o = t[f] !== s[f] || o, t[f] = s[f]); }), o; }, e.get = function() { for (var s = arguments.length, i = new Array(s), u = 0; u < s; u++) i[u] = arguments[u]; if (!i.length) return t; const o = {}; return i.forEach((f) => { o[f] = t[f]; }), o; }, e.getReferenceByName = (s) => t[s], e.delete = () => { Object.keys(t).forEach((s) => delete t[s]), r.forEach((s, i) => n(i)), t.deleted = !0; }, e.getState = () => { if (t.deleted) return null; const s = { ...t, vtkClass: e.getClassName() }; Object.keys(s).forEach((u) => { s[u] === null || s[u] === void 0 || u[0] === "_" ? delete s[u] : s[u].isA ? s[u] = s[u].getState() : Array.isArray(s[u]) ? s[u] = s[u].map(Mn) : q1(s[u]) && (s[u] = Array.from(s[u])); }); const i = {}; return Object.keys(s).sort().forEach((u) => { i[u] = s[u]; }), i.mtime && delete i.mtime, i; }, e.shallowCopy = function(s) { let i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1; if (s.getClassName() !== e.getClassName()) throw new Error(`Cannot ShallowCopy ${s.getClassName()} into ${e.getClassName()}`); const u = s.get(), o = Object.keys(t).sort(); Object.keys(u).sort().forEach((c) => { const g = o.indexOf(c); g === -1 ? i && $t(`add ${c} in shallowCopy`) : o.splice(g, 1), t[c] = u[c]; }), o.length && i && $t(`Untouched keys: ${o.join(", ")}`), e.modified(); }, e.toJSON = function() { return e.getState(); }, e; } const J1 = { object(e, t, r) { return function() { return { ...t[r.name] }; }; } }; function Ct(e, t, r) { r.forEach((n) => { if (typeof n == "object") { const a = J1[n.type]; a ? e[`get${V(n.name)}`] = a(e, t, n) : e[`get${V(n.name)}`] = () => t[n.name]; } else e[`get${V(n)}`] = () => t[n]; }); } const P1 = { enum(e, t, r) { const n = `_on${V(r.name)}Changed`; return (a) => { var s; if (typeof a == "string") { if (r.enum[a] !== void 0) return t[r.name] !== r.enum[a] ? (t[r.name] = r.enum[a], e.modified(), !0) : !1; throw A(`Set Enum with invalid argument ${r}, ${a}`), new RangeError("Set Enum with invalid string argument"); } if (typeof a == "number") { if (t[r.name] !== a) { if (Object.keys(r.enum).map((i) => r.enum[i]).indexOf(a) !== -1) { const i = t[r.name]; return t[r.name] = a, (s = t[n]) == null || s.call(t, e, t, a, i), e.modified(), !0; } throw A(`Set Enum outside numeric range ${r}, ${a}`), new RangeError("Set Enum outside numeric range"); } return !1; } throw A(`Set Enum with invalid argument (String/Number) ${r}, ${a}`), new TypeError("Set Enum with invalid argument (String/Number)"); }; }, object(e, t, r) { const n = `_on${V(r.name)}Changed`; return (a) => { var s; if (!Zr(t[r.name], a)) { const i = t[r.name]; return t[r.name] = a, (s = t[n]) == null || s.call(t, e, t, a, i), e.modified(), !0; } return !1; }; } }; function Xe(e) { if (typeof e == "object") { const t = P1[e.type]; if (t) return (r, n) => t(r, n, e); throw A(`No setter for field ${e}`), new TypeError("No setter for field"); } return function(r, n) { const a = `_on${V(e)}Changed`; return function(i) { var u; if (n.deleted) return A("instance deleted - cannot call any method"), !1; if (n[e] !== i) { const o = n[e.name]; return n[e] = i, (u = n[a]) == null || u.call(n, r, n, i, o), r.modified(), !0; } return !1; }; }; } function Bt(e, t, r) { r.forEach((n) => { typeof n == "object" ? e[`set${V(n.name)}`] = Xe(n)(e, t) : e[`set${V(n)}`] = Xe(n)(e, t); }); } function ye(e, t, r) { Ct(e, t, r), Bt(e, t, r); } function pe(e, t, r) { r.forEach((n) => { e[`get${V(n)}`] = () => t[n] ? Array.from(t[n]) : t[n], e[`get${V(n)}ByReference`] = () => t[n]; }); } function he(e, t, r, n) { let a = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : void 0; r.forEach((s) => { if (t[s] && n && t[s].length !== n) throw new RangeError(`Invalid initial number of values for array (${s})`); const i = `_on${V(s)}Changed`; e[`set${V(s)}`] = function() { var l; if (t.deleted) return A("instance deleted - cannot call any method"), !1; for (var u = arguments.length, o = new Array(u), f = 0; f < u; f++) o[f] = arguments[f]; let c = o, g, y = !1; if (c.length === 1 && (c[0] == null || c[0].length >= 0) && (c = c[0], y = !0), c == null) g = t[s] !== c; else { if (n && c.length !== n) if (c.length < n && a !== void 0) for (c = Array.from(c), y = !1; c.length < n; ) c.push(a); else throw new RangeError(`Invalid number of values for array setter (${s})`); g = t[s] == null || t[s].length !== c.length; for (let p = 0; !g && p < c.length; ++p) g = t[s][p] !== c[p]; g && y && (c = Array.from(c)); } if (g) { const p = t[s.name]; t[s] = c, (l = t[i]) == null || l.call(t, e, t, c, p), e.modified(); } return g; }, e[`set${V(s)}From`] = (u) => { const o = t[s]; u.forEach((f, c) => { o[c] = f; }); }; }); } function Fn(e, t, r, n) { let a = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : void 0; pe(e, t, r), he(e, t, r, n, a); } function Un(e, t, r) { for (let n = 0; n < r.length; n++) { const a = r[n]; t[a] !== void 0 && (t[`_${a}`] = t[a], delete t[a]); } } function Rn(e, t, r, n) { t.inputData ? t.inputData = t.inputData.map(X) : t.inputData = [], t.inputConnection ? t.inputConnection = t.inputConnection.map(X) : t.inputConnection = [], t.output ? t.output = t.output.map(X) : t.output = [], t.inputArrayToProcess ? t.inputArrayToProcess = t.inputArrayToProcess.map(X) : t.inputArrayToProcess = [], t.numberOfInputs = r; function a(l) { let p = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; if (t.deleted) { A("instance deleted - cannot call any method"); return; } if (p >= t.numberOfInputs) { A(`algorithm ${e.getClassName()} only has ${t.numberOfInputs} input ports. To add more input ports, use addInputData()`); return; } (t.inputData[p] !== l || t.inputConnection[p]) && (t.inputData[p] = l, t.inputConnection[p] = null, e.modified && e.modified()); } function s() { let l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0; return t.inputConnection[l] && (t.inputData[l] = t.inputConnection[l]()), t.inputData[l]; } function i(l) { let p = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; if (t.deleted) { A("instance deleted - cannot call any method"); return; } if (p >= t.numberOfInputs) { let h = `algorithm ${e.getClassName()} only has `; h += `${t.numberOfInputs}`, h += " input ports. To add more input ports, use addInputConnection()", A(h); return; } t.inputData[p] = null, t.inputConnection[p] = l; } function u() { let l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0; return t.inputConnection[l]; } function o() { let l = t.numberOfInputs; for (; l && !t.inputData[l - 1] && !t.inputConnection[l - 1]; ) l--; return l === t.numberOfInputs && t.numberOfInputs++, l; } function f(l) { if (t.deleted) { A("instance deleted - cannot call any method"); return; } i(l, o()); } function c(l) { if (t.deleted) { A("instance deleted - cannot call any method"); return; } a(l, o()); } function g() { let l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0; return t.deleted ? (A("instance deleted - cannot call any method"), null) : (e.shouldUpdate() && e.update(), t.output[l]); } e.shouldUpdate = () => { var v, N; const l = e.getMTime(); let p = 1 / 0, h = n; for (; h--; ) { if (!t.output[h] || t.output[h].isDeleted()) return !0; const L = t.output[h].getMTime(); if (L < l) return !0; L < p && (p = L); } for (h = t.numberOfInputs; h--; ) if ((v = t.inputConnection[h]) != null && v.filter.shouldUpdate() || ((N = e.getInputData(h)) == null ? void 0 : N.getMTime()) > p) return !0; return !1; }; function y() { let l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0; const p = () => g(l); return p.filter = e, p; } if (t.numberOfInputs) { let l = t.numberOfInputs; for (; l--; ) t.inputData.push(null), t.inputConnection.push(null); e.setInputData = a, e.setInputConnection = i, e.addInputData = c, e.addInputConnection = f, e.getInputData = s, e.getInputConnection = u; } n && (e.getOutputData = g, e.getOutputPort = y), e.update = () => { const l = []; if (t.numberOfInputs) { let p = 0; for (; p < t.numberOfInputs; ) l[p] = e.getInputData(p), p++; } e.shouldUpdate() && e.requestData && e.requestData(l, t.output); }, e.getNumberOfInputPorts = () => t.numberOfInputs, e.getNumberOfOutputPorts = () => n || t.output.length, e.getInputArrayToProcess = (l) => { const p = t.inputArrayToProcess[l], h = t.inputData[l]; return p && h ? h[`get${p.fieldAssociation}`]().getArray(p.arrayName) : null; }, e.setInputArrayToProcess = function(l, p, h) { let v = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : "Scalars"; for (; t.inputArrayToProcess.length < l; ) t.inputArrayToProcess.push(null); t.inputArrayToProcess[l] = { arrayName: p, fieldAssociation: h, attributeType: v }; }; } const ve = Symbol("Event abort"); function Vn(e, t, r) { const n = [], a = e.delete; let s = 1; function i(f) { for (let c = 0; c < n.length; ++c) { const [g] = n[c]; if (g === f) { n.splice(c, 1); return; } } } function u(f) { function c() { i(f); } return Object.freeze({ unsubscribe: c }); } function o() { if (t.deleted) { A("instance deleted - cannot call any method"); return; } const f = n.slice(); for (let c = 0; c < f.length; ++c) { const [, g, y] = f[c]; if (g) { if (y < 0) setTimeout(() => g.apply(e, arguments), 1 - y); else if (g.apply(e, arguments) === ve) break; } } } e[`invoke${V(r)}`] = o, e[`on${V(r)}`] = function(f) { let c = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; if (!f.apply) return console.error(`Invalid callback for event ${r}`), null; if (t.deleted) return A("instance deleted - cannot call any method"), null; const g = s++; return n.push([g, f, c]), n.sort((y, l) => l[2] - y[2]), u(g); }, e.delete = () => { a(), n.forEach((f) => { let [c] = f; return i(c); }); }; } function Te(e, t) { const r = function() { let n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; const a = {}, s = {}; return e(s, a, n), Object.freeze(s); }; return t && X.register(t, r), r; } function An() { for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++) t[r] = arguments[r]; return function() { for (var n = arguments.length, a = new Array(n), s = 0; s < n; s++) a[s] = arguments[s]; return t.filter((i) => !!i).map((i) => i(...a)); }; } function Oe(e) { return e && e.isA && e.isA("vtkObject"); } function Mt(e, t) { let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [], n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : []; if (Oe(e)) { if (n.indexOf(e) >= 0) return r; n.push(e); const a = t(e); a !== void 0 && r.push(a); const s = e.get(); Object.keys(s).forEach((i) => { const u = s[i]; Array.isArray(u) ? u.forEach((o) => { Mt(o, t, r, n); }) : Mt(u, t, r, n); }); } return r; } function jn(e, t, r) { var n = this; let a; const s = function() { for (var i = arguments.length, u = new Array(i), o = 0; o < i; o++) u[o] = arguments[o]; const f = n, c = () => { a = null, r || e.apply(f, u); }, g = r && !a; clearTimeout(a), a = setTimeout(c, t), g && e.apply(f, u); }; return s.cancel = () => clearTimeout(a), s; } function Gn(e, t) { let r = !1, n = null; function a() { r = !1, n !== null && (s(...n), n = null); } function s() { for (var i = arguments.length, u = new Array(i), o = 0; o < i; o++) u[o] = arguments[o]; if (r) { n = u; return; } r = !0, e(...u), setTimeout(a, t); } return s; } function Ce(e, t) { let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; t.keystore = Object.assign(t.keystore || {}, r), e.setKey = (n, a) => { t.keystore[n] = a; }, e.getKey = (n) => t.keystore[n], e.getAllKeys = () => Object.keys(t.keystore), e.deleteKey = (n) => delete t.keystore[n], e.clearKeystore = () => e.getAllKeys().forEach((n) => delete t.keystore[n]); } let ta = 1; const Et = "__root__"; function Bn(e, t) { Ce(e, t); const r = e.delete; t.proxyId = `${ta++}`, t.ui = JSON.parse(JSON.stringify(t.ui || [])), Ct(e, t, ["proxyId", "proxyGroup", "proxyName"]), ye(e, t, ["proxyManager"]); const n = {}, a = {}; function s(f, c) { a[c] || (a[c] = []); const g = a[c]; for (let y = 0; y < f.length; y++) g.push(f[y].name), n[f[y].name] = f[y], f[y].children && f[y].children.length && s(f[y].children, f[y].name); } s(t.ui, Et), e.updateUI = (f) => { t.ui = JSON.parse(JSON.stringify(f || [])), Object.keys(n).forEach((c) => delete n[c]), Object.keys(a).forEach((c) => delete a[c]), s(t.ui, Et), e.modified(); }; function i() { let f = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Et; return a[f]; } e.updateProxyProperty = (f, c) => { const g = n[f]; g ? Object.assign(g, c) : n[f] = { ...c }; }, e.activate = () => { if (t.proxyManager) { const f = `setActive${V(e.getProxyGroup().slice(0, -1))}`; t.proxyManager[f] && t.proxyManager[f](e); } }, t.propertyLinkSubscribers = {}, e.registerPropertyLinkForGC = (f, c) => { c in t.propertyLinkSubscribers || (t.propertyLinkSubscribers[c] = []), t.propertyLinkSubscribers[c].push(f); }, e.gcPropertyLinks = (f) => { const c = t.propertyLinkSubscribers[f] || []; for (; c.length; ) c.pop().unbind(e); }, t.propertyLinkMap = {}, e.getPropertyLink = function(f) { let c = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1; if (t.propertyLinkMap[f]) return t.propertyLinkMap[f]; let g = null; const y = []; let l = 0, p = !1; function h(T) { let C = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1; if (p) return null; const O = []; let E = null; for (l = y.length; l--; ) { const k = y[l]; k.instance === T ? E = k : O.push(k); } if (!E) return null; const m = E.instance[`get${V(E.propertyName)}`](); if (!I1(m, g) || C) { for (g = m, p = !0; O.length; ) { const k = O.pop(); k.instance.set({ [k.propertyName]: g }); } p = !1; } return t.propertyLinkMap[f].persistent && (t.propertyLinkMap[f].value = m), m; } function v(T, C) { const O = []; for (l = y.length; l--; ) { const E = y[l]; E.instance === T && (E.propertyName === C || C === void 0) && (E.subscription.unsubscribe(), O.push(l)); } for (; O.length; ) y.splice(O.pop(), 1); } function N(T, C) { let O = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1; const E = T.onModified(h), m = y[0]; return y.push({ instance: T, propertyName: C, subscription: E }), O && (t.propertyLinkMap[f].persistent && t.propertyLinkMap[f].value !== void 0 ? T.set({ [C]: t.propertyLinkMap[f].value }) : m && h(m.instance, !0)), { unsubscribe: () => v(T, C) }; } function L() { for (; y.length; ) y.pop().subscription.unsubscribe(); } const w = { bind: N, unbind: v, unsubscribe: L, persistent: c }; return t.propertyLinkMap[f] = w, w; }; function u() { let f = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Et; const c = [], g = t.proxyId, y = i(f) || []; for (let l = 0; l < y.length; l++) { const p = y[l], h = e[`get${V(p)}`], v = h ? h() : void 0, N = { id: g, name: p, value: v }, L = u(p); L.length && (N.children = L), c.push(N); } return c; } e.listPropertyNames = () => u().map((f) => f.name), e.getPropertyByName = (f) => u().find((c) => c.name === f), e.getPropertyDomainByName = (f) => (n[f] || {}).domain, e.getProxySection = () => ({ id: t.proxyId, name: t.proxyGroup, ui: t.ui, properties: u() }), e.delete = () => { const f = Object.keys(t.propertyLinkMap); let c = f.length; for (; c--; ) t.propertyLinkMap[f[c]].unsubscribe(); Object.keys(t.propertyLinkSubscribers).forEach(e.gcPropertyLinks), r(); }, e.getState = () => null; function o() { if (t.links) for (let f = 0; f < t.links.length; f++) { const { link: c, property: g, persistent: y, updateOnBind: l, type: p } = t.links[f]; if (p === "application") { const h = t.proxyManager.getPropertyLink(c, y); e.registerPropertyLinkForGC(h, "application"), h.bind(e, g, l); } } } ge(o); } function zn(e, t, r) { const n = e.delete, a = [], s = Object.keys(r); let i = s.length; for (; i--; ) { const u = s[i], { modelKey: o, property: f, modified: c = !0 } = r[u], g = V(f), y = V(u); e[`get${y}`] = t[o][`get${g}`], e[`set${y}`] = t[o][`set${g}`], c && a.push(t[o].onModified(e.modified)); } e.delete = () => { for (; a.length; ) a.pop().unsubscribe(); n(); }; } function bn(e, t) { let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}; t.this = e; function a(u) { const o = Object.keys(u); let f = o.length; for (; f--; ) { const c = o[f]; t[c].set(u[c]); } } const s = Object.keys(n); let i = s.length; for (; i--; ) { const u = s[i]; t[u] = n[u]; const o = r[u]; e[`set${V(u)}`] = (f) => { if (f !== t[u]) { t[u] = f; const c = o[f]; a(c), e.modified(); } }; } s.length && Ct(e, t, s); } const He = 10, Ye = 40, Qe = 800; function Wn(e) { let t = 0, r = 0, n = 0, a = 0; return "detail" in e && (r = e.detail), "wheelDelta" in e && (r = -e.wheelDelta / 120), "wheelDeltaY" in e && (r = -e.wheelDeltaY / 120), "wheelDeltaX" in e && (t = -e.wheelDeltaX / 120), "axis" in e && e.axis === e.HORIZONTAL_AXIS && (t = r, r = 0), n = t * He, a = r * He, "deltaY" in e && (a = e.deltaY), "deltaX" in e && (n = e.deltaX), (n || a) && e.deltaMode && (e.deltaMode === 1 ? (n *= Ye, a *= Ye) : (n *= Qe, a *= Qe)), n && !t && (t = n < 1 ? -1 : 1), a && !r && (r = a < 1 ? -1 : 1), { spinX: t, spinY: r || t, pixelX: n, pixelY: a || n }; } var x = { algo: Rn, capitalize: Gt, chain: An, debounce: jn, enumToString: Z1, event: Vn, EVENT_ABORT: ve, formatBytesToProperUnit: Ln, formatNumbersWithThousandSeparator: kn, get: Ct, getArray: pe, getCurrentGlobalMTime: Y1, getStateArrayMapFunc: Mn, isVtkObject: Oe, keystore: Ce, measurePromiseExecution: _n, moveToProtected: Un, newInstance: Te, newTypedArray: jt, newTypedArrayFrom: ce, normalizeWheel: Wn, obj: le, proxy: Bn, proxyPropertyMapping: zn, proxyPropertyState: bn, safeArrays: $n, set: Bt, setArray: he, setGet: ye, setGetArray: Fn, setImmediate: ge, setLoggerFunction: xn, throttle: Gn, traverseInstanceTree: Mt, TYPED_ARRAYS: B, // deprecated todo remove on breaking API revision uncapitalize: Dn, VOID: mn, vtkDebugMacro: $t, vtkErrorMacro: A, vtkInfoMacro: Sn, vtkLogMacro: dn, vtkOnceErrorMacro: Nn, vtkWarningMacro: fe }, ea = /* @__PURE__ */ Object.freeze({ __proto__: null, VOID: mn, setLoggerFunction: xn, vtkLogMacro: dn, vtkInfoMacro: Sn, vtkDebugMacro: $t, vtkErrorMacro: A, vtkWarningMacro: fe, vtkOnceErrorMacro: Nn, TYPED_ARRAYS: B, newTypedArray: jt, newTypedArrayFrom: ce, capitalize: Gt, _capitalize: V, uncapitalize: Dn, formatBytesToProperUnit: Ln, formatNumbersWithThousandSeparator: kn, setImmediateVTK: ge, measurePromiseExecution: _n, obj: le, get: Ct, set: Bt, setGet: ye, getArray: pe, setArray: he, setGetArray: Fn, moveToProtected: Un, algo: Rn, EVENT_ABORT: ve, event: Vn, newInstance: Te, chain: An, isVtkObject: Oe, traverseInstanceTree: Mt, debounce: jn, throttle: Gn, keystore: Ce, proxy: Bn, proxyPropertyMapping: zn, proxyPropertyState: bn, normalizeWheel: Wn, default: x }), Ee = { exports: {} }; Ee.exports; (function(e) { (function(t, r, n) { function a(o) { var f = this, c = u(); f.next = function() { var g = 2091639 * f.s0 + f.c * 23283064365386963e-26; return f.s0 = f.s1, f.s1 = f.s2, f.s2 = g - (f.c = g | 0); }, f.c = 1, f.s0 = c(" "), f.s1 = c(" "), f.s2 = c(" "), f.s0 -= c(o), f.s0 < 0 && (f.s0 += 1), f.s1 -= c(o), f.s1 < 0 && (f.s1 += 1), f.s2 -= c(o), f.s2 < 0 && (f.s2 += 1), c = null; } function s(o, f) { return f.c = o.c, f.s0 = o.s0, f.s1 = o.s1, f.s2 = o.s2, f; } function i(o, f) { var c = new a(o), g = f && f.state, y = c.next; return y.int32 = function() { return c.next() * 4294967296 | 0; }, y.double = function() { return y() + (y() * 2097152 | 0) * 11102230246251565e-32; }, y.quick = y, g && (typeof g == "object" && s(g, c), y.state = function() { return s(c, {}); }), y; } function u() { var o = 4022871197, f = function(c) { c = String(c); for (var g = 0; g < c.length; g++) { o += c.charCodeAt(g); var y = 0.02519603282416938 * o; o = y >>> 0, y -= o, y *= o, o = y >>> 0, y -= o, o += y * 4294967296; } return (o >>> 0) * 23283064365386963e-26; }; return f; } r && r.exports ? r.exports = i : this.alea = i; })( b, e ); })(Ee); var na = Ee.exports, me = { exports: {} }; me.exports; (function(e) { (function(t, r, n) { function a(u) { var o = this, f = ""; o.x = 0, o.y = 0, o.z = 0, o.w = 0, o.next = function() { var g = o.x ^ o.x << 11; return o.x = o.y, o.y = o.z, o.z = o.w, o.w ^= o.w >>> 19 ^ g ^ g >>> 8; }, u === (u | 0) ? o.x = u : f += u; for (var c = 0; c < f.length + 64; c++) o.x ^= f.charCodeAt(c) | 0, o.next(); } function s(u, o) { return o.x = u.x, o.y = u.y, o.z = u.z, o.w = u.w, o; } function i(u, o) { var f = new a(u), c = o && o.state, g = function() { return (f.next() >>> 0) / 4294967296; }; return g.double = function() { do var y = f.next() >>> 11, l = (f.next() >>> 0) / 4294967296, p = (y + l) / (1 << 21); while (p === 0); return p; }, g.int32 = f.next, g.quick = g, c && (typeof c == "object" && s(c, f), g.state = function() { return s(f, {}); }), g; } r && r.exports ? r.exports = i : this.xor128 = i; })( b, e ); })(me); var ra = me.exports, we = { exports: {} }; we.exports; (function(e) { (function(t, r, n) { function a(u) { var o = this, f = ""; o.next = function() { var g =