Files
stalendeuren/bron/main.45858049.js
Ubuntu 3d788740cb feat: Latest production version with interior scene and glass
Includes room interior with floor, walls, glass you can see through,
and all uncommitted production changes that were running live.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 14:50:31 +00:00

72324 lines
3.2 MiB

/*! For license information please see main.45858049.js.LICENSE.txt */
( () => {
var e = {
695: e => {
function t(e, t, n) {
var r, i, s, a, o;
function l() {
var c = Date.now() - a;
c < t && c >= 0 ? r = setTimeout(l, t - c) : (r = null,
n || (o = e.apply(s, i),
s = i = null))
}
null == t && (t = 100);
var c = function() {
s = this,
i = arguments,
a = Date.now();
var c = n && !r;
return r || (r = setTimeout(l, t)),
c && (o = e.apply(s, i),
s = i = null),
o
};
return c.clear = function() {
r && (clearTimeout(r),
r = null)
}
,
c.flush = function() {
r && (o = e.apply(s, i),
s = i = null,
clearTimeout(r),
r = null)
}
,
c
}
t.debounce = t,
e.exports = t
}
,
536: function(e, t, n) {
var r;
e = n.nmd(e),
function() {
var i, s = "Expected a function", a = "__lodash_hash_undefined__", o = "__lodash_placeholder__", l = 16, c = 32, u = 64, d = 128, h = 256, p = 1 / 0, f = 9007199254740991, m = NaN, g = 4294967295, v = [["ary", d], ["bind", 1], ["bindKey", 2], ["curry", 8], ["curryRight", l], ["flip", 512], ["partial", c], ["partialRight", u], ["rearg", h]], y = "[object Arguments]", x = "[object Array]", b = "[object Boolean]", _ = "[object Date]", w = "[object Error]", S = "[object Function]", A = "[object GeneratorFunction]", M = "[object Map]", C = "[object Number]", E = "[object Object]", T = "[object Promise]", R = "[object RegExp]", B = "[object Set]", P = "[object String]", k = "[object Symbol]", L = "[object WeakMap]", I = "[object ArrayBuffer]", N = "[object DataView]", D = "[object Float32Array]", j = "[object Float64Array]", F = "[object Int8Array]", O = "[object Int16Array]", U = "[object Int32Array]", z = "[object Uint8Array]", G = "[object Uint8ClampedArray]", H = "[object Uint16Array]", V = "[object Uint32Array]", W = /\b__p \+= '';/g, J = /\b(__p \+=) '' \+/g, X = /(__e\(.*?\)|\b__t\)) \+\n'';/g, K = /&(?:amp|lt|gt|quot|#39);/g, q = /[&<>"']/g, Y = RegExp(K.source), Q = RegExp(q.source), Z = /<%-([\s\S]+?)%>/g, $ = /<%([\s\S]+?)%>/g, ee = /<%=([\s\S]+?)%>/g, te = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, ne = /^\w*$/, re = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, ie = /[\\^$.*+?()[\]{}|]/g, se = RegExp(ie.source), ae = /^\s+/, oe = /\s/, le = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, ce = /\{\n\/\* \[wrapped with (.+)\] \*/, ue = /,? & /, de = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, he = /[()=,{}\[\]\/\s]/, pe = /\\(\\)?/g, fe = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, me = /\w*$/, ge = /^[-+]0x[0-9a-f]+$/i, ve = /^0b[01]+$/i, ye = /^\[object .+?Constructor\]$/, xe = /^0o[0-7]+$/i, be = /^(?:0|[1-9]\d*)$/, _e = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, we = /($^)/, Se = /['\n\r\u2028\u2029\\]/g, Ae = "\\ud800-\\udfff", Me = "\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff", Ce = "\\u2700-\\u27bf", Ee = "a-z\\xdf-\\xf6\\xf8-\\xff", Te = "A-Z\\xc0-\\xd6\\xd8-\\xde", Re = "\\ufe0e\\ufe0f", Be = "\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", Pe = "['\u2019]", ke = "[" + Ae + "]", Le = "[" + Be + "]", Ie = "[" + Me + "]", Ne = "\\d+", De = "[" + Ce + "]", je = "[" + Ee + "]", Fe = "[^" + Ae + Be + Ne + Ce + Ee + Te + "]", Oe = "\\ud83c[\\udffb-\\udfff]", Ue = "[^" + Ae + "]", ze = "(?:\\ud83c[\\udde6-\\uddff]){2}", Ge = "[\\ud800-\\udbff][\\udc00-\\udfff]", He = "[" + Te + "]", Ve = "\\u200d", We = "(?:" + je + "|" + Fe + ")", Je = "(?:" + He + "|" + Fe + ")", Xe = "(?:['\u2019](?:d|ll|m|re|s|t|ve))?", Ke = "(?:['\u2019](?:D|LL|M|RE|S|T|VE))?", qe = "(?:" + Ie + "|" + Oe + ")" + "?", Ye = "[" + Re + "]?", Qe = Ye + qe + ("(?:" + Ve + "(?:" + [Ue, ze, Ge].join("|") + ")" + Ye + qe + ")*"), Ze = "(?:" + [De, ze, Ge].join("|") + ")" + Qe, $e = "(?:" + [Ue + Ie + "?", Ie, ze, Ge, ke].join("|") + ")", et = RegExp(Pe, "g"), tt = RegExp(Ie, "g"), nt = RegExp(Oe + "(?=" + Oe + ")|" + $e + Qe, "g"), rt = RegExp([He + "?" + je + "+" + Xe + "(?=" + [Le, He, "$"].join("|") + ")", Je + "+" + Ke + "(?=" + [Le, He + We, "$"].join("|") + ")", He + "?" + We + "+" + Xe, He + "+" + Ke, "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", Ne, Ze].join("|"), "g"), it = RegExp("[" + Ve + Ae + Me + Re + "]"), st = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/, at = ["Array", "Buffer", "DataView", "Date", "Error", "Float32Array", "Float64Array", "Function", "Int8Array", "Int16Array", "Int32Array", "Map", "Math", "Object", "Promise", "RegExp", "Set", "String", "Symbol", "TypeError", "Uint8Array", "Uint8ClampedArray", "Uint16Array", "Uint32Array", "WeakMap", "_", "clearTimeout", "isFinite", "parseInt", "setTimeout"], ot = -1, lt = {};
lt[D] = lt[j] = lt[F] = lt[O] = lt[U] = lt[z] = lt[G] = lt[H] = lt[V] = !0,
lt[y] = lt[x] = lt[I] = lt[b] = lt[N] = lt[_] = lt[w] = lt[S] = lt[M] = lt[C] = lt[E] = lt[R] = lt[B] = lt[P] = lt[L] = !1;
var ct = {};
ct[y] = ct[x] = ct[I] = ct[N] = ct[b] = ct[_] = ct[D] = ct[j] = ct[F] = ct[O] = ct[U] = ct[M] = ct[C] = ct[E] = ct[R] = ct[B] = ct[P] = ct[k] = ct[z] = ct[G] = ct[H] = ct[V] = !0,
ct[w] = ct[S] = ct[L] = !1;
var ut = {
"\\": "\\",
"'": "'",
"\n": "n",
"\r": "r",
"\u2028": "u2028",
"\u2029": "u2029"
}
, dt = parseFloat
, ht = parseInt
, pt = "object" == typeof n.g && n.g && n.g.Object === Object && n.g
, ft = "object" == typeof self && self && self.Object === Object && self
, mt = pt || ft || Function("return this")()
, gt = t && !t.nodeType && t
, vt = gt && e && !e.nodeType && e
, yt = vt && vt.exports === gt
, xt = yt && pt.process
, bt = function() {
try {
var e = vt && vt.require && vt.require("util").types;
return e || xt && xt.binding && xt.binding("util")
} catch (t) {}
}()
, _t = bt && bt.isArrayBuffer
, wt = bt && bt.isDate
, St = bt && bt.isMap
, At = bt && bt.isRegExp
, Mt = bt && bt.isSet
, Ct = bt && bt.isTypedArray;
function Et(e, t, n) {
switch (n.length) {
case 0:
return e.call(t);
case 1:
return e.call(t, n[0]);
case 2:
return e.call(t, n[0], n[1]);
case 3:
return e.call(t, n[0], n[1], n[2])
}
return e.apply(t, n)
}
function Tt(e, t, n, r) {
for (var i = -1, s = null == e ? 0 : e.length; ++i < s; ) {
var a = e[i];
t(r, a, n(a), e)
}
return r
}
function Rt(e, t) {
for (var n = -1, r = null == e ? 0 : e.length; ++n < r && !1 !== t(e[n], n, e); )
;
return e
}
function Bt(e, t) {
for (var n = null == e ? 0 : e.length; n-- && !1 !== t(e[n], n, e); )
;
return e
}
function Pt(e, t) {
for (var n = -1, r = null == e ? 0 : e.length; ++n < r; )
if (!t(e[n], n, e))
return !1;
return !0
}
function kt(e, t) {
for (var n = -1, r = null == e ? 0 : e.length, i = 0, s = []; ++n < r; ) {
var a = e[n];
t(a, n, e) && (s[i++] = a)
}
return s
}
function Lt(e, t) {
return !!(null == e ? 0 : e.length) && Ht(e, t, 0) > -1
}
function It(e, t, n) {
for (var r = -1, i = null == e ? 0 : e.length; ++r < i; )
if (n(t, e[r]))
return !0;
return !1
}
function Nt(e, t) {
for (var n = -1, r = null == e ? 0 : e.length, i = Array(r); ++n < r; )
i[n] = t(e[n], n, e);
return i
}
function Dt(e, t) {
for (var n = -1, r = t.length, i = e.length; ++n < r; )
e[i + n] = t[n];
return e
}
function jt(e, t, n, r) {
var i = -1
, s = null == e ? 0 : e.length;
for (r && s && (n = e[++i]); ++i < s; )
n = t(n, e[i], i, e);
return n
}
function Ft(e, t, n, r) {
var i = null == e ? 0 : e.length;
for (r && i && (n = e[--i]); i--; )
n = t(n, e[i], i, e);
return n
}
function Ot(e, t) {
for (var n = -1, r = null == e ? 0 : e.length; ++n < r; )
if (t(e[n], n, e))
return !0;
return !1
}
var Ut = Xt("length");
function zt(e, t, n) {
var r;
return n(e, (function(e, n, i) {
if (t(e, n, i))
return r = n,
!1
}
)),
r
}
function Gt(e, t, n, r) {
for (var i = e.length, s = n + (r ? 1 : -1); r ? s-- : ++s < i; )
if (t(e[s], s, e))
return s;
return -1
}
function Ht(e, t, n) {
return t === t ? function(e, t, n) {
var r = n - 1
, i = e.length;
for (; ++r < i; )
if (e[r] === t)
return r;
return -1
}(e, t, n) : Gt(e, Wt, n)
}
function Vt(e, t, n, r) {
for (var i = n - 1, s = e.length; ++i < s; )
if (r(e[i], t))
return i;
return -1
}
function Wt(e) {
return e !== e
}
function Jt(e, t) {
var n = null == e ? 0 : e.length;
return n ? Yt(e, t) / n : m
}
function Xt(e) {
return function(t) {
return null == t ? i : t[e]
}
}
function Kt(e) {
return function(t) {
return null == e ? i : e[t]
}
}
function qt(e, t, n, r, i) {
return i(e, (function(e, i, s) {
n = r ? (r = !1,
e) : t(n, e, i, s)
}
)),
n
}
function Yt(e, t) {
for (var n, r = -1, s = e.length; ++r < s; ) {
var a = t(e[r]);
a !== i && (n = n === i ? a : n + a)
}
return n
}
function Qt(e, t) {
for (var n = -1, r = Array(e); ++n < e; )
r[n] = t(n);
return r
}
function Zt(e) {
return e ? e.slice(0, gn(e) + 1).replace(ae, "") : e
}
function $t(e) {
return function(t) {
return e(t)
}
}
function en(e, t) {
return Nt(t, (function(t) {
return e[t]
}
))
}
function tn(e, t) {
return e.has(t)
}
function nn(e, t) {
for (var n = -1, r = e.length; ++n < r && Ht(t, e[n], 0) > -1; )
;
return n
}
function rn(e, t) {
for (var n = e.length; n-- && Ht(t, e[n], 0) > -1; )
;
return n
}
var sn = Kt({
"\xc0": "A",
"\xc1": "A",
"\xc2": "A",
"\xc3": "A",
"\xc4": "A",
"\xc5": "A",
"\xe0": "a",
"\xe1": "a",
"\xe2": "a",
"\xe3": "a",
"\xe4": "a",
"\xe5": "a",
"\xc7": "C",
"\xe7": "c",
"\xd0": "D",
"\xf0": "d",
"\xc8": "E",
"\xc9": "E",
"\xca": "E",
"\xcb": "E",
"\xe8": "e",
"\xe9": "e",
"\xea": "e",
"\xeb": "e",
"\xcc": "I",
"\xcd": "I",
"\xce": "I",
"\xcf": "I",
"\xec": "i",
"\xed": "i",
"\xee": "i",
"\xef": "i",
"\xd1": "N",
"\xf1": "n",
"\xd2": "O",
"\xd3": "O",
"\xd4": "O",
"\xd5": "O",
"\xd6": "O",
"\xd8": "O",
"\xf2": "o",
"\xf3": "o",
"\xf4": "o",
"\xf5": "o",
"\xf6": "o",
"\xf8": "o",
"\xd9": "U",
"\xda": "U",
"\xdb": "U",
"\xdc": "U",
"\xf9": "u",
"\xfa": "u",
"\xfb": "u",
"\xfc": "u",
"\xdd": "Y",
"\xfd": "y",
"\xff": "y",
"\xc6": "Ae",
"\xe6": "ae",
"\xde": "Th",
"\xfe": "th",
"\xdf": "ss",
"\u0100": "A",
"\u0102": "A",
"\u0104": "A",
"\u0101": "a",
"\u0103": "a",
"\u0105": "a",
"\u0106": "C",
"\u0108": "C",
"\u010a": "C",
"\u010c": "C",
"\u0107": "c",
"\u0109": "c",
"\u010b": "c",
"\u010d": "c",
"\u010e": "D",
"\u0110": "D",
"\u010f": "d",
"\u0111": "d",
"\u0112": "E",
"\u0114": "E",
"\u0116": "E",
"\u0118": "E",
"\u011a": "E",
"\u0113": "e",
"\u0115": "e",
"\u0117": "e",
"\u0119": "e",
"\u011b": "e",
"\u011c": "G",
"\u011e": "G",
"\u0120": "G",
"\u0122": "G",
"\u011d": "g",
"\u011f": "g",
"\u0121": "g",
"\u0123": "g",
"\u0124": "H",
"\u0126": "H",
"\u0125": "h",
"\u0127": "h",
"\u0128": "I",
"\u012a": "I",
"\u012c": "I",
"\u012e": "I",
"\u0130": "I",
"\u0129": "i",
"\u012b": "i",
"\u012d": "i",
"\u012f": "i",
"\u0131": "i",
"\u0134": "J",
"\u0135": "j",
"\u0136": "K",
"\u0137": "k",
"\u0138": "k",
"\u0139": "L",
"\u013b": "L",
"\u013d": "L",
"\u013f": "L",
"\u0141": "L",
"\u013a": "l",
"\u013c": "l",
"\u013e": "l",
"\u0140": "l",
"\u0142": "l",
"\u0143": "N",
"\u0145": "N",
"\u0147": "N",
"\u014a": "N",
"\u0144": "n",
"\u0146": "n",
"\u0148": "n",
"\u014b": "n",
"\u014c": "O",
"\u014e": "O",
"\u0150": "O",
"\u014d": "o",
"\u014f": "o",
"\u0151": "o",
"\u0154": "R",
"\u0156": "R",
"\u0158": "R",
"\u0155": "r",
"\u0157": "r",
"\u0159": "r",
"\u015a": "S",
"\u015c": "S",
"\u015e": "S",
"\u0160": "S",
"\u015b": "s",
"\u015d": "s",
"\u015f": "s",
"\u0161": "s",
"\u0162": "T",
"\u0164": "T",
"\u0166": "T",
"\u0163": "t",
"\u0165": "t",
"\u0167": "t",
"\u0168": "U",
"\u016a": "U",
"\u016c": "U",
"\u016e": "U",
"\u0170": "U",
"\u0172": "U",
"\u0169": "u",
"\u016b": "u",
"\u016d": "u",
"\u016f": "u",
"\u0171": "u",
"\u0173": "u",
"\u0174": "W",
"\u0175": "w",
"\u0176": "Y",
"\u0177": "y",
"\u0178": "Y",
"\u0179": "Z",
"\u017b": "Z",
"\u017d": "Z",
"\u017a": "z",
"\u017c": "z",
"\u017e": "z",
"\u0132": "IJ",
"\u0133": "ij",
"\u0152": "Oe",
"\u0153": "oe",
"\u0149": "'n",
"\u017f": "s"
})
, an = Kt({
"&": "&amp;",
"<": "&lt;",
">": "&gt;",
'"': "&quot;",
"'": "&#39;"
});
function on(e) {
return "\\" + ut[e]
}
function ln(e) {
return it.test(e)
}
function cn(e) {
var t = -1
, n = Array(e.size);
return e.forEach((function(e, r) {
n[++t] = [r, e]
}
)),
n
}
function un(e, t) {
return function(n) {
return e(t(n))
}
}
function dn(e, t) {
for (var n = -1, r = e.length, i = 0, s = []; ++n < r; ) {
var a = e[n];
a !== t && a !== o || (e[n] = o,
s[i++] = n)
}
return s
}
function hn(e) {
var t = -1
, n = Array(e.size);
return e.forEach((function(e) {
n[++t] = e
}
)),
n
}
function pn(e) {
var t = -1
, n = Array(e.size);
return e.forEach((function(e) {
n[++t] = [e, e]
}
)),
n
}
function fn(e) {
return ln(e) ? function(e) {
var t = nt.lastIndex = 0;
for (; nt.test(e); )
++t;
return t
}(e) : Ut(e)
}
function mn(e) {
return ln(e) ? function(e) {
return e.match(nt) || []
}(e) : function(e) {
return e.split("")
}(e)
}
function gn(e) {
for (var t = e.length; t-- && oe.test(e.charAt(t)); )
;
return t
}
var vn = Kt({
"&amp;": "&",
"&lt;": "<",
"&gt;": ">",
"&quot;": '"',
"&#39;": "'"
});
var yn = function e(t) {
var n = (t = null == t ? mt : yn.defaults(mt.Object(), t, yn.pick(mt, at))).Array
, r = t.Date
, oe = t.Error
, Ae = t.Function
, Me = t.Math
, Ce = t.Object
, Ee = t.RegExp
, Te = t.String
, Re = t.TypeError
, Be = n.prototype
, Pe = Ae.prototype
, ke = Ce.prototype
, Le = t["__core-js_shared__"]
, Ie = Pe.toString
, Ne = ke.hasOwnProperty
, De = 0
, je = function() {
var e = /[^.]+$/.exec(Le && Le.keys && Le.keys.IE_PROTO || "");
return e ? "Symbol(src)_1." + e : ""
}()
, Fe = ke.toString
, Oe = Ie.call(Ce)
, Ue = mt._
, ze = Ee("^" + Ie.call(Ne).replace(ie, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$")
, Ge = yt ? t.Buffer : i
, He = t.Symbol
, Ve = t.Uint8Array
, We = Ge ? Ge.allocUnsafe : i
, Je = un(Ce.getPrototypeOf, Ce)
, Xe = Ce.create
, Ke = ke.propertyIsEnumerable
, qe = Be.splice
, Ye = He ? He.isConcatSpreadable : i
, Qe = He ? He.iterator : i
, Ze = He ? He.toStringTag : i
, $e = function() {
try {
var e = ds(Ce, "defineProperty");
return e({}, "", {}),
e
} catch (t) {}
}()
, nt = t.clearTimeout !== mt.clearTimeout && t.clearTimeout
, it = r && r.now !== mt.Date.now && r.now
, ut = t.setTimeout !== mt.setTimeout && t.setTimeout
, pt = Me.ceil
, ft = Me.floor
, gt = Ce.getOwnPropertySymbols
, vt = Ge ? Ge.isBuffer : i
, xt = t.isFinite
, bt = Be.join
, Ut = un(Ce.keys, Ce)
, Kt = Me.max
, xn = Me.min
, bn = r.now
, _n = t.parseInt
, wn = Me.random
, Sn = Be.reverse
, An = ds(t, "DataView")
, Mn = ds(t, "Map")
, Cn = ds(t, "Promise")
, En = ds(t, "Set")
, Tn = ds(t, "WeakMap")
, Rn = ds(Ce, "create")
, Bn = Tn && new Tn
, Pn = {}
, kn = js(An)
, Ln = js(Mn)
, In = js(Cn)
, Nn = js(En)
, Dn = js(Tn)
, jn = He ? He.prototype : i
, Fn = jn ? jn.valueOf : i
, On = jn ? jn.toString : i;
function Un(e) {
if (eo(e) && !Ha(e) && !(e instanceof Vn)) {
if (e instanceof Hn)
return e;
if (Ne.call(e, "__wrapped__"))
return Fs(e)
}
return new Hn(e)
}
var zn = function() {
function e() {}
return function(t) {
if (!$a(t))
return {};
if (Xe)
return Xe(t);
e.prototype = t;
var n = new e;
return e.prototype = i,
n
}
}();
function Gn() {}
function Hn(e, t) {
this.__wrapped__ = e,
this.__actions__ = [],
this.__chain__ = !!t,
this.__index__ = 0,
this.__values__ = i
}
function Vn(e) {
this.__wrapped__ = e,
this.__actions__ = [],
this.__dir__ = 1,
this.__filtered__ = !1,
this.__iteratees__ = [],
this.__takeCount__ = g,
this.__views__ = []
}
function Wn(e) {
var t = -1
, n = null == e ? 0 : e.length;
for (this.clear(); ++t < n; ) {
var r = e[t];
this.set(r[0], r[1])
}
}
function Jn(e) {
var t = -1
, n = null == e ? 0 : e.length;
for (this.clear(); ++t < n; ) {
var r = e[t];
this.set(r[0], r[1])
}
}
function Xn(e) {
var t = -1
, n = null == e ? 0 : e.length;
for (this.clear(); ++t < n; ) {
var r = e[t];
this.set(r[0], r[1])
}
}
function Kn(e) {
var t = -1
, n = null == e ? 0 : e.length;
for (this.__data__ = new Xn; ++t < n; )
this.add(e[t])
}
function qn(e) {
var t = this.__data__ = new Jn(e);
this.size = t.size
}
function Yn(e, t) {
var n = Ha(e)
, r = !n && Ga(e)
, i = !n && !r && Xa(e)
, s = !n && !r && !i && lo(e)
, a = n || r || i || s
, o = a ? Qt(e.length, Te) : []
, l = o.length;
for (var c in e)
!t && !Ne.call(e, c) || a && ("length" == c || i && ("offset" == c || "parent" == c) || s && ("buffer" == c || "byteLength" == c || "byteOffset" == c) || ys(c, l)) || o.push(c);
return o
}
function Qn(e) {
var t = e.length;
return t ? e[Kr(0, t - 1)] : i
}
function Zn(e, t) {
return Is(Ri(e), or(t, 0, e.length))
}
function $n(e) {
return Is(Ri(e))
}
function er(e, t, n) {
(n !== i && !Oa(e[t], n) || n === i && !(t in e)) && sr(e, t, n)
}
function tr(e, t, n) {
var r = e[t];
Ne.call(e, t) && Oa(r, n) && (n !== i || t in e) || sr(e, t, n)
}
function nr(e, t) {
for (var n = e.length; n--; )
if (Oa(e[n][0], t))
return n;
return -1
}
function rr(e, t, n, r) {
return hr(e, (function(e, i, s) {
t(r, e, n(e), s)
}
)),
r
}
function ir(e, t) {
return e && Bi(t, Po(t), e)
}
function sr(e, t, n) {
"__proto__" == t && $e ? $e(e, t, {
configurable: !0,
enumerable: !0,
value: n,
writable: !0
}) : e[t] = n
}
function ar(e, t) {
for (var r = -1, s = t.length, a = n(s), o = null == e; ++r < s; )
a[r] = o ? i : Co(e, t[r]);
return a
}
function or(e, t, n) {
return e === e && (n !== i && (e = e <= n ? e : n),
t !== i && (e = e >= t ? e : t)),
e
}
function lr(e, t, n, r, s, a) {
var o, l = 1 & t, c = 2 & t, u = 4 & t;
if (n && (o = s ? n(e, r, s, a) : n(e)),
o !== i)
return o;
if (!$a(e))
return e;
var d = Ha(e);
if (d) {
if (o = function(e) {
var t = e.length
, n = new e.constructor(t);
t && "string" == typeof e[0] && Ne.call(e, "index") && (n.index = e.index,
n.input = e.input);
return n
}(e),
!l)
return Ri(e, o)
} else {
var h = fs(e)
, p = h == S || h == A;
if (Xa(e))
return Si(e, l);
if (h == E || h == y || p && !s) {
if (o = c || p ? {} : gs(e),
!l)
return c ? function(e, t) {
return Bi(e, ps(e), t)
}(e, function(e, t) {
return e && Bi(t, ko(t), e)
}(o, e)) : function(e, t) {
return Bi(e, hs(e), t)
}(e, ir(o, e))
} else {
if (!ct[h])
return s ? e : {};
o = function(e, t, n) {
var r = e.constructor;
switch (t) {
case I:
return Ai(e);
case b:
case _:
return new r(+e);
case N:
return function(e, t) {
var n = t ? Ai(e.buffer) : e.buffer;
return new e.constructor(n,e.byteOffset,e.byteLength)
}(e, n);
case D:
case j:
case F:
case O:
case U:
case z:
case G:
case H:
case V:
return Mi(e, n);
case M:
return new r;
case C:
case P:
return new r(e);
case R:
return function(e) {
var t = new e.constructor(e.source,me.exec(e));
return t.lastIndex = e.lastIndex,
t
}(e);
case B:
return new r;
case k:
return i = e,
Fn ? Ce(Fn.call(i)) : {}
}
var i
}(e, h, l)
}
}
a || (a = new qn);
var f = a.get(e);
if (f)
return f;
a.set(e, o),
so(e) ? e.forEach((function(r) {
o.add(lr(r, t, n, r, e, a))
}
)) : to(e) && e.forEach((function(r, i) {
o.set(i, lr(r, t, n, i, e, a))
}
));
var m = d ? i : (u ? c ? is : rs : c ? ko : Po)(e);
return Rt(m || e, (function(r, i) {
m && (r = e[i = r]),
tr(o, i, lr(r, t, n, i, e, a))
}
)),
o
}
function cr(e, t, n) {
var r = n.length;
if (null == e)
return !r;
for (e = Ce(e); r--; ) {
var s = n[r]
, a = t[s]
, o = e[s];
if (o === i && !(s in e) || !a(o))
return !1
}
return !0
}
function ur(e, t, n) {
if ("function" != typeof e)
throw new Re(s);
return Bs((function() {
e.apply(i, n)
}
), t)
}
function dr(e, t, n, r) {
var i = -1
, s = Lt
, a = !0
, o = e.length
, l = []
, c = t.length;
if (!o)
return l;
n && (t = Nt(t, $t(n))),
r ? (s = It,
a = !1) : t.length >= 200 && (s = tn,
a = !1,
t = new Kn(t));
e: for (; ++i < o; ) {
var u = e[i]
, d = null == n ? u : n(u);
if (u = r || 0 !== u ? u : 0,
a && d === d) {
for (var h = c; h--; )
if (t[h] === d)
continue e;
l.push(u)
} else
s(t, d, r) || l.push(u)
}
return l
}
Un.templateSettings = {
escape: Z,
evaluate: $,
interpolate: ee,
variable: "",
imports: {
_: Un
}
},
Un.prototype = Gn.prototype,
Un.prototype.constructor = Un,
Hn.prototype = zn(Gn.prototype),
Hn.prototype.constructor = Hn,
Vn.prototype = zn(Gn.prototype),
Vn.prototype.constructor = Vn,
Wn.prototype.clear = function() {
this.__data__ = Rn ? Rn(null) : {},
this.size = 0
}
,
Wn.prototype.delete = function(e) {
var t = this.has(e) && delete this.__data__[e];
return this.size -= t ? 1 : 0,
t
}
,
Wn.prototype.get = function(e) {
var t = this.__data__;
if (Rn) {
var n = t[e];
return n === a ? i : n
}
return Ne.call(t, e) ? t[e] : i
}
,
Wn.prototype.has = function(e) {
var t = this.__data__;
return Rn ? t[e] !== i : Ne.call(t, e)
}
,
Wn.prototype.set = function(e, t) {
var n = this.__data__;
return this.size += this.has(e) ? 0 : 1,
n[e] = Rn && t === i ? a : t,
this
}
,
Jn.prototype.clear = function() {
this.__data__ = [],
this.size = 0
}
,
Jn.prototype.delete = function(e) {
var t = this.__data__
, n = nr(t, e);
return !(n < 0) && (n == t.length - 1 ? t.pop() : qe.call(t, n, 1),
--this.size,
!0)
}
,
Jn.prototype.get = function(e) {
var t = this.__data__
, n = nr(t, e);
return n < 0 ? i : t[n][1]
}
,
Jn.prototype.has = function(e) {
return nr(this.__data__, e) > -1
}
,
Jn.prototype.set = function(e, t) {
var n = this.__data__
, r = nr(n, e);
return r < 0 ? (++this.size,
n.push([e, t])) : n[r][1] = t,
this
}
,
Xn.prototype.clear = function() {
this.size = 0,
this.__data__ = {
hash: new Wn,
map: new (Mn || Jn),
string: new Wn
}
}
,
Xn.prototype.delete = function(e) {
var t = cs(this, e).delete(e);
return this.size -= t ? 1 : 0,
t
}
,
Xn.prototype.get = function(e) {
return cs(this, e).get(e)
}
,
Xn.prototype.has = function(e) {
return cs(this, e).has(e)
}
,
Xn.prototype.set = function(e, t) {
var n = cs(this, e)
, r = n.size;
return n.set(e, t),
this.size += n.size == r ? 0 : 1,
this
}
,
Kn.prototype.add = Kn.prototype.push = function(e) {
return this.__data__.set(e, a),
this
}
,
Kn.prototype.has = function(e) {
return this.__data__.has(e)
}
,
qn.prototype.clear = function() {
this.__data__ = new Jn,
this.size = 0
}
,
qn.prototype.delete = function(e) {
var t = this.__data__
, n = t.delete(e);
return this.size = t.size,
n
}
,
qn.prototype.get = function(e) {
return this.__data__.get(e)
}
,
qn.prototype.has = function(e) {
return this.__data__.has(e)
}
,
qn.prototype.set = function(e, t) {
var n = this.__data__;
if (n instanceof Jn) {
var r = n.__data__;
if (!Mn || r.length < 199)
return r.push([e, t]),
this.size = ++n.size,
this;
n = this.__data__ = new Xn(r)
}
return n.set(e, t),
this.size = n.size,
this
}
;
var hr = Li(br)
, pr = Li(_r, !0);
function fr(e, t) {
var n = !0;
return hr(e, (function(e, r, i) {
return n = !!t(e, r, i)
}
)),
n
}
function mr(e, t, n) {
for (var r = -1, s = e.length; ++r < s; ) {
var a = e[r]
, o = t(a);
if (null != o && (l === i ? o === o && !oo(o) : n(o, l)))
var l = o
, c = a
}
return c
}
function gr(e, t) {
var n = [];
return hr(e, (function(e, r, i) {
t(e, r, i) && n.push(e)
}
)),
n
}
function vr(e, t, n, r, i) {
var s = -1
, a = e.length;
for (n || (n = vs),
i || (i = []); ++s < a; ) {
var o = e[s];
t > 0 && n(o) ? t > 1 ? vr(o, t - 1, n, r, i) : Dt(i, o) : r || (i[i.length] = o)
}
return i
}
var yr = Ii()
, xr = Ii(!0);
function br(e, t) {
return e && yr(e, t, Po)
}
function _r(e, t) {
return e && xr(e, t, Po)
}
function wr(e, t) {
return kt(t, (function(t) {
return Ya(e[t])
}
))
}
function Sr(e, t) {
for (var n = 0, r = (t = xi(t, e)).length; null != e && n < r; )
e = e[Ds(t[n++])];
return n && n == r ? e : i
}
function Ar(e, t, n) {
var r = t(e);
return Ha(e) ? r : Dt(r, n(e))
}
function Mr(e) {
return null == e ? e === i ? "[object Undefined]" : "[object Null]" : Ze && Ze in Ce(e) ? function(e) {
var t = Ne.call(e, Ze)
, n = e[Ze];
try {
e[Ze] = i;
var r = !0
} catch (a) {}
var s = Fe.call(e);
r && (t ? e[Ze] = n : delete e[Ze]);
return s
}(e) : function(e) {
return Fe.call(e)
}(e)
}
function Cr(e, t) {
return e > t
}
function Er(e, t) {
return null != e && Ne.call(e, t)
}
function Tr(e, t) {
return null != e && t in Ce(e)
}
function Rr(e, t, r) {
for (var s = r ? It : Lt, a = e[0].length, o = e.length, l = o, c = n(o), u = 1 / 0, d = []; l--; ) {
var h = e[l];
l && t && (h = Nt(h, $t(t))),
u = xn(h.length, u),
c[l] = !r && (t || a >= 120 && h.length >= 120) ? new Kn(l && h) : i
}
h = e[0];
var p = -1
, f = c[0];
e: for (; ++p < a && d.length < u; ) {
var m = h[p]
, g = t ? t(m) : m;
if (m = r || 0 !== m ? m : 0,
!(f ? tn(f, g) : s(d, g, r))) {
for (l = o; --l; ) {
var v = c[l];
if (!(v ? tn(v, g) : s(e[l], g, r)))
continue e
}
f && f.push(g),
d.push(m)
}
}
return d
}
function Br(e, t, n) {
var r = null == (e = Es(e, t = xi(t, e))) ? e : e[Ds(qs(t))];
return null == r ? i : Et(r, e, n)
}
function Pr(e) {
return eo(e) && Mr(e) == y
}
function kr(e, t, n, r, s) {
return e === t || (null == e || null == t || !eo(e) && !eo(t) ? e !== e && t !== t : function(e, t, n, r, s, a) {
var o = Ha(e)
, l = Ha(t)
, c = o ? x : fs(e)
, u = l ? x : fs(t)
, d = (c = c == y ? E : c) == E
, h = (u = u == y ? E : u) == E
, p = c == u;
if (p && Xa(e)) {
if (!Xa(t))
return !1;
o = !0,
d = !1
}
if (p && !d)
return a || (a = new qn),
o || lo(e) ? ts(e, t, n, r, s, a) : function(e, t, n, r, i, s, a) {
switch (n) {
case N:
if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset)
return !1;
e = e.buffer,
t = t.buffer;
case I:
return !(e.byteLength != t.byteLength || !s(new Ve(e), new Ve(t)));
case b:
case _:
case C:
return Oa(+e, +t);
case w:
return e.name == t.name && e.message == t.message;
case R:
case P:
return e == t + "";
case M:
var o = cn;
case B:
var l = 1 & r;
if (o || (o = hn),
e.size != t.size && !l)
return !1;
var c = a.get(e);
if (c)
return c == t;
r |= 2,
a.set(e, t);
var u = ts(o(e), o(t), r, i, s, a);
return a.delete(e),
u;
case k:
if (Fn)
return Fn.call(e) == Fn.call(t)
}
return !1
}(e, t, c, n, r, s, a);
if (!(1 & n)) {
var f = d && Ne.call(e, "__wrapped__")
, m = h && Ne.call(t, "__wrapped__");
if (f || m) {
var g = f ? e.value() : e
, v = m ? t.value() : t;
return a || (a = new qn),
s(g, v, n, r, a)
}
}
if (!p)
return !1;
return a || (a = new qn),
function(e, t, n, r, s, a) {
var o = 1 & n
, l = rs(e)
, c = l.length
, u = rs(t)
, d = u.length;
if (c != d && !o)
return !1;
var h = c;
for (; h--; ) {
var p = l[h];
if (!(o ? p in t : Ne.call(t, p)))
return !1
}
var f = a.get(e)
, m = a.get(t);
if (f && m)
return f == t && m == e;
var g = !0;
a.set(e, t),
a.set(t, e);
var v = o;
for (; ++h < c; ) {
var y = e[p = l[h]]
, x = t[p];
if (r)
var b = o ? r(x, y, p, t, e, a) : r(y, x, p, e, t, a);
if (!(b === i ? y === x || s(y, x, n, r, a) : b)) {
g = !1;
break
}
v || (v = "constructor" == p)
}
if (g && !v) {
var _ = e.constructor
, w = t.constructor;
_ == w || !("constructor"in e) || !("constructor"in t) || "function" == typeof _ && _ instanceof _ && "function" == typeof w && w instanceof w || (g = !1)
}
return a.delete(e),
a.delete(t),
g
}(e, t, n, r, s, a)
}(e, t, n, r, kr, s))
}
function Lr(e, t, n, r) {
var s = n.length
, a = s
, o = !r;
if (null == e)
return !a;
for (e = Ce(e); s--; ) {
var l = n[s];
if (o && l[2] ? l[1] !== e[l[0]] : !(l[0]in e))
return !1
}
for (; ++s < a; ) {
var c = (l = n[s])[0]
, u = e[c]
, d = l[1];
if (o && l[2]) {
if (u === i && !(c in e))
return !1
} else {
var h = new qn;
if (r)
var p = r(u, d, c, e, t, h);
if (!(p === i ? kr(d, u, 3, r, h) : p))
return !1
}
}
return !0
}
function Ir(e) {
return !(!$a(e) || (t = e,
je && je in t)) && (Ya(e) ? ze : ye).test(js(e));
var t
}
function Nr(e) {
return "function" == typeof e ? e : null == e ? rl : "object" == typeof e ? Ha(e) ? zr(e[0], e[1]) : Ur(e) : hl(e)
}
function Dr(e) {
if (!Ss(e))
return Ut(e);
var t = [];
for (var n in Ce(e))
Ne.call(e, n) && "constructor" != n && t.push(n);
return t
}
function jr(e) {
if (!$a(e))
return function(e) {
var t = [];
if (null != e)
for (var n in Ce(e))
t.push(n);
return t
}(e);
var t = Ss(e)
, n = [];
for (var r in e)
("constructor" != r || !t && Ne.call(e, r)) && n.push(r);
return n
}
function Fr(e, t) {
return e < t
}
function Or(e, t) {
var r = -1
, i = Wa(e) ? n(e.length) : [];
return hr(e, (function(e, n, s) {
i[++r] = t(e, n, s)
}
)),
i
}
function Ur(e) {
var t = us(e);
return 1 == t.length && t[0][2] ? Ms(t[0][0], t[0][1]) : function(n) {
return n === e || Lr(n, e, t)
}
}
function zr(e, t) {
return bs(e) && As(t) ? Ms(Ds(e), t) : function(n) {
var r = Co(n, e);
return r === i && r === t ? Eo(n, e) : kr(t, r, 3)
}
}
function Gr(e, t, n, r, s) {
e !== t && yr(t, (function(a, o) {
if (s || (s = new qn),
$a(a))
!function(e, t, n, r, s, a, o) {
var l = Ts(e, n)
, c = Ts(t, n)
, u = o.get(c);
if (u)
return void er(e, n, u);
var d = a ? a(l, c, n + "", e, t, o) : i
, h = d === i;
if (h) {
var p = Ha(c)
, f = !p && Xa(c)
, m = !p && !f && lo(c);
d = c,
p || f || m ? Ha(l) ? d = l : Ja(l) ? d = Ri(l) : f ? (h = !1,
d = Si(c, !0)) : m ? (h = !1,
d = Mi(c, !0)) : d = [] : ro(c) || Ga(c) ? (d = l,
Ga(l) ? d = vo(l) : $a(l) && !Ya(l) || (d = gs(c))) : h = !1
}
h && (o.set(c, d),
s(d, c, r, a, o),
o.delete(c));
er(e, n, d)
}(e, t, o, n, Gr, r, s);
else {
var l = r ? r(Ts(e, o), a, o + "", e, t, s) : i;
l === i && (l = a),
er(e, o, l)
}
}
), ko)
}
function Hr(e, t) {
var n = e.length;
if (n)
return ys(t += t < 0 ? n : 0, n) ? e[t] : i
}
function Vr(e, t, n) {
t = t.length ? Nt(t, (function(e) {
return Ha(e) ? function(t) {
return Sr(t, 1 === e.length ? e[0] : e)
}
: e
}
)) : [rl];
var r = -1;
t = Nt(t, $t(ls()));
var i = Or(e, (function(e, n, i) {
var s = Nt(t, (function(t) {
return t(e)
}
));
return {
criteria: s,
index: ++r,
value: e
}
}
));
return function(e, t) {
var n = e.length;
for (e.sort(t); n--; )
e[n] = e[n].value;
return e
}(i, (function(e, t) {
return function(e, t, n) {
var r = -1
, i = e.criteria
, s = t.criteria
, a = i.length
, o = n.length;
for (; ++r < a; ) {
var l = Ci(i[r], s[r]);
if (l)
return r >= o ? l : l * ("desc" == n[r] ? -1 : 1)
}
return e.index - t.index
}(e, t, n)
}
))
}
function Wr(e, t, n) {
for (var r = -1, i = t.length, s = {}; ++r < i; ) {
var a = t[r]
, o = Sr(e, a);
n(o, a) && $r(s, xi(a, e), o)
}
return s
}
function Jr(e, t, n, r) {
var i = r ? Vt : Ht
, s = -1
, a = t.length
, o = e;
for (e === t && (t = Ri(t)),
n && (o = Nt(e, $t(n))); ++s < a; )
for (var l = 0, c = t[s], u = n ? n(c) : c; (l = i(o, u, l, r)) > -1; )
o !== e && qe.call(o, l, 1),
qe.call(e, l, 1);
return e
}
function Xr(e, t) {
for (var n = e ? t.length : 0, r = n - 1; n--; ) {
var i = t[n];
if (n == r || i !== s) {
var s = i;
ys(i) ? qe.call(e, i, 1) : di(e, i)
}
}
return e
}
function Kr(e, t) {
return e + ft(wn() * (t - e + 1))
}
function qr(e, t) {
var n = "";
if (!e || t < 1 || t > f)
return n;
do {
t % 2 && (n += e),
(t = ft(t / 2)) && (e += e)
} while (t);
return n
}
function Yr(e, t) {
return Ps(Cs(e, t, rl), e + "")
}
function Qr(e) {
return Qn(Uo(e))
}
function Zr(e, t) {
var n = Uo(e);
return Is(n, or(t, 0, n.length))
}
function $r(e, t, n, r) {
if (!$a(e))
return e;
for (var s = -1, a = (t = xi(t, e)).length, o = a - 1, l = e; null != l && ++s < a; ) {
var c = Ds(t[s])
, u = n;
if ("__proto__" === c || "constructor" === c || "prototype" === c)
return e;
if (s != o) {
var d = l[c];
(u = r ? r(d, c, l) : i) === i && (u = $a(d) ? d : ys(t[s + 1]) ? [] : {})
}
tr(l, c, u),
l = l[c]
}
return e
}
var ei = Bn ? function(e, t) {
return Bn.set(e, t),
e
}
: rl
, ti = $e ? function(e, t) {
return $e(e, "toString", {
configurable: !0,
enumerable: !1,
value: el(t),
writable: !0
})
}
: rl;
function ni(e) {
return Is(Uo(e))
}
function ri(e, t, r) {
var i = -1
, s = e.length;
t < 0 && (t = -t > s ? 0 : s + t),
(r = r > s ? s : r) < 0 && (r += s),
s = t > r ? 0 : r - t >>> 0,
t >>>= 0;
for (var a = n(s); ++i < s; )
a[i] = e[i + t];
return a
}
function ii(e, t) {
var n;
return hr(e, (function(e, r, i) {
return !(n = t(e, r, i))
}
)),
!!n
}
function si(e, t, n) {
var r = 0
, i = null == e ? r : e.length;
if ("number" == typeof t && t === t && i <= 2147483647) {
for (; r < i; ) {
var s = r + i >>> 1
, a = e[s];
null !== a && !oo(a) && (n ? a <= t : a < t) ? r = s + 1 : i = s
}
return i
}
return ai(e, t, rl, n)
}
function ai(e, t, n, r) {
var s = 0
, a = null == e ? 0 : e.length;
if (0 === a)
return 0;
for (var o = (t = n(t)) !== t, l = null === t, c = oo(t), u = t === i; s < a; ) {
var d = ft((s + a) / 2)
, h = n(e[d])
, p = h !== i
, f = null === h
, m = h === h
, g = oo(h);
if (o)
var v = r || m;
else
v = u ? m && (r || p) : l ? m && p && (r || !f) : c ? m && p && !f && (r || !g) : !f && !g && (r ? h <= t : h < t);
v ? s = d + 1 : a = d
}
return xn(a, 4294967294)
}
function oi(e, t) {
for (var n = -1, r = e.length, i = 0, s = []; ++n < r; ) {
var a = e[n]
, o = t ? t(a) : a;
if (!n || !Oa(o, l)) {
var l = o;
s[i++] = 0 === a ? 0 : a
}
}
return s
}
function li(e) {
return "number" == typeof e ? e : oo(e) ? m : +e
}
function ci(e) {
if ("string" == typeof e)
return e;
if (Ha(e))
return Nt(e, ci) + "";
if (oo(e))
return On ? On.call(e) : "";
var t = e + "";
return "0" == t && 1 / e == -1 / 0 ? "-0" : t
}
function ui(e, t, n) {
var r = -1
, i = Lt
, s = e.length
, a = !0
, o = []
, l = o;
if (n)
a = !1,
i = It;
else if (s >= 200) {
var c = t ? null : qi(e);
if (c)
return hn(c);
a = !1,
i = tn,
l = new Kn
} else
l = t ? [] : o;
e: for (; ++r < s; ) {
var u = e[r]
, d = t ? t(u) : u;
if (u = n || 0 !== u ? u : 0,
a && d === d) {
for (var h = l.length; h--; )
if (l[h] === d)
continue e;
t && l.push(d),
o.push(u)
} else
i(l, d, n) || (l !== o && l.push(d),
o.push(u))
}
return o
}
function di(e, t) {
return null == (e = Es(e, t = xi(t, e))) || delete e[Ds(qs(t))]
}
function hi(e, t, n, r) {
return $r(e, t, n(Sr(e, t)), r)
}
function pi(e, t, n, r) {
for (var i = e.length, s = r ? i : -1; (r ? s-- : ++s < i) && t(e[s], s, e); )
;
return n ? ri(e, r ? 0 : s, r ? s + 1 : i) : ri(e, r ? s + 1 : 0, r ? i : s)
}
function fi(e, t) {
var n = e;
return n instanceof Vn && (n = n.value()),
jt(t, (function(e, t) {
return t.func.apply(t.thisArg, Dt([e], t.args))
}
), n)
}
function mi(e, t, r) {
var i = e.length;
if (i < 2)
return i ? ui(e[0]) : [];
for (var s = -1, a = n(i); ++s < i; )
for (var o = e[s], l = -1; ++l < i; )
l != s && (a[s] = dr(a[s] || o, e[l], t, r));
return ui(vr(a, 1), t, r)
}
function gi(e, t, n) {
for (var r = -1, s = e.length, a = t.length, o = {}; ++r < s; ) {
var l = r < a ? t[r] : i;
n(o, e[r], l)
}
return o
}
function vi(e) {
return Ja(e) ? e : []
}
function yi(e) {
return "function" == typeof e ? e : rl
}
function xi(e, t) {
return Ha(e) ? e : bs(e, t) ? [e] : Ns(yo(e))
}
var bi = Yr;
function _i(e, t, n) {
var r = e.length;
return n = n === i ? r : n,
!t && n >= r ? e : ri(e, t, n)
}
var wi = nt || function(e) {
return mt.clearTimeout(e)
}
;
function Si(e, t) {
if (t)
return e.slice();
var n = e.length
, r = We ? We(n) : new e.constructor(n);
return e.copy(r),
r
}
function Ai(e) {
var t = new e.constructor(e.byteLength);
return new Ve(t).set(new Ve(e)),
t
}
function Mi(e, t) {
var n = t ? Ai(e.buffer) : e.buffer;
return new e.constructor(n,e.byteOffset,e.length)
}
function Ci(e, t) {
if (e !== t) {
var n = e !== i
, r = null === e
, s = e === e
, a = oo(e)
, o = t !== i
, l = null === t
, c = t === t
, u = oo(t);
if (!l && !u && !a && e > t || a && o && c && !l && !u || r && o && c || !n && c || !s)
return 1;
if (!r && !a && !u && e < t || u && n && s && !r && !a || l && n && s || !o && s || !c)
return -1
}
return 0
}
function Ei(e, t, r, i) {
for (var s = -1, a = e.length, o = r.length, l = -1, c = t.length, u = Kt(a - o, 0), d = n(c + u), h = !i; ++l < c; )
d[l] = t[l];
for (; ++s < o; )
(h || s < a) && (d[r[s]] = e[s]);
for (; u--; )
d[l++] = e[s++];
return d
}
function Ti(e, t, r, i) {
for (var s = -1, a = e.length, o = -1, l = r.length, c = -1, u = t.length, d = Kt(a - l, 0), h = n(d + u), p = !i; ++s < d; )
h[s] = e[s];
for (var f = s; ++c < u; )
h[f + c] = t[c];
for (; ++o < l; )
(p || s < a) && (h[f + r[o]] = e[s++]);
return h
}
function Ri(e, t) {
var r = -1
, i = e.length;
for (t || (t = n(i)); ++r < i; )
t[r] = e[r];
return t
}
function Bi(e, t, n, r) {
var s = !n;
n || (n = {});
for (var a = -1, o = t.length; ++a < o; ) {
var l = t[a]
, c = r ? r(n[l], e[l], l, n, e) : i;
c === i && (c = e[l]),
s ? sr(n, l, c) : tr(n, l, c)
}
return n
}
function Pi(e, t) {
return function(n, r) {
var i = Ha(n) ? Tt : rr
, s = t ? t() : {};
return i(n, e, ls(r, 2), s)
}
}
function ki(e) {
return Yr((function(t, n) {
var r = -1
, s = n.length
, a = s > 1 ? n[s - 1] : i
, o = s > 2 ? n[2] : i;
for (a = e.length > 3 && "function" == typeof a ? (s--,
a) : i,
o && xs(n[0], n[1], o) && (a = s < 3 ? i : a,
s = 1),
t = Ce(t); ++r < s; ) {
var l = n[r];
l && e(t, l, r, a)
}
return t
}
))
}
function Li(e, t) {
return function(n, r) {
if (null == n)
return n;
if (!Wa(n))
return e(n, r);
for (var i = n.length, s = t ? i : -1, a = Ce(n); (t ? s-- : ++s < i) && !1 !== r(a[s], s, a); )
;
return n
}
}
function Ii(e) {
return function(t, n, r) {
for (var i = -1, s = Ce(t), a = r(t), o = a.length; o--; ) {
var l = a[e ? o : ++i];
if (!1 === n(s[l], l, s))
break
}
return t
}
}
function Ni(e) {
return function(t) {
var n = ln(t = yo(t)) ? mn(t) : i
, r = n ? n[0] : t.charAt(0)
, s = n ? _i(n, 1).join("") : t.slice(1);
return r[e]() + s
}
}
function Di(e) {
return function(t) {
return jt(Qo(Ho(t).replace(et, "")), e, "")
}
}
function ji(e) {
return function() {
var t = arguments;
switch (t.length) {
case 0:
return new e;
case 1:
return new e(t[0]);
case 2:
return new e(t[0],t[1]);
case 3:
return new e(t[0],t[1],t[2]);
case 4:
return new e(t[0],t[1],t[2],t[3]);
case 5:
return new e(t[0],t[1],t[2],t[3],t[4]);
case 6:
return new e(t[0],t[1],t[2],t[3],t[4],t[5]);
case 7:
return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])
}
var n = zn(e.prototype)
, r = e.apply(n, t);
return $a(r) ? r : n
}
}
function Fi(e) {
return function(t, n, r) {
var s = Ce(t);
if (!Wa(t)) {
var a = ls(n, 3);
t = Po(t),
n = function(e) {
return a(s[e], e, s)
}
}
var o = e(t, n, r);
return o > -1 ? s[a ? t[o] : o] : i
}
}
function Oi(e) {
return ns((function(t) {
var n = t.length
, r = n
, a = Hn.prototype.thru;
for (e && t.reverse(); r--; ) {
var o = t[r];
if ("function" != typeof o)
throw new Re(s);
if (a && !l && "wrapper" == as(o))
var l = new Hn([],!0)
}
for (r = l ? r : n; ++r < n; ) {
var c = as(o = t[r])
, u = "wrapper" == c ? ss(o) : i;
l = u && _s(u[0]) && 424 == u[1] && !u[4].length && 1 == u[9] ? l[as(u[0])].apply(l, u[3]) : 1 == o.length && _s(o) ? l[c]() : l.thru(o)
}
return function() {
var e = arguments
, r = e[0];
if (l && 1 == e.length && Ha(r))
return l.plant(r).value();
for (var i = 0, s = n ? t[i].apply(this, e) : r; ++i < n; )
s = t[i].call(this, s);
return s
}
}
))
}
function Ui(e, t, r, s, a, o, l, c, u, h) {
var p = t & d
, f = 1 & t
, m = 2 & t
, g = 24 & t
, v = 512 & t
, y = m ? i : ji(e);
return function d() {
for (var x = arguments.length, b = n(x), _ = x; _--; )
b[_] = arguments[_];
if (g)
var w = os(d)
, S = function(e, t) {
for (var n = e.length, r = 0; n--; )
e[n] === t && ++r;
return r
}(b, w);
if (s && (b = Ei(b, s, a, g)),
o && (b = Ti(b, o, l, g)),
x -= S,
g && x < h) {
var A = dn(b, w);
return Xi(e, t, Ui, d.placeholder, r, b, A, c, u, h - x)
}
var M = f ? r : this
, C = m ? M[e] : e;
return x = b.length,
c ? b = function(e, t) {
var n = e.length
, r = xn(t.length, n)
, s = Ri(e);
for (; r--; ) {
var a = t[r];
e[r] = ys(a, n) ? s[a] : i
}
return e
}(b, c) : v && x > 1 && b.reverse(),
p && u < x && (b.length = u),
this && this !== mt && this instanceof d && (C = y || ji(C)),
C.apply(M, b)
}
}
function zi(e, t) {
return function(n, r) {
return function(e, t, n, r) {
return br(e, (function(e, i, s) {
t(r, n(e), i, s)
}
)),
r
}(n, e, t(r), {})
}
}
function Gi(e, t) {
return function(n, r) {
var s;
if (n === i && r === i)
return t;
if (n !== i && (s = n),
r !== i) {
if (s === i)
return r;
"string" == typeof n || "string" == typeof r ? (n = ci(n),
r = ci(r)) : (n = li(n),
r = li(r)),
s = e(n, r)
}
return s
}
}
function Hi(e) {
return ns((function(t) {
return t = Nt(t, $t(ls())),
Yr((function(n) {
var r = this;
return e(t, (function(e) {
return Et(e, r, n)
}
))
}
))
}
))
}
function Vi(e, t) {
var n = (t = t === i ? " " : ci(t)).length;
if (n < 2)
return n ? qr(t, e) : t;
var r = qr(t, pt(e / fn(t)));
return ln(t) ? _i(mn(r), 0, e).join("") : r.slice(0, e)
}
function Wi(e) {
return function(t, r, s) {
return s && "number" != typeof s && xs(t, r, s) && (r = s = i),
t = po(t),
r === i ? (r = t,
t = 0) : r = po(r),
function(e, t, r, i) {
for (var s = -1, a = Kt(pt((t - e) / (r || 1)), 0), o = n(a); a--; )
o[i ? a : ++s] = e,
e += r;
return o
}(t, r, s = s === i ? t < r ? 1 : -1 : po(s), e)
}
}
function Ji(e) {
return function(t, n) {
return "string" == typeof t && "string" == typeof n || (t = go(t),
n = go(n)),
e(t, n)
}
}
function Xi(e, t, n, r, s, a, o, l, d, h) {
var p = 8 & t;
t |= p ? c : u,
4 & (t &= ~(p ? u : c)) || (t &= -4);
var f = [e, t, s, p ? a : i, p ? o : i, p ? i : a, p ? i : o, l, d, h]
, m = n.apply(i, f);
return _s(e) && Rs(m, f),
m.placeholder = r,
ks(m, e, t)
}
function Ki(e) {
var t = Me[e];
return function(e, n) {
if (e = go(e),
(n = null == n ? 0 : xn(fo(n), 292)) && xt(e)) {
var r = (yo(e) + "e").split("e");
return +((r = (yo(t(r[0] + "e" + (+r[1] + n))) + "e").split("e"))[0] + "e" + (+r[1] - n))
}
return t(e)
}
}
var qi = En && 1 / hn(new En([, -0]))[1] == p ? function(e) {
return new En(e)
}
: ll;
function Yi(e) {
return function(t) {
var n = fs(t);
return n == M ? cn(t) : n == B ? pn(t) : function(e, t) {
return Nt(t, (function(t) {
return [t, e[t]]
}
))
}(t, e(t))
}
}
function Qi(e, t, r, a, p, f, m, g) {
var v = 2 & t;
if (!v && "function" != typeof e)
throw new Re(s);
var y = a ? a.length : 0;
if (y || (t &= -97,
a = p = i),
m = m === i ? m : Kt(fo(m), 0),
g = g === i ? g : fo(g),
y -= p ? p.length : 0,
t & u) {
var x = a
, b = p;
a = p = i
}
var _ = v ? i : ss(e)
, w = [e, t, r, a, p, x, b, f, m, g];
if (_ && function(e, t) {
var n = e[1]
, r = t[1]
, i = n | r
, s = i < 131
, a = r == d && 8 == n || r == d && n == h && e[7].length <= t[8] || 384 == r && t[7].length <= t[8] && 8 == n;
if (!s && !a)
return e;
1 & r && (e[2] = t[2],
i |= 1 & n ? 0 : 4);
var l = t[3];
if (l) {
var c = e[3];
e[3] = c ? Ei(c, l, t[4]) : l,
e[4] = c ? dn(e[3], o) : t[4]
}
(l = t[5]) && (c = e[5],
e[5] = c ? Ti(c, l, t[6]) : l,
e[6] = c ? dn(e[5], o) : t[6]);
(l = t[7]) && (e[7] = l);
r & d && (e[8] = null == e[8] ? t[8] : xn(e[8], t[8]));
null == e[9] && (e[9] = t[9]);
e[0] = t[0],
e[1] = i
}(w, _),
e = w[0],
t = w[1],
r = w[2],
a = w[3],
p = w[4],
!(g = w[9] = w[9] === i ? v ? 0 : e.length : Kt(w[9] - y, 0)) && 24 & t && (t &= -25),
t && 1 != t)
S = 8 == t || t == l ? function(e, t, r) {
var s = ji(e);
return function a() {
for (var o = arguments.length, l = n(o), c = o, u = os(a); c--; )
l[c] = arguments[c];
var d = o < 3 && l[0] !== u && l[o - 1] !== u ? [] : dn(l, u);
return (o -= d.length) < r ? Xi(e, t, Ui, a.placeholder, i, l, d, i, i, r - o) : Et(this && this !== mt && this instanceof a ? s : e, this, l)
}
}(e, t, g) : t != c && 33 != t || p.length ? Ui.apply(i, w) : function(e, t, r, i) {
var s = 1 & t
, a = ji(e);
return function t() {
for (var o = -1, l = arguments.length, c = -1, u = i.length, d = n(u + l), h = this && this !== mt && this instanceof t ? a : e; ++c < u; )
d[c] = i[c];
for (; l--; )
d[c++] = arguments[++o];
return Et(h, s ? r : this, d)
}
}(e, t, r, a);
else
var S = function(e, t, n) {
var r = 1 & t
, i = ji(e);
return function t() {
return (this && this !== mt && this instanceof t ? i : e).apply(r ? n : this, arguments)
}
}(e, t, r);
return ks((_ ? ei : Rs)(S, w), e, t)
}
function Zi(e, t, n, r) {
return e === i || Oa(e, ke[n]) && !Ne.call(r, n) ? t : e
}
function $i(e, t, n, r, s, a) {
return $a(e) && $a(t) && (a.set(t, e),
Gr(e, t, i, $i, a),
a.delete(t)),
e
}
function es(e) {
return ro(e) ? i : e
}
function ts(e, t, n, r, s, a) {
var o = 1 & n
, l = e.length
, c = t.length;
if (l != c && !(o && c > l))
return !1;
var u = a.get(e)
, d = a.get(t);
if (u && d)
return u == t && d == e;
var h = -1
, p = !0
, f = 2 & n ? new Kn : i;
for (a.set(e, t),
a.set(t, e); ++h < l; ) {
var m = e[h]
, g = t[h];
if (r)
var v = o ? r(g, m, h, t, e, a) : r(m, g, h, e, t, a);
if (v !== i) {
if (v)
continue;
p = !1;
break
}
if (f) {
if (!Ot(t, (function(e, t) {
if (!tn(f, t) && (m === e || s(m, e, n, r, a)))
return f.push(t)
}
))) {
p = !1;
break
}
} else if (m !== g && !s(m, g, n, r, a)) {
p = !1;
break
}
}
return a.delete(e),
a.delete(t),
p
}
function ns(e) {
return Ps(Cs(e, i, Vs), e + "")
}
function rs(e) {
return Ar(e, Po, hs)
}
function is(e) {
return Ar(e, ko, ps)
}
var ss = Bn ? function(e) {
return Bn.get(e)
}
: ll;
function as(e) {
for (var t = e.name + "", n = Pn[t], r = Ne.call(Pn, t) ? n.length : 0; r--; ) {
var i = n[r]
, s = i.func;
if (null == s || s == e)
return i.name
}
return t
}
function os(e) {
return (Ne.call(Un, "placeholder") ? Un : e).placeholder
}
function ls() {
var e = Un.iteratee || il;
return e = e === il ? Nr : e,
arguments.length ? e(arguments[0], arguments[1]) : e
}
function cs(e, t) {
var n = e.__data__;
return function(e) {
var t = typeof e;
return "string" == t || "number" == t || "symbol" == t || "boolean" == t ? "__proto__" !== e : null === e
}(t) ? n["string" == typeof t ? "string" : "hash"] : n.map
}
function us(e) {
for (var t = Po(e), n = t.length; n--; ) {
var r = t[n]
, i = e[r];
t[n] = [r, i, As(i)]
}
return t
}
function ds(e, t) {
var n = function(e, t) {
return null == e ? i : e[t]
}(e, t);
return Ir(n) ? n : i
}
var hs = gt ? function(e) {
return null == e ? [] : (e = Ce(e),
kt(gt(e), (function(t) {
return Ke.call(e, t)
}
)))
}
: ml
, ps = gt ? function(e) {
for (var t = []; e; )
Dt(t, hs(e)),
e = Je(e);
return t
}
: ml
, fs = Mr;
function ms(e, t, n) {
for (var r = -1, i = (t = xi(t, e)).length, s = !1; ++r < i; ) {
var a = Ds(t[r]);
if (!(s = null != e && n(e, a)))
break;
e = e[a]
}
return s || ++r != i ? s : !!(i = null == e ? 0 : e.length) && Za(i) && ys(a, i) && (Ha(e) || Ga(e))
}
function gs(e) {
return "function" != typeof e.constructor || Ss(e) ? {} : zn(Je(e))
}
function vs(e) {
return Ha(e) || Ga(e) || !!(Ye && e && e[Ye])
}
function ys(e, t) {
var n = typeof e;
return !!(t = null == t ? f : t) && ("number" == n || "symbol" != n && be.test(e)) && e > -1 && e % 1 == 0 && e < t
}
function xs(e, t, n) {
if (!$a(n))
return !1;
var r = typeof t;
return !!("number" == r ? Wa(n) && ys(t, n.length) : "string" == r && t in n) && Oa(n[t], e)
}
function bs(e, t) {
if (Ha(e))
return !1;
var n = typeof e;
return !("number" != n && "symbol" != n && "boolean" != n && null != e && !oo(e)) || (ne.test(e) || !te.test(e) || null != t && e in Ce(t))
}
function _s(e) {
var t = as(e)
, n = Un[t];
if ("function" != typeof n || !(t in Vn.prototype))
return !1;
if (e === n)
return !0;
var r = ss(n);
return !!r && e === r[0]
}
(An && fs(new An(new ArrayBuffer(1))) != N || Mn && fs(new Mn) != M || Cn && fs(Cn.resolve()) != T || En && fs(new En) != B || Tn && fs(new Tn) != L) && (fs = function(e) {
var t = Mr(e)
, n = t == E ? e.constructor : i
, r = n ? js(n) : "";
if (r)
switch (r) {
case kn:
return N;
case Ln:
return M;
case In:
return T;
case Nn:
return B;
case Dn:
return L
}
return t
}
);
var ws = Le ? Ya : gl;
function Ss(e) {
var t = e && e.constructor;
return e === ("function" == typeof t && t.prototype || ke)
}
function As(e) {
return e === e && !$a(e)
}
function Ms(e, t) {
return function(n) {
return null != n && (n[e] === t && (t !== i || e in Ce(n)))
}
}
function Cs(e, t, r) {
return t = Kt(t === i ? e.length - 1 : t, 0),
function() {
for (var i = arguments, s = -1, a = Kt(i.length - t, 0), o = n(a); ++s < a; )
o[s] = i[t + s];
s = -1;
for (var l = n(t + 1); ++s < t; )
l[s] = i[s];
return l[t] = r(o),
Et(e, this, l)
}
}
function Es(e, t) {
return t.length < 2 ? e : Sr(e, ri(t, 0, -1))
}
function Ts(e, t) {
if (("constructor" !== t || "function" !== typeof e[t]) && "__proto__" != t)
return e[t]
}
var Rs = Ls(ei)
, Bs = ut || function(e, t) {
return mt.setTimeout(e, t)
}
, Ps = Ls(ti);
function ks(e, t, n) {
var r = t + "";
return Ps(e, function(e, t) {
var n = t.length;
if (!n)
return e;
var r = n - 1;
return t[r] = (n > 1 ? "& " : "") + t[r],
t = t.join(n > 2 ? ", " : " "),
e.replace(le, "{\n/* [wrapped with " + t + "] */\n")
}(r, function(e, t) {
return Rt(v, (function(n) {
var r = "_." + n[0];
t & n[1] && !Lt(e, r) && e.push(r)
}
)),
e.sort()
}(function(e) {
var t = e.match(ce);
return t ? t[1].split(ue) : []
}(r), n)))
}
function Ls(e) {
var t = 0
, n = 0;
return function() {
var r = bn()
, s = 16 - (r - n);
if (n = r,
s > 0) {
if (++t >= 800)
return arguments[0]
} else
t = 0;
return e.apply(i, arguments)
}
}
function Is(e, t) {
var n = -1
, r = e.length
, s = r - 1;
for (t = t === i ? r : t; ++n < t; ) {
var a = Kr(n, s)
, o = e[a];
e[a] = e[n],
e[n] = o
}
return e.length = t,
e
}
var Ns = function(e) {
var t = La(e, (function(e) {
return 500 === n.size && n.clear(),
e
}
))
, n = t.cache;
return t
}((function(e) {
var t = [];
return 46 === e.charCodeAt(0) && t.push(""),
e.replace(re, (function(e, n, r, i) {
t.push(r ? i.replace(pe, "$1") : n || e)
}
)),
t
}
));
function Ds(e) {
if ("string" == typeof e || oo(e))
return e;
var t = e + "";
return "0" == t && 1 / e == -1 / 0 ? "-0" : t
}
function js(e) {
if (null != e) {
try {
return Ie.call(e)
} catch (t) {}
try {
return e + ""
} catch (t) {}
}
return ""
}
function Fs(e) {
if (e instanceof Vn)
return e.clone();
var t = new Hn(e.__wrapped__,e.__chain__);
return t.__actions__ = Ri(e.__actions__),
t.__index__ = e.__index__,
t.__values__ = e.__values__,
t
}
var Os = Yr((function(e, t) {
return Ja(e) ? dr(e, vr(t, 1, Ja, !0)) : []
}
))
, Us = Yr((function(e, t) {
var n = qs(t);
return Ja(n) && (n = i),
Ja(e) ? dr(e, vr(t, 1, Ja, !0), ls(n, 2)) : []
}
))
, zs = Yr((function(e, t) {
var n = qs(t);
return Ja(n) && (n = i),
Ja(e) ? dr(e, vr(t, 1, Ja, !0), i, n) : []
}
));
function Gs(e, t, n) {
var r = null == e ? 0 : e.length;
if (!r)
return -1;
var i = null == n ? 0 : fo(n);
return i < 0 && (i = Kt(r + i, 0)),
Gt(e, ls(t, 3), i)
}
function Hs(e, t, n) {
var r = null == e ? 0 : e.length;
if (!r)
return -1;
var s = r - 1;
return n !== i && (s = fo(n),
s = n < 0 ? Kt(r + s, 0) : xn(s, r - 1)),
Gt(e, ls(t, 3), s, !0)
}
function Vs(e) {
return (null == e ? 0 : e.length) ? vr(e, 1) : []
}
function Ws(e) {
return e && e.length ? e[0] : i
}
var Js = Yr((function(e) {
var t = Nt(e, vi);
return t.length && t[0] === e[0] ? Rr(t) : []
}
))
, Xs = Yr((function(e) {
var t = qs(e)
, n = Nt(e, vi);
return t === qs(n) ? t = i : n.pop(),
n.length && n[0] === e[0] ? Rr(n, ls(t, 2)) : []
}
))
, Ks = Yr((function(e) {
var t = qs(e)
, n = Nt(e, vi);
return (t = "function" == typeof t ? t : i) && n.pop(),
n.length && n[0] === e[0] ? Rr(n, i, t) : []
}
));
function qs(e) {
var t = null == e ? 0 : e.length;
return t ? e[t - 1] : i
}
var Ys = Yr(Qs);
function Qs(e, t) {
return e && e.length && t && t.length ? Jr(e, t) : e
}
var Zs = ns((function(e, t) {
var n = null == e ? 0 : e.length
, r = ar(e, t);
return Xr(e, Nt(t, (function(e) {
return ys(e, n) ? +e : e
}
)).sort(Ci)),
r
}
));
function $s(e) {
return null == e ? e : Sn.call(e)
}
var ea = Yr((function(e) {
return ui(vr(e, 1, Ja, !0))
}
))
, ta = Yr((function(e) {
var t = qs(e);
return Ja(t) && (t = i),
ui(vr(e, 1, Ja, !0), ls(t, 2))
}
))
, na = Yr((function(e) {
var t = qs(e);
return t = "function" == typeof t ? t : i,
ui(vr(e, 1, Ja, !0), i, t)
}
));
function ra(e) {
if (!e || !e.length)
return [];
var t = 0;
return e = kt(e, (function(e) {
if (Ja(e))
return t = Kt(e.length, t),
!0
}
)),
Qt(t, (function(t) {
return Nt(e, Xt(t))
}
))
}
function ia(e, t) {
if (!e || !e.length)
return [];
var n = ra(e);
return null == t ? n : Nt(n, (function(e) {
return Et(t, i, e)
}
))
}
var sa = Yr((function(e, t) {
return Ja(e) ? dr(e, t) : []
}
))
, aa = Yr((function(e) {
return mi(kt(e, Ja))
}
))
, oa = Yr((function(e) {
var t = qs(e);
return Ja(t) && (t = i),
mi(kt(e, Ja), ls(t, 2))
}
))
, la = Yr((function(e) {
var t = qs(e);
return t = "function" == typeof t ? t : i,
mi(kt(e, Ja), i, t)
}
))
, ca = Yr(ra);
var ua = Yr((function(e) {
var t = e.length
, n = t > 1 ? e[t - 1] : i;
return n = "function" == typeof n ? (e.pop(),
n) : i,
ia(e, n)
}
));
function da(e) {
var t = Un(e);
return t.__chain__ = !0,
t
}
function ha(e, t) {
return t(e)
}
var pa = ns((function(e) {
var t = e.length
, n = t ? e[0] : 0
, r = this.__wrapped__
, s = function(t) {
return ar(t, e)
};
return !(t > 1 || this.__actions__.length) && r instanceof Vn && ys(n) ? ((r = r.slice(n, +n + (t ? 1 : 0))).__actions__.push({
func: ha,
args: [s],
thisArg: i
}),
new Hn(r,this.__chain__).thru((function(e) {
return t && !e.length && e.push(i),
e
}
))) : this.thru(s)
}
));
var fa = Pi((function(e, t, n) {
Ne.call(e, n) ? ++e[n] : sr(e, n, 1)
}
));
var ma = Fi(Gs)
, ga = Fi(Hs);
function va(e, t) {
return (Ha(e) ? Rt : hr)(e, ls(t, 3))
}
function ya(e, t) {
return (Ha(e) ? Bt : pr)(e, ls(t, 3))
}
var xa = Pi((function(e, t, n) {
Ne.call(e, n) ? e[n].push(t) : sr(e, n, [t])
}
));
var ba = Yr((function(e, t, r) {
var i = -1
, s = "function" == typeof t
, a = Wa(e) ? n(e.length) : [];
return hr(e, (function(e) {
a[++i] = s ? Et(t, e, r) : Br(e, t, r)
}
)),
a
}
))
, _a = Pi((function(e, t, n) {
sr(e, n, t)
}
));
function wa(e, t) {
return (Ha(e) ? Nt : Or)(e, ls(t, 3))
}
var Sa = Pi((function(e, t, n) {
e[n ? 0 : 1].push(t)
}
), (function() {
return [[], []]
}
));
var Aa = Yr((function(e, t) {
if (null == e)
return [];
var n = t.length;
return n > 1 && xs(e, t[0], t[1]) ? t = [] : n > 2 && xs(t[0], t[1], t[2]) && (t = [t[0]]),
Vr(e, vr(t, 1), [])
}
))
, Ma = it || function() {
return mt.Date.now()
}
;
function Ca(e, t, n) {
return t = n ? i : t,
t = e && null == t ? e.length : t,
Qi(e, d, i, i, i, i, t)
}
function Ea(e, t) {
var n;
if ("function" != typeof t)
throw new Re(s);
return e = fo(e),
function() {
return --e > 0 && (n = t.apply(this, arguments)),
e <= 1 && (t = i),
n
}
}
var Ta = Yr((function(e, t, n) {
var r = 1;
if (n.length) {
var i = dn(n, os(Ta));
r |= c
}
return Qi(e, r, t, n, i)
}
))
, Ra = Yr((function(e, t, n) {
var r = 3;
if (n.length) {
var i = dn(n, os(Ra));
r |= c
}
return Qi(t, r, e, n, i)
}
));
function Ba(e, t, n) {
var r, a, o, l, c, u, d = 0, h = !1, p = !1, f = !0;
if ("function" != typeof e)
throw new Re(s);
function m(t) {
var n = r
, s = a;
return r = a = i,
d = t,
l = e.apply(s, n)
}
function g(e) {
var n = e - u;
return u === i || n >= t || n < 0 || p && e - d >= o
}
function v() {
var e = Ma();
if (g(e))
return y(e);
c = Bs(v, function(e) {
var n = t - (e - u);
return p ? xn(n, o - (e - d)) : n
}(e))
}
function y(e) {
return c = i,
f && r ? m(e) : (r = a = i,
l)
}
function x() {
var e = Ma()
, n = g(e);
if (r = arguments,
a = this,
u = e,
n) {
if (c === i)
return function(e) {
return d = e,
c = Bs(v, t),
h ? m(e) : l
}(u);
if (p)
return wi(c),
c = Bs(v, t),
m(u)
}
return c === i && (c = Bs(v, t)),
l
}
return t = go(t) || 0,
$a(n) && (h = !!n.leading,
o = (p = "maxWait"in n) ? Kt(go(n.maxWait) || 0, t) : o,
f = "trailing"in n ? !!n.trailing : f),
x.cancel = function() {
c !== i && wi(c),
d = 0,
r = u = a = c = i
}
,
x.flush = function() {
return c === i ? l : y(Ma())
}
,
x
}
var Pa = Yr((function(e, t) {
return ur(e, 1, t)
}
))
, ka = Yr((function(e, t, n) {
return ur(e, go(t) || 0, n)
}
));
function La(e, t) {
if ("function" != typeof e || null != t && "function" != typeof t)
throw new Re(s);
var n = function() {
var r = arguments
, i = t ? t.apply(this, r) : r[0]
, s = n.cache;
if (s.has(i))
return s.get(i);
var a = e.apply(this, r);
return n.cache = s.set(i, a) || s,
a
};
return n.cache = new (La.Cache || Xn),
n
}
function Ia(e) {
if ("function" != typeof e)
throw new Re(s);
return function() {
var t = arguments;
switch (t.length) {
case 0:
return !e.call(this);
case 1:
return !e.call(this, t[0]);
case 2:
return !e.call(this, t[0], t[1]);
case 3:
return !e.call(this, t[0], t[1], t[2])
}
return !e.apply(this, t)
}
}
La.Cache = Xn;
var Na = bi((function(e, t) {
var n = (t = 1 == t.length && Ha(t[0]) ? Nt(t[0], $t(ls())) : Nt(vr(t, 1), $t(ls()))).length;
return Yr((function(r) {
for (var i = -1, s = xn(r.length, n); ++i < s; )
r[i] = t[i].call(this, r[i]);
return Et(e, this, r)
}
))
}
))
, Da = Yr((function(e, t) {
var n = dn(t, os(Da));
return Qi(e, c, i, t, n)
}
))
, ja = Yr((function(e, t) {
var n = dn(t, os(ja));
return Qi(e, u, i, t, n)
}
))
, Fa = ns((function(e, t) {
return Qi(e, h, i, i, i, t)
}
));
function Oa(e, t) {
return e === t || e !== e && t !== t
}
var Ua = Ji(Cr)
, za = Ji((function(e, t) {
return e >= t
}
))
, Ga = Pr(function() {
return arguments
}()) ? Pr : function(e) {
return eo(e) && Ne.call(e, "callee") && !Ke.call(e, "callee")
}
, Ha = n.isArray
, Va = _t ? $t(_t) : function(e) {
return eo(e) && Mr(e) == I
}
;
function Wa(e) {
return null != e && Za(e.length) && !Ya(e)
}
function Ja(e) {
return eo(e) && Wa(e)
}
var Xa = vt || gl
, Ka = wt ? $t(wt) : function(e) {
return eo(e) && Mr(e) == _
}
;
function qa(e) {
if (!eo(e))
return !1;
var t = Mr(e);
return t == w || "[object DOMException]" == t || "string" == typeof e.message && "string" == typeof e.name && !ro(e)
}
function Ya(e) {
if (!$a(e))
return !1;
var t = Mr(e);
return t == S || t == A || "[object AsyncFunction]" == t || "[object Proxy]" == t
}
function Qa(e) {
return "number" == typeof e && e == fo(e)
}
function Za(e) {
return "number" == typeof e && e > -1 && e % 1 == 0 && e <= f
}
function $a(e) {
var t = typeof e;
return null != e && ("object" == t || "function" == t)
}
function eo(e) {
return null != e && "object" == typeof e
}
var to = St ? $t(St) : function(e) {
return eo(e) && fs(e) == M
}
;
function no(e) {
return "number" == typeof e || eo(e) && Mr(e) == C
}
function ro(e) {
if (!eo(e) || Mr(e) != E)
return !1;
var t = Je(e);
if (null === t)
return !0;
var n = Ne.call(t, "constructor") && t.constructor;
return "function" == typeof n && n instanceof n && Ie.call(n) == Oe
}
var io = At ? $t(At) : function(e) {
return eo(e) && Mr(e) == R
}
;
var so = Mt ? $t(Mt) : function(e) {
return eo(e) && fs(e) == B
}
;
function ao(e) {
return "string" == typeof e || !Ha(e) && eo(e) && Mr(e) == P
}
function oo(e) {
return "symbol" == typeof e || eo(e) && Mr(e) == k
}
var lo = Ct ? $t(Ct) : function(e) {
return eo(e) && Za(e.length) && !!lt[Mr(e)]
}
;
var co = Ji(Fr)
, uo = Ji((function(e, t) {
return e <= t
}
));
function ho(e) {
if (!e)
return [];
if (Wa(e))
return ao(e) ? mn(e) : Ri(e);
if (Qe && e[Qe])
return function(e) {
for (var t, n = []; !(t = e.next()).done; )
n.push(t.value);
return n
}(e[Qe]());
var t = fs(e);
return (t == M ? cn : t == B ? hn : Uo)(e)
}
function po(e) {
return e ? (e = go(e)) === p || e === -1 / 0 ? 17976931348623157e292 * (e < 0 ? -1 : 1) : e === e ? e : 0 : 0 === e ? e : 0
}
function fo(e) {
var t = po(e)
, n = t % 1;
return t === t ? n ? t - n : t : 0
}
function mo(e) {
return e ? or(fo(e), 0, g) : 0
}
function go(e) {
if ("number" == typeof e)
return e;
if (oo(e))
return m;
if ($a(e)) {
var t = "function" == typeof e.valueOf ? e.valueOf() : e;
e = $a(t) ? t + "" : t
}
if ("string" != typeof e)
return 0 === e ? e : +e;
e = Zt(e);
var n = ve.test(e);
return n || xe.test(e) ? ht(e.slice(2), n ? 2 : 8) : ge.test(e) ? m : +e
}
function vo(e) {
return Bi(e, ko(e))
}
function yo(e) {
return null == e ? "" : ci(e)
}
var xo = ki((function(e, t) {
if (Ss(t) || Wa(t))
Bi(t, Po(t), e);
else
for (var n in t)
Ne.call(t, n) && tr(e, n, t[n])
}
))
, bo = ki((function(e, t) {
Bi(t, ko(t), e)
}
))
, _o = ki((function(e, t, n, r) {
Bi(t, ko(t), e, r)
}
))
, wo = ki((function(e, t, n, r) {
Bi(t, Po(t), e, r)
}
))
, So = ns(ar);
var Ao = Yr((function(e, t) {
e = Ce(e);
var n = -1
, r = t.length
, s = r > 2 ? t[2] : i;
for (s && xs(t[0], t[1], s) && (r = 1); ++n < r; )
for (var a = t[n], o = ko(a), l = -1, c = o.length; ++l < c; ) {
var u = o[l]
, d = e[u];
(d === i || Oa(d, ke[u]) && !Ne.call(e, u)) && (e[u] = a[u])
}
return e
}
))
, Mo = Yr((function(e) {
return e.push(i, $i),
Et(Io, i, e)
}
));
function Co(e, t, n) {
var r = null == e ? i : Sr(e, t);
return r === i ? n : r
}
function Eo(e, t) {
return null != e && ms(e, t, Tr)
}
var To = zi((function(e, t, n) {
null != t && "function" != typeof t.toString && (t = Fe.call(t)),
e[t] = n
}
), el(rl))
, Ro = zi((function(e, t, n) {
null != t && "function" != typeof t.toString && (t = Fe.call(t)),
Ne.call(e, t) ? e[t].push(n) : e[t] = [n]
}
), ls)
, Bo = Yr(Br);
function Po(e) {
return Wa(e) ? Yn(e) : Dr(e)
}
function ko(e) {
return Wa(e) ? Yn(e, !0) : jr(e)
}
var Lo = ki((function(e, t, n) {
Gr(e, t, n)
}
))
, Io = ki((function(e, t, n, r) {
Gr(e, t, n, r)
}
))
, No = ns((function(e, t) {
var n = {};
if (null == e)
return n;
var r = !1;
t = Nt(t, (function(t) {
return t = xi(t, e),
r || (r = t.length > 1),
t
}
)),
Bi(e, is(e), n),
r && (n = lr(n, 7, es));
for (var i = t.length; i--; )
di(n, t[i]);
return n
}
));
var Do = ns((function(e, t) {
return null == e ? {} : function(e, t) {
return Wr(e, t, (function(t, n) {
return Eo(e, n)
}
))
}(e, t)
}
));
function jo(e, t) {
if (null == e)
return {};
var n = Nt(is(e), (function(e) {
return [e]
}
));
return t = ls(t),
Wr(e, n, (function(e, n) {
return t(e, n[0])
}
))
}
var Fo = Yi(Po)
, Oo = Yi(ko);
function Uo(e) {
return null == e ? [] : en(e, Po(e))
}
var zo = Di((function(e, t, n) {
return t = t.toLowerCase(),
e + (n ? Go(t) : t)
}
));
function Go(e) {
return Yo(yo(e).toLowerCase())
}
function Ho(e) {
return (e = yo(e)) && e.replace(_e, sn).replace(tt, "")
}
var Vo = Di((function(e, t, n) {
return e + (n ? "-" : "") + t.toLowerCase()
}
))
, Wo = Di((function(e, t, n) {
return e + (n ? " " : "") + t.toLowerCase()
}
))
, Jo = Ni("toLowerCase");
var Xo = Di((function(e, t, n) {
return e + (n ? "_" : "") + t.toLowerCase()
}
));
var Ko = Di((function(e, t, n) {
return e + (n ? " " : "") + Yo(t)
}
));
var qo = Di((function(e, t, n) {
return e + (n ? " " : "") + t.toUpperCase()
}
))
, Yo = Ni("toUpperCase");
function Qo(e, t, n) {
return e = yo(e),
(t = n ? i : t) === i ? function(e) {
return st.test(e)
}(e) ? function(e) {
return e.match(rt) || []
}(e) : function(e) {
return e.match(de) || []
}(e) : e.match(t) || []
}
var Zo = Yr((function(e, t) {
try {
return Et(e, i, t)
} catch (n) {
return qa(n) ? n : new oe(n)
}
}
))
, $o = ns((function(e, t) {
return Rt(t, (function(t) {
t = Ds(t),
sr(e, t, Ta(e[t], e))
}
)),
e
}
));
function el(e) {
return function() {
return e
}
}
var tl = Oi()
, nl = Oi(!0);
function rl(e) {
return e
}
function il(e) {
return Nr("function" == typeof e ? e : lr(e, 1))
}
var sl = Yr((function(e, t) {
return function(n) {
return Br(n, e, t)
}
}
))
, al = Yr((function(e, t) {
return function(n) {
return Br(e, n, t)
}
}
));
function ol(e, t, n) {
var r = Po(t)
, i = wr(t, r);
null != n || $a(t) && (i.length || !r.length) || (n = t,
t = e,
e = this,
i = wr(t, Po(t)));
var s = !($a(n) && "chain"in n) || !!n.chain
, a = Ya(e);
return Rt(i, (function(n) {
var r = t[n];
e[n] = r,
a && (e.prototype[n] = function() {
var t = this.__chain__;
if (s || t) {
var n = e(this.__wrapped__);
return (n.__actions__ = Ri(this.__actions__)).push({
func: r,
args: arguments,
thisArg: e
}),
n.__chain__ = t,
n
}
return r.apply(e, Dt([this.value()], arguments))
}
)
}
)),
e
}
function ll() {}
var cl = Hi(Nt)
, ul = Hi(Pt)
, dl = Hi(Ot);
function hl(e) {
return bs(e) ? Xt(Ds(e)) : function(e) {
return function(t) {
return Sr(t, e)
}
}(e)
}
var pl = Wi()
, fl = Wi(!0);
function ml() {
return []
}
function gl() {
return !1
}
var vl = Gi((function(e, t) {
return e + t
}
), 0)
, yl = Ki("ceil")
, xl = Gi((function(e, t) {
return e / t
}
), 1)
, bl = Ki("floor");
var _l = Gi((function(e, t) {
return e * t
}
), 1)
, wl = Ki("round")
, Sl = Gi((function(e, t) {
return e - t
}
), 0);
return Un.after = function(e, t) {
if ("function" != typeof t)
throw new Re(s);
return e = fo(e),
function() {
if (--e < 1)
return t.apply(this, arguments)
}
}
,
Un.ary = Ca,
Un.assign = xo,
Un.assignIn = bo,
Un.assignInWith = _o,
Un.assignWith = wo,
Un.at = So,
Un.before = Ea,
Un.bind = Ta,
Un.bindAll = $o,
Un.bindKey = Ra,
Un.castArray = function() {
if (!arguments.length)
return [];
var e = arguments[0];
return Ha(e) ? e : [e]
}
,
Un.chain = da,
Un.chunk = function(e, t, r) {
t = (r ? xs(e, t, r) : t === i) ? 1 : Kt(fo(t), 0);
var s = null == e ? 0 : e.length;
if (!s || t < 1)
return [];
for (var a = 0, o = 0, l = n(pt(s / t)); a < s; )
l[o++] = ri(e, a, a += t);
return l
}
,
Un.compact = function(e) {
for (var t = -1, n = null == e ? 0 : e.length, r = 0, i = []; ++t < n; ) {
var s = e[t];
s && (i[r++] = s)
}
return i
}
,
Un.concat = function() {
var e = arguments.length;
if (!e)
return [];
for (var t = n(e - 1), r = arguments[0], i = e; i--; )
t[i - 1] = arguments[i];
return Dt(Ha(r) ? Ri(r) : [r], vr(t, 1))
}
,
Un.cond = function(e) {
var t = null == e ? 0 : e.length
, n = ls();
return e = t ? Nt(e, (function(e) {
if ("function" != typeof e[1])
throw new Re(s);
return [n(e[0]), e[1]]
}
)) : [],
Yr((function(n) {
for (var r = -1; ++r < t; ) {
var i = e[r];
if (Et(i[0], this, n))
return Et(i[1], this, n)
}
}
))
}
,
Un.conforms = function(e) {
return function(e) {
var t = Po(e);
return function(n) {
return cr(n, e, t)
}
}(lr(e, 1))
}
,
Un.constant = el,
Un.countBy = fa,
Un.create = function(e, t) {
var n = zn(e);
return null == t ? n : ir(n, t)
}
,
Un.curry = function e(t, n, r) {
var s = Qi(t, 8, i, i, i, i, i, n = r ? i : n);
return s.placeholder = e.placeholder,
s
}
,
Un.curryRight = function e(t, n, r) {
var s = Qi(t, l, i, i, i, i, i, n = r ? i : n);
return s.placeholder = e.placeholder,
s
}
,
Un.debounce = Ba,
Un.defaults = Ao,
Un.defaultsDeep = Mo,
Un.defer = Pa,
Un.delay = ka,
Un.difference = Os,
Un.differenceBy = Us,
Un.differenceWith = zs,
Un.drop = function(e, t, n) {
var r = null == e ? 0 : e.length;
return r ? ri(e, (t = n || t === i ? 1 : fo(t)) < 0 ? 0 : t, r) : []
}
,
Un.dropRight = function(e, t, n) {
var r = null == e ? 0 : e.length;
return r ? ri(e, 0, (t = r - (t = n || t === i ? 1 : fo(t))) < 0 ? 0 : t) : []
}
,
Un.dropRightWhile = function(e, t) {
return e && e.length ? pi(e, ls(t, 3), !0, !0) : []
}
,
Un.dropWhile = function(e, t) {
return e && e.length ? pi(e, ls(t, 3), !0) : []
}
,
Un.fill = function(e, t, n, r) {
var s = null == e ? 0 : e.length;
return s ? (n && "number" != typeof n && xs(e, t, n) && (n = 0,
r = s),
function(e, t, n, r) {
var s = e.length;
for ((n = fo(n)) < 0 && (n = -n > s ? 0 : s + n),
(r = r === i || r > s ? s : fo(r)) < 0 && (r += s),
r = n > r ? 0 : mo(r); n < r; )
e[n++] = t;
return e
}(e, t, n, r)) : []
}
,
Un.filter = function(e, t) {
return (Ha(e) ? kt : gr)(e, ls(t, 3))
}
,
Un.flatMap = function(e, t) {
return vr(wa(e, t), 1)
}
,
Un.flatMapDeep = function(e, t) {
return vr(wa(e, t), p)
}
,
Un.flatMapDepth = function(e, t, n) {
return n = n === i ? 1 : fo(n),
vr(wa(e, t), n)
}
,
Un.flatten = Vs,
Un.flattenDeep = function(e) {
return (null == e ? 0 : e.length) ? vr(e, p) : []
}
,
Un.flattenDepth = function(e, t) {
return (null == e ? 0 : e.length) ? vr(e, t = t === i ? 1 : fo(t)) : []
}
,
Un.flip = function(e) {
return Qi(e, 512)
}
,
Un.flow = tl,
Un.flowRight = nl,
Un.fromPairs = function(e) {
for (var t = -1, n = null == e ? 0 : e.length, r = {}; ++t < n; ) {
var i = e[t];
r[i[0]] = i[1]
}
return r
}
,
Un.functions = function(e) {
return null == e ? [] : wr(e, Po(e))
}
,
Un.functionsIn = function(e) {
return null == e ? [] : wr(e, ko(e))
}
,
Un.groupBy = xa,
Un.initial = function(e) {
return (null == e ? 0 : e.length) ? ri(e, 0, -1) : []
}
,
Un.intersection = Js,
Un.intersectionBy = Xs,
Un.intersectionWith = Ks,
Un.invert = To,
Un.invertBy = Ro,
Un.invokeMap = ba,
Un.iteratee = il,
Un.keyBy = _a,
Un.keys = Po,
Un.keysIn = ko,
Un.map = wa,
Un.mapKeys = function(e, t) {
var n = {};
return t = ls(t, 3),
br(e, (function(e, r, i) {
sr(n, t(e, r, i), e)
}
)),
n
}
,
Un.mapValues = function(e, t) {
var n = {};
return t = ls(t, 3),
br(e, (function(e, r, i) {
sr(n, r, t(e, r, i))
}
)),
n
}
,
Un.matches = function(e) {
return Ur(lr(e, 1))
}
,
Un.matchesProperty = function(e, t) {
return zr(e, lr(t, 1))
}
,
Un.memoize = La,
Un.merge = Lo,
Un.mergeWith = Io,
Un.method = sl,
Un.methodOf = al,
Un.mixin = ol,
Un.negate = Ia,
Un.nthArg = function(e) {
return e = fo(e),
Yr((function(t) {
return Hr(t, e)
}
))
}
,
Un.omit = No,
Un.omitBy = function(e, t) {
return jo(e, Ia(ls(t)))
}
,
Un.once = function(e) {
return Ea(2, e)
}
,
Un.orderBy = function(e, t, n, r) {
return null == e ? [] : (Ha(t) || (t = null == t ? [] : [t]),
Ha(n = r ? i : n) || (n = null == n ? [] : [n]),
Vr(e, t, n))
}
,
Un.over = cl,
Un.overArgs = Na,
Un.overEvery = ul,
Un.overSome = dl,
Un.partial = Da,
Un.partialRight = ja,
Un.partition = Sa,
Un.pick = Do,
Un.pickBy = jo,
Un.property = hl,
Un.propertyOf = function(e) {
return function(t) {
return null == e ? i : Sr(e, t)
}
}
,
Un.pull = Ys,
Un.pullAll = Qs,
Un.pullAllBy = function(e, t, n) {
return e && e.length && t && t.length ? Jr(e, t, ls(n, 2)) : e
}
,
Un.pullAllWith = function(e, t, n) {
return e && e.length && t && t.length ? Jr(e, t, i, n) : e
}
,
Un.pullAt = Zs,
Un.range = pl,
Un.rangeRight = fl,
Un.rearg = Fa,
Un.reject = function(e, t) {
return (Ha(e) ? kt : gr)(e, Ia(ls(t, 3)))
}
,
Un.remove = function(e, t) {
var n = [];
if (!e || !e.length)
return n;
var r = -1
, i = []
, s = e.length;
for (t = ls(t, 3); ++r < s; ) {
var a = e[r];
t(a, r, e) && (n.push(a),
i.push(r))
}
return Xr(e, i),
n
}
,
Un.rest = function(e, t) {
if ("function" != typeof e)
throw new Re(s);
return Yr(e, t = t === i ? t : fo(t))
}
,
Un.reverse = $s,
Un.sampleSize = function(e, t, n) {
return t = (n ? xs(e, t, n) : t === i) ? 1 : fo(t),
(Ha(e) ? Zn : Zr)(e, t)
}
,
Un.set = function(e, t, n) {
return null == e ? e : $r(e, t, n)
}
,
Un.setWith = function(e, t, n, r) {
return r = "function" == typeof r ? r : i,
null == e ? e : $r(e, t, n, r)
}
,
Un.shuffle = function(e) {
return (Ha(e) ? $n : ni)(e)
}
,
Un.slice = function(e, t, n) {
var r = null == e ? 0 : e.length;
return r ? (n && "number" != typeof n && xs(e, t, n) ? (t = 0,
n = r) : (t = null == t ? 0 : fo(t),
n = n === i ? r : fo(n)),
ri(e, t, n)) : []
}
,
Un.sortBy = Aa,
Un.sortedUniq = function(e) {
return e && e.length ? oi(e) : []
}
,
Un.sortedUniqBy = function(e, t) {
return e && e.length ? oi(e, ls(t, 2)) : []
}
,
Un.split = function(e, t, n) {
return n && "number" != typeof n && xs(e, t, n) && (t = n = i),
(n = n === i ? g : n >>> 0) ? (e = yo(e)) && ("string" == typeof t || null != t && !io(t)) && !(t = ci(t)) && ln(e) ? _i(mn(e), 0, n) : e.split(t, n) : []
}
,
Un.spread = function(e, t) {
if ("function" != typeof e)
throw new Re(s);
return t = null == t ? 0 : Kt(fo(t), 0),
Yr((function(n) {
var r = n[t]
, i = _i(n, 0, t);
return r && Dt(i, r),
Et(e, this, i)
}
))
}
,
Un.tail = function(e) {
var t = null == e ? 0 : e.length;
return t ? ri(e, 1, t) : []
}
,
Un.take = function(e, t, n) {
return e && e.length ? ri(e, 0, (t = n || t === i ? 1 : fo(t)) < 0 ? 0 : t) : []
}
,
Un.takeRight = function(e, t, n) {
var r = null == e ? 0 : e.length;
return r ? ri(e, (t = r - (t = n || t === i ? 1 : fo(t))) < 0 ? 0 : t, r) : []
}
,
Un.takeRightWhile = function(e, t) {
return e && e.length ? pi(e, ls(t, 3), !1, !0) : []
}
,
Un.takeWhile = function(e, t) {
return e && e.length ? pi(e, ls(t, 3)) : []
}
,
Un.tap = function(e, t) {
return t(e),
e
}
,
Un.throttle = function(e, t, n) {
var r = !0
, i = !0;
if ("function" != typeof e)
throw new Re(s);
return $a(n) && (r = "leading"in n ? !!n.leading : r,
i = "trailing"in n ? !!n.trailing : i),
Ba(e, t, {
leading: r,
maxWait: t,
trailing: i
})
}
,
Un.thru = ha,
Un.toArray = ho,
Un.toPairs = Fo,
Un.toPairsIn = Oo,
Un.toPath = function(e) {
return Ha(e) ? Nt(e, Ds) : oo(e) ? [e] : Ri(Ns(yo(e)))
}
,
Un.toPlainObject = vo,
Un.transform = function(e, t, n) {
var r = Ha(e)
, i = r || Xa(e) || lo(e);
if (t = ls(t, 4),
null == n) {
var s = e && e.constructor;
n = i ? r ? new s : [] : $a(e) && Ya(s) ? zn(Je(e)) : {}
}
return (i ? Rt : br)(e, (function(e, r, i) {
return t(n, e, r, i)
}
)),
n
}
,
Un.unary = function(e) {
return Ca(e, 1)
}
,
Un.union = ea,
Un.unionBy = ta,
Un.unionWith = na,
Un.uniq = function(e) {
return e && e.length ? ui(e) : []
}
,
Un.uniqBy = function(e, t) {
return e && e.length ? ui(e, ls(t, 2)) : []
}
,
Un.uniqWith = function(e, t) {
return t = "function" == typeof t ? t : i,
e && e.length ? ui(e, i, t) : []
}
,
Un.unset = function(e, t) {
return null == e || di(e, t)
}
,
Un.unzip = ra,
Un.unzipWith = ia,
Un.update = function(e, t, n) {
return null == e ? e : hi(e, t, yi(n))
}
,
Un.updateWith = function(e, t, n, r) {
return r = "function" == typeof r ? r : i,
null == e ? e : hi(e, t, yi(n), r)
}
,
Un.values = Uo,
Un.valuesIn = function(e) {
return null == e ? [] : en(e, ko(e))
}
,
Un.without = sa,
Un.words = Qo,
Un.wrap = function(e, t) {
return Da(yi(t), e)
}
,
Un.xor = aa,
Un.xorBy = oa,
Un.xorWith = la,
Un.zip = ca,
Un.zipObject = function(e, t) {
return gi(e || [], t || [], tr)
}
,
Un.zipObjectDeep = function(e, t) {
return gi(e || [], t || [], $r)
}
,
Un.zipWith = ua,
Un.entries = Fo,
Un.entriesIn = Oo,
Un.extend = bo,
Un.extendWith = _o,
ol(Un, Un),
Un.add = vl,
Un.attempt = Zo,
Un.camelCase = zo,
Un.capitalize = Go,
Un.ceil = yl,
Un.clamp = function(e, t, n) {
return n === i && (n = t,
t = i),
n !== i && (n = (n = go(n)) === n ? n : 0),
t !== i && (t = (t = go(t)) === t ? t : 0),
or(go(e), t, n)
}
,
Un.clone = function(e) {
return lr(e, 4)
}
,
Un.cloneDeep = function(e) {
return lr(e, 5)
}
,
Un.cloneDeepWith = function(e, t) {
return lr(e, 5, t = "function" == typeof t ? t : i)
}
,
Un.cloneWith = function(e, t) {
return lr(e, 4, t = "function" == typeof t ? t : i)
}
,
Un.conformsTo = function(e, t) {
return null == t || cr(e, t, Po(t))
}
,
Un.deburr = Ho,
Un.defaultTo = function(e, t) {
return null == e || e !== e ? t : e
}
,
Un.divide = xl,
Un.endsWith = function(e, t, n) {
e = yo(e),
t = ci(t);
var r = e.length
, s = n = n === i ? r : or(fo(n), 0, r);
return (n -= t.length) >= 0 && e.slice(n, s) == t
}
,
Un.eq = Oa,
Un.escape = function(e) {
return (e = yo(e)) && Q.test(e) ? e.replace(q, an) : e
}
,
Un.escapeRegExp = function(e) {
return (e = yo(e)) && se.test(e) ? e.replace(ie, "\\$&") : e
}
,
Un.every = function(e, t, n) {
var r = Ha(e) ? Pt : fr;
return n && xs(e, t, n) && (t = i),
r(e, ls(t, 3))
}
,
Un.find = ma,
Un.findIndex = Gs,
Un.findKey = function(e, t) {
return zt(e, ls(t, 3), br)
}
,
Un.findLast = ga,
Un.findLastIndex = Hs,
Un.findLastKey = function(e, t) {
return zt(e, ls(t, 3), _r)
}
,
Un.floor = bl,
Un.forEach = va,
Un.forEachRight = ya,
Un.forIn = function(e, t) {
return null == e ? e : yr(e, ls(t, 3), ko)
}
,
Un.forInRight = function(e, t) {
return null == e ? e : xr(e, ls(t, 3), ko)
}
,
Un.forOwn = function(e, t) {
return e && br(e, ls(t, 3))
}
,
Un.forOwnRight = function(e, t) {
return e && _r(e, ls(t, 3))
}
,
Un.get = Co,
Un.gt = Ua,
Un.gte = za,
Un.has = function(e, t) {
return null != e && ms(e, t, Er)
}
,
Un.hasIn = Eo,
Un.head = Ws,
Un.identity = rl,
Un.includes = function(e, t, n, r) {
e = Wa(e) ? e : Uo(e),
n = n && !r ? fo(n) : 0;
var i = e.length;
return n < 0 && (n = Kt(i + n, 0)),
ao(e) ? n <= i && e.indexOf(t, n) > -1 : !!i && Ht(e, t, n) > -1
}
,
Un.indexOf = function(e, t, n) {
var r = null == e ? 0 : e.length;
if (!r)
return -1;
var i = null == n ? 0 : fo(n);
return i < 0 && (i = Kt(r + i, 0)),
Ht(e, t, i)
}
,
Un.inRange = function(e, t, n) {
return t = po(t),
n === i ? (n = t,
t = 0) : n = po(n),
function(e, t, n) {
return e >= xn(t, n) && e < Kt(t, n)
}(e = go(e), t, n)
}
,
Un.invoke = Bo,
Un.isArguments = Ga,
Un.isArray = Ha,
Un.isArrayBuffer = Va,
Un.isArrayLike = Wa,
Un.isArrayLikeObject = Ja,
Un.isBoolean = function(e) {
return !0 === e || !1 === e || eo(e) && Mr(e) == b
}
,
Un.isBuffer = Xa,
Un.isDate = Ka,
Un.isElement = function(e) {
return eo(e) && 1 === e.nodeType && !ro(e)
}
,
Un.isEmpty = function(e) {
if (null == e)
return !0;
if (Wa(e) && (Ha(e) || "string" == typeof e || "function" == typeof e.splice || Xa(e) || lo(e) || Ga(e)))
return !e.length;
var t = fs(e);
if (t == M || t == B)
return !e.size;
if (Ss(e))
return !Dr(e).length;
for (var n in e)
if (Ne.call(e, n))
return !1;
return !0
}
,
Un.isEqual = function(e, t) {
return kr(e, t)
}
,
Un.isEqualWith = function(e, t, n) {
var r = (n = "function" == typeof n ? n : i) ? n(e, t) : i;
return r === i ? kr(e, t, i, n) : !!r
}
,
Un.isError = qa,
Un.isFinite = function(e) {
return "number" == typeof e && xt(e)
}
,
Un.isFunction = Ya,
Un.isInteger = Qa,
Un.isLength = Za,
Un.isMap = to,
Un.isMatch = function(e, t) {
return e === t || Lr(e, t, us(t))
}
,
Un.isMatchWith = function(e, t, n) {
return n = "function" == typeof n ? n : i,
Lr(e, t, us(t), n)
}
,
Un.isNaN = function(e) {
return no(e) && e != +e
}
,
Un.isNative = function(e) {
if (ws(e))
throw new oe("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");
return Ir(e)
}
,
Un.isNil = function(e) {
return null == e
}
,
Un.isNull = function(e) {
return null === e
}
,
Un.isNumber = no,
Un.isObject = $a,
Un.isObjectLike = eo,
Un.isPlainObject = ro,
Un.isRegExp = io,
Un.isSafeInteger = function(e) {
return Qa(e) && e >= -9007199254740991 && e <= f
}
,
Un.isSet = so,
Un.isString = ao,
Un.isSymbol = oo,
Un.isTypedArray = lo,
Un.isUndefined = function(e) {
return e === i
}
,
Un.isWeakMap = function(e) {
return eo(e) && fs(e) == L
}
,
Un.isWeakSet = function(e) {
return eo(e) && "[object WeakSet]" == Mr(e)
}
,
Un.join = function(e, t) {
return null == e ? "" : bt.call(e, t)
}
,
Un.kebabCase = Vo,
Un.last = qs,
Un.lastIndexOf = function(e, t, n) {
var r = null == e ? 0 : e.length;
if (!r)
return -1;
var s = r;
return n !== i && (s = (s = fo(n)) < 0 ? Kt(r + s, 0) : xn(s, r - 1)),
t === t ? function(e, t, n) {
for (var r = n + 1; r--; )
if (e[r] === t)
return r;
return r
}(e, t, s) : Gt(e, Wt, s, !0)
}
,
Un.lowerCase = Wo,
Un.lowerFirst = Jo,
Un.lt = co,
Un.lte = uo,
Un.max = function(e) {
return e && e.length ? mr(e, rl, Cr) : i
}
,
Un.maxBy = function(e, t) {
return e && e.length ? mr(e, ls(t, 2), Cr) : i
}
,
Un.mean = function(e) {
return Jt(e, rl)
}
,
Un.meanBy = function(e, t) {
return Jt(e, ls(t, 2))
}
,
Un.min = function(e) {
return e && e.length ? mr(e, rl, Fr) : i
}
,
Un.minBy = function(e, t) {
return e && e.length ? mr(e, ls(t, 2), Fr) : i
}
,
Un.stubArray = ml,
Un.stubFalse = gl,
Un.stubObject = function() {
return {}
}
,
Un.stubString = function() {
return ""
}
,
Un.stubTrue = function() {
return !0
}
,
Un.multiply = _l,
Un.nth = function(e, t) {
return e && e.length ? Hr(e, fo(t)) : i
}
,
Un.noConflict = function() {
return mt._ === this && (mt._ = Ue),
this
}
,
Un.noop = ll,
Un.now = Ma,
Un.pad = function(e, t, n) {
e = yo(e);
var r = (t = fo(t)) ? fn(e) : 0;
if (!t || r >= t)
return e;
var i = (t - r) / 2;
return Vi(ft(i), n) + e + Vi(pt(i), n)
}
,
Un.padEnd = function(e, t, n) {
e = yo(e);
var r = (t = fo(t)) ? fn(e) : 0;
return t && r < t ? e + Vi(t - r, n) : e
}
,
Un.padStart = function(e, t, n) {
e = yo(e);
var r = (t = fo(t)) ? fn(e) : 0;
return t && r < t ? Vi(t - r, n) + e : e
}
,
Un.parseInt = function(e, t, n) {
return n || null == t ? t = 0 : t && (t = +t),
_n(yo(e).replace(ae, ""), t || 0)
}
,
Un.random = function(e, t, n) {
if (n && "boolean" != typeof n && xs(e, t, n) && (t = n = i),
n === i && ("boolean" == typeof t ? (n = t,
t = i) : "boolean" == typeof e && (n = e,
e = i)),
e === i && t === i ? (e = 0,
t = 1) : (e = po(e),
t === i ? (t = e,
e = 0) : t = po(t)),
e > t) {
var r = e;
e = t,
t = r
}
if (n || e % 1 || t % 1) {
var s = wn();
return xn(e + s * (t - e + dt("1e-" + ((s + "").length - 1))), t)
}
return Kr(e, t)
}
,
Un.reduce = function(e, t, n) {
var r = Ha(e) ? jt : qt
, i = arguments.length < 3;
return r(e, ls(t, 4), n, i, hr)
}
,
Un.reduceRight = function(e, t, n) {
var r = Ha(e) ? Ft : qt
, i = arguments.length < 3;
return r(e, ls(t, 4), n, i, pr)
}
,
Un.repeat = function(e, t, n) {
return t = (n ? xs(e, t, n) : t === i) ? 1 : fo(t),
qr(yo(e), t)
}
,
Un.replace = function() {
var e = arguments
, t = yo(e[0]);
return e.length < 3 ? t : t.replace(e[1], e[2])
}
,
Un.result = function(e, t, n) {
var r = -1
, s = (t = xi(t, e)).length;
for (s || (s = 1,
e = i); ++r < s; ) {
var a = null == e ? i : e[Ds(t[r])];
a === i && (r = s,
a = n),
e = Ya(a) ? a.call(e) : a
}
return e
}
,
Un.round = wl,
Un.runInContext = e,
Un.sample = function(e) {
return (Ha(e) ? Qn : Qr)(e)
}
,
Un.size = function(e) {
if (null == e)
return 0;
if (Wa(e))
return ao(e) ? fn(e) : e.length;
var t = fs(e);
return t == M || t == B ? e.size : Dr(e).length
}
,
Un.snakeCase = Xo,
Un.some = function(e, t, n) {
var r = Ha(e) ? Ot : ii;
return n && xs(e, t, n) && (t = i),
r(e, ls(t, 3))
}
,
Un.sortedIndex = function(e, t) {
return si(e, t)
}
,
Un.sortedIndexBy = function(e, t, n) {
return ai(e, t, ls(n, 2))
}
,
Un.sortedIndexOf = function(e, t) {
var n = null == e ? 0 : e.length;
if (n) {
var r = si(e, t);
if (r < n && Oa(e[r], t))
return r
}
return -1
}
,
Un.sortedLastIndex = function(e, t) {
return si(e, t, !0)
}
,
Un.sortedLastIndexBy = function(e, t, n) {
return ai(e, t, ls(n, 2), !0)
}
,
Un.sortedLastIndexOf = function(e, t) {
if (null == e ? 0 : e.length) {
var n = si(e, t, !0) - 1;
if (Oa(e[n], t))
return n
}
return -1
}
,
Un.startCase = Ko,
Un.startsWith = function(e, t, n) {
return e = yo(e),
n = null == n ? 0 : or(fo(n), 0, e.length),
t = ci(t),
e.slice(n, n + t.length) == t
}
,
Un.subtract = Sl,
Un.sum = function(e) {
return e && e.length ? Yt(e, rl) : 0
}
,
Un.sumBy = function(e, t) {
return e && e.length ? Yt(e, ls(t, 2)) : 0
}
,
Un.template = function(e, t, n) {
var r = Un.templateSettings;
n && xs(e, t, n) && (t = i),
e = yo(e),
t = _o({}, t, r, Zi);
var s, a, o = _o({}, t.imports, r.imports, Zi), l = Po(o), c = en(o, l), u = 0, d = t.interpolate || we, h = "__p += '", p = Ee((t.escape || we).source + "|" + d.source + "|" + (d === ee ? fe : we).source + "|" + (t.evaluate || we).source + "|$", "g"), f = "//# sourceURL=" + (Ne.call(t, "sourceURL") ? (t.sourceURL + "").replace(/\s/g, " ") : "lodash.templateSources[" + ++ot + "]") + "\n";
e.replace(p, (function(t, n, r, i, o, l) {
return r || (r = i),
h += e.slice(u, l).replace(Se, on),
n && (s = !0,
h += "' +\n__e(" + n + ") +\n'"),
o && (a = !0,
h += "';\n" + o + ";\n__p += '"),
r && (h += "' +\n((__t = (" + r + ")) == null ? '' : __t) +\n'"),
u = l + t.length,
t
}
)),
h += "';\n";
var m = Ne.call(t, "variable") && t.variable;
if (m) {
if (he.test(m))
throw new oe("Invalid `variable` option passed into `_.template`")
} else
h = "with (obj) {\n" + h + "\n}\n";
h = (a ? h.replace(W, "") : h).replace(J, "$1").replace(X, "$1;"),
h = "function(" + (m || "obj") + ") {\n" + (m ? "" : "obj || (obj = {});\n") + "var __t, __p = ''" + (s ? ", __e = _.escape" : "") + (a ? ", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n" : ";\n") + h + "return __p\n}";
var g = Zo((function() {
return Ae(l, f + "return " + h).apply(i, c)
}
));
if (g.source = h,
qa(g))
throw g;
return g
}
,
Un.times = function(e, t) {
if ((e = fo(e)) < 1 || e > f)
return [];
var n = g
, r = xn(e, g);
t = ls(t),
e -= g;
for (var i = Qt(r, t); ++n < e; )
t(n);
return i
}
,
Un.toFinite = po,
Un.toInteger = fo,
Un.toLength = mo,
Un.toLower = function(e) {
return yo(e).toLowerCase()
}
,
Un.toNumber = go,
Un.toSafeInteger = function(e) {
return e ? or(fo(e), -9007199254740991, f) : 0 === e ? e : 0
}
,
Un.toString = yo,
Un.toUpper = function(e) {
return yo(e).toUpperCase()
}
,
Un.trim = function(e, t, n) {
if ((e = yo(e)) && (n || t === i))
return Zt(e);
if (!e || !(t = ci(t)))
return e;
var r = mn(e)
, s = mn(t);
return _i(r, nn(r, s), rn(r, s) + 1).join("")
}
,
Un.trimEnd = function(e, t, n) {
if ((e = yo(e)) && (n || t === i))
return e.slice(0, gn(e) + 1);
if (!e || !(t = ci(t)))
return e;
var r = mn(e);
return _i(r, 0, rn(r, mn(t)) + 1).join("")
}
,
Un.trimStart = function(e, t, n) {
if ((e = yo(e)) && (n || t === i))
return e.replace(ae, "");
if (!e || !(t = ci(t)))
return e;
var r = mn(e);
return _i(r, nn(r, mn(t))).join("")
}
,
Un.truncate = function(e, t) {
var n = 30
, r = "...";
if ($a(t)) {
var s = "separator"in t ? t.separator : s;
n = "length"in t ? fo(t.length) : n,
r = "omission"in t ? ci(t.omission) : r
}
var a = (e = yo(e)).length;
if (ln(e)) {
var o = mn(e);
a = o.length
}
if (n >= a)
return e;
var l = n - fn(r);
if (l < 1)
return r;
var c = o ? _i(o, 0, l).join("") : e.slice(0, l);
if (s === i)
return c + r;
if (o && (l += c.length - l),
io(s)) {
if (e.slice(l).search(s)) {
var u, d = c;
for (s.global || (s = Ee(s.source, yo(me.exec(s)) + "g")),
s.lastIndex = 0; u = s.exec(d); )
var h = u.index;
c = c.slice(0, h === i ? l : h)
}
} else if (e.indexOf(ci(s), l) != l) {
var p = c.lastIndexOf(s);
p > -1 && (c = c.slice(0, p))
}
return c + r
}
,
Un.unescape = function(e) {
return (e = yo(e)) && Y.test(e) ? e.replace(K, vn) : e
}
,
Un.uniqueId = function(e) {
var t = ++De;
return yo(e) + t
}
,
Un.upperCase = qo,
Un.upperFirst = Yo,
Un.each = va,
Un.eachRight = ya,
Un.first = Ws,
ol(Un, function() {
var e = {};
return br(Un, (function(t, n) {
Ne.call(Un.prototype, n) || (e[n] = t)
}
)),
e
}(), {
chain: !1
}),
Un.VERSION = "4.17.21",
Rt(["bind", "bindKey", "curry", "curryRight", "partial", "partialRight"], (function(e) {
Un[e].placeholder = Un
}
)),
Rt(["drop", "take"], (function(e, t) {
Vn.prototype[e] = function(n) {
n = n === i ? 1 : Kt(fo(n), 0);
var r = this.__filtered__ && !t ? new Vn(this) : this.clone();
return r.__filtered__ ? r.__takeCount__ = xn(n, r.__takeCount__) : r.__views__.push({
size: xn(n, g),
type: e + (r.__dir__ < 0 ? "Right" : "")
}),
r
}
,
Vn.prototype[e + "Right"] = function(t) {
return this.reverse()[e](t).reverse()
}
}
)),
Rt(["filter", "map", "takeWhile"], (function(e, t) {
var n = t + 1
, r = 1 == n || 3 == n;
Vn.prototype[e] = function(e) {
var t = this.clone();
return t.__iteratees__.push({
iteratee: ls(e, 3),
type: n
}),
t.__filtered__ = t.__filtered__ || r,
t
}
}
)),
Rt(["head", "last"], (function(e, t) {
var n = "take" + (t ? "Right" : "");
Vn.prototype[e] = function() {
return this[n](1).value()[0]
}
}
)),
Rt(["initial", "tail"], (function(e, t) {
var n = "drop" + (t ? "" : "Right");
Vn.prototype[e] = function() {
return this.__filtered__ ? new Vn(this) : this[n](1)
}
}
)),
Vn.prototype.compact = function() {
return this.filter(rl)
}
,
Vn.prototype.find = function(e) {
return this.filter(e).head()
}
,
Vn.prototype.findLast = function(e) {
return this.reverse().find(e)
}
,
Vn.prototype.invokeMap = Yr((function(e, t) {
return "function" == typeof e ? new Vn(this) : this.map((function(n) {
return Br(n, e, t)
}
))
}
)),
Vn.prototype.reject = function(e) {
return this.filter(Ia(ls(e)))
}
,
Vn.prototype.slice = function(e, t) {
e = fo(e);
var n = this;
return n.__filtered__ && (e > 0 || t < 0) ? new Vn(n) : (e < 0 ? n = n.takeRight(-e) : e && (n = n.drop(e)),
t !== i && (n = (t = fo(t)) < 0 ? n.dropRight(-t) : n.take(t - e)),
n)
}
,
Vn.prototype.takeRightWhile = function(e) {
return this.reverse().takeWhile(e).reverse()
}
,
Vn.prototype.toArray = function() {
return this.take(g)
}
,
br(Vn.prototype, (function(e, t) {
var n = /^(?:filter|find|map|reject)|While$/.test(t)
, r = /^(?:head|last)$/.test(t)
, s = Un[r ? "take" + ("last" == t ? "Right" : "") : t]
, a = r || /^find/.test(t);
s && (Un.prototype[t] = function() {
var t = this.__wrapped__
, o = r ? [1] : arguments
, l = t instanceof Vn
, c = o[0]
, u = l || Ha(t)
, d = function(e) {
var t = s.apply(Un, Dt([e], o));
return r && h ? t[0] : t
};
u && n && "function" == typeof c && 1 != c.length && (l = u = !1);
var h = this.__chain__
, p = !!this.__actions__.length
, f = a && !h
, m = l && !p;
if (!a && u) {
t = m ? t : new Vn(this);
var g = e.apply(t, o);
return g.__actions__.push({
func: ha,
args: [d],
thisArg: i
}),
new Hn(g,h)
}
return f && m ? e.apply(this, o) : (g = this.thru(d),
f ? r ? g.value()[0] : g.value() : g)
}
)
}
)),
Rt(["pop", "push", "shift", "sort", "splice", "unshift"], (function(e) {
var t = Be[e]
, n = /^(?:push|sort|unshift)$/.test(e) ? "tap" : "thru"
, r = /^(?:pop|shift)$/.test(e);
Un.prototype[e] = function() {
var e = arguments;
if (r && !this.__chain__) {
var i = this.value();
return t.apply(Ha(i) ? i : [], e)
}
return this[n]((function(n) {
return t.apply(Ha(n) ? n : [], e)
}
))
}
}
)),
br(Vn.prototype, (function(e, t) {
var n = Un[t];
if (n) {
var r = n.name + "";
Ne.call(Pn, r) || (Pn[r] = []),
Pn[r].push({
name: t,
func: n
})
}
}
)),
Pn[Ui(i, 2).name] = [{
name: "wrapper",
func: i
}],
Vn.prototype.clone = function() {
var e = new Vn(this.__wrapped__);
return e.__actions__ = Ri(this.__actions__),
e.__dir__ = this.__dir__,
e.__filtered__ = this.__filtered__,
e.__iteratees__ = Ri(this.__iteratees__),
e.__takeCount__ = this.__takeCount__,
e.__views__ = Ri(this.__views__),
e
}
,
Vn.prototype.reverse = function() {
if (this.__filtered__) {
var e = new Vn(this);
e.__dir__ = -1,
e.__filtered__ = !0
} else
(e = this.clone()).__dir__ *= -1;
return e
}
,
Vn.prototype.value = function() {
var e = this.__wrapped__.value()
, t = this.__dir__
, n = Ha(e)
, r = t < 0
, i = n ? e.length : 0
, s = function(e, t, n) {
var r = -1
, i = n.length;
for (; ++r < i; ) {
var s = n[r]
, a = s.size;
switch (s.type) {
case "drop":
e += a;
break;
case "dropRight":
t -= a;
break;
case "take":
t = xn(t, e + a);
break;
case "takeRight":
e = Kt(e, t - a)
}
}
return {
start: e,
end: t
}
}(0, i, this.__views__)
, a = s.start
, o = s.end
, l = o - a
, c = r ? o : a - 1
, u = this.__iteratees__
, d = u.length
, h = 0
, p = xn(l, this.__takeCount__);
if (!n || !r && i == l && p == l)
return fi(e, this.__actions__);
var f = [];
e: for (; l-- && h < p; ) {
for (var m = -1, g = e[c += t]; ++m < d; ) {
var v = u[m]
, y = v.iteratee
, x = v.type
, b = y(g);
if (2 == x)
g = b;
else if (!b) {
if (1 == x)
continue e;
break e
}
}
f[h++] = g
}
return f
}
,
Un.prototype.at = pa,
Un.prototype.chain = function() {
return da(this)
}
,
Un.prototype.commit = function() {
return new Hn(this.value(),this.__chain__)
}
,
Un.prototype.next = function() {
this.__values__ === i && (this.__values__ = ho(this.value()));
var e = this.__index__ >= this.__values__.length;
return {
done: e,
value: e ? i : this.__values__[this.__index__++]
}
}
,
Un.prototype.plant = function(e) {
for (var t, n = this; n instanceof Gn; ) {
var r = Fs(n);
r.__index__ = 0,
r.__values__ = i,
t ? s.__wrapped__ = r : t = r;
var s = r;
n = n.__wrapped__
}
return s.__wrapped__ = e,
t
}
,
Un.prototype.reverse = function() {
var e = this.__wrapped__;
if (e instanceof Vn) {
var t = e;
return this.__actions__.length && (t = new Vn(this)),
(t = t.reverse()).__actions__.push({
func: ha,
args: [$s],
thisArg: i
}),
new Hn(t,this.__chain__)
}
return this.thru($s)
}
,
Un.prototype.toJSON = Un.prototype.valueOf = Un.prototype.value = function() {
return fi(this.__wrapped__, this.__actions__)
}
,
Un.prototype.first = Un.prototype.head,
Qe && (Un.prototype[Qe] = function() {
return this
}
),
Un
}();
mt._ = yn,
(r = function() {
return yn
}
.call(t, n, t, e)) === i || (e.exports = r)
}
.call(this)
},
730: (e, t, n) => {
"use strict";
var r = n(43)
, i = n(67);
function s(e) {
for (var t = "https://reactjs.org/docs/error-decoder.html?invariant=" + e, n = 1; n < arguments.length; n++)
t += "&args[]=" + encodeURIComponent(arguments[n]);
return "Minified React error #" + e + "; visit " + t + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings."
}
var a = new Set
, o = {};
function l(e, t) {
c(e, t),
c(e + "Capture", t)
}
function c(e, t) {
for (o[e] = t,
e = 0; e < t.length; e++)
a.add(t[e])
}
var u = !("undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement)
, d = Object.prototype.hasOwnProperty
, h = /^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/
, p = {}
, f = {};
function m(e, t, n, r, i, s, a) {
this.acceptsBooleans = 2 === t || 3 === t || 4 === t,
this.attributeName = r,
this.attributeNamespace = i,
this.mustUseProperty = n,
this.propertyName = e,
this.type = t,
this.sanitizeURL = s,
this.removeEmptyString = a
}
var g = {};
"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e) {
g[e] = new m(e,0,!1,e,null,!1,!1)
}
)),
[["acceptCharset", "accept-charset"], ["className", "class"], ["htmlFor", "for"], ["httpEquiv", "http-equiv"]].forEach((function(e) {
var t = e[0];
g[t] = new m(t,1,!1,e[1],null,!1,!1)
}
)),
["contentEditable", "draggable", "spellCheck", "value"].forEach((function(e) {
g[e] = new m(e,2,!1,e.toLowerCase(),null,!1,!1)
}
)),
["autoReverse", "externalResourcesRequired", "focusable", "preserveAlpha"].forEach((function(e) {
g[e] = new m(e,2,!1,e,null,!1,!1)
}
)),
"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e) {
g[e] = new m(e,3,!1,e.toLowerCase(),null,!1,!1)
}
)),
["checked", "multiple", "muted", "selected"].forEach((function(e) {
g[e] = new m(e,3,!0,e,null,!1,!1)
}
)),
["capture", "download"].forEach((function(e) {
g[e] = new m(e,4,!1,e,null,!1,!1)
}
)),
["cols", "rows", "size", "span"].forEach((function(e) {
g[e] = new m(e,6,!1,e,null,!1,!1)
}
)),
["rowSpan", "start"].forEach((function(e) {
g[e] = new m(e,5,!1,e.toLowerCase(),null,!1,!1)
}
));
var v = /[\-:]([a-z])/g;
function y(e) {
return e[1].toUpperCase()
}
function x(e, t, n, r) {
var i = g.hasOwnProperty(t) ? g[t] : null;
(null !== i ? 0 !== i.type : r || !(2 < t.length) || "o" !== t[0] && "O" !== t[0] || "n" !== t[1] && "N" !== t[1]) && (function(e, t, n, r) {
if (null === t || "undefined" === typeof t || function(e, t, n, r) {
if (null !== n && 0 === n.type)
return !1;
switch (typeof t) {
case "function":
case "symbol":
return !0;
case "boolean":
return !r && (null !== n ? !n.acceptsBooleans : "data-" !== (e = e.toLowerCase().slice(0, 5)) && "aria-" !== e);
default:
return !1
}
}(e, t, n, r))
return !0;
if (r)
return !1;
if (null !== n)
switch (n.type) {
case 3:
return !t;
case 4:
return !1 === t;
case 5:
return isNaN(t);
case 6:
return isNaN(t) || 1 > t
}
return !1
}(t, n, i, r) && (n = null),
r || null === i ? function(e) {
return !!d.call(f, e) || !d.call(p, e) && (h.test(e) ? f[e] = !0 : (p[e] = !0,
!1))
}(t) && (null === n ? e.removeAttribute(t) : e.setAttribute(t, "" + n)) : i.mustUseProperty ? e[i.propertyName] = null === n ? 3 !== i.type && "" : n : (t = i.attributeName,
r = i.attributeNamespace,
null === n ? e.removeAttribute(t) : (n = 3 === (i = i.type) || 4 === i && !0 === n ? "" : "" + n,
r ? e.setAttributeNS(r, t, n) : e.setAttribute(t, n))))
}
"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e) {
var t = e.replace(v, y);
g[t] = new m(t,1,!1,e,null,!1,!1)
}
)),
"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e) {
var t = e.replace(v, y);
g[t] = new m(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)
}
)),
["xml:base", "xml:lang", "xml:space"].forEach((function(e) {
var t = e.replace(v, y);
g[t] = new m(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)
}
)),
["tabIndex", "crossOrigin"].forEach((function(e) {
g[e] = new m(e,1,!1,e.toLowerCase(),null,!1,!1)
}
)),
g.xlinkHref = new m("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),
["src", "href", "action", "formAction"].forEach((function(e) {
g[e] = new m(e,1,!1,e.toLowerCase(),null,!0,!0)
}
));
var b = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
, _ = Symbol.for("react.element")
, w = Symbol.for("react.portal")
, S = Symbol.for("react.fragment")
, A = Symbol.for("react.strict_mode")
, M = Symbol.for("react.profiler")
, C = Symbol.for("react.provider")
, E = Symbol.for("react.context")
, T = Symbol.for("react.forward_ref")
, R = Symbol.for("react.suspense")
, B = Symbol.for("react.suspense_list")
, P = Symbol.for("react.memo")
, k = Symbol.for("react.lazy");
Symbol.for("react.scope"),
Symbol.for("react.debug_trace_mode");
var L = Symbol.for("react.offscreen");
Symbol.for("react.legacy_hidden"),
Symbol.for("react.cache"),
Symbol.for("react.tracing_marker");
var I = Symbol.iterator;
function N(e) {
return null === e || "object" !== typeof e ? null : "function" === typeof (e = I && e[I] || e["@@iterator"]) ? e : null
}
var D, j = Object.assign;
function F(e) {
if (void 0 === D)
try {
throw Error()
} catch (n) {
var t = n.stack.trim().match(/\n( *(at )?)/);
D = t && t[1] || ""
}
return "\n" + D + e
}
var O = !1;
function U(e, t) {
if (!e || O)
return "";
O = !0;
var n = Error.prepareStackTrace;
Error.prepareStackTrace = void 0;
try {
if (t)
if (t = function() {
throw Error()
}
,
Object.defineProperty(t.prototype, "props", {
set: function() {
throw Error()
}
}),
"object" === typeof Reflect && Reflect.construct) {
try {
Reflect.construct(t, [])
} catch (c) {
var r = c
}
Reflect.construct(e, [], t)
} else {
try {
t.call()
} catch (c) {
r = c
}
e.call(t.prototype)
}
else {
try {
throw Error()
} catch (c) {
r = c
}
e()
}
} catch (c) {
if (c && r && "string" === typeof c.stack) {
for (var i = c.stack.split("\n"), s = r.stack.split("\n"), a = i.length - 1, o = s.length - 1; 1 <= a && 0 <= o && i[a] !== s[o]; )
o--;
for (; 1 <= a && 0 <= o; a--,
o--)
if (i[a] !== s[o]) {
if (1 !== a || 1 !== o)
do {
if (a--,
0 > --o || i[a] !== s[o]) {
var l = "\n" + i[a].replace(" at new ", " at ");
return e.displayName && l.includes("<anonymous>") && (l = l.replace("<anonymous>", e.displayName)),
l
}
} while (1 <= a && 0 <= o);
break
}
}
} finally {
O = !1,
Error.prepareStackTrace = n
}
return (e = e ? e.displayName || e.name : "") ? F(e) : ""
}
function z(e) {
switch (e.tag) {
case 5:
return F(e.type);
case 16:
return F("Lazy");
case 13:
return F("Suspense");
case 19:
return F("SuspenseList");
case 0:
case 2:
case 15:
return e = U(e.type, !1);
case 11:
return e = U(e.type.render, !1);
case 1:
return e = U(e.type, !0);
default:
return ""
}
}
function G(e) {
if (null == e)
return null;
if ("function" === typeof e)
return e.displayName || e.name || null;
if ("string" === typeof e)
return e;
switch (e) {
case S:
return "Fragment";
case w:
return "Portal";
case M:
return "Profiler";
case A:
return "StrictMode";
case R:
return "Suspense";
case B:
return "SuspenseList"
}
if ("object" === typeof e)
switch (e.$$typeof) {
case E:
return (e.displayName || "Context") + ".Consumer";
case C:
return (e._context.displayName || "Context") + ".Provider";
case T:
var t = e.render;
return (e = e.displayName) || (e = "" !== (e = t.displayName || t.name || "") ? "ForwardRef(" + e + ")" : "ForwardRef"),
e;
case P:
return null !== (t = e.displayName || null) ? t : G(e.type) || "Memo";
case k:
t = e._payload,
e = e._init;
try {
return G(e(t))
} catch (n) {}
}
return null
}
function H(e) {
var t = e.type;
switch (e.tag) {
case 24:
return "Cache";
case 9:
return (t.displayName || "Context") + ".Consumer";
case 10:
return (t._context.displayName || "Context") + ".Provider";
case 18:
return "DehydratedFragment";
case 11:
return e = (e = t.render).displayName || e.name || "",
t.displayName || ("" !== e ? "ForwardRef(" + e + ")" : "ForwardRef");
case 7:
return "Fragment";
case 5:
return t;
case 4:
return "Portal";
case 3:
return "Root";
case 6:
return "Text";
case 16:
return G(t);
case 8:
return t === A ? "StrictMode" : "Mode";
case 22:
return "Offscreen";
case 12:
return "Profiler";
case 21:
return "Scope";
case 13:
return "Suspense";
case 19:
return "SuspenseList";
case 25:
return "TracingMarker";
case 1:
case 0:
case 17:
case 2:
case 14:
case 15:
if ("function" === typeof t)
return t.displayName || t.name || null;
if ("string" === typeof t)
return t
}
return null
}
function V(e) {
switch (typeof e) {
case "boolean":
case "number":
case "string":
case "undefined":
case "object":
return e;
default:
return ""
}
}
function W(e) {
var t = e.type;
return (e = e.nodeName) && "input" === e.toLowerCase() && ("checkbox" === t || "radio" === t)
}
function J(e) {
e._valueTracker || (e._valueTracker = function(e) {
var t = W(e) ? "checked" : "value"
, n = Object.getOwnPropertyDescriptor(e.constructor.prototype, t)
, r = "" + e[t];
if (!e.hasOwnProperty(t) && "undefined" !== typeof n && "function" === typeof n.get && "function" === typeof n.set) {
var i = n.get
, s = n.set;
return Object.defineProperty(e, t, {
configurable: !0,
get: function() {
return i.call(this)
},
set: function(e) {
r = "" + e,
s.call(this, e)
}
}),
Object.defineProperty(e, t, {
enumerable: n.enumerable
}),
{
getValue: function() {
return r
},
setValue: function(e) {
r = "" + e
},
stopTracking: function() {
e._valueTracker = null,
delete e[t]
}
}
}
}(e))
}
function X(e) {
if (!e)
return !1;
var t = e._valueTracker;
if (!t)
return !0;
var n = t.getValue()
, r = "";
return e && (r = W(e) ? e.checked ? "true" : "false" : e.value),
(e = r) !== n && (t.setValue(e),
!0)
}
function K(e) {
if ("undefined" === typeof (e = e || ("undefined" !== typeof document ? document : void 0)))
return null;
try {
return e.activeElement || e.body
} catch (t) {
return e.body
}
}
function q(e, t) {
var n = t.checked;
return j({}, t, {
defaultChecked: void 0,
defaultValue: void 0,
value: void 0,
checked: null != n ? n : e._wrapperState.initialChecked
})
}
function Y(e, t) {
var n = null == t.defaultValue ? "" : t.defaultValue
, r = null != t.checked ? t.checked : t.defaultChecked;
n = V(null != t.value ? t.value : n),
e._wrapperState = {
initialChecked: r,
initialValue: n,
controlled: "checkbox" === t.type || "radio" === t.type ? null != t.checked : null != t.value
}
}
function Q(e, t) {
null != (t = t.checked) && x(e, "checked", t, !1)
}
function Z(e, t) {
Q(e, t);
var n = V(t.value)
, r = t.type;
if (null != n)
"number" === r ? (0 === n && "" === e.value || e.value != n) && (e.value = "" + n) : e.value !== "" + n && (e.value = "" + n);
else if ("submit" === r || "reset" === r)
return void e.removeAttribute("value");
t.hasOwnProperty("value") ? ee(e, t.type, n) : t.hasOwnProperty("defaultValue") && ee(e, t.type, V(t.defaultValue)),
null == t.checked && null != t.defaultChecked && (e.defaultChecked = !!t.defaultChecked)
}
function $(e, t, n) {
if (t.hasOwnProperty("value") || t.hasOwnProperty("defaultValue")) {
var r = t.type;
if (!("submit" !== r && "reset" !== r || void 0 !== t.value && null !== t.value))
return;
t = "" + e._wrapperState.initialValue,
n || t === e.value || (e.value = t),
e.defaultValue = t
}
"" !== (n = e.name) && (e.name = ""),
e.defaultChecked = !!e._wrapperState.initialChecked,
"" !== n && (e.name = n)
}
function ee(e, t, n) {
"number" === t && K(e.ownerDocument) === e || (null == n ? e.defaultValue = "" + e._wrapperState.initialValue : e.defaultValue !== "" + n && (e.defaultValue = "" + n))
}
var te = Array.isArray;
function ne(e, t, n, r) {
if (e = e.options,
t) {
t = {};
for (var i = 0; i < n.length; i++)
t["$" + n[i]] = !0;
for (n = 0; n < e.length; n++)
i = t.hasOwnProperty("$" + e[n].value),
e[n].selected !== i && (e[n].selected = i),
i && r && (e[n].defaultSelected = !0)
} else {
for (n = "" + V(n),
t = null,
i = 0; i < e.length; i++) {
if (e[i].value === n)
return e[i].selected = !0,
void (r && (e[i].defaultSelected = !0));
null !== t || e[i].disabled || (t = e[i])
}
null !== t && (t.selected = !0)
}
}
function re(e, t) {
if (null != t.dangerouslySetInnerHTML)
throw Error(s(91));
return j({}, t, {
value: void 0,
defaultValue: void 0,
children: "" + e._wrapperState.initialValue
})
}
function ie(e, t) {
var n = t.value;
if (null == n) {
if (n = t.children,
t = t.defaultValue,
null != n) {
if (null != t)
throw Error(s(92));
if (te(n)) {
if (1 < n.length)
throw Error(s(93));
n = n[0]
}
t = n
}
null == t && (t = ""),
n = t
}
e._wrapperState = {
initialValue: V(n)
}
}
function se(e, t) {
var n = V(t.value)
, r = V(t.defaultValue);
null != n && ((n = "" + n) !== e.value && (e.value = n),
null == t.defaultValue && e.defaultValue !== n && (e.defaultValue = n)),
null != r && (e.defaultValue = "" + r)
}
function ae(e) {
var t = e.textContent;
t === e._wrapperState.initialValue && "" !== t && null !== t && (e.value = t)
}
function oe(e) {
switch (e) {
case "svg":
return "http://www.w3.org/2000/svg";
case "math":
return "http://www.w3.org/1998/Math/MathML";
default:
return "http://www.w3.org/1999/xhtml"
}
}
function le(e, t) {
return null == e || "http://www.w3.org/1999/xhtml" === e ? oe(t) : "http://www.w3.org/2000/svg" === e && "foreignObject" === t ? "http://www.w3.org/1999/xhtml" : e
}
var ce, ue, de = (ue = function(e, t) {
if ("http://www.w3.org/2000/svg" !== e.namespaceURI || "innerHTML"in e)
e.innerHTML = t;
else {
for ((ce = ce || document.createElement("div")).innerHTML = "<svg>" + t.valueOf().toString() + "</svg>",
t = ce.firstChild; e.firstChild; )
e.removeChild(e.firstChild);
for (; t.firstChild; )
e.appendChild(t.firstChild)
}
}
,
"undefined" !== typeof MSApp && MSApp.execUnsafeLocalFunction ? function(e, t, n, r) {
MSApp.execUnsafeLocalFunction((function() {
return ue(e, t)
}
))
}
: ue);
function he(e, t) {
if (t) {
var n = e.firstChild;
if (n && n === e.lastChild && 3 === n.nodeType)
return void (n.nodeValue = t)
}
e.textContent = t
}
var pe = {
animationIterationCount: !0,
aspectRatio: !0,
borderImageOutset: !0,
borderImageSlice: !0,
borderImageWidth: !0,
boxFlex: !0,
boxFlexGroup: !0,
boxOrdinalGroup: !0,
columnCount: !0,
columns: !0,
flex: !0,
flexGrow: !0,
flexPositive: !0,
flexShrink: !0,
flexNegative: !0,
flexOrder: !0,
gridArea: !0,
gridRow: !0,
gridRowEnd: !0,
gridRowSpan: !0,
gridRowStart: !0,
gridColumn: !0,
gridColumnEnd: !0,
gridColumnSpan: !0,
gridColumnStart: !0,
fontWeight: !0,
lineClamp: !0,
lineHeight: !0,
opacity: !0,
order: !0,
orphans: !0,
tabSize: !0,
widows: !0,
zIndex: !0,
zoom: !0,
fillOpacity: !0,
floodOpacity: !0,
stopOpacity: !0,
strokeDasharray: !0,
strokeDashoffset: !0,
strokeMiterlimit: !0,
strokeOpacity: !0,
strokeWidth: !0
}
, fe = ["Webkit", "ms", "Moz", "O"];
function me(e, t, n) {
return null == t || "boolean" === typeof t || "" === t ? "" : n || "number" !== typeof t || 0 === t || pe.hasOwnProperty(e) && pe[e] ? ("" + t).trim() : t + "px"
}
function ge(e, t) {
for (var n in e = e.style,
t)
if (t.hasOwnProperty(n)) {
var r = 0 === n.indexOf("--")
, i = me(n, t[n], r);
"float" === n && (n = "cssFloat"),
r ? e.setProperty(n, i) : e[n] = i
}
}
Object.keys(pe).forEach((function(e) {
fe.forEach((function(t) {
t = t + e.charAt(0).toUpperCase() + e.substring(1),
pe[t] = pe[e]
}
))
}
));
var ve = j({
menuitem: !0
}, {
area: !0,
base: !0,
br: !0,
col: !0,
embed: !0,
hr: !0,
img: !0,
input: !0,
keygen: !0,
link: !0,
meta: !0,
param: !0,
source: !0,
track: !0,
wbr: !0
});
function ye(e, t) {
if (t) {
if (ve[e] && (null != t.children || null != t.dangerouslySetInnerHTML))
throw Error(s(137, e));
if (null != t.dangerouslySetInnerHTML) {
if (null != t.children)
throw Error(s(60));
if ("object" !== typeof t.dangerouslySetInnerHTML || !("__html"in t.dangerouslySetInnerHTML))
throw Error(s(61))
}
if (null != t.style && "object" !== typeof t.style)
throw Error(s(62))
}
}
function xe(e, t) {
if (-1 === e.indexOf("-"))
return "string" === typeof t.is;
switch (e) {
case "annotation-xml":
case "color-profile":
case "font-face":
case "font-face-src":
case "font-face-uri":
case "font-face-format":
case "font-face-name":
case "missing-glyph":
return !1;
default:
return !0
}
}
var be = null;
function _e(e) {
return (e = e.target || e.srcElement || window).correspondingUseElement && (e = e.correspondingUseElement),
3 === e.nodeType ? e.parentNode : e
}
var we = null
, Se = null
, Ae = null;
function Me(e) {
if (e = xi(e)) {
if ("function" !== typeof we)
throw Error(s(280));
var t = e.stateNode;
t && (t = _i(t),
we(e.stateNode, e.type, t))
}
}
function Ce(e) {
Se ? Ae ? Ae.push(e) : Ae = [e] : Se = e
}
function Ee() {
if (Se) {
var e = Se
, t = Ae;
if (Ae = Se = null,
Me(e),
t)
for (e = 0; e < t.length; e++)
Me(t[e])
}
}
function Te(e, t) {
return e(t)
}
function Re() {}
var Be = !1;
function Pe(e, t, n) {
if (Be)
return e(t, n);
Be = !0;
try {
return Te(e, t, n)
} finally {
Be = !1,
(null !== Se || null !== Ae) && (Re(),
Ee())
}
}
function ke(e, t) {
var n = e.stateNode;
if (null === n)
return null;
var r = _i(n);
if (null === r)
return null;
n = r[t];
e: switch (t) {
case "onClick":
case "onClickCapture":
case "onDoubleClick":
case "onDoubleClickCapture":
case "onMouseDown":
case "onMouseDownCapture":
case "onMouseMove":
case "onMouseMoveCapture":
case "onMouseUp":
case "onMouseUpCapture":
case "onMouseEnter":
(r = !r.disabled) || (r = !("button" === (e = e.type) || "input" === e || "select" === e || "textarea" === e)),
e = !r;
break e;
default:
e = !1
}
if (e)
return null;
if (n && "function" !== typeof n)
throw Error(s(231, t, typeof n));
return n
}
var Le = !1;
if (u)
try {
var Ie = {};
Object.defineProperty(Ie, "passive", {
get: function() {
Le = !0
}
}),
window.addEventListener("test", Ie, Ie),
window.removeEventListener("test", Ie, Ie)
} catch (ue) {
Le = !1
}
function Ne(e, t, n, r, i, s, a, o, l) {
var c = Array.prototype.slice.call(arguments, 3);
try {
t.apply(n, c)
} catch (u) {
this.onError(u)
}
}
var De = !1
, je = null
, Fe = !1
, Oe = null
, Ue = {
onError: function(e) {
De = !0,
je = e
}
};
function ze(e, t, n, r, i, s, a, o, l) {
De = !1,
je = null,
Ne.apply(Ue, arguments)
}
function Ge(e) {
var t = e
, n = e;
if (e.alternate)
for (; t.return; )
t = t.return;
else {
e = t;
do {
0 !== (4098 & (t = e).flags) && (n = t.return),
e = t.return
} while (e)
}
return 3 === t.tag ? n : null
}
function He(e) {
if (13 === e.tag) {
var t = e.memoizedState;
if (null === t && (null !== (e = e.alternate) && (t = e.memoizedState)),
null !== t)
return t.dehydrated
}
return null
}
function Ve(e) {
if (Ge(e) !== e)
throw Error(s(188))
}
function We(e) {
return null !== (e = function(e) {
var t = e.alternate;
if (!t) {
if (null === (t = Ge(e)))
throw Error(s(188));
return t !== e ? null : e
}
for (var n = e, r = t; ; ) {
var i = n.return;
if (null === i)
break;
var a = i.alternate;
if (null === a) {
if (null !== (r = i.return)) {
n = r;
continue
}
break
}
if (i.child === a.child) {
for (a = i.child; a; ) {
if (a === n)
return Ve(i),
e;
if (a === r)
return Ve(i),
t;
a = a.sibling
}
throw Error(s(188))
}
if (n.return !== r.return)
n = i,
r = a;
else {
for (var o = !1, l = i.child; l; ) {
if (l === n) {
o = !0,
n = i,
r = a;
break
}
if (l === r) {
o = !0,
r = i,
n = a;
break
}
l = l.sibling
}
if (!o) {
for (l = a.child; l; ) {
if (l === n) {
o = !0,
n = a,
r = i;
break
}
if (l === r) {
o = !0,
r = a,
n = i;
break
}
l = l.sibling
}
if (!o)
throw Error(s(189))
}
}
if (n.alternate !== r)
throw Error(s(190))
}
if (3 !== n.tag)
throw Error(s(188));
return n.stateNode.current === n ? e : t
}(e)) ? Je(e) : null
}
function Je(e) {
if (5 === e.tag || 6 === e.tag)
return e;
for (e = e.child; null !== e; ) {
var t = Je(e);
if (null !== t)
return t;
e = e.sibling
}
return null
}
var Xe = i.unstable_scheduleCallback
, Ke = i.unstable_cancelCallback
, qe = i.unstable_shouldYield
, Ye = i.unstable_requestPaint
, Qe = i.unstable_now
, Ze = i.unstable_getCurrentPriorityLevel
, $e = i.unstable_ImmediatePriority
, et = i.unstable_UserBlockingPriority
, tt = i.unstable_NormalPriority
, nt = i.unstable_LowPriority
, rt = i.unstable_IdlePriority
, it = null
, st = null;
var at = Math.clz32 ? Math.clz32 : function(e) {
return e >>>= 0,
0 === e ? 32 : 31 - (ot(e) / lt | 0) | 0
}
, ot = Math.log
, lt = Math.LN2;
var ct = 64
, ut = 4194304;
function dt(e) {
switch (e & -e) {
case 1:
return 1;
case 2:
return 2;
case 4:
return 4;
case 8:
return 8;
case 16:
return 16;
case 32:
return 32;
case 64:
case 128:
case 256:
case 512:
case 1024:
case 2048:
case 4096:
case 8192:
case 16384:
case 32768:
case 65536:
case 131072:
case 262144:
case 524288:
case 1048576:
case 2097152:
return 4194240 & e;
case 4194304:
case 8388608:
case 16777216:
case 33554432:
case 67108864:
return 130023424 & e;
case 134217728:
return 134217728;
case 268435456:
return 268435456;
case 536870912:
return 536870912;
case 1073741824:
return 1073741824;
default:
return e
}
}
function ht(e, t) {
var n = e.pendingLanes;
if (0 === n)
return 0;
var r = 0
, i = e.suspendedLanes
, s = e.pingedLanes
, a = 268435455 & n;
if (0 !== a) {
var o = a & ~i;
0 !== o ? r = dt(o) : 0 !== (s &= a) && (r = dt(s))
} else
0 !== (a = n & ~i) ? r = dt(a) : 0 !== s && (r = dt(s));
if (0 === r)
return 0;
if (0 !== t && t !== r && 0 === (t & i) && ((i = r & -r) >= (s = t & -t) || 16 === i && 0 !== (4194240 & s)))
return t;
if (0 !== (4 & r) && (r |= 16 & n),
0 !== (t = e.entangledLanes))
for (e = e.entanglements,
t &= r; 0 < t; )
i = 1 << (n = 31 - at(t)),
r |= e[n],
t &= ~i;
return r
}
function pt(e, t) {
switch (e) {
case 1:
case 2:
case 4:
return t + 250;
case 8:
case 16:
case 32:
case 64:
case 128:
case 256:
case 512:
case 1024:
case 2048:
case 4096:
case 8192:
case 16384:
case 32768:
case 65536:
case 131072:
case 262144:
case 524288:
case 1048576:
case 2097152:
return t + 5e3;
default:
return -1
}
}
function ft(e) {
return 0 !== (e = -1073741825 & e.pendingLanes) ? e : 1073741824 & e ? 1073741824 : 0
}
function mt() {
var e = ct;
return 0 === (4194240 & (ct <<= 1)) && (ct = 64),
e
}
function gt(e) {
for (var t = [], n = 0; 31 > n; n++)
t.push(e);
return t
}
function vt(e, t, n) {
e.pendingLanes |= t,
536870912 !== t && (e.suspendedLanes = 0,
e.pingedLanes = 0),
(e = e.eventTimes)[t = 31 - at(t)] = n
}
function yt(e, t) {
var n = e.entangledLanes |= t;
for (e = e.entanglements; n; ) {
var r = 31 - at(n)
, i = 1 << r;
i & t | e[r] & t && (e[r] |= t),
n &= ~i
}
}
var xt = 0;
function bt(e) {
return 1 < (e &= -e) ? 4 < e ? 0 !== (268435455 & e) ? 16 : 536870912 : 4 : 1
}
var _t, wt, St, At, Mt, Ct = !1, Et = [], Tt = null, Rt = null, Bt = null, Pt = new Map, kt = new Map, Lt = [], It = "mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");
function Nt(e, t) {
switch (e) {
case "focusin":
case "focusout":
Tt = null;
break;
case "dragenter":
case "dragleave":
Rt = null;
break;
case "mouseover":
case "mouseout":
Bt = null;
break;
case "pointerover":
case "pointerout":
Pt.delete(t.pointerId);
break;
case "gotpointercapture":
case "lostpointercapture":
kt.delete(t.pointerId)
}
}
function Dt(e, t, n, r, i, s) {
return null === e || e.nativeEvent !== s ? (e = {
blockedOn: t,
domEventName: n,
eventSystemFlags: r,
nativeEvent: s,
targetContainers: [i]
},
null !== t && (null !== (t = xi(t)) && wt(t)),
e) : (e.eventSystemFlags |= r,
t = e.targetContainers,
null !== i && -1 === t.indexOf(i) && t.push(i),
e)
}
function jt(e) {
var t = yi(e.target);
if (null !== t) {
var n = Ge(t);
if (null !== n)
if (13 === (t = n.tag)) {
if (null !== (t = He(n)))
return e.blockedOn = t,
void Mt(e.priority, (function() {
St(n)
}
))
} else if (3 === t && n.stateNode.current.memoizedState.isDehydrated)
return void (e.blockedOn = 3 === n.tag ? n.stateNode.containerInfo : null)
}
e.blockedOn = null
}
function Ft(e) {
if (null !== e.blockedOn)
return !1;
for (var t = e.targetContainers; 0 < t.length; ) {
var n = qt(e.domEventName, e.eventSystemFlags, t[0], e.nativeEvent);
if (null !== n)
return null !== (t = xi(n)) && wt(t),
e.blockedOn = n,
!1;
var r = new (n = e.nativeEvent).constructor(n.type,n);
be = r,
n.target.dispatchEvent(r),
be = null,
t.shift()
}
return !0
}
function Ot(e, t, n) {
Ft(e) && n.delete(t)
}
function Ut() {
Ct = !1,
null !== Tt && Ft(Tt) && (Tt = null),
null !== Rt && Ft(Rt) && (Rt = null),
null !== Bt && Ft(Bt) && (Bt = null),
Pt.forEach(Ot),
kt.forEach(Ot)
}
function zt(e, t) {
e.blockedOn === t && (e.blockedOn = null,
Ct || (Ct = !0,
i.unstable_scheduleCallback(i.unstable_NormalPriority, Ut)))
}
function Gt(e) {
function t(t) {
return zt(t, e)
}
if (0 < Et.length) {
zt(Et[0], e);
for (var n = 1; n < Et.length; n++) {
var r = Et[n];
r.blockedOn === e && (r.blockedOn = null)
}
}
for (null !== Tt && zt(Tt, e),
null !== Rt && zt(Rt, e),
null !== Bt && zt(Bt, e),
Pt.forEach(t),
kt.forEach(t),
n = 0; n < Lt.length; n++)
(r = Lt[n]).blockedOn === e && (r.blockedOn = null);
for (; 0 < Lt.length && null === (n = Lt[0]).blockedOn; )
jt(n),
null === n.blockedOn && Lt.shift()
}
var Ht = b.ReactCurrentBatchConfig
, Vt = !0;
function Wt(e, t, n, r) {
var i = xt
, s = Ht.transition;
Ht.transition = null;
try {
xt = 1,
Xt(e, t, n, r)
} finally {
xt = i,
Ht.transition = s
}
}
function Jt(e, t, n, r) {
var i = xt
, s = Ht.transition;
Ht.transition = null;
try {
xt = 4,
Xt(e, t, n, r)
} finally {
xt = i,
Ht.transition = s
}
}
function Xt(e, t, n, r) {
if (Vt) {
var i = qt(e, t, n, r);
if (null === i)
Vr(e, t, r, Kt, n),
Nt(e, r);
else if (function(e, t, n, r, i) {
switch (t) {
case "focusin":
return Tt = Dt(Tt, e, t, n, r, i),
!0;
case "dragenter":
return Rt = Dt(Rt, e, t, n, r, i),
!0;
case "mouseover":
return Bt = Dt(Bt, e, t, n, r, i),
!0;
case "pointerover":
var s = i.pointerId;
return Pt.set(s, Dt(Pt.get(s) || null, e, t, n, r, i)),
!0;
case "gotpointercapture":
return s = i.pointerId,
kt.set(s, Dt(kt.get(s) || null, e, t, n, r, i)),
!0
}
return !1
}(i, e, t, n, r))
r.stopPropagation();
else if (Nt(e, r),
4 & t && -1 < It.indexOf(e)) {
for (; null !== i; ) {
var s = xi(i);
if (null !== s && _t(s),
null === (s = qt(e, t, n, r)) && Vr(e, t, r, Kt, n),
s === i)
break;
i = s
}
null !== i && r.stopPropagation()
} else
Vr(e, t, r, null, n)
}
}
var Kt = null;
function qt(e, t, n, r) {
if (Kt = null,
null !== (e = yi(e = _e(r))))
if (null === (t = Ge(e)))
e = null;
else if (13 === (n = t.tag)) {
if (null !== (e = He(t)))
return e;
e = null
} else if (3 === n) {
if (t.stateNode.current.memoizedState.isDehydrated)
return 3 === t.tag ? t.stateNode.containerInfo : null;
e = null
} else
t !== e && (e = null);
return Kt = e,
null
}
function Yt(e) {
switch (e) {
case "cancel":
case "click":
case "close":
case "contextmenu":
case "copy":
case "cut":
case "auxclick":
case "dblclick":
case "dragend":
case "dragstart":
case "drop":
case "focusin":
case "focusout":
case "input":
case "invalid":
case "keydown":
case "keypress":
case "keyup":
case "mousedown":
case "mouseup":
case "paste":
case "pause":
case "play":
case "pointercancel":
case "pointerdown":
case "pointerup":
case "ratechange":
case "reset":
case "resize":
case "seeked":
case "submit":
case "touchcancel":
case "touchend":
case "touchstart":
case "volumechange":
case "change":
case "selectionchange":
case "textInput":
case "compositionstart":
case "compositionend":
case "compositionupdate":
case "beforeblur":
case "afterblur":
case "beforeinput":
case "blur":
case "fullscreenchange":
case "focus":
case "hashchange":
case "popstate":
case "select":
case "selectstart":
return 1;
case "drag":
case "dragenter":
case "dragexit":
case "dragleave":
case "dragover":
case "mousemove":
case "mouseout":
case "mouseover":
case "pointermove":
case "pointerout":
case "pointerover":
case "scroll":
case "toggle":
case "touchmove":
case "wheel":
case "mouseenter":
case "mouseleave":
case "pointerenter":
case "pointerleave":
return 4;
case "message":
switch (Ze()) {
case $e:
return 1;
case et:
return 4;
case tt:
case nt:
return 16;
case rt:
return 536870912;
default:
return 16
}
default:
return 16
}
}
var Qt = null
, Zt = null
, $t = null;
function en() {
if ($t)
return $t;
var e, t, n = Zt, r = n.length, i = "value"in Qt ? Qt.value : Qt.textContent, s = i.length;
for (e = 0; e < r && n[e] === i[e]; e++)
;
var a = r - e;
for (t = 1; t <= a && n[r - t] === i[s - t]; t++)
;
return $t = i.slice(e, 1 < t ? 1 - t : void 0)
}
function tn(e) {
var t = e.keyCode;
return "charCode"in e ? 0 === (e = e.charCode) && 13 === t && (e = 13) : e = t,
10 === e && (e = 13),
32 <= e || 13 === e ? e : 0
}
function nn() {
return !0
}
function rn() {
return !1
}
function sn(e) {
function t(t, n, r, i, s) {
for (var a in this._reactName = t,
this._targetInst = r,
this.type = n,
this.nativeEvent = i,
this.target = s,
this.currentTarget = null,
e)
e.hasOwnProperty(a) && (t = e[a],
this[a] = t ? t(i) : i[a]);
return this.isDefaultPrevented = (null != i.defaultPrevented ? i.defaultPrevented : !1 === i.returnValue) ? nn : rn,
this.isPropagationStopped = rn,
this
}
return j(t.prototype, {
preventDefault: function() {
this.defaultPrevented = !0;
var e = this.nativeEvent;
e && (e.preventDefault ? e.preventDefault() : "unknown" !== typeof e.returnValue && (e.returnValue = !1),
this.isDefaultPrevented = nn)
},
stopPropagation: function() {
var e = this.nativeEvent;
e && (e.stopPropagation ? e.stopPropagation() : "unknown" !== typeof e.cancelBubble && (e.cancelBubble = !0),
this.isPropagationStopped = nn)
},
persist: function() {},
isPersistent: nn
}),
t
}
var an, on, ln, cn = {
eventPhase: 0,
bubbles: 0,
cancelable: 0,
timeStamp: function(e) {
return e.timeStamp || Date.now()
},
defaultPrevented: 0,
isTrusted: 0
}, un = sn(cn), dn = j({}, cn, {
view: 0,
detail: 0
}), hn = sn(dn), pn = j({}, dn, {
screenX: 0,
screenY: 0,
clientX: 0,
clientY: 0,
pageX: 0,
pageY: 0,
ctrlKey: 0,
shiftKey: 0,
altKey: 0,
metaKey: 0,
getModifierState: Mn,
button: 0,
buttons: 0,
relatedTarget: function(e) {
return void 0 === e.relatedTarget ? e.fromElement === e.srcElement ? e.toElement : e.fromElement : e.relatedTarget
},
movementX: function(e) {
return "movementX"in e ? e.movementX : (e !== ln && (ln && "mousemove" === e.type ? (an = e.screenX - ln.screenX,
on = e.screenY - ln.screenY) : on = an = 0,
ln = e),
an)
},
movementY: function(e) {
return "movementY"in e ? e.movementY : on
}
}), fn = sn(pn), mn = sn(j({}, pn, {
dataTransfer: 0
})), gn = sn(j({}, dn, {
relatedTarget: 0
})), vn = sn(j({}, cn, {
animationName: 0,
elapsedTime: 0,
pseudoElement: 0
})), yn = j({}, cn, {
clipboardData: function(e) {
return "clipboardData"in e ? e.clipboardData : window.clipboardData
}
}), xn = sn(yn), bn = sn(j({}, cn, {
data: 0
})), _n = {
Esc: "Escape",
Spacebar: " ",
Left: "ArrowLeft",
Up: "ArrowUp",
Right: "ArrowRight",
Down: "ArrowDown",
Del: "Delete",
Win: "OS",
Menu: "ContextMenu",
Apps: "ContextMenu",
Scroll: "ScrollLock",
MozPrintableKey: "Unidentified"
}, wn = {
8: "Backspace",
9: "Tab",
12: "Clear",
13: "Enter",
16: "Shift",
17: "Control",
18: "Alt",
19: "Pause",
20: "CapsLock",
27: "Escape",
32: " ",
33: "PageUp",
34: "PageDown",
35: "End",
36: "Home",
37: "ArrowLeft",
38: "ArrowUp",
39: "ArrowRight",
40: "ArrowDown",
45: "Insert",
46: "Delete",
112: "F1",
113: "F2",
114: "F3",
115: "F4",
116: "F5",
117: "F6",
118: "F7",
119: "F8",
120: "F9",
121: "F10",
122: "F11",
123: "F12",
144: "NumLock",
145: "ScrollLock",
224: "Meta"
}, Sn = {
Alt: "altKey",
Control: "ctrlKey",
Meta: "metaKey",
Shift: "shiftKey"
};
function An(e) {
var t = this.nativeEvent;
return t.getModifierState ? t.getModifierState(e) : !!(e = Sn[e]) && !!t[e]
}
function Mn() {
return An
}
var Cn = j({}, dn, {
key: function(e) {
if (e.key) {
var t = _n[e.key] || e.key;
if ("Unidentified" !== t)
return t
}
return "keypress" === e.type ? 13 === (e = tn(e)) ? "Enter" : String.fromCharCode(e) : "keydown" === e.type || "keyup" === e.type ? wn[e.keyCode] || "Unidentified" : ""
},
code: 0,
location: 0,
ctrlKey: 0,
shiftKey: 0,
altKey: 0,
metaKey: 0,
repeat: 0,
locale: 0,
getModifierState: Mn,
charCode: function(e) {
return "keypress" === e.type ? tn(e) : 0
},
keyCode: function(e) {
return "keydown" === e.type || "keyup" === e.type ? e.keyCode : 0
},
which: function(e) {
return "keypress" === e.type ? tn(e) : "keydown" === e.type || "keyup" === e.type ? e.keyCode : 0
}
})
, En = sn(Cn)
, Tn = sn(j({}, pn, {
pointerId: 0,
width: 0,
height: 0,
pressure: 0,
tangentialPressure: 0,
tiltX: 0,
tiltY: 0,
twist: 0,
pointerType: 0,
isPrimary: 0
}))
, Rn = sn(j({}, dn, {
touches: 0,
targetTouches: 0,
changedTouches: 0,
altKey: 0,
metaKey: 0,
ctrlKey: 0,
shiftKey: 0,
getModifierState: Mn
}))
, Bn = sn(j({}, cn, {
propertyName: 0,
elapsedTime: 0,
pseudoElement: 0
}))
, Pn = j({}, pn, {
deltaX: function(e) {
return "deltaX"in e ? e.deltaX : "wheelDeltaX"in e ? -e.wheelDeltaX : 0
},
deltaY: function(e) {
return "deltaY"in e ? e.deltaY : "wheelDeltaY"in e ? -e.wheelDeltaY : "wheelDelta"in e ? -e.wheelDelta : 0
},
deltaZ: 0,
deltaMode: 0
})
, kn = sn(Pn)
, Ln = [9, 13, 27, 32]
, In = u && "CompositionEvent"in window
, Nn = null;
u && "documentMode"in document && (Nn = document.documentMode);
var Dn = u && "TextEvent"in window && !Nn
, jn = u && (!In || Nn && 8 < Nn && 11 >= Nn)
, Fn = String.fromCharCode(32)
, On = !1;
function Un(e, t) {
switch (e) {
case "keyup":
return -1 !== Ln.indexOf(t.keyCode);
case "keydown":
return 229 !== t.keyCode;
case "keypress":
case "mousedown":
case "focusout":
return !0;
default:
return !1
}
}
function zn(e) {
return "object" === typeof (e = e.detail) && "data"in e ? e.data : null
}
var Gn = !1;
var Hn = {
color: !0,
date: !0,
datetime: !0,
"datetime-local": !0,
email: !0,
month: !0,
number: !0,
password: !0,
range: !0,
search: !0,
tel: !0,
text: !0,
time: !0,
url: !0,
week: !0
};
function Vn(e) {
var t = e && e.nodeName && e.nodeName.toLowerCase();
return "input" === t ? !!Hn[e.type] : "textarea" === t
}
function Wn(e, t, n, r) {
Ce(r),
0 < (t = Jr(t, "onChange")).length && (n = new un("onChange","change",null,n,r),
e.push({
event: n,
listeners: t
}))
}
var Jn = null
, Xn = null;
function Kn(e) {
Fr(e, 0)
}
function qn(e) {
if (X(bi(e)))
return e
}
function Yn(e, t) {
if ("change" === e)
return t
}
var Qn = !1;
if (u) {
var Zn;
if (u) {
var $n = "oninput"in document;
if (!$n) {
var er = document.createElement("div");
er.setAttribute("oninput", "return;"),
$n = "function" === typeof er.oninput
}
Zn = $n
} else
Zn = !1;
Qn = Zn && (!document.documentMode || 9 < document.documentMode)
}
function tr() {
Jn && (Jn.detachEvent("onpropertychange", nr),
Xn = Jn = null)
}
function nr(e) {
if ("value" === e.propertyName && qn(Xn)) {
var t = [];
Wn(t, Xn, e, _e(e)),
Pe(Kn, t)
}
}
function rr(e, t, n) {
"focusin" === e ? (tr(),
Xn = n,
(Jn = t).attachEvent("onpropertychange", nr)) : "focusout" === e && tr()
}
function ir(e) {
if ("selectionchange" === e || "keyup" === e || "keydown" === e)
return qn(Xn)
}
function sr(e, t) {
if ("click" === e)
return qn(t)
}
function ar(e, t) {
if ("input" === e || "change" === e)
return qn(t)
}
var or = "function" === typeof Object.is ? Object.is : function(e, t) {
return e === t && (0 !== e || 1 / e === 1 / t) || e !== e && t !== t
}
;
function lr(e, t) {
if (or(e, t))
return !0;
if ("object" !== typeof e || null === e || "object" !== typeof t || null === t)
return !1;
var n = Object.keys(e)
, r = Object.keys(t);
if (n.length !== r.length)
return !1;
for (r = 0; r < n.length; r++) {
var i = n[r];
if (!d.call(t, i) || !or(e[i], t[i]))
return !1
}
return !0
}
function cr(e) {
for (; e && e.firstChild; )
e = e.firstChild;
return e
}
function ur(e, t) {
var n, r = cr(e);
for (e = 0; r; ) {
if (3 === r.nodeType) {
if (n = e + r.textContent.length,
e <= t && n >= t)
return {
node: r,
offset: t - e
};
e = n
}
e: {
for (; r; ) {
if (r.nextSibling) {
r = r.nextSibling;
break e
}
r = r.parentNode
}
r = void 0
}
r = cr(r)
}
}
function dr(e, t) {
return !(!e || !t) && (e === t || (!e || 3 !== e.nodeType) && (t && 3 === t.nodeType ? dr(e, t.parentNode) : "contains"in e ? e.contains(t) : !!e.compareDocumentPosition && !!(16 & e.compareDocumentPosition(t))))
}
function hr() {
for (var e = window, t = K(); t instanceof e.HTMLIFrameElement; ) {
try {
var n = "string" === typeof t.contentWindow.location.href
} catch (r) {
n = !1
}
if (!n)
break;
t = K((e = t.contentWindow).document)
}
return t
}
function pr(e) {
var t = e && e.nodeName && e.nodeName.toLowerCase();
return t && ("input" === t && ("text" === e.type || "search" === e.type || "tel" === e.type || "url" === e.type || "password" === e.type) || "textarea" === t || "true" === e.contentEditable)
}
function fr(e) {
var t = hr()
, n = e.focusedElem
, r = e.selectionRange;
if (t !== n && n && n.ownerDocument && dr(n.ownerDocument.documentElement, n)) {
if (null !== r && pr(n))
if (t = r.start,
void 0 === (e = r.end) && (e = t),
"selectionStart"in n)
n.selectionStart = t,
n.selectionEnd = Math.min(e, n.value.length);
else if ((e = (t = n.ownerDocument || document) && t.defaultView || window).getSelection) {
e = e.getSelection();
var i = n.textContent.length
, s = Math.min(r.start, i);
r = void 0 === r.end ? s : Math.min(r.end, i),
!e.extend && s > r && (i = r,
r = s,
s = i),
i = ur(n, s);
var a = ur(n, r);
i && a && (1 !== e.rangeCount || e.anchorNode !== i.node || e.anchorOffset !== i.offset || e.focusNode !== a.node || e.focusOffset !== a.offset) && ((t = t.createRange()).setStart(i.node, i.offset),
e.removeAllRanges(),
s > r ? (e.addRange(t),
e.extend(a.node, a.offset)) : (t.setEnd(a.node, a.offset),
e.addRange(t)))
}
for (t = [],
e = n; e = e.parentNode; )
1 === e.nodeType && t.push({
element: e,
left: e.scrollLeft,
top: e.scrollTop
});
for ("function" === typeof n.focus && n.focus(),
n = 0; n < t.length; n++)
(e = t[n]).element.scrollLeft = e.left,
e.element.scrollTop = e.top
}
}
var mr = u && "documentMode"in document && 11 >= document.documentMode
, gr = null
, vr = null
, yr = null
, xr = !1;
function br(e, t, n) {
var r = n.window === n ? n.document : 9 === n.nodeType ? n : n.ownerDocument;
xr || null == gr || gr !== K(r) || ("selectionStart"in (r = gr) && pr(r) ? r = {
start: r.selectionStart,
end: r.selectionEnd
} : r = {
anchorNode: (r = (r.ownerDocument && r.ownerDocument.defaultView || window).getSelection()).anchorNode,
anchorOffset: r.anchorOffset,
focusNode: r.focusNode,
focusOffset: r.focusOffset
},
yr && lr(yr, r) || (yr = r,
0 < (r = Jr(vr, "onSelect")).length && (t = new un("onSelect","select",null,t,n),
e.push({
event: t,
listeners: r
}),
t.target = gr)))
}
function _r(e, t) {
var n = {};
return n[e.toLowerCase()] = t.toLowerCase(),
n["Webkit" + e] = "webkit" + t,
n["Moz" + e] = "moz" + t,
n
}
var wr = {
animationend: _r("Animation", "AnimationEnd"),
animationiteration: _r("Animation", "AnimationIteration"),
animationstart: _r("Animation", "AnimationStart"),
transitionend: _r("Transition", "TransitionEnd")
}
, Sr = {}
, Ar = {};
function Mr(e) {
if (Sr[e])
return Sr[e];
if (!wr[e])
return e;
var t, n = wr[e];
for (t in n)
if (n.hasOwnProperty(t) && t in Ar)
return Sr[e] = n[t];
return e
}
u && (Ar = document.createElement("div").style,
"AnimationEvent"in window || (delete wr.animationend.animation,
delete wr.animationiteration.animation,
delete wr.animationstart.animation),
"TransitionEvent"in window || delete wr.transitionend.transition);
var Cr = Mr("animationend")
, Er = Mr("animationiteration")
, Tr = Mr("animationstart")
, Rr = Mr("transitionend")
, Br = new Map
, Pr = "abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");
function kr(e, t) {
Br.set(e, t),
l(t, [e])
}
for (var Lr = 0; Lr < Pr.length; Lr++) {
var Ir = Pr[Lr];
kr(Ir.toLowerCase(), "on" + (Ir[0].toUpperCase() + Ir.slice(1)))
}
kr(Cr, "onAnimationEnd"),
kr(Er, "onAnimationIteration"),
kr(Tr, "onAnimationStart"),
kr("dblclick", "onDoubleClick"),
kr("focusin", "onFocus"),
kr("focusout", "onBlur"),
kr(Rr, "onTransitionEnd"),
c("onMouseEnter", ["mouseout", "mouseover"]),
c("onMouseLeave", ["mouseout", "mouseover"]),
c("onPointerEnter", ["pointerout", "pointerover"]),
c("onPointerLeave", ["pointerout", "pointerover"]),
l("onChange", "change click focusin focusout input keydown keyup selectionchange".split(" ")),
l("onSelect", "focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),
l("onBeforeInput", ["compositionend", "keypress", "textInput", "paste"]),
l("onCompositionEnd", "compositionend focusout keydown keypress keyup mousedown".split(" ")),
l("onCompositionStart", "compositionstart focusout keydown keypress keyup mousedown".split(" ")),
l("onCompositionUpdate", "compositionupdate focusout keydown keypress keyup mousedown".split(" "));
var Nr = "abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" ")
, Dr = new Set("cancel close invalid load scroll toggle".split(" ").concat(Nr));
function jr(e, t, n) {
var r = e.type || "unknown-event";
e.currentTarget = n,
function(e, t, n, r, i, a, o, l, c) {
if (ze.apply(this, arguments),
De) {
if (!De)
throw Error(s(198));
var u = je;
De = !1,
je = null,
Fe || (Fe = !0,
Oe = u)
}
}(r, t, void 0, e),
e.currentTarget = null
}
function Fr(e, t) {
t = 0 !== (4 & t);
for (var n = 0; n < e.length; n++) {
var r = e[n]
, i = r.event;
r = r.listeners;
e: {
var s = void 0;
if (t)
for (var a = r.length - 1; 0 <= a; a--) {
var o = r[a]
, l = o.instance
, c = o.currentTarget;
if (o = o.listener,
l !== s && i.isPropagationStopped())
break e;
jr(i, o, c),
s = l
}
else
for (a = 0; a < r.length; a++) {
if (l = (o = r[a]).instance,
c = o.currentTarget,
o = o.listener,
l !== s && i.isPropagationStopped())
break e;
jr(i, o, c),
s = l
}
}
}
if (Fe)
throw e = Oe,
Fe = !1,
Oe = null,
e
}
function Or(e, t) {
var n = t[mi];
void 0 === n && (n = t[mi] = new Set);
var r = e + "__bubble";
n.has(r) || (Hr(t, e, 2, !1),
n.add(r))
}
function Ur(e, t, n) {
var r = 0;
t && (r |= 4),
Hr(n, e, r, t)
}
var zr = "_reactListening" + Math.random().toString(36).slice(2);
function Gr(e) {
if (!e[zr]) {
e[zr] = !0,
a.forEach((function(t) {
"selectionchange" !== t && (Dr.has(t) || Ur(t, !1, e),
Ur(t, !0, e))
}
));
var t = 9 === e.nodeType ? e : e.ownerDocument;
null === t || t[zr] || (t[zr] = !0,
Ur("selectionchange", !1, t))
}
}
function Hr(e, t, n, r) {
switch (Yt(t)) {
case 1:
var i = Wt;
break;
case 4:
i = Jt;
break;
default:
i = Xt
}
n = i.bind(null, t, n, e),
i = void 0,
!Le || "touchstart" !== t && "touchmove" !== t && "wheel" !== t || (i = !0),
r ? void 0 !== i ? e.addEventListener(t, n, {
capture: !0,
passive: i
}) : e.addEventListener(t, n, !0) : void 0 !== i ? e.addEventListener(t, n, {
passive: i
}) : e.addEventListener(t, n, !1)
}
function Vr(e, t, n, r, i) {
var s = r;
if (0 === (1 & t) && 0 === (2 & t) && null !== r)
e: for (; ; ) {
if (null === r)
return;
var a = r.tag;
if (3 === a || 4 === a) {
var o = r.stateNode.containerInfo;
if (o === i || 8 === o.nodeType && o.parentNode === i)
break;
if (4 === a)
for (a = r.return; null !== a; ) {
var l = a.tag;
if ((3 === l || 4 === l) && ((l = a.stateNode.containerInfo) === i || 8 === l.nodeType && l.parentNode === i))
return;
a = a.return
}
for (; null !== o; ) {
if (null === (a = yi(o)))
return;
if (5 === (l = a.tag) || 6 === l) {
r = s = a;
continue e
}
o = o.parentNode
}
}
r = r.return
}
Pe((function() {
var r = s
, i = _e(n)
, a = [];
e: {
var o = Br.get(e);
if (void 0 !== o) {
var l = un
, c = e;
switch (e) {
case "keypress":
if (0 === tn(n))
break e;
case "keydown":
case "keyup":
l = En;
break;
case "focusin":
c = "focus",
l = gn;
break;
case "focusout":
c = "blur",
l = gn;
break;
case "beforeblur":
case "afterblur":
l = gn;
break;
case "click":
if (2 === n.button)
break e;
case "auxclick":
case "dblclick":
case "mousedown":
case "mousemove":
case "mouseup":
case "mouseout":
case "mouseover":
case "contextmenu":
l = fn;
break;
case "drag":
case "dragend":
case "dragenter":
case "dragexit":
case "dragleave":
case "dragover":
case "dragstart":
case "drop":
l = mn;
break;
case "touchcancel":
case "touchend":
case "touchmove":
case "touchstart":
l = Rn;
break;
case Cr:
case Er:
case Tr:
l = vn;
break;
case Rr:
l = Bn;
break;
case "scroll":
l = hn;
break;
case "wheel":
l = kn;
break;
case "copy":
case "cut":
case "paste":
l = xn;
break;
case "gotpointercapture":
case "lostpointercapture":
case "pointercancel":
case "pointerdown":
case "pointermove":
case "pointerout":
case "pointerover":
case "pointerup":
l = Tn
}
var u = 0 !== (4 & t)
, d = !u && "scroll" === e
, h = u ? null !== o ? o + "Capture" : null : o;
u = [];
for (var p, f = r; null !== f; ) {
var m = (p = f).stateNode;
if (5 === p.tag && null !== m && (p = m,
null !== h && (null != (m = ke(f, h)) && u.push(Wr(f, m, p)))),
d)
break;
f = f.return
}
0 < u.length && (o = new l(o,c,null,n,i),
a.push({
event: o,
listeners: u
}))
}
}
if (0 === (7 & t)) {
if (l = "mouseout" === e || "pointerout" === e,
(!(o = "mouseover" === e || "pointerover" === e) || n === be || !(c = n.relatedTarget || n.fromElement) || !yi(c) && !c[fi]) && (l || o) && (o = i.window === i ? i : (o = i.ownerDocument) ? o.defaultView || o.parentWindow : window,
l ? (l = r,
null !== (c = (c = n.relatedTarget || n.toElement) ? yi(c) : null) && (c !== (d = Ge(c)) || 5 !== c.tag && 6 !== c.tag) && (c = null)) : (l = null,
c = r),
l !== c)) {
if (u = fn,
m = "onMouseLeave",
h = "onMouseEnter",
f = "mouse",
"pointerout" !== e && "pointerover" !== e || (u = Tn,
m = "onPointerLeave",
h = "onPointerEnter",
f = "pointer"),
d = null == l ? o : bi(l),
p = null == c ? o : bi(c),
(o = new u(m,f + "leave",l,n,i)).target = d,
o.relatedTarget = p,
m = null,
yi(i) === r && ((u = new u(h,f + "enter",c,n,i)).target = p,
u.relatedTarget = d,
m = u),
d = m,
l && c)
e: {
for (h = c,
f = 0,
p = u = l; p; p = Xr(p))
f++;
for (p = 0,
m = h; m; m = Xr(m))
p++;
for (; 0 < f - p; )
u = Xr(u),
f--;
for (; 0 < p - f; )
h = Xr(h),
p--;
for (; f--; ) {
if (u === h || null !== h && u === h.alternate)
break e;
u = Xr(u),
h = Xr(h)
}
u = null
}
else
u = null;
null !== l && Kr(a, o, l, u, !1),
null !== c && null !== d && Kr(a, d, c, u, !0)
}
if ("select" === (l = (o = r ? bi(r) : window).nodeName && o.nodeName.toLowerCase()) || "input" === l && "file" === o.type)
var g = Yn;
else if (Vn(o))
if (Qn)
g = ar;
else {
g = ir;
var v = rr
}
else
(l = o.nodeName) && "input" === l.toLowerCase() && ("checkbox" === o.type || "radio" === o.type) && (g = sr);
switch (g && (g = g(e, r)) ? Wn(a, g, n, i) : (v && v(e, o, r),
"focusout" === e && (v = o._wrapperState) && v.controlled && "number" === o.type && ee(o, "number", o.value)),
v = r ? bi(r) : window,
e) {
case "focusin":
(Vn(v) || "true" === v.contentEditable) && (gr = v,
vr = r,
yr = null);
break;
case "focusout":
yr = vr = gr = null;
break;
case "mousedown":
xr = !0;
break;
case "contextmenu":
case "mouseup":
case "dragend":
xr = !1,
br(a, n, i);
break;
case "selectionchange":
if (mr)
break;
case "keydown":
case "keyup":
br(a, n, i)
}
var y;
if (In)
e: {
switch (e) {
case "compositionstart":
var x = "onCompositionStart";
break e;
case "compositionend":
x = "onCompositionEnd";
break e;
case "compositionupdate":
x = "onCompositionUpdate";
break e
}
x = void 0
}
else
Gn ? Un(e, n) && (x = "onCompositionEnd") : "keydown" === e && 229 === n.keyCode && (x = "onCompositionStart");
x && (jn && "ko" !== n.locale && (Gn || "onCompositionStart" !== x ? "onCompositionEnd" === x && Gn && (y = en()) : (Zt = "value"in (Qt = i) ? Qt.value : Qt.textContent,
Gn = !0)),
0 < (v = Jr(r, x)).length && (x = new bn(x,e,null,n,i),
a.push({
event: x,
listeners: v
}),
y ? x.data = y : null !== (y = zn(n)) && (x.data = y))),
(y = Dn ? function(e, t) {
switch (e) {
case "compositionend":
return zn(t);
case "keypress":
return 32 !== t.which ? null : (On = !0,
Fn);
case "textInput":
return (e = t.data) === Fn && On ? null : e;
default:
return null
}
}(e, n) : function(e, t) {
if (Gn)
return "compositionend" === e || !In && Un(e, t) ? (e = en(),
$t = Zt = Qt = null,
Gn = !1,
e) : null;
switch (e) {
case "paste":
default:
return null;
case "keypress":
if (!(t.ctrlKey || t.altKey || t.metaKey) || t.ctrlKey && t.altKey) {
if (t.char && 1 < t.char.length)
return t.char;
if (t.which)
return String.fromCharCode(t.which)
}
return null;
case "compositionend":
return jn && "ko" !== t.locale ? null : t.data
}
}(e, n)) && (0 < (r = Jr(r, "onBeforeInput")).length && (i = new bn("onBeforeInput","beforeinput",null,n,i),
a.push({
event: i,
listeners: r
}),
i.data = y))
}
Fr(a, t)
}
))
}
function Wr(e, t, n) {
return {
instance: e,
listener: t,
currentTarget: n
}
}
function Jr(e, t) {
for (var n = t + "Capture", r = []; null !== e; ) {
var i = e
, s = i.stateNode;
5 === i.tag && null !== s && (i = s,
null != (s = ke(e, n)) && r.unshift(Wr(e, s, i)),
null != (s = ke(e, t)) && r.push(Wr(e, s, i))),
e = e.return
}
return r
}
function Xr(e) {
if (null === e)
return null;
do {
e = e.return
} while (e && 5 !== e.tag);
return e || null
}
function Kr(e, t, n, r, i) {
for (var s = t._reactName, a = []; null !== n && n !== r; ) {
var o = n
, l = o.alternate
, c = o.stateNode;
if (null !== l && l === r)
break;
5 === o.tag && null !== c && (o = c,
i ? null != (l = ke(n, s)) && a.unshift(Wr(n, l, o)) : i || null != (l = ke(n, s)) && a.push(Wr(n, l, o))),
n = n.return
}
0 !== a.length && e.push({
event: t,
listeners: a
})
}
var qr = /\r\n?/g
, Yr = /\u0000|\uFFFD/g;
function Qr(e) {
return ("string" === typeof e ? e : "" + e).replace(qr, "\n").replace(Yr, "")
}
function Zr(e, t, n) {
if (t = Qr(t),
Qr(e) !== t && n)
throw Error(s(425))
}
function $r() {}
var ei = null
, ti = null;
function ni(e, t) {
return "textarea" === e || "noscript" === e || "string" === typeof t.children || "number" === typeof t.children || "object" === typeof t.dangerouslySetInnerHTML && null !== t.dangerouslySetInnerHTML && null != t.dangerouslySetInnerHTML.__html
}
var ri = "function" === typeof setTimeout ? setTimeout : void 0
, ii = "function" === typeof clearTimeout ? clearTimeout : void 0
, si = "function" === typeof Promise ? Promise : void 0
, ai = "function" === typeof queueMicrotask ? queueMicrotask : "undefined" !== typeof si ? function(e) {
return si.resolve(null).then(e).catch(oi)
}
: ri;
function oi(e) {
setTimeout((function() {
throw e
}
))
}
function li(e, t) {
var n = t
, r = 0;
do {
var i = n.nextSibling;
if (e.removeChild(n),
i && 8 === i.nodeType)
if ("/$" === (n = i.data)) {
if (0 === r)
return e.removeChild(i),
void Gt(t);
r--
} else
"$" !== n && "$?" !== n && "$!" !== n || r++;
n = i
} while (n);
Gt(t)
}
function ci(e) {
for (; null != e; e = e.nextSibling) {
var t = e.nodeType;
if (1 === t || 3 === t)
break;
if (8 === t) {
if ("$" === (t = e.data) || "$!" === t || "$?" === t)
break;
if ("/$" === t)
return null
}
}
return e
}
function ui(e) {
e = e.previousSibling;
for (var t = 0; e; ) {
if (8 === e.nodeType) {
var n = e.data;
if ("$" === n || "$!" === n || "$?" === n) {
if (0 === t)
return e;
t--
} else
"/$" === n && t++
}
e = e.previousSibling
}
return null
}
var di = Math.random().toString(36).slice(2)
, hi = "__reactFiber$" + di
, pi = "__reactProps$" + di
, fi = "__reactContainer$" + di
, mi = "__reactEvents$" + di
, gi = "__reactListeners$" + di
, vi = "__reactHandles$" + di;
function yi(e) {
var t = e[hi];
if (t)
return t;
for (var n = e.parentNode; n; ) {
if (t = n[fi] || n[hi]) {
if (n = t.alternate,
null !== t.child || null !== n && null !== n.child)
for (e = ui(e); null !== e; ) {
if (n = e[hi])
return n;
e = ui(e)
}
return t
}
n = (e = n).parentNode
}
return null
}
function xi(e) {
return !(e = e[hi] || e[fi]) || 5 !== e.tag && 6 !== e.tag && 13 !== e.tag && 3 !== e.tag ? null : e
}
function bi(e) {
if (5 === e.tag || 6 === e.tag)
return e.stateNode;
throw Error(s(33))
}
function _i(e) {
return e[pi] || null
}
var wi = []
, Si = -1;
function Ai(e) {
return {
current: e
}
}
function Mi(e) {
0 > Si || (e.current = wi[Si],
wi[Si] = null,
Si--)
}
function Ci(e, t) {
Si++,
wi[Si] = e.current,
e.current = t
}
var Ei = {}
, Ti = Ai(Ei)
, Ri = Ai(!1)
, Bi = Ei;
function Pi(e, t) {
var n = e.type.contextTypes;
if (!n)
return Ei;
var r = e.stateNode;
if (r && r.__reactInternalMemoizedUnmaskedChildContext === t)
return r.__reactInternalMemoizedMaskedChildContext;
var i, s = {};
for (i in n)
s[i] = t[i];
return r && ((e = e.stateNode).__reactInternalMemoizedUnmaskedChildContext = t,
e.__reactInternalMemoizedMaskedChildContext = s),
s
}
function ki(e) {
return null !== (e = e.childContextTypes) && void 0 !== e
}
function Li() {
Mi(Ri),
Mi(Ti)
}
function Ii(e, t, n) {
if (Ti.current !== Ei)
throw Error(s(168));
Ci(Ti, t),
Ci(Ri, n)
}
function Ni(e, t, n) {
var r = e.stateNode;
if (t = t.childContextTypes,
"function" !== typeof r.getChildContext)
return n;
for (var i in r = r.getChildContext())
if (!(i in t))
throw Error(s(108, H(e) || "Unknown", i));
return j({}, n, r)
}
function Di(e) {
return e = (e = e.stateNode) && e.__reactInternalMemoizedMergedChildContext || Ei,
Bi = Ti.current,
Ci(Ti, e),
Ci(Ri, Ri.current),
!0
}
function ji(e, t, n) {
var r = e.stateNode;
if (!r)
throw Error(s(169));
n ? (e = Ni(e, t, Bi),
r.__reactInternalMemoizedMergedChildContext = e,
Mi(Ri),
Mi(Ti),
Ci(Ti, e)) : Mi(Ri),
Ci(Ri, n)
}
var Fi = null
, Oi = !1
, Ui = !1;
function zi(e) {
null === Fi ? Fi = [e] : Fi.push(e)
}
function Gi() {
if (!Ui && null !== Fi) {
Ui = !0;
var e = 0
, t = xt;
try {
var n = Fi;
for (xt = 1; e < n.length; e++) {
var r = n[e];
do {
r = r(!0)
} while (null !== r)
}
Fi = null,
Oi = !1
} catch (i) {
throw null !== Fi && (Fi = Fi.slice(e + 1)),
Xe($e, Gi),
i
} finally {
xt = t,
Ui = !1
}
}
return null
}
var Hi = []
, Vi = 0
, Wi = null
, Ji = 0
, Xi = []
, Ki = 0
, qi = null
, Yi = 1
, Qi = "";
function Zi(e, t) {
Hi[Vi++] = Ji,
Hi[Vi++] = Wi,
Wi = e,
Ji = t
}
function $i(e, t, n) {
Xi[Ki++] = Yi,
Xi[Ki++] = Qi,
Xi[Ki++] = qi,
qi = e;
var r = Yi;
e = Qi;
var i = 32 - at(r) - 1;
r &= ~(1 << i),
n += 1;
var s = 32 - at(t) + i;
if (30 < s) {
var a = i - i % 5;
s = (r & (1 << a) - 1).toString(32),
r >>= a,
i -= a,
Yi = 1 << 32 - at(t) + i | n << i | r,
Qi = s + e
} else
Yi = 1 << s | n << i | r,
Qi = e
}
function es(e) {
null !== e.return && (Zi(e, 1),
$i(e, 1, 0))
}
function ts(e) {
for (; e === Wi; )
Wi = Hi[--Vi],
Hi[Vi] = null,
Ji = Hi[--Vi],
Hi[Vi] = null;
for (; e === qi; )
qi = Xi[--Ki],
Xi[Ki] = null,
Qi = Xi[--Ki],
Xi[Ki] = null,
Yi = Xi[--Ki],
Xi[Ki] = null
}
var ns = null
, rs = null
, is = !1
, ss = null;
function as(e, t) {
var n = Pc(5, null, null, 0);
n.elementType = "DELETED",
n.stateNode = t,
n.return = e,
null === (t = e.deletions) ? (e.deletions = [n],
e.flags |= 16) : t.push(n)
}
function os(e, t) {
switch (e.tag) {
case 5:
var n = e.type;
return null !== (t = 1 !== t.nodeType || n.toLowerCase() !== t.nodeName.toLowerCase() ? null : t) && (e.stateNode = t,
ns = e,
rs = ci(t.firstChild),
!0);
case 6:
return null !== (t = "" === e.pendingProps || 3 !== t.nodeType ? null : t) && (e.stateNode = t,
ns = e,
rs = null,
!0);
case 13:
return null !== (t = 8 !== t.nodeType ? null : t) && (n = null !== qi ? {
id: Yi,
overflow: Qi
} : null,
e.memoizedState = {
dehydrated: t,
treeContext: n,
retryLane: 1073741824
},
(n = Pc(18, null, null, 0)).stateNode = t,
n.return = e,
e.child = n,
ns = e,
rs = null,
!0);
default:
return !1
}
}
function ls(e) {
return 0 !== (1 & e.mode) && 0 === (128 & e.flags)
}
function cs(e) {
if (is) {
var t = rs;
if (t) {
var n = t;
if (!os(e, t)) {
if (ls(e))
throw Error(s(418));
t = ci(n.nextSibling);
var r = ns;
t && os(e, t) ? as(r, n) : (e.flags = -4097 & e.flags | 2,
is = !1,
ns = e)
}
} else {
if (ls(e))
throw Error(s(418));
e.flags = -4097 & e.flags | 2,
is = !1,
ns = e
}
}
}
function us(e) {
for (e = e.return; null !== e && 5 !== e.tag && 3 !== e.tag && 13 !== e.tag; )
e = e.return;
ns = e
}
function ds(e) {
if (e !== ns)
return !1;
if (!is)
return us(e),
is = !0,
!1;
var t;
if ((t = 3 !== e.tag) && !(t = 5 !== e.tag) && (t = "head" !== (t = e.type) && "body" !== t && !ni(e.type, e.memoizedProps)),
t && (t = rs)) {
if (ls(e))
throw hs(),
Error(s(418));
for (; t; )
as(e, t),
t = ci(t.nextSibling)
}
if (us(e),
13 === e.tag) {
if (!(e = null !== (e = e.memoizedState) ? e.dehydrated : null))
throw Error(s(317));
e: {
for (e = e.nextSibling,
t = 0; e; ) {
if (8 === e.nodeType) {
var n = e.data;
if ("/$" === n) {
if (0 === t) {
rs = ci(e.nextSibling);
break e
}
t--
} else
"$" !== n && "$!" !== n && "$?" !== n || t++
}
e = e.nextSibling
}
rs = null
}
} else
rs = ns ? ci(e.stateNode.nextSibling) : null;
return !0
}
function hs() {
for (var e = rs; e; )
e = ci(e.nextSibling)
}
function ps() {
rs = ns = null,
is = !1
}
function fs(e) {
null === ss ? ss = [e] : ss.push(e)
}
var ms = b.ReactCurrentBatchConfig;
function gs(e, t, n) {
if (null !== (e = n.ref) && "function" !== typeof e && "object" !== typeof e) {
if (n._owner) {
if (n = n._owner) {
if (1 !== n.tag)
throw Error(s(309));
var r = n.stateNode
}
if (!r)
throw Error(s(147, e));
var i = r
, a = "" + e;
return null !== t && null !== t.ref && "function" === typeof t.ref && t.ref._stringRef === a ? t.ref : (t = function(e) {
var t = i.refs;
null === e ? delete t[a] : t[a] = e
}
,
t._stringRef = a,
t)
}
if ("string" !== typeof e)
throw Error(s(284));
if (!n._owner)
throw Error(s(290, e))
}
return e
}
function vs(e, t) {
throw e = Object.prototype.toString.call(t),
Error(s(31, "[object Object]" === e ? "object with keys {" + Object.keys(t).join(", ") + "}" : e))
}
function ys(e) {
return (0,
e._init)(e._payload)
}
function xs(e) {
function t(t, n) {
if (e) {
var r = t.deletions;
null === r ? (t.deletions = [n],
t.flags |= 16) : r.push(n)
}
}
function n(n, r) {
if (!e)
return null;
for (; null !== r; )
t(n, r),
r = r.sibling;
return null
}
function r(e, t) {
for (e = new Map; null !== t; )
null !== t.key ? e.set(t.key, t) : e.set(t.index, t),
t = t.sibling;
return e
}
function i(e, t) {
return (e = Lc(e, t)).index = 0,
e.sibling = null,
e
}
function a(t, n, r) {
return t.index = r,
e ? null !== (r = t.alternate) ? (r = r.index) < n ? (t.flags |= 2,
n) : r : (t.flags |= 2,
n) : (t.flags |= 1048576,
n)
}
function o(t) {
return e && null === t.alternate && (t.flags |= 2),
t
}
function l(e, t, n, r) {
return null === t || 6 !== t.tag ? ((t = jc(n, e.mode, r)).return = e,
t) : ((t = i(t, n)).return = e,
t)
}
function c(e, t, n, r) {
var s = n.type;
return s === S ? d(e, t, n.props.children, r, n.key) : null !== t && (t.elementType === s || "object" === typeof s && null !== s && s.$$typeof === k && ys(s) === t.type) ? ((r = i(t, n.props)).ref = gs(e, t, n),
r.return = e,
r) : ((r = Ic(n.type, n.key, n.props, null, e.mode, r)).ref = gs(e, t, n),
r.return = e,
r)
}
function u(e, t, n, r) {
return null === t || 4 !== t.tag || t.stateNode.containerInfo !== n.containerInfo || t.stateNode.implementation !== n.implementation ? ((t = Fc(n, e.mode, r)).return = e,
t) : ((t = i(t, n.children || [])).return = e,
t)
}
function d(e, t, n, r, s) {
return null === t || 7 !== t.tag ? ((t = Nc(n, e.mode, r, s)).return = e,
t) : ((t = i(t, n)).return = e,
t)
}
function h(e, t, n) {
if ("string" === typeof t && "" !== t || "number" === typeof t)
return (t = jc("" + t, e.mode, n)).return = e,
t;
if ("object" === typeof t && null !== t) {
switch (t.$$typeof) {
case _:
return (n = Ic(t.type, t.key, t.props, null, e.mode, n)).ref = gs(e, null, t),
n.return = e,
n;
case w:
return (t = Fc(t, e.mode, n)).return = e,
t;
case k:
return h(e, (0,
t._init)(t._payload), n)
}
if (te(t) || N(t))
return (t = Nc(t, e.mode, n, null)).return = e,
t;
vs(e, t)
}
return null
}
function p(e, t, n, r) {
var i = null !== t ? t.key : null;
if ("string" === typeof n && "" !== n || "number" === typeof n)
return null !== i ? null : l(e, t, "" + n, r);
if ("object" === typeof n && null !== n) {
switch (n.$$typeof) {
case _:
return n.key === i ? c(e, t, n, r) : null;
case w:
return n.key === i ? u(e, t, n, r) : null;
case k:
return p(e, t, (i = n._init)(n._payload), r)
}
if (te(n) || N(n))
return null !== i ? null : d(e, t, n, r, null);
vs(e, n)
}
return null
}
function f(e, t, n, r, i) {
if ("string" === typeof r && "" !== r || "number" === typeof r)
return l(t, e = e.get(n) || null, "" + r, i);
if ("object" === typeof r && null !== r) {
switch (r.$$typeof) {
case _:
return c(t, e = e.get(null === r.key ? n : r.key) || null, r, i);
case w:
return u(t, e = e.get(null === r.key ? n : r.key) || null, r, i);
case k:
return f(e, t, n, (0,
r._init)(r._payload), i)
}
if (te(r) || N(r))
return d(t, e = e.get(n) || null, r, i, null);
vs(t, r)
}
return null
}
function m(i, s, o, l) {
for (var c = null, u = null, d = s, m = s = 0, g = null; null !== d && m < o.length; m++) {
d.index > m ? (g = d,
d = null) : g = d.sibling;
var v = p(i, d, o[m], l);
if (null === v) {
null === d && (d = g);
break
}
e && d && null === v.alternate && t(i, d),
s = a(v, s, m),
null === u ? c = v : u.sibling = v,
u = v,
d = g
}
if (m === o.length)
return n(i, d),
is && Zi(i, m),
c;
if (null === d) {
for (; m < o.length; m++)
null !== (d = h(i, o[m], l)) && (s = a(d, s, m),
null === u ? c = d : u.sibling = d,
u = d);
return is && Zi(i, m),
c
}
for (d = r(i, d); m < o.length; m++)
null !== (g = f(d, i, m, o[m], l)) && (e && null !== g.alternate && d.delete(null === g.key ? m : g.key),
s = a(g, s, m),
null === u ? c = g : u.sibling = g,
u = g);
return e && d.forEach((function(e) {
return t(i, e)
}
)),
is && Zi(i, m),
c
}
function g(i, o, l, c) {
var u = N(l);
if ("function" !== typeof u)
throw Error(s(150));
if (null == (l = u.call(l)))
throw Error(s(151));
for (var d = u = null, m = o, g = o = 0, v = null, y = l.next(); null !== m && !y.done; g++,
y = l.next()) {
m.index > g ? (v = m,
m = null) : v = m.sibling;
var x = p(i, m, y.value, c);
if (null === x) {
null === m && (m = v);
break
}
e && m && null === x.alternate && t(i, m),
o = a(x, o, g),
null === d ? u = x : d.sibling = x,
d = x,
m = v
}
if (y.done)
return n(i, m),
is && Zi(i, g),
u;
if (null === m) {
for (; !y.done; g++,
y = l.next())
null !== (y = h(i, y.value, c)) && (o = a(y, o, g),
null === d ? u = y : d.sibling = y,
d = y);
return is && Zi(i, g),
u
}
for (m = r(i, m); !y.done; g++,
y = l.next())
null !== (y = f(m, i, g, y.value, c)) && (e && null !== y.alternate && m.delete(null === y.key ? g : y.key),
o = a(y, o, g),
null === d ? u = y : d.sibling = y,
d = y);
return e && m.forEach((function(e) {
return t(i, e)
}
)),
is && Zi(i, g),
u
}
return function e(r, s, a, l) {
if ("object" === typeof a && null !== a && a.type === S && null === a.key && (a = a.props.children),
"object" === typeof a && null !== a) {
switch (a.$$typeof) {
case _:
e: {
for (var c = a.key, u = s; null !== u; ) {
if (u.key === c) {
if ((c = a.type) === S) {
if (7 === u.tag) {
n(r, u.sibling),
(s = i(u, a.props.children)).return = r,
r = s;
break e
}
} else if (u.elementType === c || "object" === typeof c && null !== c && c.$$typeof === k && ys(c) === u.type) {
n(r, u.sibling),
(s = i(u, a.props)).ref = gs(r, u, a),
s.return = r,
r = s;
break e
}
n(r, u);
break
}
t(r, u),
u = u.sibling
}
a.type === S ? ((s = Nc(a.props.children, r.mode, l, a.key)).return = r,
r = s) : ((l = Ic(a.type, a.key, a.props, null, r.mode, l)).ref = gs(r, s, a),
l.return = r,
r = l)
}
return o(r);
case w:
e: {
for (u = a.key; null !== s; ) {
if (s.key === u) {
if (4 === s.tag && s.stateNode.containerInfo === a.containerInfo && s.stateNode.implementation === a.implementation) {
n(r, s.sibling),
(s = i(s, a.children || [])).return = r,
r = s;
break e
}
n(r, s);
break
}
t(r, s),
s = s.sibling
}
(s = Fc(a, r.mode, l)).return = r,
r = s
}
return o(r);
case k:
return e(r, s, (u = a._init)(a._payload), l)
}
if (te(a))
return m(r, s, a, l);
if (N(a))
return g(r, s, a, l);
vs(r, a)
}
return "string" === typeof a && "" !== a || "number" === typeof a ? (a = "" + a,
null !== s && 6 === s.tag ? (n(r, s.sibling),
(s = i(s, a)).return = r,
r = s) : (n(r, s),
(s = jc(a, r.mode, l)).return = r,
r = s),
o(r)) : n(r, s)
}
}
var bs = xs(!0)
, _s = xs(!1)
, ws = Ai(null)
, Ss = null
, As = null
, Ms = null;
function Cs() {
Ms = As = Ss = null
}
function Es(e) {
var t = ws.current;
Mi(ws),
e._currentValue = t
}
function Ts(e, t, n) {
for (; null !== e; ) {
var r = e.alternate;
if ((e.childLanes & t) !== t ? (e.childLanes |= t,
null !== r && (r.childLanes |= t)) : null !== r && (r.childLanes & t) !== t && (r.childLanes |= t),
e === n)
break;
e = e.return
}
}
function Rs(e, t) {
Ss = e,
Ms = As = null,
null !== (e = e.dependencies) && null !== e.firstContext && (0 !== (e.lanes & t) && (xo = !0),
e.firstContext = null)
}
function Bs(e) {
var t = e._currentValue;
if (Ms !== e)
if (e = {
context: e,
memoizedValue: t,
next: null
},
null === As) {
if (null === Ss)
throw Error(s(308));
As = e,
Ss.dependencies = {
lanes: 0,
firstContext: e
}
} else
As = As.next = e;
return t
}
var Ps = null;
function ks(e) {
null === Ps ? Ps = [e] : Ps.push(e)
}
function Ls(e, t, n, r) {
var i = t.interleaved;
return null === i ? (n.next = n,
ks(t)) : (n.next = i.next,
i.next = n),
t.interleaved = n,
Is(e, r)
}
function Is(e, t) {
e.lanes |= t;
var n = e.alternate;
for (null !== n && (n.lanes |= t),
n = e,
e = e.return; null !== e; )
e.childLanes |= t,
null !== (n = e.alternate) && (n.childLanes |= t),
n = e,
e = e.return;
return 3 === n.tag ? n.stateNode : null
}
var Ns = !1;
function Ds(e) {
e.updateQueue = {
baseState: e.memoizedState,
firstBaseUpdate: null,
lastBaseUpdate: null,
shared: {
pending: null,
interleaved: null,
lanes: 0
},
effects: null
}
}
function js(e, t) {
e = e.updateQueue,
t.updateQueue === e && (t.updateQueue = {
baseState: e.baseState,
firstBaseUpdate: e.firstBaseUpdate,
lastBaseUpdate: e.lastBaseUpdate,
shared: e.shared,
effects: e.effects
})
}
function Fs(e, t) {
return {
eventTime: e,
lane: t,
tag: 0,
payload: null,
callback: null,
next: null
}
}
function Os(e, t, n) {
var r = e.updateQueue;
if (null === r)
return null;
if (r = r.shared,
0 !== (2 & Tl)) {
var i = r.pending;
return null === i ? t.next = t : (t.next = i.next,
i.next = t),
r.pending = t,
Is(e, n)
}
return null === (i = r.interleaved) ? (t.next = t,
ks(r)) : (t.next = i.next,
i.next = t),
r.interleaved = t,
Is(e, n)
}
function Us(e, t, n) {
if (null !== (t = t.updateQueue) && (t = t.shared,
0 !== (4194240 & n))) {
var r = t.lanes;
n |= r &= e.pendingLanes,
t.lanes = n,
yt(e, n)
}
}
function zs(e, t) {
var n = e.updateQueue
, r = e.alternate;
if (null !== r && n === (r = r.updateQueue)) {
var i = null
, s = null;
if (null !== (n = n.firstBaseUpdate)) {
do {
var a = {
eventTime: n.eventTime,
lane: n.lane,
tag: n.tag,
payload: n.payload,
callback: n.callback,
next: null
};
null === s ? i = s = a : s = s.next = a,
n = n.next
} while (null !== n);
null === s ? i = s = t : s = s.next = t
} else
i = s = t;
return n = {
baseState: r.baseState,
firstBaseUpdate: i,
lastBaseUpdate: s,
shared: r.shared,
effects: r.effects
},
void (e.updateQueue = n)
}
null === (e = n.lastBaseUpdate) ? n.firstBaseUpdate = t : e.next = t,
n.lastBaseUpdate = t
}
function Gs(e, t, n, r) {
var i = e.updateQueue;
Ns = !1;
var s = i.firstBaseUpdate
, a = i.lastBaseUpdate
, o = i.shared.pending;
if (null !== o) {
i.shared.pending = null;
var l = o
, c = l.next;
l.next = null,
null === a ? s = c : a.next = c,
a = l;
var u = e.alternate;
null !== u && ((o = (u = u.updateQueue).lastBaseUpdate) !== a && (null === o ? u.firstBaseUpdate = c : o.next = c,
u.lastBaseUpdate = l))
}
if (null !== s) {
var d = i.baseState;
for (a = 0,
u = c = l = null,
o = s; ; ) {
var h = o.lane
, p = o.eventTime;
if ((r & h) === h) {
null !== u && (u = u.next = {
eventTime: p,
lane: 0,
tag: o.tag,
payload: o.payload,
callback: o.callback,
next: null
});
e: {
var f = e
, m = o;
switch (h = t,
p = n,
m.tag) {
case 1:
if ("function" === typeof (f = m.payload)) {
d = f.call(p, d, h);
break e
}
d = f;
break e;
case 3:
f.flags = -65537 & f.flags | 128;
case 0:
if (null === (h = "function" === typeof (f = m.payload) ? f.call(p, d, h) : f) || void 0 === h)
break e;
d = j({}, d, h);
break e;
case 2:
Ns = !0
}
}
null !== o.callback && 0 !== o.lane && (e.flags |= 64,
null === (h = i.effects) ? i.effects = [o] : h.push(o))
} else
p = {
eventTime: p,
lane: h,
tag: o.tag,
payload: o.payload,
callback: o.callback,
next: null
},
null === u ? (c = u = p,
l = d) : u = u.next = p,
a |= h;
if (null === (o = o.next)) {
if (null === (o = i.shared.pending))
break;
o = (h = o).next,
h.next = null,
i.lastBaseUpdate = h,
i.shared.pending = null
}
}
if (null === u && (l = d),
i.baseState = l,
i.firstBaseUpdate = c,
i.lastBaseUpdate = u,
null !== (t = i.shared.interleaved)) {
i = t;
do {
a |= i.lane,
i = i.next
} while (i !== t)
} else
null === s && (i.shared.lanes = 0);
Dl |= a,
e.lanes = a,
e.memoizedState = d
}
}
function Hs(e, t, n) {
if (e = t.effects,
t.effects = null,
null !== e)
for (t = 0; t < e.length; t++) {
var r = e[t]
, i = r.callback;
if (null !== i) {
if (r.callback = null,
r = n,
"function" !== typeof i)
throw Error(s(191, i));
i.call(r)
}
}
}
var Vs = {}
, Ws = Ai(Vs)
, Js = Ai(Vs)
, Xs = Ai(Vs);
function Ks(e) {
if (e === Vs)
throw Error(s(174));
return e
}
function qs(e, t) {
switch (Ci(Xs, t),
Ci(Js, e),
Ci(Ws, Vs),
e = t.nodeType) {
case 9:
case 11:
t = (t = t.documentElement) ? t.namespaceURI : le(null, "");
break;
default:
t = le(t = (e = 8 === e ? t.parentNode : t).namespaceURI || null, e = e.tagName)
}
Mi(Ws),
Ci(Ws, t)
}
function Ys() {
Mi(Ws),
Mi(Js),
Mi(Xs)
}
function Qs(e) {
Ks(Xs.current);
var t = Ks(Ws.current)
, n = le(t, e.type);
t !== n && (Ci(Js, e),
Ci(Ws, n))
}
function Zs(e) {
Js.current === e && (Mi(Ws),
Mi(Js))
}
var $s = Ai(0);
function ea(e) {
for (var t = e; null !== t; ) {
if (13 === t.tag) {
var n = t.memoizedState;
if (null !== n && (null === (n = n.dehydrated) || "$?" === n.data || "$!" === n.data))
return t
} else if (19 === t.tag && void 0 !== t.memoizedProps.revealOrder) {
if (0 !== (128 & t.flags))
return t
} else if (null !== t.child) {
t.child.return = t,
t = t.child;
continue
}
if (t === e)
break;
for (; null === t.sibling; ) {
if (null === t.return || t.return === e)
return null;
t = t.return
}
t.sibling.return = t.return,
t = t.sibling
}
return null
}
var ta = [];
function na() {
for (var e = 0; e < ta.length; e++)
ta[e]._workInProgressVersionPrimary = null;
ta.length = 0
}
var ra = b.ReactCurrentDispatcher
, ia = b.ReactCurrentBatchConfig
, sa = 0
, aa = null
, oa = null
, la = null
, ca = !1
, ua = !1
, da = 0
, ha = 0;
function pa() {
throw Error(s(321))
}
function fa(e, t) {
if (null === t)
return !1;
for (var n = 0; n < t.length && n < e.length; n++)
if (!or(e[n], t[n]))
return !1;
return !0
}
function ma(e, t, n, r, i, a) {
if (sa = a,
aa = t,
t.memoizedState = null,
t.updateQueue = null,
t.lanes = 0,
ra.current = null === e || null === e.memoizedState ? Za : $a,
e = n(r, i),
ua) {
a = 0;
do {
if (ua = !1,
da = 0,
25 <= a)
throw Error(s(301));
a += 1,
la = oa = null,
t.updateQueue = null,
ra.current = eo,
e = n(r, i)
} while (ua)
}
if (ra.current = Qa,
t = null !== oa && null !== oa.next,
sa = 0,
la = oa = aa = null,
ca = !1,
t)
throw Error(s(300));
return e
}
function ga() {
var e = 0 !== da;
return da = 0,
e
}
function va() {
var e = {
memoizedState: null,
baseState: null,
baseQueue: null,
queue: null,
next: null
};
return null === la ? aa.memoizedState = la = e : la = la.next = e,
la
}
function ya() {
if (null === oa) {
var e = aa.alternate;
e = null !== e ? e.memoizedState : null
} else
e = oa.next;
var t = null === la ? aa.memoizedState : la.next;
if (null !== t)
la = t,
oa = e;
else {
if (null === e)
throw Error(s(310));
e = {
memoizedState: (oa = e).memoizedState,
baseState: oa.baseState,
baseQueue: oa.baseQueue,
queue: oa.queue,
next: null
},
null === la ? aa.memoizedState = la = e : la = la.next = e
}
return la
}
function xa(e, t) {
return "function" === typeof t ? t(e) : t
}
function ba(e) {
var t = ya()
, n = t.queue;
if (null === n)
throw Error(s(311));
n.lastRenderedReducer = e;
var r = oa
, i = r.baseQueue
, a = n.pending;
if (null !== a) {
if (null !== i) {
var o = i.next;
i.next = a.next,
a.next = o
}
r.baseQueue = i = a,
n.pending = null
}
if (null !== i) {
a = i.next,
r = r.baseState;
var l = o = null
, c = null
, u = a;
do {
var d = u.lane;
if ((sa & d) === d)
null !== c && (c = c.next = {
lane: 0,
action: u.action,
hasEagerState: u.hasEagerState,
eagerState: u.eagerState,
next: null
}),
r = u.hasEagerState ? u.eagerState : e(r, u.action);
else {
var h = {
lane: d,
action: u.action,
hasEagerState: u.hasEagerState,
eagerState: u.eagerState,
next: null
};
null === c ? (l = c = h,
o = r) : c = c.next = h,
aa.lanes |= d,
Dl |= d
}
u = u.next
} while (null !== u && u !== a);
null === c ? o = r : c.next = l,
or(r, t.memoizedState) || (xo = !0),
t.memoizedState = r,
t.baseState = o,
t.baseQueue = c,
n.lastRenderedState = r
}
if (null !== (e = n.interleaved)) {
i = e;
do {
a = i.lane,
aa.lanes |= a,
Dl |= a,
i = i.next
} while (i !== e)
} else
null === i && (n.lanes = 0);
return [t.memoizedState, n.dispatch]
}
function _a(e) {
var t = ya()
, n = t.queue;
if (null === n)
throw Error(s(311));
n.lastRenderedReducer = e;
var r = n.dispatch
, i = n.pending
, a = t.memoizedState;
if (null !== i) {
n.pending = null;
var o = i = i.next;
do {
a = e(a, o.action),
o = o.next
} while (o !== i);
or(a, t.memoizedState) || (xo = !0),
t.memoizedState = a,
null === t.baseQueue && (t.baseState = a),
n.lastRenderedState = a
}
return [a, r]
}
function wa() {}
function Sa(e, t) {
var n = aa
, r = ya()
, i = t()
, a = !or(r.memoizedState, i);
if (a && (r.memoizedState = i,
xo = !0),
r = r.queue,
Na(Ca.bind(null, n, r, e), [e]),
r.getSnapshot !== t || a || null !== la && 1 & la.memoizedState.tag) {
if (n.flags |= 2048,
Ba(9, Ma.bind(null, n, r, i, t), void 0, null),
null === Rl)
throw Error(s(349));
0 !== (30 & sa) || Aa(n, t, i)
}
return i
}
function Aa(e, t, n) {
e.flags |= 16384,
e = {
getSnapshot: t,
value: n
},
null === (t = aa.updateQueue) ? (t = {
lastEffect: null,
stores: null
},
aa.updateQueue = t,
t.stores = [e]) : null === (n = t.stores) ? t.stores = [e] : n.push(e)
}
function Ma(e, t, n, r) {
t.value = n,
t.getSnapshot = r,
Ea(t) && Ta(e)
}
function Ca(e, t, n) {
return n((function() {
Ea(t) && Ta(e)
}
))
}
function Ea(e) {
var t = e.getSnapshot;
e = e.value;
try {
var n = t();
return !or(e, n)
} catch (r) {
return !0
}
}
function Ta(e) {
var t = Is(e, 1);
null !== t && nc(t, e, 1, -1)
}
function Ra(e) {
var t = va();
return "function" === typeof e && (e = e()),
t.memoizedState = t.baseState = e,
e = {
pending: null,
interleaved: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: xa,
lastRenderedState: e
},
t.queue = e,
e = e.dispatch = Xa.bind(null, aa, e),
[t.memoizedState, e]
}
function Ba(e, t, n, r) {
return e = {
tag: e,
create: t,
destroy: n,
deps: r,
next: null
},
null === (t = aa.updateQueue) ? (t = {
lastEffect: null,
stores: null
},
aa.updateQueue = t,
t.lastEffect = e.next = e) : null === (n = t.lastEffect) ? t.lastEffect = e.next = e : (r = n.next,
n.next = e,
e.next = r,
t.lastEffect = e),
e
}
function Pa() {
return ya().memoizedState
}
function ka(e, t, n, r) {
var i = va();
aa.flags |= e,
i.memoizedState = Ba(1 | t, n, void 0, void 0 === r ? null : r)
}
function La(e, t, n, r) {
var i = ya();
r = void 0 === r ? null : r;
var s = void 0;
if (null !== oa) {
var a = oa.memoizedState;
if (s = a.destroy,
null !== r && fa(r, a.deps))
return void (i.memoizedState = Ba(t, n, s, r))
}
aa.flags |= e,
i.memoizedState = Ba(1 | t, n, s, r)
}
function Ia(e, t) {
return ka(8390656, 8, e, t)
}
function Na(e, t) {
return La(2048, 8, e, t)
}
function Da(e, t) {
return La(4, 2, e, t)
}
function ja(e, t) {
return La(4, 4, e, t)
}
function Fa(e, t) {
return "function" === typeof t ? (e = e(),
t(e),
function() {
t(null)
}
) : null !== t && void 0 !== t ? (e = e(),
t.current = e,
function() {
t.current = null
}
) : void 0
}
function Oa(e, t, n) {
return n = null !== n && void 0 !== n ? n.concat([e]) : null,
La(4, 4, Fa.bind(null, t, e), n)
}
function Ua() {}
function za(e, t) {
var n = ya();
t = void 0 === t ? null : t;
var r = n.memoizedState;
return null !== r && null !== t && fa(t, r[1]) ? r[0] : (n.memoizedState = [e, t],
e)
}
function Ga(e, t) {
var n = ya();
t = void 0 === t ? null : t;
var r = n.memoizedState;
return null !== r && null !== t && fa(t, r[1]) ? r[0] : (e = e(),
n.memoizedState = [e, t],
e)
}
function Ha(e, t, n) {
return 0 === (21 & sa) ? (e.baseState && (e.baseState = !1,
xo = !0),
e.memoizedState = n) : (or(n, t) || (n = mt(),
aa.lanes |= n,
Dl |= n,
e.baseState = !0),
t)
}
function Va(e, t) {
var n = xt;
xt = 0 !== n && 4 > n ? n : 4,
e(!0);
var r = ia.transition;
ia.transition = {};
try {
e(!1),
t()
} finally {
xt = n,
ia.transition = r
}
}
function Wa() {
return ya().memoizedState
}
function Ja(e, t, n) {
var r = tc(e);
if (n = {
lane: r,
action: n,
hasEagerState: !1,
eagerState: null,
next: null
},
Ka(e))
qa(t, n);
else if (null !== (n = Ls(e, t, n, r))) {
nc(n, e, r, ec()),
Ya(n, t, r)
}
}
function Xa(e, t, n) {
var r = tc(e)
, i = {
lane: r,
action: n,
hasEagerState: !1,
eagerState: null,
next: null
};
if (Ka(e))
qa(t, i);
else {
var s = e.alternate;
if (0 === e.lanes && (null === s || 0 === s.lanes) && null !== (s = t.lastRenderedReducer))
try {
var a = t.lastRenderedState
, o = s(a, n);
if (i.hasEagerState = !0,
i.eagerState = o,
or(o, a)) {
var l = t.interleaved;
return null === l ? (i.next = i,
ks(t)) : (i.next = l.next,
l.next = i),
void (t.interleaved = i)
}
} catch (c) {}
null !== (n = Ls(e, t, i, r)) && (nc(n, e, r, i = ec()),
Ya(n, t, r))
}
}
function Ka(e) {
var t = e.alternate;
return e === aa || null !== t && t === aa
}
function qa(e, t) {
ua = ca = !0;
var n = e.pending;
null === n ? t.next = t : (t.next = n.next,
n.next = t),
e.pending = t
}
function Ya(e, t, n) {
if (0 !== (4194240 & n)) {
var r = t.lanes;
n |= r &= e.pendingLanes,
t.lanes = n,
yt(e, n)
}
}
var Qa = {
readContext: Bs,
useCallback: pa,
useContext: pa,
useEffect: pa,
useImperativeHandle: pa,
useInsertionEffect: pa,
useLayoutEffect: pa,
useMemo: pa,
useReducer: pa,
useRef: pa,
useState: pa,
useDebugValue: pa,
useDeferredValue: pa,
useTransition: pa,
useMutableSource: pa,
useSyncExternalStore: pa,
useId: pa,
unstable_isNewReconciler: !1
}
, Za = {
readContext: Bs,
useCallback: function(e, t) {
return va().memoizedState = [e, void 0 === t ? null : t],
e
},
useContext: Bs,
useEffect: Ia,
useImperativeHandle: function(e, t, n) {
return n = null !== n && void 0 !== n ? n.concat([e]) : null,
ka(4194308, 4, Fa.bind(null, t, e), n)
},
useLayoutEffect: function(e, t) {
return ka(4194308, 4, e, t)
},
useInsertionEffect: function(e, t) {
return ka(4, 2, e, t)
},
useMemo: function(e, t) {
var n = va();
return t = void 0 === t ? null : t,
e = e(),
n.memoizedState = [e, t],
e
},
useReducer: function(e, t, n) {
var r = va();
return t = void 0 !== n ? n(t) : t,
r.memoizedState = r.baseState = t,
e = {
pending: null,
interleaved: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: e,
lastRenderedState: t
},
r.queue = e,
e = e.dispatch = Ja.bind(null, aa, e),
[r.memoizedState, e]
},
useRef: function(e) {
return e = {
current: e
},
va().memoizedState = e
},
useState: Ra,
useDebugValue: Ua,
useDeferredValue: function(e) {
return va().memoizedState = e
},
useTransition: function() {
var e = Ra(!1)
, t = e[0];
return e = Va.bind(null, e[1]),
va().memoizedState = e,
[t, e]
},
useMutableSource: function() {},
useSyncExternalStore: function(e, t, n) {
var r = aa
, i = va();
if (is) {
if (void 0 === n)
throw Error(s(407));
n = n()
} else {
if (n = t(),
null === Rl)
throw Error(s(349));
0 !== (30 & sa) || Aa(r, t, n)
}
i.memoizedState = n;
var a = {
value: n,
getSnapshot: t
};
return i.queue = a,
Ia(Ca.bind(null, r, a, e), [e]),
r.flags |= 2048,
Ba(9, Ma.bind(null, r, a, n, t), void 0, null),
n
},
useId: function() {
var e = va()
, t = Rl.identifierPrefix;
if (is) {
var n = Qi;
t = ":" + t + "R" + (n = (Yi & ~(1 << 32 - at(Yi) - 1)).toString(32) + n),
0 < (n = da++) && (t += "H" + n.toString(32)),
t += ":"
} else
t = ":" + t + "r" + (n = ha++).toString(32) + ":";
return e.memoizedState = t
},
unstable_isNewReconciler: !1
}
, $a = {
readContext: Bs,
useCallback: za,
useContext: Bs,
useEffect: Na,
useImperativeHandle: Oa,
useInsertionEffect: Da,
useLayoutEffect: ja,
useMemo: Ga,
useReducer: ba,
useRef: Pa,
useState: function() {
return ba(xa)
},
useDebugValue: Ua,
useDeferredValue: function(e) {
return Ha(ya(), oa.memoizedState, e)
},
useTransition: function() {
return [ba(xa)[0], ya().memoizedState]
},
useMutableSource: wa,
useSyncExternalStore: Sa,
useId: Wa,
unstable_isNewReconciler: !1
}
, eo = {
readContext: Bs,
useCallback: za,
useContext: Bs,
useEffect: Na,
useImperativeHandle: Oa,
useInsertionEffect: Da,
useLayoutEffect: ja,
useMemo: Ga,
useReducer: _a,
useRef: Pa,
useState: function() {
return _a(xa)
},
useDebugValue: Ua,
useDeferredValue: function(e) {
var t = ya();
return null === oa ? t.memoizedState = e : Ha(t, oa.memoizedState, e)
},
useTransition: function() {
return [_a(xa)[0], ya().memoizedState]
},
useMutableSource: wa,
useSyncExternalStore: Sa,
useId: Wa,
unstable_isNewReconciler: !1
};
function to(e, t) {
if (e && e.defaultProps) {
for (var n in t = j({}, t),
e = e.defaultProps)
void 0 === t[n] && (t[n] = e[n]);
return t
}
return t
}
function no(e, t, n, r) {
n = null === (n = n(r, t = e.memoizedState)) || void 0 === n ? t : j({}, t, n),
e.memoizedState = n,
0 === e.lanes && (e.updateQueue.baseState = n)
}
var ro = {
isMounted: function(e) {
return !!(e = e._reactInternals) && Ge(e) === e
},
enqueueSetState: function(e, t, n) {
e = e._reactInternals;
var r = ec()
, i = tc(e)
, s = Fs(r, i);
s.payload = t,
void 0 !== n && null !== n && (s.callback = n),
null !== (t = Os(e, s, i)) && (nc(t, e, i, r),
Us(t, e, i))
},
enqueueReplaceState: function(e, t, n) {
e = e._reactInternals;
var r = ec()
, i = tc(e)
, s = Fs(r, i);
s.tag = 1,
s.payload = t,
void 0 !== n && null !== n && (s.callback = n),
null !== (t = Os(e, s, i)) && (nc(t, e, i, r),
Us(t, e, i))
},
enqueueForceUpdate: function(e, t) {
e = e._reactInternals;
var n = ec()
, r = tc(e)
, i = Fs(n, r);
i.tag = 2,
void 0 !== t && null !== t && (i.callback = t),
null !== (t = Os(e, i, r)) && (nc(t, e, r, n),
Us(t, e, r))
}
};
function io(e, t, n, r, i, s, a) {
return "function" === typeof (e = e.stateNode).shouldComponentUpdate ? e.shouldComponentUpdate(r, s, a) : !t.prototype || !t.prototype.isPureReactComponent || (!lr(n, r) || !lr(i, s))
}
function so(e, t, n) {
var r = !1
, i = Ei
, s = t.contextType;
return "object" === typeof s && null !== s ? s = Bs(s) : (i = ki(t) ? Bi : Ti.current,
s = (r = null !== (r = t.contextTypes) && void 0 !== r) ? Pi(e, i) : Ei),
t = new t(n,s),
e.memoizedState = null !== t.state && void 0 !== t.state ? t.state : null,
t.updater = ro,
e.stateNode = t,
t._reactInternals = e,
r && ((e = e.stateNode).__reactInternalMemoizedUnmaskedChildContext = i,
e.__reactInternalMemoizedMaskedChildContext = s),
t
}
function ao(e, t, n, r) {
e = t.state,
"function" === typeof t.componentWillReceiveProps && t.componentWillReceiveProps(n, r),
"function" === typeof t.UNSAFE_componentWillReceiveProps && t.UNSAFE_componentWillReceiveProps(n, r),
t.state !== e && ro.enqueueReplaceState(t, t.state, null)
}
function oo(e, t, n, r) {
var i = e.stateNode;
i.props = n,
i.state = e.memoizedState,
i.refs = {},
Ds(e);
var s = t.contextType;
"object" === typeof s && null !== s ? i.context = Bs(s) : (s = ki(t) ? Bi : Ti.current,
i.context = Pi(e, s)),
i.state = e.memoizedState,
"function" === typeof (s = t.getDerivedStateFromProps) && (no(e, t, s, n),
i.state = e.memoizedState),
"function" === typeof t.getDerivedStateFromProps || "function" === typeof i.getSnapshotBeforeUpdate || "function" !== typeof i.UNSAFE_componentWillMount && "function" !== typeof i.componentWillMount || (t = i.state,
"function" === typeof i.componentWillMount && i.componentWillMount(),
"function" === typeof i.UNSAFE_componentWillMount && i.UNSAFE_componentWillMount(),
t !== i.state && ro.enqueueReplaceState(i, i.state, null),
Gs(e, n, i, r),
i.state = e.memoizedState),
"function" === typeof i.componentDidMount && (e.flags |= 4194308)
}
function lo(e, t) {
try {
var n = ""
, r = t;
do {
n += z(r),
r = r.return
} while (r);
var i = n
} catch (s) {
i = "\nError generating stack: " + s.message + "\n" + s.stack
}
return {
value: e,
source: t,
stack: i,
digest: null
}
}
function co(e, t, n) {
return {
value: e,
source: null,
stack: null != n ? n : null,
digest: null != t ? t : null
}
}
function uo(e, t) {
try {
console.error(t.value)
} catch (n) {
setTimeout((function() {
throw n
}
))
}
}
var ho = "function" === typeof WeakMap ? WeakMap : Map;
function po(e, t, n) {
(n = Fs(-1, n)).tag = 3,
n.payload = {
element: null
};
var r = t.value;
return n.callback = function() {
Vl || (Vl = !0,
Wl = r),
uo(0, t)
}
,
n
}
function fo(e, t, n) {
(n = Fs(-1, n)).tag = 3;
var r = e.type.getDerivedStateFromError;
if ("function" === typeof r) {
var i = t.value;
n.payload = function() {
return r(i)
}
,
n.callback = function() {
uo(0, t)
}
}
var s = e.stateNode;
return null !== s && "function" === typeof s.componentDidCatch && (n.callback = function() {
uo(0, t),
"function" !== typeof r && (null === Jl ? Jl = new Set([this]) : Jl.add(this));
var e = t.stack;
this.componentDidCatch(t.value, {
componentStack: null !== e ? e : ""
})
}
),
n
}
function mo(e, t, n) {
var r = e.pingCache;
if (null === r) {
r = e.pingCache = new ho;
var i = new Set;
r.set(t, i)
} else
void 0 === (i = r.get(t)) && (i = new Set,
r.set(t, i));
i.has(n) || (i.add(n),
e = Mc.bind(null, e, t, n),
t.then(e, e))
}
function go(e) {
do {
var t;
if ((t = 13 === e.tag) && (t = null === (t = e.memoizedState) || null !== t.dehydrated),
t)
return e;
e = e.return
} while (null !== e);
return null
}
function vo(e, t, n, r, i) {
return 0 === (1 & e.mode) ? (e === t ? e.flags |= 65536 : (e.flags |= 128,
n.flags |= 131072,
n.flags &= -52805,
1 === n.tag && (null === n.alternate ? n.tag = 17 : ((t = Fs(-1, 1)).tag = 2,
Os(n, t, 1))),
n.lanes |= 1),
e) : (e.flags |= 65536,
e.lanes = i,
e)
}
var yo = b.ReactCurrentOwner
, xo = !1;
function bo(e, t, n, r) {
t.child = null === e ? _s(t, null, n, r) : bs(t, e.child, n, r)
}
function _o(e, t, n, r, i) {
n = n.render;
var s = t.ref;
return Rs(t, i),
r = ma(e, t, n, r, s, i),
n = ga(),
null === e || xo ? (is && n && es(t),
t.flags |= 1,
bo(e, t, r, i),
t.child) : (t.updateQueue = e.updateQueue,
t.flags &= -2053,
e.lanes &= ~i,
Vo(e, t, i))
}
function wo(e, t, n, r, i) {
if (null === e) {
var s = n.type;
return "function" !== typeof s || kc(s) || void 0 !== s.defaultProps || null !== n.compare || void 0 !== n.defaultProps ? ((e = Ic(n.type, null, r, t, t.mode, i)).ref = t.ref,
e.return = t,
t.child = e) : (t.tag = 15,
t.type = s,
So(e, t, s, r, i))
}
if (s = e.child,
0 === (e.lanes & i)) {
var a = s.memoizedProps;
if ((n = null !== (n = n.compare) ? n : lr)(a, r) && e.ref === t.ref)
return Vo(e, t, i)
}
return t.flags |= 1,
(e = Lc(s, r)).ref = t.ref,
e.return = t,
t.child = e
}
function So(e, t, n, r, i) {
if (null !== e) {
var s = e.memoizedProps;
if (lr(s, r) && e.ref === t.ref) {
if (xo = !1,
t.pendingProps = r = s,
0 === (e.lanes & i))
return t.lanes = e.lanes,
Vo(e, t, i);
0 !== (131072 & e.flags) && (xo = !0)
}
}
return Co(e, t, n, r, i)
}
function Ao(e, t, n) {
var r = t.pendingProps
, i = r.children
, s = null !== e ? e.memoizedState : null;
if ("hidden" === r.mode)
if (0 === (1 & t.mode))
t.memoizedState = {
baseLanes: 0,
cachePool: null,
transitions: null
},
Ci(Ll, kl),
kl |= n;
else {
if (0 === (1073741824 & n))
return e = null !== s ? s.baseLanes | n : n,
t.lanes = t.childLanes = 1073741824,
t.memoizedState = {
baseLanes: e,
cachePool: null,
transitions: null
},
t.updateQueue = null,
Ci(Ll, kl),
kl |= e,
null;
t.memoizedState = {
baseLanes: 0,
cachePool: null,
transitions: null
},
r = null !== s ? s.baseLanes : n,
Ci(Ll, kl),
kl |= r
}
else
null !== s ? (r = s.baseLanes | n,
t.memoizedState = null) : r = n,
Ci(Ll, kl),
kl |= r;
return bo(e, t, i, n),
t.child
}
function Mo(e, t) {
var n = t.ref;
(null === e && null !== n || null !== e && e.ref !== n) && (t.flags |= 512,
t.flags |= 2097152)
}
function Co(e, t, n, r, i) {
var s = ki(n) ? Bi : Ti.current;
return s = Pi(t, s),
Rs(t, i),
n = ma(e, t, n, r, s, i),
r = ga(),
null === e || xo ? (is && r && es(t),
t.flags |= 1,
bo(e, t, n, i),
t.child) : (t.updateQueue = e.updateQueue,
t.flags &= -2053,
e.lanes &= ~i,
Vo(e, t, i))
}
function Eo(e, t, n, r, i) {
if (ki(n)) {
var s = !0;
Di(t)
} else
s = !1;
if (Rs(t, i),
null === t.stateNode)
Ho(e, t),
so(t, n, r),
oo(t, n, r, i),
r = !0;
else if (null === e) {
var a = t.stateNode
, o = t.memoizedProps;
a.props = o;
var l = a.context
, c = n.contextType;
"object" === typeof c && null !== c ? c = Bs(c) : c = Pi(t, c = ki(n) ? Bi : Ti.current);
var u = n.getDerivedStateFromProps
, d = "function" === typeof u || "function" === typeof a.getSnapshotBeforeUpdate;
d || "function" !== typeof a.UNSAFE_componentWillReceiveProps && "function" !== typeof a.componentWillReceiveProps || (o !== r || l !== c) && ao(t, a, r, c),
Ns = !1;
var h = t.memoizedState;
a.state = h,
Gs(t, r, a, i),
l = t.memoizedState,
o !== r || h !== l || Ri.current || Ns ? ("function" === typeof u && (no(t, n, u, r),
l = t.memoizedState),
(o = Ns || io(t, n, o, r, h, l, c)) ? (d || "function" !== typeof a.UNSAFE_componentWillMount && "function" !== typeof a.componentWillMount || ("function" === typeof a.componentWillMount && a.componentWillMount(),
"function" === typeof a.UNSAFE_componentWillMount && a.UNSAFE_componentWillMount()),
"function" === typeof a.componentDidMount && (t.flags |= 4194308)) : ("function" === typeof a.componentDidMount && (t.flags |= 4194308),
t.memoizedProps = r,
t.memoizedState = l),
a.props = r,
a.state = l,
a.context = c,
r = o) : ("function" === typeof a.componentDidMount && (t.flags |= 4194308),
r = !1)
} else {
a = t.stateNode,
js(e, t),
o = t.memoizedProps,
c = t.type === t.elementType ? o : to(t.type, o),
a.props = c,
d = t.pendingProps,
h = a.context,
"object" === typeof (l = n.contextType) && null !== l ? l = Bs(l) : l = Pi(t, l = ki(n) ? Bi : Ti.current);
var p = n.getDerivedStateFromProps;
(u = "function" === typeof p || "function" === typeof a.getSnapshotBeforeUpdate) || "function" !== typeof a.UNSAFE_componentWillReceiveProps && "function" !== typeof a.componentWillReceiveProps || (o !== d || h !== l) && ao(t, a, r, l),
Ns = !1,
h = t.memoizedState,
a.state = h,
Gs(t, r, a, i);
var f = t.memoizedState;
o !== d || h !== f || Ri.current || Ns ? ("function" === typeof p && (no(t, n, p, r),
f = t.memoizedState),
(c = Ns || io(t, n, c, r, h, f, l) || !1) ? (u || "function" !== typeof a.UNSAFE_componentWillUpdate && "function" !== typeof a.componentWillUpdate || ("function" === typeof a.componentWillUpdate && a.componentWillUpdate(r, f, l),
"function" === typeof a.UNSAFE_componentWillUpdate && a.UNSAFE_componentWillUpdate(r, f, l)),
"function" === typeof a.componentDidUpdate && (t.flags |= 4),
"function" === typeof a.getSnapshotBeforeUpdate && (t.flags |= 1024)) : ("function" !== typeof a.componentDidUpdate || o === e.memoizedProps && h === e.memoizedState || (t.flags |= 4),
"function" !== typeof a.getSnapshotBeforeUpdate || o === e.memoizedProps && h === e.memoizedState || (t.flags |= 1024),
t.memoizedProps = r,
t.memoizedState = f),
a.props = r,
a.state = f,
a.context = l,
r = c) : ("function" !== typeof a.componentDidUpdate || o === e.memoizedProps && h === e.memoizedState || (t.flags |= 4),
"function" !== typeof a.getSnapshotBeforeUpdate || o === e.memoizedProps && h === e.memoizedState || (t.flags |= 1024),
r = !1)
}
return To(e, t, n, r, s, i)
}
function To(e, t, n, r, i, s) {
Mo(e, t);
var a = 0 !== (128 & t.flags);
if (!r && !a)
return i && ji(t, n, !1),
Vo(e, t, s);
r = t.stateNode,
yo.current = t;
var o = a && "function" !== typeof n.getDerivedStateFromError ? null : r.render();
return t.flags |= 1,
null !== e && a ? (t.child = bs(t, e.child, null, s),
t.child = bs(t, null, o, s)) : bo(e, t, o, s),
t.memoizedState = r.state,
i && ji(t, n, !0),
t.child
}
function Ro(e) {
var t = e.stateNode;
t.pendingContext ? Ii(0, t.pendingContext, t.pendingContext !== t.context) : t.context && Ii(0, t.context, !1),
qs(e, t.containerInfo)
}
function Bo(e, t, n, r, i) {
return ps(),
fs(i),
t.flags |= 256,
bo(e, t, n, r),
t.child
}
var Po, ko, Lo, Io, No = {
dehydrated: null,
treeContext: null,
retryLane: 0
};
function Do(e) {
return {
baseLanes: e,
cachePool: null,
transitions: null
}
}
function jo(e, t, n) {
var r, i = t.pendingProps, a = $s.current, o = !1, l = 0 !== (128 & t.flags);
if ((r = l) || (r = (null === e || null !== e.memoizedState) && 0 !== (2 & a)),
r ? (o = !0,
t.flags &= -129) : null !== e && null === e.memoizedState || (a |= 1),
Ci($s, 1 & a),
null === e)
return cs(t),
null !== (e = t.memoizedState) && null !== (e = e.dehydrated) ? (0 === (1 & t.mode) ? t.lanes = 1 : "$!" === e.data ? t.lanes = 8 : t.lanes = 1073741824,
null) : (l = i.children,
e = i.fallback,
o ? (i = t.mode,
o = t.child,
l = {
mode: "hidden",
children: l
},
0 === (1 & i) && null !== o ? (o.childLanes = 0,
o.pendingProps = l) : o = Dc(l, i, 0, null),
e = Nc(e, i, n, null),
o.return = t,
e.return = t,
o.sibling = e,
t.child = o,
t.child.memoizedState = Do(n),
t.memoizedState = No,
e) : Fo(t, l));
if (null !== (a = e.memoizedState) && null !== (r = a.dehydrated))
return function(e, t, n, r, i, a, o) {
if (n)
return 256 & t.flags ? (t.flags &= -257,
Oo(e, t, o, r = co(Error(s(422))))) : null !== t.memoizedState ? (t.child = e.child,
t.flags |= 128,
null) : (a = r.fallback,
i = t.mode,
r = Dc({
mode: "visible",
children: r.children
}, i, 0, null),
(a = Nc(a, i, o, null)).flags |= 2,
r.return = t,
a.return = t,
r.sibling = a,
t.child = r,
0 !== (1 & t.mode) && bs(t, e.child, null, o),
t.child.memoizedState = Do(o),
t.memoizedState = No,
a);
if (0 === (1 & t.mode))
return Oo(e, t, o, null);
if ("$!" === i.data) {
if (r = i.nextSibling && i.nextSibling.dataset)
var l = r.dgst;
return r = l,
Oo(e, t, o, r = co(a = Error(s(419)), r, void 0))
}
if (l = 0 !== (o & e.childLanes),
xo || l) {
if (null !== (r = Rl)) {
switch (o & -o) {
case 4:
i = 2;
break;
case 16:
i = 8;
break;
case 64:
case 128:
case 256:
case 512:
case 1024:
case 2048:
case 4096:
case 8192:
case 16384:
case 32768:
case 65536:
case 131072:
case 262144:
case 524288:
case 1048576:
case 2097152:
case 4194304:
case 8388608:
case 16777216:
case 33554432:
case 67108864:
i = 32;
break;
case 536870912:
i = 268435456;
break;
default:
i = 0
}
0 !== (i = 0 !== (i & (r.suspendedLanes | o)) ? 0 : i) && i !== a.retryLane && (a.retryLane = i,
Is(e, i),
nc(r, e, i, -1))
}
return mc(),
Oo(e, t, o, r = co(Error(s(421))))
}
return "$?" === i.data ? (t.flags |= 128,
t.child = e.child,
t = Ec.bind(null, e),
i._reactRetry = t,
null) : (e = a.treeContext,
rs = ci(i.nextSibling),
ns = t,
is = !0,
ss = null,
null !== e && (Xi[Ki++] = Yi,
Xi[Ki++] = Qi,
Xi[Ki++] = qi,
Yi = e.id,
Qi = e.overflow,
qi = t),
t = Fo(t, r.children),
t.flags |= 4096,
t)
}(e, t, l, i, r, a, n);
if (o) {
o = i.fallback,
l = t.mode,
r = (a = e.child).sibling;
var c = {
mode: "hidden",
children: i.children
};
return 0 === (1 & l) && t.child !== a ? ((i = t.child).childLanes = 0,
i.pendingProps = c,
t.deletions = null) : (i = Lc(a, c)).subtreeFlags = 14680064 & a.subtreeFlags,
null !== r ? o = Lc(r, o) : (o = Nc(o, l, n, null)).flags |= 2,
o.return = t,
i.return = t,
i.sibling = o,
t.child = i,
i = o,
o = t.child,
l = null === (l = e.child.memoizedState) ? Do(n) : {
baseLanes: l.baseLanes | n,
cachePool: null,
transitions: l.transitions
},
o.memoizedState = l,
o.childLanes = e.childLanes & ~n,
t.memoizedState = No,
i
}
return e = (o = e.child).sibling,
i = Lc(o, {
mode: "visible",
children: i.children
}),
0 === (1 & t.mode) && (i.lanes = n),
i.return = t,
i.sibling = null,
null !== e && (null === (n = t.deletions) ? (t.deletions = [e],
t.flags |= 16) : n.push(e)),
t.child = i,
t.memoizedState = null,
i
}
function Fo(e, t) {
return (t = Dc({
mode: "visible",
children: t
}, e.mode, 0, null)).return = e,
e.child = t
}
function Oo(e, t, n, r) {
return null !== r && fs(r),
bs(t, e.child, null, n),
(e = Fo(t, t.pendingProps.children)).flags |= 2,
t.memoizedState = null,
e
}
function Uo(e, t, n) {
e.lanes |= t;
var r = e.alternate;
null !== r && (r.lanes |= t),
Ts(e.return, t, n)
}
function zo(e, t, n, r, i) {
var s = e.memoizedState;
null === s ? e.memoizedState = {
isBackwards: t,
rendering: null,
renderingStartTime: 0,
last: r,
tail: n,
tailMode: i
} : (s.isBackwards = t,
s.rendering = null,
s.renderingStartTime = 0,
s.last = r,
s.tail = n,
s.tailMode = i)
}
function Go(e, t, n) {
var r = t.pendingProps
, i = r.revealOrder
, s = r.tail;
if (bo(e, t, r.children, n),
0 !== (2 & (r = $s.current)))
r = 1 & r | 2,
t.flags |= 128;
else {
if (null !== e && 0 !== (128 & e.flags))
e: for (e = t.child; null !== e; ) {
if (13 === e.tag)
null !== e.memoizedState && Uo(e, n, t);
else if (19 === e.tag)
Uo(e, n, t);
else if (null !== e.child) {
e.child.return = e,
e = e.child;
continue
}
if (e === t)
break e;
for (; null === e.sibling; ) {
if (null === e.return || e.return === t)
break e;
e = e.return
}
e.sibling.return = e.return,
e = e.sibling
}
r &= 1
}
if (Ci($s, r),
0 === (1 & t.mode))
t.memoizedState = null;
else
switch (i) {
case "forwards":
for (n = t.child,
i = null; null !== n; )
null !== (e = n.alternate) && null === ea(e) && (i = n),
n = n.sibling;
null === (n = i) ? (i = t.child,
t.child = null) : (i = n.sibling,
n.sibling = null),
zo(t, !1, i, n, s);
break;
case "backwards":
for (n = null,
i = t.child,
t.child = null; null !== i; ) {
if (null !== (e = i.alternate) && null === ea(e)) {
t.child = i;
break
}
e = i.sibling,
i.sibling = n,
n = i,
i = e
}
zo(t, !0, n, null, s);
break;
case "together":
zo(t, !1, null, null, void 0);
break;
default:
t.memoizedState = null
}
return t.child
}
function Ho(e, t) {
0 === (1 & t.mode) && null !== e && (e.alternate = null,
t.alternate = null,
t.flags |= 2)
}
function Vo(e, t, n) {
if (null !== e && (t.dependencies = e.dependencies),
Dl |= t.lanes,
0 === (n & t.childLanes))
return null;
if (null !== e && t.child !== e.child)
throw Error(s(153));
if (null !== t.child) {
for (n = Lc(e = t.child, e.pendingProps),
t.child = n,
n.return = t; null !== e.sibling; )
e = e.sibling,
(n = n.sibling = Lc(e, e.pendingProps)).return = t;
n.sibling = null
}
return t.child
}
function Wo(e, t) {
if (!is)
switch (e.tailMode) {
case "hidden":
t = e.tail;
for (var n = null; null !== t; )
null !== t.alternate && (n = t),
t = t.sibling;
null === n ? e.tail = null : n.sibling = null;
break;
case "collapsed":
n = e.tail;
for (var r = null; null !== n; )
null !== n.alternate && (r = n),
n = n.sibling;
null === r ? t || null === e.tail ? e.tail = null : e.tail.sibling = null : r.sibling = null
}
}
function Jo(e) {
var t = null !== e.alternate && e.alternate.child === e.child
, n = 0
, r = 0;
if (t)
for (var i = e.child; null !== i; )
n |= i.lanes | i.childLanes,
r |= 14680064 & i.subtreeFlags,
r |= 14680064 & i.flags,
i.return = e,
i = i.sibling;
else
for (i = e.child; null !== i; )
n |= i.lanes | i.childLanes,
r |= i.subtreeFlags,
r |= i.flags,
i.return = e,
i = i.sibling;
return e.subtreeFlags |= r,
e.childLanes = n,
t
}
function Xo(e, t, n) {
var r = t.pendingProps;
switch (ts(t),
t.tag) {
case 2:
case 16:
case 15:
case 0:
case 11:
case 7:
case 8:
case 12:
case 9:
case 14:
return Jo(t),
null;
case 1:
case 17:
return ki(t.type) && Li(),
Jo(t),
null;
case 3:
return r = t.stateNode,
Ys(),
Mi(Ri),
Mi(Ti),
na(),
r.pendingContext && (r.context = r.pendingContext,
r.pendingContext = null),
null !== e && null !== e.child || (ds(t) ? t.flags |= 4 : null === e || e.memoizedState.isDehydrated && 0 === (256 & t.flags) || (t.flags |= 1024,
null !== ss && (ac(ss),
ss = null))),
ko(e, t),
Jo(t),
null;
case 5:
Zs(t);
var i = Ks(Xs.current);
if (n = t.type,
null !== e && null != t.stateNode)
Lo(e, t, n, r, i),
e.ref !== t.ref && (t.flags |= 512,
t.flags |= 2097152);
else {
if (!r) {
if (null === t.stateNode)
throw Error(s(166));
return Jo(t),
null
}
if (e = Ks(Ws.current),
ds(t)) {
r = t.stateNode,
n = t.type;
var a = t.memoizedProps;
switch (r[hi] = t,
r[pi] = a,
e = 0 !== (1 & t.mode),
n) {
case "dialog":
Or("cancel", r),
Or("close", r);
break;
case "iframe":
case "object":
case "embed":
Or("load", r);
break;
case "video":
case "audio":
for (i = 0; i < Nr.length; i++)
Or(Nr[i], r);
break;
case "source":
Or("error", r);
break;
case "img":
case "image":
case "link":
Or("error", r),
Or("load", r);
break;
case "details":
Or("toggle", r);
break;
case "input":
Y(r, a),
Or("invalid", r);
break;
case "select":
r._wrapperState = {
wasMultiple: !!a.multiple
},
Or("invalid", r);
break;
case "textarea":
ie(r, a),
Or("invalid", r)
}
for (var l in ye(n, a),
i = null,
a)
if (a.hasOwnProperty(l)) {
var c = a[l];
"children" === l ? "string" === typeof c ? r.textContent !== c && (!0 !== a.suppressHydrationWarning && Zr(r.textContent, c, e),
i = ["children", c]) : "number" === typeof c && r.textContent !== "" + c && (!0 !== a.suppressHydrationWarning && Zr(r.textContent, c, e),
i = ["children", "" + c]) : o.hasOwnProperty(l) && null != c && "onScroll" === l && Or("scroll", r)
}
switch (n) {
case "input":
J(r),
$(r, a, !0);
break;
case "textarea":
J(r),
ae(r);
break;
case "select":
case "option":
break;
default:
"function" === typeof a.onClick && (r.onclick = $r)
}
r = i,
t.updateQueue = r,
null !== r && (t.flags |= 4)
} else {
l = 9 === i.nodeType ? i : i.ownerDocument,
"http://www.w3.org/1999/xhtml" === e && (e = oe(n)),
"http://www.w3.org/1999/xhtml" === e ? "script" === n ? ((e = l.createElement("div")).innerHTML = "<script><\/script>",
e = e.removeChild(e.firstChild)) : "string" === typeof r.is ? e = l.createElement(n, {
is: r.is
}) : (e = l.createElement(n),
"select" === n && (l = e,
r.multiple ? l.multiple = !0 : r.size && (l.size = r.size))) : e = l.createElementNS(e, n),
e[hi] = t,
e[pi] = r,
Po(e, t, !1, !1),
t.stateNode = e;
e: {
switch (l = xe(n, r),
n) {
case "dialog":
Or("cancel", e),
Or("close", e),
i = r;
break;
case "iframe":
case "object":
case "embed":
Or("load", e),
i = r;
break;
case "video":
case "audio":
for (i = 0; i < Nr.length; i++)
Or(Nr[i], e);
i = r;
break;
case "source":
Or("error", e),
i = r;
break;
case "img":
case "image":
case "link":
Or("error", e),
Or("load", e),
i = r;
break;
case "details":
Or("toggle", e),
i = r;
break;
case "input":
Y(e, r),
i = q(e, r),
Or("invalid", e);
break;
case "option":
default:
i = r;
break;
case "select":
e._wrapperState = {
wasMultiple: !!r.multiple
},
i = j({}, r, {
value: void 0
}),
Or("invalid", e);
break;
case "textarea":
ie(e, r),
i = re(e, r),
Or("invalid", e)
}
for (a in ye(n, i),
c = i)
if (c.hasOwnProperty(a)) {
var u = c[a];
"style" === a ? ge(e, u) : "dangerouslySetInnerHTML" === a ? null != (u = u ? u.__html : void 0) && de(e, u) : "children" === a ? "string" === typeof u ? ("textarea" !== n || "" !== u) && he(e, u) : "number" === typeof u && he(e, "" + u) : "suppressContentEditableWarning" !== a && "suppressHydrationWarning" !== a && "autoFocus" !== a && (o.hasOwnProperty(a) ? null != u && "onScroll" === a && Or("scroll", e) : null != u && x(e, a, u, l))
}
switch (n) {
case "input":
J(e),
$(e, r, !1);
break;
case "textarea":
J(e),
ae(e);
break;
case "option":
null != r.value && e.setAttribute("value", "" + V(r.value));
break;
case "select":
e.multiple = !!r.multiple,
null != (a = r.value) ? ne(e, !!r.multiple, a, !1) : null != r.defaultValue && ne(e, !!r.multiple, r.defaultValue, !0);
break;
default:
"function" === typeof i.onClick && (e.onclick = $r)
}
switch (n) {
case "button":
case "input":
case "select":
case "textarea":
r = !!r.autoFocus;
break e;
case "img":
r = !0;
break e;
default:
r = !1
}
}
r && (t.flags |= 4)
}
null !== t.ref && (t.flags |= 512,
t.flags |= 2097152)
}
return Jo(t),
null;
case 6:
if (e && null != t.stateNode)
Io(e, t, e.memoizedProps, r);
else {
if ("string" !== typeof r && null === t.stateNode)
throw Error(s(166));
if (n = Ks(Xs.current),
Ks(Ws.current),
ds(t)) {
if (r = t.stateNode,
n = t.memoizedProps,
r[hi] = t,
(a = r.nodeValue !== n) && null !== (e = ns))
switch (e.tag) {
case 3:
Zr(r.nodeValue, n, 0 !== (1 & e.mode));
break;
case 5:
!0 !== e.memoizedProps.suppressHydrationWarning && Zr(r.nodeValue, n, 0 !== (1 & e.mode))
}
a && (t.flags |= 4)
} else
(r = (9 === n.nodeType ? n : n.ownerDocument).createTextNode(r))[hi] = t,
t.stateNode = r
}
return Jo(t),
null;
case 13:
if (Mi($s),
r = t.memoizedState,
null === e || null !== e.memoizedState && null !== e.memoizedState.dehydrated) {
if (is && null !== rs && 0 !== (1 & t.mode) && 0 === (128 & t.flags))
hs(),
ps(),
t.flags |= 98560,
a = !1;
else if (a = ds(t),
null !== r && null !== r.dehydrated) {
if (null === e) {
if (!a)
throw Error(s(318));
if (!(a = null !== (a = t.memoizedState) ? a.dehydrated : null))
throw Error(s(317));
a[hi] = t
} else
ps(),
0 === (128 & t.flags) && (t.memoizedState = null),
t.flags |= 4;
Jo(t),
a = !1
} else
null !== ss && (ac(ss),
ss = null),
a = !0;
if (!a)
return 65536 & t.flags ? t : null
}
return 0 !== (128 & t.flags) ? (t.lanes = n,
t) : ((r = null !== r) !== (null !== e && null !== e.memoizedState) && r && (t.child.flags |= 8192,
0 !== (1 & t.mode) && (null === e || 0 !== (1 & $s.current) ? 0 === Il && (Il = 3) : mc())),
null !== t.updateQueue && (t.flags |= 4),
Jo(t),
null);
case 4:
return Ys(),
ko(e, t),
null === e && Gr(t.stateNode.containerInfo),
Jo(t),
null;
case 10:
return Es(t.type._context),
Jo(t),
null;
case 19:
if (Mi($s),
null === (a = t.memoizedState))
return Jo(t),
null;
if (r = 0 !== (128 & t.flags),
null === (l = a.rendering))
if (r)
Wo(a, !1);
else {
if (0 !== Il || null !== e && 0 !== (128 & e.flags))
for (e = t.child; null !== e; ) {
if (null !== (l = ea(e))) {
for (t.flags |= 128,
Wo(a, !1),
null !== (r = l.updateQueue) && (t.updateQueue = r,
t.flags |= 4),
t.subtreeFlags = 0,
r = n,
n = t.child; null !== n; )
e = r,
(a = n).flags &= 14680066,
null === (l = a.alternate) ? (a.childLanes = 0,
a.lanes = e,
a.child = null,
a.subtreeFlags = 0,
a.memoizedProps = null,
a.memoizedState = null,
a.updateQueue = null,
a.dependencies = null,
a.stateNode = null) : (a.childLanes = l.childLanes,
a.lanes = l.lanes,
a.child = l.child,
a.subtreeFlags = 0,
a.deletions = null,
a.memoizedProps = l.memoizedProps,
a.memoizedState = l.memoizedState,
a.updateQueue = l.updateQueue,
a.type = l.type,
e = l.dependencies,
a.dependencies = null === e ? null : {
lanes: e.lanes,
firstContext: e.firstContext
}),
n = n.sibling;
return Ci($s, 1 & $s.current | 2),
t.child
}
e = e.sibling
}
null !== a.tail && Qe() > Gl && (t.flags |= 128,
r = !0,
Wo(a, !1),
t.lanes = 4194304)
}
else {
if (!r)
if (null !== (e = ea(l))) {
if (t.flags |= 128,
r = !0,
null !== (n = e.updateQueue) && (t.updateQueue = n,
t.flags |= 4),
Wo(a, !0),
null === a.tail && "hidden" === a.tailMode && !l.alternate && !is)
return Jo(t),
null
} else
2 * Qe() - a.renderingStartTime > Gl && 1073741824 !== n && (t.flags |= 128,
r = !0,
Wo(a, !1),
t.lanes = 4194304);
a.isBackwards ? (l.sibling = t.child,
t.child = l) : (null !== (n = a.last) ? n.sibling = l : t.child = l,
a.last = l)
}
return null !== a.tail ? (t = a.tail,
a.rendering = t,
a.tail = t.sibling,
a.renderingStartTime = Qe(),
t.sibling = null,
n = $s.current,
Ci($s, r ? 1 & n | 2 : 1 & n),
t) : (Jo(t),
null);
case 22:
case 23:
return dc(),
r = null !== t.memoizedState,
null !== e && null !== e.memoizedState !== r && (t.flags |= 8192),
r && 0 !== (1 & t.mode) ? 0 !== (1073741824 & kl) && (Jo(t),
6 & t.subtreeFlags && (t.flags |= 8192)) : Jo(t),
null;
case 24:
case 25:
return null
}
throw Error(s(156, t.tag))
}
function Ko(e, t) {
switch (ts(t),
t.tag) {
case 1:
return ki(t.type) && Li(),
65536 & (e = t.flags) ? (t.flags = -65537 & e | 128,
t) : null;
case 3:
return Ys(),
Mi(Ri),
Mi(Ti),
na(),
0 !== (65536 & (e = t.flags)) && 0 === (128 & e) ? (t.flags = -65537 & e | 128,
t) : null;
case 5:
return Zs(t),
null;
case 13:
if (Mi($s),
null !== (e = t.memoizedState) && null !== e.dehydrated) {
if (null === t.alternate)
throw Error(s(340));
ps()
}
return 65536 & (e = t.flags) ? (t.flags = -65537 & e | 128,
t) : null;
case 19:
return Mi($s),
null;
case 4:
return Ys(),
null;
case 10:
return Es(t.type._context),
null;
case 22:
case 23:
return dc(),
null;
default:
return null
}
}
Po = function(e, t) {
for (var n = t.child; null !== n; ) {
if (5 === n.tag || 6 === n.tag)
e.appendChild(n.stateNode);
else if (4 !== n.tag && null !== n.child) {
n.child.return = n,
n = n.child;
continue
}
if (n === t)
break;
for (; null === n.sibling; ) {
if (null === n.return || n.return === t)
return;
n = n.return
}
n.sibling.return = n.return,
n = n.sibling
}
}
,
ko = function() {}
,
Lo = function(e, t, n, r) {
var i = e.memoizedProps;
if (i !== r) {
e = t.stateNode,
Ks(Ws.current);
var s, a = null;
switch (n) {
case "input":
i = q(e, i),
r = q(e, r),
a = [];
break;
case "select":
i = j({}, i, {
value: void 0
}),
r = j({}, r, {
value: void 0
}),
a = [];
break;
case "textarea":
i = re(e, i),
r = re(e, r),
a = [];
break;
default:
"function" !== typeof i.onClick && "function" === typeof r.onClick && (e.onclick = $r)
}
for (u in ye(n, r),
n = null,
i)
if (!r.hasOwnProperty(u) && i.hasOwnProperty(u) && null != i[u])
if ("style" === u) {
var l = i[u];
for (s in l)
l.hasOwnProperty(s) && (n || (n = {}),
n[s] = "")
} else
"dangerouslySetInnerHTML" !== u && "children" !== u && "suppressContentEditableWarning" !== u && "suppressHydrationWarning" !== u && "autoFocus" !== u && (o.hasOwnProperty(u) ? a || (a = []) : (a = a || []).push(u, null));
for (u in r) {
var c = r[u];
if (l = null != i ? i[u] : void 0,
r.hasOwnProperty(u) && c !== l && (null != c || null != l))
if ("style" === u)
if (l) {
for (s in l)
!l.hasOwnProperty(s) || c && c.hasOwnProperty(s) || (n || (n = {}),
n[s] = "");
for (s in c)
c.hasOwnProperty(s) && l[s] !== c[s] && (n || (n = {}),
n[s] = c[s])
} else
n || (a || (a = []),
a.push(u, n)),
n = c;
else
"dangerouslySetInnerHTML" === u ? (c = c ? c.__html : void 0,
l = l ? l.__html : void 0,
null != c && l !== c && (a = a || []).push(u, c)) : "children" === u ? "string" !== typeof c && "number" !== typeof c || (a = a || []).push(u, "" + c) : "suppressContentEditableWarning" !== u && "suppressHydrationWarning" !== u && (o.hasOwnProperty(u) ? (null != c && "onScroll" === u && Or("scroll", e),
a || l === c || (a = [])) : (a = a || []).push(u, c))
}
n && (a = a || []).push("style", n);
var u = a;
(t.updateQueue = u) && (t.flags |= 4)
}
}
,
Io = function(e, t, n, r) {
n !== r && (t.flags |= 4)
}
;
var qo = !1
, Yo = !1
, Qo = "function" === typeof WeakSet ? WeakSet : Set
, Zo = null;
function $o(e, t) {
var n = e.ref;
if (null !== n)
if ("function" === typeof n)
try {
n(null)
} catch (r) {
Ac(e, t, r)
}
else
n.current = null
}
function el(e, t, n) {
try {
n()
} catch (r) {
Ac(e, t, r)
}
}
var tl = !1;
function nl(e, t, n) {
var r = t.updateQueue;
if (null !== (r = null !== r ? r.lastEffect : null)) {
var i = r = r.next;
do {
if ((i.tag & e) === e) {
var s = i.destroy;
i.destroy = void 0,
void 0 !== s && el(t, n, s)
}
i = i.next
} while (i !== r)
}
}
function rl(e, t) {
if (null !== (t = null !== (t = t.updateQueue) ? t.lastEffect : null)) {
var n = t = t.next;
do {
if ((n.tag & e) === e) {
var r = n.create;
n.destroy = r()
}
n = n.next
} while (n !== t)
}
}
function il(e) {
var t = e.ref;
if (null !== t) {
var n = e.stateNode;
e.tag,
e = n,
"function" === typeof t ? t(e) : t.current = e
}
}
function sl(e) {
var t = e.alternate;
null !== t && (e.alternate = null,
sl(t)),
e.child = null,
e.deletions = null,
e.sibling = null,
5 === e.tag && (null !== (t = e.stateNode) && (delete t[hi],
delete t[pi],
delete t[mi],
delete t[gi],
delete t[vi])),
e.stateNode = null,
e.return = null,
e.dependencies = null,
e.memoizedProps = null,
e.memoizedState = null,
e.pendingProps = null,
e.stateNode = null,
e.updateQueue = null
}
function al(e) {
return 5 === e.tag || 3 === e.tag || 4 === e.tag
}
function ol(e) {
e: for (; ; ) {
for (; null === e.sibling; ) {
if (null === e.return || al(e.return))
return null;
e = e.return
}
for (e.sibling.return = e.return,
e = e.sibling; 5 !== e.tag && 6 !== e.tag && 18 !== e.tag; ) {
if (2 & e.flags)
continue e;
if (null === e.child || 4 === e.tag)
continue e;
e.child.return = e,
e = e.child
}
if (!(2 & e.flags))
return e.stateNode
}
}
function ll(e, t, n) {
var r = e.tag;
if (5 === r || 6 === r)
e = e.stateNode,
t ? 8 === n.nodeType ? n.parentNode.insertBefore(e, t) : n.insertBefore(e, t) : (8 === n.nodeType ? (t = n.parentNode).insertBefore(e, n) : (t = n).appendChild(e),
null !== (n = n._reactRootContainer) && void 0 !== n || null !== t.onclick || (t.onclick = $r));
else if (4 !== r && null !== (e = e.child))
for (ll(e, t, n),
e = e.sibling; null !== e; )
ll(e, t, n),
e = e.sibling
}
function cl(e, t, n) {
var r = e.tag;
if (5 === r || 6 === r)
e = e.stateNode,
t ? n.insertBefore(e, t) : n.appendChild(e);
else if (4 !== r && null !== (e = e.child))
for (cl(e, t, n),
e = e.sibling; null !== e; )
cl(e, t, n),
e = e.sibling
}
var ul = null
, dl = !1;
function hl(e, t, n) {
for (n = n.child; null !== n; )
pl(e, t, n),
n = n.sibling
}
function pl(e, t, n) {
if (st && "function" === typeof st.onCommitFiberUnmount)
try {
st.onCommitFiberUnmount(it, n)
} catch (o) {}
switch (n.tag) {
case 5:
Yo || $o(n, t);
case 6:
var r = ul
, i = dl;
ul = null,
hl(e, t, n),
dl = i,
null !== (ul = r) && (dl ? (e = ul,
n = n.stateNode,
8 === e.nodeType ? e.parentNode.removeChild(n) : e.removeChild(n)) : ul.removeChild(n.stateNode));
break;
case 18:
null !== ul && (dl ? (e = ul,
n = n.stateNode,
8 === e.nodeType ? li(e.parentNode, n) : 1 === e.nodeType && li(e, n),
Gt(e)) : li(ul, n.stateNode));
break;
case 4:
r = ul,
i = dl,
ul = n.stateNode.containerInfo,
dl = !0,
hl(e, t, n),
ul = r,
dl = i;
break;
case 0:
case 11:
case 14:
case 15:
if (!Yo && (null !== (r = n.updateQueue) && null !== (r = r.lastEffect))) {
i = r = r.next;
do {
var s = i
, a = s.destroy;
s = s.tag,
void 0 !== a && (0 !== (2 & s) || 0 !== (4 & s)) && el(n, t, a),
i = i.next
} while (i !== r)
}
hl(e, t, n);
break;
case 1:
if (!Yo && ($o(n, t),
"function" === typeof (r = n.stateNode).componentWillUnmount))
try {
r.props = n.memoizedProps,
r.state = n.memoizedState,
r.componentWillUnmount()
} catch (o) {
Ac(n, t, o)
}
hl(e, t, n);
break;
case 21:
hl(e, t, n);
break;
case 22:
1 & n.mode ? (Yo = (r = Yo) || null !== n.memoizedState,
hl(e, t, n),
Yo = r) : hl(e, t, n);
break;
default:
hl(e, t, n)
}
}
function fl(e) {
var t = e.updateQueue;
if (null !== t) {
e.updateQueue = null;
var n = e.stateNode;
null === n && (n = e.stateNode = new Qo),
t.forEach((function(t) {
var r = Tc.bind(null, e, t);
n.has(t) || (n.add(t),
t.then(r, r))
}
))
}
}
function ml(e, t) {
var n = t.deletions;
if (null !== n)
for (var r = 0; r < n.length; r++) {
var i = n[r];
try {
var a = e
, o = t
, l = o;
e: for (; null !== l; ) {
switch (l.tag) {
case 5:
ul = l.stateNode,
dl = !1;
break e;
case 3:
case 4:
ul = l.stateNode.containerInfo,
dl = !0;
break e
}
l = l.return
}
if (null === ul)
throw Error(s(160));
pl(a, o, i),
ul = null,
dl = !1;
var c = i.alternate;
null !== c && (c.return = null),
i.return = null
} catch (u) {
Ac(i, t, u)
}
}
if (12854 & t.subtreeFlags)
for (t = t.child; null !== t; )
gl(t, e),
t = t.sibling
}
function gl(e, t) {
var n = e.alternate
, r = e.flags;
switch (e.tag) {
case 0:
case 11:
case 14:
case 15:
if (ml(t, e),
vl(e),
4 & r) {
try {
nl(3, e, e.return),
rl(3, e)
} catch (g) {
Ac(e, e.return, g)
}
try {
nl(5, e, e.return)
} catch (g) {
Ac(e, e.return, g)
}
}
break;
case 1:
ml(t, e),
vl(e),
512 & r && null !== n && $o(n, n.return);
break;
case 5:
if (ml(t, e),
vl(e),
512 & r && null !== n && $o(n, n.return),
32 & e.flags) {
var i = e.stateNode;
try {
he(i, "")
} catch (g) {
Ac(e, e.return, g)
}
}
if (4 & r && null != (i = e.stateNode)) {
var a = e.memoizedProps
, o = null !== n ? n.memoizedProps : a
, l = e.type
, c = e.updateQueue;
if (e.updateQueue = null,
null !== c)
try {
"input" === l && "radio" === a.type && null != a.name && Q(i, a),
xe(l, o);
var u = xe(l, a);
for (o = 0; o < c.length; o += 2) {
var d = c[o]
, h = c[o + 1];
"style" === d ? ge(i, h) : "dangerouslySetInnerHTML" === d ? de(i, h) : "children" === d ? he(i, h) : x(i, d, h, u)
}
switch (l) {
case "input":
Z(i, a);
break;
case "textarea":
se(i, a);
break;
case "select":
var p = i._wrapperState.wasMultiple;
i._wrapperState.wasMultiple = !!a.multiple;
var f = a.value;
null != f ? ne(i, !!a.multiple, f, !1) : p !== !!a.multiple && (null != a.defaultValue ? ne(i, !!a.multiple, a.defaultValue, !0) : ne(i, !!a.multiple, a.multiple ? [] : "", !1))
}
i[pi] = a
} catch (g) {
Ac(e, e.return, g)
}
}
break;
case 6:
if (ml(t, e),
vl(e),
4 & r) {
if (null === e.stateNode)
throw Error(s(162));
i = e.stateNode,
a = e.memoizedProps;
try {
i.nodeValue = a
} catch (g) {
Ac(e, e.return, g)
}
}
break;
case 3:
if (ml(t, e),
vl(e),
4 & r && null !== n && n.memoizedState.isDehydrated)
try {
Gt(t.containerInfo)
} catch (g) {
Ac(e, e.return, g)
}
break;
case 4:
default:
ml(t, e),
vl(e);
break;
case 13:
ml(t, e),
vl(e),
8192 & (i = e.child).flags && (a = null !== i.memoizedState,
i.stateNode.isHidden = a,
!a || null !== i.alternate && null !== i.alternate.memoizedState || (zl = Qe())),
4 & r && fl(e);
break;
case 22:
if (d = null !== n && null !== n.memoizedState,
1 & e.mode ? (Yo = (u = Yo) || d,
ml(t, e),
Yo = u) : ml(t, e),
vl(e),
8192 & r) {
if (u = null !== e.memoizedState,
(e.stateNode.isHidden = u) && !d && 0 !== (1 & e.mode))
for (Zo = e,
d = e.child; null !== d; ) {
for (h = Zo = d; null !== Zo; ) {
switch (f = (p = Zo).child,
p.tag) {
case 0:
case 11:
case 14:
case 15:
nl(4, p, p.return);
break;
case 1:
$o(p, p.return);
var m = p.stateNode;
if ("function" === typeof m.componentWillUnmount) {
r = p,
n = p.return;
try {
t = r,
m.props = t.memoizedProps,
m.state = t.memoizedState,
m.componentWillUnmount()
} catch (g) {
Ac(r, n, g)
}
}
break;
case 5:
$o(p, p.return);
break;
case 22:
if (null !== p.memoizedState) {
_l(h);
continue
}
}
null !== f ? (f.return = p,
Zo = f) : _l(h)
}
d = d.sibling
}
e: for (d = null,
h = e; ; ) {
if (5 === h.tag) {
if (null === d) {
d = h;
try {
i = h.stateNode,
u ? "function" === typeof (a = i.style).setProperty ? a.setProperty("display", "none", "important") : a.display = "none" : (l = h.stateNode,
o = void 0 !== (c = h.memoizedProps.style) && null !== c && c.hasOwnProperty("display") ? c.display : null,
l.style.display = me("display", o))
} catch (g) {
Ac(e, e.return, g)
}
}
} else if (6 === h.tag) {
if (null === d)
try {
h.stateNode.nodeValue = u ? "" : h.memoizedProps
} catch (g) {
Ac(e, e.return, g)
}
} else if ((22 !== h.tag && 23 !== h.tag || null === h.memoizedState || h === e) && null !== h.child) {
h.child.return = h,
h = h.child;
continue
}
if (h === e)
break e;
for (; null === h.sibling; ) {
if (null === h.return || h.return === e)
break e;
d === h && (d = null),
h = h.return
}
d === h && (d = null),
h.sibling.return = h.return,
h = h.sibling
}
}
break;
case 19:
ml(t, e),
vl(e),
4 & r && fl(e);
case 21:
}
}
function vl(e) {
var t = e.flags;
if (2 & t) {
try {
e: {
for (var n = e.return; null !== n; ) {
if (al(n)) {
var r = n;
break e
}
n = n.return
}
throw Error(s(160))
}
switch (r.tag) {
case 5:
var i = r.stateNode;
32 & r.flags && (he(i, ""),
r.flags &= -33),
cl(e, ol(e), i);
break;
case 3:
case 4:
var a = r.stateNode.containerInfo;
ll(e, ol(e), a);
break;
default:
throw Error(s(161))
}
} catch (o) {
Ac(e, e.return, o)
}
e.flags &= -3
}
4096 & t && (e.flags &= -4097)
}
function yl(e, t, n) {
Zo = e,
xl(e, t, n)
}
function xl(e, t, n) {
for (var r = 0 !== (1 & e.mode); null !== Zo; ) {
var i = Zo
, s = i.child;
if (22 === i.tag && r) {
var a = null !== i.memoizedState || qo;
if (!a) {
var o = i.alternate
, l = null !== o && null !== o.memoizedState || Yo;
o = qo;
var c = Yo;
if (qo = a,
(Yo = l) && !c)
for (Zo = i; null !== Zo; )
l = (a = Zo).child,
22 === a.tag && null !== a.memoizedState ? wl(i) : null !== l ? (l.return = a,
Zo = l) : wl(i);
for (; null !== s; )
Zo = s,
xl(s, t, n),
s = s.sibling;
Zo = i,
qo = o,
Yo = c
}
bl(e)
} else
0 !== (8772 & i.subtreeFlags) && null !== s ? (s.return = i,
Zo = s) : bl(e)
}
}
function bl(e) {
for (; null !== Zo; ) {
var t = Zo;
if (0 !== (8772 & t.flags)) {
var n = t.alternate;
try {
if (0 !== (8772 & t.flags))
switch (t.tag) {
case 0:
case 11:
case 15:
Yo || rl(5, t);
break;
case 1:
var r = t.stateNode;
if (4 & t.flags && !Yo)
if (null === n)
r.componentDidMount();
else {
var i = t.elementType === t.type ? n.memoizedProps : to(t.type, n.memoizedProps);
r.componentDidUpdate(i, n.memoizedState, r.__reactInternalSnapshotBeforeUpdate)
}
var a = t.updateQueue;
null !== a && Hs(t, a, r);
break;
case 3:
var o = t.updateQueue;
if (null !== o) {
if (n = null,
null !== t.child)
switch (t.child.tag) {
case 5:
case 1:
n = t.child.stateNode
}
Hs(t, o, n)
}
break;
case 5:
var l = t.stateNode;
if (null === n && 4 & t.flags) {
n = l;
var c = t.memoizedProps;
switch (t.type) {
case "button":
case "input":
case "select":
case "textarea":
c.autoFocus && n.focus();
break;
case "img":
c.src && (n.src = c.src)
}
}
break;
case 6:
case 4:
case 12:
case 19:
case 17:
case 21:
case 22:
case 23:
case 25:
break;
case 13:
if (null === t.memoizedState) {
var u = t.alternate;
if (null !== u) {
var d = u.memoizedState;
if (null !== d) {
var h = d.dehydrated;
null !== h && Gt(h)
}
}
}
break;
default:
throw Error(s(163))
}
Yo || 512 & t.flags && il(t)
} catch (p) {
Ac(t, t.return, p)
}
}
if (t === e) {
Zo = null;
break
}
if (null !== (n = t.sibling)) {
n.return = t.return,
Zo = n;
break
}
Zo = t.return
}
}
function _l(e) {
for (; null !== Zo; ) {
var t = Zo;
if (t === e) {
Zo = null;
break
}
var n = t.sibling;
if (null !== n) {
n.return = t.return,
Zo = n;
break
}
Zo = t.return
}
}
function wl(e) {
for (; null !== Zo; ) {
var t = Zo;
try {
switch (t.tag) {
case 0:
case 11:
case 15:
var n = t.return;
try {
rl(4, t)
} catch (l) {
Ac(t, n, l)
}
break;
case 1:
var r = t.stateNode;
if ("function" === typeof r.componentDidMount) {
var i = t.return;
try {
r.componentDidMount()
} catch (l) {
Ac(t, i, l)
}
}
var s = t.return;
try {
il(t)
} catch (l) {
Ac(t, s, l)
}
break;
case 5:
var a = t.return;
try {
il(t)
} catch (l) {
Ac(t, a, l)
}
}
} catch (l) {
Ac(t, t.return, l)
}
if (t === e) {
Zo = null;
break
}
var o = t.sibling;
if (null !== o) {
o.return = t.return,
Zo = o;
break
}
Zo = t.return
}
}
var Sl, Al = Math.ceil, Ml = b.ReactCurrentDispatcher, Cl = b.ReactCurrentOwner, El = b.ReactCurrentBatchConfig, Tl = 0, Rl = null, Bl = null, Pl = 0, kl = 0, Ll = Ai(0), Il = 0, Nl = null, Dl = 0, jl = 0, Fl = 0, Ol = null, Ul = null, zl = 0, Gl = 1 / 0, Hl = null, Vl = !1, Wl = null, Jl = null, Xl = !1, Kl = null, ql = 0, Yl = 0, Ql = null, Zl = -1, $l = 0;
function ec() {
return 0 !== (6 & Tl) ? Qe() : -1 !== Zl ? Zl : Zl = Qe()
}
function tc(e) {
return 0 === (1 & e.mode) ? 1 : 0 !== (2 & Tl) && 0 !== Pl ? Pl & -Pl : null !== ms.transition ? (0 === $l && ($l = mt()),
$l) : 0 !== (e = xt) ? e : e = void 0 === (e = window.event) ? 16 : Yt(e.type)
}
function nc(e, t, n, r) {
if (50 < Yl)
throw Yl = 0,
Ql = null,
Error(s(185));
vt(e, n, r),
0 !== (2 & Tl) && e === Rl || (e === Rl && (0 === (2 & Tl) && (jl |= n),
4 === Il && oc(e, Pl)),
rc(e, r),
1 === n && 0 === Tl && 0 === (1 & t.mode) && (Gl = Qe() + 500,
Oi && Gi()))
}
function rc(e, t) {
var n = e.callbackNode;
!function(e, t) {
for (var n = e.suspendedLanes, r = e.pingedLanes, i = e.expirationTimes, s = e.pendingLanes; 0 < s; ) {
var a = 31 - at(s)
, o = 1 << a
, l = i[a];
-1 === l ? 0 !== (o & n) && 0 === (o & r) || (i[a] = pt(o, t)) : l <= t && (e.expiredLanes |= o),
s &= ~o
}
}(e, t);
var r = ht(e, e === Rl ? Pl : 0);
if (0 === r)
null !== n && Ke(n),
e.callbackNode = null,
e.callbackPriority = 0;
else if (t = r & -r,
e.callbackPriority !== t) {
if (null != n && Ke(n),
1 === t)
0 === e.tag ? function(e) {
Oi = !0,
zi(e)
}(lc.bind(null, e)) : zi(lc.bind(null, e)),
ai((function() {
0 === (6 & Tl) && Gi()
}
)),
n = null;
else {
switch (bt(r)) {
case 1:
n = $e;
break;
case 4:
n = et;
break;
case 16:
default:
n = tt;
break;
case 536870912:
n = rt
}
n = Rc(n, ic.bind(null, e))
}
e.callbackPriority = t,
e.callbackNode = n
}
}
function ic(e, t) {
if (Zl = -1,
$l = 0,
0 !== (6 & Tl))
throw Error(s(327));
var n = e.callbackNode;
if (wc() && e.callbackNode !== n)
return null;
var r = ht(e, e === Rl ? Pl : 0);
if (0 === r)
return null;
if (0 !== (30 & r) || 0 !== (r & e.expiredLanes) || t)
t = gc(e, r);
else {
t = r;
var i = Tl;
Tl |= 2;
var a = fc();
for (Rl === e && Pl === t || (Hl = null,
Gl = Qe() + 500,
hc(e, t)); ; )
try {
yc();
break
} catch (l) {
pc(e, l)
}
Cs(),
Ml.current = a,
Tl = i,
null !== Bl ? t = 0 : (Rl = null,
Pl = 0,
t = Il)
}
if (0 !== t) {
if (2 === t && (0 !== (i = ft(e)) && (r = i,
t = sc(e, i))),
1 === t)
throw n = Nl,
hc(e, 0),
oc(e, r),
rc(e, Qe()),
n;
if (6 === t)
oc(e, r);
else {
if (i = e.current.alternate,
0 === (30 & r) && !function(e) {
for (var t = e; ; ) {
if (16384 & t.flags) {
var n = t.updateQueue;
if (null !== n && null !== (n = n.stores))
for (var r = 0; r < n.length; r++) {
var i = n[r]
, s = i.getSnapshot;
i = i.value;
try {
if (!or(s(), i))
return !1
} catch (o) {
return !1
}
}
}
if (n = t.child,
16384 & t.subtreeFlags && null !== n)
n.return = t,
t = n;
else {
if (t === e)
break;
for (; null === t.sibling; ) {
if (null === t.return || t.return === e)
return !0;
t = t.return
}
t.sibling.return = t.return,
t = t.sibling
}
}
return !0
}(i) && (2 === (t = gc(e, r)) && (0 !== (a = ft(e)) && (r = a,
t = sc(e, a))),
1 === t))
throw n = Nl,
hc(e, 0),
oc(e, r),
rc(e, Qe()),
n;
switch (e.finishedWork = i,
e.finishedLanes = r,
t) {
case 0:
case 1:
throw Error(s(345));
case 2:
case 5:
_c(e, Ul, Hl);
break;
case 3:
if (oc(e, r),
(130023424 & r) === r && 10 < (t = zl + 500 - Qe())) {
if (0 !== ht(e, 0))
break;
if (((i = e.suspendedLanes) & r) !== r) {
ec(),
e.pingedLanes |= e.suspendedLanes & i;
break
}
e.timeoutHandle = ri(_c.bind(null, e, Ul, Hl), t);
break
}
_c(e, Ul, Hl);
break;
case 4:
if (oc(e, r),
(4194240 & r) === r)
break;
for (t = e.eventTimes,
i = -1; 0 < r; ) {
var o = 31 - at(r);
a = 1 << o,
(o = t[o]) > i && (i = o),
r &= ~a
}
if (r = i,
10 < (r = (120 > (r = Qe() - r) ? 120 : 480 > r ? 480 : 1080 > r ? 1080 : 1920 > r ? 1920 : 3e3 > r ? 3e3 : 4320 > r ? 4320 : 1960 * Al(r / 1960)) - r)) {
e.timeoutHandle = ri(_c.bind(null, e, Ul, Hl), r);
break
}
_c(e, Ul, Hl);
break;
default:
throw Error(s(329))
}
}
}
return rc(e, Qe()),
e.callbackNode === n ? ic.bind(null, e) : null
}
function sc(e, t) {
var n = Ol;
return e.current.memoizedState.isDehydrated && (hc(e, t).flags |= 256),
2 !== (e = gc(e, t)) && (t = Ul,
Ul = n,
null !== t && ac(t)),
e
}
function ac(e) {
null === Ul ? Ul = e : Ul.push.apply(Ul, e)
}
function oc(e, t) {
for (t &= ~Fl,
t &= ~jl,
e.suspendedLanes |= t,
e.pingedLanes &= ~t,
e = e.expirationTimes; 0 < t; ) {
var n = 31 - at(t)
, r = 1 << n;
e[n] = -1,
t &= ~r
}
}
function lc(e) {
if (0 !== (6 & Tl))
throw Error(s(327));
wc();
var t = ht(e, 0);
if (0 === (1 & t))
return rc(e, Qe()),
null;
var n = gc(e, t);
if (0 !== e.tag && 2 === n) {
var r = ft(e);
0 !== r && (t = r,
n = sc(e, r))
}
if (1 === n)
throw n = Nl,
hc(e, 0),
oc(e, t),
rc(e, Qe()),
n;
if (6 === n)
throw Error(s(345));
return e.finishedWork = e.current.alternate,
e.finishedLanes = t,
_c(e, Ul, Hl),
rc(e, Qe()),
null
}
function cc(e, t) {
var n = Tl;
Tl |= 1;
try {
return e(t)
} finally {
0 === (Tl = n) && (Gl = Qe() + 500,
Oi && Gi())
}
}
function uc(e) {
null !== Kl && 0 === Kl.tag && 0 === (6 & Tl) && wc();
var t = Tl;
Tl |= 1;
var n = El.transition
, r = xt;
try {
if (El.transition = null,
xt = 1,
e)
return e()
} finally {
xt = r,
El.transition = n,
0 === (6 & (Tl = t)) && Gi()
}
}
function dc() {
kl = Ll.current,
Mi(Ll)
}
function hc(e, t) {
e.finishedWork = null,
e.finishedLanes = 0;
var n = e.timeoutHandle;
if (-1 !== n && (e.timeoutHandle = -1,
ii(n)),
null !== Bl)
for (n = Bl.return; null !== n; ) {
var r = n;
switch (ts(r),
r.tag) {
case 1:
null !== (r = r.type.childContextTypes) && void 0 !== r && Li();
break;
case 3:
Ys(),
Mi(Ri),
Mi(Ti),
na();
break;
case 5:
Zs(r);
break;
case 4:
Ys();
break;
case 13:
case 19:
Mi($s);
break;
case 10:
Es(r.type._context);
break;
case 22:
case 23:
dc()
}
n = n.return
}
if (Rl = e,
Bl = e = Lc(e.current, null),
Pl = kl = t,
Il = 0,
Nl = null,
Fl = jl = Dl = 0,
Ul = Ol = null,
null !== Ps) {
for (t = 0; t < Ps.length; t++)
if (null !== (r = (n = Ps[t]).interleaved)) {
n.interleaved = null;
var i = r.next
, s = n.pending;
if (null !== s) {
var a = s.next;
s.next = i,
r.next = a
}
n.pending = r
}
Ps = null
}
return e
}
function pc(e, t) {
for (; ; ) {
var n = Bl;
try {
if (Cs(),
ra.current = Qa,
ca) {
for (var r = aa.memoizedState; null !== r; ) {
var i = r.queue;
null !== i && (i.pending = null),
r = r.next
}
ca = !1
}
if (sa = 0,
la = oa = aa = null,
ua = !1,
da = 0,
Cl.current = null,
null === n || null === n.return) {
Il = 1,
Nl = t,
Bl = null;
break
}
e: {
var a = e
, o = n.return
, l = n
, c = t;
if (t = Pl,
l.flags |= 32768,
null !== c && "object" === typeof c && "function" === typeof c.then) {
var u = c
, d = l
, h = d.tag;
if (0 === (1 & d.mode) && (0 === h || 11 === h || 15 === h)) {
var p = d.alternate;
p ? (d.updateQueue = p.updateQueue,
d.memoizedState = p.memoizedState,
d.lanes = p.lanes) : (d.updateQueue = null,
d.memoizedState = null)
}
var f = go(o);
if (null !== f) {
f.flags &= -257,
vo(f, o, l, 0, t),
1 & f.mode && mo(a, u, t),
c = u;
var m = (t = f).updateQueue;
if (null === m) {
var g = new Set;
g.add(c),
t.updateQueue = g
} else
m.add(c);
break e
}
if (0 === (1 & t)) {
mo(a, u, t),
mc();
break e
}
c = Error(s(426))
} else if (is && 1 & l.mode) {
var v = go(o);
if (null !== v) {
0 === (65536 & v.flags) && (v.flags |= 256),
vo(v, o, l, 0, t),
fs(lo(c, l));
break e
}
}
a = c = lo(c, l),
4 !== Il && (Il = 2),
null === Ol ? Ol = [a] : Ol.push(a),
a = o;
do {
switch (a.tag) {
case 3:
a.flags |= 65536,
t &= -t,
a.lanes |= t,
zs(a, po(0, c, t));
break e;
case 1:
l = c;
var y = a.type
, x = a.stateNode;
if (0 === (128 & a.flags) && ("function" === typeof y.getDerivedStateFromError || null !== x && "function" === typeof x.componentDidCatch && (null === Jl || !Jl.has(x)))) {
a.flags |= 65536,
t &= -t,
a.lanes |= t,
zs(a, fo(a, l, t));
break e
}
}
a = a.return
} while (null !== a)
}
bc(n)
} catch (b) {
t = b,
Bl === n && null !== n && (Bl = n = n.return);
continue
}
break
}
}
function fc() {
var e = Ml.current;
return Ml.current = Qa,
null === e ? Qa : e
}
function mc() {
0 !== Il && 3 !== Il && 2 !== Il || (Il = 4),
null === Rl || 0 === (268435455 & Dl) && 0 === (268435455 & jl) || oc(Rl, Pl)
}
function gc(e, t) {
var n = Tl;
Tl |= 2;
var r = fc();
for (Rl === e && Pl === t || (Hl = null,
hc(e, t)); ; )
try {
vc();
break
} catch (i) {
pc(e, i)
}
if (Cs(),
Tl = n,
Ml.current = r,
null !== Bl)
throw Error(s(261));
return Rl = null,
Pl = 0,
Il
}
function vc() {
for (; null !== Bl; )
xc(Bl)
}
function yc() {
for (; null !== Bl && !qe(); )
xc(Bl)
}
function xc(e) {
var t = Sl(e.alternate, e, kl);
e.memoizedProps = e.pendingProps,
null === t ? bc(e) : Bl = t,
Cl.current = null
}
function bc(e) {
var t = e;
do {
var n = t.alternate;
if (e = t.return,
0 === (32768 & t.flags)) {
if (null !== (n = Xo(n, t, kl)))
return void (Bl = n)
} else {
if (null !== (n = Ko(n, t)))
return n.flags &= 32767,
void (Bl = n);
if (null === e)
return Il = 6,
void (Bl = null);
e.flags |= 32768,
e.subtreeFlags = 0,
e.deletions = null
}
if (null !== (t = t.sibling))
return void (Bl = t);
Bl = t = e
} while (null !== t);
0 === Il && (Il = 5)
}
function _c(e, t, n) {
var r = xt
, i = El.transition;
try {
El.transition = null,
xt = 1,
function(e, t, n, r) {
do {
wc()
} while (null !== Kl);
if (0 !== (6 & Tl))
throw Error(s(327));
n = e.finishedWork;
var i = e.finishedLanes;
if (null === n)
return null;
if (e.finishedWork = null,
e.finishedLanes = 0,
n === e.current)
throw Error(s(177));
e.callbackNode = null,
e.callbackPriority = 0;
var a = n.lanes | n.childLanes;
if (function(e, t) {
var n = e.pendingLanes & ~t;
e.pendingLanes = t,
e.suspendedLanes = 0,
e.pingedLanes = 0,
e.expiredLanes &= t,
e.mutableReadLanes &= t,
e.entangledLanes &= t,
t = e.entanglements;
var r = e.eventTimes;
for (e = e.expirationTimes; 0 < n; ) {
var i = 31 - at(n)
, s = 1 << i;
t[i] = 0,
r[i] = -1,
e[i] = -1,
n &= ~s
}
}(e, a),
e === Rl && (Bl = Rl = null,
Pl = 0),
0 === (2064 & n.subtreeFlags) && 0 === (2064 & n.flags) || Xl || (Xl = !0,
Rc(tt, (function() {
return wc(),
null
}
))),
a = 0 !== (15990 & n.flags),
0 !== (15990 & n.subtreeFlags) || a) {
a = El.transition,
El.transition = null;
var o = xt;
xt = 1;
var l = Tl;
Tl |= 4,
Cl.current = null,
function(e, t) {
if (ei = Vt,
pr(e = hr())) {
if ("selectionStart"in e)
var n = {
start: e.selectionStart,
end: e.selectionEnd
};
else
e: {
var r = (n = (n = e.ownerDocument) && n.defaultView || window).getSelection && n.getSelection();
if (r && 0 !== r.rangeCount) {
n = r.anchorNode;
var i = r.anchorOffset
, a = r.focusNode;
r = r.focusOffset;
try {
n.nodeType,
a.nodeType
} catch (_) {
n = null;
break e
}
var o = 0
, l = -1
, c = -1
, u = 0
, d = 0
, h = e
, p = null;
t: for (; ; ) {
for (var f; h !== n || 0 !== i && 3 !== h.nodeType || (l = o + i),
h !== a || 0 !== r && 3 !== h.nodeType || (c = o + r),
3 === h.nodeType && (o += h.nodeValue.length),
null !== (f = h.firstChild); )
p = h,
h = f;
for (; ; ) {
if (h === e)
break t;
if (p === n && ++u === i && (l = o),
p === a && ++d === r && (c = o),
null !== (f = h.nextSibling))
break;
p = (h = p).parentNode
}
h = f
}
n = -1 === l || -1 === c ? null : {
start: l,
end: c
}
} else
n = null
}
n = n || {
start: 0,
end: 0
}
} else
n = null;
for (ti = {
focusedElem: e,
selectionRange: n
},
Vt = !1,
Zo = t; null !== Zo; )
if (e = (t = Zo).child,
0 !== (1028 & t.subtreeFlags) && null !== e)
e.return = t,
Zo = e;
else
for (; null !== Zo; ) {
t = Zo;
try {
var m = t.alternate;
if (0 !== (1024 & t.flags))
switch (t.tag) {
case 0:
case 11:
case 15:
case 5:
case 6:
case 4:
case 17:
break;
case 1:
if (null !== m) {
var g = m.memoizedProps
, v = m.memoizedState
, y = t.stateNode
, x = y.getSnapshotBeforeUpdate(t.elementType === t.type ? g : to(t.type, g), v);
y.__reactInternalSnapshotBeforeUpdate = x
}
break;
case 3:
var b = t.stateNode.containerInfo;
1 === b.nodeType ? b.textContent = "" : 9 === b.nodeType && b.documentElement && b.removeChild(b.documentElement);
break;
default:
throw Error(s(163))
}
} catch (_) {
Ac(t, t.return, _)
}
if (null !== (e = t.sibling)) {
e.return = t.return,
Zo = e;
break
}
Zo = t.return
}
m = tl,
tl = !1
}(e, n),
gl(n, e),
fr(ti),
Vt = !!ei,
ti = ei = null,
e.current = n,
yl(n, e, i),
Ye(),
Tl = l,
xt = o,
El.transition = a
} else
e.current = n;
if (Xl && (Xl = !1,
Kl = e,
ql = i),
a = e.pendingLanes,
0 === a && (Jl = null),
function(e) {
if (st && "function" === typeof st.onCommitFiberRoot)
try {
st.onCommitFiberRoot(it, e, void 0, 128 === (128 & e.current.flags))
} catch (t) {}
}(n.stateNode),
rc(e, Qe()),
null !== t)
for (r = e.onRecoverableError,
n = 0; n < t.length; n++)
i = t[n],
r(i.value, {
componentStack: i.stack,
digest: i.digest
});
if (Vl)
throw Vl = !1,
e = Wl,
Wl = null,
e;
0 !== (1 & ql) && 0 !== e.tag && wc(),
a = e.pendingLanes,
0 !== (1 & a) ? e === Ql ? Yl++ : (Yl = 0,
Ql = e) : Yl = 0,
Gi()
}(e, t, n, r)
} finally {
El.transition = i,
xt = r
}
return null
}
function wc() {
if (null !== Kl) {
var e = bt(ql)
, t = El.transition
, n = xt;
try {
if (El.transition = null,
xt = 16 > e ? 16 : e,
null === Kl)
var r = !1;
else {
if (e = Kl,
Kl = null,
ql = 0,
0 !== (6 & Tl))
throw Error(s(331));
var i = Tl;
for (Tl |= 4,
Zo = e.current; null !== Zo; ) {
var a = Zo
, o = a.child;
if (0 !== (16 & Zo.flags)) {
var l = a.deletions;
if (null !== l) {
for (var c = 0; c < l.length; c++) {
var u = l[c];
for (Zo = u; null !== Zo; ) {
var d = Zo;
switch (d.tag) {
case 0:
case 11:
case 15:
nl(8, d, a)
}
var h = d.child;
if (null !== h)
h.return = d,
Zo = h;
else
for (; null !== Zo; ) {
var p = (d = Zo).sibling
, f = d.return;
if (sl(d),
d === u) {
Zo = null;
break
}
if (null !== p) {
p.return = f,
Zo = p;
break
}
Zo = f
}
}
}
var m = a.alternate;
if (null !== m) {
var g = m.child;
if (null !== g) {
m.child = null;
do {
var v = g.sibling;
g.sibling = null,
g = v
} while (null !== g)
}
}
Zo = a
}
}
if (0 !== (2064 & a.subtreeFlags) && null !== o)
o.return = a,
Zo = o;
else
e: for (; null !== Zo; ) {
if (0 !== (2048 & (a = Zo).flags))
switch (a.tag) {
case 0:
case 11:
case 15:
nl(9, a, a.return)
}
var y = a.sibling;
if (null !== y) {
y.return = a.return,
Zo = y;
break e
}
Zo = a.return
}
}
var x = e.current;
for (Zo = x; null !== Zo; ) {
var b = (o = Zo).child;
if (0 !== (2064 & o.subtreeFlags) && null !== b)
b.return = o,
Zo = b;
else
e: for (o = x; null !== Zo; ) {
if (0 !== (2048 & (l = Zo).flags))
try {
switch (l.tag) {
case 0:
case 11:
case 15:
rl(9, l)
}
} catch (w) {
Ac(l, l.return, w)
}
if (l === o) {
Zo = null;
break e
}
var _ = l.sibling;
if (null !== _) {
_.return = l.return,
Zo = _;
break e
}
Zo = l.return
}
}
if (Tl = i,
Gi(),
st && "function" === typeof st.onPostCommitFiberRoot)
try {
st.onPostCommitFiberRoot(it, e)
} catch (w) {}
r = !0
}
return r
} finally {
xt = n,
El.transition = t
}
}
return !1
}
function Sc(e, t, n) {
e = Os(e, t = po(0, t = lo(n, t), 1), 1),
t = ec(),
null !== e && (vt(e, 1, t),
rc(e, t))
}
function Ac(e, t, n) {
if (3 === e.tag)
Sc(e, e, n);
else
for (; null !== t; ) {
if (3 === t.tag) {
Sc(t, e, n);
break
}
if (1 === t.tag) {
var r = t.stateNode;
if ("function" === typeof t.type.getDerivedStateFromError || "function" === typeof r.componentDidCatch && (null === Jl || !Jl.has(r))) {
t = Os(t, e = fo(t, e = lo(n, e), 1), 1),
e = ec(),
null !== t && (vt(t, 1, e),
rc(t, e));
break
}
}
t = t.return
}
}
function Mc(e, t, n) {
var r = e.pingCache;
null !== r && r.delete(t),
t = ec(),
e.pingedLanes |= e.suspendedLanes & n,
Rl === e && (Pl & n) === n && (4 === Il || 3 === Il && (130023424 & Pl) === Pl && 500 > Qe() - zl ? hc(e, 0) : Fl |= n),
rc(e, t)
}
function Cc(e, t) {
0 === t && (0 === (1 & e.mode) ? t = 1 : (t = ut,
0 === (130023424 & (ut <<= 1)) && (ut = 4194304)));
var n = ec();
null !== (e = Is(e, t)) && (vt(e, t, n),
rc(e, n))
}
function Ec(e) {
var t = e.memoizedState
, n = 0;
null !== t && (n = t.retryLane),
Cc(e, n)
}
function Tc(e, t) {
var n = 0;
switch (e.tag) {
case 13:
var r = e.stateNode
, i = e.memoizedState;
null !== i && (n = i.retryLane);
break;
case 19:
r = e.stateNode;
break;
default:
throw Error(s(314))
}
null !== r && r.delete(t),
Cc(e, n)
}
function Rc(e, t) {
return Xe(e, t)
}
function Bc(e, t, n, r) {
this.tag = e,
this.key = n,
this.sibling = this.child = this.return = this.stateNode = this.type = this.elementType = null,
this.index = 0,
this.ref = null,
this.pendingProps = t,
this.dependencies = this.memoizedState = this.updateQueue = this.memoizedProps = null,
this.mode = r,
this.subtreeFlags = this.flags = 0,
this.deletions = null,
this.childLanes = this.lanes = 0,
this.alternate = null
}
function Pc(e, t, n, r) {
return new Bc(e,t,n,r)
}
function kc(e) {
return !(!(e = e.prototype) || !e.isReactComponent)
}
function Lc(e, t) {
var n = e.alternate;
return null === n ? ((n = Pc(e.tag, t, e.key, e.mode)).elementType = e.elementType,
n.type = e.type,
n.stateNode = e.stateNode,
n.alternate = e,
e.alternate = n) : (n.pendingProps = t,
n.type = e.type,
n.flags = 0,
n.subtreeFlags = 0,
n.deletions = null),
n.flags = 14680064 & e.flags,
n.childLanes = e.childLanes,
n.lanes = e.lanes,
n.child = e.child,
n.memoizedProps = e.memoizedProps,
n.memoizedState = e.memoizedState,
n.updateQueue = e.updateQueue,
t = e.dependencies,
n.dependencies = null === t ? null : {
lanes: t.lanes,
firstContext: t.firstContext
},
n.sibling = e.sibling,
n.index = e.index,
n.ref = e.ref,
n
}
function Ic(e, t, n, r, i, a) {
var o = 2;
if (r = e,
"function" === typeof e)
kc(e) && (o = 1);
else if ("string" === typeof e)
o = 5;
else
e: switch (e) {
case S:
return Nc(n.children, i, a, t);
case A:
o = 8,
i |= 8;
break;
case M:
return (e = Pc(12, n, t, 2 | i)).elementType = M,
e.lanes = a,
e;
case R:
return (e = Pc(13, n, t, i)).elementType = R,
e.lanes = a,
e;
case B:
return (e = Pc(19, n, t, i)).elementType = B,
e.lanes = a,
e;
case L:
return Dc(n, i, a, t);
default:
if ("object" === typeof e && null !== e)
switch (e.$$typeof) {
case C:
o = 10;
break e;
case E:
o = 9;
break e;
case T:
o = 11;
break e;
case P:
o = 14;
break e;
case k:
o = 16,
r = null;
break e
}
throw Error(s(130, null == e ? e : typeof e, ""))
}
return (t = Pc(o, n, t, i)).elementType = e,
t.type = r,
t.lanes = a,
t
}
function Nc(e, t, n, r) {
return (e = Pc(7, e, r, t)).lanes = n,
e
}
function Dc(e, t, n, r) {
return (e = Pc(22, e, r, t)).elementType = L,
e.lanes = n,
e.stateNode = {
isHidden: !1
},
e
}
function jc(e, t, n) {
return (e = Pc(6, e, null, t)).lanes = n,
e
}
function Fc(e, t, n) {
return (t = Pc(4, null !== e.children ? e.children : [], e.key, t)).lanes = n,
t.stateNode = {
containerInfo: e.containerInfo,
pendingChildren: null,
implementation: e.implementation
},
t
}
function Oc(e, t, n, r, i) {
this.tag = t,
this.containerInfo = e,
this.finishedWork = this.pingCache = this.current = this.pendingChildren = null,
this.timeoutHandle = -1,
this.callbackNode = this.pendingContext = this.context = null,
this.callbackPriority = 0,
this.eventTimes = gt(0),
this.expirationTimes = gt(-1),
this.entangledLanes = this.finishedLanes = this.mutableReadLanes = this.expiredLanes = this.pingedLanes = this.suspendedLanes = this.pendingLanes = 0,
this.entanglements = gt(0),
this.identifierPrefix = r,
this.onRecoverableError = i,
this.mutableSourceEagerHydrationData = null
}
function Uc(e, t, n, r, i, s, a, o, l) {
return e = new Oc(e,t,n,o,l),
1 === t ? (t = 1,
!0 === s && (t |= 8)) : t = 0,
s = Pc(3, null, null, t),
e.current = s,
s.stateNode = e,
s.memoizedState = {
element: r,
isDehydrated: n,
cache: null,
transitions: null,
pendingSuspenseBoundaries: null
},
Ds(s),
e
}
function zc(e) {
if (!e)
return Ei;
e: {
if (Ge(e = e._reactInternals) !== e || 1 !== e.tag)
throw Error(s(170));
var t = e;
do {
switch (t.tag) {
case 3:
t = t.stateNode.context;
break e;
case 1:
if (ki(t.type)) {
t = t.stateNode.__reactInternalMemoizedMergedChildContext;
break e
}
}
t = t.return
} while (null !== t);
throw Error(s(171))
}
if (1 === e.tag) {
var n = e.type;
if (ki(n))
return Ni(e, n, t)
}
return t
}
function Gc(e, t, n, r, i, s, a, o, l) {
return (e = Uc(n, r, !0, e, 0, s, 0, o, l)).context = zc(null),
n = e.current,
(s = Fs(r = ec(), i = tc(n))).callback = void 0 !== t && null !== t ? t : null,
Os(n, s, i),
e.current.lanes = i,
vt(e, i, r),
rc(e, r),
e
}
function Hc(e, t, n, r) {
var i = t.current
, s = ec()
, a = tc(i);
return n = zc(n),
null === t.context ? t.context = n : t.pendingContext = n,
(t = Fs(s, a)).payload = {
element: e
},
null !== (r = void 0 === r ? null : r) && (t.callback = r),
null !== (e = Os(i, t, a)) && (nc(e, i, a, s),
Us(e, i, a)),
a
}
function Vc(e) {
return (e = e.current).child ? (e.child.tag,
e.child.stateNode) : null
}
function Wc(e, t) {
if (null !== (e = e.memoizedState) && null !== e.dehydrated) {
var n = e.retryLane;
e.retryLane = 0 !== n && n < t ? n : t
}
}
function Jc(e, t) {
Wc(e, t),
(e = e.alternate) && Wc(e, t)
}
Sl = function(e, t, n) {
if (null !== e)
if (e.memoizedProps !== t.pendingProps || Ri.current)
xo = !0;
else {
if (0 === (e.lanes & n) && 0 === (128 & t.flags))
return xo = !1,
function(e, t, n) {
switch (t.tag) {
case 3:
Ro(t),
ps();
break;
case 5:
Qs(t);
break;
case 1:
ki(t.type) && Di(t);
break;
case 4:
qs(t, t.stateNode.containerInfo);
break;
case 10:
var r = t.type._context
, i = t.memoizedProps.value;
Ci(ws, r._currentValue),
r._currentValue = i;
break;
case 13:
if (null !== (r = t.memoizedState))
return null !== r.dehydrated ? (Ci($s, 1 & $s.current),
t.flags |= 128,
null) : 0 !== (n & t.child.childLanes) ? jo(e, t, n) : (Ci($s, 1 & $s.current),
null !== (e = Vo(e, t, n)) ? e.sibling : null);
Ci($s, 1 & $s.current);
break;
case 19:
if (r = 0 !== (n & t.childLanes),
0 !== (128 & e.flags)) {
if (r)
return Go(e, t, n);
t.flags |= 128
}
if (null !== (i = t.memoizedState) && (i.rendering = null,
i.tail = null,
i.lastEffect = null),
Ci($s, $s.current),
r)
break;
return null;
case 22:
case 23:
return t.lanes = 0,
Ao(e, t, n)
}
return Vo(e, t, n)
}(e, t, n);
xo = 0 !== (131072 & e.flags)
}
else
xo = !1,
is && 0 !== (1048576 & t.flags) && $i(t, Ji, t.index);
switch (t.lanes = 0,
t.tag) {
case 2:
var r = t.type;
Ho(e, t),
e = t.pendingProps;
var i = Pi(t, Ti.current);
Rs(t, n),
i = ma(null, t, r, e, i, n);
var a = ga();
return t.flags |= 1,
"object" === typeof i && null !== i && "function" === typeof i.render && void 0 === i.$$typeof ? (t.tag = 1,
t.memoizedState = null,
t.updateQueue = null,
ki(r) ? (a = !0,
Di(t)) : a = !1,
t.memoizedState = null !== i.state && void 0 !== i.state ? i.state : null,
Ds(t),
i.updater = ro,
t.stateNode = i,
i._reactInternals = t,
oo(t, r, e, n),
t = To(null, t, r, !0, a, n)) : (t.tag = 0,
is && a && es(t),
bo(null, t, i, n),
t = t.child),
t;
case 16:
r = t.elementType;
e: {
switch (Ho(e, t),
e = t.pendingProps,
r = (i = r._init)(r._payload),
t.type = r,
i = t.tag = function(e) {
if ("function" === typeof e)
return kc(e) ? 1 : 0;
if (void 0 !== e && null !== e) {
if ((e = e.$$typeof) === T)
return 11;
if (e === P)
return 14
}
return 2
}(r),
e = to(r, e),
i) {
case 0:
t = Co(null, t, r, e, n);
break e;
case 1:
t = Eo(null, t, r, e, n);
break e;
case 11:
t = _o(null, t, r, e, n);
break e;
case 14:
t = wo(null, t, r, to(r.type, e), n);
break e
}
throw Error(s(306, r, ""))
}
return t;
case 0:
return r = t.type,
i = t.pendingProps,
Co(e, t, r, i = t.elementType === r ? i : to(r, i), n);
case 1:
return r = t.type,
i = t.pendingProps,
Eo(e, t, r, i = t.elementType === r ? i : to(r, i), n);
case 3:
e: {
if (Ro(t),
null === e)
throw Error(s(387));
r = t.pendingProps,
i = (a = t.memoizedState).element,
js(e, t),
Gs(t, r, null, n);
var o = t.memoizedState;
if (r = o.element,
a.isDehydrated) {
if (a = {
element: r,
isDehydrated: !1,
cache: o.cache,
pendingSuspenseBoundaries: o.pendingSuspenseBoundaries,
transitions: o.transitions
},
t.updateQueue.baseState = a,
t.memoizedState = a,
256 & t.flags) {
t = Bo(e, t, r, n, i = lo(Error(s(423)), t));
break e
}
if (r !== i) {
t = Bo(e, t, r, n, i = lo(Error(s(424)), t));
break e
}
for (rs = ci(t.stateNode.containerInfo.firstChild),
ns = t,
is = !0,
ss = null,
n = _s(t, null, r, n),
t.child = n; n; )
n.flags = -3 & n.flags | 4096,
n = n.sibling
} else {
if (ps(),
r === i) {
t = Vo(e, t, n);
break e
}
bo(e, t, r, n)
}
t = t.child
}
return t;
case 5:
return Qs(t),
null === e && cs(t),
r = t.type,
i = t.pendingProps,
a = null !== e ? e.memoizedProps : null,
o = i.children,
ni(r, i) ? o = null : null !== a && ni(r, a) && (t.flags |= 32),
Mo(e, t),
bo(e, t, o, n),
t.child;
case 6:
return null === e && cs(t),
null;
case 13:
return jo(e, t, n);
case 4:
return qs(t, t.stateNode.containerInfo),
r = t.pendingProps,
null === e ? t.child = bs(t, null, r, n) : bo(e, t, r, n),
t.child;
case 11:
return r = t.type,
i = t.pendingProps,
_o(e, t, r, i = t.elementType === r ? i : to(r, i), n);
case 7:
return bo(e, t, t.pendingProps, n),
t.child;
case 8:
case 12:
return bo(e, t, t.pendingProps.children, n),
t.child;
case 10:
e: {
if (r = t.type._context,
i = t.pendingProps,
a = t.memoizedProps,
o = i.value,
Ci(ws, r._currentValue),
r._currentValue = o,
null !== a)
if (or(a.value, o)) {
if (a.children === i.children && !Ri.current) {
t = Vo(e, t, n);
break e
}
} else
for (null !== (a = t.child) && (a.return = t); null !== a; ) {
var l = a.dependencies;
if (null !== l) {
o = a.child;
for (var c = l.firstContext; null !== c; ) {
if (c.context === r) {
if (1 === a.tag) {
(c = Fs(-1, n & -n)).tag = 2;
var u = a.updateQueue;
if (null !== u) {
var d = (u = u.shared).pending;
null === d ? c.next = c : (c.next = d.next,
d.next = c),
u.pending = c
}
}
a.lanes |= n,
null !== (c = a.alternate) && (c.lanes |= n),
Ts(a.return, n, t),
l.lanes |= n;
break
}
c = c.next
}
} else if (10 === a.tag)
o = a.type === t.type ? null : a.child;
else if (18 === a.tag) {
if (null === (o = a.return))
throw Error(s(341));
o.lanes |= n,
null !== (l = o.alternate) && (l.lanes |= n),
Ts(o, n, t),
o = a.sibling
} else
o = a.child;
if (null !== o)
o.return = a;
else
for (o = a; null !== o; ) {
if (o === t) {
o = null;
break
}
if (null !== (a = o.sibling)) {
a.return = o.return,
o = a;
break
}
o = o.return
}
a = o
}
bo(e, t, i.children, n),
t = t.child
}
return t;
case 9:
return i = t.type,
r = t.pendingProps.children,
Rs(t, n),
r = r(i = Bs(i)),
t.flags |= 1,
bo(e, t, r, n),
t.child;
case 14:
return i = to(r = t.type, t.pendingProps),
wo(e, t, r, i = to(r.type, i), n);
case 15:
return So(e, t, t.type, t.pendingProps, n);
case 17:
return r = t.type,
i = t.pendingProps,
i = t.elementType === r ? i : to(r, i),
Ho(e, t),
t.tag = 1,
ki(r) ? (e = !0,
Di(t)) : e = !1,
Rs(t, n),
so(t, r, i),
oo(t, r, i, n),
To(null, t, r, !0, e, n);
case 19:
return Go(e, t, n);
case 22:
return Ao(e, t, n)
}
throw Error(s(156, t.tag))
}
;
var Xc = "function" === typeof reportError ? reportError : function(e) {
console.error(e)
}
;
function Kc(e) {
this._internalRoot = e
}
function qc(e) {
this._internalRoot = e
}
function Yc(e) {
return !(!e || 1 !== e.nodeType && 9 !== e.nodeType && 11 !== e.nodeType)
}
function Qc(e) {
return !(!e || 1 !== e.nodeType && 9 !== e.nodeType && 11 !== e.nodeType && (8 !== e.nodeType || " react-mount-point-unstable " !== e.nodeValue))
}
function Zc() {}
function $c(e, t, n, r, i) {
var s = n._reactRootContainer;
if (s) {
var a = s;
if ("function" === typeof i) {
var o = i;
i = function() {
var e = Vc(a);
o.call(e)
}
}
Hc(t, a, e, i)
} else
a = function(e, t, n, r, i) {
if (i) {
if ("function" === typeof r) {
var s = r;
r = function() {
var e = Vc(a);
s.call(e)
}
}
var a = Gc(t, r, e, 0, null, !1, 0, "", Zc);
return e._reactRootContainer = a,
e[fi] = a.current,
Gr(8 === e.nodeType ? e.parentNode : e),
uc(),
a
}
for (; i = e.lastChild; )
e.removeChild(i);
if ("function" === typeof r) {
var o = r;
r = function() {
var e = Vc(l);
o.call(e)
}
}
var l = Uc(e, 0, !1, null, 0, !1, 0, "", Zc);
return e._reactRootContainer = l,
e[fi] = l.current,
Gr(8 === e.nodeType ? e.parentNode : e),
uc((function() {
Hc(t, l, n, r)
}
)),
l
}(n, t, e, i, r);
return Vc(a)
}
qc.prototype.render = Kc.prototype.render = function(e) {
var t = this._internalRoot;
if (null === t)
throw Error(s(409));
Hc(e, t, null, null)
}
,
qc.prototype.unmount = Kc.prototype.unmount = function() {
var e = this._internalRoot;
if (null !== e) {
this._internalRoot = null;
var t = e.containerInfo;
uc((function() {
Hc(null, e, null, null)
}
)),
t[fi] = null
}
}
,
qc.prototype.unstable_scheduleHydration = function(e) {
if (e) {
var t = At();
e = {
blockedOn: null,
target: e,
priority: t
};
for (var n = 0; n < Lt.length && 0 !== t && t < Lt[n].priority; n++)
;
Lt.splice(n, 0, e),
0 === n && jt(e)
}
}
,
_t = function(e) {
switch (e.tag) {
case 3:
var t = e.stateNode;
if (t.current.memoizedState.isDehydrated) {
var n = dt(t.pendingLanes);
0 !== n && (yt(t, 1 | n),
rc(t, Qe()),
0 === (6 & Tl) && (Gl = Qe() + 500,
Gi()))
}
break;
case 13:
uc((function() {
var t = Is(e, 1);
if (null !== t) {
var n = ec();
nc(t, e, 1, n)
}
}
)),
Jc(e, 1)
}
}
,
wt = function(e) {
if (13 === e.tag) {
var t = Is(e, 134217728);
if (null !== t)
nc(t, e, 134217728, ec());
Jc(e, 134217728)
}
}
,
St = function(e) {
if (13 === e.tag) {
var t = tc(e)
, n = Is(e, t);
if (null !== n)
nc(n, e, t, ec());
Jc(e, t)
}
}
,
At = function() {
return xt
}
,
Mt = function(e, t) {
var n = xt;
try {
return xt = e,
t()
} finally {
xt = n
}
}
,
we = function(e, t, n) {
switch (t) {
case "input":
if (Z(e, n),
t = n.name,
"radio" === n.type && null != t) {
for (n = e; n.parentNode; )
n = n.parentNode;
for (n = n.querySelectorAll("input[name=" + JSON.stringify("" + t) + '][type="radio"]'),
t = 0; t < n.length; t++) {
var r = n[t];
if (r !== e && r.form === e.form) {
var i = _i(r);
if (!i)
throw Error(s(90));
X(r),
Z(r, i)
}
}
}
break;
case "textarea":
se(e, n);
break;
case "select":
null != (t = n.value) && ne(e, !!n.multiple, t, !1)
}
}
,
Te = cc,
Re = uc;
var eu = {
usingClientEntryPoint: !1,
Events: [xi, bi, _i, Ce, Ee, cc]
}
, tu = {
findFiberByHostInstance: yi,
bundleType: 0,
version: "18.3.1",
rendererPackageName: "react-dom"
}
, nu = {
bundleType: tu.bundleType,
version: tu.version,
rendererPackageName: tu.rendererPackageName,
rendererConfig: tu.rendererConfig,
overrideHookState: null,
overrideHookStateDeletePath: null,
overrideHookStateRenamePath: null,
overrideProps: null,
overridePropsDeletePath: null,
overridePropsRenamePath: null,
setErrorHandler: null,
setSuspenseHandler: null,
scheduleUpdate: null,
currentDispatcherRef: b.ReactCurrentDispatcher,
findHostInstanceByFiber: function(e) {
return null === (e = We(e)) ? null : e.stateNode
},
findFiberByHostInstance: tu.findFiberByHostInstance || function() {
return null
}
,
findHostInstancesForRefresh: null,
scheduleRefresh: null,
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.1-next-f1338f8080-20240426"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var ru = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (!ru.isDisabled && ru.supportsFiber)
try {
it = ru.inject(nu),
st = ru
} catch (ue) {}
}
t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = eu,
t.createPortal = function(e, t) {
var n = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;
if (!Yc(t))
throw Error(s(200));
return function(e, t, n) {
var r = 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;
return {
$$typeof: w,
key: null == r ? null : "" + r,
children: e,
containerInfo: t,
implementation: n
}
}(e, t, null, n)
}
,
t.createRoot = function(e, t) {
if (!Yc(e))
throw Error(s(299));
var n = !1
, r = ""
, i = Xc;
return null !== t && void 0 !== t && (!0 === t.unstable_strictMode && (n = !0),
void 0 !== t.identifierPrefix && (r = t.identifierPrefix),
void 0 !== t.onRecoverableError && (i = t.onRecoverableError)),
t = Uc(e, 1, !1, null, 0, n, 0, r, i),
e[fi] = t.current,
Gr(8 === e.nodeType ? e.parentNode : e),
new Kc(t)
}
,
t.findDOMNode = function(e) {
if (null == e)
return null;
if (1 === e.nodeType)
return e;
var t = e._reactInternals;
if (void 0 === t) {
if ("function" === typeof e.render)
throw Error(s(188));
throw e = Object.keys(e).join(","),
Error(s(268, e))
}
return e = null === (e = We(t)) ? null : e.stateNode
}
,
t.flushSync = function(e) {
return uc(e)
}
,
t.hydrate = function(e, t, n) {
if (!Qc(t))
throw Error(s(200));
return $c(null, e, t, !0, n)
}
,
t.hydrateRoot = function(e, t, n) {
if (!Yc(e))
throw Error(s(405));
var r = null != n && n.hydratedSources || null
, i = !1
, a = ""
, o = Xc;
if (null !== n && void 0 !== n && (!0 === n.unstable_strictMode && (i = !0),
void 0 !== n.identifierPrefix && (a = n.identifierPrefix),
void 0 !== n.onRecoverableError && (o = n.onRecoverableError)),
t = Gc(t, null, e, 1, null != n ? n : null, i, 0, a, o),
e[fi] = t.current,
Gr(e),
r)
for (e = 0; e < r.length; e++)
i = (i = (n = r[e])._getVersion)(n._source),
null == t.mutableSourceEagerHydrationData ? t.mutableSourceEagerHydrationData = [n, i] : t.mutableSourceEagerHydrationData.push(n, i);
return new qc(t)
}
,
t.render = function(e, t, n) {
if (!Qc(t))
throw Error(s(200));
return $c(null, e, t, !1, n)
}
,
t.unmountComponentAtNode = function(e) {
if (!Qc(e))
throw Error(s(40));
return !!e._reactRootContainer && (uc((function() {
$c(null, null, e, !1, (function() {
e._reactRootContainer = null,
e[fi] = null
}
))
}
)),
!0)
}
,
t.unstable_batchedUpdates = cc,
t.unstable_renderSubtreeIntoContainer = function(e, t, n, r) {
if (!Qc(n))
throw Error(s(200));
if (null == e || void 0 === e._reactInternals)
throw Error(s(38));
return $c(e, t, n, !1, r)
}
,
t.version = "18.3.1-next-f1338f8080-20240426"
}
,
391: (e, t, n) => {
"use strict";
var r = n(950);
t.createRoot = r.createRoot,
t.hydrateRoot = r.hydrateRoot
}
,
950: (e, t, n) => {
"use strict";
!function e() {
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)
try {
__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)
} catch (t) {
console.error(t)
}
}(),
e.exports = n(730)
}
,
612: (e, t) => {
"use strict";
function n(e, t) {
var n = e.length;
e.push(t);
e: for (; 0 < n; ) {
var r = n - 1 >>> 1
, i = e[r];
if (!(0 < s(i, t)))
break e;
e[r] = t,
e[n] = i,
n = r
}
}
function r(e) {
return 0 === e.length ? null : e[0]
}
function i(e) {
if (0 === e.length)
return null;
var t = e[0]
, n = e.pop();
if (n !== t) {
e[0] = n;
e: for (var r = 0, i = e.length, a = i >>> 1; r < a; ) {
var o = 2 * (r + 1) - 1
, l = e[o]
, c = o + 1
, u = e[c];
if (0 > s(l, n))
c < i && 0 > s(u, l) ? (e[r] = u,
e[c] = n,
r = c) : (e[r] = l,
e[o] = n,
r = o);
else {
if (!(c < i && 0 > s(u, n)))
break e;
e[r] = u,
e[c] = n,
r = c
}
}
}
return t
}
function s(e, t) {
var n = e.sortIndex - t.sortIndex;
return 0 !== n ? n : e.id - t.id
}
if ("object" === typeof performance && "function" === typeof performance.now) {
var a = performance;
t.unstable_now = function() {
return a.now()
}
} else {
var o = Date
, l = o.now();
t.unstable_now = function() {
return o.now() - l
}
}
var c = []
, u = []
, d = 1
, h = null
, p = 3
, f = !1
, m = !1
, g = !1
, v = "function" === typeof setTimeout ? setTimeout : null
, y = "function" === typeof clearTimeout ? clearTimeout : null
, x = "undefined" !== typeof setImmediate ? setImmediate : null;
function b(e) {
for (var t = r(u); null !== t; ) {
if (null === t.callback)
i(u);
else {
if (!(t.startTime <= e))
break;
i(u),
t.sortIndex = t.expirationTime,
n(c, t)
}
t = r(u)
}
}
function _(e) {
if (g = !1,
b(e),
!m)
if (null !== r(c))
m = !0,
L(w);
else {
var t = r(u);
null !== t && I(_, t.startTime - e)
}
}
function w(e, n) {
m = !1,
g && (g = !1,
y(C),
C = -1),
f = !0;
var s = p;
try {
for (b(n),
h = r(c); null !== h && (!(h.expirationTime > n) || e && !R()); ) {
var a = h.callback;
if ("function" === typeof a) {
h.callback = null,
p = h.priorityLevel;
var o = a(h.expirationTime <= n);
n = t.unstable_now(),
"function" === typeof o ? h.callback = o : h === r(c) && i(c),
b(n)
} else
i(c);
h = r(c)
}
if (null !== h)
var l = !0;
else {
var d = r(u);
null !== d && I(_, d.startTime - n),
l = !1
}
return l
} finally {
h = null,
p = s,
f = !1
}
}
"undefined" !== typeof navigator && void 0 !== navigator.scheduling && void 0 !== navigator.scheduling.isInputPending && navigator.scheduling.isInputPending.bind(navigator.scheduling);
var S, A = !1, M = null, C = -1, E = 5, T = -1;
function R() {
return !(t.unstable_now() - T < E)
}
function B() {
if (null !== M) {
var e = t.unstable_now();
T = e;
var n = !0;
try {
n = M(!0, e)
} finally {
n ? S() : (A = !1,
M = null)
}
} else
A = !1
}
if ("function" === typeof x)
S = function() {
x(B)
}
;
else if ("undefined" !== typeof MessageChannel) {
var P = new MessageChannel
, k = P.port2;
P.port1.onmessage = B,
S = function() {
k.postMessage(null)
}
} else
S = function() {
v(B, 0)
}
;
function L(e) {
M = e,
A || (A = !0,
S())
}
function I(e, n) {
C = v((function() {
e(t.unstable_now())
}
), n)
}
t.unstable_IdlePriority = 5,
t.unstable_ImmediatePriority = 1,
t.unstable_LowPriority = 4,
t.unstable_NormalPriority = 3,
t.unstable_Profiling = null,
t.unstable_UserBlockingPriority = 2,
t.unstable_cancelCallback = function(e) {
e.callback = null
}
,
t.unstable_continueExecution = function() {
m || f || (m = !0,
L(w))
}
,
t.unstable_forceFrameRate = function(e) {
0 > e || 125 < e ? console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported") : E = 0 < e ? Math.floor(1e3 / e) : 5
}
,
t.unstable_getCurrentPriorityLevel = function() {
return p
}
,
t.unstable_getFirstCallbackNode = function() {
return r(c)
}
,
t.unstable_next = function(e) {
switch (p) {
case 1:
case 2:
case 3:
var t = 3;
break;
default:
t = p
}
var n = p;
p = t;
try {
return e()
} finally {
p = n
}
}
,
t.unstable_pauseExecution = function() {}
,
t.unstable_requestPaint = function() {}
,
t.unstable_runWithPriority = function(e, t) {
switch (e) {
case 1:
case 2:
case 3:
case 4:
case 5:
break;
default:
e = 3
}
var n = p;
p = e;
try {
return t()
} finally {
p = n
}
}
,
t.unstable_scheduleCallback = function(e, i, s) {
var a = t.unstable_now();
switch ("object" === typeof s && null !== s ? s = "number" === typeof (s = s.delay) && 0 < s ? a + s : a : s = a,
e) {
case 1:
var o = -1;
break;
case 2:
o = 250;
break;
case 5:
o = 1073741823;
break;
case 4:
o = 1e4;
break;
default:
o = 5e3
}
return e = {
id: d++,
callback: i,
priorityLevel: e,
startTime: s,
expirationTime: o = s + o,
sortIndex: -1
},
s > a ? (e.sortIndex = s,
n(u, e),
null === r(c) && e === r(u) && (g ? (y(C),
C = -1) : g = !0,
I(_, s - a))) : (e.sortIndex = o,
n(c, e),
m || f || (m = !0,
L(w))),
e
}
,
t.unstable_shouldYield = R,
t.unstable_wrapCallback = function(e) {
var t = p;
return function() {
var n = p;
p = t;
try {
return e.apply(this, arguments)
} finally {
p = n
}
}
}
}
,
67: (e, t, n) => {
"use strict";
e.exports = n(612)
}
,
302: (e, t) => {
"use strict";
t.ConcurrentRoot = 1,
t.ContinuousEventPriority = 4,
t.DefaultEventPriority = 16,
t.DiscreteEventPriority = 1
}
,
958: (e, t, n) => {
e.exports = function(e) {
var t = {}
, r = n(43)
, i = n(853)
, s = Object.assign;
function a(e) {
for (var t = "https://reactjs.org/docs/error-decoder.html?invariant=" + e, n = 1; n < arguments.length; n++)
t += "&args[]=" + encodeURIComponent(arguments[n]);
return "Minified React error #" + e + "; visit " + t + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings."
}
var o = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
, l = Symbol.for("react.element")
, c = Symbol.for("react.portal")
, u = Symbol.for("react.fragment")
, d = Symbol.for("react.strict_mode")
, h = Symbol.for("react.profiler")
, p = Symbol.for("react.provider")
, f = Symbol.for("react.context")
, m = Symbol.for("react.forward_ref")
, g = Symbol.for("react.suspense")
, v = Symbol.for("react.suspense_list")
, y = Symbol.for("react.memo")
, x = Symbol.for("react.lazy");
Symbol.for("react.scope"),
Symbol.for("react.debug_trace_mode");
var b = Symbol.for("react.offscreen");
Symbol.for("react.legacy_hidden"),
Symbol.for("react.cache"),
Symbol.for("react.tracing_marker");
var _ = Symbol.iterator;
function w(e) {
return null === e || "object" !== typeof e ? null : "function" === typeof (e = _ && e[_] || e["@@iterator"]) ? e : null
}
function S(e) {
if (null == e)
return null;
if ("function" === typeof e)
return e.displayName || e.name || null;
if ("string" === typeof e)
return e;
switch (e) {
case u:
return "Fragment";
case c:
return "Portal";
case h:
return "Profiler";
case d:
return "StrictMode";
case g:
return "Suspense";
case v:
return "SuspenseList"
}
if ("object" === typeof e)
switch (e.$$typeof) {
case f:
return (e.displayName || "Context") + ".Consumer";
case p:
return (e._context.displayName || "Context") + ".Provider";
case m:
var t = e.render;
return (e = e.displayName) || (e = "" !== (e = t.displayName || t.name || "") ? "ForwardRef(" + e + ")" : "ForwardRef"),
e;
case y:
return null !== (t = e.displayName || null) ? t : S(e.type) || "Memo";
case x:
t = e._payload,
e = e._init;
try {
return S(e(t))
} catch (n) {}
}
return null
}
function A(e) {
var t = e.type;
switch (e.tag) {
case 24:
return "Cache";
case 9:
return (t.displayName || "Context") + ".Consumer";
case 10:
return (t._context.displayName || "Context") + ".Provider";
case 18:
return "DehydratedFragment";
case 11:
return e = (e = t.render).displayName || e.name || "",
t.displayName || ("" !== e ? "ForwardRef(" + e + ")" : "ForwardRef");
case 7:
return "Fragment";
case 5:
return t;
case 4:
return "Portal";
case 3:
return "Root";
case 6:
return "Text";
case 16:
return S(t);
case 8:
return t === d ? "StrictMode" : "Mode";
case 22:
return "Offscreen";
case 12:
return "Profiler";
case 21:
return "Scope";
case 13:
return "Suspense";
case 19:
return "SuspenseList";
case 25:
return "TracingMarker";
case 1:
case 0:
case 17:
case 2:
case 14:
case 15:
if ("function" === typeof t)
return t.displayName || t.name || null;
if ("string" === typeof t)
return t
}
return null
}
function M(e) {
var t = e
, n = e;
if (e.alternate)
for (; t.return; )
t = t.return;
else {
e = t;
do {
0 !== (4098 & (t = e).flags) && (n = t.return),
e = t.return
} while (e)
}
return 3 === t.tag ? n : null
}
function C(e) {
if (M(e) !== e)
throw Error(a(188))
}
function E(e) {
var t = e.alternate;
if (!t) {
if (null === (t = M(e)))
throw Error(a(188));
return t !== e ? null : e
}
for (var n = e, r = t; ; ) {
var i = n.return;
if (null === i)
break;
var s = i.alternate;
if (null === s) {
if (null !== (r = i.return)) {
n = r;
continue
}
break
}
if (i.child === s.child) {
for (s = i.child; s; ) {
if (s === n)
return C(i),
e;
if (s === r)
return C(i),
t;
s = s.sibling
}
throw Error(a(188))
}
if (n.return !== r.return)
n = i,
r = s;
else {
for (var o = !1, l = i.child; l; ) {
if (l === n) {
o = !0,
n = i,
r = s;
break
}
if (l === r) {
o = !0,
r = i,
n = s;
break
}
l = l.sibling
}
if (!o) {
for (l = s.child; l; ) {
if (l === n) {
o = !0,
n = s,
r = i;
break
}
if (l === r) {
o = !0,
r = s,
n = i;
break
}
l = l.sibling
}
if (!o)
throw Error(a(189))
}
}
if (n.alternate !== r)
throw Error(a(190))
}
if (3 !== n.tag)
throw Error(a(188));
return n.stateNode.current === n ? e : t
}
function T(e) {
return null !== (e = E(e)) ? R(e) : null
}
function R(e) {
if (5 === e.tag || 6 === e.tag)
return e;
for (e = e.child; null !== e; ) {
var t = R(e);
if (null !== t)
return t;
e = e.sibling
}
return null
}
function B(e) {
if (5 === e.tag || 6 === e.tag)
return e;
for (e = e.child; null !== e; ) {
if (4 !== e.tag) {
var t = B(e);
if (null !== t)
return t
}
e = e.sibling
}
return null
}
var P, k = Array.isArray, L = e.getPublicInstance, I = e.getRootHostContext, N = e.getChildHostContext, D = e.prepareForCommit, j = e.resetAfterCommit, F = e.createInstance, O = e.appendInitialChild, U = e.finalizeInitialChildren, z = e.prepareUpdate, G = e.shouldSetTextContent, H = e.createTextInstance, V = e.scheduleTimeout, W = e.cancelTimeout, J = e.noTimeout, X = e.isPrimaryRenderer, K = e.supportsMutation, q = e.supportsPersistence, Y = e.supportsHydration, Q = e.getInstanceFromNode, Z = e.preparePortalMount, $ = e.getCurrentEventPriority, ee = e.detachDeletedInstance, te = e.supportsMicrotasks, ne = e.scheduleMicrotask, re = e.supportsTestSelectors, ie = e.findFiberRoot, se = e.getBoundingRect, ae = e.getTextContent, oe = e.isHiddenSubtree, le = e.matchAccessibilityRole, ce = e.setFocusIfFocusable, ue = e.setupIntersectionObserver, de = e.appendChild, he = e.appendChildToContainer, pe = e.commitTextUpdate, fe = e.commitMount, me = e.commitUpdate, ge = e.insertBefore, ve = e.insertInContainerBefore, ye = e.removeChild, xe = e.removeChildFromContainer, be = e.resetTextContent, _e = e.hideInstance, we = e.hideTextInstance, Se = e.unhideInstance, Ae = e.unhideTextInstance, Me = e.clearContainer, Ce = e.cloneInstance, Ee = e.createContainerChildSet, Te = e.appendChildToContainerChildSet, Re = e.finalizeContainerChildren, Be = e.replaceContainerChildren, Pe = e.cloneHiddenInstance, ke = e.cloneHiddenTextInstance, Le = e.canHydrateInstance, Ie = e.canHydrateTextInstance, Ne = e.canHydrateSuspenseInstance, De = e.isSuspenseInstancePending, je = e.isSuspenseInstanceFallback, Fe = e.registerSuspenseInstanceRetry, Oe = e.getNextHydratableSibling, Ue = e.getFirstHydratableChild, ze = e.getFirstHydratableChildWithinContainer, Ge = e.getFirstHydratableChildWithinSuspenseInstance, He = e.hydrateInstance, Ve = e.hydrateTextInstance, We = e.hydrateSuspenseInstance, Je = e.getNextHydratableInstanceAfterSuspenseInstance, Xe = e.commitHydratedContainer, Ke = e.commitHydratedSuspenseInstance, qe = e.clearSuspenseBoundary, Ye = e.clearSuspenseBoundaryFromContainer, Qe = e.shouldDeleteUnhydratedTailInstances, Ze = e.didNotMatchHydratedContainerTextInstance, $e = e.didNotMatchHydratedTextInstance;
function et(e) {
if (void 0 === P)
try {
throw Error()
} catch (n) {
var t = n.stack.trim().match(/\n( *(at )?)/);
P = t && t[1] || ""
}
return "\n" + P + e
}
var tt = !1;
function nt(e, t) {
if (!e || tt)
return "";
tt = !0;
var n = Error.prepareStackTrace;
Error.prepareStackTrace = void 0;
try {
if (t)
if (t = function() {
throw Error()
}
,
Object.defineProperty(t.prototype, "props", {
set: function() {
throw Error()
}
}),
"object" === typeof Reflect && Reflect.construct) {
try {
Reflect.construct(t, [])
} catch (c) {
var r = c
}
Reflect.construct(e, [], t)
} else {
try {
t.call()
} catch (c) {
r = c
}
e.call(t.prototype)
}
else {
try {
throw Error()
} catch (c) {
r = c
}
e()
}
} catch (c) {
if (c && r && "string" === typeof c.stack) {
for (var i = c.stack.split("\n"), s = r.stack.split("\n"), a = i.length - 1, o = s.length - 1; 1 <= a && 0 <= o && i[a] !== s[o]; )
o--;
for (; 1 <= a && 0 <= o; a--,
o--)
if (i[a] !== s[o]) {
if (1 !== a || 1 !== o)
do {
if (a--,
0 > --o || i[a] !== s[o]) {
var l = "\n" + i[a].replace(" at new ", " at ");
return e.displayName && l.includes("<anonymous>") && (l = l.replace("<anonymous>", e.displayName)),
l
}
} while (1 <= a && 0 <= o);
break
}
}
} finally {
tt = !1,
Error.prepareStackTrace = n
}
return (e = e ? e.displayName || e.name : "") ? et(e) : ""
}
var rt = Object.prototype.hasOwnProperty
, it = []
, st = -1;
function at(e) {
return {
current: e
}
}
function ot(e) {
0 > st || (e.current = it[st],
it[st] = null,
st--)
}
function lt(e, t) {
st++,
it[st] = e.current,
e.current = t
}
var ct = {}
, ut = at(ct)
, dt = at(!1)
, ht = ct;
function pt(e, t) {
var n = e.type.contextTypes;
if (!n)
return ct;
var r = e.stateNode;
if (r && r.__reactInternalMemoizedUnmaskedChildContext === t)
return r.__reactInternalMemoizedMaskedChildContext;
var i, s = {};
for (i in n)
s[i] = t[i];
return r && ((e = e.stateNode).__reactInternalMemoizedUnmaskedChildContext = t,
e.__reactInternalMemoizedMaskedChildContext = s),
s
}
function ft(e) {
return null !== (e = e.childContextTypes) && void 0 !== e
}
function mt() {
ot(dt),
ot(ut)
}
function gt(e, t, n) {
if (ut.current !== ct)
throw Error(a(168));
lt(ut, t),
lt(dt, n)
}
function vt(e, t, n) {
var r = e.stateNode;
if (t = t.childContextTypes,
"function" !== typeof r.getChildContext)
return n;
for (var i in r = r.getChildContext())
if (!(i in t))
throw Error(a(108, A(e) || "Unknown", i));
return s({}, n, r)
}
function yt(e) {
return e = (e = e.stateNode) && e.__reactInternalMemoizedMergedChildContext || ct,
ht = ut.current,
lt(ut, e),
lt(dt, dt.current),
!0
}
function xt(e, t, n) {
var r = e.stateNode;
if (!r)
throw Error(a(169));
n ? (e = vt(e, t, ht),
r.__reactInternalMemoizedMergedChildContext = e,
ot(dt),
ot(ut),
lt(ut, e)) : ot(dt),
lt(dt, n)
}
var bt = Math.clz32 ? Math.clz32 : function(e) {
return 0 === (e >>>= 0) ? 32 : 31 - (_t(e) / wt | 0) | 0
}
, _t = Math.log
, wt = Math.LN2;
var St = 64
, At = 4194304;
function Mt(e) {
switch (e & -e) {
case 1:
return 1;
case 2:
return 2;
case 4:
return 4;
case 8:
return 8;
case 16:
return 16;
case 32:
return 32;
case 64:
case 128:
case 256:
case 512:
case 1024:
case 2048:
case 4096:
case 8192:
case 16384:
case 32768:
case 65536:
case 131072:
case 262144:
case 524288:
case 1048576:
case 2097152:
return 4194240 & e;
case 4194304:
case 8388608:
case 16777216:
case 33554432:
case 67108864:
return 130023424 & e;
case 134217728:
return 134217728;
case 268435456:
return 268435456;
case 536870912:
return 536870912;
case 1073741824:
return 1073741824;
default:
return e
}
}
function Ct(e, t) {
var n = e.pendingLanes;
if (0 === n)
return 0;
var r = 0
, i = e.suspendedLanes
, s = e.pingedLanes
, a = 268435455 & n;
if (0 !== a) {
var o = a & ~i;
0 !== o ? r = Mt(o) : 0 !== (s &= a) && (r = Mt(s))
} else
0 !== (a = n & ~i) ? r = Mt(a) : 0 !== s && (r = Mt(s));
if (0 === r)
return 0;
if (0 !== t && t !== r && 0 === (t & i) && ((i = r & -r) >= (s = t & -t) || 16 === i && 0 !== (4194240 & s)))
return t;
if (0 !== (4 & r) && (r |= 16 & n),
0 !== (t = e.entangledLanes))
for (e = e.entanglements,
t &= r; 0 < t; )
i = 1 << (n = 31 - bt(t)),
r |= e[n],
t &= ~i;
return r
}
function Et(e, t) {
switch (e) {
case 1:
case 2:
case 4:
return t + 250;
case 8:
case 16:
case 32:
case 64:
case 128:
case 256:
case 512:
case 1024:
case 2048:
case 4096:
case 8192:
case 16384:
case 32768:
case 65536:
case 131072:
case 262144:
case 524288:
case 1048576:
case 2097152:
return t + 5e3;
default:
return -1
}
}
function Tt(e) {
return 0 !== (e = -1073741825 & e.pendingLanes) ? e : 1073741824 & e ? 1073741824 : 0
}
function Rt(e) {
for (var t = [], n = 0; 31 > n; n++)
t.push(e);
return t
}
function Bt(e, t, n) {
e.pendingLanes |= t,
536870912 !== t && (e.suspendedLanes = 0,
e.pingedLanes = 0),
(e = e.eventTimes)[t = 31 - bt(t)] = n
}
function Pt(e, t) {
var n = e.entangledLanes |= t;
for (e = e.entanglements; n; ) {
var r = 31 - bt(n)
, i = 1 << r;
i & t | e[r] & t && (e[r] |= t),
n &= ~i
}
}
var kt = 0;
function Lt(e) {
return 1 < (e &= -e) ? 4 < e ? 0 !== (268435455 & e) ? 16 : 536870912 : 4 : 1
}
var It = i.unstable_scheduleCallback
, Nt = i.unstable_cancelCallback
, Dt = i.unstable_shouldYield
, jt = i.unstable_requestPaint
, Ft = i.unstable_now
, Ot = i.unstable_ImmediatePriority
, Ut = i.unstable_UserBlockingPriority
, zt = i.unstable_NormalPriority
, Gt = i.unstable_IdlePriority
, Ht = null
, Vt = null;
var Wt = "function" === typeof Object.is ? Object.is : function(e, t) {
return e === t && (0 !== e || 1 / e === 1 / t) || e !== e && t !== t
}
, Jt = null
, Xt = !1
, Kt = !1;
function qt(e) {
null === Jt ? Jt = [e] : Jt.push(e)
}
function Yt() {
if (!Kt && null !== Jt) {
Kt = !0;
var e = 0
, t = kt;
try {
var n = Jt;
for (kt = 1; e < n.length; e++) {
var r = n[e];
do {
r = r(!0)
} while (null !== r)
}
Jt = null,
Xt = !1
} catch (i) {
throw null !== Jt && (Jt = Jt.slice(e + 1)),
It(Ot, Yt),
i
} finally {
kt = t,
Kt = !1
}
}
return null
}
var Qt = o.ReactCurrentBatchConfig;
function Zt(e, t) {
if (Wt(e, t))
return !0;
if ("object" !== typeof e || null === e || "object" !== typeof t || null === t)
return !1;
var n = Object.keys(e)
, r = Object.keys(t);
if (n.length !== r.length)
return !1;
for (r = 0; r < n.length; r++) {
var i = n[r];
if (!rt.call(t, i) || !Wt(e[i], t[i]))
return !1
}
return !0
}
function $t(e) {
switch (e.tag) {
case 5:
return et(e.type);
case 16:
return et("Lazy");
case 13:
return et("Suspense");
case 19:
return et("SuspenseList");
case 0:
case 2:
case 15:
return e = nt(e.type, !1);
case 11:
return e = nt(e.type.render, !1);
case 1:
return e = nt(e.type, !0);
default:
return ""
}
}
function en(e, t) {
if (e && e.defaultProps) {
for (var n in t = s({}, t),
e = e.defaultProps)
void 0 === t[n] && (t[n] = e[n]);
return t
}
return t
}
var tn = at(null)
, nn = null
, rn = null
, sn = null;
function an() {
sn = rn = nn = null
}
function on(e, t, n) {
X ? (lt(tn, t._currentValue),
t._currentValue = n) : (lt(tn, t._currentValue2),
t._currentValue2 = n)
}
function ln(e) {
var t = tn.current;
ot(tn),
X ? e._currentValue = t : e._currentValue2 = t
}
function cn(e, t, n) {
for (; null !== e; ) {
var r = e.alternate;
if ((e.childLanes & t) !== t ? (e.childLanes |= t,
null !== r && (r.childLanes |= t)) : null !== r && (r.childLanes & t) !== t && (r.childLanes |= t),
e === n)
break;
e = e.return
}
}
function un(e, t) {
nn = e,
sn = rn = null,
null !== (e = e.dependencies) && null !== e.firstContext && (0 !== (e.lanes & t) && (Di = !0),
e.firstContext = null)
}
function dn(e) {
var t = X ? e._currentValue : e._currentValue2;
if (sn !== e)
if (e = {
context: e,
memoizedValue: t,
next: null
},
null === rn) {
if (null === nn)
throw Error(a(308));
rn = e,
nn.dependencies = {
lanes: 0,
firstContext: e
}
} else
rn = rn.next = e;
return t
}
var hn = null
, pn = !1;
function fn(e) {
e.updateQueue = {
baseState: e.memoizedState,
firstBaseUpdate: null,
lastBaseUpdate: null,
shared: {
pending: null,
interleaved: null,
lanes: 0
},
effects: null
}
}
function mn(e, t) {
e = e.updateQueue,
t.updateQueue === e && (t.updateQueue = {
baseState: e.baseState,
firstBaseUpdate: e.firstBaseUpdate,
lastBaseUpdate: e.lastBaseUpdate,
shared: e.shared,
effects: e.effects
})
}
function gn(e, t) {
return {
eventTime: e,
lane: t,
tag: 0,
payload: null,
callback: null,
next: null
}
}
function vn(e, t) {
var n = e.updateQueue;
null !== n && (n = n.shared,
null !== Ks && 0 !== (1 & e.mode) && 0 === (2 & Xs) ? (null === (e = n.interleaved) ? (t.next = t,
null === hn ? hn = [n] : hn.push(n)) : (t.next = e.next,
e.next = t),
n.interleaved = t) : (null === (e = n.pending) ? t.next = t : (t.next = e.next,
e.next = t),
n.pending = t))
}
function yn(e, t, n) {
if (null !== (t = t.updateQueue) && (t = t.shared,
0 !== (4194240 & n))) {
var r = t.lanes;
n |= r &= e.pendingLanes,
t.lanes = n,
Pt(e, n)
}
}
function xn(e, t) {
var n = e.updateQueue
, r = e.alternate;
if (null !== r && n === (r = r.updateQueue)) {
var i = null
, s = null;
if (null !== (n = n.firstBaseUpdate)) {
do {
var a = {
eventTime: n.eventTime,
lane: n.lane,
tag: n.tag,
payload: n.payload,
callback: n.callback,
next: null
};
null === s ? i = s = a : s = s.next = a,
n = n.next
} while (null !== n);
null === s ? i = s = t : s = s.next = t
} else
i = s = t;
return n = {
baseState: r.baseState,
firstBaseUpdate: i,
lastBaseUpdate: s,
shared: r.shared,
effects: r.effects
},
void (e.updateQueue = n)
}
null === (e = n.lastBaseUpdate) ? n.firstBaseUpdate = t : e.next = t,
n.lastBaseUpdate = t
}
function bn(e, t, n, r) {
var i = e.updateQueue;
pn = !1;
var a = i.firstBaseUpdate
, o = i.lastBaseUpdate
, l = i.shared.pending;
if (null !== l) {
i.shared.pending = null;
var c = l
, u = c.next;
c.next = null,
null === o ? a = u : o.next = u,
o = c;
var d = e.alternate;
null !== d && ((l = (d = d.updateQueue).lastBaseUpdate) !== o && (null === l ? d.firstBaseUpdate = u : l.next = u,
d.lastBaseUpdate = c))
}
if (null !== a) {
var h = i.baseState;
for (o = 0,
d = u = c = null,
l = a; ; ) {
var p = l.lane
, f = l.eventTime;
if ((r & p) === p) {
null !== d && (d = d.next = {
eventTime: f,
lane: 0,
tag: l.tag,
payload: l.payload,
callback: l.callback,
next: null
});
e: {
var m = e
, g = l;
switch (p = t,
f = n,
g.tag) {
case 1:
if ("function" === typeof (m = g.payload)) {
h = m.call(f, h, p);
break e
}
h = m;
break e;
case 3:
m.flags = -65537 & m.flags | 128;
case 0:
if (null === (p = "function" === typeof (m = g.payload) ? m.call(f, h, p) : m) || void 0 === p)
break e;
h = s({}, h, p);
break e;
case 2:
pn = !0
}
}
null !== l.callback && 0 !== l.lane && (e.flags |= 64,
null === (p = i.effects) ? i.effects = [l] : p.push(l))
} else
f = {
eventTime: f,
lane: p,
tag: l.tag,
payload: l.payload,
callback: l.callback,
next: null
},
null === d ? (u = d = f,
c = h) : d = d.next = f,
o |= p;
if (null === (l = l.next)) {
if (null === (l = i.shared.pending))
break;
l = (p = l).next,
p.next = null,
i.lastBaseUpdate = p,
i.shared.pending = null
}
}
if (null === d && (c = h),
i.baseState = c,
i.firstBaseUpdate = u,
i.lastBaseUpdate = d,
null !== (t = i.shared.interleaved)) {
i = t;
do {
o |= i.lane,
i = i.next
} while (i !== t)
} else
null === a && (i.shared.lanes = 0);
ta |= o,
e.lanes = o,
e.memoizedState = h
}
}
function _n(e, t, n) {
if (e = t.effects,
t.effects = null,
null !== e)
for (t = 0; t < e.length; t++) {
var r = e[t]
, i = r.callback;
if (null !== i) {
if (r.callback = null,
r = n,
"function" !== typeof i)
throw Error(a(191, i));
i.call(r)
}
}
}
var wn = (new r.Component).refs;
function Sn(e, t, n, r) {
n = null === (n = n(r, t = e.memoizedState)) || void 0 === n ? t : s({}, t, n),
e.memoizedState = n,
0 === e.lanes && (e.updateQueue.baseState = n)
}
var An = {
isMounted: function(e) {
return !!(e = e._reactInternals) && M(e) === e
},
enqueueSetState: function(e, t, n) {
e = e._reactInternals;
var r = ba()
, i = _a(e)
, s = gn(r, i);
s.payload = t,
void 0 !== n && null !== n && (s.callback = n),
vn(e, s),
null !== (t = wa(e, i, r)) && yn(t, e, i)
},
enqueueReplaceState: function(e, t, n) {
e = e._reactInternals;
var r = ba()
, i = _a(e)
, s = gn(r, i);
s.tag = 1,
s.payload = t,
void 0 !== n && null !== n && (s.callback = n),
vn(e, s),
null !== (t = wa(e, i, r)) && yn(t, e, i)
},
enqueueForceUpdate: function(e, t) {
e = e._reactInternals;
var n = ba()
, r = _a(e)
, i = gn(n, r);
i.tag = 2,
void 0 !== t && null !== t && (i.callback = t),
vn(e, i),
null !== (t = wa(e, r, n)) && yn(t, e, r)
}
};
function Mn(e, t, n, r, i, s, a) {
return "function" === typeof (e = e.stateNode).shouldComponentUpdate ? e.shouldComponentUpdate(r, s, a) : !t.prototype || !t.prototype.isPureReactComponent || (!Zt(n, r) || !Zt(i, s))
}
function Cn(e, t, n) {
var r = !1
, i = ct
, s = t.contextType;
return "object" === typeof s && null !== s ? s = dn(s) : (i = ft(t) ? ht : ut.current,
s = (r = null !== (r = t.contextTypes) && void 0 !== r) ? pt(e, i) : ct),
t = new t(n,s),
e.memoizedState = null !== t.state && void 0 !== t.state ? t.state : null,
t.updater = An,
e.stateNode = t,
t._reactInternals = e,
r && ((e = e.stateNode).__reactInternalMemoizedUnmaskedChildContext = i,
e.__reactInternalMemoizedMaskedChildContext = s),
t
}
function En(e, t, n, r) {
e = t.state,
"function" === typeof t.componentWillReceiveProps && t.componentWillReceiveProps(n, r),
"function" === typeof t.UNSAFE_componentWillReceiveProps && t.UNSAFE_componentWillReceiveProps(n, r),
t.state !== e && An.enqueueReplaceState(t, t.state, null)
}
function Tn(e, t, n, r) {
var i = e.stateNode;
i.props = n,
i.state = e.memoizedState,
i.refs = wn,
fn(e);
var s = t.contextType;
"object" === typeof s && null !== s ? i.context = dn(s) : (s = ft(t) ? ht : ut.current,
i.context = pt(e, s)),
i.state = e.memoizedState,
"function" === typeof (s = t.getDerivedStateFromProps) && (Sn(e, t, s, n),
i.state = e.memoizedState),
"function" === typeof t.getDerivedStateFromProps || "function" === typeof i.getSnapshotBeforeUpdate || "function" !== typeof i.UNSAFE_componentWillMount && "function" !== typeof i.componentWillMount || (t = i.state,
"function" === typeof i.componentWillMount && i.componentWillMount(),
"function" === typeof i.UNSAFE_componentWillMount && i.UNSAFE_componentWillMount(),
t !== i.state && An.enqueueReplaceState(i, i.state, null),
bn(e, n, i, r),
i.state = e.memoizedState),
"function" === typeof i.componentDidMount && (e.flags |= 4194308)
}
var Rn = []
, Bn = 0
, Pn = null
, kn = 0
, Ln = []
, In = 0
, Nn = null
, Dn = 1
, jn = "";
function Fn(e, t) {
Rn[Bn++] = kn,
Rn[Bn++] = Pn,
Pn = e,
kn = t
}
function On(e, t, n) {
Ln[In++] = Dn,
Ln[In++] = jn,
Ln[In++] = Nn,
Nn = e;
var r = Dn;
e = jn;
var i = 32 - bt(r) - 1;
r &= ~(1 << i),
n += 1;
var s = 32 - bt(t) + i;
if (30 < s) {
var a = i - i % 5;
s = (r & (1 << a) - 1).toString(32),
r >>= a,
i -= a,
Dn = 1 << 32 - bt(t) + i | n << i | r,
jn = s + e
} else
Dn = 1 << s | n << i | r,
jn = e
}
function Un(e) {
null !== e.return && (Fn(e, 1),
On(e, 1, 0))
}
function zn(e) {
for (; e === Pn; )
Pn = Rn[--Bn],
Rn[Bn] = null,
kn = Rn[--Bn],
Rn[Bn] = null;
for (; e === Nn; )
Nn = Ln[--In],
Ln[In] = null,
jn = Ln[--In],
Ln[In] = null,
Dn = Ln[--In],
Ln[In] = null
}
var Gn = null
, Hn = null
, Vn = !1
, Wn = !1
, Jn = null;
function Xn(e, t) {
var n = Qa(5, null, null, 0);
n.elementType = "DELETED",
n.stateNode = t,
n.return = e,
null === (t = e.deletions) ? (e.deletions = [n],
e.flags |= 16) : t.push(n)
}
function Kn(e, t) {
switch (e.tag) {
case 5:
return null !== (t = Le(t, e.type, e.pendingProps)) && (e.stateNode = t,
Gn = e,
Hn = Ue(t),
!0);
case 6:
return null !== (t = Ie(t, e.pendingProps)) && (e.stateNode = t,
Gn = e,
Hn = null,
!0);
case 13:
if (null !== (t = Ne(t))) {
var n = null !== Nn ? {
id: Dn,
overflow: jn
} : null;
return e.memoizedState = {
dehydrated: t,
treeContext: n,
retryLane: 1073741824
},
(n = Qa(18, null, null, 0)).stateNode = t,
n.return = e,
e.child = n,
Gn = e,
Hn = null,
!0
}
return !1;
default:
return !1
}
}
function qn(e) {
return 0 !== (1 & e.mode) && 0 === (128 & e.flags)
}
function Yn(e) {
if (Vn) {
var t = Hn;
if (t) {
var n = t;
if (!Kn(e, t)) {
if (qn(e))
throw Error(a(418));
t = Oe(n);
var r = Gn;
t && Kn(e, t) ? Xn(r, n) : (e.flags = -4097 & e.flags | 2,
Vn = !1,
Gn = e)
}
} else {
if (qn(e))
throw Error(a(418));
e.flags = -4097 & e.flags | 2,
Vn = !1,
Gn = e
}
}
}
function Qn(e) {
for (e = e.return; null !== e && 5 !== e.tag && 3 !== e.tag && 13 !== e.tag; )
e = e.return;
Gn = e
}
function Zn(e) {
if (!Y || e !== Gn)
return !1;
if (!Vn)
return Qn(e),
Vn = !0,
!1;
if (3 !== e.tag && (5 !== e.tag || Qe(e.type) && !G(e.type, e.memoizedProps))) {
var t = Hn;
if (t) {
if (qn(e)) {
for (e = Hn; e; )
e = Oe(e);
throw Error(a(418))
}
for (; t; )
Xn(e, t),
t = Oe(t)
}
}
if (Qn(e),
13 === e.tag) {
if (!Y)
throw Error(a(316));
if (!(e = null !== (e = e.memoizedState) ? e.dehydrated : null))
throw Error(a(317));
Hn = Je(e)
} else
Hn = Gn ? Oe(e.stateNode) : null;
return !0
}
function $n() {
Y && (Hn = Gn = null,
Wn = Vn = !1)
}
function er(e) {
null === Jn ? Jn = [e] : Jn.push(e)
}
function tr(e, t, n) {
if (null !== (e = n.ref) && "function" !== typeof e && "object" !== typeof e) {
if (n._owner) {
if (n = n._owner) {
if (1 !== n.tag)
throw Error(a(309));
var r = n.stateNode
}
if (!r)
throw Error(a(147, e));
var i = r
, s = "" + e;
return null !== t && null !== t.ref && "function" === typeof t.ref && t.ref._stringRef === s ? t.ref : (t = function(e) {
var t = i.refs;
t === wn && (t = i.refs = {}),
null === e ? delete t[s] : t[s] = e
}
,
t._stringRef = s,
t)
}
if ("string" !== typeof e)
throw Error(a(284));
if (!n._owner)
throw Error(a(290, e))
}
return e
}
function nr(e, t) {
throw e = Object.prototype.toString.call(t),
Error(a(31, "[object Object]" === e ? "object with keys {" + Object.keys(t).join(", ") + "}" : e))
}
function rr(e) {
return (0,
e._init)(e._payload)
}
function ir(e) {
function t(t, n) {
if (e) {
var r = t.deletions;
null === r ? (t.deletions = [n],
t.flags |= 16) : r.push(n)
}
}
function n(n, r) {
if (!e)
return null;
for (; null !== r; )
t(n, r),
r = r.sibling;
return null
}
function r(e, t) {
for (e = new Map; null !== t; )
null !== t.key ? e.set(t.key, t) : e.set(t.index, t),
t = t.sibling;
return e
}
function i(e, t) {
return (e = $a(e, t)).index = 0,
e.sibling = null,
e
}
function s(t, n, r) {
return t.index = r,
e ? null !== (r = t.alternate) ? (r = r.index) < n ? (t.flags |= 2,
n) : r : (t.flags |= 2,
n) : (t.flags |= 1048576,
n)
}
function o(t) {
return e && null === t.alternate && (t.flags |= 2),
t
}
function d(e, t, n, r) {
return null === t || 6 !== t.tag ? ((t = ro(n, e.mode, r)).return = e,
t) : ((t = i(t, n)).return = e,
t)
}
function h(e, t, n, r) {
var s = n.type;
return s === u ? f(e, t, n.props.children, r, n.key) : null !== t && (t.elementType === s || "object" === typeof s && null !== s && s.$$typeof === x && rr(s) === t.type) ? ((r = i(t, n.props)).ref = tr(e, t, n),
r.return = e,
r) : ((r = eo(n.type, n.key, n.props, null, e.mode, r)).ref = tr(e, t, n),
r.return = e,
r)
}
function p(e, t, n, r) {
return null === t || 4 !== t.tag || t.stateNode.containerInfo !== n.containerInfo || t.stateNode.implementation !== n.implementation ? ((t = io(n, e.mode, r)).return = e,
t) : ((t = i(t, n.children || [])).return = e,
t)
}
function f(e, t, n, r, s) {
return null === t || 7 !== t.tag ? ((t = to(n, e.mode, r, s)).return = e,
t) : ((t = i(t, n)).return = e,
t)
}
function m(e, t, n) {
if ("string" === typeof t && "" !== t || "number" === typeof t)
return (t = ro("" + t, e.mode, n)).return = e,
t;
if ("object" === typeof t && null !== t) {
switch (t.$$typeof) {
case l:
return (n = eo(t.type, t.key, t.props, null, e.mode, n)).ref = tr(e, null, t),
n.return = e,
n;
case c:
return (t = io(t, e.mode, n)).return = e,
t;
case x:
return m(e, (0,
t._init)(t._payload), n)
}
if (k(t) || w(t))
return (t = to(t, e.mode, n, null)).return = e,
t;
nr(e, t)
}
return null
}
function g(e, t, n, r) {
var i = null !== t ? t.key : null;
if ("string" === typeof n && "" !== n || "number" === typeof n)
return null !== i ? null : d(e, t, "" + n, r);
if ("object" === typeof n && null !== n) {
switch (n.$$typeof) {
case l:
return n.key === i ? h(e, t, n, r) : null;
case c:
return n.key === i ? p(e, t, n, r) : null;
case x:
return g(e, t, (i = n._init)(n._payload), r)
}
if (k(n) || w(n))
return null !== i ? null : f(e, t, n, r, null);
nr(e, n)
}
return null
}
function v(e, t, n, r, i) {
if ("string" === typeof r && "" !== r || "number" === typeof r)
return d(t, e = e.get(n) || null, "" + r, i);
if ("object" === typeof r && null !== r) {
switch (r.$$typeof) {
case l:
return h(t, e = e.get(null === r.key ? n : r.key) || null, r, i);
case c:
return p(t, e = e.get(null === r.key ? n : r.key) || null, r, i);
case x:
return v(e, t, n, (0,
r._init)(r._payload), i)
}
if (k(r) || w(r))
return f(t, e = e.get(n) || null, r, i, null);
nr(t, r)
}
return null
}
function y(i, a, o, l) {
for (var c = null, u = null, d = a, h = a = 0, p = null; null !== d && h < o.length; h++) {
d.index > h ? (p = d,
d = null) : p = d.sibling;
var f = g(i, d, o[h], l);
if (null === f) {
null === d && (d = p);
break
}
e && d && null === f.alternate && t(i, d),
a = s(f, a, h),
null === u ? c = f : u.sibling = f,
u = f,
d = p
}
if (h === o.length)
return n(i, d),
Vn && Fn(i, h),
c;
if (null === d) {
for (; h < o.length; h++)
null !== (d = m(i, o[h], l)) && (a = s(d, a, h),
null === u ? c = d : u.sibling = d,
u = d);
return Vn && Fn(i, h),
c
}
for (d = r(i, d); h < o.length; h++)
null !== (p = v(d, i, h, o[h], l)) && (e && null !== p.alternate && d.delete(null === p.key ? h : p.key),
a = s(p, a, h),
null === u ? c = p : u.sibling = p,
u = p);
return e && d.forEach((function(e) {
return t(i, e)
}
)),
Vn && Fn(i, h),
c
}
function b(i, o, l, c) {
var u = w(l);
if ("function" !== typeof u)
throw Error(a(150));
if (null == (l = u.call(l)))
throw Error(a(151));
for (var d = u = null, h = o, p = o = 0, f = null, y = l.next(); null !== h && !y.done; p++,
y = l.next()) {
h.index > p ? (f = h,
h = null) : f = h.sibling;
var x = g(i, h, y.value, c);
if (null === x) {
null === h && (h = f);
break
}
e && h && null === x.alternate && t(i, h),
o = s(x, o, p),
null === d ? u = x : d.sibling = x,
d = x,
h = f
}
if (y.done)
return n(i, h),
Vn && Fn(i, p),
u;
if (null === h) {
for (; !y.done; p++,
y = l.next())
null !== (y = m(i, y.value, c)) && (o = s(y, o, p),
null === d ? u = y : d.sibling = y,
d = y);
return Vn && Fn(i, p),
u
}
for (h = r(i, h); !y.done; p++,
y = l.next())
null !== (y = v(h, i, p, y.value, c)) && (e && null !== y.alternate && h.delete(null === y.key ? p : y.key),
o = s(y, o, p),
null === d ? u = y : d.sibling = y,
d = y);
return e && h.forEach((function(e) {
return t(i, e)
}
)),
Vn && Fn(i, p),
u
}
return function e(r, s, a, d) {
if ("object" === typeof a && null !== a && a.type === u && null === a.key && (a = a.props.children),
"object" === typeof a && null !== a) {
switch (a.$$typeof) {
case l:
e: {
for (var h = a.key, p = s; null !== p; ) {
if (p.key === h) {
if ((h = a.type) === u) {
if (7 === p.tag) {
n(r, p.sibling),
(s = i(p, a.props.children)).return = r,
r = s;
break e
}
} else if (p.elementType === h || "object" === typeof h && null !== h && h.$$typeof === x && rr(h) === p.type) {
n(r, p.sibling),
(s = i(p, a.props)).ref = tr(r, p, a),
s.return = r,
r = s;
break e
}
n(r, p);
break
}
t(r, p),
p = p.sibling
}
a.type === u ? ((s = to(a.props.children, r.mode, d, a.key)).return = r,
r = s) : ((d = eo(a.type, a.key, a.props, null, r.mode, d)).ref = tr(r, s, a),
d.return = r,
r = d)
}
return o(r);
case c:
e: {
for (p = a.key; null !== s; ) {
if (s.key === p) {
if (4 === s.tag && s.stateNode.containerInfo === a.containerInfo && s.stateNode.implementation === a.implementation) {
n(r, s.sibling),
(s = i(s, a.children || [])).return = r,
r = s;
break e
}
n(r, s);
break
}
t(r, s),
s = s.sibling
}
(s = io(a, r.mode, d)).return = r,
r = s
}
return o(r);
case x:
return e(r, s, (p = a._init)(a._payload), d)
}
if (k(a))
return y(r, s, a, d);
if (w(a))
return b(r, s, a, d);
nr(r, a)
}
return "string" === typeof a && "" !== a || "number" === typeof a ? (a = "" + a,
null !== s && 6 === s.tag ? (n(r, s.sibling),
(s = i(s, a)).return = r,
r = s) : (n(r, s),
(s = ro(a, r.mode, d)).return = r,
r = s),
o(r)) : n(r, s)
}
}
var sr = ir(!0)
, ar = ir(!1)
, or = {}
, lr = at(or)
, cr = at(or)
, ur = at(or);
function dr(e) {
if (e === or)
throw Error(a(174));
return e
}
function hr(e, t) {
lt(ur, t),
lt(cr, e),
lt(lr, or),
e = I(t),
ot(lr),
lt(lr, e)
}
function pr() {
ot(lr),
ot(cr),
ot(ur)
}
function fr(e) {
var t = dr(ur.current)
, n = dr(lr.current);
n !== (t = N(n, e.type, t)) && (lt(cr, e),
lt(lr, t))
}
function mr(e) {
cr.current === e && (ot(lr),
ot(cr))
}
var gr = at(0);
function vr(e) {
for (var t = e; null !== t; ) {
if (13 === t.tag) {
var n = t.memoizedState;
if (null !== n && (null === (n = n.dehydrated) || De(n) || je(n)))
return t
} else if (19 === t.tag && void 0 !== t.memoizedProps.revealOrder) {
if (0 !== (128 & t.flags))
return t
} else if (null !== t.child) {
t.child.return = t,
t = t.child;
continue
}
if (t === e)
break;
for (; null === t.sibling; ) {
if (null === t.return || t.return === e)
return null;
t = t.return
}
t.sibling.return = t.return,
t = t.sibling
}
return null
}
var yr = [];
function xr() {
for (var e = 0; e < yr.length; e++) {
var t = yr[e];
X ? t._workInProgressVersionPrimary = null : t._workInProgressVersionSecondary = null
}
yr.length = 0
}
var br = o.ReactCurrentDispatcher
, _r = o.ReactCurrentBatchConfig
, wr = 0
, Sr = null
, Ar = null
, Mr = null
, Cr = !1
, Er = !1
, Tr = 0
, Rr = 0;
function Br() {
throw Error(a(321))
}
function Pr(e, t) {
if (null === t)
return !1;
for (var n = 0; n < t.length && n < e.length; n++)
if (!Wt(e[n], t[n]))
return !1;
return !0
}
function kr(e, t, n, r, i, s) {
if (wr = s,
Sr = t,
t.memoizedState = null,
t.updateQueue = null,
t.lanes = 0,
br.current = null === e || null === e.memoizedState ? fi : mi,
e = n(r, i),
Er) {
s = 0;
do {
if (Er = !1,
Tr = 0,
25 <= s)
throw Error(a(301));
s += 1,
Mr = Ar = null,
t.updateQueue = null,
br.current = gi,
e = n(r, i)
} while (Er)
}
if (br.current = pi,
t = null !== Ar && null !== Ar.next,
wr = 0,
Mr = Ar = Sr = null,
Cr = !1,
t)
throw Error(a(300));
return e
}
function Lr() {
var e = 0 !== Tr;
return Tr = 0,
e
}
function Ir() {
var e = {
memoizedState: null,
baseState: null,
baseQueue: null,
queue: null,
next: null
};
return null === Mr ? Sr.memoizedState = Mr = e : Mr = Mr.next = e,
Mr
}
function Nr() {
if (null === Ar) {
var e = Sr.alternate;
e = null !== e ? e.memoizedState : null
} else
e = Ar.next;
var t = null === Mr ? Sr.memoizedState : Mr.next;
if (null !== t)
Mr = t,
Ar = e;
else {
if (null === e)
throw Error(a(310));
e = {
memoizedState: (Ar = e).memoizedState,
baseState: Ar.baseState,
baseQueue: Ar.baseQueue,
queue: Ar.queue,
next: null
},
null === Mr ? Sr.memoizedState = Mr = e : Mr = Mr.next = e
}
return Mr
}
function Dr(e, t) {
return "function" === typeof t ? t(e) : t
}
function jr(e) {
var t = Nr()
, n = t.queue;
if (null === n)
throw Error(a(311));
n.lastRenderedReducer = e;
var r = Ar
, i = r.baseQueue
, s = n.pending;
if (null !== s) {
if (null !== i) {
var o = i.next;
i.next = s.next,
s.next = o
}
r.baseQueue = i = s,
n.pending = null
}
if (null !== i) {
s = i.next,
r = r.baseState;
var l = o = null
, c = null
, u = s;
do {
var d = u.lane;
if ((wr & d) === d)
null !== c && (c = c.next = {
lane: 0,
action: u.action,
hasEagerState: u.hasEagerState,
eagerState: u.eagerState,
next: null
}),
r = u.hasEagerState ? u.eagerState : e(r, u.action);
else {
var h = {
lane: d,
action: u.action,
hasEagerState: u.hasEagerState,
eagerState: u.eagerState,
next: null
};
null === c ? (l = c = h,
o = r) : c = c.next = h,
Sr.lanes |= d,
ta |= d
}
u = u.next
} while (null !== u && u !== s);
null === c ? o = r : c.next = l,
Wt(r, t.memoizedState) || (Di = !0),
t.memoizedState = r,
t.baseState = o,
t.baseQueue = c,
n.lastRenderedState = r
}
if (null !== (e = n.interleaved)) {
i = e;
do {
s = i.lane,
Sr.lanes |= s,
ta |= s,
i = i.next
} while (i !== e)
} else
null === i && (n.lanes = 0);
return [t.memoizedState, n.dispatch]
}
function Fr(e) {
var t = Nr()
, n = t.queue;
if (null === n)
throw Error(a(311));
n.lastRenderedReducer = e;
var r = n.dispatch
, i = n.pending
, s = t.memoizedState;
if (null !== i) {
n.pending = null;
var o = i = i.next;
do {
s = e(s, o.action),
o = o.next
} while (o !== i);
Wt(s, t.memoizedState) || (Di = !0),
t.memoizedState = s,
null === t.baseQueue && (t.baseState = s),
n.lastRenderedState = s
}
return [s, r]
}
function Or() {}
function Ur(e, t) {
var n = Sr
, r = Nr()
, i = t()
, s = !Wt(r.memoizedState, i);
if (s && (r.memoizedState = i,
Di = !0),
r = r.queue,
Qr(Hr.bind(null, n, r, e), [e]),
r.getSnapshot !== t || s || null !== Mr && 1 & Mr.memoizedState.tag) {
if (n.flags |= 2048,
Jr(9, Gr.bind(null, n, r, i, t), void 0, null),
null === Ks)
throw Error(a(349));
0 !== (30 & wr) || zr(n, t, i)
}
return i
}
function zr(e, t, n) {
e.flags |= 16384,
e = {
getSnapshot: t,
value: n
},
null === (t = Sr.updateQueue) ? (t = {
lastEffect: null,
stores: null
},
Sr.updateQueue = t,
t.stores = [e]) : null === (n = t.stores) ? t.stores = [e] : n.push(e)
}
function Gr(e, t, n, r) {
t.value = n,
t.getSnapshot = r,
Vr(t) && wa(e, 1, -1)
}
function Hr(e, t, n) {
return n((function() {
Vr(t) && wa(e, 1, -1)
}
))
}
function Vr(e) {
var t = e.getSnapshot;
e = e.value;
try {
var n = t();
return !Wt(e, n)
} catch (r) {
return !0
}
}
function Wr(e) {
var t = Ir();
return "function" === typeof e && (e = e()),
t.memoizedState = t.baseState = e,
e = {
pending: null,
interleaved: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: Dr,
lastRenderedState: e
},
t.queue = e,
e = e.dispatch = li.bind(null, Sr, e),
[t.memoizedState, e]
}
function Jr(e, t, n, r) {
return e = {
tag: e,
create: t,
destroy: n,
deps: r,
next: null
},
null === (t = Sr.updateQueue) ? (t = {
lastEffect: null,
stores: null
},
Sr.updateQueue = t,
t.lastEffect = e.next = e) : null === (n = t.lastEffect) ? t.lastEffect = e.next = e : (r = n.next,
n.next = e,
e.next = r,
t.lastEffect = e),
e
}
function Xr() {
return Nr().memoizedState
}
function Kr(e, t, n, r) {
var i = Ir();
Sr.flags |= e,
i.memoizedState = Jr(1 | t, n, void 0, void 0 === r ? null : r)
}
function qr(e, t, n, r) {
var i = Nr();
r = void 0 === r ? null : r;
var s = void 0;
if (null !== Ar) {
var a = Ar.memoizedState;
if (s = a.destroy,
null !== r && Pr(r, a.deps))
return void (i.memoizedState = Jr(t, n, s, r))
}
Sr.flags |= e,
i.memoizedState = Jr(1 | t, n, s, r)
}
function Yr(e, t) {
return Kr(8390656, 8, e, t)
}
function Qr(e, t) {
return qr(2048, 8, e, t)
}
function Zr(e, t) {
return qr(4, 2, e, t)
}
function $r(e, t) {
return qr(4, 4, e, t)
}
function ei(e, t) {
return "function" === typeof t ? (e = e(),
t(e),
function() {
t(null)
}
) : null !== t && void 0 !== t ? (e = e(),
t.current = e,
function() {
t.current = null
}
) : void 0
}
function ti(e, t, n) {
return n = null !== n && void 0 !== n ? n.concat([e]) : null,
qr(4, 4, ei.bind(null, t, e), n)
}
function ni() {}
function ri(e, t) {
var n = Nr();
t = void 0 === t ? null : t;
var r = n.memoizedState;
return null !== r && null !== t && Pr(t, r[1]) ? r[0] : (n.memoizedState = [e, t],
e)
}
function ii(e, t) {
var n = Nr();
t = void 0 === t ? null : t;
var r = n.memoizedState;
return null !== r && null !== t && Pr(t, r[1]) ? r[0] : (e = e(),
n.memoizedState = [e, t],
e)
}
function si(e, t) {
var n = kt;
kt = 0 !== n && 4 > n ? n : 4,
e(!0);
var r = _r.transition;
_r.transition = {};
try {
e(!1),
t()
} finally {
kt = n,
_r.transition = r
}
}
function ai() {
return Nr().memoizedState
}
function oi(e, t, n) {
var r = _a(e);
n = {
lane: r,
action: n,
hasEagerState: !1,
eagerState: null,
next: null
},
ci(e) ? ui(t, n) : (di(e, t, n),
null !== (e = wa(e, r, n = ba())) && hi(e, t, r))
}
function li(e, t, n) {
var r = _a(e)
, i = {
lane: r,
action: n,
hasEagerState: !1,
eagerState: null,
next: null
};
if (ci(e))
ui(t, i);
else {
di(e, t, i);
var s = e.alternate;
if (0 === e.lanes && (null === s || 0 === s.lanes) && null !== (s = t.lastRenderedReducer))
try {
var a = t.lastRenderedState
, o = s(a, n);
if (i.hasEagerState = !0,
i.eagerState = o,
Wt(o, a))
return
} catch (l) {}
null !== (e = wa(e, r, n = ba())) && hi(e, t, r)
}
}
function ci(e) {
var t = e.alternate;
return e === Sr || null !== t && t === Sr
}
function ui(e, t) {
Er = Cr = !0;
var n = e.pending;
null === n ? t.next = t : (t.next = n.next,
n.next = t),
e.pending = t
}
function di(e, t, n) {
null !== Ks && 0 !== (1 & e.mode) && 0 === (2 & Xs) ? (null === (e = t.interleaved) ? (n.next = n,
null === hn ? hn = [t] : hn.push(t)) : (n.next = e.next,
e.next = n),
t.interleaved = n) : (null === (e = t.pending) ? n.next = n : (n.next = e.next,
e.next = n),
t.pending = n)
}
function hi(e, t, n) {
if (0 !== (4194240 & n)) {
var r = t.lanes;
n |= r &= e.pendingLanes,
t.lanes = n,
Pt(e, n)
}
}
var pi = {
readContext: dn,
useCallback: Br,
useContext: Br,
useEffect: Br,
useImperativeHandle: Br,
useInsertionEffect: Br,
useLayoutEffect: Br,
useMemo: Br,
useReducer: Br,
useRef: Br,
useState: Br,
useDebugValue: Br,
useDeferredValue: Br,
useTransition: Br,
useMutableSource: Br,
useSyncExternalStore: Br,
useId: Br,
unstable_isNewReconciler: !1
}
, fi = {
readContext: dn,
useCallback: function(e, t) {
return Ir().memoizedState = [e, void 0 === t ? null : t],
e
},
useContext: dn,
useEffect: Yr,
useImperativeHandle: function(e, t, n) {
return n = null !== n && void 0 !== n ? n.concat([e]) : null,
Kr(4194308, 4, ei.bind(null, t, e), n)
},
useLayoutEffect: function(e, t) {
return Kr(4194308, 4, e, t)
},
useInsertionEffect: function(e, t) {
return Kr(4, 2, e, t)
},
useMemo: function(e, t) {
var n = Ir();
return t = void 0 === t ? null : t,
e = e(),
n.memoizedState = [e, t],
e
},
useReducer: function(e, t, n) {
var r = Ir();
return t = void 0 !== n ? n(t) : t,
r.memoizedState = r.baseState = t,
e = {
pending: null,
interleaved: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: e,
lastRenderedState: t
},
r.queue = e,
e = e.dispatch = oi.bind(null, Sr, e),
[r.memoizedState, e]
},
useRef: function(e) {
return e = {
current: e
},
Ir().memoizedState = e
},
useState: Wr,
useDebugValue: ni,
useDeferredValue: function(e) {
var t = Wr(e)
, n = t[0]
, r = t[1];
return Yr((function() {
var t = _r.transition;
_r.transition = {};
try {
r(e)
} finally {
_r.transition = t
}
}
), [e]),
n
},
useTransition: function() {
var e = Wr(!1)
, t = e[0];
return e = si.bind(null, e[1]),
Ir().memoizedState = e,
[t, e]
},
useMutableSource: function() {},
useSyncExternalStore: function(e, t, n) {
var r = Sr
, i = Ir();
if (Vn) {
if (void 0 === n)
throw Error(a(407));
n = n()
} else {
if (n = t(),
null === Ks)
throw Error(a(349));
0 !== (30 & wr) || zr(r, t, n)
}
i.memoizedState = n;
var s = {
value: n,
getSnapshot: t
};
return i.queue = s,
Yr(Hr.bind(null, r, s, e), [e]),
r.flags |= 2048,
Jr(9, Gr.bind(null, r, s, n, t), void 0, null),
n
},
useId: function() {
var e = Ir()
, t = Ks.identifierPrefix;
if (Vn) {
var n = jn;
t = ":" + t + "R" + (n = (Dn & ~(1 << 32 - bt(Dn) - 1)).toString(32) + n),
0 < (n = Tr++) && (t += "H" + n.toString(32)),
t += ":"
} else
t = ":" + t + "r" + (n = Rr++).toString(32) + ":";
return e.memoizedState = t
},
unstable_isNewReconciler: !1
}
, mi = {
readContext: dn,
useCallback: ri,
useContext: dn,
useEffect: Qr,
useImperativeHandle: ti,
useInsertionEffect: Zr,
useLayoutEffect: $r,
useMemo: ii,
useReducer: jr,
useRef: Xr,
useState: function() {
return jr(Dr)
},
useDebugValue: ni,
useDeferredValue: function(e) {
var t = jr(Dr)
, n = t[0]
, r = t[1];
return Qr((function() {
var t = _r.transition;
_r.transition = {};
try {
r(e)
} finally {
_r.transition = t
}
}
), [e]),
n
},
useTransition: function() {
return [jr(Dr)[0], Nr().memoizedState]
},
useMutableSource: Or,
useSyncExternalStore: Ur,
useId: ai,
unstable_isNewReconciler: !1
}
, gi = {
readContext: dn,
useCallback: ri,
useContext: dn,
useEffect: Qr,
useImperativeHandle: ti,
useInsertionEffect: Zr,
useLayoutEffect: $r,
useMemo: ii,
useReducer: Fr,
useRef: Xr,
useState: function() {
return Fr(Dr)
},
useDebugValue: ni,
useDeferredValue: function(e) {
var t = Fr(Dr)
, n = t[0]
, r = t[1];
return Qr((function() {
var t = _r.transition;
_r.transition = {};
try {
r(e)
} finally {
_r.transition = t
}
}
), [e]),
n
},
useTransition: function() {
return [Fr(Dr)[0], Nr().memoizedState]
},
useMutableSource: Or,
useSyncExternalStore: Ur,
useId: ai,
unstable_isNewReconciler: !1
};
function vi(e, t) {
try {
var n = ""
, r = t;
do {
n += $t(r),
r = r.return
} while (r);
var i = n
} catch (s) {
i = "\nError generating stack: " + s.message + "\n" + s.stack
}
return {
value: e,
source: t,
stack: i
}
}
function yi(e, t) {
try {
console.error(t.value)
} catch (n) {
setTimeout((function() {
throw n
}
))
}
}
var xi, bi, _i, wi, Si = "function" === typeof WeakMap ? WeakMap : Map;
function Ai(e, t, n) {
(n = gn(-1, n)).tag = 3,
n.payload = {
element: null
};
var r = t.value;
return n.callback = function() {
ua || (ua = !0,
da = r),
yi(0, t)
}
,
n
}
function Mi(e, t, n) {
(n = gn(-1, n)).tag = 3;
var r = e.type.getDerivedStateFromError;
if ("function" === typeof r) {
var i = t.value;
n.payload = function() {
return r(i)
}
,
n.callback = function() {
yi(0, t)
}
}
var s = e.stateNode;
return null !== s && "function" === typeof s.componentDidCatch && (n.callback = function() {
yi(0, t),
"function" !== typeof r && (null === ha ? ha = new Set([this]) : ha.add(this));
var e = t.stack;
this.componentDidCatch(t.value, {
componentStack: null !== e ? e : ""
})
}
),
n
}
function Ci(e, t, n) {
var r = e.pingCache;
if (null === r) {
r = e.pingCache = new Si;
var i = new Set;
r.set(t, i)
} else
void 0 === (i = r.get(t)) && (i = new Set,
r.set(t, i));
i.has(n) || (i.add(n),
e = Wa.bind(null, e, t, n),
t.then(e, e))
}
function Ei(e) {
do {
var t;
if ((t = 13 === e.tag) && (t = null === (t = e.memoizedState) || null !== t.dehydrated),
t)
return e;
e = e.return
} while (null !== e);
return null
}
function Ti(e, t, n, r, i) {
return 0 === (1 & e.mode) ? (e === t ? e.flags |= 65536 : (e.flags |= 128,
n.flags |= 131072,
n.flags &= -52805,
1 === n.tag && (null === n.alternate ? n.tag = 17 : ((t = gn(-1, 1)).tag = 2,
vn(n, t))),
n.lanes |= 1),
e) : (e.flags |= 65536,
e.lanes = i,
e)
}
function Ri(e) {
e.flags |= 4
}
function Bi(e, t) {
if (null !== e && e.child === t.child)
return !0;
if (0 !== (16 & t.flags))
return !1;
for (e = t.child; null !== e; ) {
if (0 !== (12854 & e.flags) || 0 !== (12854 & e.subtreeFlags))
return !1;
e = e.sibling
}
return !0
}
if (K)
xi = function(e, t) {
for (var n = t.child; null !== n; ) {
if (5 === n.tag || 6 === n.tag)
O(e, n.stateNode);
else if (4 !== n.tag && null !== n.child) {
n.child.return = n,
n = n.child;
continue
}
if (n === t)
break;
for (; null === n.sibling; ) {
if (null === n.return || n.return === t)
return;
n = n.return
}
n.sibling.return = n.return,
n = n.sibling
}
}
,
bi = function() {}
,
_i = function(e, t, n, r, i) {
if ((e = e.memoizedProps) !== r) {
var s = t.stateNode
, a = dr(lr.current);
n = z(s, n, e, r, i, a),
(t.updateQueue = n) && Ri(t)
}
}
,
wi = function(e, t, n, r) {
n !== r && Ri(t)
}
;
else if (q) {
xi = function(e, t, n, r) {
for (var i = t.child; null !== i; ) {
if (5 === i.tag) {
var s = i.stateNode;
n && r && (s = Pe(s, i.type, i.memoizedProps, i)),
O(e, s)
} else if (6 === i.tag)
s = i.stateNode,
n && r && (s = ke(s, i.memoizedProps, i)),
O(e, s);
else if (4 !== i.tag)
if (22 === i.tag && null !== i.memoizedState)
null !== (s = i.child) && (s.return = i),
xi(e, i, !0, !0);
else if (null !== i.child) {
i.child.return = i,
i = i.child;
continue
}
if (i === t)
break;
for (; null === i.sibling; ) {
if (null === i.return || i.return === t)
return;
i = i.return
}
i.sibling.return = i.return,
i = i.sibling
}
}
;
var Pi = function(e, t, n, r) {
for (var i = t.child; null !== i; ) {
if (5 === i.tag) {
var s = i.stateNode;
n && r && (s = Pe(s, i.type, i.memoizedProps, i)),
Te(e, s)
} else if (6 === i.tag)
s = i.stateNode,
n && r && (s = ke(s, i.memoizedProps, i)),
Te(e, s);
else if (4 !== i.tag)
if (22 === i.tag && null !== i.memoizedState)
null !== (s = i.child) && (s.return = i),
Pi(e, i, !0, !0);
else if (null !== i.child) {
i.child.return = i,
i = i.child;
continue
}
if (i === t)
break;
for (; null === i.sibling; ) {
if (null === i.return || i.return === t)
return;
i = i.return
}
i.sibling.return = i.return,
i = i.sibling
}
};
bi = function(e, t) {
var n = t.stateNode;
if (!Bi(e, t)) {
e = n.containerInfo;
var r = Ee(e);
Pi(r, t, !1, !1),
n.pendingChildren = r,
Ri(t),
Re(e, r)
}
}
,
_i = function(e, t, n, r, i) {
var s = e.stateNode
, a = e.memoizedProps;
if ((e = Bi(e, t)) && a === r)
t.stateNode = s;
else {
var o = t.stateNode
, l = dr(lr.current)
, c = null;
a !== r && (c = z(o, n, a, r, i, l)),
e && null === c ? t.stateNode = s : (s = Ce(s, c, n, a, r, t, e, o),
U(s, n, r, i, l) && Ri(t),
t.stateNode = s,
e ? Ri(t) : xi(s, t, !1, !1))
}
}
,
wi = function(e, t, n, r) {
n !== r ? (e = dr(ur.current),
n = dr(lr.current),
t.stateNode = H(r, e, n, t),
Ri(t)) : t.stateNode = e.stateNode
}
} else
bi = function() {}
,
_i = function() {}
,
wi = function() {}
;
function ki(e, t) {
if (!Vn)
switch (e.tailMode) {
case "hidden":
t = e.tail;
for (var n = null; null !== t; )
null !== t.alternate && (n = t),
t = t.sibling;
null === n ? e.tail = null : n.sibling = null;
break;
case "collapsed":
n = e.tail;
for (var r = null; null !== n; )
null !== n.alternate && (r = n),
n = n.sibling;
null === r ? t || null === e.tail ? e.tail = null : e.tail.sibling = null : r.sibling = null
}
}
function Li(e) {
var t = null !== e.alternate && e.alternate.child === e.child
, n = 0
, r = 0;
if (t)
for (var i = e.child; null !== i; )
n |= i.lanes | i.childLanes,
r |= 14680064 & i.subtreeFlags,
r |= 14680064 & i.flags,
i.return = e,
i = i.sibling;
else
for (i = e.child; null !== i; )
n |= i.lanes | i.childLanes,
r |= i.subtreeFlags,
r |= i.flags,
i.return = e,
i = i.sibling;
return e.subtreeFlags |= r,
e.childLanes = n,
t
}
function Ii(e, t, n) {
var r = t.pendingProps;
switch (zn(t),
t.tag) {
case 2:
case 16:
case 15:
case 0:
case 11:
case 7:
case 8:
case 12:
case 9:
case 14:
return Li(t),
null;
case 1:
case 17:
return ft(t.type) && mt(),
Li(t),
null;
case 3:
return r = t.stateNode,
pr(),
ot(dt),
ot(ut),
xr(),
r.pendingContext && (r.context = r.pendingContext,
r.pendingContext = null),
null !== e && null !== e.child || (Zn(t) ? Ri(t) : null === e || e.memoizedState.isDehydrated && 0 === (256 & t.flags) || (t.flags |= 1024,
null !== Jn && (Ea(Jn),
Jn = null))),
bi(e, t),
Li(t),
null;
case 5:
mr(t),
n = dr(ur.current);
var i = t.type;
if (null !== e && null != t.stateNode)
_i(e, t, i, r, n),
e.ref !== t.ref && (t.flags |= 512,
t.flags |= 2097152);
else {
if (!r) {
if (null === t.stateNode)
throw Error(a(166));
return Li(t),
null
}
if (e = dr(lr.current),
Zn(t)) {
if (!Y)
throw Error(a(175));
e = He(t.stateNode, t.type, t.memoizedProps, n, e, t, !Wn),
t.updateQueue = e,
null !== e && Ri(t)
} else {
var s = F(i, r, n, e, t);
xi(s, t, !1, !1),
t.stateNode = s,
U(s, i, r, n, e) && Ri(t)
}
null !== t.ref && (t.flags |= 512,
t.flags |= 2097152)
}
return Li(t),
null;
case 6:
if (e && null != t.stateNode)
wi(e, t, e.memoizedProps, r);
else {
if ("string" !== typeof r && null === t.stateNode)
throw Error(a(166));
if (e = dr(ur.current),
n = dr(lr.current),
Zn(t)) {
if (!Y)
throw Error(a(176));
if (e = t.stateNode,
r = t.memoizedProps,
(n = Ve(e, r, t, !Wn)) && null !== (i = Gn))
switch (s = 0 !== (1 & i.mode),
i.tag) {
case 3:
Ze(i.stateNode.containerInfo, e, r, s);
break;
case 5:
$e(i.type, i.memoizedProps, i.stateNode, e, r, s)
}
n && Ri(t)
} else
t.stateNode = H(r, e, n, t)
}
return Li(t),
null;
case 13:
if (ot(gr),
r = t.memoizedState,
Vn && null !== Hn && 0 !== (1 & t.mode) && 0 === (128 & t.flags)) {
for (e = Hn; e; )
e = Oe(e);
return $n(),
t.flags |= 98560,
t
}
if (null !== r && null !== r.dehydrated) {
if (r = Zn(t),
null === e) {
if (!r)
throw Error(a(318));
if (!Y)
throw Error(a(344));
if (!(e = null !== (e = t.memoizedState) ? e.dehydrated : null))
throw Error(a(317));
We(e, t)
} else
$n(),
0 === (128 & t.flags) && (t.memoizedState = null),
t.flags |= 4;
return Li(t),
null
}
return null !== Jn && (Ea(Jn),
Jn = null),
0 !== (128 & t.flags) ? (t.lanes = n,
t) : (r = null !== r,
n = !1,
null === e ? Zn(t) : n = null !== e.memoizedState,
r && !n && (t.child.flags |= 8192,
0 !== (1 & t.mode) && (null === e || 0 !== (1 & gr.current) ? 0 === $s && ($s = 3) : Na())),
null !== t.updateQueue && (t.flags |= 4),
Li(t),
null);
case 4:
return pr(),
bi(e, t),
null === e && Z(t.stateNode.containerInfo),
Li(t),
null;
case 10:
return ln(t.type._context),
Li(t),
null;
case 19:
if (ot(gr),
null === (i = t.memoizedState))
return Li(t),
null;
if (r = 0 !== (128 & t.flags),
null === (s = i.rendering))
if (r)
ki(i, !1);
else {
if (0 !== $s || null !== e && 0 !== (128 & e.flags))
for (e = t.child; null !== e; ) {
if (null !== (s = vr(e))) {
for (t.flags |= 128,
ki(i, !1),
null !== (e = s.updateQueue) && (t.updateQueue = e,
t.flags |= 4),
t.subtreeFlags = 0,
e = n,
r = t.child; null !== r; )
i = e,
(n = r).flags &= 14680066,
null === (s = n.alternate) ? (n.childLanes = 0,
n.lanes = i,
n.child = null,
n.subtreeFlags = 0,
n.memoizedProps = null,
n.memoizedState = null,
n.updateQueue = null,
n.dependencies = null,
n.stateNode = null) : (n.childLanes = s.childLanes,
n.lanes = s.lanes,
n.child = s.child,
n.subtreeFlags = 0,
n.deletions = null,
n.memoizedProps = s.memoizedProps,
n.memoizedState = s.memoizedState,
n.updateQueue = s.updateQueue,
n.type = s.type,
i = s.dependencies,
n.dependencies = null === i ? null : {
lanes: i.lanes,
firstContext: i.firstContext
}),
r = r.sibling;
return lt(gr, 1 & gr.current | 2),
t.child
}
e = e.sibling
}
null !== i.tail && Ft() > oa && (t.flags |= 128,
r = !0,
ki(i, !1),
t.lanes = 4194304)
}
else {
if (!r)
if (null !== (e = vr(s))) {
if (t.flags |= 128,
r = !0,
null !== (e = e.updateQueue) && (t.updateQueue = e,
t.flags |= 4),
ki(i, !0),
null === i.tail && "hidden" === i.tailMode && !s.alternate && !Vn)
return Li(t),
null
} else
2 * Ft() - i.renderingStartTime > oa && 1073741824 !== n && (t.flags |= 128,
r = !0,
ki(i, !1),
t.lanes = 4194304);
i.isBackwards ? (s.sibling = t.child,
t.child = s) : (null !== (e = i.last) ? e.sibling = s : t.child = s,
i.last = s)
}
return null !== i.tail ? (t = i.tail,
i.rendering = t,
i.tail = t.sibling,
i.renderingStartTime = Ft(),
t.sibling = null,
e = gr.current,
lt(gr, r ? 1 & e | 2 : 1 & e),
t) : (Li(t),
null);
case 22:
case 23:
return Pa(),
r = null !== t.memoizedState,
null !== e && null !== e.memoizedState !== r && (t.flags |= 8192),
r && 0 !== (1 & t.mode) ? 0 !== (1073741824 & Qs) && (Li(t),
K && 6 & t.subtreeFlags && (t.flags |= 8192)) : Li(t),
null;
case 24:
case 25:
return null
}
throw Error(a(156, t.tag))
}
var Ni = o.ReactCurrentOwner
, Di = !1;
function ji(e, t, n, r) {
t.child = null === e ? ar(t, null, n, r) : sr(t, e.child, n, r)
}
function Fi(e, t, n, r, i) {
n = n.render;
var s = t.ref;
return un(t, i),
r = kr(e, t, n, r, s, i),
n = Lr(),
null === e || Di ? (Vn && n && Un(t),
t.flags |= 1,
ji(e, t, r, i),
t.child) : (t.updateQueue = e.updateQueue,
t.flags &= -2053,
e.lanes &= ~i,
is(e, t, i))
}
function Oi(e, t, n, r, i) {
if (null === e) {
var s = n.type;
return "function" !== typeof s || Za(s) || void 0 !== s.defaultProps || null !== n.compare || void 0 !== n.defaultProps ? ((e = eo(n.type, null, r, t, t.mode, i)).ref = t.ref,
e.return = t,
t.child = e) : (t.tag = 15,
t.type = s,
Ui(e, t, s, r, i))
}
if (s = e.child,
0 === (e.lanes & i)) {
var a = s.memoizedProps;
if ((n = null !== (n = n.compare) ? n : Zt)(a, r) && e.ref === t.ref)
return is(e, t, i)
}
return t.flags |= 1,
(e = $a(s, r)).ref = t.ref,
e.return = t,
t.child = e
}
function Ui(e, t, n, r, i) {
if (null !== e && Zt(e.memoizedProps, r) && e.ref === t.ref) {
if (Di = !1,
0 === (e.lanes & i))
return t.lanes = e.lanes,
is(e, t, i);
0 !== (131072 & e.flags) && (Di = !0)
}
return Hi(e, t, n, r, i)
}
function zi(e, t, n) {
var r = t.pendingProps
, i = r.children
, s = null !== e ? e.memoizedState : null;
if ("hidden" === r.mode)
if (0 === (1 & t.mode))
t.memoizedState = {
baseLanes: 0,
cachePool: null
},
lt(Zs, Qs),
Qs |= n;
else {
if (0 === (1073741824 & n))
return e = null !== s ? s.baseLanes | n : n,
t.lanes = t.childLanes = 1073741824,
t.memoizedState = {
baseLanes: e,
cachePool: null
},
t.updateQueue = null,
lt(Zs, Qs),
Qs |= e,
null;
t.memoizedState = {
baseLanes: 0,
cachePool: null
},
r = null !== s ? s.baseLanes : n,
lt(Zs, Qs),
Qs |= r
}
else
null !== s ? (r = s.baseLanes | n,
t.memoizedState = null) : r = n,
lt(Zs, Qs),
Qs |= r;
return ji(e, t, i, n),
t.child
}
function Gi(e, t) {
var n = t.ref;
(null === e && null !== n || null !== e && e.ref !== n) && (t.flags |= 512,
t.flags |= 2097152)
}
function Hi(e, t, n, r, i) {
var s = ft(n) ? ht : ut.current;
return s = pt(t, s),
un(t, i),
n = kr(e, t, n, r, s, i),
r = Lr(),
null === e || Di ? (Vn && r && Un(t),
t.flags |= 1,
ji(e, t, n, i),
t.child) : (t.updateQueue = e.updateQueue,
t.flags &= -2053,
e.lanes &= ~i,
is(e, t, i))
}
function Vi(e, t, n, r, i) {
if (ft(n)) {
var s = !0;
yt(t)
} else
s = !1;
if (un(t, i),
null === t.stateNode)
null !== e && (e.alternate = null,
t.alternate = null,
t.flags |= 2),
Cn(t, n, r),
Tn(t, n, r, i),
r = !0;
else if (null === e) {
var a = t.stateNode
, o = t.memoizedProps;
a.props = o;
var l = a.context
, c = n.contextType;
"object" === typeof c && null !== c ? c = dn(c) : c = pt(t, c = ft(n) ? ht : ut.current);
var u = n.getDerivedStateFromProps
, d = "function" === typeof u || "function" === typeof a.getSnapshotBeforeUpdate;
d || "function" !== typeof a.UNSAFE_componentWillReceiveProps && "function" !== typeof a.componentWillReceiveProps || (o !== r || l !== c) && En(t, a, r, c),
pn = !1;
var h = t.memoizedState;
a.state = h,
bn(t, r, a, i),
l = t.memoizedState,
o !== r || h !== l || dt.current || pn ? ("function" === typeof u && (Sn(t, n, u, r),
l = t.memoizedState),
(o = pn || Mn(t, n, o, r, h, l, c)) ? (d || "function" !== typeof a.UNSAFE_componentWillMount && "function" !== typeof a.componentWillMount || ("function" === typeof a.componentWillMount && a.componentWillMount(),
"function" === typeof a.UNSAFE_componentWillMount && a.UNSAFE_componentWillMount()),
"function" === typeof a.componentDidMount && (t.flags |= 4194308)) : ("function" === typeof a.componentDidMount && (t.flags |= 4194308),
t.memoizedProps = r,
t.memoizedState = l),
a.props = r,
a.state = l,
a.context = c,
r = o) : ("function" === typeof a.componentDidMount && (t.flags |= 4194308),
r = !1)
} else {
a = t.stateNode,
mn(e, t),
o = t.memoizedProps,
c = t.type === t.elementType ? o : en(t.type, o),
a.props = c,
d = t.pendingProps,
h = a.context,
"object" === typeof (l = n.contextType) && null !== l ? l = dn(l) : l = pt(t, l = ft(n) ? ht : ut.current);
var p = n.getDerivedStateFromProps;
(u = "function" === typeof p || "function" === typeof a.getSnapshotBeforeUpdate) || "function" !== typeof a.UNSAFE_componentWillReceiveProps && "function" !== typeof a.componentWillReceiveProps || (o !== d || h !== l) && En(t, a, r, l),
pn = !1,
h = t.memoizedState,
a.state = h,
bn(t, r, a, i);
var f = t.memoizedState;
o !== d || h !== f || dt.current || pn ? ("function" === typeof p && (Sn(t, n, p, r),
f = t.memoizedState),
(c = pn || Mn(t, n, c, r, h, f, l) || !1) ? (u || "function" !== typeof a.UNSAFE_componentWillUpdate && "function" !== typeof a.componentWillUpdate || ("function" === typeof a.componentWillUpdate && a.componentWillUpdate(r, f, l),
"function" === typeof a.UNSAFE_componentWillUpdate && a.UNSAFE_componentWillUpdate(r, f, l)),
"function" === typeof a.componentDidUpdate && (t.flags |= 4),
"function" === typeof a.getSnapshotBeforeUpdate && (t.flags |= 1024)) : ("function" !== typeof a.componentDidUpdate || o === e.memoizedProps && h === e.memoizedState || (t.flags |= 4),
"function" !== typeof a.getSnapshotBeforeUpdate || o === e.memoizedProps && h === e.memoizedState || (t.flags |= 1024),
t.memoizedProps = r,
t.memoizedState = f),
a.props = r,
a.state = f,
a.context = l,
r = c) : ("function" !== typeof a.componentDidUpdate || o === e.memoizedProps && h === e.memoizedState || (t.flags |= 4),
"function" !== typeof a.getSnapshotBeforeUpdate || o === e.memoizedProps && h === e.memoizedState || (t.flags |= 1024),
r = !1)
}
return Wi(e, t, n, r, s, i)
}
function Wi(e, t, n, r, i, s) {
Gi(e, t);
var a = 0 !== (128 & t.flags);
if (!r && !a)
return i && xt(t, n, !1),
is(e, t, s);
r = t.stateNode,
Ni.current = t;
var o = a && "function" !== typeof n.getDerivedStateFromError ? null : r.render();
return t.flags |= 1,
null !== e && a ? (t.child = sr(t, e.child, null, s),
t.child = sr(t, null, o, s)) : ji(e, t, o, s),
t.memoizedState = r.state,
i && xt(t, n, !0),
t.child
}
function Ji(e) {
var t = e.stateNode;
t.pendingContext ? gt(0, t.pendingContext, t.pendingContext !== t.context) : t.context && gt(0, t.context, !1),
hr(e, t.containerInfo)
}
function Xi(e, t, n, r, i) {
return $n(),
er(i),
t.flags |= 256,
ji(e, t, n, r),
t.child
}
var Ki = {
dehydrated: null,
treeContext: null,
retryLane: 0
};
function qi(e) {
return {
baseLanes: e,
cachePool: null
}
}
function Yi(e, t, n) {
var r, i = t.pendingProps, s = gr.current, o = !1, l = 0 !== (128 & t.flags);
if ((r = l) || (r = (null === e || null !== e.memoizedState) && 0 !== (2 & s)),
r ? (o = !0,
t.flags &= -129) : null !== e && null === e.memoizedState || (s |= 1),
lt(gr, 1 & s),
null === e)
return Yn(t),
null !== (e = t.memoizedState) && null !== (e = e.dehydrated) ? (0 === (1 & t.mode) ? t.lanes = 1 : je(e) ? t.lanes = 8 : t.lanes = 1073741824,
null) : (s = i.children,
e = i.fallback,
o ? (i = t.mode,
o = t.child,
s = {
mode: "hidden",
children: s
},
0 === (1 & i) && null !== o ? (o.childLanes = 0,
o.pendingProps = s) : o = no(s, i, 0, null),
e = to(e, i, n, null),
o.return = t,
e.return = t,
o.sibling = e,
t.child = o,
t.child.memoizedState = qi(n),
t.memoizedState = Ki,
e) : Qi(t, s));
if (null !== (s = e.memoizedState)) {
if (null !== (r = s.dehydrated)) {
if (l)
return 256 & t.flags ? (t.flags &= -257,
es(e, t, n, Error(a(422)))) : null !== t.memoizedState ? (t.child = e.child,
t.flags |= 128,
null) : (o = i.fallback,
s = t.mode,
i = no({
mode: "visible",
children: i.children
}, s, 0, null),
(o = to(o, s, n, null)).flags |= 2,
i.return = t,
o.return = t,
i.sibling = o,
t.child = i,
0 !== (1 & t.mode) && sr(t, e.child, null, n),
t.child.memoizedState = qi(n),
t.memoizedState = Ki,
o);
if (0 === (1 & t.mode))
t = es(e, t, n, null);
else if (je(r))
t = es(e, t, n, Error(a(419)));
else if (i = 0 !== (n & e.childLanes),
Di || i) {
if (null !== (i = Ks)) {
switch (n & -n) {
case 4:
o = 2;
break;
case 16:
o = 8;
break;
case 64:
case 128:
case 256:
case 512:
case 1024:
case 2048:
case 4096:
case 8192:
case 16384:
case 32768:
case 65536:
case 131072:
case 262144:
case 524288:
case 1048576:
case 2097152:
case 4194304:
case 8388608:
case 16777216:
case 33554432:
case 67108864:
o = 32;
break;
case 536870912:
o = 268435456;
break;
default:
o = 0
}
0 !== (i = 0 !== (o & (i.suspendedLanes | n)) ? 0 : o) && i !== s.retryLane && (s.retryLane = i,
wa(e, i, -1))
}
Na(),
t = es(e, t, n, Error(a(421)))
} else
De(r) ? (t.flags |= 128,
t.child = e.child,
t = Xa.bind(null, e),
Fe(r, t),
t = null) : (n = s.treeContext,
Y && (Hn = Ge(r),
Gn = t,
Vn = !0,
Jn = null,
Wn = !1,
null !== n && (Ln[In++] = Dn,
Ln[In++] = jn,
Ln[In++] = Nn,
Dn = n.id,
jn = n.overflow,
Nn = t)),
(t = Qi(t, t.pendingProps.children)).flags |= 4096);
return t
}
return o ? (i = $i(e, t, i.children, i.fallback, n),
o = t.child,
s = e.child.memoizedState,
o.memoizedState = null === s ? qi(n) : {
baseLanes: s.baseLanes | n,
cachePool: null
},
o.childLanes = e.childLanes & ~n,
t.memoizedState = Ki,
i) : (n = Zi(e, t, i.children, n),
t.memoizedState = null,
n)
}
return o ? (i = $i(e, t, i.children, i.fallback, n),
o = t.child,
s = e.child.memoizedState,
o.memoizedState = null === s ? qi(n) : {
baseLanes: s.baseLanes | n,
cachePool: null
},
o.childLanes = e.childLanes & ~n,
t.memoizedState = Ki,
i) : (n = Zi(e, t, i.children, n),
t.memoizedState = null,
n)
}
function Qi(e, t) {
return (t = no({
mode: "visible",
children: t
}, e.mode, 0, null)).return = e,
e.child = t
}
function Zi(e, t, n, r) {
var i = e.child;
return e = i.sibling,
n = $a(i, {
mode: "visible",
children: n
}),
0 === (1 & t.mode) && (n.lanes = r),
n.return = t,
n.sibling = null,
null !== e && (null === (r = t.deletions) ? (t.deletions = [e],
t.flags |= 16) : r.push(e)),
t.child = n
}
function $i(e, t, n, r, i) {
var s = t.mode
, a = (e = e.child).sibling
, o = {
mode: "hidden",
children: n
};
return 0 === (1 & s) && t.child !== e ? ((n = t.child).childLanes = 0,
n.pendingProps = o,
t.deletions = null) : (n = $a(e, o)).subtreeFlags = 14680064 & e.subtreeFlags,
null !== a ? r = $a(a, r) : (r = to(r, s, i, null)).flags |= 2,
r.return = t,
n.return = t,
n.sibling = r,
t.child = n,
r
}
function es(e, t, n, r) {
return null !== r && er(r),
sr(t, e.child, null, n),
(e = Qi(t, t.pendingProps.children)).flags |= 2,
t.memoizedState = null,
e
}
function ts(e, t, n) {
e.lanes |= t;
var r = e.alternate;
null !== r && (r.lanes |= t),
cn(e.return, t, n)
}
function ns(e, t, n, r, i) {
var s = e.memoizedState;
null === s ? e.memoizedState = {
isBackwards: t,
rendering: null,
renderingStartTime: 0,
last: r,
tail: n,
tailMode: i
} : (s.isBackwards = t,
s.rendering = null,
s.renderingStartTime = 0,
s.last = r,
s.tail = n,
s.tailMode = i)
}
function rs(e, t, n) {
var r = t.pendingProps
, i = r.revealOrder
, s = r.tail;
if (ji(e, t, r.children, n),
0 !== (2 & (r = gr.current)))
r = 1 & r | 2,
t.flags |= 128;
else {
if (null !== e && 0 !== (128 & e.flags))
e: for (e = t.child; null !== e; ) {
if (13 === e.tag)
null !== e.memoizedState && ts(e, n, t);
else if (19 === e.tag)
ts(e, n, t);
else if (null !== e.child) {
e.child.return = e,
e = e.child;
continue
}
if (e === t)
break e;
for (; null === e.sibling; ) {
if (null === e.return || e.return === t)
break e;
e = e.return
}
e.sibling.return = e.return,
e = e.sibling
}
r &= 1
}
if (lt(gr, r),
0 === (1 & t.mode))
t.memoizedState = null;
else
switch (i) {
case "forwards":
for (n = t.child,
i = null; null !== n; )
null !== (e = n.alternate) && null === vr(e) && (i = n),
n = n.sibling;
null === (n = i) ? (i = t.child,
t.child = null) : (i = n.sibling,
n.sibling = null),
ns(t, !1, i, n, s);
break;
case "backwards":
for (n = null,
i = t.child,
t.child = null; null !== i; ) {
if (null !== (e = i.alternate) && null === vr(e)) {
t.child = i;
break
}
e = i.sibling,
i.sibling = n,
n = i,
i = e
}
ns(t, !0, n, null, s);
break;
case "together":
ns(t, !1, null, null, void 0);
break;
default:
t.memoizedState = null
}
return t.child
}
function is(e, t, n) {
if (null !== e && (t.dependencies = e.dependencies),
ta |= t.lanes,
0 === (n & t.childLanes))
return null;
if (null !== e && t.child !== e.child)
throw Error(a(153));
if (null !== t.child) {
for (n = $a(e = t.child, e.pendingProps),
t.child = n,
n.return = t; null !== e.sibling; )
e = e.sibling,
(n = n.sibling = $a(e, e.pendingProps)).return = t;
n.sibling = null
}
return t.child
}
function ss(e, t) {
switch (zn(t),
t.tag) {
case 1:
return ft(t.type) && mt(),
65536 & (e = t.flags) ? (t.flags = -65537 & e | 128,
t) : null;
case 3:
return pr(),
ot(dt),
ot(ut),
xr(),
0 !== (65536 & (e = t.flags)) && 0 === (128 & e) ? (t.flags = -65537 & e | 128,
t) : null;
case 5:
return mr(t),
null;
case 13:
if (ot(gr),
null !== (e = t.memoizedState) && null !== e.dehydrated) {
if (null === t.alternate)
throw Error(a(340));
$n()
}
return 65536 & (e = t.flags) ? (t.flags = -65537 & e | 128,
t) : null;
case 19:
return ot(gr),
null;
case 4:
return pr(),
null;
case 10:
return ln(t.type._context),
null;
case 22:
case 23:
return Pa(),
null;
default:
return null
}
}
var as = !1
, os = !1
, ls = "function" === typeof WeakSet ? WeakSet : Set
, cs = null;
function us(e, t) {
var n = e.ref;
if (null !== n)
if ("function" === typeof n)
try {
n(null)
} catch (r) {
Va(e, t, r)
}
else
n.current = null
}
function ds(e, t, n) {
try {
n()
} catch (r) {
Va(e, t, r)
}
}
var hs = !1;
function ps(e, t, n) {
var r = t.updateQueue;
if (null !== (r = null !== r ? r.lastEffect : null)) {
var i = r = r.next;
do {
if ((i.tag & e) === e) {
var s = i.destroy;
i.destroy = void 0,
void 0 !== s && ds(t, n, s)
}
i = i.next
} while (i !== r)
}
}
function fs(e, t) {
if (null !== (t = null !== (t = t.updateQueue) ? t.lastEffect : null)) {
var n = t = t.next;
do {
if ((n.tag & e) === e) {
var r = n.create;
n.destroy = r()
}
n = n.next
} while (n !== t)
}
}
function ms(e) {
var t = e.ref;
if (null !== t) {
var n = e.stateNode;
if (5 === e.tag)
e = L(n);
else
e = n;
"function" === typeof t ? t(e) : t.current = e
}
}
function gs(e, t, n) {
if (Vt && "function" === typeof Vt.onCommitFiberUnmount)
try {
Vt.onCommitFiberUnmount(Ht, t)
} catch (a) {}
switch (t.tag) {
case 0:
case 11:
case 14:
case 15:
if (null !== (e = t.updateQueue) && null !== (e = e.lastEffect)) {
var r = e = e.next;
do {
var i = r
, s = i.destroy;
i = i.tag,
void 0 !== s && (0 !== (2 & i) || 0 !== (4 & i)) && ds(t, n, s),
r = r.next
} while (r !== e)
}
break;
case 1:
if (us(t, n),
"function" === typeof (e = t.stateNode).componentWillUnmount)
try {
e.props = t.memoizedProps,
e.state = t.memoizedState,
e.componentWillUnmount()
} catch (a) {
Va(t, n, a)
}
break;
case 5:
us(t, n);
break;
case 4:
K ? As(e, t, n) : q && q && (t = t.stateNode.containerInfo,
n = Ee(t),
Be(t, n))
}
}
function vs(e, t, n) {
for (var r = t; ; )
if (gs(e, r, n),
null === r.child || K && 4 === r.tag) {
if (r === t)
break;
for (; null === r.sibling; ) {
if (null === r.return || r.return === t)
return;
r = r.return
}
r.sibling.return = r.return,
r = r.sibling
} else
r.child.return = r,
r = r.child
}
function ys(e) {
var t = e.alternate;
null !== t && (e.alternate = null,
ys(t)),
e.child = null,
e.deletions = null,
e.sibling = null,
5 === e.tag && (null !== (t = e.stateNode) && ee(t)),
e.stateNode = null,
e.return = null,
e.dependencies = null,
e.memoizedProps = null,
e.memoizedState = null,
e.pendingProps = null,
e.stateNode = null,
e.updateQueue = null
}
function xs(e) {
return 5 === e.tag || 3 === e.tag || 4 === e.tag
}
function bs(e) {
e: for (; ; ) {
for (; null === e.sibling; ) {
if (null === e.return || xs(e.return))
return null;
e = e.return
}
for (e.sibling.return = e.return,
e = e.sibling; 5 !== e.tag && 6 !== e.tag && 18 !== e.tag; ) {
if (2 & e.flags)
continue e;
if (null === e.child || 4 === e.tag)
continue e;
e.child.return = e,
e = e.child
}
if (!(2 & e.flags))
return e.stateNode
}
}
function _s(e) {
if (K) {
e: {
for (var t = e.return; null !== t; ) {
if (xs(t))
break e;
t = t.return
}
throw Error(a(160))
}
var n = t;
switch (n.tag) {
case 5:
t = n.stateNode,
32 & n.flags && (be(t),
n.flags &= -33),
Ss(e, n = bs(e), t);
break;
case 3:
case 4:
t = n.stateNode.containerInfo,
ws(e, n = bs(e), t);
break;
default:
throw Error(a(161))
}
}
}
function ws(e, t, n) {
var r = e.tag;
if (5 === r || 6 === r)
e = e.stateNode,
t ? ve(n, e, t) : he(n, e);
else if (4 !== r && null !== (e = e.child))
for (ws(e, t, n),
e = e.sibling; null !== e; )
ws(e, t, n),
e = e.sibling
}
function Ss(e, t, n) {
var r = e.tag;
if (5 === r || 6 === r)
e = e.stateNode,
t ? ge(n, e, t) : de(n, e);
else if (4 !== r && null !== (e = e.child))
for (Ss(e, t, n),
e = e.sibling; null !== e; )
Ss(e, t, n),
e = e.sibling
}
function As(e, t, n) {
for (var r, i, s = t, o = !1; ; ) {
if (!o) {
o = s.return;
e: for (; ; ) {
if (null === o)
throw Error(a(160));
switch (r = o.stateNode,
o.tag) {
case 5:
i = !1;
break e;
case 3:
case 4:
r = r.containerInfo,
i = !0;
break e
}
o = o.return
}
o = !0
}
if (5 === s.tag || 6 === s.tag)
vs(e, s, n),
i ? xe(r, s.stateNode) : ye(r, s.stateNode);
else if (18 === s.tag)
i ? Ye(r, s.stateNode) : qe(r, s.stateNode);
else if (4 === s.tag) {
if (null !== s.child) {
r = s.stateNode.containerInfo,
i = !0,
s.child.return = s,
s = s.child;
continue
}
} else if (gs(e, s, n),
null !== s.child) {
s.child.return = s,
s = s.child;
continue
}
if (s === t)
break;
for (; null === s.sibling; ) {
if (null === s.return || s.return === t)
return;
4 === (s = s.return).tag && (o = !1)
}
s.sibling.return = s.return,
s = s.sibling
}
}
function Ms(e, t) {
if (K) {
switch (t.tag) {
case 0:
case 11:
case 14:
case 15:
return ps(3, t, t.return),
fs(3, t),
void ps(5, t, t.return);
case 1:
case 12:
case 17:
return;
case 5:
var n = t.stateNode;
if (null != n) {
var r = t.memoizedProps;
e = null !== e ? e.memoizedProps : r;
var i = t.type
, s = t.updateQueue;
t.updateQueue = null,
null !== s && me(n, s, i, e, r, t)
}
return;
case 6:
if (null === t.stateNode)
throw Error(a(162));
return n = t.memoizedProps,
void pe(t.stateNode, null !== e ? e.memoizedProps : n, n);
case 3:
return void (Y && null !== e && e.memoizedState.isDehydrated && Xe(t.stateNode.containerInfo));
case 13:
case 19:
return void Cs(t)
}
throw Error(a(163))
}
switch (t.tag) {
case 0:
case 11:
case 14:
case 15:
return ps(3, t, t.return),
fs(3, t),
void ps(5, t, t.return);
case 12:
case 22:
case 23:
return;
case 13:
case 19:
return void Cs(t);
case 3:
Y && null !== e && e.memoizedState.isDehydrated && Xe(t.stateNode.containerInfo)
}
e: if (q) {
switch (t.tag) {
case 1:
case 5:
case 6:
break e;
case 3:
case 4:
t = t.stateNode,
Be(t.containerInfo, t.pendingChildren);
break e
}
throw Error(a(163))
}
}
function Cs(e) {
var t = e.updateQueue;
if (null !== t) {
e.updateQueue = null;
var n = e.stateNode;
null === n && (n = e.stateNode = new ls),
t.forEach((function(t) {
var r = Ka.bind(null, e, t);
n.has(t) || (n.add(t),
t.then(r, r))
}
))
}
}
function Es(e, t, n) {
cs = e,
Ts(e, t, n)
}
function Ts(e, t, n) {
for (var r = 0 !== (1 & e.mode); null !== cs; ) {
var i = cs
, s = i.child;
if (22 === i.tag && r) {
var a = null !== i.memoizedState || as;
if (!a) {
var o = i.alternate
, l = null !== o && null !== o.memoizedState || os;
o = as;
var c = os;
if (as = a,
(os = l) && !c)
for (cs = i; null !== cs; )
l = (a = cs).child,
22 === a.tag && null !== a.memoizedState ? Ps(i) : null !== l ? (l.return = a,
cs = l) : Ps(i);
for (; null !== s; )
cs = s,
Ts(s, t, n),
s = s.sibling;
cs = i,
as = o,
os = c
}
Rs(e)
} else
0 !== (8772 & i.subtreeFlags) && null !== s ? (s.return = i,
cs = s) : Rs(e)
}
}
function Rs(e) {
for (; null !== cs; ) {
var t = cs;
if (0 !== (8772 & t.flags)) {
var n = t.alternate;
try {
if (0 !== (8772 & t.flags))
switch (t.tag) {
case 0:
case 11:
case 15:
os || fs(5, t);
break;
case 1:
var r = t.stateNode;
if (4 & t.flags && !os)
if (null === n)
r.componentDidMount();
else {
var i = t.elementType === t.type ? n.memoizedProps : en(t.type, n.memoizedProps);
r.componentDidUpdate(i, n.memoizedState, r.__reactInternalSnapshotBeforeUpdate)
}
var s = t.updateQueue;
null !== s && _n(t, s, r);
break;
case 3:
var o = t.updateQueue;
if (null !== o) {
if (n = null,
null !== t.child)
switch (t.child.tag) {
case 5:
n = L(t.child.stateNode);
break;
case 1:
n = t.child.stateNode
}
_n(t, o, n)
}
break;
case 5:
var l = t.stateNode;
null === n && 4 & t.flags && fe(l, t.type, t.memoizedProps, t);
break;
case 6:
case 4:
case 12:
case 19:
case 17:
case 21:
case 22:
case 23:
break;
case 13:
if (Y && null === t.memoizedState) {
var c = t.alternate;
if (null !== c) {
var u = c.memoizedState;
if (null !== u) {
var d = u.dehydrated;
null !== d && Ke(d)
}
}
}
break;
default:
throw Error(a(163))
}
os || 512 & t.flags && ms(t)
} catch (h) {
Va(t, t.return, h)
}
}
if (t === e) {
cs = null;
break
}
if (null !== (n = t.sibling)) {
n.return = t.return,
cs = n;
break
}
cs = t.return
}
}
function Bs(e) {
for (; null !== cs; ) {
var t = cs;
if (t === e) {
cs = null;
break
}
var n = t.sibling;
if (null !== n) {
n.return = t.return,
cs = n;
break
}
cs = t.return
}
}
function Ps(e) {
for (; null !== cs; ) {
var t = cs;
try {
switch (t.tag) {
case 0:
case 11:
case 15:
var n = t.return;
try {
fs(4, t)
} catch (l) {
Va(t, n, l)
}
break;
case 1:
var r = t.stateNode;
if ("function" === typeof r.componentDidMount) {
var i = t.return;
try {
r.componentDidMount()
} catch (l) {
Va(t, i, l)
}
}
var s = t.return;
try {
ms(t)
} catch (l) {
Va(t, s, l)
}
break;
case 5:
var a = t.return;
try {
ms(t)
} catch (l) {
Va(t, a, l)
}
}
} catch (l) {
Va(t, t.return, l)
}
if (t === e) {
cs = null;
break
}
var o = t.sibling;
if (null !== o) {
o.return = t.return,
cs = o;
break
}
cs = t.return
}
}
var ks = 0
, Ls = 1
, Is = 2
, Ns = 3
, Ds = 4;
if ("function" === typeof Symbol && Symbol.for) {
var js = Symbol.for;
ks = js("selector.component"),
Ls = js("selector.has_pseudo_class"),
Is = js("selector.role"),
Ns = js("selector.test_id"),
Ds = js("selector.text")
}
function Fs(e) {
var t = Q(e);
if (null != t) {
if ("string" !== typeof t.memoizedProps["data-testname"])
throw Error(a(364));
return t
}
if (null === (e = ie(e)))
throw Error(a(362));
return e.stateNode.current
}
function Os(e, t) {
switch (t.$$typeof) {
case ks:
if (e.type === t.value)
return !0;
break;
case Ls:
e: {
t = t.value,
e = [e, 0];
for (var n = 0; n < e.length; ) {
var r = e[n++]
, i = e[n++]
, s = t[i];
if (5 !== r.tag || !oe(r)) {
for (; null != s && Os(r, s); )
s = t[++i];
if (i === t.length) {
t = !0;
break e
}
for (r = r.child; null !== r; )
e.push(r, i),
r = r.sibling
}
}
t = !1
}
return t;
case Is:
if (5 === e.tag && le(e.stateNode, t.value))
return !0;
break;
case Ds:
if ((5 === e.tag || 6 === e.tag) && (null !== (e = ae(e)) && 0 <= e.indexOf(t.value)))
return !0;
break;
case Ns:
if (5 === e.tag && ("string" === typeof (e = e.memoizedProps["data-testname"]) && e.toLowerCase() === t.value.toLowerCase()))
return !0;
break;
default:
throw Error(a(365))
}
return !1
}
function Us(e) {
switch (e.$$typeof) {
case ks:
return "<" + (S(e.value) || "Unknown") + ">";
case Ls:
return ":has(" + (Us(e) || "") + ")";
case Is:
return '[role="' + e.value + '"]';
case Ds:
return '"' + e.value + '"';
case Ns:
return '[data-testname="' + e.value + '"]';
default:
throw Error(a(365))
}
}
function zs(e, t) {
var n = [];
e = [e, 0];
for (var r = 0; r < e.length; ) {
var i = e[r++]
, s = e[r++]
, a = t[s];
if (5 !== i.tag || !oe(i)) {
for (; null != a && Os(i, a); )
a = t[++s];
if (s === t.length)
n.push(i);
else
for (i = i.child; null !== i; )
e.push(i, s),
i = i.sibling
}
}
return n
}
function Gs(e, t) {
if (!re)
throw Error(a(363));
e = zs(e = Fs(e), t),
t = [],
e = Array.from(e);
for (var n = 0; n < e.length; ) {
var r = e[n++];
if (5 === r.tag)
oe(r) || t.push(r.stateNode);
else
for (r = r.child; null !== r; )
e.push(r),
r = r.sibling
}
return t
}
var Hs = Math.ceil
, Vs = o.ReactCurrentDispatcher
, Ws = o.ReactCurrentOwner
, Js = o.ReactCurrentBatchConfig
, Xs = 0
, Ks = null
, qs = null
, Ys = 0
, Qs = 0
, Zs = at(0)
, $s = 0
, ea = null
, ta = 0
, na = 0
, ra = 0
, ia = null
, sa = null
, aa = 0
, oa = 1 / 0;
function la() {
oa = Ft() + 500
}
var ca, ua = !1, da = null, ha = null, pa = !1, fa = null, ma = 0, ga = 0, va = null, ya = -1, xa = 0;
function ba() {
return 0 !== (6 & Xs) ? Ft() : -1 !== ya ? ya : ya = Ft()
}
function _a(e) {
return 0 === (1 & e.mode) ? 1 : 0 !== (2 & Xs) && 0 !== Ys ? Ys & -Ys : null !== Qt.transition ? (0 === xa && (e = St,
0 === (4194240 & (St <<= 1)) && (St = 64),
xa = e),
xa) : 0 !== (e = kt) ? e : $()
}
function wa(e, t, n) {
if (50 < ga)
throw ga = 0,
va = null,
Error(a(185));
var r = Sa(e, t);
return null === r ? null : (Bt(r, t, n),
0 !== (2 & Xs) && r === Ks || (r === Ks && (0 === (2 & Xs) && (na |= t),
4 === $s && Ta(r, Ys)),
Aa(r, n),
1 === t && 0 === Xs && 0 === (1 & e.mode) && (la(),
Xt && Yt())),
r)
}
function Sa(e, t) {
e.lanes |= t;
var n = e.alternate;
for (null !== n && (n.lanes |= t),
n = e,
e = e.return; null !== e; )
e.childLanes |= t,
null !== (n = e.alternate) && (n.childLanes |= t),
n = e,
e = e.return;
return 3 === n.tag ? n.stateNode : null
}
function Aa(e, t) {
var n = e.callbackNode;
!function(e, t) {
for (var n = e.suspendedLanes, r = e.pingedLanes, i = e.expirationTimes, s = e.pendingLanes; 0 < s; ) {
var a = 31 - bt(s)
, o = 1 << a
, l = i[a];
-1 === l ? 0 !== (o & n) && 0 === (o & r) || (i[a] = Et(o, t)) : l <= t && (e.expiredLanes |= o),
s &= ~o
}
}(e, t);
var r = Ct(e, e === Ks ? Ys : 0);
if (0 === r)
null !== n && Nt(n),
e.callbackNode = null,
e.callbackPriority = 0;
else if (t = r & -r,
e.callbackPriority !== t) {
if (null != n && Nt(n),
1 === t)
0 === e.tag ? function(e) {
Xt = !0,
qt(e)
}(Ra.bind(null, e)) : qt(Ra.bind(null, e)),
te ? ne((function() {
0 === Xs && Yt()
}
)) : It(Ot, Yt),
n = null;
else {
switch (Lt(r)) {
case 1:
n = Ot;
break;
case 4:
n = Ut;
break;
case 16:
default:
n = zt;
break;
case 536870912:
n = Gt
}
n = qa(n, Ma.bind(null, e))
}
e.callbackPriority = t,
e.callbackNode = n
}
}
function Ma(e, t) {
if (ya = -1,
xa = 0,
0 !== (6 & Xs))
throw Error(a(327));
var n = e.callbackNode;
if (Ga() && e.callbackNode !== n)
return null;
var r = Ct(e, e === Ks ? Ys : 0);
if (0 === r)
return null;
if (0 !== (30 & r) || 0 !== (r & e.expiredLanes) || t)
t = Da(e, r);
else {
t = r;
var i = Xs;
Xs |= 2;
var s = Ia();
for (Ks === e && Ys === t || (la(),
ka(e, t)); ; )
try {
Fa();
break
} catch (l) {
La(e, l)
}
an(),
Vs.current = s,
Xs = i,
null !== qs ? t = 0 : (Ks = null,
Ys = 0,
t = $s)
}
if (0 !== t) {
if (2 === t && (0 !== (i = Tt(e)) && (r = i,
t = Ca(e, i))),
1 === t)
throw n = ea,
ka(e, 0),
Ta(e, r),
Aa(e, Ft()),
n;
if (6 === t)
Ta(e, r);
else {
if (i = e.current.alternate,
0 === (30 & r) && !function(e) {
for (var t = e; ; ) {
if (16384 & t.flags) {
var n = t.updateQueue;
if (null !== n && null !== (n = n.stores))
for (var r = 0; r < n.length; r++) {
var i = n[r]
, s = i.getSnapshot;
i = i.value;
try {
if (!Wt(s(), i))
return !1
} catch (o) {
return !1
}
}
}
if (n = t.child,
16384 & t.subtreeFlags && null !== n)
n.return = t,
t = n;
else {
if (t === e)
break;
for (; null === t.sibling; ) {
if (null === t.return || t.return === e)
return !0;
t = t.return
}
t.sibling.return = t.return,
t = t.sibling
}
}
return !0
}(i) && (2 === (t = Da(e, r)) && (0 !== (s = Tt(e)) && (r = s,
t = Ca(e, s))),
1 === t))
throw n = ea,
ka(e, 0),
Ta(e, r),
Aa(e, Ft()),
n;
switch (e.finishedWork = i,
e.finishedLanes = r,
t) {
case 0:
case 1:
throw Error(a(345));
case 2:
case 5:
za(e, sa);
break;
case 3:
if (Ta(e, r),
(130023424 & r) === r && 10 < (t = aa + 500 - Ft())) {
if (0 !== Ct(e, 0))
break;
if (((i = e.suspendedLanes) & r) !== r) {
ba(),
e.pingedLanes |= e.suspendedLanes & i;
break
}
e.timeoutHandle = V(za.bind(null, e, sa), t);
break
}
za(e, sa);
break;
case 4:
if (Ta(e, r),
(4194240 & r) === r)
break;
for (t = e.eventTimes,
i = -1; 0 < r; ) {
var o = 31 - bt(r);
s = 1 << o,
(o = t[o]) > i && (i = o),
r &= ~s
}
if (r = i,
10 < (r = (120 > (r = Ft() - r) ? 120 : 480 > r ? 480 : 1080 > r ? 1080 : 1920 > r ? 1920 : 3e3 > r ? 3e3 : 4320 > r ? 4320 : 1960 * Hs(r / 1960)) - r)) {
e.timeoutHandle = V(za.bind(null, e, sa), r);
break
}
za(e, sa);
break;
default:
throw Error(a(329))
}
}
}
return Aa(e, Ft()),
e.callbackNode === n ? Ma.bind(null, e) : null
}
function Ca(e, t) {
var n = ia;
return e.current.memoizedState.isDehydrated && (ka(e, t).flags |= 256),
2 !== (e = Da(e, t)) && (t = sa,
sa = n,
null !== t && Ea(t)),
e
}
function Ea(e) {
null === sa ? sa = e : sa.push.apply(sa, e)
}
function Ta(e, t) {
for (t &= ~ra,
t &= ~na,
e.suspendedLanes |= t,
e.pingedLanes &= ~t,
e = e.expirationTimes; 0 < t; ) {
var n = 31 - bt(t)
, r = 1 << n;
e[n] = -1,
t &= ~r
}
}
function Ra(e) {
if (0 !== (6 & Xs))
throw Error(a(327));
Ga();
var t = Ct(e, 0);
if (0 === (1 & t))
return Aa(e, Ft()),
null;
var n = Da(e, t);
if (0 !== e.tag && 2 === n) {
var r = Tt(e);
0 !== r && (t = r,
n = Ca(e, r))
}
if (1 === n)
throw n = ea,
ka(e, 0),
Ta(e, t),
Aa(e, Ft()),
n;
if (6 === n)
throw Error(a(345));
return e.finishedWork = e.current.alternate,
e.finishedLanes = t,
za(e, sa),
Aa(e, Ft()),
null
}
function Ba(e) {
null !== fa && 0 === fa.tag && 0 === (6 & Xs) && Ga();
var t = Xs;
Xs |= 1;
var n = Js.transition
, r = kt;
try {
if (Js.transition = null,
kt = 1,
e)
return e()
} finally {
kt = r,
Js.transition = n,
0 === (6 & (Xs = t)) && Yt()
}
}
function Pa() {
Qs = Zs.current,
ot(Zs)
}
function ka(e, t) {
e.finishedWork = null,
e.finishedLanes = 0;
var n = e.timeoutHandle;
if (n !== J && (e.timeoutHandle = J,
W(n)),
null !== qs)
for (n = qs.return; null !== n; ) {
var r = n;
switch (zn(r),
r.tag) {
case 1:
null !== (r = r.type.childContextTypes) && void 0 !== r && mt();
break;
case 3:
pr(),
ot(dt),
ot(ut),
xr();
break;
case 5:
mr(r);
break;
case 4:
pr();
break;
case 13:
case 19:
ot(gr);
break;
case 10:
ln(r.type._context);
break;
case 22:
case 23:
Pa()
}
n = n.return
}
if (Ks = e,
qs = e = $a(e.current, null),
Ys = Qs = t,
$s = 0,
ea = null,
ra = na = ta = 0,
sa = ia = null,
null !== hn) {
for (t = 0; t < hn.length; t++)
if (null !== (r = (n = hn[t]).interleaved)) {
n.interleaved = null;
var i = r.next
, s = n.pending;
if (null !== s) {
var a = s.next;
s.next = i,
r.next = a
}
n.pending = r
}
hn = null
}
return e
}
function La(e, t) {
for (; ; ) {
var n = qs;
try {
if (an(),
br.current = pi,
Cr) {
for (var r = Sr.memoizedState; null !== r; ) {
var i = r.queue;
null !== i && (i.pending = null),
r = r.next
}
Cr = !1
}
if (wr = 0,
Mr = Ar = Sr = null,
Er = !1,
Tr = 0,
Ws.current = null,
null === n || null === n.return) {
$s = 1,
ea = t,
qs = null;
break
}
e: {
var s = e
, o = n.return
, l = n
, c = t;
if (t = Ys,
l.flags |= 32768,
null !== c && "object" === typeof c && "function" === typeof c.then) {
var u = c
, d = l
, h = d.tag;
if (0 === (1 & d.mode) && (0 === h || 11 === h || 15 === h)) {
var p = d.alternate;
p ? (d.updateQueue = p.updateQueue,
d.memoizedState = p.memoizedState,
d.lanes = p.lanes) : (d.updateQueue = null,
d.memoizedState = null)
}
var f = Ei(o);
if (null !== f) {
f.flags &= -257,
Ti(f, o, l, 0, t),
1 & f.mode && Ci(s, u, t),
c = u;
var m = (t = f).updateQueue;
if (null === m) {
var g = new Set;
g.add(c),
t.updateQueue = g
} else
m.add(c);
break e
}
if (0 === (1 & t)) {
Ci(s, u, t),
Na();
break e
}
c = Error(a(426))
} else if (Vn && 1 & l.mode) {
var v = Ei(o);
if (null !== v) {
0 === (65536 & v.flags) && (v.flags |= 256),
Ti(v, o, l, 0, t),
er(c);
break e
}
}
s = c,
4 !== $s && ($s = 2),
null === ia ? ia = [s] : ia.push(s),
c = vi(c, l),
l = o;
do {
switch (l.tag) {
case 3:
l.flags |= 65536,
t &= -t,
l.lanes |= t,
xn(l, Ai(0, c, t));
break e;
case 1:
s = c;
var y = l.type
, x = l.stateNode;
if (0 === (128 & l.flags) && ("function" === typeof y.getDerivedStateFromError || null !== x && "function" === typeof x.componentDidCatch && (null === ha || !ha.has(x)))) {
l.flags |= 65536,
t &= -t,
l.lanes |= t,
xn(l, Mi(l, s, t));
break e
}
}
l = l.return
} while (null !== l)
}
Ua(n)
} catch (b) {
t = b,
qs === n && null !== n && (qs = n = n.return);
continue
}
break
}
}
function Ia() {
var e = Vs.current;
return Vs.current = pi,
null === e ? pi : e
}
function Na() {
0 !== $s && 3 !== $s && 2 !== $s || ($s = 4),
null === Ks || 0 === (268435455 & ta) && 0 === (268435455 & na) || Ta(Ks, Ys)
}
function Da(e, t) {
var n = Xs;
Xs |= 2;
var r = Ia();
for (Ks === e && Ys === t || ka(e, t); ; )
try {
ja();
break
} catch (i) {
La(e, i)
}
if (an(),
Xs = n,
Vs.current = r,
null !== qs)
throw Error(a(261));
return Ks = null,
Ys = 0,
$s
}
function ja() {
for (; null !== qs; )
Oa(qs)
}
function Fa() {
for (; null !== qs && !Dt(); )
Oa(qs)
}
function Oa(e) {
var t = ca(e.alternate, e, Qs);
e.memoizedProps = e.pendingProps,
null === t ? Ua(e) : qs = t,
Ws.current = null
}
function Ua(e) {
var t = e;
do {
var n = t.alternate;
if (e = t.return,
0 === (32768 & t.flags)) {
if (null !== (n = Ii(n, t, Qs)))
return void (qs = n)
} else {
if (null !== (n = ss(n, t)))
return n.flags &= 32767,
void (qs = n);
if (null === e)
return $s = 6,
void (qs = null);
e.flags |= 32768,
e.subtreeFlags = 0,
e.deletions = null
}
if (null !== (t = t.sibling))
return void (qs = t);
qs = t = e
} while (null !== t);
0 === $s && ($s = 5)
}
function za(e, t) {
var n = kt
, r = Js.transition;
try {
Js.transition = null,
kt = 1,
function(e, t, n) {
do {
Ga()
} while (null !== fa);
if (0 !== (6 & Xs))
throw Error(a(327));
var r = e.finishedWork
, i = e.finishedLanes;
if (null === r)
return null;
if (e.finishedWork = null,
e.finishedLanes = 0,
r === e.current)
throw Error(a(177));
e.callbackNode = null,
e.callbackPriority = 0;
var s = r.lanes | r.childLanes;
if (function(e, t) {
var n = e.pendingLanes & ~t;
e.pendingLanes = t,
e.suspendedLanes = 0,
e.pingedLanes = 0,
e.expiredLanes &= t,
e.mutableReadLanes &= t,
e.entangledLanes &= t,
t = e.entanglements;
var r = e.eventTimes;
for (e = e.expirationTimes; 0 < n; ) {
var i = 31 - bt(n)
, s = 1 << i;
t[i] = 0,
r[i] = -1,
e[i] = -1,
n &= ~s
}
}(e, s),
e === Ks && (qs = Ks = null,
Ys = 0),
0 === (2064 & r.subtreeFlags) && 0 === (2064 & r.flags) || pa || (pa = !0,
qa(zt, (function() {
return Ga(),
null
}
))),
s = 0 !== (15990 & r.flags),
0 !== (15990 & r.subtreeFlags) || s) {
s = Js.transition,
Js.transition = null;
var o = kt;
kt = 1;
var l = Xs;
Xs |= 4,
Ws.current = null,
function(e, t) {
for (D(e.containerInfo),
cs = t; null !== cs; )
if (t = (e = cs).child,
0 !== (1028 & e.subtreeFlags) && null !== t)
t.return = e,
cs = t;
else
for (; null !== cs; ) {
e = cs;
try {
var n = e.alternate;
if (0 !== (1024 & e.flags))
switch (e.tag) {
case 0:
case 11:
case 15:
case 5:
case 6:
case 4:
case 17:
break;
case 1:
if (null !== n) {
var r = n.memoizedProps
, i = n.memoizedState
, s = e.stateNode
, o = s.getSnapshotBeforeUpdate(e.elementType === e.type ? r : en(e.type, r), i);
s.__reactInternalSnapshotBeforeUpdate = o
}
break;
case 3:
K && Me(e.stateNode.containerInfo);
break;
default:
throw Error(a(163))
}
} catch (l) {
Va(e, e.return, l)
}
if (null !== (t = e.sibling)) {
t.return = e.return,
cs = t;
break
}
cs = e.return
}
n = hs,
hs = !1
}(e, r),
function(e, t) {
for (cs = t; null !== cs; ) {
var n = (t = cs).deletions;
if (null !== n)
for (var r = 0; r < n.length; r++) {
var i = n[r];
try {
var s = e;
K ? As(s, i, t) : vs(s, i, t);
var a = i.alternate;
null !== a && (a.return = null),
i.return = null
} catch (_) {
Va(i, t, _)
}
}
if (n = t.child,
0 !== (12854 & t.subtreeFlags) && null !== n)
n.return = t,
cs = n;
else
for (; null !== cs; ) {
t = cs;
try {
var o = t.flags;
if (32 & o && K && be(t.stateNode),
512 & o) {
var l = t.alternate;
if (null !== l) {
var c = l.ref;
null !== c && ("function" === typeof c ? c(null) : c.current = null)
}
}
if (8192 & o)
switch (t.tag) {
case 13:
if (null !== t.memoizedState) {
var u = t.alternate;
null !== u && null !== u.memoizedState || (aa = Ft())
}
break;
case 22:
var d = null !== t.memoizedState
, h = t.alternate
, p = null !== h && null !== h.memoizedState;
if (n = t,
K)
e: if (r = n,
i = d,
s = null,
K)
for (var f = r; ; ) {
if (5 === f.tag) {
if (null === s) {
s = f;
var m = f.stateNode;
i ? _e(m) : Se(f.stateNode, f.memoizedProps)
}
} else if (6 === f.tag) {
if (null === s) {
var g = f.stateNode;
i ? we(g) : Ae(g, f.memoizedProps)
}
} else if ((22 !== f.tag && 23 !== f.tag || null === f.memoizedState || f === r) && null !== f.child) {
f.child.return = f,
f = f.child;
continue
}
if (f === r)
break;
for (; null === f.sibling; ) {
if (null === f.return || f.return === r)
break e;
s === f && (s = null),
f = f.return
}
s === f && (s = null),
f.sibling.return = f.return,
f = f.sibling
}
if (d && !p && 0 !== (1 & n.mode)) {
cs = n;
for (var v = n.child; null !== v; ) {
for (n = cs = v; null !== cs; ) {
var y = (r = cs).child;
switch (r.tag) {
case 0:
case 11:
case 14:
case 15:
ps(4, r, r.return);
break;
case 1:
us(r, r.return);
var x = r.stateNode;
if ("function" === typeof x.componentWillUnmount) {
var b = r.return;
try {
x.props = r.memoizedProps,
x.state = r.memoizedState,
x.componentWillUnmount()
} catch (_) {
Va(r, b, _)
}
}
break;
case 5:
us(r, r.return);
break;
case 22:
if (null !== r.memoizedState) {
Bs(n);
continue
}
}
null !== y ? (y.return = r,
cs = y) : Bs(n)
}
v = v.sibling
}
}
}
switch (4102 & o) {
case 2:
_s(t),
t.flags &= -3;
break;
case 6:
_s(t),
t.flags &= -3,
Ms(t.alternate, t);
break;
case 4096:
t.flags &= -4097;
break;
case 4100:
t.flags &= -4097,
Ms(t.alternate, t);
break;
case 4:
Ms(t.alternate, t)
}
} catch (_) {
Va(t, t.return, _)
}
if (null !== (n = t.sibling)) {
n.return = t.return,
cs = n;
break
}
cs = t.return
}
}
}(e, r),
j(e.containerInfo),
e.current = r,
Es(r, e, i),
jt(),
Xs = l,
kt = o,
Js.transition = s
} else
e.current = r;
if (pa && (pa = !1,
fa = e,
ma = i),
s = e.pendingLanes,
0 === s && (ha = null),
function(e) {
if (Vt && "function" === typeof Vt.onCommitFiberRoot)
try {
Vt.onCommitFiberRoot(Ht, e, void 0, 128 === (128 & e.current.flags))
} catch (t) {}
}(r.stateNode),
Aa(e, Ft()),
null !== t)
for (n = e.onRecoverableError,
r = 0; r < t.length; r++)
n(t[r]);
if (ua)
throw ua = !1,
e = da,
da = null,
e;
0 !== (1 & ma) && 0 !== e.tag && Ga(),
s = e.pendingLanes,
0 !== (1 & s) ? e === va ? ga++ : (ga = 0,
va = e) : ga = 0,
Yt()
}(e, t, n)
} finally {
Js.transition = r,
kt = n
}
return null
}
function Ga() {
if (null !== fa) {
var e = Lt(ma)
, t = Js.transition
, n = kt;
try {
if (Js.transition = null,
kt = 16 > e ? 16 : e,
null === fa)
var r = !1;
else {
if (e = fa,
fa = null,
ma = 0,
0 !== (6 & Xs))
throw Error(a(331));
var i = Xs;
for (Xs |= 4,
cs = e.current; null !== cs; ) {
var s = cs
, o = s.child;
if (0 !== (16 & cs.flags)) {
var l = s.deletions;
if (null !== l) {
for (var c = 0; c < l.length; c++) {
var u = l[c];
for (cs = u; null !== cs; ) {
var d = cs;
switch (d.tag) {
case 0:
case 11:
case 15:
ps(8, d, s)
}
var h = d.child;
if (null !== h)
h.return = d,
cs = h;
else
for (; null !== cs; ) {
var p = (d = cs).sibling
, f = d.return;
if (ys(d),
d === u) {
cs = null;
break
}
if (null !== p) {
p.return = f,
cs = p;
break
}
cs = f
}
}
}
var m = s.alternate;
if (null !== m) {
var g = m.child;
if (null !== g) {
m.child = null;
do {
var v = g.sibling;
g.sibling = null,
g = v
} while (null !== g)
}
}
cs = s
}
}
if (0 !== (2064 & s.subtreeFlags) && null !== o)
o.return = s,
cs = o;
else
e: for (; null !== cs; ) {
if (0 !== (2048 & (s = cs).flags))
switch (s.tag) {
case 0:
case 11:
case 15:
ps(9, s, s.return)
}
var y = s.sibling;
if (null !== y) {
y.return = s.return,
cs = y;
break e
}
cs = s.return
}
}
var x = e.current;
for (cs = x; null !== cs; ) {
var b = (o = cs).child;
if (0 !== (2064 & o.subtreeFlags) && null !== b)
b.return = o,
cs = b;
else
e: for (o = x; null !== cs; ) {
if (0 !== (2048 & (l = cs).flags))
try {
switch (l.tag) {
case 0:
case 11:
case 15:
fs(9, l)
}
} catch (w) {
Va(l, l.return, w)
}
if (l === o) {
cs = null;
break e
}
var _ = l.sibling;
if (null !== _) {
_.return = l.return,
cs = _;
break e
}
cs = l.return
}
}
if (Xs = i,
Yt(),
Vt && "function" === typeof Vt.onPostCommitFiberRoot)
try {
Vt.onPostCommitFiberRoot(Ht, e)
} catch (w) {}
r = !0
}
return r
} finally {
kt = n,
Js.transition = t
}
}
return !1
}
function Ha(e, t, n) {
vn(e, t = Ai(0, t = vi(n, t), 1)),
t = ba(),
null !== (e = Sa(e, 1)) && (Bt(e, 1, t),
Aa(e, t))
}
function Va(e, t, n) {
if (3 === e.tag)
Ha(e, e, n);
else
for (; null !== t; ) {
if (3 === t.tag) {
Ha(t, e, n);
break
}
if (1 === t.tag) {
var r = t.stateNode;
if ("function" === typeof t.type.getDerivedStateFromError || "function" === typeof r.componentDidCatch && (null === ha || !ha.has(r))) {
vn(t, e = Mi(t, e = vi(n, e), 1)),
e = ba(),
null !== (t = Sa(t, 1)) && (Bt(t, 1, e),
Aa(t, e));
break
}
}
t = t.return
}
}
function Wa(e, t, n) {
var r = e.pingCache;
null !== r && r.delete(t),
t = ba(),
e.pingedLanes |= e.suspendedLanes & n,
Ks === e && (Ys & n) === n && (4 === $s || 3 === $s && (130023424 & Ys) === Ys && 500 > Ft() - aa ? ka(e, 0) : ra |= n),
Aa(e, t)
}
function Ja(e, t) {
0 === t && (0 === (1 & e.mode) ? t = 1 : (t = At,
0 === (130023424 & (At <<= 1)) && (At = 4194304)));
var n = ba();
null !== (e = Sa(e, t)) && (Bt(e, t, n),
Aa(e, n))
}
function Xa(e) {
var t = e.memoizedState
, n = 0;
null !== t && (n = t.retryLane),
Ja(e, n)
}
function Ka(e, t) {
var n = 0;
switch (e.tag) {
case 13:
var r = e.stateNode
, i = e.memoizedState;
null !== i && (n = i.retryLane);
break;
case 19:
r = e.stateNode;
break;
default:
throw Error(a(314))
}
null !== r && r.delete(t),
Ja(e, n)
}
function qa(e, t) {
return It(e, t)
}
function Ya(e, t, n, r) {
this.tag = e,
this.key = n,
this.sibling = this.child = this.return = this.stateNode = this.type = this.elementType = null,
this.index = 0,
this.ref = null,
this.pendingProps = t,
this.dependencies = this.memoizedState = this.updateQueue = this.memoizedProps = null,
this.mode = r,
this.subtreeFlags = this.flags = 0,
this.deletions = null,
this.childLanes = this.lanes = 0,
this.alternate = null
}
function Qa(e, t, n, r) {
return new Ya(e,t,n,r)
}
function Za(e) {
return !(!(e = e.prototype) || !e.isReactComponent)
}
function $a(e, t) {
var n = e.alternate;
return null === n ? ((n = Qa(e.tag, t, e.key, e.mode)).elementType = e.elementType,
n.type = e.type,
n.stateNode = e.stateNode,
n.alternate = e,
e.alternate = n) : (n.pendingProps = t,
n.type = e.type,
n.flags = 0,
n.subtreeFlags = 0,
n.deletions = null),
n.flags = 14680064 & e.flags,
n.childLanes = e.childLanes,
n.lanes = e.lanes,
n.child = e.child,
n.memoizedProps = e.memoizedProps,
n.memoizedState = e.memoizedState,
n.updateQueue = e.updateQueue,
t = e.dependencies,
n.dependencies = null === t ? null : {
lanes: t.lanes,
firstContext: t.firstContext
},
n.sibling = e.sibling,
n.index = e.index,
n.ref = e.ref,
n
}
function eo(e, t, n, r, i, s) {
var o = 2;
if (r = e,
"function" === typeof e)
Za(e) && (o = 1);
else if ("string" === typeof e)
o = 5;
else
e: switch (e) {
case u:
return to(n.children, i, s, t);
case d:
o = 8,
i |= 8;
break;
case h:
return (e = Qa(12, n, t, 2 | i)).elementType = h,
e.lanes = s,
e;
case g:
return (e = Qa(13, n, t, i)).elementType = g,
e.lanes = s,
e;
case v:
return (e = Qa(19, n, t, i)).elementType = v,
e.lanes = s,
e;
case b:
return no(n, i, s, t);
default:
if ("object" === typeof e && null !== e)
switch (e.$$typeof) {
case p:
o = 10;
break e;
case f:
o = 9;
break e;
case m:
o = 11;
break e;
case y:
o = 14;
break e;
case x:
o = 16,
r = null;
break e
}
throw Error(a(130, null == e ? e : typeof e, ""))
}
return (t = Qa(o, n, t, i)).elementType = e,
t.type = r,
t.lanes = s,
t
}
function to(e, t, n, r) {
return (e = Qa(7, e, r, t)).lanes = n,
e
}
function no(e, t, n, r) {
return (e = Qa(22, e, r, t)).elementType = b,
e.lanes = n,
e.stateNode = {},
e
}
function ro(e, t, n) {
return (e = Qa(6, e, null, t)).lanes = n,
e
}
function io(e, t, n) {
return (t = Qa(4, null !== e.children ? e.children : [], e.key, t)).lanes = n,
t.stateNode = {
containerInfo: e.containerInfo,
pendingChildren: null,
implementation: e.implementation
},
t
}
function so(e, t, n, r, i) {
this.tag = t,
this.containerInfo = e,
this.finishedWork = this.pingCache = this.current = this.pendingChildren = null,
this.timeoutHandle = J,
this.callbackNode = this.pendingContext = this.context = null,
this.callbackPriority = 0,
this.eventTimes = Rt(0),
this.expirationTimes = Rt(-1),
this.entangledLanes = this.finishedLanes = this.mutableReadLanes = this.expiredLanes = this.pingedLanes = this.suspendedLanes = this.pendingLanes = 0,
this.entanglements = Rt(0),
this.identifierPrefix = r,
this.onRecoverableError = i,
Y && (this.mutableSourceEagerHydrationData = null)
}
function ao(e, t, n, r, i, s, a, o, l) {
return e = new so(e,t,n,o,l),
1 === t ? (t = 1,
!0 === s && (t |= 8)) : t = 0,
s = Qa(3, null, null, t),
e.current = s,
s.stateNode = e,
s.memoizedState = {
element: r,
isDehydrated: n,
cache: null,
transitions: null
},
fn(s),
e
}
function oo(e) {
if (!e)
return ct;
e: {
if (M(e = e._reactInternals) !== e || 1 !== e.tag)
throw Error(a(170));
var t = e;
do {
switch (t.tag) {
case 3:
t = t.stateNode.context;
break e;
case 1:
if (ft(t.type)) {
t = t.stateNode.__reactInternalMemoizedMergedChildContext;
break e
}
}
t = t.return
} while (null !== t);
throw Error(a(171))
}
if (1 === e.tag) {
var n = e.type;
if (ft(n))
return vt(e, n, t)
}
return t
}
function lo(e) {
var t = e._reactInternals;
if (void 0 === t) {
if ("function" === typeof e.render)
throw Error(a(188));
throw e = Object.keys(e).join(","),
Error(a(268, e))
}
return null === (e = T(t)) ? null : e.stateNode
}
function co(e, t) {
if (null !== (e = e.memoizedState) && null !== e.dehydrated) {
var n = e.retryLane;
e.retryLane = 0 !== n && n < t ? n : t
}
}
function uo(e, t) {
co(e, t),
(e = e.alternate) && co(e, t)
}
function ho(e) {
return null === (e = T(e)) ? null : e.stateNode
}
function po() {
return null
}
return ca = function(e, t, n) {
if (null !== e)
if (e.memoizedProps !== t.pendingProps || dt.current)
Di = !0;
else {
if (0 === (e.lanes & n) && 0 === (128 & t.flags))
return Di = !1,
function(e, t, n) {
switch (t.tag) {
case 3:
Ji(t),
$n();
break;
case 5:
fr(t);
break;
case 1:
ft(t.type) && yt(t);
break;
case 4:
hr(t, t.stateNode.containerInfo);
break;
case 10:
on(0, t.type._context, t.memoizedProps.value);
break;
case 13:
var r = t.memoizedState;
if (null !== r)
return null !== r.dehydrated ? (lt(gr, 1 & gr.current),
t.flags |= 128,
null) : 0 !== (n & t.child.childLanes) ? Yi(e, t, n) : (lt(gr, 1 & gr.current),
null !== (e = is(e, t, n)) ? e.sibling : null);
lt(gr, 1 & gr.current);
break;
case 19:
if (r = 0 !== (n & t.childLanes),
0 !== (128 & e.flags)) {
if (r)
return rs(e, t, n);
t.flags |= 128
}
var i = t.memoizedState;
if (null !== i && (i.rendering = null,
i.tail = null,
i.lastEffect = null),
lt(gr, gr.current),
r)
break;
return null;
case 22:
case 23:
return t.lanes = 0,
zi(e, t, n)
}
return is(e, t, n)
}(e, t, n);
Di = 0 !== (131072 & e.flags)
}
else
Di = !1,
Vn && 0 !== (1048576 & t.flags) && On(t, kn, t.index);
switch (t.lanes = 0,
t.tag) {
case 2:
var r = t.type;
null !== e && (e.alternate = null,
t.alternate = null,
t.flags |= 2),
e = t.pendingProps;
var i = pt(t, ut.current);
un(t, n),
i = kr(null, t, r, e, i, n);
var s = Lr();
return t.flags |= 1,
"object" === typeof i && null !== i && "function" === typeof i.render && void 0 === i.$$typeof ? (t.tag = 1,
t.memoizedState = null,
t.updateQueue = null,
ft(r) ? (s = !0,
yt(t)) : s = !1,
t.memoizedState = null !== i.state && void 0 !== i.state ? i.state : null,
fn(t),
i.updater = An,
t.stateNode = i,
i._reactInternals = t,
Tn(t, r, e, n),
t = Wi(null, t, r, !0, s, n)) : (t.tag = 0,
Vn && s && Un(t),
ji(null, t, i, n),
t = t.child),
t;
case 16:
r = t.elementType;
e: {
switch (null !== e && (e.alternate = null,
t.alternate = null,
t.flags |= 2),
e = t.pendingProps,
r = (i = r._init)(r._payload),
t.type = r,
i = t.tag = function(e) {
if ("function" === typeof e)
return Za(e) ? 1 : 0;
if (void 0 !== e && null !== e) {
if ((e = e.$$typeof) === m)
return 11;
if (e === y)
return 14
}
return 2
}(r),
e = en(r, e),
i) {
case 0:
t = Hi(null, t, r, e, n);
break e;
case 1:
t = Vi(null, t, r, e, n);
break e;
case 11:
t = Fi(null, t, r, e, n);
break e;
case 14:
t = Oi(null, t, r, en(r.type, e), n);
break e
}
throw Error(a(306, r, ""))
}
return t;
case 0:
return r = t.type,
i = t.pendingProps,
Hi(e, t, r, i = t.elementType === r ? i : en(r, i), n);
case 1:
return r = t.type,
i = t.pendingProps,
Vi(e, t, r, i = t.elementType === r ? i : en(r, i), n);
case 3:
e: {
if (Ji(t),
null === e)
throw Error(a(387));
r = t.pendingProps,
i = (s = t.memoizedState).element,
mn(e, t),
bn(t, r, null, n);
var o = t.memoizedState;
if (r = o.element,
Y && s.isDehydrated) {
if (s = {
element: r,
isDehydrated: !1,
cache: o.cache,
transitions: o.transitions
},
t.updateQueue.baseState = s,
t.memoizedState = s,
256 & t.flags) {
t = Xi(e, t, r, n, i = Error(a(423)));
break e
}
if (r !== i) {
t = Xi(e, t, r, n, i = Error(a(424)));
break e
}
for (Y && (Hn = ze(t.stateNode.containerInfo),
Gn = t,
Vn = !0,
Jn = null,
Wn = !1),
n = ar(t, null, r, n),
t.child = n; n; )
n.flags = -3 & n.flags | 4096,
n = n.sibling
} else {
if ($n(),
r === i) {
t = is(e, t, n);
break e
}
ji(e, t, r, n)
}
t = t.child
}
return t;
case 5:
return fr(t),
null === e && Yn(t),
r = t.type,
i = t.pendingProps,
s = null !== e ? e.memoizedProps : null,
o = i.children,
G(r, i) ? o = null : null !== s && G(r, s) && (t.flags |= 32),
Gi(e, t),
ji(e, t, o, n),
t.child;
case 6:
return null === e && Yn(t),
null;
case 13:
return Yi(e, t, n);
case 4:
return hr(t, t.stateNode.containerInfo),
r = t.pendingProps,
null === e ? t.child = sr(t, null, r, n) : ji(e, t, r, n),
t.child;
case 11:
return r = t.type,
i = t.pendingProps,
Fi(e, t, r, i = t.elementType === r ? i : en(r, i), n);
case 7:
return ji(e, t, t.pendingProps, n),
t.child;
case 8:
case 12:
return ji(e, t, t.pendingProps.children, n),
t.child;
case 10:
e: {
if (r = t.type._context,
i = t.pendingProps,
s = t.memoizedProps,
on(0, r, o = i.value),
null !== s)
if (Wt(s.value, o)) {
if (s.children === i.children && !dt.current) {
t = is(e, t, n);
break e
}
} else
for (null !== (s = t.child) && (s.return = t); null !== s; ) {
var l = s.dependencies;
if (null !== l) {
o = s.child;
for (var c = l.firstContext; null !== c; ) {
if (c.context === r) {
if (1 === s.tag) {
(c = gn(-1, n & -n)).tag = 2;
var u = s.updateQueue;
if (null !== u) {
var d = (u = u.shared).pending;
null === d ? c.next = c : (c.next = d.next,
d.next = c),
u.pending = c
}
}
s.lanes |= n,
null !== (c = s.alternate) && (c.lanes |= n),
cn(s.return, n, t),
l.lanes |= n;
break
}
c = c.next
}
} else if (10 === s.tag)
o = s.type === t.type ? null : s.child;
else if (18 === s.tag) {
if (null === (o = s.return))
throw Error(a(341));
o.lanes |= n,
null !== (l = o.alternate) && (l.lanes |= n),
cn(o, n, t),
o = s.sibling
} else
o = s.child;
if (null !== o)
o.return = s;
else
for (o = s; null !== o; ) {
if (o === t) {
o = null;
break
}
if (null !== (s = o.sibling)) {
s.return = o.return,
o = s;
break
}
o = o.return
}
s = o
}
ji(e, t, i.children, n),
t = t.child
}
return t;
case 9:
return i = t.type,
r = t.pendingProps.children,
un(t, n),
r = r(i = dn(i)),
t.flags |= 1,
ji(e, t, r, n),
t.child;
case 14:
return i = en(r = t.type, t.pendingProps),
Oi(e, t, r, i = en(r.type, i), n);
case 15:
return Ui(e, t, t.type, t.pendingProps, n);
case 17:
return r = t.type,
i = t.pendingProps,
i = t.elementType === r ? i : en(r, i),
null !== e && (e.alternate = null,
t.alternate = null,
t.flags |= 2),
t.tag = 1,
ft(r) ? (e = !0,
yt(t)) : e = !1,
un(t, n),
Cn(t, r, i),
Tn(t, r, i, n),
Wi(null, t, r, !0, e, n);
case 19:
return rs(e, t, n);
case 22:
return zi(e, t, n)
}
throw Error(a(156, t.tag))
}
,
t.attemptContinuousHydration = function(e) {
13 === e.tag && (wa(e, 134217728, ba()),
uo(e, 134217728))
}
,
t.attemptHydrationAtCurrentPriority = function(e) {
if (13 === e.tag) {
var t = ba()
, n = _a(e);
wa(e, n, t),
uo(e, n)
}
}
,
t.attemptSynchronousHydration = function(e) {
switch (e.tag) {
case 3:
var t = e.stateNode;
if (t.current.memoizedState.isDehydrated) {
var n = Mt(t.pendingLanes);
0 !== n && (Pt(t, 1 | n),
Aa(t, Ft()),
0 === (6 & Xs) && (la(),
Yt()))
}
break;
case 13:
var r = ba();
Ba((function() {
return wa(e, 1, r)
}
)),
uo(e, 1)
}
}
,
t.batchedUpdates = function(e, t) {
var n = Xs;
Xs |= 1;
try {
return e(t)
} finally {
0 === (Xs = n) && (la(),
Xt && Yt())
}
}
,
t.createComponentSelector = function(e) {
return {
$$typeof: ks,
value: e
}
}
,
t.createContainer = function(e, t, n, r, i, s, a) {
return ao(e, t, !1, null, 0, r, 0, s, a)
}
,
t.createHasPseudoClassSelector = function(e) {
return {
$$typeof: Ls,
value: e
}
}
,
t.createHydrationContainer = function(e, t, n, r, i, s, a, o, l) {
return (e = ao(n, r, !0, e, 0, s, 0, o, l)).context = oo(null),
n = e.current,
(s = gn(r = ba(), i = _a(n))).callback = void 0 !== t && null !== t ? t : null,
vn(n, s),
e.current.lanes = i,
Bt(e, i, r),
Aa(e, r),
e
}
,
t.createPortal = function(e, t, n) {
var r = 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;
return {
$$typeof: c,
key: null == r ? null : "" + r,
children: e,
containerInfo: t,
implementation: n
}
}
,
t.createRoleSelector = function(e) {
return {
$$typeof: Is,
value: e
}
}
,
t.createTestNameSelector = function(e) {
return {
$$typeof: Ns,
value: e
}
}
,
t.createTextSelector = function(e) {
return {
$$typeof: Ds,
value: e
}
}
,
t.deferredUpdates = function(e) {
var t = kt
, n = Js.transition;
try {
return Js.transition = null,
kt = 16,
e()
} finally {
kt = t,
Js.transition = n
}
}
,
t.discreteUpdates = function(e, t, n, r, i) {
var s = kt
, a = Js.transition;
try {
return Js.transition = null,
kt = 1,
e(t, n, r, i)
} finally {
kt = s,
Js.transition = a,
0 === Xs && la()
}
}
,
t.findAllNodes = Gs,
t.findBoundingRects = function(e, t) {
if (!re)
throw Error(a(363));
t = Gs(e, t),
e = [];
for (var n = 0; n < t.length; n++)
e.push(se(t[n]));
for (t = e.length - 1; 0 < t; t--)
for (var r = (n = e[t]).x, i = r + n.width, s = n.y, o = s + n.height, l = t - 1; 0 <= l; l--)
if (t !== l) {
var c = e[l]
, u = c.x
, d = u + c.width
, h = c.y
, p = h + c.height;
if (r >= u && s >= h && i <= d && o <= p) {
e.splice(t, 1);
break
}
if (!(r !== u || n.width !== c.width || p < s || h > o)) {
h > s && (c.height += h - s,
c.y = s),
p < o && (c.height = o - h),
e.splice(t, 1);
break
}
if (!(s !== h || n.height !== c.height || d < r || u > i)) {
u > r && (c.width += u - r,
c.x = r),
d < i && (c.width = i - u),
e.splice(t, 1);
break
}
}
return e
}
,
t.findHostInstance = lo,
t.findHostInstanceWithNoPortals = function(e) {
return null === (e = null !== (e = E(e)) ? B(e) : null) ? null : e.stateNode
}
,
t.findHostInstanceWithWarning = function(e) {
return lo(e)
}
,
t.flushControlled = function(e) {
var t = Xs;
Xs |= 1;
var n = Js.transition
, r = kt;
try {
Js.transition = null,
kt = 1,
e()
} finally {
kt = r,
Js.transition = n,
0 === (Xs = t) && (la(),
Yt())
}
}
,
t.flushPassiveEffects = Ga,
t.flushSync = Ba,
t.focusWithin = function(e, t) {
if (!re)
throw Error(a(363));
for (t = zs(e = Fs(e), t),
t = Array.from(t),
e = 0; e < t.length; ) {
var n = t[e++];
if (!oe(n)) {
if (5 === n.tag && ce(n.stateNode))
return !0;
for (n = n.child; null !== n; )
t.push(n),
n = n.sibling
}
}
return !1
}
,
t.getCurrentUpdatePriority = function() {
return kt
}
,
t.getFindAllNodesFailureDescription = function(e, t) {
if (!re)
throw Error(a(363));
var n = 0
, r = [];
e = [Fs(e), 0];
for (var i = 0; i < e.length; ) {
var s = e[i++]
, o = e[i++]
, l = t[o];
if ((5 !== s.tag || !oe(s)) && (Os(s, l) && (r.push(Us(l)),
++o > n && (n = o)),
o < t.length))
for (s = s.child; null !== s; )
e.push(s, o),
s = s.sibling
}
if (n < t.length) {
for (e = []; n < t.length; n++)
e.push(Us(t[n]));
return "findAllNodes was able to match part of the selector:\n " + r.join(" > ") + "\n\nNo matching component was found for:\n " + e.join(" > ")
}
return null
}
,
t.getPublicRootInstance = function(e) {
return (e = e.current).child ? 5 === e.child.tag ? L(e.child.stateNode) : e.child.stateNode : null
}
,
t.injectIntoDevTools = function(e) {
if (e = {
bundleType: e.bundleType,
version: e.version,
rendererPackageName: e.rendererPackageName,
rendererConfig: e.rendererConfig,
overrideHookState: null,
overrideHookStateDeletePath: null,
overrideHookStateRenamePath: null,
overrideProps: null,
overridePropsDeletePath: null,
overridePropsRenamePath: null,
setErrorHandler: null,
setSuspenseHandler: null,
scheduleUpdate: null,
currentDispatcherRef: o.ReactCurrentDispatcher,
findHostInstanceByFiber: ho,
findFiberByHostInstance: e.findFiberByHostInstance || po,
findHostInstancesForRefresh: null,
scheduleRefresh: null,
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.0.0-fc46dba67-20220329"
},
"undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)
e = !1;
else {
var t = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (t.isDisabled || !t.supportsFiber)
e = !0;
else {
try {
Ht = t.inject(e),
Vt = t
} catch (n) {}
e = !!t.checkDCE
}
}
return e
}
,
t.isAlreadyRendering = function() {
return !1
}
,
t.observeVisibleRects = function(e, t, n, r) {
if (!re)
throw Error(a(363));
e = Gs(e, t);
var i = ue(e, n, r).disconnect;
return {
disconnect: function() {
i()
}
}
}
,
t.registerMutableSourceForHydration = function(e, t) {
var n = t._getVersion;
n = n(t._source),
null == e.mutableSourceEagerHydrationData ? e.mutableSourceEagerHydrationData = [t, n] : e.mutableSourceEagerHydrationData.push(t, n)
}
,
t.runWithPriority = function(e, t) {
var n = kt;
try {
return kt = e,
t()
} finally {
kt = n
}
}
,
t.shouldError = function() {
return null
}
,
t.shouldSuspend = function() {
return !1
}
,
t.updateContainer = function(e, t, n, r) {
var i = t.current
, s = ba()
, a = _a(i);
return n = oo(n),
null === t.context ? t.context = n : t.pendingContext = n,
(t = gn(s, a)).payload = {
element: e
},
null !== (r = void 0 === r ? null : r) && (t.callback = r),
vn(i, t),
null !== (e = wa(i, a, s)) && yn(e, i, a),
a
}
,
t
}
}
,
205: (e, t, n) => {
"use strict";
e.exports = n(302)
}
,
16: (e, t, n) => {
"use strict";
e.exports = n(958)
}
,
153: (e, t, n) => {
"use strict";
var r = n(43)
, i = Symbol.for("react.element")
, s = Symbol.for("react.fragment")
, a = Object.prototype.hasOwnProperty
, o = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner
, l = {
key: !0,
ref: !0,
__self: !0,
__source: !0
};
function c(e, t, n) {
var r, s = {}, c = null, u = null;
for (r in void 0 !== n && (c = "" + n),
void 0 !== t.key && (c = "" + t.key),
void 0 !== t.ref && (u = t.ref),
t)
a.call(t, r) && !l.hasOwnProperty(r) && (s[r] = t[r]);
if (e && e.defaultProps)
for (r in t = e.defaultProps)
void 0 === s[r] && (s[r] = t[r]);
return {
$$typeof: i,
type: e,
key: c,
ref: u,
props: s,
_owner: o.current
}
}
t.Fragment = s,
t.jsx = c,
t.jsxs = c
}
,
202: (e, t) => {
"use strict";
var n = Symbol.for("react.element")
, r = Symbol.for("react.portal")
, i = Symbol.for("react.fragment")
, s = Symbol.for("react.strict_mode")
, a = Symbol.for("react.profiler")
, o = Symbol.for("react.provider")
, l = Symbol.for("react.context")
, c = Symbol.for("react.forward_ref")
, u = Symbol.for("react.suspense")
, d = Symbol.for("react.memo")
, h = Symbol.for("react.lazy")
, p = Symbol.iterator;
var f = {
isMounted: function() {
return !1
},
enqueueForceUpdate: function() {},
enqueueReplaceState: function() {},
enqueueSetState: function() {}
}
, m = Object.assign
, g = {};
function v(e, t, n) {
this.props = e,
this.context = t,
this.refs = g,
this.updater = n || f
}
function y() {}
function x(e, t, n) {
this.props = e,
this.context = t,
this.refs = g,
this.updater = n || f
}
v.prototype.isReactComponent = {},
v.prototype.setState = function(e, t) {
if ("object" !== typeof e && "function" !== typeof e && null != e)
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, e, t, "setState")
}
,
v.prototype.forceUpdate = function(e) {
this.updater.enqueueForceUpdate(this, e, "forceUpdate")
}
,
y.prototype = v.prototype;
var b = x.prototype = new y;
b.constructor = x,
m(b, v.prototype),
b.isPureReactComponent = !0;
var _ = Array.isArray
, w = Object.prototype.hasOwnProperty
, S = {
current: null
}
, A = {
key: !0,
ref: !0,
__self: !0,
__source: !0
};
function M(e, t, r) {
var i, s = {}, a = null, o = null;
if (null != t)
for (i in void 0 !== t.ref && (o = t.ref),
void 0 !== t.key && (a = "" + t.key),
t)
w.call(t, i) && !A.hasOwnProperty(i) && (s[i] = t[i]);
var l = arguments.length - 2;
if (1 === l)
s.children = r;
else if (1 < l) {
for (var c = Array(l), u = 0; u < l; u++)
c[u] = arguments[u + 2];
s.children = c
}
if (e && e.defaultProps)
for (i in l = e.defaultProps)
void 0 === s[i] && (s[i] = l[i]);
return {
$$typeof: n,
type: e,
key: a,
ref: o,
props: s,
_owner: S.current
}
}
function C(e) {
return "object" === typeof e && null !== e && e.$$typeof === n
}
var E = /\/+/g;
function T(e, t) {
return "object" === typeof e && null !== e && null != e.key ? function(e) {
var t = {
"=": "=0",
":": "=2"
};
return "$" + e.replace(/[=:]/g, (function(e) {
return t[e]
}
))
}("" + e.key) : t.toString(36)
}
function R(e, t, i, s, a) {
var o = typeof e;
"undefined" !== o && "boolean" !== o || (e = null);
var l = !1;
if (null === e)
l = !0;
else
switch (o) {
case "string":
case "number":
l = !0;
break;
case "object":
switch (e.$$typeof) {
case n:
case r:
l = !0
}
}
if (l)
return a = a(l = e),
e = "" === s ? "." + T(l, 0) : s,
_(a) ? (i = "",
null != e && (i = e.replace(E, "$&/") + "/"),
R(a, t, i, "", (function(e) {
return e
}
))) : null != a && (C(a) && (a = function(e, t) {
return {
$$typeof: n,
type: e.type,
key: t,
ref: e.ref,
props: e.props,
_owner: e._owner
}
}(a, i + (!a.key || l && l.key === a.key ? "" : ("" + a.key).replace(E, "$&/") + "/") + e)),
t.push(a)),
1;
if (l = 0,
s = "" === s ? "." : s + ":",
_(e))
for (var c = 0; c < e.length; c++) {
var u = s + T(o = e[c], c);
l += R(o, t, i, u, a)
}
else if (u = function(e) {
return null === e || "object" !== typeof e ? null : "function" === typeof (e = p && e[p] || e["@@iterator"]) ? e : null
}(e),
"function" === typeof u)
for (e = u.call(e),
c = 0; !(o = e.next()).done; )
l += R(o = o.value, t, i, u = s + T(o, c++), a);
else if ("object" === o)
throw t = String(e),
Error("Objects are not valid as a React child (found: " + ("[object Object]" === t ? "object with keys {" + Object.keys(e).join(", ") + "}" : t) + "). If you meant to render a collection of children, use an array instead.");
return l
}
function B(e, t, n) {
if (null == e)
return e;
var r = []
, i = 0;
return R(e, r, "", "", (function(e) {
return t.call(n, e, i++)
}
)),
r
}
function P(e) {
if (-1 === e._status) {
var t = e._result;
(t = t()).then((function(t) {
0 !== e._status && -1 !== e._status || (e._status = 1,
e._result = t)
}
), (function(t) {
0 !== e._status && -1 !== e._status || (e._status = 2,
e._result = t)
}
)),
-1 === e._status && (e._status = 0,
e._result = t)
}
if (1 === e._status)
return e._result.default;
throw e._result
}
var k = {
current: null
}
, L = {
transition: null
}
, I = {
ReactCurrentDispatcher: k,
ReactCurrentBatchConfig: L,
ReactCurrentOwner: S
};
function N() {
throw Error("act(...) is not supported in production builds of React.")
}
t.Children = {
map: B,
forEach: function(e, t, n) {
B(e, (function() {
t.apply(this, arguments)
}
), n)
},
count: function(e) {
var t = 0;
return B(e, (function() {
t++
}
)),
t
},
toArray: function(e) {
return B(e, (function(e) {
return e
}
)) || []
},
only: function(e) {
if (!C(e))
throw Error("React.Children.only expected to receive a single React element child.");
return e
}
},
t.Component = v,
t.Fragment = i,
t.Profiler = a,
t.PureComponent = x,
t.StrictMode = s,
t.Suspense = u,
t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = I,
t.act = N,
t.cloneElement = function(e, t, r) {
if (null === e || void 0 === e)
throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + e + ".");
var i = m({}, e.props)
, s = e.key
, a = e.ref
, o = e._owner;
if (null != t) {
if (void 0 !== t.ref && (a = t.ref,
o = S.current),
void 0 !== t.key && (s = "" + t.key),
e.type && e.type.defaultProps)
var l = e.type.defaultProps;
for (c in t)
w.call(t, c) && !A.hasOwnProperty(c) && (i[c] = void 0 === t[c] && void 0 !== l ? l[c] : t[c])
}
var c = arguments.length - 2;
if (1 === c)
i.children = r;
else if (1 < c) {
l = Array(c);
for (var u = 0; u < c; u++)
l[u] = arguments[u + 2];
i.children = l
}
return {
$$typeof: n,
type: e.type,
key: s,
ref: a,
props: i,
_owner: o
}
}
,
t.createContext = function(e) {
return (e = {
$$typeof: l,
_currentValue: e,
_currentValue2: e,
_threadCount: 0,
Provider: null,
Consumer: null,
_defaultValue: null,
_globalName: null
}).Provider = {
$$typeof: o,
_context: e
},
e.Consumer = e
}
,
t.createElement = M,
t.createFactory = function(e) {
var t = M.bind(null, e);
return t.type = e,
t
}
,
t.createRef = function() {
return {
current: null
}
}
,
t.forwardRef = function(e) {
return {
$$typeof: c,
render: e
}
}
,
t.isValidElement = C,
t.lazy = function(e) {
return {
$$typeof: h,
_payload: {
_status: -1,
_result: e
},
_init: P
}
}
,
t.memo = function(e, t) {
return {
$$typeof: d,
type: e,
compare: void 0 === t ? null : t
}
}
,
t.startTransition = function(e) {
var t = L.transition;
L.transition = {};
try {
e()
} finally {
L.transition = t
}
}
,
t.unstable_act = N,
t.useCallback = function(e, t) {
return k.current.useCallback(e, t)
}
,
t.useContext = function(e) {
return k.current.useContext(e)
}
,
t.useDebugValue = function() {}
,
t.useDeferredValue = function(e) {
return k.current.useDeferredValue(e)
}
,
t.useEffect = function(e, t) {
return k.current.useEffect(e, t)
}
,
t.useId = function() {
return k.current.useId()
}
,
t.useImperativeHandle = function(e, t, n) {
return k.current.useImperativeHandle(e, t, n)
}
,
t.useInsertionEffect = function(e, t) {
return k.current.useInsertionEffect(e, t)
}
,
t.useLayoutEffect = function(e, t) {
return k.current.useLayoutEffect(e, t)
}
,
t.useMemo = function(e, t) {
return k.current.useMemo(e, t)
}
,
t.useReducer = function(e, t, n) {
return k.current.useReducer(e, t, n)
}
,
t.useRef = function(e) {
return k.current.useRef(e)
}
,
t.useState = function(e) {
return k.current.useState(e)
}
,
t.useSyncExternalStore = function(e, t, n) {
return k.current.useSyncExternalStore(e, t, n)
}
,
t.useTransition = function() {
return k.current.useTransition()
}
,
t.version = "18.3.1"
}
,
43: (e, t, n) => {
"use strict";
e.exports = n(202)
}
,
579: (e, t, n) => {
"use strict";
e.exports = n(153)
}
,
234: (e, t) => {
"use strict";
function n(e, t) {
var n = e.length;
e.push(t);
e: for (; 0 < n; ) {
var r = n - 1 >>> 1
, i = e[r];
if (!(0 < s(i, t)))
break e;
e[r] = t,
e[n] = i,
n = r
}
}
function r(e) {
return 0 === e.length ? null : e[0]
}
function i(e) {
if (0 === e.length)
return null;
var t = e[0]
, n = e.pop();
if (n !== t) {
e[0] = n;
e: for (var r = 0, i = e.length, a = i >>> 1; r < a; ) {
var o = 2 * (r + 1) - 1
, l = e[o]
, c = o + 1
, u = e[c];
if (0 > s(l, n))
c < i && 0 > s(u, l) ? (e[r] = u,
e[c] = n,
r = c) : (e[r] = l,
e[o] = n,
r = o);
else {
if (!(c < i && 0 > s(u, n)))
break e;
e[r] = u,
e[c] = n,
r = c
}
}
}
return t
}
function s(e, t) {
var n = e.sortIndex - t.sortIndex;
return 0 !== n ? n : e.id - t.id
}
if ("object" === typeof performance && "function" === typeof performance.now) {
var a = performance;
t.unstable_now = function() {
return a.now()
}
} else {
var o = Date
, l = o.now();
t.unstable_now = function() {
return o.now() - l
}
}
var c = []
, u = []
, d = 1
, h = null
, p = 3
, f = !1
, m = !1
, g = !1
, v = "function" === typeof setTimeout ? setTimeout : null
, y = "function" === typeof clearTimeout ? clearTimeout : null
, x = "undefined" !== typeof setImmediate ? setImmediate : null;
function b(e) {
for (var t = r(u); null !== t; ) {
if (null === t.callback)
i(u);
else {
if (!(t.startTime <= e))
break;
i(u),
t.sortIndex = t.expirationTime,
n(c, t)
}
t = r(u)
}
}
function _(e) {
if (g = !1,
b(e),
!m)
if (null !== r(c))
m = !0,
L(w);
else {
var t = r(u);
null !== t && I(_, t.startTime - e)
}
}
function w(e, n) {
m = !1,
g && (g = !1,
y(C),
C = -1),
f = !0;
var s = p;
try {
for (b(n),
h = r(c); null !== h && (!(h.expirationTime > n) || e && !R()); ) {
var a = h.callback;
if ("function" === typeof a) {
h.callback = null,
p = h.priorityLevel;
var o = a(h.expirationTime <= n);
n = t.unstable_now(),
"function" === typeof o ? h.callback = o : h === r(c) && i(c),
b(n)
} else
i(c);
h = r(c)
}
if (null !== h)
var l = !0;
else {
var d = r(u);
null !== d && I(_, d.startTime - n),
l = !1
}
return l
} finally {
h = null,
p = s,
f = !1
}
}
"undefined" !== typeof navigator && void 0 !== navigator.scheduling && void 0 !== navigator.scheduling.isInputPending && navigator.scheduling.isInputPending.bind(navigator.scheduling);
var S, A = !1, M = null, C = -1, E = 5, T = -1;
function R() {
return !(t.unstable_now() - T < E)
}
function B() {
if (null !== M) {
var e = t.unstable_now();
T = e;
var n = !0;
try {
n = M(!0, e)
} finally {
n ? S() : (A = !1,
M = null)
}
} else
A = !1
}
if ("function" === typeof x)
S = function() {
x(B)
}
;
else if ("undefined" !== typeof MessageChannel) {
var P = new MessageChannel
, k = P.port2;
P.port1.onmessage = B,
S = function() {
k.postMessage(null)
}
} else
S = function() {
v(B, 0)
}
;
function L(e) {
M = e,
A || (A = !0,
S())
}
function I(e, n) {
C = v((function() {
e(t.unstable_now())
}
), n)
}
t.unstable_IdlePriority = 5,
t.unstable_ImmediatePriority = 1,
t.unstable_LowPriority = 4,
t.unstable_NormalPriority = 3,
t.unstable_Profiling = null,
t.unstable_UserBlockingPriority = 2,
t.unstable_cancelCallback = function(e) {
e.callback = null
}
,
t.unstable_continueExecution = function() {
m || f || (m = !0,
L(w))
}
,
t.unstable_forceFrameRate = function(e) {
0 > e || 125 < e ? console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported") : E = 0 < e ? Math.floor(1e3 / e) : 5
}
,
t.unstable_getCurrentPriorityLevel = function() {
return p
}
,
t.unstable_getFirstCallbackNode = function() {
return r(c)
}
,
t.unstable_next = function(e) {
switch (p) {
case 1:
case 2:
case 3:
var t = 3;
break;
default:
t = p
}
var n = p;
p = t;
try {
return e()
} finally {
p = n
}
}
,
t.unstable_pauseExecution = function() {}
,
t.unstable_requestPaint = function() {}
,
t.unstable_runWithPriority = function(e, t) {
switch (e) {
case 1:
case 2:
case 3:
case 4:
case 5:
break;
default:
e = 3
}
var n = p;
p = e;
try {
return t()
} finally {
p = n
}
}
,
t.unstable_scheduleCallback = function(e, i, s) {
var a = t.unstable_now();
switch ("object" === typeof s && null !== s ? s = "number" === typeof (s = s.delay) && 0 < s ? a + s : a : s = a,
e) {
case 1:
var o = -1;
break;
case 2:
o = 250;
break;
case 5:
o = 1073741823;
break;
case 4:
o = 1e4;
break;
default:
o = 5e3
}
return e = {
id: d++,
callback: i,
priorityLevel: e,
startTime: s,
expirationTime: o = s + o,
sortIndex: -1
},
s > a ? (e.sortIndex = s,
n(u, e),
null === r(c) && e === r(u) && (g ? (y(C),
C = -1) : g = !0,
I(_, s - a))) : (e.sortIndex = o,
n(c, e),
m || f || (m = !0,
L(w))),
e
}
,
t.unstable_shouldYield = R,
t.unstable_wrapCallback = function(e) {
var t = p;
return function() {
var n = p;
p = t;
try {
return e.apply(this, arguments)
} finally {
p = n
}
}
}
}
,
853: (e, t, n) => {
"use strict";
e.exports = n(234)
}
}
, t = {};
function n(r) {
var i = t[r];
if (void 0 !== i)
return i.exports;
var s = t[r] = {
id: r,
loaded: !1,
exports: {}
};
return e[r].call(s.exports, s, s.exports, n),
s.loaded = !0,
s.exports
}
n.n = e => {
var t = e && e.__esModule ? () => e.default : () => e;
return n.d(t, {
a: t
}),
t
}
,
( () => {
var e, t = Object.getPrototypeOf ? e => Object.getPrototypeOf(e) : e => e.__proto__;
n.t = function(r, i) {
if (1 & i && (r = this(r)),
8 & i)
return r;
if ("object" === typeof r && r) {
if (4 & i && r.__esModule)
return r;
if (16 & i && "function" === typeof r.then)
return r
}
var s = Object.create(null);
n.r(s);
var a = {};
e = e || [null, t({}), t([]), t(t)];
for (var o = 2 & i && r; "object" == typeof o && !~e.indexOf(o); o = t(o))
Object.getOwnPropertyNames(o).forEach((e => a[e] = () => r[e]));
return a.default = () => r,
n.d(s, a),
s
}
}
)(),
n.d = (e, t) => {
for (var r in t)
n.o(t, r) && !n.o(e, r) && Object.defineProperty(e, r, {
enumerable: !0,
get: t[r]
})
}
,
n.g = function() {
if ("object" === typeof globalThis)
return globalThis;
try {
return this || new Function("return this")()
} catch (e) {
if ("object" === typeof window)
return window
}
}(),
n.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t),
n.r = e => {
"undefined" !== typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {
value: "Module"
}),
Object.defineProperty(e, "__esModule", {
value: !0
})
}
,
n.nmd = e => (e.paths = [],
e.children || (e.children = []),
e),
( () => {
"use strict";
var e = {};
n.r(e),
n.d(e, {
ACESFilmicToneMapping: () => St,
AddEquation: () => Ge,
AddOperation: () => yt,
AdditiveAnimationBlendMode: () => or,
AdditiveBlending: () => Fe,
AgXToneMapping: () => Mt,
AlphaFormat: () => on,
AlwaysCompare: () => Xr,
AlwaysDepth: () => ct,
AlwaysStencilFunc: () => Or,
AmbientLight: () => jf,
AnimationAction: () => Cm,
AnimationClip: () => of,
AnimationLoader: () => gf,
AnimationMixer: () => Tm,
AnimationObjectGroup: () => Mm,
AnimationUtils: () => Xp,
ArcCurve: () => dh,
ArrayCamera: () => uu,
ArrowHelper: () => bg,
AttachedBindMode: () => Et,
Audio: () => um,
AudioAnalyser: () => gm,
AudioContext: () => Qf,
AudioListener: () => cm,
AudioLoader: () => Zf,
AxesHelper: () => _g,
BackSide: () => Ie,
BasicDepthPacking: () => dr,
BasicShadowMap: () => Re,
BatchedMesh: () => Nd,
Bone: () => nd,
BooleanKeyframeTrack: () => $p,
Box2: () => zm,
Box3: () => es,
Box3Helper: () => mg,
BoxGeometry: () => ho,
BoxHelper: () => fg,
BufferAttribute: () => Ta,
BufferGeometry: () => Wa,
BufferGeometryLoader: () => Vf,
ByteType: () => qt,
Cache: () => cf,
Camera: () => yo,
CameraHelper: () => dg,
CanvasTexture: () => lh,
CapsuleGeometry: () => kh,
CatmullRomCurve3: () => vh,
CineonToneMapping: () => wt,
CircleGeometry: () => Lh,
ClampToEdgeWrapping: () => Dt,
Clock: () => rm,
Color: () => ga,
ColorKeyframeTrack: () => ef,
ColorManagement: () => Li,
CompressedArrayTexture: () => ah,
CompressedCubeTexture: () => oh,
CompressedTexture: () => sh,
CompressedTextureLoader: () => vf,
ConeGeometry: () => Nh,
ConstantAlphaFactor: () => at,
ConstantColorFactor: () => it,
CubeCamera: () => Ao,
CubeReflectionMapping: () => Bt,
CubeRefractionMapping: () => Pt,
CubeTexture: () => Mo,
CubeTextureLoader: () => xf,
CubeUVReflectionMapping: () => It,
CubicBezierCurve: () => _h,
CubicBezierCurve3: () => wh,
CubicInterpolant: () => qp,
CullFaceBack: () => Ce,
CullFaceFront: () => Ee,
CullFaceFrontBack: () => Te,
CullFaceNone: () => Me,
Curve: () => ch,
CurvePath: () => Rh,
CustomBlending: () => ze,
CustomToneMapping: () => At,
CylinderGeometry: () => Ih,
Cylindrical: () => Om,
Data3DTexture: () => Ki,
DataArrayTexture: () => Ji,
DataTexture: () => rd,
DataTextureLoader: () => bf,
DataUtils: () => Ma,
DecrementStencilOp: () => Tr,
DecrementWrapStencilOp: () => Br,
DefaultLoadingManager: () => df,
DepthFormat: () => hn,
DepthStencilFormat: () => pn,
DepthTexture: () => xl,
DetachedBindMode: () => Tt,
DirectionalLight: () => Df,
DirectionalLightHelper: () => lg,
DiscreteInterpolant: () => Qp,
DisplayP3ColorSpace: () => yr,
DodecahedronGeometry: () => jh,
DoubleSide: () => Ne,
DstAlphaFactor: () => $e,
DstColorFactor: () => tt,
DynamicCopyUsage: () => ti,
DynamicDrawUsage: () => qr,
DynamicReadUsage: () => Zr,
EdgesGeometry: () => Gh,
EllipseCurve: () => uh,
EqualCompare: () => Gr,
EqualDepth: () => ht,
EqualStencilFunc: () => Ir,
EquirectangularReflectionMapping: () => kt,
EquirectangularRefractionMapping: () => Lt,
Euler: () => js,
EventDispatcher: () => oi,
ExtrudeGeometry: () => yp,
FileLoader: () => mf,
Float16BufferAttribute: () => Da,
Float32BufferAttribute: () => ja,
FloatType: () => en,
Fog: () => wu,
FogExp2: () => _u,
FramebufferTexture: () => ih,
FrontSide: () => Le,
Frustum: () => Lo,
GLBufferAttribute: () => Lm,
GLSL1: () => ri,
GLSL3: () => ii,
GreaterCompare: () => Vr,
GreaterDepth: () => ft,
GreaterEqualCompare: () => Jr,
GreaterEqualDepth: () => pt,
GreaterEqualStencilFunc: () => Fr,
GreaterStencilFunc: () => Dr,
GridHelper: () => rg,
Group: () => du,
HalfFloatType: () => tn,
HemisphereLight: () => Sf,
HemisphereLightHelper: () => ng,
IcosahedronGeometry: () => bp,
ImageBitmapLoader: () => qf,
ImageLoader: () => yf,
ImageUtils: () => ji,
IncrementStencilOp: () => Er,
IncrementWrapStencilOp: () => Rr,
InstancedBufferAttribute: () => od,
InstancedBufferGeometry: () => Hf,
InstancedInterleavedBuffer: () => km,
InstancedMesh: () => md,
Int16BufferAttribute: () => ka,
Int32BufferAttribute: () => Ia,
Int8BufferAttribute: () => Ra,
IntType: () => Zt,
InterleavedBuffer: () => Au,
InterleavedBufferAttribute: () => Cu,
Interpolant: () => Kp,
InterpolateDiscrete: () => er,
InterpolateLinear: () => tr,
InterpolateSmooth: () => nr,
InvertStencilOp: () => Pr,
KeepStencilOp: () => Mr,
KeyframeTrack: () => Zp,
LOD: () => Wu,
LatheGeometry: () => Ph,
Layers: () => Fs,
LessCompare: () => zr,
LessDepth: () => ut,
LessEqualCompare: () => Hr,
LessEqualDepth: () => dt,
LessEqualStencilFunc: () => Nr,
LessStencilFunc: () => Lr,
Light: () => wf,
LightProbe: () => Uf,
Line: () => Vd,
Line3: () => Vm,
LineBasicMaterial: () => Dd,
LineCurve: () => Sh,
LineCurve3: () => Ah,
LineDashedMaterial: () => zp,
LineLoop: () => qd,
LineSegments: () => Kd,
LinearDisplayP3ColorSpace: () => xr,
LinearFilter: () => Ht,
LinearInterpolant: () => Yp,
LinearMipMapLinearFilter: () => Xt,
LinearMipMapNearestFilter: () => Wt,
LinearMipmapLinearFilter: () => Jt,
LinearMipmapNearestFilter: () => Vt,
LinearSRGBColorSpace: () => vr,
LinearToneMapping: () => bt,
LinearTransfer: () => br,
Loader: () => hf,
LoaderUtils: () => Gf,
LoadingManager: () => uf,
LoopOnce: () => Qn,
LoopPingPong: () => $n,
LoopRepeat: () => Zn,
LuminanceAlphaFormat: () => dn,
LuminanceFormat: () => un,
MOUSE: () => Se,
Material: () => xa,
MaterialLoader: () => zf,
MathUtils: () => yi,
Matrix3: () => bi,
Matrix4: () => Es,
MaxEquation: () => Je,
Mesh: () => co,
MeshBasicMaterial: () => ba,
MeshDepthMaterial: () => iu,
MeshDistanceMaterial: () => su,
MeshLambertMaterial: () => Op,
MeshMatcapMaterial: () => Up,
MeshNormalMaterial: () => Fp,
MeshPhongMaterial: () => Dp,
MeshPhysicalMaterial: () => Np,
MeshStandardMaterial: () => Ip,
MeshToonMaterial: () => jp,
MinEquation: () => We,
MirroredRepeatWrapping: () => jt,
MixOperation: () => vt,
MultiplyBlending: () => Ue,
MultiplyOperation: () => gt,
NearestFilter: () => Ft,
NearestMipMapLinearFilter: () => Gt,
NearestMipMapNearestFilter: () => Ut,
NearestMipmapLinearFilter: () => zt,
NearestMipmapNearestFilter: () => Ot,
NeutralToneMapping: () => Ct,
NeverCompare: () => Ur,
NeverDepth: () => lt,
NeverStencilFunc: () => kr,
NoBlending: () => De,
NoColorSpace: () => mr,
NoToneMapping: () => xt,
NormalAnimationBlendMode: () => ar,
NormalBlending: () => je,
NotEqualCompare: () => Wr,
NotEqualDepth: () => mt,
NotEqualStencilFunc: () => jr,
NumberKeyframeTrack: () => tf,
Object3D: () => ea,
ObjectLoader: () => Wf,
ObjectSpaceNormalMap: () => fr,
OctahedronGeometry: () => _p,
OneFactor: () => Ke,
OneMinusConstantAlphaFactor: () => ot,
OneMinusConstantColorFactor: () => st,
OneMinusDstAlphaFactor: () => et,
OneMinusDstColorFactor: () => nt,
OneMinusSrcAlphaFactor: () => Ze,
OneMinusSrcColorFactor: () => Ye,
OrthographicCamera: () => qo,
P3Primaries: () => Sr,
PCFShadowMap: () => Be,
PCFSoftShadowMap: () => Pe,
PMREMGenerator: () => ol,
Path: () => Bh,
PerspectiveCamera: () => wo,
Plane: () => Bo,
PlaneGeometry: () => Do,
PlaneHelper: () => gg,
PointLight: () => If,
PointLightHelper: () => Zm,
Points: () => th,
PointsMaterial: () => Yd,
PolarGridHelper: () => ig,
PolyhedronGeometry: () => Dh,
PositionalAudio: () => mm,
PropertyBinding: () => Am,
PropertyMixer: () => vm,
QuadraticBezierCurve: () => Mh,
QuadraticBezierCurve3: () => Ch,
Quaternion: () => Yi,
QuaternionKeyframeTrack: () => rf,
QuaternionLinearInterpolant: () => nf,
RED_GREEN_RGTC2_Format: () => qn,
RED_RGTC1_Format: () => Xn,
REVISION: () => we,
RGBADepthPacking: () => hr,
RGBAFormat: () => cn,
RGBAIntegerFormat: () => yn,
RGBA_ASTC_10x10_Format: () => zn,
RGBA_ASTC_10x5_Format: () => Fn,
RGBA_ASTC_10x6_Format: () => On,
RGBA_ASTC_10x8_Format: () => Un,
RGBA_ASTC_12x10_Format: () => Gn,
RGBA_ASTC_12x12_Format: () => Hn,
RGBA_ASTC_4x4_Format: () => Bn,
RGBA_ASTC_5x4_Format: () => Pn,
RGBA_ASTC_5x5_Format: () => kn,
RGBA_ASTC_6x5_Format: () => Ln,
RGBA_ASTC_6x6_Format: () => In,
RGBA_ASTC_8x5_Format: () => Nn,
RGBA_ASTC_8x6_Format: () => Dn,
RGBA_ASTC_8x8_Format: () => jn,
RGBA_BPTC_Format: () => Vn,
RGBA_ETC2_EAC_Format: () => Rn,
RGBA_PVRTC_2BPPV1_Format: () => Cn,
RGBA_PVRTC_4BPPV1_Format: () => Mn,
RGBA_S3TC_DXT1_Format: () => bn,
RGBA_S3TC_DXT3_Format: () => _n,
RGBA_S3TC_DXT5_Format: () => wn,
RGBFormat: () => ln,
RGB_BPTC_SIGNED_Format: () => Wn,
RGB_BPTC_UNSIGNED_Format: () => Jn,
RGB_ETC1_Format: () => En,
RGB_ETC2_Format: () => Tn,
RGB_PVRTC_2BPPV1_Format: () => An,
RGB_PVRTC_4BPPV1_Format: () => Sn,
RGB_S3TC_DXT1_Format: () => xn,
RGFormat: () => gn,
RGIntegerFormat: () => vn,
RawShaderMaterial: () => Lp,
Ray: () => Cs,
Raycaster: () => Nm,
Rec709Primaries: () => wr,
RectAreaLight: () => Ff,
RedFormat: () => fn,
RedIntegerFormat: () => mn,
ReinhardToneMapping: () => _t,
RenderTarget: () => Vi,
RepeatWrapping: () => Nt,
ReplaceStencilOp: () => Cr,
ReverseSubtractEquation: () => Ve,
RingGeometry: () => wp,
SIGNED_RED_GREEN_RGTC2_Format: () => Yn,
SIGNED_RED_RGTC1_Format: () => Kn,
SRGBColorSpace: () => gr,
SRGBTransfer: () => _r,
Scene: () => Su,
ShaderChunk: () => jo,
ShaderLib: () => Oo,
ShaderMaterial: () => vo,
ShadowMaterial: () => kp,
Shape: () => Hh,
ShapeGeometry: () => Sp,
ShapePath: () => wg,
ShapeUtils: () => mp,
ShortType: () => Yt,
Skeleton: () => ad,
SkeletonHelper: () => Ym,
SkinnedMesh: () => td,
Source: () => Oi,
Sphere: () => ys,
SphereGeometry: () => Ap,
Spherical: () => Fm,
SphericalHarmonics3: () => Of,
SplineCurve: () => Eh,
SpotLight: () => Rf,
SpotLightHelper: () => Jm,
Sprite: () => zu,
SpriteMaterial: () => Eu,
SrcAlphaFactor: () => Qe,
SrcAlphaSaturateFactor: () => rt,
SrcColorFactor: () => qe,
StaticCopyUsage: () => ei,
StaticDrawUsage: () => Kr,
StaticReadUsage: () => Qr,
StereoCamera: () => nm,
StreamCopyUsage: () => ni,
StreamDrawUsage: () => Yr,
StreamReadUsage: () => $r,
StringKeyframeTrack: () => sf,
SubtractEquation: () => He,
SubtractiveBlending: () => Oe,
TOUCH: () => Ae,
TangentSpaceNormalMap: () => pr,
TetrahedronGeometry: () => Mp,
Texture: () => Gi,
TextureLoader: () => _f,
TorusGeometry: () => Cp,
TorusKnotGeometry: () => Ep,
Triangle: () => da,
TriangleFanDrawMode: () => ur,
TriangleStripDrawMode: () => cr,
TrianglesDrawMode: () => lr,
TubeGeometry: () => Tp,
UVMapping: () => Rt,
Uint16BufferAttribute: () => La,
Uint32BufferAttribute: () => Na,
Uint8BufferAttribute: () => Ba,
Uint8ClampedBufferAttribute: () => Pa,
Uniform: () => Rm,
UniformsGroup: () => Pm,
UniformsLib: () => Fo,
UniformsUtils: () => go,
UnsignedByteType: () => Kt,
UnsignedInt248Type: () => sn,
UnsignedInt5999Type: () => an,
UnsignedIntType: () => $t,
UnsignedShort4444Type: () => nn,
UnsignedShort5551Type: () => rn,
UnsignedShortType: () => Qt,
VSMShadowMap: () => ke,
Vector2: () => xi,
Vector3: () => Qi,
Vector4: () => Hi,
VectorKeyframeTrack: () => af,
VideoTexture: () => rh,
WebGL3DRenderTarget: () => qi,
WebGLArrayRenderTarget: () => Xi,
WebGLCoordinateSystem: () => si,
WebGLCubeRenderTarget: () => Co,
WebGLMultipleRenderTargets: () => Sg,
WebGLRenderTarget: () => Wi,
WebGLRenderer: () => bu,
WebGLUtils: () => cu,
WebGPUCoordinateSystem: () => ai,
WireframeGeometry: () => Rp,
WrapAroundEnding: () => sr,
ZeroCurvatureEnding: () => rr,
ZeroFactor: () => Xe,
ZeroSlopeEnding: () => ir,
ZeroStencilOp: () => Ar,
createCanvasElement: () => Ci
});
var t = {};
n.r(t),
n.d(t, {
hasBrowserEnv: () => gx,
hasStandardBrowserEnv: () => vx,
hasStandardBrowserWebWorkerEnv: () => xx,
origin: () => bx
});
var r, i = n(43), s = n.t(i, 2), a = n(950), o = n.t(a, 2);
function l() {
return l = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var r in n)
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r])
}
return e
}
,
l.apply(this, arguments)
}
!function(e) {
e.Pop = "POP",
e.Push = "PUSH",
e.Replace = "REPLACE"
}(r || (r = {}));
const c = "popstate";
function u(e, t) {
if (!1 === e || null === e || "undefined" === typeof e)
throw new Error(t)
}
function d(e, t) {
if (!e) {
"undefined" !== typeof console && console.warn(t);
try {
throw new Error(t)
} catch (n) {}
}
}
function h(e, t) {
return {
usr: e.state,
key: e.key,
idx: t
}
}
function p(e, t, n, r) {
return void 0 === n && (n = null),
l({
pathname: "string" === typeof e ? e : e.pathname,
search: "",
hash: ""
}, "string" === typeof t ? m(t) : t, {
state: n,
key: t && t.key || r || Math.random().toString(36).substr(2, 8)
})
}
function f(e) {
let {pathname: t="/", search: n="", hash: r=""} = e;
return n && "?" !== n && (t += "?" === n.charAt(0) ? n : "?" + n),
r && "#" !== r && (t += "#" === r.charAt(0) ? r : "#" + r),
t
}
function m(e) {
let t = {};
if (e) {
let n = e.indexOf("#");
n >= 0 && (t.hash = e.substr(n),
e = e.substr(0, n));
let r = e.indexOf("?");
r >= 0 && (t.search = e.substr(r),
e = e.substr(0, r)),
e && (t.pathname = e)
}
return t
}
function g(e, t, n, i) {
void 0 === i && (i = {});
let {window: s=document.defaultView, v5Compat: a=!1} = i
, o = s.history
, d = r.Pop
, m = null
, g = v();
function v() {
return (o.state || {
idx: null
}).idx
}
function y() {
d = r.Pop;
let e = v()
, t = null == e ? null : e - g;
g = e,
m && m({
action: d,
location: b.location,
delta: t
})
}
function x(e) {
let t = "null" !== s.location.origin ? s.location.origin : s.location.href
, n = "string" === typeof e ? e : f(e);
return n = n.replace(/ $/, "%20"),
u(t, "No window.location.(origin|href) available to create URL for href: " + n),
new URL(n,t)
}
null == g && (g = 0,
o.replaceState(l({}, o.state, {
idx: g
}), ""));
let b = {
get action() {
return d
},
get location() {
return e(s, o)
},
listen(e) {
if (m)
throw new Error("A history only accepts one active listener");
return s.addEventListener(c, y),
m = e,
() => {
s.removeEventListener(c, y),
m = null
}
},
createHref: e => t(s, e),
createURL: x,
encodeLocation(e) {
let t = x(e);
return {
pathname: t.pathname,
search: t.search,
hash: t.hash
}
},
push: function(e, t) {
d = r.Push;
let i = p(b.location, e, t);
n && n(i, e),
g = v() + 1;
let l = h(i, g)
, c = b.createHref(i);
try {
o.pushState(l, "", c)
} catch (iy) {
if (iy instanceof DOMException && "DataCloneError" === iy.name)
throw iy;
s.location.assign(c)
}
a && m && m({
action: d,
location: b.location,
delta: 1
})
},
replace: function(e, t) {
d = r.Replace;
let i = p(b.location, e, t);
n && n(i, e),
g = v();
let s = h(i, g)
, l = b.createHref(i);
o.replaceState(s, "", l),
a && m && m({
action: d,
location: b.location,
delta: 0
})
},
go: e => o.go(e)
};
return b
}
var v;
!function(e) {
e.data = "data",
e.deferred = "deferred",
e.redirect = "redirect",
e.error = "error"
}(v || (v = {}));
new Set(["lazy", "caseSensitive", "path", "id", "index", "children"]);
function y(e, t, n) {
return void 0 === n && (n = "/"),
x(e, t, n, !1)
}
function x(e, t, n, r) {
let i = L(("string" === typeof t ? m(t) : t).pathname || "/", n);
if (null == i)
return null;
let s = b(e);
!function(e) {
e.sort(( (e, t) => e.score !== t.score ? t.score - e.score : function(e, t) {
let n = e.length === t.length && e.slice(0, -1).every(( (e, n) => e === t[n]));
return n ? e[e.length - 1] - t[t.length - 1] : 0
}(e.routesMeta.map((e => e.childrenIndex)), t.routesMeta.map((e => e.childrenIndex)))))
}(s);
let a = null;
for (let o = 0; null == a && o < s.length; ++o) {
let e = k(i);
a = B(s[o], e, r)
}
return a
}
function b(e, t, n, r) {
void 0 === t && (t = []),
void 0 === n && (n = []),
void 0 === r && (r = "");
let i = (e, i, s) => {
let a = {
relativePath: void 0 === s ? e.path || "" : s,
caseSensitive: !0 === e.caseSensitive,
childrenIndex: i,
route: e
};
a.relativePath.startsWith("/") && (u(a.relativePath.startsWith(r), 'Absolute route path "' + a.relativePath + '" nested under path "' + r + '" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),
a.relativePath = a.relativePath.slice(r.length));
let o = F([r, a.relativePath])
, l = n.concat(a);
e.children && e.children.length > 0 && (u(!0 !== e.index, 'Index routes must not have child routes. Please remove all child routes from route path "' + o + '".'),
b(e.children, t, l, o)),
(null != e.path || e.index) && t.push({
path: o,
score: R(o, e.index),
routesMeta: l
})
}
;
return e.forEach(( (e, t) => {
var n;
if ("" !== e.path && null != (n = e.path) && n.includes("?"))
for (let r of _(e.path))
i(e, t, r);
else
i(e, t)
}
)),
t
}
function _(e) {
let t = e.split("/");
if (0 === t.length)
return [];
let[n,...r] = t
, i = n.endsWith("?")
, s = n.replace(/\?$/, "");
if (0 === r.length)
return i ? [s, ""] : [s];
let a = _(r.join("/"))
, o = [];
return o.push(...a.map((e => "" === e ? s : [s, e].join("/")))),
i && o.push(...a),
o.map((t => e.startsWith("/") && "" === t ? "/" : t))
}
const w = /^:[\w-]+$/
, S = 3
, A = 2
, M = 1
, C = 10
, E = -2
, T = e => "*" === e;
function R(e, t) {
let n = e.split("/")
, r = n.length;
return n.some(T) && (r += E),
t && (r += A),
n.filter((e => !T(e))).reduce(( (e, t) => e + (w.test(t) ? S : "" === t ? M : C)), r)
}
function B(e, t, n) {
void 0 === n && (n = !1);
let {routesMeta: r} = e
, i = {}
, s = "/"
, a = [];
for (let o = 0; o < r.length; ++o) {
let e = r[o]
, l = o === r.length - 1
, c = "/" === s ? t : t.slice(s.length) || "/"
, u = P({
path: e.relativePath,
caseSensitive: e.caseSensitive,
end: l
}, c)
, d = e.route;
if (!u && l && n && !r[r.length - 1].route.index && (u = P({
path: e.relativePath,
caseSensitive: e.caseSensitive,
end: !1
}, c)),
!u)
return null;
Object.assign(i, u.params),
a.push({
params: i,
pathname: F([s, u.pathname]),
pathnameBase: O(F([s, u.pathnameBase])),
route: d
}),
"/" !== u.pathnameBase && (s = F([s, u.pathnameBase]))
}
return a
}
function P(e, t) {
"string" === typeof e && (e = {
path: e,
caseSensitive: !1,
end: !0
});
let[n,r] = function(e, t, n) {
void 0 === t && (t = !1);
void 0 === n && (n = !0);
d("*" === e || !e.endsWith("*") || e.endsWith("/*"), 'Route path "' + e + '" will be treated as if it were "' + e.replace(/\*$/, "/*") + '" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "' + e.replace(/\*$/, "/*") + '".');
let r = []
, i = "^" + e.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(/\/:([\w-]+)(\?)?/g, ( (e, t, n) => (r.push({
paramName: t,
isOptional: null != n
}),
n ? "/?([^\\/]+)?" : "/([^\\/]+)")));
e.endsWith("*") ? (r.push({
paramName: "*"
}),
i += "*" === e || "/*" === e ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : n ? i += "\\/*$" : "" !== e && "/" !== e && (i += "(?:(?=\\/|$))");
let s = new RegExp(i,t ? void 0 : "i");
return [s, r]
}(e.path, e.caseSensitive, e.end)
, i = t.match(n);
if (!i)
return null;
let s = i[0]
, a = s.replace(/(.)\/+$/, "$1")
, o = i.slice(1);
return {
params: r.reduce(( (e, t, n) => {
let {paramName: r, isOptional: i} = t;
if ("*" === r) {
let e = o[n] || "";
a = s.slice(0, s.length - e.length).replace(/(.)\/+$/, "$1")
}
const l = o[n];
return e[r] = i && !l ? void 0 : (l || "").replace(/%2F/g, "/"),
e
}
), {}),
pathname: s,
pathnameBase: a,
pattern: e
}
}
function k(e) {
try {
return e.split("/").map((e => decodeURIComponent(e).replace(/\//g, "%2F"))).join("/")
} catch (iy) {
return d(!1, 'The URL path "' + e + '" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding (' + iy + ")."),
e
}
}
function L(e, t) {
if ("/" === t)
return e;
if (!e.toLowerCase().startsWith(t.toLowerCase()))
return null;
let n = t.endsWith("/") ? t.length - 1 : t.length
, r = e.charAt(n);
return r && "/" !== r ? null : e.slice(n) || "/"
}
function I(e, t, n, r) {
return "Cannot include a '" + e + "' character in a manually specified `to." + t + "` field [" + JSON.stringify(r) + "]. Please separate it out to the `to." + n + '` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'
}
function N(e) {
return e.filter(( (e, t) => 0 === t || e.route.path && e.route.path.length > 0))
}
function D(e, t) {
let n = N(e);
return t ? n.map(( (e, t) => t === n.length - 1 ? e.pathname : e.pathnameBase)) : n.map((e => e.pathnameBase))
}
function j(e, t, n, r) {
let i;
void 0 === r && (r = !1),
"string" === typeof e ? i = m(e) : (i = l({}, e),
u(!i.pathname || !i.pathname.includes("?"), I("?", "pathname", "search", i)),
u(!i.pathname || !i.pathname.includes("#"), I("#", "pathname", "hash", i)),
u(!i.search || !i.search.includes("#"), I("#", "search", "hash", i)));
let s, a = "" === e || "" === i.pathname, o = a ? "/" : i.pathname;
if (null == o)
s = n;
else {
let e = t.length - 1;
if (!r && o.startsWith("..")) {
let t = o.split("/");
for (; ".." === t[0]; )
t.shift(),
e -= 1;
i.pathname = t.join("/")
}
s = e >= 0 ? t[e] : "/"
}
let c = function(e, t) {
void 0 === t && (t = "/");
let {pathname: n, search: r="", hash: i=""} = "string" === typeof e ? m(e) : e
, s = n ? n.startsWith("/") ? n : function(e, t) {
let n = t.replace(/\/+$/, "").split("/");
return e.split("/").forEach((e => {
".." === e ? n.length > 1 && n.pop() : "." !== e && n.push(e)
}
)),
n.length > 1 ? n.join("/") : "/"
}(n, t) : t;
return {
pathname: s,
search: U(r),
hash: z(i)
}
}(i, s)
, d = o && "/" !== o && o.endsWith("/")
, h = (a || "." === o) && n.endsWith("/");
return c.pathname.endsWith("/") || !d && !h || (c.pathname += "/"),
c
}
const F = e => e.join("/").replace(/\/\/+/g, "/")
, O = e => e.replace(/\/+$/, "").replace(/^\/*/, "/")
, U = e => e && "?" !== e ? e.startsWith("?") ? e : "?" + e : ""
, z = e => e && "#" !== e ? e.startsWith("#") ? e : "#" + e : "";
Error;
function G(e) {
return null != e && "number" === typeof e.status && "string" === typeof e.statusText && "boolean" === typeof e.internal && "data"in e
}
const H = ["post", "put", "patch", "delete"]
, V = (new Set(H),
["get", ...H]);
new Set(V),
new Set([301, 302, 303, 307, 308]),
new Set([307, 308]);
Symbol("deferred");
function W() {
return W = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var r in n)
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r])
}
return e
}
,
W.apply(this, arguments)
}
const J = i.createContext(null);
const X = i.createContext(null);
const K = i.createContext(null);
const q = i.createContext(null);
const Y = i.createContext({
outlet: null,
matches: [],
isDataRoute: !1
});
const Q = i.createContext(null);
function Z() {
return null != i.useContext(q)
}
function $() {
return Z() || u(!1),
i.useContext(q).location
}
function ee(e) {
i.useContext(K).static || i.useLayoutEffect(e)
}
function te() {
let {isDataRoute: e} = i.useContext(Y);
return e ? function() {
let {router: e} = ue(le.UseNavigateStable)
, t = he(ce.UseNavigateStable)
, n = i.useRef(!1);
return ee(( () => {
n.current = !0
}
)),
i.useCallback((function(r, i) {
void 0 === i && (i = {}),
n.current && ("number" === typeof r ? e.navigate(r) : e.navigate(r, W({
fromRouteId: t
}, i)))
}
), [e, t])
}() : function() {
Z() || u(!1);
let e = i.useContext(J)
, {basename: t, future: n, navigator: r} = i.useContext(K)
, {matches: s} = i.useContext(Y)
, {pathname: a} = $()
, o = JSON.stringify(D(s, n.v7_relativeSplatPath))
, l = i.useRef(!1);
return ee(( () => {
l.current = !0
}
)),
i.useCallback((function(n, i) {
if (void 0 === i && (i = {}),
!l.current)
return;
if ("number" === typeof n)
return void r.go(n);
let s = j(n, JSON.parse(o), a, "path" === i.relative);
null == e && "/" !== t && (s.pathname = "/" === s.pathname ? t : F([t, s.pathname])),
(i.replace ? r.replace : r.push)(s, i.state, i)
}
), [t, r, o, a, e])
}()
}
function ne(e, t, n, s) {
Z() || u(!1);
let {navigator: a} = i.useContext(K)
, {matches: o} = i.useContext(Y)
, l = o[o.length - 1]
, c = l ? l.params : {}
, d = (l && l.pathname,
l ? l.pathnameBase : "/");
l && l.route;
let h, p = $();
if (t) {
var f;
let e = "string" === typeof t ? m(t) : t;
"/" === d || (null == (f = e.pathname) ? void 0 : f.startsWith(d)) || u(!1),
h = e
} else
h = p;
let g = h.pathname || "/"
, v = g;
if ("/" !== d) {
let e = d.replace(/^\//, "").split("/");
v = "/" + g.replace(/^\//, "").split("/").slice(e.length).join("/")
}
let x = y(e, {
pathname: v
});
let b = oe(x && x.map((e => Object.assign({}, e, {
params: Object.assign({}, c, e.params),
pathname: F([d, a.encodeLocation ? a.encodeLocation(e.pathname).pathname : e.pathname]),
pathnameBase: "/" === e.pathnameBase ? d : F([d, a.encodeLocation ? a.encodeLocation(e.pathnameBase).pathname : e.pathnameBase])
}))), o, n, s);
return t && b ? i.createElement(q.Provider, {
value: {
location: W({
pathname: "/",
search: "",
hash: "",
state: null,
key: "default"
}, h),
navigationType: r.Pop
}
}, b) : b
}
function re() {
let e = function() {
var e;
let t = i.useContext(Q)
, n = de(ce.UseRouteError)
, r = he(ce.UseRouteError);
if (void 0 !== t)
return t;
return null == (e = n.errors) ? void 0 : e[r]
}()
, t = G(e) ? e.status + " " + e.statusText : e instanceof Error ? e.message : JSON.stringify(e)
, n = e instanceof Error ? e.stack : null
, r = "rgba(200,200,200, 0.5)"
, s = {
padding: "0.5rem",
backgroundColor: r
};
return i.createElement(i.Fragment, null, i.createElement("h2", null, "Unexpected Application Error!"), i.createElement("h3", {
style: {
fontStyle: "italic"
}
}, t), n ? i.createElement("pre", {
style: s
}, n) : null, null)
}
const ie = i.createElement(re, null);
class se extends i.Component {
constructor(e) {
super(e),
this.state = {
location: e.location,
revalidation: e.revalidation,
error: e.error
}
}
static getDerivedStateFromError(e) {
return {
error: e
}
}
static getDerivedStateFromProps(e, t) {
return t.location !== e.location || "idle" !== t.revalidation && "idle" === e.revalidation ? {
error: e.error,
location: e.location,
revalidation: e.revalidation
} : {
error: void 0 !== e.error ? e.error : t.error,
location: t.location,
revalidation: e.revalidation || t.revalidation
}
}
componentDidCatch(e, t) {
console.error("React Router caught the following error during render", e, t)
}
render() {
return void 0 !== this.state.error ? i.createElement(Y.Provider, {
value: this.props.routeContext
}, i.createElement(Q.Provider, {
value: this.state.error,
children: this.props.component
})) : this.props.children
}
}
function ae(e) {
let {routeContext: t, match: n, children: r} = e
, s = i.useContext(J);
return s && s.static && s.staticContext && (n.route.errorElement || n.route.ErrorBoundary) && (s.staticContext._deepestRenderedBoundaryId = n.route.id),
i.createElement(Y.Provider, {
value: t
}, r)
}
function oe(e, t, n, r) {
var s;
if (void 0 === t && (t = []),
void 0 === n && (n = null),
void 0 === r && (r = null),
null == e) {
var a;
if (null == (a = n) || !a.errors)
return null;
e = n.matches
}
let o = e
, l = null == (s = n) ? void 0 : s.errors;
if (null != l) {
let e = o.findIndex((e => e.route.id && void 0 !== (null == l ? void 0 : l[e.route.id])));
e >= 0 || u(!1),
o = o.slice(0, Math.min(o.length, e + 1))
}
let c = !1
, d = -1;
if (n && r && r.v7_partialHydration)
for (let i = 0; i < o.length; i++) {
let e = o[i];
if ((e.route.HydrateFallback || e.route.hydrateFallbackElement) && (d = i),
e.route.id) {
let {loaderData: t, errors: r} = n
, i = e.route.loader && void 0 === t[e.route.id] && (!r || void 0 === r[e.route.id]);
if (e.route.lazy || i) {
c = !0,
o = d >= 0 ? o.slice(0, d + 1) : [o[0]];
break
}
}
}
return o.reduceRight(( (e, r, s) => {
let a, u = !1, h = null, p = null;
var f;
n && (a = l && r.route.id ? l[r.route.id] : void 0,
h = r.route.errorElement || ie,
c && (d < 0 && 0 === s ? (f = "route-fallback",
!1 || pe[f] || (pe[f] = !0),
u = !0,
p = null) : d === s && (u = !0,
p = r.route.hydrateFallbackElement || null)));
let m = t.concat(o.slice(0, s + 1))
, g = () => {
let t;
return t = a ? h : u ? p : r.route.Component ? i.createElement(r.route.Component, null) : r.route.element ? r.route.element : e,
i.createElement(ae, {
match: r,
routeContext: {
outlet: e,
matches: m,
isDataRoute: null != n
},
children: t
})
}
;
return n && (r.route.ErrorBoundary || r.route.errorElement || 0 === s) ? i.createElement(se, {
location: n.location,
revalidation: n.revalidation,
component: h,
error: a,
children: g(),
routeContext: {
outlet: null,
matches: m,
isDataRoute: !0
}
}) : g()
}
), null)
}
var le = function(e) {
return e.UseBlocker = "useBlocker",
e.UseRevalidator = "useRevalidator",
e.UseNavigateStable = "useNavigate",
e
}(le || {})
, ce = function(e) {
return e.UseBlocker = "useBlocker",
e.UseLoaderData = "useLoaderData",
e.UseActionData = "useActionData",
e.UseRouteError = "useRouteError",
e.UseNavigation = "useNavigation",
e.UseRouteLoaderData = "useRouteLoaderData",
e.UseMatches = "useMatches",
e.UseRevalidator = "useRevalidator",
e.UseNavigateStable = "useNavigate",
e.UseRouteId = "useRouteId",
e
}(ce || {});
function ue(e) {
let t = i.useContext(J);
return t || u(!1),
t
}
function de(e) {
let t = i.useContext(X);
return t || u(!1),
t
}
function he(e) {
let t = function(e) {
let t = i.useContext(Y);
return t || u(!1),
t
}()
, n = t.matches[t.matches.length - 1];
return n.route.id || u(!1),
n.route.id
}
const pe = {};
s.startTransition;
function fe(e) {
u(!1)
}
function me(e) {
let {basename: t="/", children: n=null, location: s, navigationType: a=r.Pop, navigator: o, static: l=!1, future: c} = e;
Z() && u(!1);
let d = t.replace(/^\/*/, "/")
, h = i.useMemo(( () => ({
basename: d,
navigator: o,
static: l,
future: W({
v7_relativeSplatPath: !1
}, c)
})), [d, c, o, l]);
"string" === typeof s && (s = m(s));
let {pathname: p="/", search: f="", hash: g="", state: v=null, key: y="default"} = s
, x = i.useMemo(( () => {
let e = L(p, d);
return null == e ? null : {
location: {
pathname: e,
search: f,
hash: g,
state: v,
key: y
},
navigationType: a
}
}
), [d, p, f, g, v, y, a]);
return null == x ? null : i.createElement(K.Provider, {
value: h
}, i.createElement(q.Provider, {
children: n,
value: x
}))
}
function ge(e) {
let {children: t, location: n} = e;
return ne(ve(t), n)
}
new Promise(( () => {}
));
i.Component;
function ve(e, t) {
void 0 === t && (t = []);
let n = [];
return i.Children.forEach(e, ( (e, r) => {
if (!i.isValidElement(e))
return;
let s = [...t, r];
if (e.type === i.Fragment)
return void n.push.apply(n, ve(e.props.children, s));
e.type !== fe && u(!1),
e.props.index && e.props.children && u(!1);
let a = {
id: e.props.id || s.join("-"),
caseSensitive: e.props.caseSensitive,
element: e.props.element,
Component: e.props.Component,
index: e.props.index,
path: e.props.path,
loader: e.props.loader,
action: e.props.action,
errorElement: e.props.errorElement,
ErrorBoundary: e.props.ErrorBoundary,
hasErrorBoundary: null != e.props.ErrorBoundary || null != e.props.errorElement,
shouldRevalidate: e.props.shouldRevalidate,
handle: e.props.handle,
lazy: e.props.lazy
};
e.props.children && (a.children = ve(e.props.children, s)),
n.push(a)
}
)),
n
}
new Set(["application/x-www-form-urlencoded", "multipart/form-data", "text/plain"]);
try {
window.__reactRouterVersion = "6"
} catch (CB) {}
new Map;
const ye = s.startTransition;
o.flushSync,
s.useId;
function xe(e) {
let {basename: t, children: n, future: r, window: s} = e
, a = i.useRef();
var o;
null == a.current && (a.current = (void 0 === (o = {
window: s,
v5Compat: !0
}) && (o = {}),
g((function(e, t) {
let {pathname: n, search: r, hash: i} = e.location;
return p("", {
pathname: n,
search: r,
hash: i
}, t.state && t.state.usr || null, t.state && t.state.key || "default")
}
), (function(e, t) {
return "string" === typeof t ? t : f(t)
}
), null, o)));
let l = a.current
, [c,u] = i.useState({
action: l.action,
location: l.location
})
, {v7_startTransition: d} = r || {}
, h = i.useCallback((e => {
d && ye ? ye(( () => u(e))) : u(e)
}
), [u, d]);
return i.useLayoutEffect(( () => l.listen(h)), [l, h]),
i.createElement(me, {
basename: t,
children: n,
location: c.location,
navigationType: c.action,
navigator: l,
future: r
})
}
"undefined" !== typeof window && "undefined" !== typeof window.document && window.document.createElement;
var be, _e;
(function(e) {
e.UseScrollRestoration = "useScrollRestoration",
e.UseSubmit = "useSubmit",
e.UseSubmitFetcher = "useSubmitFetcher",
e.UseFetcher = "useFetcher",
e.useViewTransitionState = "useViewTransitionState"
}
)(be || (be = {})),
function(e) {
e.UseFetcher = "useFetcher",
e.UseFetchers = "useFetchers",
e.UseScrollRestoration = "useScrollRestoration"
}(_e || (_e = {}));
const we = "165"
, Se = {
LEFT: 0,
MIDDLE: 1,
RIGHT: 2,
ROTATE: 0,
DOLLY: 1,
PAN: 2
}
, Ae = {
ROTATE: 0,
PAN: 1,
DOLLY_PAN: 2,
DOLLY_ROTATE: 3
}
, Me = 0
, Ce = 1
, Ee = 2
, Te = 3
, Re = 0
, Be = 1
, Pe = 2
, ke = 3
, Le = 0
, Ie = 1
, Ne = 2
, De = 0
, je = 1
, Fe = 2
, Oe = 3
, Ue = 4
, ze = 5
, Ge = 100
, He = 101
, Ve = 102
, We = 103
, Je = 104
, Xe = 200
, Ke = 201
, qe = 202
, Ye = 203
, Qe = 204
, Ze = 205
, $e = 206
, et = 207
, tt = 208
, nt = 209
, rt = 210
, it = 211
, st = 212
, at = 213
, ot = 214
, lt = 0
, ct = 1
, ut = 2
, dt = 3
, ht = 4
, pt = 5
, ft = 6
, mt = 7
, gt = 0
, vt = 1
, yt = 2
, xt = 0
, bt = 1
, _t = 2
, wt = 3
, St = 4
, At = 5
, Mt = 6
, Ct = 7
, Et = "attached"
, Tt = "detached"
, Rt = 300
, Bt = 301
, Pt = 302
, kt = 303
, Lt = 304
, It = 306
, Nt = 1e3
, Dt = 1001
, jt = 1002
, Ft = 1003
, Ot = 1004
, Ut = 1004
, zt = 1005
, Gt = 1005
, Ht = 1006
, Vt = 1007
, Wt = 1007
, Jt = 1008
, Xt = 1008
, Kt = 1009
, qt = 1010
, Yt = 1011
, Qt = 1012
, Zt = 1013
, $t = 1014
, en = 1015
, tn = 1016
, nn = 1017
, rn = 1018
, sn = 1020
, an = 35902
, on = 1021
, ln = 1022
, cn = 1023
, un = 1024
, dn = 1025
, hn = 1026
, pn = 1027
, fn = 1028
, mn = 1029
, gn = 1030
, vn = 1031
, yn = 1033
, xn = 33776
, bn = 33777
, _n = 33778
, wn = 33779
, Sn = 35840
, An = 35841
, Mn = 35842
, Cn = 35843
, En = 36196
, Tn = 37492
, Rn = 37496
, Bn = 37808
, Pn = 37809
, kn = 37810
, Ln = 37811
, In = 37812
, Nn = 37813
, Dn = 37814
, jn = 37815
, Fn = 37816
, On = 37817
, Un = 37818
, zn = 37819
, Gn = 37820
, Hn = 37821
, Vn = 36492
, Wn = 36494
, Jn = 36495
, Xn = 36283
, Kn = 36284
, qn = 36285
, Yn = 36286
, Qn = 2200
, Zn = 2201
, $n = 2202
, er = 2300
, tr = 2301
, nr = 2302
, rr = 2400
, ir = 2401
, sr = 2402
, ar = 2500
, or = 2501
, lr = 0
, cr = 1
, ur = 2
, dr = 3200
, hr = 3201
, pr = 0
, fr = 1
, mr = ""
, gr = "srgb"
, vr = "srgb-linear"
, yr = "display-p3"
, xr = "display-p3-linear"
, br = "linear"
, _r = "srgb"
, wr = "rec709"
, Sr = "p3"
, Ar = 0
, Mr = 7680
, Cr = 7681
, Er = 7682
, Tr = 7683
, Rr = 34055
, Br = 34056
, Pr = 5386
, kr = 512
, Lr = 513
, Ir = 514
, Nr = 515
, Dr = 516
, jr = 517
, Fr = 518
, Or = 519
, Ur = 512
, zr = 513
, Gr = 514
, Hr = 515
, Vr = 516
, Wr = 517
, Jr = 518
, Xr = 519
, Kr = 35044
, qr = 35048
, Yr = 35040
, Qr = 35045
, Zr = 35049
, $r = 35041
, ei = 35046
, ti = 35050
, ni = 35042
, ri = "100"
, ii = "300 es"
, si = 2e3
, ai = 2001;
class oi {
addEventListener(e, t) {
void 0 === this._listeners && (this._listeners = {});
const n = this._listeners;
void 0 === n[e] && (n[e] = []),
-1 === n[e].indexOf(t) && n[e].push(t)
}
hasEventListener(e, t) {
if (void 0 === this._listeners)
return !1;
const n = this._listeners;
return void 0 !== n[e] && -1 !== n[e].indexOf(t)
}
removeEventListener(e, t) {
if (void 0 === this._listeners)
return;
const n = this._listeners[e];
if (void 0 !== n) {
const e = n.indexOf(t);
-1 !== e && n.splice(e, 1)
}
}
dispatchEvent(e) {
if (void 0 === this._listeners)
return;
const t = this._listeners[e.type];
if (void 0 !== t) {
e.target = this;
const n = t.slice(0);
for (let t = 0, r = n.length; t < r; t++)
n[t].call(this, e);
e.target = null
}
}
}
const li = ["00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "0a", "0b", "0c", "0d", "0e", "0f", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "1a", "1b", "1c", "1d", "1e", "1f", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "2a", "2b", "2c", "2d", "2e", "2f", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "3a", "3b", "3c", "3d", "3e", "3f", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "4a", "4b", "4c", "4d", "4e", "4f", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59", "5a", "5b", "5c", "5d", "5e", "5f", "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "6a", "6b", "6c", "6d", "6e", "6f", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "7a", "7b", "7c", "7d", "7e", "7f", "80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "8a", "8b", "8c", "8d", "8e", "8f", "90", "91", "92", "93", "94", "95", "96", "97", "98", "99", "9a", "9b", "9c", "9d", "9e", "9f", "a0", "a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9", "aa", "ab", "ac", "ad", "ae", "af", "b0", "b1", "b2", "b3", "b4", "b5", "b6", "b7", "b8", "b9", "ba", "bb", "bc", "bd", "be", "bf", "c0", "c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8", "c9", "ca", "cb", "cc", "cd", "ce", "cf", "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7", "d8", "d9", "da", "db", "dc", "dd", "de", "df", "e0", "e1", "e2", "e3", "e4", "e5", "e6", "e7", "e8", "e9", "ea", "eb", "ec", "ed", "ee", "ef", "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "f9", "fa", "fb", "fc", "fd", "fe", "ff"];
let ci = 1234567;
const ui = Math.PI / 180
, di = 180 / Math.PI;
function hi() {
const e = 4294967295 * Math.random() | 0
, t = 4294967295 * Math.random() | 0
, n = 4294967295 * Math.random() | 0
, r = 4294967295 * Math.random() | 0;
return (li[255 & e] + li[e >> 8 & 255] + li[e >> 16 & 255] + li[e >> 24 & 255] + "-" + li[255 & t] + li[t >> 8 & 255] + "-" + li[t >> 16 & 15 | 64] + li[t >> 24 & 255] + "-" + li[63 & n | 128] + li[n >> 8 & 255] + "-" + li[n >> 16 & 255] + li[n >> 24 & 255] + li[255 & r] + li[r >> 8 & 255] + li[r >> 16 & 255] + li[r >> 24 & 255]).toLowerCase()
}
function pi(e, t, n) {
return Math.max(t, Math.min(n, e))
}
function fi(e, t) {
return (e % t + t) % t
}
function mi(e, t, n) {
return (1 - n) * e + n * t
}
function gi(e, t) {
switch (t.constructor) {
case Float32Array:
return e;
case Uint32Array:
return e / 4294967295;
case Uint16Array:
return e / 65535;
case Uint8Array:
return e / 255;
case Int32Array:
return Math.max(e / 2147483647, -1);
case Int16Array:
return Math.max(e / 32767, -1);
case Int8Array:
return Math.max(e / 127, -1);
default:
throw new Error("Invalid component type.")
}
}
function vi(e, t) {
switch (t.constructor) {
case Float32Array:
return e;
case Uint32Array:
return Math.round(4294967295 * e);
case Uint16Array:
return Math.round(65535 * e);
case Uint8Array:
return Math.round(255 * e);
case Int32Array:
return Math.round(2147483647 * e);
case Int16Array:
return Math.round(32767 * e);
case Int8Array:
return Math.round(127 * e);
default:
throw new Error("Invalid component type.")
}
}
const yi = {
DEG2RAD: ui,
RAD2DEG: di,
generateUUID: hi,
clamp: pi,
euclideanModulo: fi,
mapLinear: function(e, t, n, r, i) {
return r + (e - t) * (i - r) / (n - t)
},
inverseLerp: function(e, t, n) {
return e !== t ? (n - e) / (t - e) : 0
},
lerp: mi,
damp: function(e, t, n, r) {
return mi(e, t, 1 - Math.exp(-n * r))
},
pingpong: function(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 1;
return t - Math.abs(fi(e, 2 * t) - t)
},
smoothstep: function(e, t, n) {
return e <= t ? 0 : e >= n ? 1 : (e = (e - t) / (n - t)) * e * (3 - 2 * e)
},
smootherstep: function(e, t, n) {
return e <= t ? 0 : e >= n ? 1 : (e = (e - t) / (n - t)) * e * e * (e * (6 * e - 15) + 10)
},
randInt: function(e, t) {
return e + Math.floor(Math.random() * (t - e + 1))
},
randFloat: function(e, t) {
return e + Math.random() * (t - e)
},
randFloatSpread: function(e) {
return e * (.5 - Math.random())
},
seededRandom: function(e) {
void 0 !== e && (ci = e);
let t = ci += 1831565813;
return t = Math.imul(t ^ t >>> 15, 1 | t),
t ^= t + Math.imul(t ^ t >>> 7, 61 | t),
((t ^ t >>> 14) >>> 0) / 4294967296
},
degToRad: function(e) {
return e * ui
},
radToDeg: function(e) {
return e * di
},
isPowerOfTwo: function(e) {
return 0 === (e & e - 1) && 0 !== e
},
ceilPowerOfTwo: function(e) {
return Math.pow(2, Math.ceil(Math.log(e) / Math.LN2))
},
floorPowerOfTwo: function(e) {
return Math.pow(2, Math.floor(Math.log(e) / Math.LN2))
},
setQuaternionFromProperEuler: function(e, t, n, r, i) {
const s = Math.cos
, a = Math.sin
, o = s(n / 2)
, l = a(n / 2)
, c = s((t + r) / 2)
, u = a((t + r) / 2)
, d = s((t - r) / 2)
, h = a((t - r) / 2)
, p = s((r - t) / 2)
, f = a((r - t) / 2);
switch (i) {
case "XYX":
e.set(o * u, l * d, l * h, o * c);
break;
case "YZY":
e.set(l * h, o * u, l * d, o * c);
break;
case "ZXZ":
e.set(l * d, l * h, o * u, o * c);
break;
case "XZX":
e.set(o * u, l * f, l * p, o * c);
break;
case "YXY":
e.set(l * p, o * u, l * f, o * c);
break;
case "ZYZ":
e.set(l * f, l * p, o * u, o * c);
break;
default:
console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: " + i)
}
},
normalize: vi,
denormalize: gi
};
class xi {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;
xi.prototype.isVector2 = !0,
this.x = e,
this.y = t
}
get width() {
return this.x
}
set width(e) {
this.x = e
}
get height() {
return this.y
}
set height(e) {
this.y = e
}
set(e, t) {
return this.x = e,
this.y = t,
this
}
setScalar(e) {
return this.x = e,
this.y = e,
this
}
setX(e) {
return this.x = e,
this
}
setY(e) {
return this.y = e,
this
}
setComponent(e, t) {
switch (e) {
case 0:
this.x = t;
break;
case 1:
this.y = t;
break;
default:
throw new Error("index is out of range: " + e)
}
return this
}
getComponent(e) {
switch (e) {
case 0:
return this.x;
case 1:
return this.y;
default:
throw new Error("index is out of range: " + e)
}
}
clone() {
return new this.constructor(this.x,this.y)
}
copy(e) {
return this.x = e.x,
this.y = e.y,
this
}
add(e) {
return this.x += e.x,
this.y += e.y,
this
}
addScalar(e) {
return this.x += e,
this.y += e,
this
}
addVectors(e, t) {
return this.x = e.x + t.x,
this.y = e.y + t.y,
this
}
addScaledVector(e, t) {
return this.x += e.x * t,
this.y += e.y * t,
this
}
sub(e) {
return this.x -= e.x,
this.y -= e.y,
this
}
subScalar(e) {
return this.x -= e,
this.y -= e,
this
}
subVectors(e, t) {
return this.x = e.x - t.x,
this.y = e.y - t.y,
this
}
multiply(e) {
return this.x *= e.x,
this.y *= e.y,
this
}
multiplyScalar(e) {
return this.x *= e,
this.y *= e,
this
}
divide(e) {
return this.x /= e.x,
this.y /= e.y,
this
}
divideScalar(e) {
return this.multiplyScalar(1 / e)
}
applyMatrix3(e) {
const t = this.x
, n = this.y
, r = e.elements;
return this.x = r[0] * t + r[3] * n + r[6],
this.y = r[1] * t + r[4] * n + r[7],
this
}
min(e) {
return this.x = Math.min(this.x, e.x),
this.y = Math.min(this.y, e.y),
this
}
max(e) {
return this.x = Math.max(this.x, e.x),
this.y = Math.max(this.y, e.y),
this
}
clamp(e, t) {
return this.x = Math.max(e.x, Math.min(t.x, this.x)),
this.y = Math.max(e.y, Math.min(t.y, this.y)),
this
}
clampScalar(e, t) {
return this.x = Math.max(e, Math.min(t, this.x)),
this.y = Math.max(e, Math.min(t, this.y)),
this
}
clampLength(e, t) {
const n = this.length();
return this.divideScalar(n || 1).multiplyScalar(Math.max(e, Math.min(t, n)))
}
floor() {
return this.x = Math.floor(this.x),
this.y = Math.floor(this.y),
this
}
ceil() {
return this.x = Math.ceil(this.x),
this.y = Math.ceil(this.y),
this
}
round() {
return this.x = Math.round(this.x),
this.y = Math.round(this.y),
this
}
roundToZero() {
return this.x = Math.trunc(this.x),
this.y = Math.trunc(this.y),
this
}
negate() {
return this.x = -this.x,
this.y = -this.y,
this
}
dot(e) {
return this.x * e.x + this.y * e.y
}
cross(e) {
return this.x * e.y - this.y * e.x
}
lengthSq() {
return this.x * this.x + this.y * this.y
}
length() {
return Math.sqrt(this.x * this.x + this.y * this.y)
}
manhattanLength() {
return Math.abs(this.x) + Math.abs(this.y)
}
normalize() {
return this.divideScalar(this.length() || 1)
}
angle() {
return Math.atan2(-this.y, -this.x) + Math.PI
}
angleTo(e) {
const t = Math.sqrt(this.lengthSq() * e.lengthSq());
if (0 === t)
return Math.PI / 2;
const n = this.dot(e) / t;
return Math.acos(pi(n, -1, 1))
}
distanceTo(e) {
return Math.sqrt(this.distanceToSquared(e))
}
distanceToSquared(e) {
const t = this.x - e.x
, n = this.y - e.y;
return t * t + n * n
}
manhattanDistanceTo(e) {
return Math.abs(this.x - e.x) + Math.abs(this.y - e.y)
}
setLength(e) {
return this.normalize().multiplyScalar(e)
}
lerp(e, t) {
return this.x += (e.x - this.x) * t,
this.y += (e.y - this.y) * t,
this
}
lerpVectors(e, t, n) {
return this.x = e.x + (t.x - e.x) * n,
this.y = e.y + (t.y - e.y) * n,
this
}
equals(e) {
return e.x === this.x && e.y === this.y
}
fromArray(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;
return this.x = e[t],
this.y = e[t + 1],
this
}
toArray() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;
return e[t] = this.x,
e[t + 1] = this.y,
e
}
fromBufferAttribute(e, t) {
return this.x = e.getX(t),
this.y = e.getY(t),
this
}
rotateAround(e, t) {
const n = Math.cos(t)
, r = Math.sin(t)
, i = this.x - e.x
, s = this.y - e.y;
return this.x = i * n - s * r + e.x,
this.y = i * r + s * n + e.y,
this
}
random() {
return this.x = Math.random(),
this.y = Math.random(),
this
}
*[Symbol.iterator]() {
yield this.x,
yield this.y
}
}
class bi {
constructor(e, t, n, r, i, s, a, o, l) {
bi.prototype.isMatrix3 = !0,
this.elements = [1, 0, 0, 0, 1, 0, 0, 0, 1],
void 0 !== e && this.set(e, t, n, r, i, s, a, o, l)
}
set(e, t, n, r, i, s, a, o, l) {
const c = this.elements;
return c[0] = e,
c[1] = r,
c[2] = a,
c[3] = t,
c[4] = i,
c[5] = o,
c[6] = n,
c[7] = s,
c[8] = l,
this
}
identity() {
return this.set(1, 0, 0, 0, 1, 0, 0, 0, 1),
this
}
copy(e) {
const t = this.elements
, n = e.elements;
return t[0] = n[0],
t[1] = n[1],
t[2] = n[2],
t[3] = n[3],
t[4] = n[4],
t[5] = n[5],
t[6] = n[6],
t[7] = n[7],
t[8] = n[8],
this
}
extractBasis(e, t, n) {
return e.setFromMatrix3Column(this, 0),
t.setFromMatrix3Column(this, 1),
n.setFromMatrix3Column(this, 2),
this
}
setFromMatrix4(e) {
const t = e.elements;
return this.set(t[0], t[4], t[8], t[1], t[5], t[9], t[2], t[6], t[10]),
this
}
multiply(e) {
return this.multiplyMatrices(this, e)
}
premultiply(e) {
return this.multiplyMatrices(e, this)
}
multiplyMatrices(e, t) {
const n = e.elements
, r = t.elements
, i = this.elements
, s = n[0]
, a = n[3]
, o = n[6]
, l = n[1]
, c = n[4]
, u = n[7]
, d = n[2]
, h = n[5]
, p = n[8]
, f = r[0]
, m = r[3]
, g = r[6]
, v = r[1]
, y = r[4]
, x = r[7]
, b = r[2]
, _ = r[5]
, w = r[8];
return i[0] = s * f + a * v + o * b,
i[3] = s * m + a * y + o * _,
i[6] = s * g + a * x + o * w,
i[1] = l * f + c * v + u * b,
i[4] = l * m + c * y + u * _,
i[7] = l * g + c * x + u * w,
i[2] = d * f + h * v + p * b,
i[5] = d * m + h * y + p * _,
i[8] = d * g + h * x + p * w,
this
}
multiplyScalar(e) {
const t = this.elements;
return t[0] *= e,
t[3] *= e,
t[6] *= e,
t[1] *= e,
t[4] *= e,
t[7] *= e,
t[2] *= e,
t[5] *= e,
t[8] *= e,
this
}
determinant() {
const e = this.elements
, t = e[0]
, n = e[1]
, r = e[2]
, i = e[3]
, s = e[4]
, a = e[5]
, o = e[6]
, l = e[7]
, c = e[8];
return t * s * c - t * a * l - n * i * c + n * a * o + r * i * l - r * s * o
}
invert() {
const e = this.elements
, t = e[0]
, n = e[1]
, r = e[2]
, i = e[3]
, s = e[4]
, a = e[5]
, o = e[6]
, l = e[7]
, c = e[8]
, u = c * s - a * l
, d = a * o - c * i
, h = l * i - s * o
, p = t * u + n * d + r * h;
if (0 === p)
return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0);
const f = 1 / p;
return e[0] = u * f,
e[1] = (r * l - c * n) * f,
e[2] = (a * n - r * s) * f,
e[3] = d * f,
e[4] = (c * t - r * o) * f,
e[5] = (r * i - a * t) * f,
e[6] = h * f,
e[7] = (n * o - l * t) * f,
e[8] = (s * t - n * i) * f,
this
}
transpose() {
let e;
const t = this.elements;
return e = t[1],
t[1] = t[3],
t[3] = e,
e = t[2],
t[2] = t[6],
t[6] = e,
e = t[5],
t[5] = t[7],
t[7] = e,
this
}
getNormalMatrix(e) {
return this.setFromMatrix4(e).invert().transpose()
}
transposeIntoArray(e) {
const t = this.elements;
return e[0] = t[0],
e[1] = t[3],
e[2] = t[6],
e[3] = t[1],
e[4] = t[4],
e[5] = t[7],
e[6] = t[2],
e[7] = t[5],
e[8] = t[8],
this
}
setUvTransform(e, t, n, r, i, s, a) {
const o = Math.cos(i)
, l = Math.sin(i);
return this.set(n * o, n * l, -n * (o * s + l * a) + s + e, -r * l, r * o, -r * (-l * s + o * a) + a + t, 0, 0, 1),
this
}
scale(e, t) {
return this.premultiply(_i.makeScale(e, t)),
this
}
rotate(e) {
return this.premultiply(_i.makeRotation(-e)),
this
}
translate(e, t) {
return this.premultiply(_i.makeTranslation(e, t)),
this
}
makeTranslation(e, t) {
return e.isVector2 ? this.set(1, 0, e.x, 0, 1, e.y, 0, 0, 1) : this.set(1, 0, e, 0, 1, t, 0, 0, 1),
this
}
makeRotation(e) {
const t = Math.cos(e)
, n = Math.sin(e);
return this.set(t, -n, 0, n, t, 0, 0, 0, 1),
this
}
makeScale(e, t) {
return this.set(e, 0, 0, 0, t, 0, 0, 0, 1),
this
}
equals(e) {
const t = this.elements
, n = e.elements;
for (let r = 0; r < 9; r++)
if (t[r] !== n[r])
return !1;
return !0
}
fromArray(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;
for (let n = 0; n < 9; n++)
this.elements[n] = e[n + t];
return this
}
toArray() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;
const n = this.elements;
return e[t] = n[0],
e[t + 1] = n[1],
e[t + 2] = n[2],
e[t + 3] = n[3],
e[t + 4] = n[4],
e[t + 5] = n[5],
e[t + 6] = n[6],
e[t + 7] = n[7],
e[t + 8] = n[8],
e
}
clone() {
return (new this.constructor).fromArray(this.elements)
}
}
const _i = new bi;
function wi(e) {
for (let t = e.length - 1; t >= 0; --t)
if (e[t] >= 65535)
return !0;
return !1
}
const Si = {
Int8Array: Int8Array,
Uint8Array: Uint8Array,
Uint8ClampedArray: Uint8ClampedArray,
Int16Array: Int16Array,
Uint16Array: Uint16Array,
Int32Array: Int32Array,
Uint32Array: Uint32Array,
Float32Array: Float32Array,
Float64Array: Float64Array
};
function Ai(e, t) {
return new Si[e](t)
}
function Mi(e) {
return document.createElementNS("http://www.w3.org/1999/xhtml", e)
}
function Ci() {
const e = Mi("canvas");
return e.style.display = "block",
e
}
const Ei = {};
function Ti(e) {
e in Ei || (Ei[e] = !0,
console.warn(e))
}
const Ri = (new bi).set(.8224621, .177538, 0, .0331941, .9668058, 0, .0170827, .0723974, .9105199)
, Bi = (new bi).set(1.2249401, -.2249404, 0, -.0420569, 1.0420571, 0, -.0196376, -.0786361, 1.0982735)
, Pi = {
[vr]: {
transfer: br,
primaries: wr,
toReference: e => e,
fromReference: e => e
},
[gr]: {
transfer: _r,
primaries: wr,
toReference: e => e.convertSRGBToLinear(),
fromReference: e => e.convertLinearToSRGB()
},
[xr]: {
transfer: br,
primaries: Sr,
toReference: e => e.applyMatrix3(Bi),
fromReference: e => e.applyMatrix3(Ri)
},
[yr]: {
transfer: _r,
primaries: Sr,
toReference: e => e.convertSRGBToLinear().applyMatrix3(Bi),
fromReference: e => e.applyMatrix3(Ri).convertLinearToSRGB()
}
}
, ki = new Set([vr, xr])
, Li = {
enabled: !0,
_workingColorSpace: vr,
get workingColorSpace() {
return this._workingColorSpace
},
set workingColorSpace(e) {
if (!ki.has(e))
throw new Error('Unsupported working color space, "'.concat(e, '".'));
this._workingColorSpace = e
},
convert: function(e, t, n) {
if (!1 === this.enabled || t === n || !t || !n)
return e;
const r = Pi[t].toReference;
return (0,
Pi[n].fromReference)(r(e))
},
fromWorkingColorSpace: function(e, t) {
return this.convert(e, this._workingColorSpace, t)
},
toWorkingColorSpace: function(e, t) {
return this.convert(e, t, this._workingColorSpace)
},
getPrimaries: function(e) {
return Pi[e].primaries
},
getTransfer: function(e) {
return e === mr ? br : Pi[e].transfer
}
};
function Ii(e) {
return e < .04045 ? .0773993808 * e : Math.pow(.9478672986 * e + .0521327014, 2.4)
}
function Ni(e) {
return e < .0031308 ? 12.92 * e : 1.055 * Math.pow(e, .41666) - .055
}
let Di;
class ji {
static getDataURL(e) {
if (/^data:/i.test(e.src))
return e.src;
if ("undefined" === typeof HTMLCanvasElement)
return e.src;
let t;
if (e instanceof HTMLCanvasElement)
t = e;
else {
void 0 === Di && (Di = Mi("canvas")),
Di.width = e.width,
Di.height = e.height;
const n = Di.getContext("2d");
e instanceof ImageData ? n.putImageData(e, 0, 0) : n.drawImage(e, 0, 0, e.width, e.height),
t = Di
}
return t.width > 2048 || t.height > 2048 ? (console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons", e),
t.toDataURL("image/jpeg", .6)) : t.toDataURL("image/png")
}
static sRGBToLinear(e) {
if ("undefined" !== typeof HTMLImageElement && e instanceof HTMLImageElement || "undefined" !== typeof HTMLCanvasElement && e instanceof HTMLCanvasElement || "undefined" !== typeof ImageBitmap && e instanceof ImageBitmap) {
const t = Mi("canvas");
t.width = e.width,
t.height = e.height;
const n = t.getContext("2d");
n.drawImage(e, 0, 0, e.width, e.height);
const r = n.getImageData(0, 0, e.width, e.height)
, i = r.data;
for (let e = 0; e < i.length; e++)
i[e] = 255 * Ii(i[e] / 255);
return n.putImageData(r, 0, 0),
t
}
if (e.data) {
const t = e.data.slice(0);
for (let e = 0; e < t.length; e++)
t instanceof Uint8Array || t instanceof Uint8ClampedArray ? t[e] = Math.floor(255 * Ii(t[e] / 255)) : t[e] = Ii(t[e]);
return {
data: t,
width: e.width,
height: e.height
}
}
return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),
e
}
}
let Fi = 0;
class Oi {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : null;
this.isSource = !0,
Object.defineProperty(this, "id", {
value: Fi++
}),
this.uuid = hi(),
this.data = e,
this.dataReady = !0,
this.version = 0
}
set needsUpdate(e) {
!0 === e && this.version++
}
toJSON(e) {
const t = void 0 === e || "string" === typeof e;
if (!t && void 0 !== e.images[this.uuid])
return e.images[this.uuid];
const n = {
uuid: this.uuid,
url: ""
}
, r = this.data;
if (null !== r) {
let e;
if (Array.isArray(r)) {
e = [];
for (let t = 0, n = r.length; t < n; t++)
r[t].isDataTexture ? e.push(Ui(r[t].image)) : e.push(Ui(r[t]))
} else
e = Ui(r);
n.url = e
}
return t || (e.images[this.uuid] = n),
n
}
}
function Ui(e) {
return "undefined" !== typeof HTMLImageElement && e instanceof HTMLImageElement || "undefined" !== typeof HTMLCanvasElement && e instanceof HTMLCanvasElement || "undefined" !== typeof ImageBitmap && e instanceof ImageBitmap ? ji.getDataURL(e) : e.data ? {
data: Array.from(e.data),
width: e.width,
height: e.height,
type: e.data.constructor.name
} : (console.warn("THREE.Texture: Unable to serialize Texture."),
{})
}
let zi = 0;
class Gi extends oi {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : Gi.DEFAULT_IMAGE
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : Gi.DEFAULT_MAPPING
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : Dt
, r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : Dt
, i = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : Ht
, s = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : Jt
, a = arguments.length > 6 && void 0 !== arguments[6] ? arguments[6] : cn
, o = arguments.length > 7 && void 0 !== arguments[7] ? arguments[7] : Kt
, l = arguments.length > 8 && void 0 !== arguments[8] ? arguments[8] : Gi.DEFAULT_ANISOTROPY
, c = arguments.length > 9 && void 0 !== arguments[9] ? arguments[9] : mr;
super(),
this.isTexture = !0,
Object.defineProperty(this, "id", {
value: zi++
}),
this.uuid = hi(),
this.name = "",
this.source = new Oi(e),
this.mipmaps = [],
this.mapping = t,
this.channel = 0,
this.wrapS = n,
this.wrapT = r,
this.magFilter = i,
this.minFilter = s,
this.anisotropy = l,
this.format = a,
this.internalFormat = null,
this.type = o,
this.offset = new xi(0,0),
this.repeat = new xi(1,1),
this.center = new xi(0,0),
this.rotation = 0,
this.matrixAutoUpdate = !0,
this.matrix = new bi,
this.generateMipmaps = !0,
this.premultiplyAlpha = !1,
this.flipY = !0,
this.unpackAlignment = 4,
this.colorSpace = c,
this.userData = {},
this.version = 0,
this.onUpdate = null,
this.isRenderTargetTexture = !1,
this.pmremVersion = 0
}
get image() {
return this.source.data
}
set image(e) {
void 0 === e && (e = null),
this.source.data = e
}
updateMatrix() {
this.matrix.setUvTransform(this.offset.x, this.offset.y, this.repeat.x, this.repeat.y, this.rotation, this.center.x, this.center.y)
}
clone() {
return (new this.constructor).copy(this)
}
copy(e) {
return this.name = e.name,
this.source = e.source,
this.mipmaps = e.mipmaps.slice(0),
this.mapping = e.mapping,
this.channel = e.channel,
this.wrapS = e.wrapS,
this.wrapT = e.wrapT,
this.magFilter = e.magFilter,
this.minFilter = e.minFilter,
this.anisotropy = e.anisotropy,
this.format = e.format,
this.internalFormat = e.internalFormat,
this.type = e.type,
this.offset.copy(e.offset),
this.repeat.copy(e.repeat),
this.center.copy(e.center),
this.rotation = e.rotation,
this.matrixAutoUpdate = e.matrixAutoUpdate,
this.matrix.copy(e.matrix),
this.generateMipmaps = e.generateMipmaps,
this.premultiplyAlpha = e.premultiplyAlpha,
this.flipY = e.flipY,
this.unpackAlignment = e.unpackAlignment,
this.colorSpace = e.colorSpace,
this.userData = JSON.parse(JSON.stringify(e.userData)),
this.needsUpdate = !0,
this
}
toJSON(e) {
const t = void 0 === e || "string" === typeof e;
if (!t && void 0 !== e.textures[this.uuid])
return e.textures[this.uuid];
const n = {
metadata: {
version: 4.6,
type: "Texture",
generator: "Texture.toJSON"
},
uuid: this.uuid,
name: this.name,
image: this.source.toJSON(e).uuid,
mapping: this.mapping,
channel: this.channel,
repeat: [this.repeat.x, this.repeat.y],
offset: [this.offset.x, this.offset.y],
center: [this.center.x, this.center.y],
rotation: this.rotation,
wrap: [this.wrapS, this.wrapT],
format: this.format,
internalFormat: this.internalFormat,
type: this.type,
colorSpace: this.colorSpace,
minFilter: this.minFilter,
magFilter: this.magFilter,
anisotropy: this.anisotropy,
flipY: this.flipY,
generateMipmaps: this.generateMipmaps,
premultiplyAlpha: this.premultiplyAlpha,
unpackAlignment: this.unpackAlignment
};
return Object.keys(this.userData).length > 0 && (n.userData = this.userData),
t || (e.textures[this.uuid] = n),
n
}
dispose() {
this.dispatchEvent({
type: "dispose"
})
}
transformUv(e) {
if (this.mapping !== Rt)
return e;
if (e.applyMatrix3(this.matrix),
e.x < 0 || e.x > 1)
switch (this.wrapS) {
case Nt:
e.x = e.x - Math.floor(e.x);
break;
case Dt:
e.x = e.x < 0 ? 0 : 1;
break;
case jt:
1 === Math.abs(Math.floor(e.x) % 2) ? e.x = Math.ceil(e.x) - e.x : e.x = e.x - Math.floor(e.x)
}
if (e.y < 0 || e.y > 1)
switch (this.wrapT) {
case Nt:
e.y = e.y - Math.floor(e.y);
break;
case Dt:
e.y = e.y < 0 ? 0 : 1;
break;
case jt:
1 === Math.abs(Math.floor(e.y) % 2) ? e.y = Math.ceil(e.y) - e.y : e.y = e.y - Math.floor(e.y)
}
return this.flipY && (e.y = 1 - e.y),
e
}
set needsUpdate(e) {
!0 === e && (this.version++,
this.source.needsUpdate = !0)
}
set needsPMREMUpdate(e) {
!0 === e && this.pmremVersion++
}
}
Gi.DEFAULT_IMAGE = null,
Gi.DEFAULT_MAPPING = Rt,
Gi.DEFAULT_ANISOTROPY = 1;
class Hi {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 0
, r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : 1;
Hi.prototype.isVector4 = !0,
this.x = e,
this.y = t,
this.z = n,
this.w = r
}
get width() {
return this.z
}
set width(e) {
this.z = e
}
get height() {
return this.w
}
set height(e) {
this.w = e
}
set(e, t, n, r) {
return this.x = e,
this.y = t,
this.z = n,
this.w = r,
this
}
setScalar(e) {
return this.x = e,
this.y = e,
this.z = e,
this.w = e,
this
}
setX(e) {
return this.x = e,
this
}
setY(e) {
return this.y = e,
this
}
setZ(e) {
return this.z = e,
this
}
setW(e) {
return this.w = e,
this
}
setComponent(e, t) {
switch (e) {
case 0:
this.x = t;
break;
case 1:
this.y = t;
break;
case 2:
this.z = t;
break;
case 3:
this.w = t;
break;
default:
throw new Error("index is out of range: " + e)
}
return this
}
getComponent(e) {
switch (e) {
case 0:
return this.x;
case 1:
return this.y;
case 2:
return this.z;
case 3:
return this.w;
default:
throw new Error("index is out of range: " + e)
}
}
clone() {
return new this.constructor(this.x,this.y,this.z,this.w)
}
copy(e) {
return this.x = e.x,
this.y = e.y,
this.z = e.z,
this.w = void 0 !== e.w ? e.w : 1,
this
}
add(e) {
return this.x += e.x,
this.y += e.y,
this.z += e.z,
this.w += e.w,
this
}
addScalar(e) {
return this.x += e,
this.y += e,
this.z += e,
this.w += e,
this
}
addVectors(e, t) {
return this.x = e.x + t.x,
this.y = e.y + t.y,
this.z = e.z + t.z,
this.w = e.w + t.w,
this
}
addScaledVector(e, t) {
return this.x += e.x * t,
this.y += e.y * t,
this.z += e.z * t,
this.w += e.w * t,
this
}
sub(e) {
return this.x -= e.x,
this.y -= e.y,
this.z -= e.z,
this.w -= e.w,
this
}
subScalar(e) {
return this.x -= e,
this.y -= e,
this.z -= e,
this.w -= e,
this
}
subVectors(e, t) {
return this.x = e.x - t.x,
this.y = e.y - t.y,
this.z = e.z - t.z,
this.w = e.w - t.w,
this
}
multiply(e) {
return this.x *= e.x,
this.y *= e.y,
this.z *= e.z,
this.w *= e.w,
this
}
multiplyScalar(e) {
return this.x *= e,
this.y *= e,
this.z *= e,
this.w *= e,
this
}
applyMatrix4(e) {
const t = this.x
, n = this.y
, r = this.z
, i = this.w
, s = e.elements;
return this.x = s[0] * t + s[4] * n + s[8] * r + s[12] * i,
this.y = s[1] * t + s[5] * n + s[9] * r + s[13] * i,
this.z = s[2] * t + s[6] * n + s[10] * r + s[14] * i,
this.w = s[3] * t + s[7] * n + s[11] * r + s[15] * i,
this
}
divideScalar(e) {
return this.multiplyScalar(1 / e)
}
setAxisAngleFromQuaternion(e) {
this.w = 2 * Math.acos(e.w);
const t = Math.sqrt(1 - e.w * e.w);
return t < 1e-4 ? (this.x = 1,
this.y = 0,
this.z = 0) : (this.x = e.x / t,
this.y = e.y / t,
this.z = e.z / t),
this
}
setAxisAngleFromRotationMatrix(e) {
let t, n, r, i;
const s = .01
, a = .1
, o = e.elements
, l = o[0]
, c = o[4]
, u = o[8]
, d = o[1]
, h = o[5]
, p = o[9]
, f = o[2]
, m = o[6]
, g = o[10];
if (Math.abs(c - d) < s && Math.abs(u - f) < s && Math.abs(p - m) < s) {
if (Math.abs(c + d) < a && Math.abs(u + f) < a && Math.abs(p + m) < a && Math.abs(l + h + g - 3) < a)
return this.set(1, 0, 0, 0),
this;
t = Math.PI;
const e = (l + 1) / 2
, o = (h + 1) / 2
, v = (g + 1) / 2
, y = (c + d) / 4
, x = (u + f) / 4
, b = (p + m) / 4;
return e > o && e > v ? e < s ? (n = 0,
r = .707106781,
i = .707106781) : (n = Math.sqrt(e),
r = y / n,
i = x / n) : o > v ? o < s ? (n = .707106781,
r = 0,
i = .707106781) : (r = Math.sqrt(o),
n = y / r,
i = b / r) : v < s ? (n = .707106781,
r = .707106781,
i = 0) : (i = Math.sqrt(v),
n = x / i,
r = b / i),
this.set(n, r, i, t),
this
}
let v = Math.sqrt((m - p) * (m - p) + (u - f) * (u - f) + (d - c) * (d - c));
return Math.abs(v) < .001 && (v = 1),
this.x = (m - p) / v,
this.y = (u - f) / v,
this.z = (d - c) / v,
this.w = Math.acos((l + h + g - 1) / 2),
this
}
min(e) {
return this.x = Math.min(this.x, e.x),
this.y = Math.min(this.y, e.y),
this.z = Math.min(this.z, e.z),
this.w = Math.min(this.w, e.w),
this
}
max(e) {
return this.x = Math.max(this.x, e.x),
this.y = Math.max(this.y, e.y),
this.z = Math.max(this.z, e.z),
this.w = Math.max(this.w, e.w),
this
}
clamp(e, t) {
return this.x = Math.max(e.x, Math.min(t.x, this.x)),
this.y = Math.max(e.y, Math.min(t.y, this.y)),
this.z = Math.max(e.z, Math.min(t.z, this.z)),
this.w = Math.max(e.w, Math.min(t.w, this.w)),
this
}
clampScalar(e, t) {
return this.x = Math.max(e, Math.min(t, this.x)),
this.y = Math.max(e, Math.min(t, this.y)),
this.z = Math.max(e, Math.min(t, this.z)),
this.w = Math.max(e, Math.min(t, this.w)),
this
}
clampLength(e, t) {
const n = this.length();
return this.divideScalar(n || 1).multiplyScalar(Math.max(e, Math.min(t, n)))
}
floor() {
return this.x = Math.floor(this.x),
this.y = Math.floor(this.y),
this.z = Math.floor(this.z),
this.w = Math.floor(this.w),
this
}
ceil() {
return this.x = Math.ceil(this.x),
this.y = Math.ceil(this.y),
this.z = Math.ceil(this.z),
this.w = Math.ceil(this.w),
this
}
round() {
return this.x = Math.round(this.x),
this.y = Math.round(this.y),
this.z = Math.round(this.z),
this.w = Math.round(this.w),
this
}
roundToZero() {
return this.x = Math.trunc(this.x),
this.y = Math.trunc(this.y),
this.z = Math.trunc(this.z),
this.w = Math.trunc(this.w),
this
}
negate() {
return this.x = -this.x,
this.y = -this.y,
this.z = -this.z,
this.w = -this.w,
this
}
dot(e) {
return this.x * e.x + this.y * e.y + this.z * e.z + this.w * e.w
}
lengthSq() {
return this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w
}
length() {
return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w)
}
manhattanLength() {
return Math.abs(this.x) + Math.abs(this.y) + Math.abs(this.z) + Math.abs(this.w)
}
normalize() {
return this.divideScalar(this.length() || 1)
}
setLength(e) {
return this.normalize().multiplyScalar(e)
}
lerp(e, t) {
return this.x += (e.x - this.x) * t,
this.y += (e.y - this.y) * t,
this.z += (e.z - this.z) * t,
this.w += (e.w - this.w) * t,
this
}
lerpVectors(e, t, n) {
return this.x = e.x + (t.x - e.x) * n,
this.y = e.y + (t.y - e.y) * n,
this.z = e.z + (t.z - e.z) * n,
this.w = e.w + (t.w - e.w) * n,
this
}
equals(e) {
return e.x === this.x && e.y === this.y && e.z === this.z && e.w === this.w
}
fromArray(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;
return this.x = e[t],
this.y = e[t + 1],
this.z = e[t + 2],
this.w = e[t + 3],
this
}
toArray() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;
return e[t] = this.x,
e[t + 1] = this.y,
e[t + 2] = this.z,
e[t + 3] = this.w,
e
}
fromBufferAttribute(e, t) {
return this.x = e.getX(t),
this.y = e.getY(t),
this.z = e.getZ(t),
this.w = e.getW(t),
this
}
random() {
return this.x = Math.random(),
this.y = Math.random(),
this.z = Math.random(),
this.w = Math.random(),
this
}
*[Symbol.iterator]() {
yield this.x,
yield this.y,
yield this.z,
yield this.w
}
}
class Vi extends oi {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 1
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 1
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {};
super(),
this.isRenderTarget = !0,
this.width = e,
this.height = t,
this.depth = 1,
this.scissor = new Hi(0,0,e,t),
this.scissorTest = !1,
this.viewport = new Hi(0,0,e,t);
const r = {
width: e,
height: t,
depth: 1
};
n = Object.assign({
generateMipmaps: !1,
internalFormat: null,
minFilter: Ht,
depthBuffer: !0,
stencilBuffer: !1,
resolveDepthBuffer: !0,
resolveStencilBuffer: !0,
depthTexture: null,
samples: 0,
count: 1
}, n);
const i = new Gi(r,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.colorSpace);
i.flipY = !1,
i.generateMipmaps = n.generateMipmaps,
i.internalFormat = n.internalFormat,
this.textures = [];
const s = n.count;
for (let a = 0; a < s; a++)
this.textures[a] = i.clone(),
this.textures[a].isRenderTargetTexture = !0;
this.depthBuffer = n.depthBuffer,
this.stencilBuffer = n.stencilBuffer,
this.resolveDepthBuffer = n.resolveDepthBuffer,
this.resolveStencilBuffer = n.resolveStencilBuffer,
this.depthTexture = n.depthTexture,
this.samples = n.samples
}
get texture() {
return this.textures[0]
}
set texture(e) {
this.textures[0] = e
}
setSize(e, t) {
let n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 1;
if (this.width !== e || this.height !== t || this.depth !== n) {
this.width = e,
this.height = t,
this.depth = n;
for (let r = 0, i = this.textures.length; r < i; r++)
this.textures[r].image.width = e,
this.textures[r].image.height = t,
this.textures[r].image.depth = n;
this.dispose()
}
this.viewport.set(0, 0, e, t),
this.scissor.set(0, 0, e, t)
}
clone() {
return (new this.constructor).copy(this)
}
copy(e) {
this.width = e.width,
this.height = e.height,
this.depth = e.depth,
this.scissor.copy(e.scissor),
this.scissorTest = e.scissorTest,
this.viewport.copy(e.viewport),
this.textures.length = 0;
for (let n = 0, r = e.textures.length; n < r; n++)
this.textures[n] = e.textures[n].clone(),
this.textures[n].isRenderTargetTexture = !0;
const t = Object.assign({}, e.texture.image);
return this.texture.source = new Oi(t),
this.depthBuffer = e.depthBuffer,
this.stencilBuffer = e.stencilBuffer,
this.resolveDepthBuffer = e.resolveDepthBuffer,
this.resolveStencilBuffer = e.resolveStencilBuffer,
null !== e.depthTexture && (this.depthTexture = e.depthTexture.clone()),
this.samples = e.samples,
this
}
dispose() {
this.dispatchEvent({
type: "dispose"
})
}
}
class Wi extends Vi {
constructor() {
super(arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 1, arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 1, arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}),
this.isWebGLRenderTarget = !0
}
}
class Ji extends Gi {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : null
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 1
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 1
, r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : 1;
super(null),
this.isDataArrayTexture = !0,
this.image = {
data: e,
width: t,
height: n,
depth: r
},
this.magFilter = Ft,
this.minFilter = Ft,
this.wrapR = Dt,
this.generateMipmaps = !1,
this.flipY = !1,
this.unpackAlignment = 1,
this.layerUpdates = new Set
}
addLayerUpdate(e) {
this.layerUpdates.add(e)
}
clearLayerUpdates() {
this.layerUpdates.clear()
}
}
class Xi extends Wi {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 1
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 1
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 1;
super(e, t, arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {}),
this.isWebGLArrayRenderTarget = !0,
this.depth = n,
this.texture = new Ji(null,e,t,n),
this.texture.isRenderTargetTexture = !0
}
}
class Ki extends Gi {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : null
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 1
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 1
, r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : 1;
super(null),
this.isData3DTexture = !0,
this.image = {
data: e,
width: t,
height: n,
depth: r
},
this.magFilter = Ft,
this.minFilter = Ft,
this.wrapR = Dt,
this.generateMipmaps = !1,
this.flipY = !1,
this.unpackAlignment = 1
}
}
class qi extends Wi {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 1
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 1
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 1;
super(e, t, arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {}),
this.isWebGL3DRenderTarget = !0,
this.depth = n,
this.texture = new Ki(null,e,t,n),
this.texture.isRenderTargetTexture = !0
}
}
class Yi {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 0
, r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : 1;
this.isQuaternion = !0,
this._x = e,
this._y = t,
this._z = n,
this._w = r
}
static slerpFlat(e, t, n, r, i, s, a) {
let o = n[r + 0]
, l = n[r + 1]
, c = n[r + 2]
, u = n[r + 3];
const d = i[s + 0]
, h = i[s + 1]
, p = i[s + 2]
, f = i[s + 3];
if (0 === a)
return e[t + 0] = o,
e[t + 1] = l,
e[t + 2] = c,
void (e[t + 3] = u);
if (1 === a)
return e[t + 0] = d,
e[t + 1] = h,
e[t + 2] = p,
void (e[t + 3] = f);
if (u !== f || o !== d || l !== h || c !== p) {
let e = 1 - a;
const t = o * d + l * h + c * p + u * f
, n = t >= 0 ? 1 : -1
, r = 1 - t * t;
if (r > Number.EPSILON) {
const i = Math.sqrt(r)
, s = Math.atan2(i, t * n);
e = Math.sin(e * s) / i,
a = Math.sin(a * s) / i
}
const i = a * n;
if (o = o * e + d * i,
l = l * e + h * i,
c = c * e + p * i,
u = u * e + f * i,
e === 1 - a) {
const e = 1 / Math.sqrt(o * o + l * l + c * c + u * u);
o *= e,
l *= e,
c *= e,
u *= e
}
}
e[t] = o,
e[t + 1] = l,
e[t + 2] = c,
e[t + 3] = u
}
static multiplyQuaternionsFlat(e, t, n, r, i, s) {
const a = n[r]
, o = n[r + 1]
, l = n[r + 2]
, c = n[r + 3]
, u = i[s]
, d = i[s + 1]
, h = i[s + 2]
, p = i[s + 3];
return e[t] = a * p + c * u + o * h - l * d,
e[t + 1] = o * p + c * d + l * u - a * h,
e[t + 2] = l * p + c * h + a * d - o * u,
e[t + 3] = c * p - a * u - o * d - l * h,
e
}
get x() {
return this._x
}
set x(e) {
this._x = e,
this._onChangeCallback()
}
get y() {
return this._y
}
set y(e) {
this._y = e,
this._onChangeCallback()
}
get z() {
return this._z
}
set z(e) {
this._z = e,
this._onChangeCallback()
}
get w() {
return this._w
}
set w(e) {
this._w = e,
this._onChangeCallback()
}
set(e, t, n, r) {
return this._x = e,
this._y = t,
this._z = n,
this._w = r,
this._onChangeCallback(),
this
}
clone() {
return new this.constructor(this._x,this._y,this._z,this._w)
}
copy(e) {
return this._x = e.x,
this._y = e.y,
this._z = e.z,
this._w = e.w,
this._onChangeCallback(),
this
}
setFromEuler(e) {
let t = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1];
const n = e._x
, r = e._y
, i = e._z
, s = e._order
, a = Math.cos
, o = Math.sin
, l = a(n / 2)
, c = a(r / 2)
, u = a(i / 2)
, d = o(n / 2)
, h = o(r / 2)
, p = o(i / 2);
switch (s) {
case "XYZ":
this._x = d * c * u + l * h * p,
this._y = l * h * u - d * c * p,
this._z = l * c * p + d * h * u,
this._w = l * c * u - d * h * p;
break;
case "YXZ":
this._x = d * c * u + l * h * p,
this._y = l * h * u - d * c * p,
this._z = l * c * p - d * h * u,
this._w = l * c * u + d * h * p;
break;
case "ZXY":
this._x = d * c * u - l * h * p,
this._y = l * h * u + d * c * p,
this._z = l * c * p + d * h * u,
this._w = l * c * u - d * h * p;
break;
case "ZYX":
this._x = d * c * u - l * h * p,
this._y = l * h * u + d * c * p,
this._z = l * c * p - d * h * u,
this._w = l * c * u + d * h * p;
break;
case "YZX":
this._x = d * c * u + l * h * p,
this._y = l * h * u + d * c * p,
this._z = l * c * p - d * h * u,
this._w = l * c * u - d * h * p;
break;
case "XZY":
this._x = d * c * u - l * h * p,
this._y = l * h * u - d * c * p,
this._z = l * c * p + d * h * u,
this._w = l * c * u + d * h * p;
break;
default:
console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: " + s)
}
return !0 === t && this._onChangeCallback(),
this
}
setFromAxisAngle(e, t) {
const n = t / 2
, r = Math.sin(n);
return this._x = e.x * r,
this._y = e.y * r,
this._z = e.z * r,
this._w = Math.cos(n),
this._onChangeCallback(),
this
}
setFromRotationMatrix(e) {
const t = e.elements
, n = t[0]
, r = t[4]
, i = t[8]
, s = t[1]
, a = t[5]
, o = t[9]
, l = t[2]
, c = t[6]
, u = t[10]
, d = n + a + u;
if (d > 0) {
const e = .5 / Math.sqrt(d + 1);
this._w = .25 / e,
this._x = (c - o) * e,
this._y = (i - l) * e,
this._z = (s - r) * e
} else if (n > a && n > u) {
const e = 2 * Math.sqrt(1 + n - a - u);
this._w = (c - o) / e,
this._x = .25 * e,
this._y = (r + s) / e,
this._z = (i + l) / e
} else if (a > u) {
const e = 2 * Math.sqrt(1 + a - n - u);
this._w = (i - l) / e,
this._x = (r + s) / e,
this._y = .25 * e,
this._z = (o + c) / e
} else {
const e = 2 * Math.sqrt(1 + u - n - a);
this._w = (s - r) / e,
this._x = (i + l) / e,
this._y = (o + c) / e,
this._z = .25 * e
}
return this._onChangeCallback(),
this
}
setFromUnitVectors(e, t) {
let n = e.dot(t) + 1;
return n < Number.EPSILON ? (n = 0,
Math.abs(e.x) > Math.abs(e.z) ? (this._x = -e.y,
this._y = e.x,
this._z = 0,
this._w = n) : (this._x = 0,
this._y = -e.z,
this._z = e.y,
this._w = n)) : (this._x = e.y * t.z - e.z * t.y,
this._y = e.z * t.x - e.x * t.z,
this._z = e.x * t.y - e.y * t.x,
this._w = n),
this.normalize()
}
angleTo(e) {
return 2 * Math.acos(Math.abs(pi(this.dot(e), -1, 1)))
}
rotateTowards(e, t) {
const n = this.angleTo(e);
if (0 === n)
return this;
const r = Math.min(1, t / n);
return this.slerp(e, r),
this
}
identity() {
return this.set(0, 0, 0, 1)
}
invert() {
return this.conjugate()
}
conjugate() {
return this._x *= -1,
this._y *= -1,
this._z *= -1,
this._onChangeCallback(),
this
}
dot(e) {
return this._x * e._x + this._y * e._y + this._z * e._z + this._w * e._w
}
lengthSq() {
return this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w
}
length() {
return Math.sqrt(this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w)
}
normalize() {
let e = this.length();
return 0 === e ? (this._x = 0,
this._y = 0,
this._z = 0,
this._w = 1) : (e = 1 / e,
this._x = this._x * e,
this._y = this._y * e,
this._z = this._z * e,
this._w = this._w * e),
this._onChangeCallback(),
this
}
multiply(e) {
return this.multiplyQuaternions(this, e)
}
premultiply(e) {
return this.multiplyQuaternions(e, this)
}
multiplyQuaternions(e, t) {
const n = e._x
, r = e._y
, i = e._z
, s = e._w
, a = t._x
, o = t._y
, l = t._z
, c = t._w;
return this._x = n * c + s * a + r * l - i * o,
this._y = r * c + s * o + i * a - n * l,
this._z = i * c + s * l + n * o - r * a,
this._w = s * c - n * a - r * o - i * l,
this._onChangeCallback(),
this
}
slerp(e, t) {
if (0 === t)
return this;
if (1 === t)
return this.copy(e);
const n = this._x
, r = this._y
, i = this._z
, s = this._w;
let a = s * e._w + n * e._x + r * e._y + i * e._z;
if (a < 0 ? (this._w = -e._w,
this._x = -e._x,
this._y = -e._y,
this._z = -e._z,
a = -a) : this.copy(e),
a >= 1)
return this._w = s,
this._x = n,
this._y = r,
this._z = i,
this;
const o = 1 - a * a;
if (o <= Number.EPSILON) {
const e = 1 - t;
return this._w = e * s + t * this._w,
this._x = e * n + t * this._x,
this._y = e * r + t * this._y,
this._z = e * i + t * this._z,
this.normalize(),
this
}
const l = Math.sqrt(o)
, c = Math.atan2(l, a)
, u = Math.sin((1 - t) * c) / l
, d = Math.sin(t * c) / l;
return this._w = s * u + this._w * d,
this._x = n * u + this._x * d,
this._y = r * u + this._y * d,
this._z = i * u + this._z * d,
this._onChangeCallback(),
this
}
slerpQuaternions(e, t, n) {
return this.copy(e).slerp(t, n)
}
random() {
const e = 2 * Math.PI * Math.random()
, t = 2 * Math.PI * Math.random()
, n = Math.random()
, r = Math.sqrt(1 - n)
, i = Math.sqrt(n);
return this.set(r * Math.sin(e), r * Math.cos(e), i * Math.sin(t), i * Math.cos(t))
}
equals(e) {
return e._x === this._x && e._y === this._y && e._z === this._z && e._w === this._w
}
fromArray(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;
return this._x = e[t],
this._y = e[t + 1],
this._z = e[t + 2],
this._w = e[t + 3],
this._onChangeCallback(),
this
}
toArray() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;
return e[t] = this._x,
e[t + 1] = this._y,
e[t + 2] = this._z,
e[t + 3] = this._w,
e
}
fromBufferAttribute(e, t) {
return this._x = e.getX(t),
this._y = e.getY(t),
this._z = e.getZ(t),
this._w = e.getW(t),
this._onChangeCallback(),
this
}
toJSON() {
return this.toArray()
}
_onChange(e) {
return this._onChangeCallback = e,
this
}
_onChangeCallback() {}
*[Symbol.iterator]() {
yield this._x,
yield this._y,
yield this._z,
yield this._w
}
}
class Qi {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 0;
Qi.prototype.isVector3 = !0,
this.x = e,
this.y = t,
this.z = n
}
set(e, t, n) {
return void 0 === n && (n = this.z),
this.x = e,
this.y = t,
this.z = n,
this
}
setScalar(e) {
return this.x = e,
this.y = e,
this.z = e,
this
}
setX(e) {
return this.x = e,
this
}
setY(e) {
return this.y = e,
this
}
setZ(e) {
return this.z = e,
this
}
setComponent(e, t) {
switch (e) {
case 0:
this.x = t;
break;
case 1:
this.y = t;
break;
case 2:
this.z = t;
break;
default:
throw new Error("index is out of range: " + e)
}
return this
}
getComponent(e) {
switch (e) {
case 0:
return this.x;
case 1:
return this.y;
case 2:
return this.z;
default:
throw new Error("index is out of range: " + e)
}
}
clone() {
return new this.constructor(this.x,this.y,this.z)
}
copy(e) {
return this.x = e.x,
this.y = e.y,
this.z = e.z,
this
}
add(e) {
return this.x += e.x,
this.y += e.y,
this.z += e.z,
this
}
addScalar(e) {
return this.x += e,
this.y += e,
this.z += e,
this
}
addVectors(e, t) {
return this.x = e.x + t.x,
this.y = e.y + t.y,
this.z = e.z + t.z,
this
}
addScaledVector(e, t) {
return this.x += e.x * t,
this.y += e.y * t,
this.z += e.z * t,
this
}
sub(e) {
return this.x -= e.x,
this.y -= e.y,
this.z -= e.z,
this
}
subScalar(e) {
return this.x -= e,
this.y -= e,
this.z -= e,
this
}
subVectors(e, t) {
return this.x = e.x - t.x,
this.y = e.y - t.y,
this.z = e.z - t.z,
this
}
multiply(e) {
return this.x *= e.x,
this.y *= e.y,
this.z *= e.z,
this
}
multiplyScalar(e) {
return this.x *= e,
this.y *= e,
this.z *= e,
this
}
multiplyVectors(e, t) {
return this.x = e.x * t.x,
this.y = e.y * t.y,
this.z = e.z * t.z,
this
}
applyEuler(e) {
return this.applyQuaternion($i.setFromEuler(e))
}
applyAxisAngle(e, t) {
return this.applyQuaternion($i.setFromAxisAngle(e, t))
}
applyMatrix3(e) {
const t = this.x
, n = this.y
, r = this.z
, i = e.elements;
return this.x = i[0] * t + i[3] * n + i[6] * r,
this.y = i[1] * t + i[4] * n + i[7] * r,
this.z = i[2] * t + i[5] * n + i[8] * r,
this
}
applyNormalMatrix(e) {
return this.applyMatrix3(e).normalize()
}
applyMatrix4(e) {
const t = this.x
, n = this.y
, r = this.z
, i = e.elements
, s = 1 / (i[3] * t + i[7] * n + i[11] * r + i[15]);
return this.x = (i[0] * t + i[4] * n + i[8] * r + i[12]) * s,
this.y = (i[1] * t + i[5] * n + i[9] * r + i[13]) * s,
this.z = (i[2] * t + i[6] * n + i[10] * r + i[14]) * s,
this
}
applyQuaternion(e) {
const t = this.x
, n = this.y
, r = this.z
, i = e.x
, s = e.y
, a = e.z
, o = e.w
, l = 2 * (s * r - a * n)
, c = 2 * (a * t - i * r)
, u = 2 * (i * n - s * t);
return this.x = t + o * l + s * u - a * c,
this.y = n + o * c + a * l - i * u,
this.z = r + o * u + i * c - s * l,
this
}
project(e) {
return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)
}
unproject(e) {
return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)
}
transformDirection(e) {
const t = this.x
, n = this.y
, r = this.z
, i = e.elements;
return this.x = i[0] * t + i[4] * n + i[8] * r,
this.y = i[1] * t + i[5] * n + i[9] * r,
this.z = i[2] * t + i[6] * n + i[10] * r,
this.normalize()
}
divide(e) {
return this.x /= e.x,
this.y /= e.y,
this.z /= e.z,
this
}
divideScalar(e) {
return this.multiplyScalar(1 / e)
}
min(e) {
return this.x = Math.min(this.x, e.x),
this.y = Math.min(this.y, e.y),
this.z = Math.min(this.z, e.z),
this
}
max(e) {
return this.x = Math.max(this.x, e.x),
this.y = Math.max(this.y, e.y),
this.z = Math.max(this.z, e.z),
this
}
clamp(e, t) {
return this.x = Math.max(e.x, Math.min(t.x, this.x)),
this.y = Math.max(e.y, Math.min(t.y, this.y)),
this.z = Math.max(e.z, Math.min(t.z, this.z)),
this
}
clampScalar(e, t) {
return this.x = Math.max(e, Math.min(t, this.x)),
this.y = Math.max(e, Math.min(t, this.y)),
this.z = Math.max(e, Math.min(t, this.z)),
this
}
clampLength(e, t) {
const n = this.length();
return this.divideScalar(n || 1).multiplyScalar(Math.max(e, Math.min(t, n)))
}
floor() {
return this.x = Math.floor(this.x),
this.y = Math.floor(this.y),
this.z = Math.floor(this.z),
this
}
ceil() {
return this.x = Math.ceil(this.x),
this.y = Math.ceil(this.y),
this.z = Math.ceil(this.z),
this
}
round() {
return this.x = Math.round(this.x),
this.y = Math.round(this.y),
this.z = Math.round(this.z),
this
}
roundToZero() {
return this.x = Math.trunc(this.x),
this.y = Math.trunc(this.y),
this.z = Math.trunc(this.z),
this
}
negate() {
return this.x = -this.x,
this.y = -this.y,
this.z = -this.z,
this
}
dot(e) {
return this.x * e.x + this.y * e.y + this.z * e.z
}
lengthSq() {
return this.x * this.x + this.y * this.y + this.z * this.z
}
length() {
return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z)
}
manhattanLength() {
return Math.abs(this.x) + Math.abs(this.y) + Math.abs(this.z)
}
normalize() {
return this.divideScalar(this.length() || 1)
}
setLength(e) {
return this.normalize().multiplyScalar(e)
}
lerp(e, t) {
return this.x += (e.x - this.x) * t,
this.y += (e.y - this.y) * t,
this.z += (e.z - this.z) * t,
this
}
lerpVectors(e, t, n) {
return this.x = e.x + (t.x - e.x) * n,
this.y = e.y + (t.y - e.y) * n,
this.z = e.z + (t.z - e.z) * n,
this
}
cross(e) {
return this.crossVectors(this, e)
}
crossVectors(e, t) {
const n = e.x
, r = e.y
, i = e.z
, s = t.x
, a = t.y
, o = t.z;
return this.x = r * o - i * a,
this.y = i * s - n * o,
this.z = n * a - r * s,
this
}
projectOnVector(e) {
const t = e.lengthSq();
if (0 === t)
return this.set(0, 0, 0);
const n = e.dot(this) / t;
return this.copy(e).multiplyScalar(n)
}
projectOnPlane(e) {
return Zi.copy(this).projectOnVector(e),
this.sub(Zi)
}
reflect(e) {
return this.sub(Zi.copy(e).multiplyScalar(2 * this.dot(e)))
}
angleTo(e) {
const t = Math.sqrt(this.lengthSq() * e.lengthSq());
if (0 === t)
return Math.PI / 2;
const n = this.dot(e) / t;
return Math.acos(pi(n, -1, 1))
}
distanceTo(e) {
return Math.sqrt(this.distanceToSquared(e))
}
distanceToSquared(e) {
const t = this.x - e.x
, n = this.y - e.y
, r = this.z - e.z;
return t * t + n * n + r * r
}
manhattanDistanceTo(e) {
return Math.abs(this.x - e.x) + Math.abs(this.y - e.y) + Math.abs(this.z - e.z)
}
setFromSpherical(e) {
return this.setFromSphericalCoords(e.radius, e.phi, e.theta)
}
setFromSphericalCoords(e, t, n) {
const r = Math.sin(t) * e;
return this.x = r * Math.sin(n),
this.y = Math.cos(t) * e,
this.z = r * Math.cos(n),
this
}
setFromCylindrical(e) {
return this.setFromCylindricalCoords(e.radius, e.theta, e.y)
}
setFromCylindricalCoords(e, t, n) {
return this.x = e * Math.sin(t),
this.y = n,
this.z = e * Math.cos(t),
this
}
setFromMatrixPosition(e) {
const t = e.elements;
return this.x = t[12],
this.y = t[13],
this.z = t[14],
this
}
setFromMatrixScale(e) {
const t = this.setFromMatrixColumn(e, 0).length()
, n = this.setFromMatrixColumn(e, 1).length()
, r = this.setFromMatrixColumn(e, 2).length();
return this.x = t,
this.y = n,
this.z = r,
this
}
setFromMatrixColumn(e, t) {
return this.fromArray(e.elements, 4 * t)
}
setFromMatrix3Column(e, t) {
return this.fromArray(e.elements, 3 * t)
}
setFromEuler(e) {
return this.x = e._x,
this.y = e._y,
this.z = e._z,
this
}
setFromColor(e) {
return this.x = e.r,
this.y = e.g,
this.z = e.b,
this
}
equals(e) {
return e.x === this.x && e.y === this.y && e.z === this.z
}
fromArray(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;
return this.x = e[t],
this.y = e[t + 1],
this.z = e[t + 2],
this
}
toArray() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;
return e[t] = this.x,
e[t + 1] = this.y,
e[t + 2] = this.z,
e
}
fromBufferAttribute(e, t) {
return this.x = e.getX(t),
this.y = e.getY(t),
this.z = e.getZ(t),
this
}
random() {
return this.x = Math.random(),
this.y = Math.random(),
this.z = Math.random(),
this
}
randomDirection() {
const e = Math.random() * Math.PI * 2
, t = 2 * Math.random() - 1
, n = Math.sqrt(1 - t * t);
return this.x = n * Math.cos(e),
this.y = t,
this.z = n * Math.sin(e),
this
}
*[Symbol.iterator]() {
yield this.x,
yield this.y,
yield this.z
}
}
const Zi = new Qi
, $i = new Yi;
class es {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : new Qi(1 / 0,1 / 0,1 / 0)
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : new Qi(-1 / 0,-1 / 0,-1 / 0);
this.isBox3 = !0,
this.min = e,
this.max = t
}
set(e, t) {
return this.min.copy(e),
this.max.copy(t),
this
}
setFromArray(e) {
this.makeEmpty();
for (let t = 0, n = e.length; t < n; t += 3)
this.expandByPoint(ns.fromArray(e, t));
return this
}
setFromBufferAttribute(e) {
this.makeEmpty();
for (let t = 0, n = e.count; t < n; t++)
this.expandByPoint(ns.fromBufferAttribute(e, t));
return this
}
setFromPoints(e) {
this.makeEmpty();
for (let t = 0, n = e.length; t < n; t++)
this.expandByPoint(e[t]);
return this
}
setFromCenterAndSize(e, t) {
const n = ns.copy(t).multiplyScalar(.5);
return this.min.copy(e).sub(n),
this.max.copy(e).add(n),
this
}
setFromObject(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1];
return this.makeEmpty(),
this.expandByObject(e, t)
}
clone() {
return (new this.constructor).copy(this)
}
copy(e) {
return this.min.copy(e.min),
this.max.copy(e.max),
this
}
makeEmpty() {
return this.min.x = this.min.y = this.min.z = 1 / 0,
this.max.x = this.max.y = this.max.z = -1 / 0,
this
}
isEmpty() {
return this.max.x < this.min.x || this.max.y < this.min.y || this.max.z < this.min.z
}
getCenter(e) {
return this.isEmpty() ? e.set(0, 0, 0) : e.addVectors(this.min, this.max).multiplyScalar(.5)
}
getSize(e) {
return this.isEmpty() ? e.set(0, 0, 0) : e.subVectors(this.max, this.min)
}
expandByPoint(e) {
return this.min.min(e),
this.max.max(e),
this
}
expandByVector(e) {
return this.min.sub(e),
this.max.add(e),
this
}
expandByScalar(e) {
return this.min.addScalar(-e),
this.max.addScalar(e),
this
}
expandByObject(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1];
e.updateWorldMatrix(!1, !1);
const n = e.geometry;
if (void 0 !== n) {
const r = n.getAttribute("position");
if (!0 === t && void 0 !== r && !0 !== e.isInstancedMesh)
for (let t = 0, n = r.count; t < n; t++)
!0 === e.isMesh ? e.getVertexPosition(t, ns) : ns.fromBufferAttribute(r, t),
ns.applyMatrix4(e.matrixWorld),
this.expandByPoint(ns);
else
void 0 !== e.boundingBox ? (null === e.boundingBox && e.computeBoundingBox(),
rs.copy(e.boundingBox)) : (null === n.boundingBox && n.computeBoundingBox(),
rs.copy(n.boundingBox)),
rs.applyMatrix4(e.matrixWorld),
this.union(rs)
}
const r = e.children;
for (let i = 0, s = r.length; i < s; i++)
this.expandByObject(r[i], t);
return this
}
containsPoint(e) {
return !(e.x < this.min.x || e.x > this.max.x || e.y < this.min.y || e.y > this.max.y || e.z < this.min.z || e.z > this.max.z)
}
containsBox(e) {
return this.min.x <= e.min.x && e.max.x <= this.max.x && this.min.y <= e.min.y && e.max.y <= this.max.y && this.min.z <= e.min.z && e.max.z <= this.max.z
}
getParameter(e, t) {
return t.set((e.x - this.min.x) / (this.max.x - this.min.x), (e.y - this.min.y) / (this.max.y - this.min.y), (e.z - this.min.z) / (this.max.z - this.min.z))
}
intersectsBox(e) {
return !(e.max.x < this.min.x || e.min.x > this.max.x || e.max.y < this.min.y || e.min.y > this.max.y || e.max.z < this.min.z || e.min.z > this.max.z)
}
intersectsSphere(e) {
return this.clampPoint(e.center, ns),
ns.distanceToSquared(e.center) <= e.radius * e.radius
}
intersectsPlane(e) {
let t, n;
return e.normal.x > 0 ? (t = e.normal.x * this.min.x,
n = e.normal.x * this.max.x) : (t = e.normal.x * this.max.x,
n = e.normal.x * this.min.x),
e.normal.y > 0 ? (t += e.normal.y * this.min.y,
n += e.normal.y * this.max.y) : (t += e.normal.y * this.max.y,
n += e.normal.y * this.min.y),
e.normal.z > 0 ? (t += e.normal.z * this.min.z,
n += e.normal.z * this.max.z) : (t += e.normal.z * this.max.z,
n += e.normal.z * this.min.z),
t <= -e.constant && n >= -e.constant
}
intersectsTriangle(e) {
if (this.isEmpty())
return !1;
this.getCenter(us),
ds.subVectors(this.max, us),
is.subVectors(e.a, us),
ss.subVectors(e.b, us),
as.subVectors(e.c, us),
os.subVectors(ss, is),
ls.subVectors(as, ss),
cs.subVectors(is, as);
let t = [0, -os.z, os.y, 0, -ls.z, ls.y, 0, -cs.z, cs.y, os.z, 0, -os.x, ls.z, 0, -ls.x, cs.z, 0, -cs.x, -os.y, os.x, 0, -ls.y, ls.x, 0, -cs.y, cs.x, 0];
return !!fs(t, is, ss, as, ds) && (t = [1, 0, 0, 0, 1, 0, 0, 0, 1],
!!fs(t, is, ss, as, ds) && (hs.crossVectors(os, ls),
t = [hs.x, hs.y, hs.z],
fs(t, is, ss, as, ds)))
}
clampPoint(e, t) {
return t.copy(e).clamp(this.min, this.max)
}
distanceToPoint(e) {
return this.clampPoint(e, ns).distanceTo(e)
}
getBoundingSphere(e) {
return this.isEmpty() ? e.makeEmpty() : (this.getCenter(e.center),
e.radius = .5 * this.getSize(ns).length()),
e
}
intersect(e) {
return this.min.max(e.min),
this.max.min(e.max),
this.isEmpty() && this.makeEmpty(),
this
}
union(e) {
return this.min.min(e.min),
this.max.max(e.max),
this
}
applyMatrix4(e) {
return this.isEmpty() || (ts[0].set(this.min.x, this.min.y, this.min.z).applyMatrix4(e),
ts[1].set(this.min.x, this.min.y, this.max.z).applyMatrix4(e),
ts[2].set(this.min.x, this.max.y, this.min.z).applyMatrix4(e),
ts[3].set(this.min.x, this.max.y, this.max.z).applyMatrix4(e),
ts[4].set(this.max.x, this.min.y, this.min.z).applyMatrix4(e),
ts[5].set(this.max.x, this.min.y, this.max.z).applyMatrix4(e),
ts[6].set(this.max.x, this.max.y, this.min.z).applyMatrix4(e),
ts[7].set(this.max.x, this.max.y, this.max.z).applyMatrix4(e),
this.setFromPoints(ts)),
this
}
translate(e) {
return this.min.add(e),
this.max.add(e),
this
}
equals(e) {
return e.min.equals(this.min) && e.max.equals(this.max)
}
}
const ts = [new Qi, new Qi, new Qi, new Qi, new Qi, new Qi, new Qi, new Qi]
, ns = new Qi
, rs = new es
, is = new Qi
, ss = new Qi
, as = new Qi
, os = new Qi
, ls = new Qi
, cs = new Qi
, us = new Qi
, ds = new Qi
, hs = new Qi
, ps = new Qi;
function fs(e, t, n, r, i) {
for (let s = 0, a = e.length - 3; s <= a; s += 3) {
ps.fromArray(e, s);
const a = i.x * Math.abs(ps.x) + i.y * Math.abs(ps.y) + i.z * Math.abs(ps.z)
, o = t.dot(ps)
, l = n.dot(ps)
, c = r.dot(ps);
if (Math.max(-Math.max(o, l, c), Math.min(o, l, c)) > a)
return !1
}
return !0
}
const ms = new es
, gs = new Qi
, vs = new Qi;
class ys {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : new Qi
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : -1;
this.isSphere = !0,
this.center = e,
this.radius = t
}
set(e, t) {
return this.center.copy(e),
this.radius = t,
this
}
setFromPoints(e, t) {
const n = this.center;
void 0 !== t ? n.copy(t) : ms.setFromPoints(e).getCenter(n);
let r = 0;
for (let i = 0, s = e.length; i < s; i++)
r = Math.max(r, n.distanceToSquared(e[i]));
return this.radius = Math.sqrt(r),
this
}
copy(e) {
return this.center.copy(e.center),
this.radius = e.radius,
this
}
isEmpty() {
return this.radius < 0
}
makeEmpty() {
return this.center.set(0, 0, 0),
this.radius = -1,
this
}
containsPoint(e) {
return e.distanceToSquared(this.center) <= this.radius * this.radius
}
distanceToPoint(e) {
return e.distanceTo(this.center) - this.radius
}
intersectsSphere(e) {
const t = this.radius + e.radius;
return e.center.distanceToSquared(this.center) <= t * t
}
intersectsBox(e) {
return e.intersectsSphere(this)
}
intersectsPlane(e) {
return Math.abs(e.distanceToPoint(this.center)) <= this.radius
}
clampPoint(e, t) {
const n = this.center.distanceToSquared(e);
return t.copy(e),
n > this.radius * this.radius && (t.sub(this.center).normalize(),
t.multiplyScalar(this.radius).add(this.center)),
t
}
getBoundingBox(e) {
return this.isEmpty() ? (e.makeEmpty(),
e) : (e.set(this.center, this.center),
e.expandByScalar(this.radius),
e)
}
applyMatrix4(e) {
return this.center.applyMatrix4(e),
this.radius = this.radius * e.getMaxScaleOnAxis(),
this
}
translate(e) {
return this.center.add(e),
this
}
expandByPoint(e) {
if (this.isEmpty())
return this.center.copy(e),
this.radius = 0,
this;
gs.subVectors(e, this.center);
const t = gs.lengthSq();
if (t > this.radius * this.radius) {
const e = Math.sqrt(t)
, n = .5 * (e - this.radius);
this.center.addScaledVector(gs, n / e),
this.radius += n
}
return this
}
union(e) {
return e.isEmpty() ? this : this.isEmpty() ? (this.copy(e),
this) : (!0 === this.center.equals(e.center) ? this.radius = Math.max(this.radius, e.radius) : (vs.subVectors(e.center, this.center).setLength(e.radius),
this.expandByPoint(gs.copy(e.center).add(vs)),
this.expandByPoint(gs.copy(e.center).sub(vs))),
this)
}
equals(e) {
return e.center.equals(this.center) && e.radius === this.radius
}
clone() {
return (new this.constructor).copy(this)
}
}
const xs = new Qi
, bs = new Qi
, _s = new Qi
, ws = new Qi
, Ss = new Qi
, As = new Qi
, Ms = new Qi;
class Cs {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : new Qi
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : new Qi(0,0,-1);
this.origin = e,
this.direction = t
}
set(e, t) {
return this.origin.copy(e),
this.direction.copy(t),
this
}
copy(e) {
return this.origin.copy(e.origin),
this.direction.copy(e.direction),
this
}
at(e, t) {
return t.copy(this.origin).addScaledVector(this.direction, e)
}
lookAt(e) {
return this.direction.copy(e).sub(this.origin).normalize(),
this
}
recast(e) {
return this.origin.copy(this.at(e, xs)),
this
}
closestPointToPoint(e, t) {
t.subVectors(e, this.origin);
const n = t.dot(this.direction);
return n < 0 ? t.copy(this.origin) : t.copy(this.origin).addScaledVector(this.direction, n)
}
distanceToPoint(e) {
return Math.sqrt(this.distanceSqToPoint(e))
}
distanceSqToPoint(e) {
const t = xs.subVectors(e, this.origin).dot(this.direction);
return t < 0 ? this.origin.distanceToSquared(e) : (xs.copy(this.origin).addScaledVector(this.direction, t),
xs.distanceToSquared(e))
}
distanceSqToSegment(e, t, n, r) {
bs.copy(e).add(t).multiplyScalar(.5),
_s.copy(t).sub(e).normalize(),
ws.copy(this.origin).sub(bs);
const i = .5 * e.distanceTo(t)
, s = -this.direction.dot(_s)
, a = ws.dot(this.direction)
, o = -ws.dot(_s)
, l = ws.lengthSq()
, c = Math.abs(1 - s * s);
let u, d, h, p;
if (c > 0)
if (u = s * o - a,
d = s * a - o,
p = i * c,
u >= 0)
if (d >= -p)
if (d <= p) {
const e = 1 / c;
u *= e,
d *= e,
h = u * (u + s * d + 2 * a) + d * (s * u + d + 2 * o) + l
} else
d = i,
u = Math.max(0, -(s * d + a)),
h = -u * u + d * (d + 2 * o) + l;
else
d = -i,
u = Math.max(0, -(s * d + a)),
h = -u * u + d * (d + 2 * o) + l;
else
d <= -p ? (u = Math.max(0, -(-s * i + a)),
d = u > 0 ? -i : Math.min(Math.max(-i, -o), i),
h = -u * u + d * (d + 2 * o) + l) : d <= p ? (u = 0,
d = Math.min(Math.max(-i, -o), i),
h = d * (d + 2 * o) + l) : (u = Math.max(0, -(s * i + a)),
d = u > 0 ? i : Math.min(Math.max(-i, -o), i),
h = -u * u + d * (d + 2 * o) + l);
else
d = s > 0 ? -i : i,
u = Math.max(0, -(s * d + a)),
h = -u * u + d * (d + 2 * o) + l;
return n && n.copy(this.origin).addScaledVector(this.direction, u),
r && r.copy(bs).addScaledVector(_s, d),
h
}
intersectSphere(e, t) {
xs.subVectors(e.center, this.origin);
const n = xs.dot(this.direction)
, r = xs.dot(xs) - n * n
, i = e.radius * e.radius;
if (r > i)
return null;
const s = Math.sqrt(i - r)
, a = n - s
, o = n + s;
return o < 0 ? null : a < 0 ? this.at(o, t) : this.at(a, t)
}
intersectsSphere(e) {
return this.distanceSqToPoint(e.center) <= e.radius * e.radius
}
distanceToPlane(e) {
const t = e.normal.dot(this.direction);
if (0 === t)
return 0 === e.distanceToPoint(this.origin) ? 0 : null;
const n = -(this.origin.dot(e.normal) + e.constant) / t;
return n >= 0 ? n : null
}
intersectPlane(e, t) {
const n = this.distanceToPlane(e);
return null === n ? null : this.at(n, t)
}
intersectsPlane(e) {
const t = e.distanceToPoint(this.origin);
if (0 === t)
return !0;
return e.normal.dot(this.direction) * t < 0
}
intersectBox(e, t) {
let n, r, i, s, a, o;
const l = 1 / this.direction.x
, c = 1 / this.direction.y
, u = 1 / this.direction.z
, d = this.origin;
return l >= 0 ? (n = (e.min.x - d.x) * l,
r = (e.max.x - d.x) * l) : (n = (e.max.x - d.x) * l,
r = (e.min.x - d.x) * l),
c >= 0 ? (i = (e.min.y - d.y) * c,
s = (e.max.y - d.y) * c) : (i = (e.max.y - d.y) * c,
s = (e.min.y - d.y) * c),
n > s || i > r ? null : ((i > n || isNaN(n)) && (n = i),
(s < r || isNaN(r)) && (r = s),
u >= 0 ? (a = (e.min.z - d.z) * u,
o = (e.max.z - d.z) * u) : (a = (e.max.z - d.z) * u,
o = (e.min.z - d.z) * u),
n > o || a > r ? null : ((a > n || n !== n) && (n = a),
(o < r || r !== r) && (r = o),
r < 0 ? null : this.at(n >= 0 ? n : r, t)))
}
intersectsBox(e) {
return null !== this.intersectBox(e, xs)
}
intersectTriangle(e, t, n, r, i) {
Ss.subVectors(t, e),
As.subVectors(n, e),
Ms.crossVectors(Ss, As);
let s, a = this.direction.dot(Ms);
if (a > 0) {
if (r)
return null;
s = 1
} else {
if (!(a < 0))
return null;
s = -1,
a = -a
}
ws.subVectors(this.origin, e);
const o = s * this.direction.dot(As.crossVectors(ws, As));
if (o < 0)
return null;
const l = s * this.direction.dot(Ss.cross(ws));
if (l < 0)
return null;
if (o + l > a)
return null;
const c = -s * ws.dot(Ms);
return c < 0 ? null : this.at(c / a, i)
}
applyMatrix4(e) {
return this.origin.applyMatrix4(e),
this.direction.transformDirection(e),
this
}
equals(e) {
return e.origin.equals(this.origin) && e.direction.equals(this.direction)
}
clone() {
return (new this.constructor).copy(this)
}
}
class Es {
constructor(e, t, n, r, i, s, a, o, l, c, u, d, h, p, f, m) {
Es.prototype.isMatrix4 = !0,
this.elements = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1],
void 0 !== e && this.set(e, t, n, r, i, s, a, o, l, c, u, d, h, p, f, m)
}
set(e, t, n, r, i, s, a, o, l, c, u, d, h, p, f, m) {
const g = this.elements;
return g[0] = e,
g[4] = t,
g[8] = n,
g[12] = r,
g[1] = i,
g[5] = s,
g[9] = a,
g[13] = o,
g[2] = l,
g[6] = c,
g[10] = u,
g[14] = d,
g[3] = h,
g[7] = p,
g[11] = f,
g[15] = m,
this
}
identity() {
return this.set(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1),
this
}
clone() {
return (new Es).fromArray(this.elements)
}
copy(e) {
const t = this.elements
, n = e.elements;
return t[0] = n[0],
t[1] = n[1],
t[2] = n[2],
t[3] = n[3],
t[4] = n[4],
t[5] = n[5],
t[6] = n[6],
t[7] = n[7],
t[8] = n[8],
t[9] = n[9],
t[10] = n[10],
t[11] = n[11],
t[12] = n[12],
t[13] = n[13],
t[14] = n[14],
t[15] = n[15],
this
}
copyPosition(e) {
const t = this.elements
, n = e.elements;
return t[12] = n[12],
t[13] = n[13],
t[14] = n[14],
this
}
setFromMatrix3(e) {
const t = e.elements;
return this.set(t[0], t[3], t[6], 0, t[1], t[4], t[7], 0, t[2], t[5], t[8], 0, 0, 0, 0, 1),
this
}
extractBasis(e, t, n) {
return e.setFromMatrixColumn(this, 0),
t.setFromMatrixColumn(this, 1),
n.setFromMatrixColumn(this, 2),
this
}
makeBasis(e, t, n) {
return this.set(e.x, t.x, n.x, 0, e.y, t.y, n.y, 0, e.z, t.z, n.z, 0, 0, 0, 0, 1),
this
}
extractRotation(e) {
const t = this.elements
, n = e.elements
, r = 1 / Ts.setFromMatrixColumn(e, 0).length()
, i = 1 / Ts.setFromMatrixColumn(e, 1).length()
, s = 1 / Ts.setFromMatrixColumn(e, 2).length();
return t[0] = n[0] * r,
t[1] = n[1] * r,
t[2] = n[2] * r,
t[3] = 0,
t[4] = n[4] * i,
t[5] = n[5] * i,
t[6] = n[6] * i,
t[7] = 0,
t[8] = n[8] * s,
t[9] = n[9] * s,
t[10] = n[10] * s,
t[11] = 0,
t[12] = 0,
t[13] = 0,
t[14] = 0,
t[15] = 1,
this
}
makeRotationFromEuler(e) {
const t = this.elements
, n = e.x
, r = e.y
, i = e.z
, s = Math.cos(n)
, a = Math.sin(n)
, o = Math.cos(r)
, l = Math.sin(r)
, c = Math.cos(i)
, u = Math.sin(i);
if ("XYZ" === e.order) {
const e = s * c
, n = s * u
, r = a * c
, i = a * u;
t[0] = o * c,
t[4] = -o * u,
t[8] = l,
t[1] = n + r * l,
t[5] = e - i * l,
t[9] = -a * o,
t[2] = i - e * l,
t[6] = r + n * l,
t[10] = s * o
} else if ("YXZ" === e.order) {
const e = o * c
, n = o * u
, r = l * c
, i = l * u;
t[0] = e + i * a,
t[4] = r * a - n,
t[8] = s * l,
t[1] = s * u,
t[5] = s * c,
t[9] = -a,
t[2] = n * a - r,
t[6] = i + e * a,
t[10] = s * o
} else if ("ZXY" === e.order) {
const e = o * c
, n = o * u
, r = l * c
, i = l * u;
t[0] = e - i * a,
t[4] = -s * u,
t[8] = r + n * a,
t[1] = n + r * a,
t[5] = s * c,
t[9] = i - e * a,
t[2] = -s * l,
t[6] = a,
t[10] = s * o
} else if ("ZYX" === e.order) {
const e = s * c
, n = s * u
, r = a * c
, i = a * u;
t[0] = o * c,
t[4] = r * l - n,
t[8] = e * l + i,
t[1] = o * u,
t[5] = i * l + e,
t[9] = n * l - r,
t[2] = -l,
t[6] = a * o,
t[10] = s * o
} else if ("YZX" === e.order) {
const e = s * o
, n = s * l
, r = a * o
, i = a * l;
t[0] = o * c,
t[4] = i - e * u,
t[8] = r * u + n,
t[1] = u,
t[5] = s * c,
t[9] = -a * c,
t[2] = -l * c,
t[6] = n * u + r,
t[10] = e - i * u
} else if ("XZY" === e.order) {
const e = s * o
, n = s * l
, r = a * o
, i = a * l;
t[0] = o * c,
t[4] = -u,
t[8] = l * c,
t[1] = e * u + i,
t[5] = s * c,
t[9] = n * u - r,
t[2] = r * u - n,
t[6] = a * c,
t[10] = i * u + e
}
return t[3] = 0,
t[7] = 0,
t[11] = 0,
t[12] = 0,
t[13] = 0,
t[14] = 0,
t[15] = 1,
this
}
makeRotationFromQuaternion(e) {
return this.compose(Bs, e, Ps)
}
lookAt(e, t, n) {
const r = this.elements;
return Is.subVectors(e, t),
0 === Is.lengthSq() && (Is.z = 1),
Is.normalize(),
ks.crossVectors(n, Is),
0 === ks.lengthSq() && (1 === Math.abs(n.z) ? Is.x += 1e-4 : Is.z += 1e-4,
Is.normalize(),
ks.crossVectors(n, Is)),
ks.normalize(),
Ls.crossVectors(Is, ks),
r[0] = ks.x,
r[4] = Ls.x,
r[8] = Is.x,
r[1] = ks.y,
r[5] = Ls.y,
r[9] = Is.y,
r[2] = ks.z,
r[6] = Ls.z,
r[10] = Is.z,
this
}
multiply(e) {
return this.multiplyMatrices(this, e)
}
premultiply(e) {
return this.multiplyMatrices(e, this)
}
multiplyMatrices(e, t) {
const n = e.elements
, r = t.elements
, i = this.elements
, s = n[0]
, a = n[4]
, o = n[8]
, l = n[12]
, c = n[1]
, u = n[5]
, d = n[9]
, h = n[13]
, p = n[2]
, f = n[6]
, m = n[10]
, g = n[14]
, v = n[3]
, y = n[7]
, x = n[11]
, b = n[15]
, _ = r[0]
, w = r[4]
, S = r[8]
, A = r[12]
, M = r[1]
, C = r[5]
, E = r[9]
, T = r[13]
, R = r[2]
, B = r[6]
, P = r[10]
, k = r[14]
, L = r[3]
, I = r[7]
, N = r[11]
, D = r[15];
return i[0] = s * _ + a * M + o * R + l * L,
i[4] = s * w + a * C + o * B + l * I,
i[8] = s * S + a * E + o * P + l * N,
i[12] = s * A + a * T + o * k + l * D,
i[1] = c * _ + u * M + d * R + h * L,
i[5] = c * w + u * C + d * B + h * I,
i[9] = c * S + u * E + d * P + h * N,
i[13] = c * A + u * T + d * k + h * D,
i[2] = p * _ + f * M + m * R + g * L,
i[6] = p * w + f * C + m * B + g * I,
i[10] = p * S + f * E + m * P + g * N,
i[14] = p * A + f * T + m * k + g * D,
i[3] = v * _ + y * M + x * R + b * L,
i[7] = v * w + y * C + x * B + b * I,
i[11] = v * S + y * E + x * P + b * N,
i[15] = v * A + y * T + x * k + b * D,
this
}
multiplyScalar(e) {
const t = this.elements;
return t[0] *= e,
t[4] *= e,
t[8] *= e,
t[12] *= e,
t[1] *= e,
t[5] *= e,
t[9] *= e,
t[13] *= e,
t[2] *= e,
t[6] *= e,
t[10] *= e,
t[14] *= e,
t[3] *= e,
t[7] *= e,
t[11] *= e,
t[15] *= e,
this
}
determinant() {
const e = this.elements
, t = e[0]
, n = e[4]
, r = e[8]
, i = e[12]
, s = e[1]
, a = e[5]
, o = e[9]
, l = e[13]
, c = e[2]
, u = e[6]
, d = e[10]
, h = e[14];
return e[3] * (+i * o * u - r * l * u - i * a * d + n * l * d + r * a * h - n * o * h) + e[7] * (+t * o * h - t * l * d + i * s * d - r * s * h + r * l * c - i * o * c) + e[11] * (+t * l * u - t * a * h - i * s * u + n * s * h + i * a * c - n * l * c) + e[15] * (-r * a * c - t * o * u + t * a * d + r * s * u - n * s * d + n * o * c)
}
transpose() {
const e = this.elements;
let t;
return t = e[1],
e[1] = e[4],
e[4] = t,
t = e[2],
e[2] = e[8],
e[8] = t,
t = e[6],
e[6] = e[9],
e[9] = t,
t = e[3],
e[3] = e[12],
e[12] = t,
t = e[7],
e[7] = e[13],
e[13] = t,
t = e[11],
e[11] = e[14],
e[14] = t,
this
}
setPosition(e, t, n) {
const r = this.elements;
return e.isVector3 ? (r[12] = e.x,
r[13] = e.y,
r[14] = e.z) : (r[12] = e,
r[13] = t,
r[14] = n),
this
}
invert() {
const e = this.elements
, t = e[0]
, n = e[1]
, r = e[2]
, i = e[3]
, s = e[4]
, a = e[5]
, o = e[6]
, l = e[7]
, c = e[8]
, u = e[9]
, d = e[10]
, h = e[11]
, p = e[12]
, f = e[13]
, m = e[14]
, g = e[15]
, v = u * m * l - f * d * l + f * o * h - a * m * h - u * o * g + a * d * g
, y = p * d * l - c * m * l - p * o * h + s * m * h + c * o * g - s * d * g
, x = c * f * l - p * u * l + p * a * h - s * f * h - c * a * g + s * u * g
, b = p * u * o - c * f * o - p * a * d + s * f * d + c * a * m - s * u * m
, _ = t * v + n * y + r * x + i * b;
if (0 === _)
return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
const w = 1 / _;
return e[0] = v * w,
e[1] = (f * d * i - u * m * i - f * r * h + n * m * h + u * r * g - n * d * g) * w,
e[2] = (a * m * i - f * o * i + f * r * l - n * m * l - a * r * g + n * o * g) * w,
e[3] = (u * o * i - a * d * i - u * r * l + n * d * l + a * r * h - n * o * h) * w,
e[4] = y * w,
e[5] = (c * m * i - p * d * i + p * r * h - t * m * h - c * r * g + t * d * g) * w,
e[6] = (p * o * i - s * m * i - p * r * l + t * m * l + s * r * g - t * o * g) * w,
e[7] = (s * d * i - c * o * i + c * r * l - t * d * l - s * r * h + t * o * h) * w,
e[8] = x * w,
e[9] = (p * u * i - c * f * i - p * n * h + t * f * h + c * n * g - t * u * g) * w,
e[10] = (s * f * i - p * a * i + p * n * l - t * f * l - s * n * g + t * a * g) * w,
e[11] = (c * a * i - s * u * i - c * n * l + t * u * l + s * n * h - t * a * h) * w,
e[12] = b * w,
e[13] = (c * f * r - p * u * r + p * n * d - t * f * d - c * n * m + t * u * m) * w,
e[14] = (p * a * r - s * f * r - p * n * o + t * f * o + s * n * m - t * a * m) * w,
e[15] = (s * u * r - c * a * r + c * n * o - t * u * o - s * n * d + t * a * d) * w,
this
}
scale(e) {
const t = this.elements
, n = e.x
, r = e.y
, i = e.z;
return t[0] *= n,
t[4] *= r,
t[8] *= i,
t[1] *= n,
t[5] *= r,
t[9] *= i,
t[2] *= n,
t[6] *= r,
t[10] *= i,
t[3] *= n,
t[7] *= r,
t[11] *= i,
this
}
getMaxScaleOnAxis() {
const e = this.elements
, t = e[0] * e[0] + e[1] * e[1] + e[2] * e[2]
, n = e[4] * e[4] + e[5] * e[5] + e[6] * e[6]
, r = e[8] * e[8] + e[9] * e[9] + e[10] * e[10];
return Math.sqrt(Math.max(t, n, r))
}
makeTranslation(e, t, n) {
return e.isVector3 ? this.set(1, 0, 0, e.x, 0, 1, 0, e.y, 0, 0, 1, e.z, 0, 0, 0, 1) : this.set(1, 0, 0, e, 0, 1, 0, t, 0, 0, 1, n, 0, 0, 0, 1),
this
}
makeRotationX(e) {
const t = Math.cos(e)
, n = Math.sin(e);
return this.set(1, 0, 0, 0, 0, t, -n, 0, 0, n, t, 0, 0, 0, 0, 1),
this
}
makeRotationY(e) {
const t = Math.cos(e)
, n = Math.sin(e);
return this.set(t, 0, n, 0, 0, 1, 0, 0, -n, 0, t, 0, 0, 0, 0, 1),
this
}
makeRotationZ(e) {
const t = Math.cos(e)
, n = Math.sin(e);
return this.set(t, -n, 0, 0, n, t, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1),
this
}
makeRotationAxis(e, t) {
const n = Math.cos(t)
, r = Math.sin(t)
, i = 1 - n
, s = e.x
, a = e.y
, o = e.z
, l = i * s
, c = i * a;
return this.set(l * s + n, l * a - r * o, l * o + r * a, 0, l * a + r * o, c * a + n, c * o - r * s, 0, l * o - r * a, c * o + r * s, i * o * o + n, 0, 0, 0, 0, 1),
this
}
makeScale(e, t, n) {
return this.set(e, 0, 0, 0, 0, t, 0, 0, 0, 0, n, 0, 0, 0, 0, 1),
this
}
makeShear(e, t, n, r, i, s) {
return this.set(1, n, i, 0, e, 1, s, 0, t, r, 1, 0, 0, 0, 0, 1),
this
}
compose(e, t, n) {
const r = this.elements
, i = t._x
, s = t._y
, a = t._z
, o = t._w
, l = i + i
, c = s + s
, u = a + a
, d = i * l
, h = i * c
, p = i * u
, f = s * c
, m = s * u
, g = a * u
, v = o * l
, y = o * c
, x = o * u
, b = n.x
, _ = n.y
, w = n.z;
return r[0] = (1 - (f + g)) * b,
r[1] = (h + x) * b,
r[2] = (p - y) * b,
r[3] = 0,
r[4] = (h - x) * _,
r[5] = (1 - (d + g)) * _,
r[6] = (m + v) * _,
r[7] = 0,
r[8] = (p + y) * w,
r[9] = (m - v) * w,
r[10] = (1 - (d + f)) * w,
r[11] = 0,
r[12] = e.x,
r[13] = e.y,
r[14] = e.z,
r[15] = 1,
this
}
decompose(e, t, n) {
const r = this.elements;
let i = Ts.set(r[0], r[1], r[2]).length();
const s = Ts.set(r[4], r[5], r[6]).length()
, a = Ts.set(r[8], r[9], r[10]).length();
this.determinant() < 0 && (i = -i),
e.x = r[12],
e.y = r[13],
e.z = r[14],
Rs.copy(this);
const o = 1 / i
, l = 1 / s
, c = 1 / a;
return Rs.elements[0] *= o,
Rs.elements[1] *= o,
Rs.elements[2] *= o,
Rs.elements[4] *= l,
Rs.elements[5] *= l,
Rs.elements[6] *= l,
Rs.elements[8] *= c,
Rs.elements[9] *= c,
Rs.elements[10] *= c,
t.setFromRotationMatrix(Rs),
n.x = i,
n.y = s,
n.z = a,
this
}
makePerspective(e, t, n, r, i, s) {
let a = arguments.length > 6 && void 0 !== arguments[6] ? arguments[6] : si;
const o = this.elements
, l = 2 * i / (t - e)
, c = 2 * i / (n - r)
, u = (t + e) / (t - e)
, d = (n + r) / (n - r);
let h, p;
if (a === si)
h = -(s + i) / (s - i),
p = -2 * s * i / (s - i);
else {
if (a !== ai)
throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: " + a);
h = -s / (s - i),
p = -s * i / (s - i)
}
return o[0] = l,
o[4] = 0,
o[8] = u,
o[12] = 0,
o[1] = 0,
o[5] = c,
o[9] = d,
o[13] = 0,
o[2] = 0,
o[6] = 0,
o[10] = h,
o[14] = p,
o[3] = 0,
o[7] = 0,
o[11] = -1,
o[15] = 0,
this
}
makeOrthographic(e, t, n, r, i, s) {
let a = arguments.length > 6 && void 0 !== arguments[6] ? arguments[6] : si;
const o = this.elements
, l = 1 / (t - e)
, c = 1 / (n - r)
, u = 1 / (s - i)
, d = (t + e) * l
, h = (n + r) * c;
let p, f;
if (a === si)
p = (s + i) * u,
f = -2 * u;
else {
if (a !== ai)
throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: " + a);
p = i * u,
f = -1 * u
}
return o[0] = 2 * l,
o[4] = 0,
o[8] = 0,
o[12] = -d,
o[1] = 0,
o[5] = 2 * c,
o[9] = 0,
o[13] = -h,
o[2] = 0,
o[6] = 0,
o[10] = f,
o[14] = -p,
o[3] = 0,
o[7] = 0,
o[11] = 0,
o[15] = 1,
this
}
equals(e) {
const t = this.elements
, n = e.elements;
for (let r = 0; r < 16; r++)
if (t[r] !== n[r])
return !1;
return !0
}
fromArray(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;
for (let n = 0; n < 16; n++)
this.elements[n] = e[n + t];
return this
}
toArray() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;
const n = this.elements;
return e[t] = n[0],
e[t + 1] = n[1],
e[t + 2] = n[2],
e[t + 3] = n[3],
e[t + 4] = n[4],
e[t + 5] = n[5],
e[t + 6] = n[6],
e[t + 7] = n[7],
e[t + 8] = n[8],
e[t + 9] = n[9],
e[t + 10] = n[10],
e[t + 11] = n[11],
e[t + 12] = n[12],
e[t + 13] = n[13],
e[t + 14] = n[14],
e[t + 15] = n[15],
e
}
}
const Ts = new Qi
, Rs = new Es
, Bs = new Qi(0,0,0)
, Ps = new Qi(1,1,1)
, ks = new Qi
, Ls = new Qi
, Is = new Qi
, Ns = new Es
, Ds = new Yi;
class js {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 0
, r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : js.DEFAULT_ORDER;
this.isEuler = !0,
this._x = e,
this._y = t,
this._z = n,
this._order = r
}
get x() {
return this._x
}
set x(e) {
this._x = e,
this._onChangeCallback()
}
get y() {
return this._y
}
set y(e) {
this._y = e,
this._onChangeCallback()
}
get z() {
return this._z
}
set z(e) {
this._z = e,
this._onChangeCallback()
}
get order() {
return this._order
}
set order(e) {
this._order = e,
this._onChangeCallback()
}
set(e, t, n) {
let r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : this._order;
return this._x = e,
this._y = t,
this._z = n,
this._order = r,
this._onChangeCallback(),
this
}
clone() {
return new this.constructor(this._x,this._y,this._z,this._order)
}
copy(e) {
return this._x = e._x,
this._y = e._y,
this._z = e._z,
this._order = e._order,
this._onChangeCallback(),
this
}
setFromRotationMatrix(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this._order
, n = !(arguments.length > 2 && void 0 !== arguments[2]) || arguments[2];
const r = e.elements
, i = r[0]
, s = r[4]
, a = r[8]
, o = r[1]
, l = r[5]
, c = r[9]
, u = r[2]
, d = r[6]
, h = r[10];
switch (t) {
case "XYZ":
this._y = Math.asin(pi(a, -1, 1)),
Math.abs(a) < .9999999 ? (this._x = Math.atan2(-c, h),
this._z = Math.atan2(-s, i)) : (this._x = Math.atan2(d, l),
this._z = 0);
break;
case "YXZ":
this._x = Math.asin(-pi(c, -1, 1)),
Math.abs(c) < .9999999 ? (this._y = Math.atan2(a, h),
this._z = Math.atan2(o, l)) : (this._y = Math.atan2(-u, i),
this._z = 0);
break;
case "ZXY":
this._x = Math.asin(pi(d, -1, 1)),
Math.abs(d) < .9999999 ? (this._y = Math.atan2(-u, h),
this._z = Math.atan2(-s, l)) : (this._y = 0,
this._z = Math.atan2(o, i));
break;
case "ZYX":
this._y = Math.asin(-pi(u, -1, 1)),
Math.abs(u) < .9999999 ? (this._x = Math.atan2(d, h),
this._z = Math.atan2(o, i)) : (this._x = 0,
this._z = Math.atan2(-s, l));
break;
case "YZX":
this._z = Math.asin(pi(o, -1, 1)),
Math.abs(o) < .9999999 ? (this._x = Math.atan2(-c, l),
this._y = Math.atan2(-u, i)) : (this._x = 0,
this._y = Math.atan2(a, h));
break;
case "XZY":
this._z = Math.asin(-pi(s, -1, 1)),
Math.abs(s) < .9999999 ? (this._x = Math.atan2(d, l),
this._y = Math.atan2(a, i)) : (this._x = Math.atan2(-c, h),
this._y = 0);
break;
default:
console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: " + t)
}
return this._order = t,
!0 === n && this._onChangeCallback(),
this
}
setFromQuaternion(e, t, n) {
return Ns.makeRotationFromQuaternion(e),
this.setFromRotationMatrix(Ns, t, n)
}
setFromVector3(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this._order;
return this.set(e.x, e.y, e.z, t)
}
reorder(e) {
return Ds.setFromEuler(this),
this.setFromQuaternion(Ds, e)
}
equals(e) {
return e._x === this._x && e._y === this._y && e._z === this._z && e._order === this._order
}
fromArray(e) {
return this._x = e[0],
this._y = e[1],
this._z = e[2],
void 0 !== e[3] && (this._order = e[3]),
this._onChangeCallback(),
this
}
toArray() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;
return e[t] = this._x,
e[t + 1] = this._y,
e[t + 2] = this._z,
e[t + 3] = this._order,
e
}
_onChange(e) {
return this._onChangeCallback = e,
this
}
_onChangeCallback() {}
*[Symbol.iterator]() {
yield this._x,
yield this._y,
yield this._z,
yield this._order
}
}
js.DEFAULT_ORDER = "XYZ";
class Fs {
constructor() {
this.mask = 1
}
set(e) {
this.mask = 1 << e >>> 0
}
enable(e) {
this.mask |= 1 << e
}
enableAll() {
this.mask = -1
}
toggle(e) {
this.mask ^= 1 << e
}
disable(e) {
this.mask &= ~(1 << e)
}
disableAll() {
this.mask = 0
}
test(e) {
return 0 !== (this.mask & e.mask)
}
isEnabled(e) {
return 0 !== (this.mask & 1 << e)
}
}
let Os = 0;
const Us = new Qi
, zs = new Yi
, Gs = new Es
, Hs = new Qi
, Vs = new Qi
, Ws = new Qi
, Js = new Yi
, Xs = new Qi(1,0,0)
, Ks = new Qi(0,1,0)
, qs = new Qi(0,0,1)
, Ys = {
type: "added"
}
, Qs = {
type: "removed"
}
, Zs = {
type: "childadded",
child: null
}
, $s = {
type: "childremoved",
child: null
};
class ea extends oi {
constructor() {
super(),
this.isObject3D = !0,
Object.defineProperty(this, "id", {
value: Os++
}),
this.uuid = hi(),
this.name = "",
this.type = "Object3D",
this.parent = null,
this.children = [],
this.up = ea.DEFAULT_UP.clone();
const e = new Qi
, t = new js
, n = new Yi
, r = new Qi(1,1,1);
t._onChange((function() {
n.setFromEuler(t, !1)
}
)),
n._onChange((function() {
t.setFromQuaternion(n, void 0, !1)
}
)),
Object.defineProperties(this, {
position: {
configurable: !0,
enumerable: !0,
value: e
},
rotation: {
configurable: !0,
enumerable: !0,
value: t
},
quaternion: {
configurable: !0,
enumerable: !0,
value: n
},
scale: {
configurable: !0,
enumerable: !0,
value: r
},
modelViewMatrix: {
value: new Es
},
normalMatrix: {
value: new bi
}
}),
this.matrix = new Es,
this.matrixWorld = new Es,
this.matrixAutoUpdate = ea.DEFAULT_MATRIX_AUTO_UPDATE,
this.matrixWorldAutoUpdate = ea.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,
this.matrixWorldNeedsUpdate = !1,
this.layers = new Fs,
this.visible = !0,
this.castShadow = !1,
this.receiveShadow = !1,
this.frustumCulled = !0,
this.renderOrder = 0,
this.animations = [],
this.userData = {}
}
onBeforeShadow() {}
onAfterShadow() {}
onBeforeRender() {}
onAfterRender() {}
applyMatrix4(e) {
this.matrixAutoUpdate && this.updateMatrix(),
this.matrix.premultiply(e),
this.matrix.decompose(this.position, this.quaternion, this.scale)
}
applyQuaternion(e) {
return this.quaternion.premultiply(e),
this
}
setRotationFromAxisAngle(e, t) {
this.quaternion.setFromAxisAngle(e, t)
}
setRotationFromEuler(e) {
this.quaternion.setFromEuler(e, !0)
}
setRotationFromMatrix(e) {
this.quaternion.setFromRotationMatrix(e)
}
setRotationFromQuaternion(e) {
this.quaternion.copy(e)
}
rotateOnAxis(e, t) {
return zs.setFromAxisAngle(e, t),
this.quaternion.multiply(zs),
this
}
rotateOnWorldAxis(e, t) {
return zs.setFromAxisAngle(e, t),
this.quaternion.premultiply(zs),
this
}
rotateX(e) {
return this.rotateOnAxis(Xs, e)
}
rotateY(e) {
return this.rotateOnAxis(Ks, e)
}
rotateZ(e) {
return this.rotateOnAxis(qs, e)
}
translateOnAxis(e, t) {
return Us.copy(e).applyQuaternion(this.quaternion),
this.position.add(Us.multiplyScalar(t)),
this
}
translateX(e) {
return this.translateOnAxis(Xs, e)
}
translateY(e) {
return this.translateOnAxis(Ks, e)
}
translateZ(e) {
return this.translateOnAxis(qs, e)
}
localToWorld(e) {
return this.updateWorldMatrix(!0, !1),
e.applyMatrix4(this.matrixWorld)
}
worldToLocal(e) {
return this.updateWorldMatrix(!0, !1),
e.applyMatrix4(Gs.copy(this.matrixWorld).invert())
}
lookAt(e, t, n) {
e.isVector3 ? Hs.copy(e) : Hs.set(e, t, n);
const r = this.parent;
this.updateWorldMatrix(!0, !1),
Vs.setFromMatrixPosition(this.matrixWorld),
this.isCamera || this.isLight ? Gs.lookAt(Vs, Hs, this.up) : Gs.lookAt(Hs, Vs, this.up),
this.quaternion.setFromRotationMatrix(Gs),
r && (Gs.extractRotation(r.matrixWorld),
zs.setFromRotationMatrix(Gs),
this.quaternion.premultiply(zs.invert()))
}
add(e) {
if (arguments.length > 1) {
for (let e = 0; e < arguments.length; e++)
this.add(arguments[e]);
return this
}
return e === this ? (console.error("THREE.Object3D.add: object can't be added as a child of itself.", e),
this) : (e && e.isObject3D ? (e.removeFromParent(),
e.parent = this,
this.children.push(e),
e.dispatchEvent(Ys),
Zs.child = e,
this.dispatchEvent(Zs),
Zs.child = null) : console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.", e),
this)
}
remove(e) {
if (arguments.length > 1) {
for (let e = 0; e < arguments.length; e++)
this.remove(arguments[e]);
return this
}
const t = this.children.indexOf(e);
return -1 !== t && (e.parent = null,
this.children.splice(t, 1),
e.dispatchEvent(Qs),
$s.child = e,
this.dispatchEvent($s),
$s.child = null),
this
}
removeFromParent() {
const e = this.parent;
return null !== e && e.remove(this),
this
}
clear() {
return this.remove(...this.children)
}
attach(e) {
return this.updateWorldMatrix(!0, !1),
Gs.copy(this.matrixWorld).invert(),
null !== e.parent && (e.parent.updateWorldMatrix(!0, !1),
Gs.multiply(e.parent.matrixWorld)),
e.applyMatrix4(Gs),
e.removeFromParent(),
e.parent = this,
this.children.push(e),
e.updateWorldMatrix(!1, !0),
e.dispatchEvent(Ys),
Zs.child = e,
this.dispatchEvent(Zs),
Zs.child = null,
this
}
getObjectById(e) {
return this.getObjectByProperty("id", e)
}
getObjectByName(e) {
return this.getObjectByProperty("name", e)
}
getObjectByProperty(e, t) {
if (this[e] === t)
return this;
for (let n = 0, r = this.children.length; n < r; n++) {
const r = this.children[n].getObjectByProperty(e, t);
if (void 0 !== r)
return r
}
}
getObjectsByProperty(e, t) {
let n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : [];
this[e] === t && n.push(this);
const r = this.children;
for (let i = 0, s = r.length; i < s; i++)
r[i].getObjectsByProperty(e, t, n);
return n
}
getWorldPosition(e) {
return this.updateWorldMatrix(!0, !1),
e.setFromMatrixPosition(this.matrixWorld)
}
getWorldQuaternion(e) {
return this.updateWorldMatrix(!0, !1),
this.matrixWorld.decompose(Vs, e, Ws),
e
}
getWorldScale(e) {
return this.updateWorldMatrix(!0, !1),
this.matrixWorld.decompose(Vs, Js, e),
e
}
getWorldDirection(e) {
this.updateWorldMatrix(!0, !1);
const t = this.matrixWorld.elements;
return e.set(t[8], t[9], t[10]).normalize()
}
raycast() {}
traverse(e) {
e(this);
const t = this.children;
for (let n = 0, r = t.length; n < r; n++)
t[n].traverse(e)
}
traverseVisible(e) {
if (!1 === this.visible)
return;
e(this);
const t = this.children;
for (let n = 0, r = t.length; n < r; n++)
t[n].traverseVisible(e)
}
traverseAncestors(e) {
const t = this.parent;
null !== t && (e(t),
t.traverseAncestors(e))
}
updateMatrix() {
this.matrix.compose(this.position, this.quaternion, this.scale),
this.matrixWorldNeedsUpdate = !0
}
updateMatrixWorld(e) {
this.matrixAutoUpdate && this.updateMatrix(),
(this.matrixWorldNeedsUpdate || e) && (null === this.parent ? this.matrixWorld.copy(this.matrix) : this.matrixWorld.multiplyMatrices(this.parent.matrixWorld, this.matrix),
this.matrixWorldNeedsUpdate = !1,
e = !0);
const t = this.children;
for (let n = 0, r = t.length; n < r; n++) {
const r = t[n];
!0 !== r.matrixWorldAutoUpdate && !0 !== e || r.updateMatrixWorld(e)
}
}
updateWorldMatrix(e, t) {
const n = this.parent;
if (!0 === e && null !== n && !0 === n.matrixWorldAutoUpdate && n.updateWorldMatrix(!0, !1),
this.matrixAutoUpdate && this.updateMatrix(),
null === this.parent ? this.matrixWorld.copy(this.matrix) : this.matrixWorld.multiplyMatrices(this.parent.matrixWorld, this.matrix),
!0 === t) {
const e = this.children;
for (let t = 0, n = e.length; t < n; t++) {
const n = e[t];
!0 === n.matrixWorldAutoUpdate && n.updateWorldMatrix(!1, !0)
}
}
}
toJSON(e) {
const t = void 0 === e || "string" === typeof e
, n = {};
t && (e = {
geometries: {},
materials: {},
textures: {},
images: {},
shapes: {},
skeletons: {},
animations: {},
nodes: {}
},
n.metadata = {
version: 4.6,
type: "Object",
generator: "Object3D.toJSON"
});
const r = {};
function i(t, n) {
return void 0 === t[n.uuid] && (t[n.uuid] = n.toJSON(e)),
n.uuid
}
if (r.uuid = this.uuid,
r.type = this.type,
"" !== this.name && (r.name = this.name),
!0 === this.castShadow && (r.castShadow = !0),
!0 === this.receiveShadow && (r.receiveShadow = !0),
!1 === this.visible && (r.visible = !1),
!1 === this.frustumCulled && (r.frustumCulled = !1),
0 !== this.renderOrder && (r.renderOrder = this.renderOrder),
Object.keys(this.userData).length > 0 && (r.userData = this.userData),
r.layers = this.layers.mask,
r.matrix = this.matrix.toArray(),
r.up = this.up.toArray(),
!1 === this.matrixAutoUpdate && (r.matrixAutoUpdate = !1),
this.isInstancedMesh && (r.type = "InstancedMesh",
r.count = this.count,
r.instanceMatrix = this.instanceMatrix.toJSON(),
null !== this.instanceColor && (r.instanceColor = this.instanceColor.toJSON())),
this.isBatchedMesh && (r.type = "BatchedMesh",
r.perObjectFrustumCulled = this.perObjectFrustumCulled,
r.sortObjects = this.sortObjects,
r.drawRanges = this._drawRanges,
r.reservedRanges = this._reservedRanges,
r.visibility = this._visibility,
r.active = this._active,
r.bounds = this._bounds.map((e => ({
boxInitialized: e.boxInitialized,
boxMin: e.box.min.toArray(),
boxMax: e.box.max.toArray(),
sphereInitialized: e.sphereInitialized,
sphereRadius: e.sphere.radius,
sphereCenter: e.sphere.center.toArray()
}))),
r.maxGeometryCount = this._maxGeometryCount,
r.maxVertexCount = this._maxVertexCount,
r.maxIndexCount = this._maxIndexCount,
r.geometryInitialized = this._geometryInitialized,
r.geometryCount = this._geometryCount,
r.matricesTexture = this._matricesTexture.toJSON(e),
null !== this._colorsTexture && (r.colorsTexture = this._colorsTexture.toJSON(e)),
null !== this.boundingSphere && (r.boundingSphere = {
center: r.boundingSphere.center.toArray(),
radius: r.boundingSphere.radius
}),
null !== this.boundingBox && (r.boundingBox = {
min: r.boundingBox.min.toArray(),
max: r.boundingBox.max.toArray()
})),
this.isScene)
this.background && (this.background.isColor ? r.background = this.background.toJSON() : this.background.isTexture && (r.background = this.background.toJSON(e).uuid)),
this.environment && this.environment.isTexture && !0 !== this.environment.isRenderTargetTexture && (r.environment = this.environment.toJSON(e).uuid);
else if (this.isMesh || this.isLine || this.isPoints) {
r.geometry = i(e.geometries, this.geometry);
const t = this.geometry.parameters;
if (void 0 !== t && void 0 !== t.shapes) {
const n = t.shapes;
if (Array.isArray(n))
for (let t = 0, r = n.length; t < r; t++) {
const r = n[t];
i(e.shapes, r)
}
else
i(e.shapes, n)
}
}
if (this.isSkinnedMesh && (r.bindMode = this.bindMode,
r.bindMatrix = this.bindMatrix.toArray(),
void 0 !== this.skeleton && (i(e.skeletons, this.skeleton),
r.skeleton = this.skeleton.uuid)),
void 0 !== this.material)
if (Array.isArray(this.material)) {
const t = [];
for (let n = 0, r = this.material.length; n < r; n++)
t.push(i(e.materials, this.material[n]));
r.material = t
} else
r.material = i(e.materials, this.material);
if (this.children.length > 0) {
r.children = [];
for (let t = 0; t < this.children.length; t++)
r.children.push(this.children[t].toJSON(e).object)
}
if (this.animations.length > 0) {
r.animations = [];
for (let t = 0; t < this.animations.length; t++) {
const n = this.animations[t];
r.animations.push(i(e.animations, n))
}
}
if (t) {
const t = s(e.geometries)
, r = s(e.materials)
, i = s(e.textures)
, a = s(e.images)
, o = s(e.shapes)
, l = s(e.skeletons)
, c = s(e.animations)
, u = s(e.nodes);
t.length > 0 && (n.geometries = t),
r.length > 0 && (n.materials = r),
i.length > 0 && (n.textures = i),
a.length > 0 && (n.images = a),
o.length > 0 && (n.shapes = o),
l.length > 0 && (n.skeletons = l),
c.length > 0 && (n.animations = c),
u.length > 0 && (n.nodes = u)
}
return n.object = r,
n;
function s(e) {
const t = [];
for (const n in e) {
const r = e[n];
delete r.metadata,
t.push(r)
}
return t
}
}
clone(e) {
return (new this.constructor).copy(this, e)
}
copy(e) {
let t = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1];
if (this.name = e.name,
this.up.copy(e.up),
this.position.copy(e.position),
this.rotation.order = e.rotation.order,
this.quaternion.copy(e.quaternion),
this.scale.copy(e.scale),
this.matrix.copy(e.matrix),
this.matrixWorld.copy(e.matrixWorld),
this.matrixAutoUpdate = e.matrixAutoUpdate,
this.matrixWorldAutoUpdate = e.matrixWorldAutoUpdate,
this.matrixWorldNeedsUpdate = e.matrixWorldNeedsUpdate,
this.layers.mask = e.layers.mask,
this.visible = e.visible,
this.castShadow = e.castShadow,
this.receiveShadow = e.receiveShadow,
this.frustumCulled = e.frustumCulled,
this.renderOrder = e.renderOrder,
this.animations = e.animations.slice(),
this.userData = JSON.parse(JSON.stringify(e.userData)),
!0 === t)
for (let n = 0; n < e.children.length; n++) {
const t = e.children[n];
this.add(t.clone())
}
return this
}
}
ea.DEFAULT_UP = new Qi(0,1,0),
ea.DEFAULT_MATRIX_AUTO_UPDATE = !0,
ea.DEFAULT_MATRIX_WORLD_AUTO_UPDATE = !0;
const ta = new Qi
, na = new Qi
, ra = new Qi
, ia = new Qi
, sa = new Qi
, aa = new Qi
, oa = new Qi
, la = new Qi
, ca = new Qi
, ua = new Qi;
class da {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : new Qi
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : new Qi
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : new Qi;
this.a = e,
this.b = t,
this.c = n
}
static getNormal(e, t, n, r) {
r.subVectors(n, t),
ta.subVectors(e, t),
r.cross(ta);
const i = r.lengthSq();
return i > 0 ? r.multiplyScalar(1 / Math.sqrt(i)) : r.set(0, 0, 0)
}
static getBarycoord(e, t, n, r, i) {
ta.subVectors(r, t),
na.subVectors(n, t),
ra.subVectors(e, t);
const s = ta.dot(ta)
, a = ta.dot(na)
, o = ta.dot(ra)
, l = na.dot(na)
, c = na.dot(ra)
, u = s * l - a * a;
if (0 === u)
return i.set(0, 0, 0),
null;
const d = 1 / u
, h = (l * o - a * c) * d
, p = (s * c - a * o) * d;
return i.set(1 - h - p, p, h)
}
static containsPoint(e, t, n, r) {
return null !== this.getBarycoord(e, t, n, r, ia) && (ia.x >= 0 && ia.y >= 0 && ia.x + ia.y <= 1)
}
static getInterpolation(e, t, n, r, i, s, a, o) {
return null === this.getBarycoord(e, t, n, r, ia) ? (o.x = 0,
o.y = 0,
"z"in o && (o.z = 0),
"w"in o && (o.w = 0),
null) : (o.setScalar(0),
o.addScaledVector(i, ia.x),
o.addScaledVector(s, ia.y),
o.addScaledVector(a, ia.z),
o)
}
static isFrontFacing(e, t, n, r) {
return ta.subVectors(n, t),
na.subVectors(e, t),
ta.cross(na).dot(r) < 0
}
set(e, t, n) {
return this.a.copy(e),
this.b.copy(t),
this.c.copy(n),
this
}
setFromPointsAndIndices(e, t, n, r) {
return this.a.copy(e[t]),
this.b.copy(e[n]),
this.c.copy(e[r]),
this
}
setFromAttributeAndIndices(e, t, n, r) {
return this.a.fromBufferAttribute(e, t),
this.b.fromBufferAttribute(e, n),
this.c.fromBufferAttribute(e, r),
this
}
clone() {
return (new this.constructor).copy(this)
}
copy(e) {
return this.a.copy(e.a),
this.b.copy(e.b),
this.c.copy(e.c),
this
}
getArea() {
return ta.subVectors(this.c, this.b),
na.subVectors(this.a, this.b),
.5 * ta.cross(na).length()
}
getMidpoint(e) {
return e.addVectors(this.a, this.b).add(this.c).multiplyScalar(1 / 3)
}
getNormal(e) {
return da.getNormal(this.a, this.b, this.c, e)
}
getPlane(e) {
return e.setFromCoplanarPoints(this.a, this.b, this.c)
}
getBarycoord(e, t) {
return da.getBarycoord(e, this.a, this.b, this.c, t)
}
getInterpolation(e, t, n, r, i) {
return da.getInterpolation(e, this.a, this.b, this.c, t, n, r, i)
}
containsPoint(e) {
return da.containsPoint(e, this.a, this.b, this.c)
}
isFrontFacing(e) {
return da.isFrontFacing(this.a, this.b, this.c, e)
}
intersectsBox(e) {
return e.intersectsTriangle(this)
}
closestPointToPoint(e, t) {
const n = this.a
, r = this.b
, i = this.c;
let s, a;
sa.subVectors(r, n),
aa.subVectors(i, n),
la.subVectors(e, n);
const o = sa.dot(la)
, l = aa.dot(la);
if (o <= 0 && l <= 0)
return t.copy(n);
ca.subVectors(e, r);
const c = sa.dot(ca)
, u = aa.dot(ca);
if (c >= 0 && u <= c)
return t.copy(r);
const d = o * u - c * l;
if (d <= 0 && o >= 0 && c <= 0)
return s = o / (o - c),
t.copy(n).addScaledVector(sa, s);
ua.subVectors(e, i);
const h = sa.dot(ua)
, p = aa.dot(ua);
if (p >= 0 && h <= p)
return t.copy(i);
const f = h * l - o * p;
if (f <= 0 && l >= 0 && p <= 0)
return a = l / (l - p),
t.copy(n).addScaledVector(aa, a);
const m = c * p - h * u;
if (m <= 0 && u - c >= 0 && h - p >= 0)
return oa.subVectors(i, r),
a = (u - c) / (u - c + (h - p)),
t.copy(r).addScaledVector(oa, a);
const g = 1 / (m + f + d);
return s = f * g,
a = d * g,
t.copy(n).addScaledVector(sa, s).addScaledVector(aa, a)
}
equals(e) {
return e.a.equals(this.a) && e.b.equals(this.b) && e.c.equals(this.c)
}
}
const ha = {
aliceblue: 15792383,
antiquewhite: 16444375,
aqua: 65535,
aquamarine: 8388564,
azure: 15794175,
beige: 16119260,
bisque: 16770244,
black: 0,
blanchedalmond: 16772045,
blue: 255,
blueviolet: 9055202,
brown: 10824234,
burlywood: 14596231,
cadetblue: 6266528,
chartreuse: 8388352,
chocolate: 13789470,
coral: 16744272,
cornflowerblue: 6591981,
cornsilk: 16775388,
crimson: 14423100,
cyan: 65535,
darkblue: 139,
darkcyan: 35723,
darkgoldenrod: 12092939,
darkgray: 11119017,
darkgreen: 25600,
darkgrey: 11119017,
darkkhaki: 12433259,
darkmagenta: 9109643,
darkolivegreen: 5597999,
darkorange: 16747520,
darkorchid: 10040012,
darkred: 9109504,
darksalmon: 15308410,
darkseagreen: 9419919,
darkslateblue: 4734347,
darkslategray: 3100495,
darkslategrey: 3100495,
darkturquoise: 52945,
darkviolet: 9699539,
deeppink: 16716947,
deepskyblue: 49151,
dimgray: 6908265,
dimgrey: 6908265,
dodgerblue: 2003199,
firebrick: 11674146,
floralwhite: 16775920,
forestgreen: 2263842,
fuchsia: 16711935,
gainsboro: 14474460,
ghostwhite: 16316671,
gold: 16766720,
goldenrod: 14329120,
gray: 8421504,
green: 32768,
greenyellow: 11403055,
grey: 8421504,
honeydew: 15794160,
hotpink: 16738740,
indianred: 13458524,
indigo: 4915330,
ivory: 16777200,
khaki: 15787660,
lavender: 15132410,
lavenderblush: 16773365,
lawngreen: 8190976,
lemonchiffon: 16775885,
lightblue: 11393254,
lightcoral: 15761536,
lightcyan: 14745599,
lightgoldenrodyellow: 16448210,
lightgray: 13882323,
lightgreen: 9498256,
lightgrey: 13882323,
lightpink: 16758465,
lightsalmon: 16752762,
lightseagreen: 2142890,
lightskyblue: 8900346,
lightslategray: 7833753,
lightslategrey: 7833753,
lightsteelblue: 11584734,
lightyellow: 16777184,
lime: 65280,
limegreen: 3329330,
linen: 16445670,
magenta: 16711935,
maroon: 8388608,
mediumaquamarine: 6737322,
mediumblue: 205,
mediumorchid: 12211667,
mediumpurple: 9662683,
mediumseagreen: 3978097,
mediumslateblue: 8087790,
mediumspringgreen: 64154,
mediumturquoise: 4772300,
mediumvioletred: 13047173,
midnightblue: 1644912,
mintcream: 16121850,
mistyrose: 16770273,
moccasin: 16770229,
navajowhite: 16768685,
navy: 128,
oldlace: 16643558,
olive: 8421376,
olivedrab: 7048739,
orange: 16753920,
orangered: 16729344,
orchid: 14315734,
palegoldenrod: 15657130,
palegreen: 10025880,
paleturquoise: 11529966,
palevioletred: 14381203,
papayawhip: 16773077,
peachpuff: 16767673,
peru: 13468991,
pink: 16761035,
plum: 14524637,
powderblue: 11591910,
purple: 8388736,
rebeccapurple: 6697881,
red: 16711680,
rosybrown: 12357519,
royalblue: 4286945,
saddlebrown: 9127187,
salmon: 16416882,
sandybrown: 16032864,
seagreen: 3050327,
seashell: 16774638,
sienna: 10506797,
silver: 12632256,
skyblue: 8900331,
slateblue: 6970061,
slategray: 7372944,
slategrey: 7372944,
snow: 16775930,
springgreen: 65407,
steelblue: 4620980,
tan: 13808780,
teal: 32896,
thistle: 14204888,
tomato: 16737095,
turquoise: 4251856,
violet: 15631086,
wheat: 16113331,
white: 16777215,
whitesmoke: 16119285,
yellow: 16776960,
yellowgreen: 10145074
}
, pa = {
h: 0,
s: 0,
l: 0
}
, fa = {
h: 0,
s: 0,
l: 0
};
function ma(e, t, n) {
return n < 0 && (n += 1),
n > 1 && (n -= 1),
n < 1 / 6 ? e + 6 * (t - e) * n : n < .5 ? t : n < 2 / 3 ? e + 6 * (t - e) * (2 / 3 - n) : e
}
class ga {
constructor(e, t, n) {
return this.isColor = !0,
this.r = 1,
this.g = 1,
this.b = 1,
this.set(e, t, n)
}
set(e, t, n) {
if (void 0 === t && void 0 === n) {
const t = e;
t && t.isColor ? this.copy(t) : "number" === typeof t ? this.setHex(t) : "string" === typeof t && this.setStyle(t)
} else
this.setRGB(e, t, n);
return this
}
setScalar(e) {
return this.r = e,
this.g = e,
this.b = e,
this
}
setHex(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : gr;
return e = Math.floor(e),
this.r = (e >> 16 & 255) / 255,
this.g = (e >> 8 & 255) / 255,
this.b = (255 & e) / 255,
Li.toWorkingColorSpace(this, t),
this
}
setRGB(e, t, n) {
let r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : Li.workingColorSpace;
return this.r = e,
this.g = t,
this.b = n,
Li.toWorkingColorSpace(this, r),
this
}
setHSL(e, t, n) {
let r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : Li.workingColorSpace;
if (e = fi(e, 1),
t = pi(t, 0, 1),
n = pi(n, 0, 1),
0 === t)
this.r = this.g = this.b = n;
else {
const r = n <= .5 ? n * (1 + t) : n + t - n * t
, i = 2 * n - r;
this.r = ma(i, r, e + 1 / 3),
this.g = ma(i, r, e),
this.b = ma(i, r, e - 1 / 3)
}
return Li.toWorkingColorSpace(this, r),
this
}
setStyle(e) {
let t, n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : gr;
function r(t) {
void 0 !== t && parseFloat(t) < 1 && console.warn("THREE.Color: Alpha component of " + e + " will be ignored.")
}
if (t = /^(\w+)\(([^\)]*)\)/.exec(e)) {
let i;
const s = t[1]
, a = t[2];
switch (s) {
case "rgb":
case "rgba":
if (i = /^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))
return r(i[4]),
this.setRGB(Math.min(255, parseInt(i[1], 10)) / 255, Math.min(255, parseInt(i[2], 10)) / 255, Math.min(255, parseInt(i[3], 10)) / 255, n);
if (i = /^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))
return r(i[4]),
this.setRGB(Math.min(100, parseInt(i[1], 10)) / 100, Math.min(100, parseInt(i[2], 10)) / 100, Math.min(100, parseInt(i[3], 10)) / 100, n);
break;
case "hsl":
case "hsla":
if (i = /^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))
return r(i[4]),
this.setHSL(parseFloat(i[1]) / 360, parseFloat(i[2]) / 100, parseFloat(i[3]) / 100, n);
break;
default:
console.warn("THREE.Color: Unknown color model " + e)
}
} else if (t = /^\#([A-Fa-f\d]+)$/.exec(e)) {
const r = t[1]
, i = r.length;
if (3 === i)
return this.setRGB(parseInt(r.charAt(0), 16) / 15, parseInt(r.charAt(1), 16) / 15, parseInt(r.charAt(2), 16) / 15, n);
if (6 === i)
return this.setHex(parseInt(r, 16), n);
console.warn("THREE.Color: Invalid hex color " + e)
} else if (e && e.length > 0)
return this.setColorName(e, n);
return this
}
setColorName(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : gr;
const n = ha[e.toLowerCase()];
return void 0 !== n ? this.setHex(n, t) : console.warn("THREE.Color: Unknown color " + e),
this
}
clone() {
return new this.constructor(this.r,this.g,this.b)
}
copy(e) {
return this.r = e.r,
this.g = e.g,
this.b = e.b,
this
}
copySRGBToLinear(e) {
return this.r = Ii(e.r),
this.g = Ii(e.g),
this.b = Ii(e.b),
this
}
copyLinearToSRGB(e) {
return this.r = Ni(e.r),
this.g = Ni(e.g),
this.b = Ni(e.b),
this
}
convertSRGBToLinear() {
return this.copySRGBToLinear(this),
this
}
convertLinearToSRGB() {
return this.copyLinearToSRGB(this),
this
}
getHex() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : gr;
return Li.fromWorkingColorSpace(va.copy(this), e),
65536 * Math.round(pi(255 * va.r, 0, 255)) + 256 * Math.round(pi(255 * va.g, 0, 255)) + Math.round(pi(255 * va.b, 0, 255))
}
getHexString() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : gr;
return ("000000" + this.getHex(e).toString(16)).slice(-6)
}
getHSL(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : Li.workingColorSpace;
Li.fromWorkingColorSpace(va.copy(this), t);
const n = va.r
, r = va.g
, i = va.b
, s = Math.max(n, r, i)
, a = Math.min(n, r, i);
let o, l;
const c = (a + s) / 2;
if (a === s)
o = 0,
l = 0;
else {
const e = s - a;
switch (l = c <= .5 ? e / (s + a) : e / (2 - s - a),
s) {
case n:
o = (r - i) / e + (r < i ? 6 : 0);
break;
case r:
o = (i - n) / e + 2;
break;
case i:
o = (n - r) / e + 4
}
o /= 6
}
return e.h = o,
e.s = l,
e.l = c,
e
}
getRGB(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : Li.workingColorSpace;
return Li.fromWorkingColorSpace(va.copy(this), t),
e.r = va.r,
e.g = va.g,
e.b = va.b,
e
}
getStyle() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : gr;
Li.fromWorkingColorSpace(va.copy(this), e);
const t = va.r
, n = va.g
, r = va.b;
return e !== gr ? "color(".concat(e, " ").concat(t.toFixed(3), " ").concat(n.toFixed(3), " ").concat(r.toFixed(3), ")") : "rgb(".concat(Math.round(255 * t), ",").concat(Math.round(255 * n), ",").concat(Math.round(255 * r), ")")
}
offsetHSL(e, t, n) {
return this.getHSL(pa),
this.setHSL(pa.h + e, pa.s + t, pa.l + n)
}
add(e) {
return this.r += e.r,
this.g += e.g,
this.b += e.b,
this
}
addColors(e, t) {
return this.r = e.r + t.r,
this.g = e.g + t.g,
this.b = e.b + t.b,
this
}
addScalar(e) {
return this.r += e,
this.g += e,
this.b += e,
this
}
sub(e) {
return this.r = Math.max(0, this.r - e.r),
this.g = Math.max(0, this.g - e.g),
this.b = Math.max(0, this.b - e.b),
this
}
multiply(e) {
return this.r *= e.r,
this.g *= e.g,
this.b *= e.b,
this
}
multiplyScalar(e) {
return this.r *= e,
this.g *= e,
this.b *= e,
this
}
lerp(e, t) {
return this.r += (e.r - this.r) * t,
this.g += (e.g - this.g) * t,
this.b += (e.b - this.b) * t,
this
}
lerpColors(e, t, n) {
return this.r = e.r + (t.r - e.r) * n,
this.g = e.g + (t.g - e.g) * n,
this.b = e.b + (t.b - e.b) * n,
this
}
lerpHSL(e, t) {
this.getHSL(pa),
e.getHSL(fa);
const n = mi(pa.h, fa.h, t)
, r = mi(pa.s, fa.s, t)
, i = mi(pa.l, fa.l, t);
return this.setHSL(n, r, i),
this
}
setFromVector3(e) {
return this.r = e.x,
this.g = e.y,
this.b = e.z,
this
}
applyMatrix3(e) {
const t = this.r
, n = this.g
, r = this.b
, i = e.elements;
return this.r = i[0] * t + i[3] * n + i[6] * r,
this.g = i[1] * t + i[4] * n + i[7] * r,
this.b = i[2] * t + i[5] * n + i[8] * r,
this
}
equals(e) {
return e.r === this.r && e.g === this.g && e.b === this.b
}
fromArray(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;
return this.r = e[t],
this.g = e[t + 1],
this.b = e[t + 2],
this
}
toArray() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;
return e[t] = this.r,
e[t + 1] = this.g,
e[t + 2] = this.b,
e
}
fromBufferAttribute(e, t) {
return this.r = e.getX(t),
this.g = e.getY(t),
this.b = e.getZ(t),
this
}
toJSON() {
return this.getHex()
}
*[Symbol.iterator]() {
yield this.r,
yield this.g,
yield this.b
}
}
const va = new ga;
ga.NAMES = ha;
let ya = 0;
class xa extends oi {
constructor() {
super(),
this.isMaterial = !0,
Object.defineProperty(this, "id", {
value: ya++
}),
this.uuid = hi(),
this.name = "",
this.type = "Material",
this.blending = je,
this.side = Le,
this.vertexColors = !1,
this.opacity = 1,
this.transparent = !1,
this.alphaHash = !1,
this.blendSrc = Qe,
this.blendDst = Ze,
this.blendEquation = Ge,
this.blendSrcAlpha = null,
this.blendDstAlpha = null,
this.blendEquationAlpha = null,
this.blendColor = new ga(0,0,0),
this.blendAlpha = 0,
this.depthFunc = dt,
this.depthTest = !0,
this.depthWrite = !0,
this.stencilWriteMask = 255,
this.stencilFunc = Or,
this.stencilRef = 0,
this.stencilFuncMask = 255,
this.stencilFail = Mr,
this.stencilZFail = Mr,
this.stencilZPass = Mr,
this.stencilWrite = !1,
this.clippingPlanes = null,
this.clipIntersection = !1,
this.clipShadows = !1,
this.shadowSide = null,
this.colorWrite = !0,
this.precision = null,
this.polygonOffset = !1,
this.polygonOffsetFactor = 0,
this.polygonOffsetUnits = 0,
this.dithering = !1,
this.alphaToCoverage = !1,
this.premultipliedAlpha = !1,
this.forceSinglePass = !1,
this.visible = !0,
this.toneMapped = !0,
this.userData = {},
this.version = 0,
this._alphaTest = 0
}
get alphaTest() {
return this._alphaTest
}
set alphaTest(e) {
this._alphaTest > 0 !== e > 0 && this.version++,
this._alphaTest = e
}
onBuild() {}
onBeforeRender() {}
onBeforeCompile() {}
customProgramCacheKey() {
return this.onBeforeCompile.toString()
}
setValues(e) {
if (void 0 !== e)
for (const t in e) {
const n = e[t];
if (void 0 === n) {
console.warn("THREE.Material: parameter '".concat(t, "' has value of undefined."));
continue
}
const r = this[t];
void 0 !== r ? r && r.isColor ? r.set(n) : r && r.isVector3 && n && n.isVector3 ? r.copy(n) : this[t] = n : console.warn("THREE.Material: '".concat(t, "' is not a property of THREE.").concat(this.type, "."))
}
}
toJSON(e) {
const t = void 0 === e || "string" === typeof e;
t && (e = {
textures: {},
images: {}
});
const n = {
metadata: {
version: 4.6,
type: "Material",
generator: "Material.toJSON"
}
};
function r(e) {
const t = [];
for (const n in e) {
const r = e[n];
delete r.metadata,
t.push(r)
}
return t
}
if (n.uuid = this.uuid,
n.type = this.type,
"" !== this.name && (n.name = this.name),
this.color && this.color.isColor && (n.color = this.color.getHex()),
void 0 !== this.roughness && (n.roughness = this.roughness),
void 0 !== this.metalness && (n.metalness = this.metalness),
void 0 !== this.sheen && (n.sheen = this.sheen),
this.sheenColor && this.sheenColor.isColor && (n.sheenColor = this.sheenColor.getHex()),
void 0 !== this.sheenRoughness && (n.sheenRoughness = this.sheenRoughness),
this.emissive && this.emissive.isColor && (n.emissive = this.emissive.getHex()),
void 0 !== this.emissiveIntensity && 1 !== this.emissiveIntensity && (n.emissiveIntensity = this.emissiveIntensity),
this.specular && this.specular.isColor && (n.specular = this.specular.getHex()),
void 0 !== this.specularIntensity && (n.specularIntensity = this.specularIntensity),
this.specularColor && this.specularColor.isColor && (n.specularColor = this.specularColor.getHex()),
void 0 !== this.shininess && (n.shininess = this.shininess),
void 0 !== this.clearcoat && (n.clearcoat = this.clearcoat),
void 0 !== this.clearcoatRoughness && (n.clearcoatRoughness = this.clearcoatRoughness),
this.clearcoatMap && this.clearcoatMap.isTexture && (n.clearcoatMap = this.clearcoatMap.toJSON(e).uuid),
this.clearcoatRoughnessMap && this.clearcoatRoughnessMap.isTexture && (n.clearcoatRoughnessMap = this.clearcoatRoughnessMap.toJSON(e).uuid),
this.clearcoatNormalMap && this.clearcoatNormalMap.isTexture && (n.clearcoatNormalMap = this.clearcoatNormalMap.toJSON(e).uuid,
n.clearcoatNormalScale = this.clearcoatNormalScale.toArray()),
void 0 !== this.dispersion && (n.dispersion = this.dispersion),
void 0 !== this.iridescence && (n.iridescence = this.iridescence),
void 0 !== this.iridescenceIOR && (n.iridescenceIOR = this.iridescenceIOR),
void 0 !== this.iridescenceThicknessRange && (n.iridescenceThicknessRange = this.iridescenceThicknessRange),
this.iridescenceMap && this.iridescenceMap.isTexture && (n.iridescenceMap = this.iridescenceMap.toJSON(e).uuid),
this.iridescenceThicknessMap && this.iridescenceThicknessMap.isTexture && (n.iridescenceThicknessMap = this.iridescenceThicknessMap.toJSON(e).uuid),
void 0 !== this.anisotropy && (n.anisotropy = this.anisotropy),
void 0 !== this.anisotropyRotation && (n.anisotropyRotation = this.anisotropyRotation),
this.anisotropyMap && this.anisotropyMap.isTexture && (n.anisotropyMap = this.anisotropyMap.toJSON(e).uuid),
this.map && this.map.isTexture && (n.map = this.map.toJSON(e).uuid),
this.matcap && this.matcap.isTexture && (n.matcap = this.matcap.toJSON(e).uuid),
this.alphaMap && this.alphaMap.isTexture && (n.alphaMap = this.alphaMap.toJSON(e).uuid),
this.lightMap && this.lightMap.isTexture && (n.lightMap = this.lightMap.toJSON(e).uuid,
n.lightMapIntensity = this.lightMapIntensity),
this.aoMap && this.aoMap.isTexture && (n.aoMap = this.aoMap.toJSON(e).uuid,
n.aoMapIntensity = this.aoMapIntensity),
this.bumpMap && this.bumpMap.isTexture && (n.bumpMap = this.bumpMap.toJSON(e).uuid,
n.bumpScale = this.bumpScale),
this.normalMap && this.normalMap.isTexture && (n.normalMap = this.normalMap.toJSON(e).uuid,
n.normalMapType = this.normalMapType,
n.normalScale = this.normalScale.toArray()),
this.displacementMap && this.displacementMap.isTexture && (n.displacementMap = this.displacementMap.toJSON(e).uuid,
n.displacementScale = this.displacementScale,
n.displacementBias = this.displacementBias),
this.roughnessMap && this.roughnessMap.isTexture && (n.roughnessMap = this.roughnessMap.toJSON(e).uuid),
this.metalnessMap && this.metalnessMap.isTexture && (n.metalnessMap = this.metalnessMap.toJSON(e).uuid),
this.emissiveMap && this.emissiveMap.isTexture && (n.emissiveMap = this.emissiveMap.toJSON(e).uuid),
this.specularMap && this.specularMap.isTexture && (n.specularMap = this.specularMap.toJSON(e).uuid),
this.specularIntensityMap && this.specularIntensityMap.isTexture && (n.specularIntensityMap = this.specularIntensityMap.toJSON(e).uuid),
this.specularColorMap && this.specularColorMap.isTexture && (n.specularColorMap = this.specularColorMap.toJSON(e).uuid),
this.envMap && this.envMap.isTexture && (n.envMap = this.envMap.toJSON(e).uuid,
void 0 !== this.combine && (n.combine = this.combine)),
void 0 !== this.envMapRotation && (n.envMapRotation = this.envMapRotation.toArray()),
void 0 !== this.envMapIntensity && (n.envMapIntensity = this.envMapIntensity),
void 0 !== this.reflectivity && (n.reflectivity = this.reflectivity),
void 0 !== this.refractionRatio && (n.refractionRatio = this.refractionRatio),
this.gradientMap && this.gradientMap.isTexture && (n.gradientMap = this.gradientMap.toJSON(e).uuid),
void 0 !== this.transmission && (n.transmission = this.transmission),
this.transmissionMap && this.transmissionMap.isTexture && (n.transmissionMap = this.transmissionMap.toJSON(e).uuid),
void 0 !== this.thickness && (n.thickness = this.thickness),
this.thicknessMap && this.thicknessMap.isTexture && (n.thicknessMap = this.thicknessMap.toJSON(e).uuid),
void 0 !== this.attenuationDistance && this.attenuationDistance !== 1 / 0 && (n.attenuationDistance = this.attenuationDistance),
void 0 !== this.attenuationColor && (n.attenuationColor = this.attenuationColor.getHex()),
void 0 !== this.size && (n.size = this.size),
null !== this.shadowSide && (n.shadowSide = this.shadowSide),
void 0 !== this.sizeAttenuation && (n.sizeAttenuation = this.sizeAttenuation),
this.blending !== je && (n.blending = this.blending),
this.side !== Le && (n.side = this.side),
!0 === this.vertexColors && (n.vertexColors = !0),
this.opacity < 1 && (n.opacity = this.opacity),
!0 === this.transparent && (n.transparent = !0),
this.blendSrc !== Qe && (n.blendSrc = this.blendSrc),
this.blendDst !== Ze && (n.blendDst = this.blendDst),
this.blendEquation !== Ge && (n.blendEquation = this.blendEquation),
null !== this.blendSrcAlpha && (n.blendSrcAlpha = this.blendSrcAlpha),
null !== this.blendDstAlpha && (n.blendDstAlpha = this.blendDstAlpha),
null !== this.blendEquationAlpha && (n.blendEquationAlpha = this.blendEquationAlpha),
this.blendColor && this.blendColor.isColor && (n.blendColor = this.blendColor.getHex()),
0 !== this.blendAlpha && (n.blendAlpha = this.blendAlpha),
this.depthFunc !== dt && (n.depthFunc = this.depthFunc),
!1 === this.depthTest && (n.depthTest = this.depthTest),
!1 === this.depthWrite && (n.depthWrite = this.depthWrite),
!1 === this.colorWrite && (n.colorWrite = this.colorWrite),
255 !== this.stencilWriteMask && (n.stencilWriteMask = this.stencilWriteMask),
this.stencilFunc !== Or && (n.stencilFunc = this.stencilFunc),
0 !== this.stencilRef && (n.stencilRef = this.stencilRef),
255 !== this.stencilFuncMask && (n.stencilFuncMask = this.stencilFuncMask),
this.stencilFail !== Mr && (n.stencilFail = this.stencilFail),
this.stencilZFail !== Mr && (n.stencilZFail = this.stencilZFail),
this.stencilZPass !== Mr && (n.stencilZPass = this.stencilZPass),
!0 === this.stencilWrite && (n.stencilWrite = this.stencilWrite),
void 0 !== this.rotation && 0 !== this.rotation && (n.rotation = this.rotation),
!0 === this.polygonOffset && (n.polygonOffset = !0),
0 !== this.polygonOffsetFactor && (n.polygonOffsetFactor = this.polygonOffsetFactor),
0 !== this.polygonOffsetUnits && (n.polygonOffsetUnits = this.polygonOffsetUnits),
void 0 !== this.linewidth && 1 !== this.linewidth && (n.linewidth = this.linewidth),
void 0 !== this.dashSize && (n.dashSize = this.dashSize),
void 0 !== this.gapSize && (n.gapSize = this.gapSize),
void 0 !== this.scale && (n.scale = this.scale),
!0 === this.dithering && (n.dithering = !0),
this.alphaTest > 0 && (n.alphaTest = this.alphaTest),
!0 === this.alphaHash && (n.alphaHash = !0),
!0 === this.alphaToCoverage && (n.alphaToCoverage = !0),
!0 === this.premultipliedAlpha && (n.premultipliedAlpha = !0),
!0 === this.forceSinglePass && (n.forceSinglePass = !0),
!0 === this.wireframe && (n.wireframe = !0),
this.wireframeLinewidth > 1 && (n.wireframeLinewidth = this.wireframeLinewidth),
"round" !== this.wireframeLinecap && (n.wireframeLinecap = this.wireframeLinecap),
"round" !== this.wireframeLinejoin && (n.wireframeLinejoin = this.wireframeLinejoin),
!0 === this.flatShading && (n.flatShading = !0),
!1 === this.visible && (n.visible = !1),
!1 === this.toneMapped && (n.toneMapped = !1),
!1 === this.fog && (n.fog = !1),
Object.keys(this.userData).length > 0 && (n.userData = this.userData),
t) {
const t = r(e.textures)
, i = r(e.images);
t.length > 0 && (n.textures = t),
i.length > 0 && (n.images = i)
}
return n
}
clone() {
return (new this.constructor).copy(this)
}
copy(e) {
this.name = e.name,
this.blending = e.blending,
this.side = e.side,
this.vertexColors = e.vertexColors,
this.opacity = e.opacity,
this.transparent = e.transparent,
this.blendSrc = e.blendSrc,
this.blendDst = e.blendDst,
this.blendEquation = e.blendEquation,
this.blendSrcAlpha = e.blendSrcAlpha,
this.blendDstAlpha = e.blendDstAlpha,
this.blendEquationAlpha = e.blendEquationAlpha,
this.blendColor.copy(e.blendColor),
this.blendAlpha = e.blendAlpha,
this.depthFunc = e.depthFunc,
this.depthTest = e.depthTest,
this.depthWrite = e.depthWrite,
this.stencilWriteMask = e.stencilWriteMask,
this.stencilFunc = e.stencilFunc,
this.stencilRef = e.stencilRef,
this.stencilFuncMask = e.stencilFuncMask,
this.stencilFail = e.stencilFail,
this.stencilZFail = e.stencilZFail,
this.stencilZPass = e.stencilZPass,
this.stencilWrite = e.stencilWrite;
const t = e.clippingPlanes;
let n = null;
if (null !== t) {
const e = t.length;
n = new Array(e);
for (let r = 0; r !== e; ++r)
n[r] = t[r].clone()
}
return this.clippingPlanes = n,
this.clipIntersection = e.clipIntersection,
this.clipShadows = e.clipShadows,
this.shadowSide = e.shadowSide,
this.colorWrite = e.colorWrite,
this.precision = e.precision,
this.polygonOffset = e.polygonOffset,
this.polygonOffsetFactor = e.polygonOffsetFactor,
this.polygonOffsetUnits = e.polygonOffsetUnits,
this.dithering = e.dithering,
this.alphaTest = e.alphaTest,
this.alphaHash = e.alphaHash,
this.alphaToCoverage = e.alphaToCoverage,
this.premultipliedAlpha = e.premultipliedAlpha,
this.forceSinglePass = e.forceSinglePass,
this.visible = e.visible,
this.toneMapped = e.toneMapped,
this.userData = JSON.parse(JSON.stringify(e.userData)),
this
}
dispose() {
this.dispatchEvent({
type: "dispose"
})
}
set needsUpdate(e) {
!0 === e && this.version++
}
}
class ba extends xa {
constructor(e) {
super(),
this.isMeshBasicMaterial = !0,
this.type = "MeshBasicMaterial",
this.color = new ga(16777215),
this.map = null,
this.lightMap = null,
this.lightMapIntensity = 1,
this.aoMap = null,
this.aoMapIntensity = 1,
this.specularMap = null,
this.alphaMap = null,
this.envMap = null,
this.envMapRotation = new js,
this.combine = gt,
this.reflectivity = 1,
this.refractionRatio = .98,
this.wireframe = !1,
this.wireframeLinewidth = 1,
this.wireframeLinecap = "round",
this.wireframeLinejoin = "round",
this.fog = !0,
this.setValues(e)
}
copy(e) {
return super.copy(e),
this.color.copy(e.color),
this.map = e.map,
this.lightMap = e.lightMap,
this.lightMapIntensity = e.lightMapIntensity,
this.aoMap = e.aoMap,
this.aoMapIntensity = e.aoMapIntensity,
this.specularMap = e.specularMap,
this.alphaMap = e.alphaMap,
this.envMap = e.envMap,
this.envMapRotation.copy(e.envMapRotation),
this.combine = e.combine,
this.reflectivity = e.reflectivity,
this.refractionRatio = e.refractionRatio,
this.wireframe = e.wireframe,
this.wireframeLinewidth = e.wireframeLinewidth,
this.wireframeLinecap = e.wireframeLinecap,
this.wireframeLinejoin = e.wireframeLinejoin,
this.fog = e.fog,
this
}
}
const _a = wa();
function wa() {
const e = new ArrayBuffer(4)
, t = new Float32Array(e)
, n = new Uint32Array(e)
, r = new Uint32Array(512)
, i = new Uint32Array(512);
for (let l = 0; l < 256; ++l) {
const e = l - 127;
e < -27 ? (r[l] = 0,
r[256 | l] = 32768,
i[l] = 24,
i[256 | l] = 24) : e < -14 ? (r[l] = 1024 >> -e - 14,
r[256 | l] = 1024 >> -e - 14 | 32768,
i[l] = -e - 1,
i[256 | l] = -e - 1) : e <= 15 ? (r[l] = e + 15 << 10,
r[256 | l] = e + 15 << 10 | 32768,
i[l] = 13,
i[256 | l] = 13) : e < 128 ? (r[l] = 31744,
r[256 | l] = 64512,
i[l] = 24,
i[256 | l] = 24) : (r[l] = 31744,
r[256 | l] = 64512,
i[l] = 13,
i[256 | l] = 13)
}
const s = new Uint32Array(2048)
, a = new Uint32Array(64)
, o = new Uint32Array(64);
for (let l = 1; l < 1024; ++l) {
let e = l << 13
, t = 0;
for (; 0 === (8388608 & e); )
e <<= 1,
t -= 8388608;
e &= -8388609,
t += 947912704,
s[l] = e | t
}
for (let l = 1024; l < 2048; ++l)
s[l] = 939524096 + (l - 1024 << 13);
for (let l = 1; l < 31; ++l)
a[l] = l << 23;
a[31] = 1199570944,
a[32] = 2147483648;
for (let l = 33; l < 63; ++l)
a[l] = 2147483648 + (l - 32 << 23);
a[63] = 3347054592;
for (let l = 1; l < 64; ++l)
32 !== l && (o[l] = 1024);
return {
floatView: t,
uint32View: n,
baseTable: r,
shiftTable: i,
mantissaTable: s,
exponentTable: a,
offsetTable: o
}
}
function Sa(e) {
Math.abs(e) > 65504 && console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),
e = pi(e, -65504, 65504),
_a.floatView[0] = e;
const t = _a.uint32View[0]
, n = t >> 23 & 511;
return _a.baseTable[n] + ((8388607 & t) >> _a.shiftTable[n])
}
function Aa(e) {
const t = e >> 10;
return _a.uint32View[0] = _a.mantissaTable[_a.offsetTable[t] + (1023 & e)] + _a.exponentTable[t],
_a.floatView[0]
}
const Ma = {
toHalfFloat: Sa,
fromHalfFloat: Aa
}
, Ca = new Qi
, Ea = new xi;
class Ta {
constructor(e, t) {
let n = arguments.length > 2 && void 0 !== arguments[2] && arguments[2];
if (Array.isArray(e))
throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");
this.isBufferAttribute = !0,
this.name = "",
this.array = e,
this.itemSize = t,
this.count = void 0 !== e ? e.length / t : 0,
this.normalized = n,
this.usage = Kr,
this._updateRange = {
offset: 0,
count: -1
},
this.updateRanges = [],
this.gpuType = en,
this.version = 0
}
onUploadCallback() {}
set needsUpdate(e) {
!0 === e && this.version++
}
get updateRange() {
return Ti("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),
this._updateRange
}
setUsage(e) {
return this.usage = e,
this
}
addUpdateRange(e, t) {
this.updateRanges.push({
start: e,
count: t
})
}
clearUpdateRanges() {
this.updateRanges.length = 0
}
copy(e) {
return this.name = e.name,
this.array = new e.array.constructor(e.array),
this.itemSize = e.itemSize,
this.count = e.count,
this.normalized = e.normalized,
this.usage = e.usage,
this.gpuType = e.gpuType,
this
}
copyAt(e, t, n) {
e *= this.itemSize,
n *= t.itemSize;
for (let r = 0, i = this.itemSize; r < i; r++)
this.array[e + r] = t.array[n + r];
return this
}
copyArray(e) {
return this.array.set(e),
this
}
applyMatrix3(e) {
if (2 === this.itemSize)
for (let t = 0, n = this.count; t < n; t++)
Ea.fromBufferAttribute(this, t),
Ea.applyMatrix3(e),
this.setXY(t, Ea.x, Ea.y);
else if (3 === this.itemSize)
for (let t = 0, n = this.count; t < n; t++)
Ca.fromBufferAttribute(this, t),
Ca.applyMatrix3(e),
this.setXYZ(t, Ca.x, Ca.y, Ca.z);
return this
}
applyMatrix4(e) {
for (let t = 0, n = this.count; t < n; t++)
Ca.fromBufferAttribute(this, t),
Ca.applyMatrix4(e),
this.setXYZ(t, Ca.x, Ca.y, Ca.z);
return this
}
applyNormalMatrix(e) {
for (let t = 0, n = this.count; t < n; t++)
Ca.fromBufferAttribute(this, t),
Ca.applyNormalMatrix(e),
this.setXYZ(t, Ca.x, Ca.y, Ca.z);
return this
}
transformDirection(e) {
for (let t = 0, n = this.count; t < n; t++)
Ca.fromBufferAttribute(this, t),
Ca.transformDirection(e),
this.setXYZ(t, Ca.x, Ca.y, Ca.z);
return this
}
set(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;
return this.array.set(e, t),
this
}
getComponent(e, t) {
let n = this.array[e * this.itemSize + t];
return this.normalized && (n = gi(n, this.array)),
n
}
setComponent(e, t, n) {
return this.normalized && (n = vi(n, this.array)),
this.array[e * this.itemSize + t] = n,
this
}
getX(e) {
let t = this.array[e * this.itemSize];
return this.normalized && (t = gi(t, this.array)),
t
}
setX(e, t) {
return this.normalized && (t = vi(t, this.array)),
this.array[e * this.itemSize] = t,
this
}
getY(e) {
let t = this.array[e * this.itemSize + 1];
return this.normalized && (t = gi(t, this.array)),
t
}
setY(e, t) {
return this.normalized && (t = vi(t, this.array)),
this.array[e * this.itemSize + 1] = t,
this
}
getZ(e) {
let t = this.array[e * this.itemSize + 2];
return this.normalized && (t = gi(t, this.array)),
t
}
setZ(e, t) {
return this.normalized && (t = vi(t, this.array)),
this.array[e * this.itemSize + 2] = t,
this
}
getW(e) {
let t = this.array[e * this.itemSize + 3];
return this.normalized && (t = gi(t, this.array)),
t
}
setW(e, t) {
return this.normalized && (t = vi(t, this.array)),
this.array[e * this.itemSize + 3] = t,
this
}
setXY(e, t, n) {
return e *= this.itemSize,
this.normalized && (t = vi(t, this.array),
n = vi(n, this.array)),
this.array[e + 0] = t,
this.array[e + 1] = n,
this
}
setXYZ(e, t, n, r) {
return e *= this.itemSize,
this.normalized && (t = vi(t, this.array),
n = vi(n, this.array),
r = vi(r, this.array)),
this.array[e + 0] = t,
this.array[e + 1] = n,
this.array[e + 2] = r,
this
}
setXYZW(e, t, n, r, i) {
return e *= this.itemSize,
this.normalized && (t = vi(t, this.array),
n = vi(n, this.array),
r = vi(r, this.array),
i = vi(i, this.array)),
this.array[e + 0] = t,
this.array[e + 1] = n,
this.array[e + 2] = r,
this.array[e + 3] = i,
this
}
onUpload(e) {
return this.onUploadCallback = e,
this
}
clone() {
return new this.constructor(this.array,this.itemSize).copy(this)
}
toJSON() {
const e = {
itemSize: this.itemSize,
type: this.array.constructor.name,
array: Array.from(this.array),
normalized: this.normalized
};
return "" !== this.name && (e.name = this.name),
this.usage !== Kr && (e.usage = this.usage),
e
}
}
class Ra extends Ta {
constructor(e, t, n) {
super(new Int8Array(e), t, n)
}
}
class Ba extends Ta {
constructor(e, t, n) {
super(new Uint8Array(e), t, n)
}
}
class Pa extends Ta {
constructor(e, t, n) {
super(new Uint8ClampedArray(e), t, n)
}
}
class ka extends Ta {
constructor(e, t, n) {
super(new Int16Array(e), t, n)
}
}
class La extends Ta {
constructor(e, t, n) {
super(new Uint16Array(e), t, n)
}
}
class Ia extends Ta {
constructor(e, t, n) {
super(new Int32Array(e), t, n)
}
}
class Na extends Ta {
constructor(e, t, n) {
super(new Uint32Array(e), t, n)
}
}
class Da extends Ta {
constructor(e, t, n) {
super(new Uint16Array(e), t, n),
this.isFloat16BufferAttribute = !0
}
getX(e) {
let t = Aa(this.array[e * this.itemSize]);
return this.normalized && (t = gi(t, this.array)),
t
}
setX(e, t) {
return this.normalized && (t = vi(t, this.array)),
this.array[e * this.itemSize] = Sa(t),
this
}
getY(e) {
let t = Aa(this.array[e * this.itemSize + 1]);
return this.normalized && (t = gi(t, this.array)),
t
}
setY(e, t) {
return this.normalized && (t = vi(t, this.array)),
this.array[e * this.itemSize + 1] = Sa(t),
this
}
getZ(e) {
let t = Aa(this.array[e * this.itemSize + 2]);
return this.normalized && (t = gi(t, this.array)),
t
}
setZ(e, t) {
return this.normalized && (t = vi(t, this.array)),
this.array[e * this.itemSize + 2] = Sa(t),
this
}
getW(e) {
let t = Aa(this.array[e * this.itemSize + 3]);
return this.normalized && (t = gi(t, this.array)),
t
}
setW(e, t) {
return this.normalized && (t = vi(t, this.array)),
this.array[e * this.itemSize + 3] = Sa(t),
this
}
setXY(e, t, n) {
return e *= this.itemSize,
this.normalized && (t = vi(t, this.array),
n = vi(n, this.array)),
this.array[e + 0] = Sa(t),
this.array[e + 1] = Sa(n),
this
}
setXYZ(e, t, n, r) {
return e *= this.itemSize,
this.normalized && (t = vi(t, this.array),
n = vi(n, this.array),
r = vi(r, this.array)),
this.array[e + 0] = Sa(t),
this.array[e + 1] = Sa(n),
this.array[e + 2] = Sa(r),
this
}
setXYZW(e, t, n, r, i) {
return e *= this.itemSize,
this.normalized && (t = vi(t, this.array),
n = vi(n, this.array),
r = vi(r, this.array),
i = vi(i, this.array)),
this.array[e + 0] = Sa(t),
this.array[e + 1] = Sa(n),
this.array[e + 2] = Sa(r),
this.array[e + 3] = Sa(i),
this
}
}
class ja extends Ta {
constructor(e, t, n) {
super(new Float32Array(e), t, n)
}
}
let Fa = 0;
const Oa = new Es
, Ua = new ea
, za = new Qi
, Ga = new es
, Ha = new es
, Va = new Qi;
class Wa extends oi {
constructor() {
super(),
this.isBufferGeometry = !0,
Object.defineProperty(this, "id", {
value: Fa++
}),
this.uuid = hi(),
this.name = "",
this.type = "BufferGeometry",
this.index = null,
this.attributes = {},
this.morphAttributes = {},
this.morphTargetsRelative = !1,
this.groups = [],
this.boundingBox = null,
this.boundingSphere = null,
this.drawRange = {
start: 0,
count: 1 / 0
},
this.userData = {}
}
getIndex() {
return this.index
}
setIndex(e) {
return Array.isArray(e) ? this.index = new (wi(e) ? Na : La)(e,1) : this.index = e,
this
}
getAttribute(e) {
return this.attributes[e]
}
setAttribute(e, t) {
return this.attributes[e] = t,
this
}
deleteAttribute(e) {
return delete this.attributes[e],
this
}
hasAttribute(e) {
return void 0 !== this.attributes[e]
}
addGroup(e, t) {
let n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 0;
this.groups.push({
start: e,
count: t,
materialIndex: n
})
}
clearGroups() {
this.groups = []
}
setDrawRange(e, t) {
this.drawRange.start = e,
this.drawRange.count = t
}
applyMatrix4(e) {
const t = this.attributes.position;
void 0 !== t && (t.applyMatrix4(e),
t.needsUpdate = !0);
const n = this.attributes.normal;
if (void 0 !== n) {
const t = (new bi).getNormalMatrix(e);
n.applyNormalMatrix(t),
n.needsUpdate = !0
}
const r = this.attributes.tangent;
return void 0 !== r && (r.transformDirection(e),
r.needsUpdate = !0),
null !== this.boundingBox && this.computeBoundingBox(),
null !== this.boundingSphere && this.computeBoundingSphere(),
this
}
applyQuaternion(e) {
return Oa.makeRotationFromQuaternion(e),
this.applyMatrix4(Oa),
this
}
rotateX(e) {
return Oa.makeRotationX(e),
this.applyMatrix4(Oa),
this
}
rotateY(e) {
return Oa.makeRotationY(e),
this.applyMatrix4(Oa),
this
}
rotateZ(e) {
return Oa.makeRotationZ(e),
this.applyMatrix4(Oa),
this
}
translate(e, t, n) {
return Oa.makeTranslation(e, t, n),
this.applyMatrix4(Oa),
this
}
scale(e, t, n) {
return Oa.makeScale(e, t, n),
this.applyMatrix4(Oa),
this
}
lookAt(e) {
return Ua.lookAt(e),
Ua.updateMatrix(),
this.applyMatrix4(Ua.matrix),
this
}
center() {
return this.computeBoundingBox(),
this.boundingBox.getCenter(za).negate(),
this.translate(za.x, za.y, za.z),
this
}
setFromPoints(e) {
const t = [];
for (let n = 0, r = e.length; n < r; n++) {
const r = e[n];
t.push(r.x, r.y, r.z || 0)
}
return this.setAttribute("position", new ja(t,3)),
this
}
computeBoundingBox() {
null === this.boundingBox && (this.boundingBox = new es);
const e = this.attributes.position
, t = this.morphAttributes.position;
if (e && e.isGLBufferAttribute)
return console.error("THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.", this),
void this.boundingBox.set(new Qi(-1 / 0,-1 / 0,-1 / 0), new Qi(1 / 0,1 / 0,1 / 0));
if (void 0 !== e) {
if (this.boundingBox.setFromBufferAttribute(e),
t)
for (let n = 0, r = t.length; n < r; n++) {
const e = t[n];
Ga.setFromBufferAttribute(e),
this.morphTargetsRelative ? (Va.addVectors(this.boundingBox.min, Ga.min),
this.boundingBox.expandByPoint(Va),
Va.addVectors(this.boundingBox.max, Ga.max),
this.boundingBox.expandByPoint(Va)) : (this.boundingBox.expandByPoint(Ga.min),
this.boundingBox.expandByPoint(Ga.max))
}
} else
this.boundingBox.makeEmpty();
(isNaN(this.boundingBox.min.x) || isNaN(this.boundingBox.min.y) || isNaN(this.boundingBox.min.z)) && console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.', this)
}
computeBoundingSphere() {
null === this.boundingSphere && (this.boundingSphere = new ys);
const e = this.attributes.position
, t = this.morphAttributes.position;
if (e && e.isGLBufferAttribute)
return console.error("THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.", this),
void this.boundingSphere.set(new Qi, 1 / 0);
if (e) {
const n = this.boundingSphere.center;
if (Ga.setFromBufferAttribute(e),
t)
for (let e = 0, i = t.length; e < i; e++) {
const n = t[e];
Ha.setFromBufferAttribute(n),
this.morphTargetsRelative ? (Va.addVectors(Ga.min, Ha.min),
Ga.expandByPoint(Va),
Va.addVectors(Ga.max, Ha.max),
Ga.expandByPoint(Va)) : (Ga.expandByPoint(Ha.min),
Ga.expandByPoint(Ha.max))
}
Ga.getCenter(n);
let r = 0;
for (let t = 0, i = e.count; t < i; t++)
Va.fromBufferAttribute(e, t),
r = Math.max(r, n.distanceToSquared(Va));
if (t)
for (let i = 0, s = t.length; i < s; i++) {
const s = t[i]
, a = this.morphTargetsRelative;
for (let t = 0, i = s.count; t < i; t++)
Va.fromBufferAttribute(s, t),
a && (za.fromBufferAttribute(e, t),
Va.add(za)),
r = Math.max(r, n.distanceToSquared(Va))
}
this.boundingSphere.radius = Math.sqrt(r),
isNaN(this.boundingSphere.radius) && console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.', this)
}
}
computeTangents() {
const e = this.index
, t = this.attributes;
if (null === e || void 0 === t.position || void 0 === t.normal || void 0 === t.uv)
return void console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");
const n = t.position
, r = t.normal
, i = t.uv;
!1 === this.hasAttribute("tangent") && this.setAttribute("tangent", new Ta(new Float32Array(4 * n.count),4));
const s = this.getAttribute("tangent")
, a = []
, o = [];
for (let S = 0; S < n.count; S++)
a[S] = new Qi,
o[S] = new Qi;
const l = new Qi
, c = new Qi
, u = new Qi
, d = new xi
, h = new xi
, p = new xi
, f = new Qi
, m = new Qi;
function g(e, t, r) {
l.fromBufferAttribute(n, e),
c.fromBufferAttribute(n, t),
u.fromBufferAttribute(n, r),
d.fromBufferAttribute(i, e),
h.fromBufferAttribute(i, t),
p.fromBufferAttribute(i, r),
c.sub(l),
u.sub(l),
h.sub(d),
p.sub(d);
const s = 1 / (h.x * p.y - p.x * h.y);
isFinite(s) && (f.copy(c).multiplyScalar(p.y).addScaledVector(u, -h.y).multiplyScalar(s),
m.copy(u).multiplyScalar(h.x).addScaledVector(c, -p.x).multiplyScalar(s),
a[e].add(f),
a[t].add(f),
a[r].add(f),
o[e].add(m),
o[t].add(m),
o[r].add(m))
}
let v = this.groups;
0 === v.length && (v = [{
start: 0,
count: e.count
}]);
for (let S = 0, A = v.length; S < A; ++S) {
const t = v[S]
, n = t.start;
for (let r = n, i = n + t.count; r < i; r += 3)
g(e.getX(r + 0), e.getX(r + 1), e.getX(r + 2))
}
const y = new Qi
, x = new Qi
, b = new Qi
, _ = new Qi;
function w(e) {
b.fromBufferAttribute(r, e),
_.copy(b);
const t = a[e];
y.copy(t),
y.sub(b.multiplyScalar(b.dot(t))).normalize(),
x.crossVectors(_, t);
const n = x.dot(o[e]) < 0 ? -1 : 1;
s.setXYZW(e, y.x, y.y, y.z, n)
}
for (let S = 0, A = v.length; S < A; ++S) {
const t = v[S]
, n = t.start;
for (let r = n, i = n + t.count; r < i; r += 3)
w(e.getX(r + 0)),
w(e.getX(r + 1)),
w(e.getX(r + 2))
}
}
computeVertexNormals() {
const e = this.index
, t = this.getAttribute("position");
if (void 0 !== t) {
let n = this.getAttribute("normal");
if (void 0 === n)
n = new Ta(new Float32Array(3 * t.count),3),
this.setAttribute("normal", n);
else
for (let e = 0, t = n.count; e < t; e++)
n.setXYZ(e, 0, 0, 0);
const r = new Qi
, i = new Qi
, s = new Qi
, a = new Qi
, o = new Qi
, l = new Qi
, c = new Qi
, u = new Qi;
if (e)
for (let d = 0, h = e.count; d < h; d += 3) {
const h = e.getX(d + 0)
, p = e.getX(d + 1)
, f = e.getX(d + 2);
r.fromBufferAttribute(t, h),
i.fromBufferAttribute(t, p),
s.fromBufferAttribute(t, f),
c.subVectors(s, i),
u.subVectors(r, i),
c.cross(u),
a.fromBufferAttribute(n, h),
o.fromBufferAttribute(n, p),
l.fromBufferAttribute(n, f),
a.add(c),
o.add(c),
l.add(c),
n.setXYZ(h, a.x, a.y, a.z),
n.setXYZ(p, o.x, o.y, o.z),
n.setXYZ(f, l.x, l.y, l.z)
}
else
for (let e = 0, d = t.count; e < d; e += 3)
r.fromBufferAttribute(t, e + 0),
i.fromBufferAttribute(t, e + 1),
s.fromBufferAttribute(t, e + 2),
c.subVectors(s, i),
u.subVectors(r, i),
c.cross(u),
n.setXYZ(e + 0, c.x, c.y, c.z),
n.setXYZ(e + 1, c.x, c.y, c.z),
n.setXYZ(e + 2, c.x, c.y, c.z);
this.normalizeNormals(),
n.needsUpdate = !0
}
}
normalizeNormals() {
const e = this.attributes.normal;
for (let t = 0, n = e.count; t < n; t++)
Va.fromBufferAttribute(e, t),
Va.normalize(),
e.setXYZ(t, Va.x, Va.y, Va.z)
}
toNonIndexed() {
function e(e, t) {
const n = e.array
, r = e.itemSize
, i = e.normalized
, s = new n.constructor(t.length * r);
let a = 0
, o = 0;
for (let l = 0, c = t.length; l < c; l++) {
a = e.isInterleavedBufferAttribute ? t[l] * e.data.stride + e.offset : t[l] * r;
for (let e = 0; e < r; e++)
s[o++] = n[a++]
}
return new Ta(s,r,i)
}
if (null === this.index)
return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),
this;
const t = new Wa
, n = this.index.array
, r = this.attributes;
for (const a in r) {
const i = e(r[a], n);
t.setAttribute(a, i)
}
const i = this.morphAttributes;
for (const a in i) {
const r = []
, s = i[a];
for (let t = 0, i = s.length; t < i; t++) {
const i = e(s[t], n);
r.push(i)
}
t.morphAttributes[a] = r
}
t.morphTargetsRelative = this.morphTargetsRelative;
const s = this.groups;
for (let a = 0, o = s.length; a < o; a++) {
const e = s[a];
t.addGroup(e.start, e.count, e.materialIndex)
}
return t
}
toJSON() {
const e = {
metadata: {
version: 4.6,
type: "BufferGeometry",
generator: "BufferGeometry.toJSON"
}
};
if (e.uuid = this.uuid,
e.type = this.type,
"" !== this.name && (e.name = this.name),
Object.keys(this.userData).length > 0 && (e.userData = this.userData),
void 0 !== this.parameters) {
const t = this.parameters;
for (const n in t)
void 0 !== t[n] && (e[n] = t[n]);
return e
}
e.data = {
attributes: {}
};
const t = this.index;
null !== t && (e.data.index = {
type: t.array.constructor.name,
array: Array.prototype.slice.call(t.array)
});
const n = this.attributes;
for (const o in n) {
const t = n[o];
e.data.attributes[o] = t.toJSON(e.data)
}
const r = {};
let i = !1;
for (const o in this.morphAttributes) {
const t = this.morphAttributes[o]
, n = [];
for (let r = 0, i = t.length; r < i; r++) {
const i = t[r];
n.push(i.toJSON(e.data))
}
n.length > 0 && (r[o] = n,
i = !0)
}
i && (e.data.morphAttributes = r,
e.data.morphTargetsRelative = this.morphTargetsRelative);
const s = this.groups;
s.length > 0 && (e.data.groups = JSON.parse(JSON.stringify(s)));
const a = this.boundingSphere;
return null !== a && (e.data.boundingSphere = {
center: a.center.toArray(),
radius: a.radius
}),
e
}
clone() {
return (new this.constructor).copy(this)
}
copy(e) {
this.index = null,
this.attributes = {},
this.morphAttributes = {},
this.groups = [],
this.boundingBox = null,
this.boundingSphere = null;
const t = {};
this.name = e.name;
const n = e.index;
null !== n && this.setIndex(n.clone(t));
const r = e.attributes;
for (const l in r) {
const e = r[l];
this.setAttribute(l, e.clone(t))
}
const i = e.morphAttributes;
for (const l in i) {
const e = []
, n = i[l];
for (let r = 0, i = n.length; r < i; r++)
e.push(n[r].clone(t));
this.morphAttributes[l] = e
}
this.morphTargetsRelative = e.morphTargetsRelative;
const s = e.groups;
for (let l = 0, c = s.length; l < c; l++) {
const e = s[l];
this.addGroup(e.start, e.count, e.materialIndex)
}
const a = e.boundingBox;
null !== a && (this.boundingBox = a.clone());
const o = e.boundingSphere;
return null !== o && (this.boundingSphere = o.clone()),
this.drawRange.start = e.drawRange.start,
this.drawRange.count = e.drawRange.count,
this.userData = e.userData,
this
}
dispose() {
this.dispatchEvent({
type: "dispose"
})
}
}
const Ja = new Es
, Xa = new Cs
, Ka = new ys
, qa = new Qi
, Ya = new Qi
, Qa = new Qi
, Za = new Qi
, $a = new Qi
, eo = new Qi
, to = new xi
, no = new xi
, ro = new xi
, io = new Qi
, so = new Qi
, ao = new Qi
, oo = new Qi
, lo = new Qi;
class co extends ea {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : new Wa
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : new ba;
super(),
this.isMesh = !0,
this.type = "Mesh",
this.geometry = e,
this.material = t,
this.updateMorphTargets()
}
copy(e, t) {
return super.copy(e, t),
void 0 !== e.morphTargetInfluences && (this.morphTargetInfluences = e.morphTargetInfluences.slice()),
void 0 !== e.morphTargetDictionary && (this.morphTargetDictionary = Object.assign({}, e.morphTargetDictionary)),
this.material = Array.isArray(e.material) ? e.material.slice() : e.material,
this.geometry = e.geometry,
this
}
updateMorphTargets() {
const e = this.geometry.morphAttributes
, t = Object.keys(e);
if (t.length > 0) {
const n = e[t[0]];
if (void 0 !== n) {
this.morphTargetInfluences = [],
this.morphTargetDictionary = {};
for (let e = 0, t = n.length; e < t; e++) {
const t = n[e].name || String(e);
this.morphTargetInfluences.push(0),
this.morphTargetDictionary[t] = e
}
}
}
}
getVertexPosition(e, t) {
const n = this.geometry
, r = n.attributes.position
, i = n.morphAttributes.position
, s = n.morphTargetsRelative;
t.fromBufferAttribute(r, e);
const a = this.morphTargetInfluences;
if (i && a) {
eo.set(0, 0, 0);
for (let n = 0, r = i.length; n < r; n++) {
const r = a[n]
, o = i[n];
0 !== r && ($a.fromBufferAttribute(o, e),
s ? eo.addScaledVector($a, r) : eo.addScaledVector($a.sub(t), r))
}
t.add(eo)
}
return t
}
raycast(e, t) {
const n = this.geometry
, r = this.material
, i = this.matrixWorld;
if (void 0 !== r) {
if (null === n.boundingSphere && n.computeBoundingSphere(),
Ka.copy(n.boundingSphere),
Ka.applyMatrix4(i),
Xa.copy(e.ray).recast(e.near),
!1 === Ka.containsPoint(Xa.origin)) {
if (null === Xa.intersectSphere(Ka, qa))
return;
if (Xa.origin.distanceToSquared(qa) > (e.far - e.near) ** 2)
return
}
Ja.copy(i).invert(),
Xa.copy(e.ray).applyMatrix4(Ja),
null !== n.boundingBox && !1 === Xa.intersectsBox(n.boundingBox) || this._computeIntersections(e, t, Xa)
}
}
_computeIntersections(e, t, n) {
let r;
const i = this.geometry
, s = this.material
, a = i.index
, o = i.attributes.position
, l = i.attributes.uv
, c = i.attributes.uv1
, u = i.attributes.normal
, d = i.groups
, h = i.drawRange;
if (null !== a)
if (Array.isArray(s))
for (let p = 0, f = d.length; p < f; p++) {
const i = d[p]
, o = s[i.materialIndex];
for (let s = Math.max(i.start, h.start), d = Math.min(a.count, Math.min(i.start + i.count, h.start + h.count)); s < d; s += 3) {
r = uo(this, o, e, n, l, c, u, a.getX(s), a.getX(s + 1), a.getX(s + 2)),
r && (r.faceIndex = Math.floor(s / 3),
r.face.materialIndex = i.materialIndex,
t.push(r))
}
}
else {
for (let i = Math.max(0, h.start), o = Math.min(a.count, h.start + h.count); i < o; i += 3) {
r = uo(this, s, e, n, l, c, u, a.getX(i), a.getX(i + 1), a.getX(i + 2)),
r && (r.faceIndex = Math.floor(i / 3),
t.push(r))
}
}
else if (void 0 !== o)
if (Array.isArray(s))
for (let p = 0, f = d.length; p < f; p++) {
const i = d[p]
, a = s[i.materialIndex];
for (let s = Math.max(i.start, h.start), d = Math.min(o.count, Math.min(i.start + i.count, h.start + h.count)); s < d; s += 3) {
r = uo(this, a, e, n, l, c, u, s, s + 1, s + 2),
r && (r.faceIndex = Math.floor(s / 3),
r.face.materialIndex = i.materialIndex,
t.push(r))
}
}
else {
for (let i = Math.max(0, h.start), a = Math.min(o.count, h.start + h.count); i < a; i += 3) {
r = uo(this, s, e, n, l, c, u, i, i + 1, i + 2),
r && (r.faceIndex = Math.floor(i / 3),
t.push(r))
}
}
}
}
function uo(e, t, n, r, i, s, a, o, l, c) {
e.getVertexPosition(o, Ya),
e.getVertexPosition(l, Qa),
e.getVertexPosition(c, Za);
const u = function(e, t, n, r, i, s, a, o) {
let l;
if (l = t.side === Ie ? r.intersectTriangle(a, s, i, !0, o) : r.intersectTriangle(i, s, a, t.side === Le, o),
null === l)
return null;
lo.copy(o),
lo.applyMatrix4(e.matrixWorld);
const c = n.ray.origin.distanceTo(lo);
return c < n.near || c > n.far ? null : {
distance: c,
point: lo.clone(),
object: e
}
}(e, t, n, r, Ya, Qa, Za, oo);
if (u) {
i && (to.fromBufferAttribute(i, o),
no.fromBufferAttribute(i, l),
ro.fromBufferAttribute(i, c),
u.uv = da.getInterpolation(oo, Ya, Qa, Za, to, no, ro, new xi)),
s && (to.fromBufferAttribute(s, o),
no.fromBufferAttribute(s, l),
ro.fromBufferAttribute(s, c),
u.uv1 = da.getInterpolation(oo, Ya, Qa, Za, to, no, ro, new xi)),
a && (io.fromBufferAttribute(a, o),
so.fromBufferAttribute(a, l),
ao.fromBufferAttribute(a, c),
u.normal = da.getInterpolation(oo, Ya, Qa, Za, io, so, ao, new Qi),
u.normal.dot(r.direction) > 0 && u.normal.multiplyScalar(-1));
const e = {
a: o,
b: l,
c: c,
normal: new Qi,
materialIndex: 0
};
da.getNormal(Ya, Qa, Za, e.normal),
u.face = e
}
return u
}
class ho extends Wa {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 1
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 1
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 1
, r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : 1
, i = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : 1
, s = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : 1;
super(),
this.type = "BoxGeometry",
this.parameters = {
width: e,
height: t,
depth: n,
widthSegments: r,
heightSegments: i,
depthSegments: s
};
const a = this;
r = Math.floor(r),
i = Math.floor(i),
s = Math.floor(s);
const o = []
, l = []
, c = []
, u = [];
let d = 0
, h = 0;
function p(e, t, n, r, i, s, p, f, m, g, v) {
const y = s / m
, x = p / g
, b = s / 2
, _ = p / 2
, w = f / 2
, S = m + 1
, A = g + 1;
let M = 0
, C = 0;
const E = new Qi;
for (let a = 0; a < A; a++) {
const s = a * x - _;
for (let o = 0; o < S; o++) {
const d = o * y - b;
E[e] = d * r,
E[t] = s * i,
E[n] = w,
l.push(E.x, E.y, E.z),
E[e] = 0,
E[t] = 0,
E[n] = f > 0 ? 1 : -1,
c.push(E.x, E.y, E.z),
u.push(o / m),
u.push(1 - a / g),
M += 1
}
}
for (let a = 0; a < g; a++)
for (let e = 0; e < m; e++) {
const t = d + e + S * a
, n = d + e + S * (a + 1)
, r = d + (e + 1) + S * (a + 1)
, i = d + (e + 1) + S * a;
o.push(t, n, i),
o.push(n, r, i),
C += 6
}
a.addGroup(h, C, v),
h += C,
d += M
}
p("z", "y", "x", -1, -1, n, t, e, s, i, 0),
p("z", "y", "x", 1, -1, n, t, -e, s, i, 1),
p("x", "z", "y", 1, 1, e, n, t, r, s, 2),
p("x", "z", "y", 1, -1, e, n, -t, r, s, 3),
p("x", "y", "z", 1, -1, e, t, n, r, i, 4),
p("x", "y", "z", -1, -1, e, t, -n, r, i, 5),
this.setIndex(o),
this.setAttribute("position", new ja(l,3)),
this.setAttribute("normal", new ja(c,3)),
this.setAttribute("uv", new ja(u,2))
}
copy(e) {
return super.copy(e),
this.parameters = Object.assign({}, e.parameters),
this
}
static fromJSON(e) {
return new ho(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)
}
}
function po(e) {
const t = {};
for (const n in e) {
t[n] = {};
for (const r in e[n]) {
const i = e[n][r];
i && (i.isColor || i.isMatrix3 || i.isMatrix4 || i.isVector2 || i.isVector3 || i.isVector4 || i.isTexture || i.isQuaternion) ? i.isRenderTargetTexture ? (console.warn("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),
t[n][r] = null) : t[n][r] = i.clone() : Array.isArray(i) ? t[n][r] = i.slice() : t[n][r] = i
}
}
return t
}
function fo(e) {
const t = {};
for (let n = 0; n < e.length; n++) {
const r = po(e[n]);
for (const e in r)
t[e] = r[e]
}
return t
}
function mo(e) {
const t = e.getRenderTarget();
return null === t ? e.outputColorSpace : !0 === t.isXRRenderTarget ? t.texture.colorSpace : Li.workingColorSpace
}
const go = {
clone: po,
merge: fo
};
class vo extends xa {
constructor(e) {
super(),
this.isShaderMaterial = !0,
this.type = "ShaderMaterial",
this.defines = {},
this.uniforms = {},
this.uniformsGroups = [],
this.vertexShader = "void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",
this.fragmentShader = "void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}",
this.linewidth = 1,
this.wireframe = !1,
this.wireframeLinewidth = 1,
this.fog = !1,
this.lights = !1,
this.clipping = !1,
this.forceSinglePass = !0,
this.extensions = {
clipCullDistance: !1,
multiDraw: !1
},
this.defaultAttributeValues = {
color: [1, 1, 1],
uv: [0, 0],
uv1: [0, 0]
},
this.index0AttributeName = void 0,
this.uniformsNeedUpdate = !1,
this.glslVersion = null,
void 0 !== e && this.setValues(e)
}
copy(e) {
return super.copy(e),
this.fragmentShader = e.fragmentShader,
this.vertexShader = e.vertexShader,
this.uniforms = po(e.uniforms),
this.uniformsGroups = function(e) {
const t = [];
for (let n = 0; n < e.length; n++)
t.push(e[n].clone());
return t
}(e.uniformsGroups),
this.defines = Object.assign({}, e.defines),
this.wireframe = e.wireframe,
this.wireframeLinewidth = e.wireframeLinewidth,
this.fog = e.fog,
this.lights = e.lights,
this.clipping = e.clipping,
this.extensions = Object.assign({}, e.extensions),
this.glslVersion = e.glslVersion,
this
}
toJSON(e) {
const t = super.toJSON(e);
t.glslVersion = this.glslVersion,
t.uniforms = {};
for (const r in this.uniforms) {
const n = this.uniforms[r].value;
n && n.isTexture ? t.uniforms[r] = {
type: "t",
value: n.toJSON(e).uuid
} : n && n.isColor ? t.uniforms[r] = {
type: "c",
value: n.getHex()
} : n && n.isVector2 ? t.uniforms[r] = {
type: "v2",
value: n.toArray()
} : n && n.isVector3 ? t.uniforms[r] = {
type: "v3",
value: n.toArray()
} : n && n.isVector4 ? t.uniforms[r] = {
type: "v4",
value: n.toArray()
} : n && n.isMatrix3 ? t.uniforms[r] = {
type: "m3",
value: n.toArray()
} : n && n.isMatrix4 ? t.uniforms[r] = {
type: "m4",
value: n.toArray()
} : t.uniforms[r] = {
value: n
}
}
Object.keys(this.defines).length > 0 && (t.defines = this.defines),
t.vertexShader = this.vertexShader,
t.fragmentShader = this.fragmentShader,
t.lights = this.lights,
t.clipping = this.clipping;
const n = {};
for (const r in this.extensions)
!0 === this.extensions[r] && (n[r] = !0);
return Object.keys(n).length > 0 && (t.extensions = n),
t
}
}
class yo extends ea {
constructor() {
super(),
this.isCamera = !0,
this.type = "Camera",
this.matrixWorldInverse = new Es,
this.projectionMatrix = new Es,
this.projectionMatrixInverse = new Es,
this.coordinateSystem = si
}
copy(e, t) {
return super.copy(e, t),
this.matrixWorldInverse.copy(e.matrixWorldInverse),
this.projectionMatrix.copy(e.projectionMatrix),
this.projectionMatrixInverse.copy(e.projectionMatrixInverse),
this.coordinateSystem = e.coordinateSystem,
this
}
getWorldDirection(e) {
return super.getWorldDirection(e).negate()
}
updateMatrixWorld(e) {
super.updateMatrixWorld(e),
this.matrixWorldInverse.copy(this.matrixWorld).invert()
}
updateWorldMatrix(e, t) {
super.updateWorldMatrix(e, t),
this.matrixWorldInverse.copy(this.matrixWorld).invert()
}
clone() {
return (new this.constructor).copy(this)
}
}
const xo = new Qi
, bo = new xi
, _o = new xi;
class wo extends yo {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 50
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 1
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : .1
, r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : 2e3;
super(),
this.isPerspectiveCamera = !0,
this.type = "PerspectiveCamera",
this.fov = e,
this.zoom = 1,
this.near = n,
this.far = r,
this.focus = 10,
this.aspect = t,
this.view = null,
this.filmGauge = 35,
this.filmOffset = 0,
this.updateProjectionMatrix()
}
copy(e, t) {
return super.copy(e, t),
this.fov = e.fov,
this.zoom = e.zoom,
this.near = e.near,
this.far = e.far,
this.focus = e.focus,
this.aspect = e.aspect,
this.view = null === e.view ? null : Object.assign({}, e.view),
this.filmGauge = e.filmGauge,
this.filmOffset = e.filmOffset,
this
}
setFocalLength(e) {
const t = .5 * this.getFilmHeight() / e;
this.fov = 2 * di * Math.atan(t),
this.updateProjectionMatrix()
}
getFocalLength() {
const e = Math.tan(.5 * ui * this.fov);
return .5 * this.getFilmHeight() / e
}
getEffectiveFOV() {
return 2 * di * Math.atan(Math.tan(.5 * ui * this.fov) / this.zoom)
}
getFilmWidth() {
return this.filmGauge * Math.min(this.aspect, 1)
}
getFilmHeight() {
return this.filmGauge / Math.max(this.aspect, 1)
}
getViewBounds(e, t, n) {
xo.set(-1, -1, .5).applyMatrix4(this.projectionMatrixInverse),
t.set(xo.x, xo.y).multiplyScalar(-e / xo.z),
xo.set(1, 1, .5).applyMatrix4(this.projectionMatrixInverse),
n.set(xo.x, xo.y).multiplyScalar(-e / xo.z)
}
getViewSize(e, t) {
return this.getViewBounds(e, bo, _o),
t.subVectors(_o, bo)
}
setViewOffset(e, t, n, r, i, s) {
this.aspect = e / t,
null === this.view && (this.view = {
enabled: !0,
fullWidth: 1,
fullHeight: 1,
offsetX: 0,
offsetY: 0,
width: 1,
height: 1
}),
this.view.enabled = !0,
this.view.fullWidth = e,
this.view.fullHeight = t,
this.view.offsetX = n,
this.view.offsetY = r,
this.view.width = i,
this.view.height = s,
this.updateProjectionMatrix()
}
clearViewOffset() {
null !== this.view && (this.view.enabled = !1),
this.updateProjectionMatrix()
}
updateProjectionMatrix() {
const e = this.near;
let t = e * Math.tan(.5 * ui * this.fov) / this.zoom
, n = 2 * t
, r = this.aspect * n
, i = -.5 * r;
const s = this.view;
if (null !== this.view && this.view.enabled) {
const e = s.fullWidth
, a = s.fullHeight;
i += s.offsetX * r / e,
t -= s.offsetY * n / a,
r *= s.width / e,
n *= s.height / a
}
const a = this.filmOffset;
0 !== a && (i += e * a / this.getFilmWidth()),
this.projectionMatrix.makePerspective(i, i + r, t, t - n, e, this.far, this.coordinateSystem),
this.projectionMatrixInverse.copy(this.projectionMatrix).invert()
}
toJSON(e) {
const t = super.toJSON(e);
return t.object.fov = this.fov,
t.object.zoom = this.zoom,
t.object.near = this.near,
t.object.far = this.far,
t.object.focus = this.focus,
t.object.aspect = this.aspect,
null !== this.view && (t.object.view = Object.assign({}, this.view)),
t.object.filmGauge = this.filmGauge,
t.object.filmOffset = this.filmOffset,
t
}
}
const So = -90;
class Ao extends ea {
constructor(e, t, n) {
super(),
this.type = "CubeCamera",
this.renderTarget = n,
this.coordinateSystem = null,
this.activeMipmapLevel = 0;
const r = new wo(So,1,e,t);
r.layers = this.layers,
this.add(r);
const i = new wo(So,1,e,t);
i.layers = this.layers,
this.add(i);
const s = new wo(So,1,e,t);
s.layers = this.layers,
this.add(s);
const a = new wo(So,1,e,t);
a.layers = this.layers,
this.add(a);
const o = new wo(So,1,e,t);
o.layers = this.layers,
this.add(o);
const l = new wo(So,1,e,t);
l.layers = this.layers,
this.add(l)
}
updateCoordinateSystem() {
const e = this.coordinateSystem
, t = this.children.concat()
, [n,r,i,s,a,o] = t;
for (const l of t)
this.remove(l);
if (e === si)
n.up.set(0, 1, 0),
n.lookAt(1, 0, 0),
r.up.set(0, 1, 0),
r.lookAt(-1, 0, 0),
i.up.set(0, 0, -1),
i.lookAt(0, 1, 0),
s.up.set(0, 0, 1),
s.lookAt(0, -1, 0),
a.up.set(0, 1, 0),
a.lookAt(0, 0, 1),
o.up.set(0, 1, 0),
o.lookAt(0, 0, -1);
else {
if (e !== ai)
throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: " + e);
n.up.set(0, -1, 0),
n.lookAt(-1, 0, 0),
r.up.set(0, -1, 0),
r.lookAt(1, 0, 0),
i.up.set(0, 0, 1),
i.lookAt(0, 1, 0),
s.up.set(0, 0, -1),
s.lookAt(0, -1, 0),
a.up.set(0, -1, 0),
a.lookAt(0, 0, 1),
o.up.set(0, -1, 0),
o.lookAt(0, 0, -1)
}
for (const l of t)
this.add(l),
l.updateMatrixWorld()
}
update(e, t) {
null === this.parent && this.updateMatrixWorld();
const {renderTarget: n, activeMipmapLevel: r} = this;
this.coordinateSystem !== e.coordinateSystem && (this.coordinateSystem = e.coordinateSystem,
this.updateCoordinateSystem());
const [i,s,a,o,l,c] = this.children
, u = e.getRenderTarget()
, d = e.getActiveCubeFace()
, h = e.getActiveMipmapLevel()
, p = e.xr.enabled;
e.xr.enabled = !1;
const f = n.texture.generateMipmaps;
n.texture.generateMipmaps = !1,
e.setRenderTarget(n, 0, r),
e.render(t, i),
e.setRenderTarget(n, 1, r),
e.render(t, s),
e.setRenderTarget(n, 2, r),
e.render(t, a),
e.setRenderTarget(n, 3, r),
e.render(t, o),
e.setRenderTarget(n, 4, r),
e.render(t, l),
n.texture.generateMipmaps = f,
e.setRenderTarget(n, 5, r),
e.render(t, c),
e.setRenderTarget(u, d, h),
e.xr.enabled = p,
n.texture.needsPMREMUpdate = !0
}
}
class Mo extends Gi {
constructor(e, t, n, r, i, s, a, o, l, c) {
super(e = void 0 !== e ? e : [], t = void 0 !== t ? t : Bt, n, r, i, s, a, o, l, c),
this.isCubeTexture = !0,
this.flipY = !1
}
get images() {
return this.image
}
set images(e) {
this.image = e
}
}
class Co extends Wi {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 1
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
super(e, e, t),
this.isWebGLCubeRenderTarget = !0;
const n = {
width: e,
height: e,
depth: 1
}
, r = [n, n, n, n, n, n];
this.texture = new Mo(r,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.colorSpace),
this.texture.isRenderTargetTexture = !0,
this.texture.generateMipmaps = void 0 !== t.generateMipmaps && t.generateMipmaps,
this.texture.minFilter = void 0 !== t.minFilter ? t.minFilter : Ht
}
fromEquirectangularTexture(e, t) {
this.texture.type = t.type,
this.texture.colorSpace = t.colorSpace,
this.texture.generateMipmaps = t.generateMipmaps,
this.texture.minFilter = t.minFilter,
this.texture.magFilter = t.magFilter;
const n = {
tEquirect: {
value: null
}
}
, r = "\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include <begin_vertex>\n\t\t\t\t\t#include <project_vertex>\n\n\t\t\t\t}\n\t\t\t"
, i = "\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include <common>\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t"
, s = new ho(5,5,5)
, a = new vo({
name: "CubemapFromEquirect",
uniforms: po(n),
vertexShader: r,
fragmentShader: i,
side: Ie,
blending: De
});
a.uniforms.tEquirect.value = t;
const o = new co(s,a)
, l = t.minFilter;
t.minFilter === Jt && (t.minFilter = Ht);
return new Ao(1,10,this).update(e, o),
t.minFilter = l,
o.geometry.dispose(),
o.material.dispose(),
this
}
clear(e, t, n, r) {
const i = e.getRenderTarget();
for (let s = 0; s < 6; s++)
e.setRenderTarget(this, s),
e.clear(t, n, r);
e.setRenderTarget(i)
}
}
const Eo = new Qi
, To = new Qi
, Ro = new bi;
class Bo {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : new Qi(1,0,0)
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;
this.isPlane = !0,
this.normal = e,
this.constant = t
}
set(e, t) {
return this.normal.copy(e),
this.constant = t,
this
}
setComponents(e, t, n, r) {
return this.normal.set(e, t, n),
this.constant = r,
this
}
setFromNormalAndCoplanarPoint(e, t) {
return this.normal.copy(e),
this.constant = -t.dot(this.normal),
this
}
setFromCoplanarPoints(e, t, n) {
const r = Eo.subVectors(n, t).cross(To.subVectors(e, t)).normalize();
return this.setFromNormalAndCoplanarPoint(r, e),
this
}
copy(e) {
return this.normal.copy(e.normal),
this.constant = e.constant,
this
}
normalize() {
const e = 1 / this.normal.length();
return this.normal.multiplyScalar(e),
this.constant *= e,
this
}
negate() {
return this.constant *= -1,
this.normal.negate(),
this
}
distanceToPoint(e) {
return this.normal.dot(e) + this.constant
}
distanceToSphere(e) {
return this.distanceToPoint(e.center) - e.radius
}
projectPoint(e, t) {
return t.copy(e).addScaledVector(this.normal, -this.distanceToPoint(e))
}
intersectLine(e, t) {
const n = e.delta(Eo)
, r = this.normal.dot(n);
if (0 === r)
return 0 === this.distanceToPoint(e.start) ? t.copy(e.start) : null;
const i = -(e.start.dot(this.normal) + this.constant) / r;
return i < 0 || i > 1 ? null : t.copy(e.start).addScaledVector(n, i)
}
intersectsLine(e) {
const t = this.distanceToPoint(e.start)
, n = this.distanceToPoint(e.end);
return t < 0 && n > 0 || n < 0 && t > 0
}
intersectsBox(e) {
return e.intersectsPlane(this)
}
intersectsSphere(e) {
return e.intersectsPlane(this)
}
coplanarPoint(e) {
return e.copy(this.normal).multiplyScalar(-this.constant)
}
applyMatrix4(e, t) {
const n = t || Ro.getNormalMatrix(e)
, r = this.coplanarPoint(Eo).applyMatrix4(e)
, i = this.normal.applyMatrix3(n).normalize();
return this.constant = -r.dot(i),
this
}
translate(e) {
return this.constant -= e.dot(this.normal),
this
}
equals(e) {
return e.normal.equals(this.normal) && e.constant === this.constant
}
clone() {
return (new this.constructor).copy(this)
}
}
const Po = new ys
, ko = new Qi;
class Lo {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : new Bo
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : new Bo
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : new Bo
, r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : new Bo
, i = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : new Bo
, s = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : new Bo;
this.planes = [e, t, n, r, i, s]
}
set(e, t, n, r, i, s) {
const a = this.planes;
return a[0].copy(e),
a[1].copy(t),
a[2].copy(n),
a[3].copy(r),
a[4].copy(i),
a[5].copy(s),
this
}
copy(e) {
const t = this.planes;
for (let n = 0; n < 6; n++)
t[n].copy(e.planes[n]);
return this
}
setFromProjectionMatrix(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : si;
const n = this.planes
, r = e.elements
, i = r[0]
, s = r[1]
, a = r[2]
, o = r[3]
, l = r[4]
, c = r[5]
, u = r[6]
, d = r[7]
, h = r[8]
, p = r[9]
, f = r[10]
, m = r[11]
, g = r[12]
, v = r[13]
, y = r[14]
, x = r[15];
if (n[0].setComponents(o - i, d - l, m - h, x - g).normalize(),
n[1].setComponents(o + i, d + l, m + h, x + g).normalize(),
n[2].setComponents(o + s, d + c, m + p, x + v).normalize(),
n[3].setComponents(o - s, d - c, m - p, x - v).normalize(),
n[4].setComponents(o - a, d - u, m - f, x - y).normalize(),
t === si)
n[5].setComponents(o + a, d + u, m + f, x + y).normalize();
else {
if (t !== ai)
throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: " + t);
n[5].setComponents(a, u, f, y).normalize()
}
return this
}
intersectsObject(e) {
if (void 0 !== e.boundingSphere)
null === e.boundingSphere && e.computeBoundingSphere(),
Po.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);
else {
const t = e.geometry;
null === t.boundingSphere && t.computeBoundingSphere(),
Po.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)
}
return this.intersectsSphere(Po)
}
intersectsSprite(e) {
return Po.center.set(0, 0, 0),
Po.radius = .7071067811865476,
Po.applyMatrix4(e.matrixWorld),
this.intersectsSphere(Po)
}
intersectsSphere(e) {
const t = this.planes
, n = e.center
, r = -e.radius;
for (let i = 0; i < 6; i++) {
if (t[i].distanceToPoint(n) < r)
return !1
}
return !0
}
intersectsBox(e) {
const t = this.planes;
for (let n = 0; n < 6; n++) {
const r = t[n];
if (ko.x = r.normal.x > 0 ? e.max.x : e.min.x,
ko.y = r.normal.y > 0 ? e.max.y : e.min.y,
ko.z = r.normal.z > 0 ? e.max.z : e.min.z,
r.distanceToPoint(ko) < 0)
return !1
}
return !0
}
containsPoint(e) {
const t = this.planes;
for (let n = 0; n < 6; n++)
if (t[n].distanceToPoint(e) < 0)
return !1;
return !0
}
clone() {
return (new this.constructor).copy(this)
}
}
function Io() {
let e = null
, t = !1
, n = null
, r = null;
function i(t, s) {
n(t, s),
r = e.requestAnimationFrame(i)
}
return {
start: function() {
!0 !== t && null !== n && (r = e.requestAnimationFrame(i),
t = !0)
},
stop: function() {
e.cancelAnimationFrame(r),
t = !1
},
setAnimationLoop: function(e) {
n = e
},
setContext: function(t) {
e = t
}
}
}
function No(e) {
const t = new WeakMap;
return {
get: function(e) {
return e.isInterleavedBufferAttribute && (e = e.data),
t.get(e)
},
remove: function(n) {
n.isInterleavedBufferAttribute && (n = n.data);
const r = t.get(n);
r && (e.deleteBuffer(r.buffer),
t.delete(n))
},
update: function(n, r) {
if (n.isGLBufferAttribute) {
const e = t.get(n);
return void ((!e || e.version < n.version) && t.set(n, {
buffer: n.buffer,
type: n.type,
bytesPerElement: n.elementSize,
version: n.version
}))
}
n.isInterleavedBufferAttribute && (n = n.data);
const i = t.get(n);
if (void 0 === i)
t.set(n, function(t, n) {
const r = t.array
, i = t.usage
, s = r.byteLength
, a = e.createBuffer();
let o;
if (e.bindBuffer(n, a),
e.bufferData(n, r, i),
t.onUploadCallback(),
r instanceof Float32Array)
o = e.FLOAT;
else if (r instanceof Uint16Array)
o = t.isFloat16BufferAttribute ? e.HALF_FLOAT : e.UNSIGNED_SHORT;
else if (r instanceof Int16Array)
o = e.SHORT;
else if (r instanceof Uint32Array)
o = e.UNSIGNED_INT;
else if (r instanceof Int32Array)
o = e.INT;
else if (r instanceof Int8Array)
o = e.BYTE;
else if (r instanceof Uint8Array)
o = e.UNSIGNED_BYTE;
else {
if (!(r instanceof Uint8ClampedArray))
throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: " + r);
o = e.UNSIGNED_BYTE
}
return {
buffer: a,
type: o,
bytesPerElement: r.BYTES_PER_ELEMENT,
version: t.version,
size: s
}
}(n, r));
else if (i.version < n.version) {
if (i.size !== n.array.byteLength)
throw new Error("THREE.WebGLAttributes: The size of the buffer attribute's array buffer does not match the original size. Resizing buffer attributes is not supported.");
!function(t, n, r) {
const i = n.array
, s = n._updateRange
, a = n.updateRanges;
if (e.bindBuffer(r, t),
-1 === s.count && 0 === a.length && e.bufferSubData(r, 0, i),
0 !== a.length) {
for (let t = 0, n = a.length; t < n; t++) {
const n = a[t];
e.bufferSubData(r, n.start * i.BYTES_PER_ELEMENT, i, n.start, n.count)
}
n.clearUpdateRanges()
}
-1 !== s.count && (e.bufferSubData(r, s.offset * i.BYTES_PER_ELEMENT, i, s.offset, s.count),
s.count = -1),
n.onUploadCallback()
}(i.buffer, n, r),
i.version = n.version
}
}
}
}
class Do extends Wa {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 1
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 1
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 1
, r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : 1;
super(),
this.type = "PlaneGeometry",
this.parameters = {
width: e,
height: t,
widthSegments: n,
heightSegments: r
};
const i = e / 2
, s = t / 2
, a = Math.floor(n)
, o = Math.floor(r)
, l = a + 1
, c = o + 1
, u = e / a
, d = t / o
, h = []
, p = []
, f = []
, m = [];
for (let g = 0; g < c; g++) {
const e = g * d - s;
for (let t = 0; t < l; t++) {
const n = t * u - i;
p.push(n, -e, 0),
f.push(0, 0, 1),
m.push(t / a),
m.push(1 - g / o)
}
}
for (let g = 0; g < o; g++)
for (let e = 0; e < a; e++) {
const t = e + l * g
, n = e + l * (g + 1)
, r = e + 1 + l * (g + 1)
, i = e + 1 + l * g;
h.push(t, n, i),
h.push(n, r, i)
}
this.setIndex(h),
this.setAttribute("position", new ja(p,3)),
this.setAttribute("normal", new ja(f,3)),
this.setAttribute("uv", new ja(m,2))
}
copy(e) {
return super.copy(e),
this.parameters = Object.assign({}, e.parameters),
this
}
static fromJSON(e) {
return new Do(e.width,e.height,e.widthSegments,e.heightSegments)
}
}
const jo = {
alphahash_fragment: "#ifdef USE_ALPHAHASH\n\tif ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard;\n#endif",
alphahash_pars_fragment: "#ifdef USE_ALPHAHASH\n\tconst float ALPHA_HASH_SCALE = 0.05;\n\tfloat hash2D( vec2 value ) {\n\t\treturn fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) );\n\t}\n\tfloat hash3D( vec3 value ) {\n\t\treturn hash2D( vec2( hash2D( value.xy ), value.z ) );\n\t}\n\tfloat getAlphaHashThreshold( vec3 position ) {\n\t\tfloat maxDeriv = max(\n\t\t\tlength( dFdx( position.xyz ) ),\n\t\t\tlength( dFdy( position.xyz ) )\n\t\t);\n\t\tfloat pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv );\n\t\tvec2 pixScales = vec2(\n\t\t\texp2( floor( log2( pixScale ) ) ),\n\t\t\texp2( ceil( log2( pixScale ) ) )\n\t\t);\n\t\tvec2 alpha = vec2(\n\t\t\thash3D( floor( pixScales.x * position.xyz ) ),\n\t\t\thash3D( floor( pixScales.y * position.xyz ) )\n\t\t);\n\t\tfloat lerpFactor = fract( log2( pixScale ) );\n\t\tfloat x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y;\n\t\tfloat a = min( lerpFactor, 1.0 - lerpFactor );\n\t\tvec3 cases = vec3(\n\t\t\tx * x / ( 2.0 * a * ( 1.0 - a ) ),\n\t\t\t( x - 0.5 * a ) / ( 1.0 - a ),\n\t\t\t1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) )\n\t\t);\n\t\tfloat threshold = ( x < ( 1.0 - a ) )\n\t\t\t? ( ( x < a ) ? cases.x : cases.y )\n\t\t\t: cases.z;\n\t\treturn clamp( threshold , 1.0e-6, 1.0 );\n\t}\n#endif",
alphamap_fragment: "#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g;\n#endif",
alphamap_pars_fragment: "#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",
alphatest_fragment: "#ifdef USE_ALPHATEST\n\t#ifdef ALPHA_TO_COVERAGE\n\tdiffuseColor.a = smoothstep( alphaTest, alphaTest + fwidth( diffuseColor.a ), diffuseColor.a );\n\tif ( diffuseColor.a == 0.0 ) discard;\n\t#else\n\tif ( diffuseColor.a < alphaTest ) discard;\n\t#endif\n#endif",
alphatest_pars_fragment: "#ifdef USE_ALPHATEST\n\tuniform float alphaTest;\n#endif",
aomap_fragment: "#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_CLEARCOAT ) \n\t\tclearcoatSpecularIndirect *= ambientOcclusion;\n\t#endif\n\t#if defined( USE_SHEEN ) \n\t\tsheenSpecularIndirect *= ambientOcclusion;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometryNormal, geometryViewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\n\t#endif\n#endif",
aomap_pars_fragment: "#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",
batching_pars_vertex: "#ifdef USE_BATCHING\n\tattribute float batchId;\n\tuniform highp sampler2D batchingTexture;\n\tmat4 getBatchingMatrix( const in float i ) {\n\t\tint size = textureSize( batchingTexture, 0 ).x;\n\t\tint j = int( i ) * 4;\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\tvec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 );\n\t\tvec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 );\n\t\tvec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 );\n\t\tvec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 );\n\t\treturn mat4( v1, v2, v3, v4 );\n\t}\n#endif\n#ifdef USE_BATCHING_COLOR\n\tuniform sampler2D batchingColorTexture;\n\tvec3 getBatchingColor( const in float i ) {\n\t\tint size = textureSize( batchingColorTexture, 0 ).x;\n\t\tint j = int( i );\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\treturn texelFetch( batchingColorTexture, ivec2( x, y ), 0 ).rgb;\n\t}\n#endif",
batching_vertex: "#ifdef USE_BATCHING\n\tmat4 batchingMatrix = getBatchingMatrix( batchId );\n#endif",
begin_vertex: "vec3 transformed = vec3( position );\n#ifdef USE_ALPHAHASH\n\tvPosition = vec3( position );\n#endif",
beginnormal_vertex: "vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif",
bsdfs: "float G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, 1.0, dotVH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n} // validated",
iridescence_fragment: "#ifdef USE_IRIDESCENCE\n\tconst mat3 XYZ_TO_REC709 = mat3(\n\t\t 3.2404542, -0.9692660, 0.0556434,\n\t\t-1.5371385, 1.8760108, -0.2040259,\n\t\t-0.4985314, 0.0415560, 1.0572252\n\t);\n\tvec3 Fresnel0ToIor( vec3 fresnel0 ) {\n\t\tvec3 sqrtF0 = sqrt( fresnel0 );\n\t\treturn ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );\n\t}\n\tvec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );\n\t}\n\tfloat IorToFresnel0( float transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));\n\t}\n\tvec3 evalSensitivity( float OPD, vec3 shift ) {\n\t\tfloat phase = 2.0 * PI * OPD * 1.0e-9;\n\t\tvec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );\n\t\tvec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );\n\t\tvec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );\n\t\tvec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );\n\t\txyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) );\n\t\txyz /= 1.0685e-7;\n\t\tvec3 rgb = XYZ_TO_REC709 * xyz;\n\t\treturn rgb;\n\t}\n\tvec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {\n\t\tvec3 I;\n\t\tfloat iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );\n\t\tfloat sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );\n\t\tfloat cosTheta2Sq = 1.0 - sinTheta2Sq;\n\t\tif ( cosTheta2Sq < 0.0 ) {\n\t\t\treturn vec3( 1.0 );\n\t\t}\n\t\tfloat cosTheta2 = sqrt( cosTheta2Sq );\n\t\tfloat R0 = IorToFresnel0( iridescenceIOR, outsideIOR );\n\t\tfloat R12 = F_Schlick( R0, 1.0, cosTheta1 );\n\t\tfloat T121 = 1.0 - R12;\n\t\tfloat phi12 = 0.0;\n\t\tif ( iridescenceIOR < outsideIOR ) phi12 = PI;\n\t\tfloat phi21 = PI - phi12;\n\t\tvec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) );\t\tvec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );\n\t\tvec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );\n\t\tvec3 phi23 = vec3( 0.0 );\n\t\tif ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;\n\t\tif ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;\n\t\tif ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;\n\t\tfloat OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;\n\t\tvec3 phi = vec3( phi21 ) + phi23;\n\t\tvec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );\n\t\tvec3 r123 = sqrt( R123 );\n\t\tvec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );\n\t\tvec3 C0 = R12 + Rs;\n\t\tI = C0;\n\t\tvec3 Cm = Rs - T121;\n\t\tfor ( int m = 1; m <= 2; ++ m ) {\n\t\t\tCm *= r123;\n\t\t\tvec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );\n\t\t\tI += Cm * Sm;\n\t\t}\n\t\treturn max( I, vec3( 0.0 ) );\n\t}\n#endif",
bumpmap_pars_fragment: "#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vBumpMapUv );\n\t\tvec2 dSTdy = dFdy( vBumpMapUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n\t\tvec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) );\n\t\tvec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif",
clipping_planes_fragment: "#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#ifdef ALPHA_TO_COVERAGE\n\t\tfloat distanceToPlane, distanceGradient;\n\t\tfloat clipOpacity = 1.0;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tdistanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n\t\t\tdistanceGradient = fwidth( distanceToPlane ) / 2.0;\n\t\t\tclipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n\t\t\tif ( clipOpacity == 0.0 ) discard;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\t\tfloat unionClipOpacity = 1.0;\n\t\t\t#pragma unroll_loop_start\n\t\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\t\tplane = clippingPlanes[ i ];\n\t\t\t\tdistanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n\t\t\t\tdistanceGradient = fwidth( distanceToPlane ) / 2.0;\n\t\t\t\tunionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n\t\t\t}\n\t\t\t#pragma unroll_loop_end\n\t\t\tclipOpacity *= 1.0 - unionClipOpacity;\n\t\t#endif\n\t\tdiffuseColor.a *= clipOpacity;\n\t\tif ( diffuseColor.a == 0.0 ) discard;\n\t#else\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\t\tbool clipped = true;\n\t\t\t#pragma unroll_loop_start\n\t\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\t\tplane = clippingPlanes[ i ];\n\t\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t\t}\n\t\t\t#pragma unroll_loop_end\n\t\t\tif ( clipped ) discard;\n\t\t#endif\n\t#endif\n#endif",
clipping_planes_pars_fragment: "#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",
clipping_planes_pars_vertex: "#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",
clipping_planes_vertex: "#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",
color_fragment: "#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif",
color_pars_fragment: "#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif",
color_pars_vertex: "#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )\n\tvarying vec3 vColor;\n#endif",
color_vertex: "#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif\n#ifdef USE_BATCHING_COLOR\n\tvec3 batchingColor = getBatchingColor( batchId );\n\tvColor.xyz *= batchingColor.xyz;\n#endif",
common: "#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\n#ifdef USE_ALPHAHASH\n\tvarying vec3 vPosition;\n#endif\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat luminance( const in vec3 rgb ) {\n\tconst vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 );\n\treturn dot( weights, rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n} // validated",
cube_uv_reflection_fragment: "#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\thighp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\t#ifdef texture2DGradEXT\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n\t\t#else\n\t\t\treturn texture2D( envMap, uv ).rgb;\n\t\t#endif\n\t}\n\t#define cubeUV_r0 1.0\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= cubeUV_r1 ) {\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",
defaultnormal_vertex: "vec3 transformedNormal = objectNormal;\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = objectTangent;\n#endif\n#ifdef USE_BATCHING\n\tmat3 bm = mat3( batchingMatrix );\n\ttransformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) );\n\ttransformedNormal = bm * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = bm * transformedTangent;\n\t#endif\n#endif\n#ifdef USE_INSTANCING\n\tmat3 im = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );\n\ttransformedNormal = im * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = im * transformedTangent;\n\t#endif\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\ttransformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",
displacementmap_pars_vertex: "#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",
displacementmap_vertex: "#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );\n#endif",
emissivemap_fragment: "#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",
emissivemap_pars_fragment: "#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",
colorspace_fragment: "gl_FragColor = linearToOutputTexel( gl_FragColor );",
colorspace_pars_fragment: "\nconst mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3(\n\tvec3( 0.8224621, 0.177538, 0.0 ),\n\tvec3( 0.0331941, 0.9668058, 0.0 ),\n\tvec3( 0.0170827, 0.0723974, 0.9105199 )\n);\nconst mat3 LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.2249401, - 0.2249404, 0.0 ),\n\tvec3( - 0.0420569, 1.0420571, 0.0 ),\n\tvec3( - 0.0196376, - 0.0786361, 1.0982735 )\n);\nvec4 LinearSRGBToLinearDisplayP3( in vec4 value ) {\n\treturn vec4( value.rgb * LINEAR_SRGB_TO_LINEAR_DISPLAY_P3, value.a );\n}\nvec4 LinearDisplayP3ToLinearSRGB( in vec4 value ) {\n\treturn vec4( value.rgb * LINEAR_DISPLAY_P3_TO_LINEAR_SRGB, value.a );\n}\nvec4 LinearTransferOETF( in vec4 value ) {\n\treturn value;\n}\nvec4 sRGBTransferOETF( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn sRGBTransferOETF( value );\n}",
envmap_fragment: "#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",
envmap_common_pars_fragment: "#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\tuniform mat3 envMapRotation;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",
envmap_pars_fragment: "#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",
envmap_pars_vertex: "#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",
envmap_physical_pars_fragment: "#ifdef USE_ENVMAP\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 reflectVec = reflect( - viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\t#ifdef USE_ANISOTROPY\n\t\tvec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {\n\t\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\t\tvec3 bentNormal = cross( bitangent, viewDir );\n\t\t\t\tbentNormal = normalize( cross( bentNormal, bitangent ) );\n\t\t\t\tbentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );\n\t\t\t\treturn getIBLRadiance( viewDir, bentNormal, roughness );\n\t\t\t#else\n\t\t\t\treturn vec3( 0.0 );\n\t\t\t#endif\n\t\t}\n\t#endif\n#endif",
envmap_vertex: "#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",
fog_vertex: "#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif",
fog_pars_vertex: "#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif",
fog_fragment: "#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",
fog_pars_fragment: "#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",
gradientmap_pars_fragment: "#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\t#else\n\t\tvec2 fw = fwidth( coord ) * 0.5;\n\t\treturn mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n\t#endif\n}",
lightmap_pars_fragment: "#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",
lights_lambert_fragment: "LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;",
lights_lambert_pars_fragment: "varying vec3 vViewPosition;\nstruct LambertMaterial {\n\tvec3 diffuseColor;\n\tfloat specularStrength;\n};\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Lambert\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Lambert",
lights_pars_begin: "uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\n#if defined( USE_LIGHT_PROBES )\n\tuniform vec3 lightProbe[ 9 ];\n#endif\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif ( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif",
lights_toon_fragment: "ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",
lights_toon_pars_fragment: "varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon",
lights_phong_fragment: "BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",
lights_phong_pars_fragment: "varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong",
lights_physical_fragment: "PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\tmaterial.ior = ior;\n\t#ifdef USE_SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULAR_COLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\n\t\t#endif\n\t\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_DISPERSION\n\tmaterial.dispersion = dispersion;\n#endif\n#ifdef USE_IRIDESCENCE\n\tmaterial.iridescence = iridescence;\n\tmaterial.iridescenceIOR = iridescenceIOR;\n\t#ifdef USE_IRIDESCENCEMAP\n\t\tmaterial.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\n\t#endif\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\n\t#else\n\t\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\n\t#endif\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\t#ifdef USE_ANISOTROPYMAP\n\t\tmat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );\n\t\tvec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;\n\t\tvec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;\n\t#else\n\t\tvec2 anisotropyV = anisotropyVector;\n\t#endif\n\tmaterial.anisotropy = length( anisotropyV );\n\tif( material.anisotropy == 0.0 ) {\n\t\tanisotropyV = vec2( 1.0, 0.0 );\n\t} else {\n\t\tanisotropyV /= material.anisotropy;\n\t\tmaterial.anisotropy = saturate( material.anisotropy );\n\t}\n\tmaterial.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );\n\tmaterial.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y;\n\tmaterial.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y;\n#endif",
lights_physical_pars_fragment: "struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\n\tfloat specularF90;\n\tfloat dispersion;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\tfloat iridescence;\n\t\tfloat iridescenceIOR;\n\t\tfloat iridescenceThickness;\n\t\tvec3 iridescenceFresnel;\n\t\tvec3 iridescenceF0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n\t#ifdef IOR\n\t\tfloat ior;\n\t#endif\n\t#ifdef USE_TRANSMISSION\n\t\tfloat transmission;\n\t\tfloat transmissionAlpha;\n\t\tfloat thickness;\n\t\tfloat attenuationDistance;\n\t\tvec3 attenuationColor;\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat anisotropy;\n\t\tfloat alphaT;\n\t\tvec3 anisotropyT;\n\t\tvec3 anisotropyB;\n\t#endif\n};\nvec3 clearcoatSpecularDirect = vec3( 0.0 );\nvec3 clearcoatSpecularIndirect = vec3( 0.0 );\nvec3 sheenSpecularDirect = vec3( 0.0 );\nvec3 sheenSpecularIndirect = vec3(0.0 );\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n float x2 = x * x;\n float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\n#ifdef USE_ANISOTROPY\n\tfloat V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) {\n\t\tfloat gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );\n\t\tfloat gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );\n\t\tfloat v = 0.5 / ( gv + gl );\n\t\treturn saturate(v);\n\t}\n\tfloat D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {\n\t\tfloat a2 = alphaT * alphaB;\n\t\thighp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );\n\t\thighp float v2 = dot( v, v );\n\t\tfloat w2 = a2 / v2;\n\t\treturn RECIPROCAL_PI * a2 * pow2 ( w2 );\n\t}\n#endif\n#ifdef USE_CLEARCOAT\n\tvec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\n\t\tvec3 f0 = material.clearcoatF0;\n\t\tfloat f90 = material.clearcoatF90;\n\t\tfloat roughness = material.clearcoatRoughness;\n\t\tfloat alpha = pow2( roughness );\n\t\tvec3 halfDir = normalize( lightDir + viewDir );\n\t\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\t\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\t\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\t\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\t\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t\treturn F * ( V * D );\n\t}\n#endif\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n\tvec3 f0 = material.specularColor;\n\tfloat f90 = material.specularF90;\n\tfloat roughness = material.roughness;\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t#ifdef USE_IRIDESCENCE\n\t\tF = mix( F, material.iridescenceFresnel, material.iridescence );\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat dotTL = dot( material.anisotropyT, lightDir );\n\t\tfloat dotTV = dot( material.anisotropyT, viewDir );\n\t\tfloat dotTH = dot( material.anisotropyT, halfDir );\n\t\tfloat dotBL = dot( material.anisotropyB, lightDir );\n\t\tfloat dotBV = dot( material.anisotropyB, viewDir );\n\t\tfloat dotBH = dot( material.anisotropyB, halfDir );\n\t\tfloat V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );\n\t\tfloat D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );\n\t#else\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t#endif\n\treturn F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat r2 = roughness * roughness;\n\tfloat a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n\tfloat b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n\tfloat DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n\treturn saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n\treturn fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#else\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#endif\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\t#ifdef USE_IRIDESCENCE\n\t\tvec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n\t#else\n\t\tvec3 Fr = specularColor;\n\t#endif\n\tvec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometryNormal;\n\t\tvec3 viewDir = geometryViewDir;\n\t\tvec3 position = geometryPosition;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material );\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\t#ifdef USE_IRIDESCENCE\n\t\tcomputeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\n\t#else\n\t\tcomputeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\t#endif\n\tvec3 totalScattering = singleScattering + multiScattering;\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n\treflectedLight.indirectSpecular += radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",
lights_fragment_begin: "\nvec3 geometryPosition = - vViewPosition;\nvec3 geometryNormal = normal;\nvec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\nvec3 geometryClearcoatNormal = vec3( 0.0 );\n#ifdef USE_CLEARCOAT\n\tgeometryClearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n\tfloat dotNVi = saturate( dot( normal, geometryViewDir ) );\n\tif ( material.iridescenceThickness == 0.0 ) {\n\t\tmaterial.iridescence = 0.0;\n\t} else {\n\t\tmaterial.iridescence = saturate( material.iridescence );\n\t}\n\tif ( material.iridescence > 0.0 ) {\n\t\tmaterial.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n\t\tmaterial.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n\t}\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometryPosition, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tvec4 spotColor;\n\tvec3 spotLightCoord;\n\tbool inSpotLightMap;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometryPosition, directLight );\n\t\t#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n\t\t#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n\t\t#else\n\t\t#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#endif\n\t\t#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n\t\t\tspotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n\t\t\tinSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n\t\t\tspotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n\t\t\tdirectLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n\t\t#endif\n\t\t#undef SPOT_LIGHT_MAP_INDEX\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\t#if defined( USE_LIGHT_PROBES )\n\t\tirradiance += getLightProbeIrradiance( lightProbe, geometryNormal );\n\t#endif\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",
lights_fragment_maps: "#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometryNormal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\t#ifdef USE_ANISOTROPY\n\t\tradiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );\n\t#else\n\t\tradiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif",
lights_fragment_end: "#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif",
logdepthbuf_fragment: "#if defined( USE_LOGDEPTHBUF )\n\tgl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",
logdepthbuf_pars_fragment: "#if defined( USE_LOGDEPTHBUF )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",
logdepthbuf_pars_vertex: "#ifdef USE_LOGDEPTHBUF\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",
logdepthbuf_vertex: "#ifdef USE_LOGDEPTHBUF\n\tvFragDepth = 1.0 + gl_Position.w;\n\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n#endif",
map_fragment: "#ifdef USE_MAP\n\tvec4 sampledDiffuseColor = texture2D( map, vMapUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\tsampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w );\n\t\n\t#endif\n\tdiffuseColor *= sampledDiffuseColor;\n#endif",
map_pars_fragment: "#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",
map_particle_fragment: "#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t#if defined( USE_POINTS_UV )\n\t\tvec2 uv = vUv;\n\t#else\n\t\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",
map_particle_pars_fragment: "#if defined( USE_POINTS_UV )\n\tvarying vec2 vUv;\n#else\n\t#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t\tuniform mat3 uvTransform;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",
metalnessmap_fragment: "float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",
metalnessmap_pars_fragment: "#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",
morphinstance_vertex: "#ifdef USE_INSTANCING_MORPH\n\tfloat morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\tfloat morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tmorphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r;\n\t}\n#endif",
morphcolor_vertex: "#if defined( USE_MORPHCOLORS )\n\tvColor *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t#if defined( USE_COLOR_ALPHA )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n\t\t#elif defined( USE_COLOR )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n\t\t#endif\n\t}\n#endif",
morphnormal_vertex: "#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t}\n#endif",
morphtarget_pars_vertex: "#ifdef USE_MORPHTARGETS\n\t#ifndef USE_INSTANCING_MORPH\n\t\tuniform float morphTargetBaseInfluence;\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t#endif\n\tuniform sampler2DArray morphTargetsTexture;\n\tuniform ivec2 morphTargetsTextureSize;\n\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t}\n#endif",
morphtarget_vertex: "#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t}\n#endif",
normal_fragment_begin: "float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = dFdx( vViewPosition );\n\tvec3 fdy = dFdy( vViewPosition );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal *= faceDirection;\n\t#endif\n#endif\n#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn = getTangentFrame( - vViewPosition, normal,\n\t\t#if defined( USE_NORMALMAP )\n\t\t\tvNormalMapUv\n\t\t#elif defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tvClearcoatNormalMapUv\n\t\t#else\n\t\t\tvUv\n\t\t#endif\n\t\t);\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn[0] *= faceDirection;\n\t\ttbn[1] *= faceDirection;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn2[0] *= faceDirection;\n\t\ttbn2[1] *= faceDirection;\n\t#endif\n#endif\nvec3 nonPerturbedNormal = normal;",
normal_fragment_maps: "#ifdef USE_NORMALMAP_OBJECTSPACE\n\tnormal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( USE_NORMALMAP_TANGENTSPACE )\n\tvec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\tnormal = normalize( tbn * mapN );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",
normal_pars_fragment: "#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",
normal_pars_vertex: "#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",
normal_vertex: "#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif",
normalmap_pars_fragment: "#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef USE_NORMALMAP_OBJECTSPACE\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )\n\tmat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( uv.st );\n\t\tvec2 st1 = dFdy( uv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\n\t\treturn mat3( T * scale, B * scale, N );\n\t}\n#endif",
clearcoat_normal_fragment_begin: "#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = nonPerturbedNormal;\n#endif",
clearcoat_normal_fragment_maps: "#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\tclearcoatNormal = normalize( tbn2 * clearcoatMapN );\n#endif",
clearcoat_pars_fragment: "#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif",
iridescence_pars_fragment: "#ifdef USE_IRIDESCENCEMAP\n\tuniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform sampler2D iridescenceThicknessMap;\n#endif",
opaque_fragment: "#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",
packing: "vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec2 packDepthToRG( in highp float v ) {\n\treturn packDepthToRGBA( v ).yx;\n}\nfloat unpackRGToDepth( const in highp vec2 v ) {\n\treturn unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn depth * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * depth - far );\n}",
premultiplied_alpha_fragment: "#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",
project_vertex: "vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_BATCHING\n\tmvPosition = batchingMatrix * mvPosition;\n#endif\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",
dithering_fragment: "#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",
dithering_pars_fragment: "#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",
roughnessmap_fragment: "float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",
roughnessmap_pars_fragment: "#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",
shadowmap_pars_fragment: "#if NUM_SPOT_LIGHT_COORDS > 0\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n\tuniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tfloat shadow = 1.0;\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\t\n\t\tfloat lightToPositionLength = length( lightToPosition );\n\t\tif ( lightToPositionLength - shadowCameraFar <= 0.0 && lightToPositionLength - shadowCameraNear >= 0.0 ) {\n\t\t\tfloat dp = ( lightToPositionLength - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\t\tdp += shadowBias;\n\t\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\t\tshadow = (\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t\t) * ( 1.0 / 9.0 );\n\t\t\t#else\n\t\t\t\tshadow = texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n#endif",
shadowmap_pars_vertex: "#if NUM_SPOT_LIGHT_COORDS > 0\n\tuniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",
shadowmap_vertex: "#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\tvec4 shadowWorldPosition;\n#endif\n#if defined( USE_SHADOWMAP )\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if NUM_SPOT_LIGHT_COORDS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition;\n\t\t#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t\tshadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n\t\t#endif\n\t\tvSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n#endif",
shadowmask_pars_fragment: "float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",
skinbase_vertex: "#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",
skinning_pars_vertex: "#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\tuniform highp sampler2D boneTexture;\n\tmat4 getBoneMatrix( const in float i ) {\n\t\tint size = textureSize( boneTexture, 0 ).x;\n\t\tint j = int( i ) * 4;\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\tvec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 );\n\t\tvec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 );\n\t\tvec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 );\n\t\tvec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 );\n\t\treturn mat4( v1, v2, v3, v4 );\n\t}\n#endif",
skinning_vertex: "#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",
skinnormal_vertex: "#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",
specularmap_fragment: "float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",
specularmap_pars_fragment: "#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",
tonemapping_fragment: "#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",
tonemapping_pars_fragment: "#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn saturate( toneMappingExposure * color );\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3( 1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108, 1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605, 1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nconst mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.6605, - 0.1246, - 0.0182 ),\n\tvec3( - 0.5876, 1.1329, - 0.1006 ),\n\tvec3( - 0.0728, - 0.0083, 1.1187 )\n);\nconst mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3(\n\tvec3( 0.6274, 0.0691, 0.0164 ),\n\tvec3( 0.3293, 0.9195, 0.0880 ),\n\tvec3( 0.0433, 0.0113, 0.8956 )\n);\nvec3 agxDefaultContrastApprox( vec3 x ) {\n\tvec3 x2 = x * x;\n\tvec3 x4 = x2 * x2;\n\treturn + 15.5 * x4 * x2\n\t\t- 40.14 * x4 * x\n\t\t+ 31.96 * x4\n\t\t- 6.868 * x2 * x\n\t\t+ 0.4298 * x2\n\t\t+ 0.1191 * x\n\t\t- 0.00232;\n}\nvec3 AgXToneMapping( vec3 color ) {\n\tconst mat3 AgXInsetMatrix = mat3(\n\t\tvec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ),\n\t\tvec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ),\n\t\tvec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 )\n\t);\n\tconst mat3 AgXOutsetMatrix = mat3(\n\t\tvec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ),\n\t\tvec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ),\n\t\tvec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 )\n\t);\n\tconst float AgxMinEv = - 12.47393;\tconst float AgxMaxEv = 4.026069;\n\tcolor *= toneMappingExposure;\n\tcolor = LINEAR_SRGB_TO_LINEAR_REC2020 * color;\n\tcolor = AgXInsetMatrix * color;\n\tcolor = max( color, 1e-10 );\tcolor = log2( color );\n\tcolor = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv );\n\tcolor = clamp( color, 0.0, 1.0 );\n\tcolor = agxDefaultContrastApprox( color );\n\tcolor = AgXOutsetMatrix * color;\n\tcolor = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) );\n\tcolor = LINEAR_REC2020_TO_LINEAR_SRGB * color;\n\tcolor = clamp( color, 0.0, 1.0 );\n\treturn color;\n}\nvec3 NeutralToneMapping( vec3 color ) {\n\tconst float StartCompression = 0.8 - 0.04;\n\tconst float Desaturation = 0.15;\n\tcolor *= toneMappingExposure;\n\tfloat x = min( color.r, min( color.g, color.b ) );\n\tfloat offset = x < 0.08 ? x - 6.25 * x * x : 0.04;\n\tcolor -= offset;\n\tfloat peak = max( color.r, max( color.g, color.b ) );\n\tif ( peak < StartCompression ) return color;\n\tfloat d = 1. - StartCompression;\n\tfloat newPeak = 1. - d * d / ( peak + d - StartCompression );\n\tcolor *= newPeak / peak;\n\tfloat g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. );\n\treturn mix( color, vec3( newPeak ), g );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",
transmission_fragment: "#ifdef USE_TRANSMISSION\n\tmaterial.transmission = transmission;\n\tmaterial.transmissionAlpha = 1.0;\n\tmaterial.thickness = thickness;\n\tmaterial.attenuationDistance = attenuationDistance;\n\tmaterial.attenuationColor = attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tmaterial.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tmaterial.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmitted = getIBLVolumeRefraction(\n\t\tn, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness,\n\t\tmaterial.attenuationColor, material.attenuationDistance );\n\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );\n\ttotalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );\n#endif",
transmission_pars_fragment: "#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tfloat w0( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\n\t}\n\tfloat w1( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 );\n\t}\n\tfloat w2( float a ){\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\n\t}\n\tfloat w3( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * a );\n\t}\n\tfloat g0( float a ) {\n\t\treturn w0( a ) + w1( a );\n\t}\n\tfloat g1( float a ) {\n\t\treturn w2( a ) + w3( a );\n\t}\n\tfloat h0( float a ) {\n\t\treturn - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\n\t}\n\tfloat h1( float a ) {\n\t\treturn 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\n\t}\n\tvec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\n\t\tuv = uv * texelSize.zw + 0.5;\n\t\tvec2 iuv = floor( uv );\n\t\tvec2 fuv = fract( uv );\n\t\tfloat g0x = g0( fuv.x );\n\t\tfloat g1x = g1( fuv.x );\n\t\tfloat h0x = h0( fuv.x );\n\t\tfloat h1x = h1( fuv.x );\n\t\tfloat h0y = h0( fuv.y );\n\t\tfloat h1y = h1( fuv.y );\n\t\tvec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\treturn g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\n\t\t\tg1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\n\t}\n\tvec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\n\t\tvec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\n\t\tvec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\n\t\tvec2 fLodSizeInv = 1.0 / fLodSize;\n\t\tvec2 cLodSizeInv = 1.0 / cLodSize;\n\t\tvec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\n\t\tvec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\n\t\treturn mix( fSample, cSample, fract( lod ) );\n\t}\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\t\tfloat lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\treturn textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\n\t}\n\tvec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( isinf( attenuationDistance ) ) {\n\t\t\treturn vec3( 1.0 );\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec4 transmittedLight;\n\t\tvec3 transmittance;\n\t\t#ifdef USE_DISPERSION\n\t\t\tfloat halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;\n\t\t\tvec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );\n\t\t\tfor ( int i = 0; i < 3; i ++ ) {\n\t\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );\n\t\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\n\t\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\t\trefractionCoords += 1.0;\n\t\t\t\trefractionCoords /= 2.0;\n\t\t\n\t\t\t\tvec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );\n\t\t\t\ttransmittedLight[ i ] = transmissionSample[ i ];\n\t\t\t\ttransmittedLight.a += transmissionSample.a;\n\t\t\t\ttransmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];\n\t\t\t}\n\t\t\ttransmittedLight.a /= 3.0;\n\t\t\n\t\t#else\n\t\t\n\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\trefractionCoords += 1.0;\n\t\t\trefractionCoords /= 2.0;\n\t\t\ttransmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\t\ttransmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\t\n\t\t#endif\n\t\tvec3 attenuatedColor = transmittance * transmittedLight.rgb;\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\tfloat transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );\n\t}\n#endif",
uv_pars_fragment: "#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",
uv_pars_vertex: "#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tuniform mat3 mapTransform;\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform mat3 alphaMapTransform;\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tuniform mat3 lightMapTransform;\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tuniform mat3 aoMapTransform;\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tuniform mat3 bumpMapTransform;\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tuniform mat3 normalMapTransform;\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tuniform mat3 displacementMapTransform;\n\tvarying vec2 vDisplacementMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tuniform mat3 emissiveMapTransform;\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tuniform mat3 metalnessMapTransform;\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tuniform mat3 roughnessMapTransform;\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tuniform mat3 anisotropyMapTransform;\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tuniform mat3 clearcoatMapTransform;\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform mat3 clearcoatNormalMapTransform;\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform mat3 clearcoatRoughnessMapTransform;\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tuniform mat3 sheenColorMapTransform;\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tuniform mat3 sheenRoughnessMapTransform;\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tuniform mat3 iridescenceMapTransform;\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform mat3 iridescenceThicknessMapTransform;\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tuniform mat3 specularMapTransform;\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tuniform mat3 specularColorMapTransform;\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tuniform mat3 specularIntensityMapTransform;\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",
uv_vertex: "#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvUv = vec3( uv, 1 ).xy;\n#endif\n#ifdef USE_MAP\n\tvMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ALPHAMAP\n\tvAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_LIGHTMAP\n\tvLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_AOMAP\n\tvAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_BUMPMAP\n\tvBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_NORMALMAP\n\tvNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tvDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_METALNESSMAP\n\tvMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULARMAP\n\tvSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tvTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_THICKNESSMAP\n\tvThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;\n#endif",
worldpos_vertex: "#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_BATCHING\n\t\tworldPosition = batchingMatrix * worldPosition;\n\t#endif\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",
background_vert: "varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",
background_frag: "uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\ttexColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}",
backgroundCube_vert: "varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}",
backgroundCube_frag: "#ifdef ENVMAP_TYPE_CUBE\n\tuniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n\tuniform sampler2D envMap;\n#endif\nuniform float flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nuniform mat3 backgroundRotation;\nvarying vec3 vWorldDirection;\n#include <cube_uv_reflection_fragment>\nvoid main() {\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness );\n\t#else\n\t\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}",
cube_vert: "varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}",
cube_frag: "uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\tgl_FragColor = texColor;\n\tgl_FragColor.a *= opacity;\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}",
depth_vert: "#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#include <morphinstance_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}",
depth_frag: "#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <clipping_planes_fragment>\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <logdepthbuf_fragment>\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}",
distanceRGBA_vert: "#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#include <morphinstance_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}",
distanceRGBA_frag: "#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <clipping_planes_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",
equirect_vert: "varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}",
equirect_frag: "uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}",
linedashed_vert: "uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",
linedashed_frag: "uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",
meshbasic_vert: "#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinbase_vertex>\n\t\t#include <skinnormal_vertex>\n\t\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}",
meshbasic_frag: "uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",
meshlambert_vert: "#define LAMBERT\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",
meshlambert_frag: "#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_lambert_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_lambert_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",
meshmatcap_vert: "#define MATCAP\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\tvViewPosition = - mvPosition.xyz;\n}",
meshmatcap_frag: "#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t#else\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",
meshnormal_vert: "#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",
meshnormal_frag: "#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity );\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( packNormalToRGB( normal ), diffuseColor.a );\n\t#ifdef OPAQUE\n\t\tgl_FragColor.a = 1.0;\n\t#endif\n}",
meshphong_vert: "#define PHONG\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",
meshphong_frag: "#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",
meshphysical_vert: "#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}",
meshphysical_frag: "#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_DISPERSION\n\tuniform float dispersion;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <iridescence_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <iridescence_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include <transmission_fragment>\n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n\t#endif\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",
meshtoon_vert: "#define TOON\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",
meshtoon_frag: "#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_toon_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_toon_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",
points_vert: "uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\n#ifdef USE_POINTS_UV\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif\nvoid main() {\n\t#ifdef USE_POINTS_UV\n\t\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\t#endif\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <fog_vertex>\n}",
points_frag: "uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",
shadow_vert: "#include <common>\n#include <batching_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",
shadow_frag: "uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <logdepthbuf_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\t#include <logdepthbuf_fragment>\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n}",
sprite_vert: "uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",
sprite_frag: "uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n}"
}
, Fo = {
common: {
diffuse: {
value: new ga(16777215)
},
opacity: {
value: 1
},
map: {
value: null
},
mapTransform: {
value: new bi
},
alphaMap: {
value: null
},
alphaMapTransform: {
value: new bi
},
alphaTest: {
value: 0
}
},
specularmap: {
specularMap: {
value: null
},
specularMapTransform: {
value: new bi
}
},
envmap: {
envMap: {
value: null
},
envMapRotation: {
value: new bi
},
flipEnvMap: {
value: -1
},
reflectivity: {
value: 1
},
ior: {
value: 1.5
},
refractionRatio: {
value: .98
}
},
aomap: {
aoMap: {
value: null
},
aoMapIntensity: {
value: 1
},
aoMapTransform: {
value: new bi
}
},
lightmap: {
lightMap: {
value: null
},
lightMapIntensity: {
value: 1
},
lightMapTransform: {
value: new bi
}
},
bumpmap: {
bumpMap: {
value: null
},
bumpMapTransform: {
value: new bi
},
bumpScale: {
value: 1
}
},
normalmap: {
normalMap: {
value: null
},
normalMapTransform: {
value: new bi
},
normalScale: {
value: new xi(1,1)
}
},
displacementmap: {
displacementMap: {
value: null
},
displacementMapTransform: {
value: new bi
},
displacementScale: {
value: 1
},
displacementBias: {
value: 0
}
},
emissivemap: {
emissiveMap: {
value: null
},
emissiveMapTransform: {
value: new bi
}
},
metalnessmap: {
metalnessMap: {
value: null
},
metalnessMapTransform: {
value: new bi
}
},
roughnessmap: {
roughnessMap: {
value: null
},
roughnessMapTransform: {
value: new bi
}
},
gradientmap: {
gradientMap: {
value: null
}
},
fog: {
fogDensity: {
value: 25e-5
},
fogNear: {
value: 1
},
fogFar: {
value: 2e3
},
fogColor: {
value: new ga(16777215)
}
},
lights: {
ambientLightColor: {
value: []
},
lightProbe: {
value: []
},
directionalLights: {
value: [],
properties: {
direction: {},
color: {}
}
},
directionalLightShadows: {
value: [],
properties: {
shadowBias: {},
shadowNormalBias: {},
shadowRadius: {},
shadowMapSize: {}
}
},
directionalShadowMap: {
value: []
},
directionalShadowMatrix: {
value: []
},
spotLights: {
value: [],
properties: {
color: {},
position: {},
direction: {},
distance: {},
coneCos: {},
penumbraCos: {},
decay: {}
}
},
spotLightShadows: {
value: [],
properties: {
shadowBias: {},
shadowNormalBias: {},
shadowRadius: {},
shadowMapSize: {}
}
},
spotLightMap: {
value: []
},
spotShadowMap: {
value: []
},
spotLightMatrix: {
value: []
},
pointLights: {
value: [],
properties: {
color: {},
position: {},
decay: {},
distance: {}
}
},
pointLightShadows: {
value: [],
properties: {
shadowBias: {},
shadowNormalBias: {},
shadowRadius: {},
shadowMapSize: {},
shadowCameraNear: {},
shadowCameraFar: {}
}
},
pointShadowMap: {
value: []
},
pointShadowMatrix: {
value: []
},
hemisphereLights: {
value: [],
properties: {
direction: {},
skyColor: {},
groundColor: {}
}
},
rectAreaLights: {
value: [],
properties: {
color: {},
position: {},
width: {},
height: {}
}
},
ltc_1: {
value: null
},
ltc_2: {
value: null
}
},
points: {
diffuse: {
value: new ga(16777215)
},
opacity: {
value: 1
},
size: {
value: 1
},
scale: {
value: 1
},
map: {
value: null
},
alphaMap: {
value: null
},
alphaMapTransform: {
value: new bi
},
alphaTest: {
value: 0
},
uvTransform: {
value: new bi
}
},
sprite: {
diffuse: {
value: new ga(16777215)
},
opacity: {
value: 1
},
center: {
value: new xi(.5,.5)
},
rotation: {
value: 0
},
map: {
value: null
},
mapTransform: {
value: new bi
},
alphaMap: {
value: null
},
alphaMapTransform: {
value: new bi
},
alphaTest: {
value: 0
}
}
}
, Oo = {
basic: {
uniforms: fo([Fo.common, Fo.specularmap, Fo.envmap, Fo.aomap, Fo.lightmap, Fo.fog]),
vertexShader: jo.meshbasic_vert,
fragmentShader: jo.meshbasic_frag
},
lambert: {
uniforms: fo([Fo.common, Fo.specularmap, Fo.envmap, Fo.aomap, Fo.lightmap, Fo.emissivemap, Fo.bumpmap, Fo.normalmap, Fo.displacementmap, Fo.fog, Fo.lights, {
emissive: {
value: new ga(0)
}
}]),
vertexShader: jo.meshlambert_vert,
fragmentShader: jo.meshlambert_frag
},
phong: {
uniforms: fo([Fo.common, Fo.specularmap, Fo.envmap, Fo.aomap, Fo.lightmap, Fo.emissivemap, Fo.bumpmap, Fo.normalmap, Fo.displacementmap, Fo.fog, Fo.lights, {
emissive: {
value: new ga(0)
},
specular: {
value: new ga(1118481)
},
shininess: {
value: 30
}
}]),
vertexShader: jo.meshphong_vert,
fragmentShader: jo.meshphong_frag
},
standard: {
uniforms: fo([Fo.common, Fo.envmap, Fo.aomap, Fo.lightmap, Fo.emissivemap, Fo.bumpmap, Fo.normalmap, Fo.displacementmap, Fo.roughnessmap, Fo.metalnessmap, Fo.fog, Fo.lights, {
emissive: {
value: new ga(0)
},
roughness: {
value: 1
},
metalness: {
value: 0
},
envMapIntensity: {
value: 1
}
}]),
vertexShader: jo.meshphysical_vert,
fragmentShader: jo.meshphysical_frag
},
toon: {
uniforms: fo([Fo.common, Fo.aomap, Fo.lightmap, Fo.emissivemap, Fo.bumpmap, Fo.normalmap, Fo.displacementmap, Fo.gradientmap, Fo.fog, Fo.lights, {
emissive: {
value: new ga(0)
}
}]),
vertexShader: jo.meshtoon_vert,
fragmentShader: jo.meshtoon_frag
},
matcap: {
uniforms: fo([Fo.common, Fo.bumpmap, Fo.normalmap, Fo.displacementmap, Fo.fog, {
matcap: {
value: null
}
}]),
vertexShader: jo.meshmatcap_vert,
fragmentShader: jo.meshmatcap_frag
},
points: {
uniforms: fo([Fo.points, Fo.fog]),
vertexShader: jo.points_vert,
fragmentShader: jo.points_frag
},
dashed: {
uniforms: fo([Fo.common, Fo.fog, {
scale: {
value: 1
},
dashSize: {
value: 1
},
totalSize: {
value: 2
}
}]),
vertexShader: jo.linedashed_vert,
fragmentShader: jo.linedashed_frag
},
depth: {
uniforms: fo([Fo.common, Fo.displacementmap]),
vertexShader: jo.depth_vert,
fragmentShader: jo.depth_frag
},
normal: {
uniforms: fo([Fo.common, Fo.bumpmap, Fo.normalmap, Fo.displacementmap, {
opacity: {
value: 1
}
}]),
vertexShader: jo.meshnormal_vert,
fragmentShader: jo.meshnormal_frag
},
sprite: {
uniforms: fo([Fo.sprite, Fo.fog]),
vertexShader: jo.sprite_vert,
fragmentShader: jo.sprite_frag
},
background: {
uniforms: {
uvTransform: {
value: new bi
},
t2D: {
value: null
},
backgroundIntensity: {
value: 1
}
},
vertexShader: jo.background_vert,
fragmentShader: jo.background_frag
},
backgroundCube: {
uniforms: {
envMap: {
value: null
},
flipEnvMap: {
value: -1
},
backgroundBlurriness: {
value: 0
},
backgroundIntensity: {
value: 1
},
backgroundRotation: {
value: new bi
}
},
vertexShader: jo.backgroundCube_vert,
fragmentShader: jo.backgroundCube_frag
},
cube: {
uniforms: {
tCube: {
value: null
},
tFlip: {
value: -1
},
opacity: {
value: 1
}
},
vertexShader: jo.cube_vert,
fragmentShader: jo.cube_frag
},
equirect: {
uniforms: {
tEquirect: {
value: null
}
},
vertexShader: jo.equirect_vert,
fragmentShader: jo.equirect_frag
},
distanceRGBA: {
uniforms: fo([Fo.common, Fo.displacementmap, {
referencePosition: {
value: new Qi
},
nearDistance: {
value: 1
},
farDistance: {
value: 1e3
}
}]),
vertexShader: jo.distanceRGBA_vert,
fragmentShader: jo.distanceRGBA_frag
},
shadow: {
uniforms: fo([Fo.lights, Fo.fog, {
color: {
value: new ga(0)
},
opacity: {
value: 1
}
}]),
vertexShader: jo.shadow_vert,
fragmentShader: jo.shadow_frag
}
};
Oo.physical = {
uniforms: fo([Oo.standard.uniforms, {
clearcoat: {
value: 0
},
clearcoatMap: {
value: null
},
clearcoatMapTransform: {
value: new bi
},
clearcoatNormalMap: {
value: null
},
clearcoatNormalMapTransform: {
value: new bi
},
clearcoatNormalScale: {
value: new xi(1,1)
},
clearcoatRoughness: {
value: 0
},
clearcoatRoughnessMap: {
value: null
},
clearcoatRoughnessMapTransform: {
value: new bi
},
dispersion: {
value: 0
},
iridescence: {
value: 0
},
iridescenceMap: {
value: null
},
iridescenceMapTransform: {
value: new bi
},
iridescenceIOR: {
value: 1.3
},
iridescenceThicknessMinimum: {
value: 100
},
iridescenceThicknessMaximum: {
value: 400
},
iridescenceThicknessMap: {
value: null
},
iridescenceThicknessMapTransform: {
value: new bi
},
sheen: {
value: 0
},
sheenColor: {
value: new ga(0)
},
sheenColorMap: {
value: null
},
sheenColorMapTransform: {
value: new bi
},
sheenRoughness: {
value: 1
},
sheenRoughnessMap: {
value: null
},
sheenRoughnessMapTransform: {
value: new bi
},
transmission: {
value: 0
},
transmissionMap: {
value: null
},
transmissionMapTransform: {
value: new bi
},
transmissionSamplerSize: {
value: new xi
},
transmissionSamplerMap: {
value: null
},
thickness: {
value: 0
},
thicknessMap: {
value: null
},
thicknessMapTransform: {
value: new bi
},
attenuationDistance: {
value: 0
},
attenuationColor: {
value: new ga(0)
},
specularColor: {
value: new ga(1,1,1)
},
specularColorMap: {
value: null
},
specularColorMapTransform: {
value: new bi
},
specularIntensity: {
value: 1
},
specularIntensityMap: {
value: null
},
specularIntensityMapTransform: {
value: new bi
},
anisotropyVector: {
value: new xi
},
anisotropyMap: {
value: null
},
anisotropyMapTransform: {
value: new bi
}
}]),
vertexShader: jo.meshphysical_vert,
fragmentShader: jo.meshphysical_frag
};
const Uo = {
r: 0,
b: 0,
g: 0
}
, zo = new js
, Go = new Es;
function Ho(e, t, n, r, i, s, a) {
const o = new ga(0);
let l, c, u = !0 === s ? 0 : 1, d = null, h = 0, p = null;
function f(e) {
let r = !0 === e.isScene ? e.background : null;
if (r && r.isTexture) {
r = (e.backgroundBlurriness > 0 ? n : t).get(r)
}
return r
}
function m(t, n) {
t.getRGB(Uo, mo(e)),
r.buffers.color.setClear(Uo.r, Uo.g, Uo.b, n, a)
}
return {
getClearColor: function() {
return o
},
setClearColor: function(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 1;
o.set(e),
u = t,
m(o, u)
},
getClearAlpha: function() {
return u
},
setClearAlpha: function(e) {
u = e,
m(o, u)
},
render: function(t) {
let n = !1;
const i = f(t);
null === i ? m(o, u) : i && i.isColor && (m(i, 1),
n = !0);
const s = e.xr.getEnvironmentBlendMode();
"additive" === s ? r.buffers.color.setClear(0, 0, 0, 1, a) : "alpha-blend" === s && r.buffers.color.setClear(0, 0, 0, 0, a),
(e.autoClear || n) && (r.buffers.depth.setTest(!0),
r.buffers.depth.setMask(!0),
r.buffers.color.setMask(!0),
e.clear(e.autoClearColor, e.autoClearDepth, e.autoClearStencil))
},
addToRenderList: function(t, n) {
const r = f(n);
r && (r.isCubeTexture || r.mapping === It) ? (void 0 === c && (c = new co(new ho(1,1,1),new vo({
name: "BackgroundCubeMaterial",
uniforms: po(Oo.backgroundCube.uniforms),
vertexShader: Oo.backgroundCube.vertexShader,
fragmentShader: Oo.backgroundCube.fragmentShader,
side: Ie,
depthTest: !1,
depthWrite: !1,
fog: !1
})),
c.geometry.deleteAttribute("normal"),
c.geometry.deleteAttribute("uv"),
c.onBeforeRender = function(e, t, n) {
this.matrixWorld.copyPosition(n.matrixWorld)
}
,
Object.defineProperty(c.material, "envMap", {
get: function() {
return this.uniforms.envMap.value
}
}),
i.update(c)),
zo.copy(n.backgroundRotation),
zo.x *= -1,
zo.y *= -1,
zo.z *= -1,
r.isCubeTexture && !1 === r.isRenderTargetTexture && (zo.y *= -1,
zo.z *= -1),
c.material.uniforms.envMap.value = r,
c.material.uniforms.flipEnvMap.value = r.isCubeTexture && !1 === r.isRenderTargetTexture ? -1 : 1,
c.material.uniforms.backgroundBlurriness.value = n.backgroundBlurriness,
c.material.uniforms.backgroundIntensity.value = n.backgroundIntensity,
c.material.uniforms.backgroundRotation.value.setFromMatrix4(Go.makeRotationFromEuler(zo)),
c.material.toneMapped = Li.getTransfer(r.colorSpace) !== _r,
d === r && h === r.version && p === e.toneMapping || (c.material.needsUpdate = !0,
d = r,
h = r.version,
p = e.toneMapping),
c.layers.enableAll(),
t.unshift(c, c.geometry, c.material, 0, 0, null)) : r && r.isTexture && (void 0 === l && (l = new co(new Do(2,2),new vo({
name: "BackgroundMaterial",
uniforms: po(Oo.background.uniforms),
vertexShader: Oo.background.vertexShader,
fragmentShader: Oo.background.fragmentShader,
side: Le,
depthTest: !1,
depthWrite: !1,
fog: !1
})),
l.geometry.deleteAttribute("normal"),
Object.defineProperty(l.material, "map", {
get: function() {
return this.uniforms.t2D.value
}
}),
i.update(l)),
l.material.uniforms.t2D.value = r,
l.material.uniforms.backgroundIntensity.value = n.backgroundIntensity,
l.material.toneMapped = Li.getTransfer(r.colorSpace) !== _r,
!0 === r.matrixAutoUpdate && r.updateMatrix(),
l.material.uniforms.uvTransform.value.copy(r.matrix),
d === r && h === r.version && p === e.toneMapping || (l.material.needsUpdate = !0,
d = r,
h = r.version,
p = e.toneMapping),
l.layers.enableAll(),
t.unshift(l, l.geometry, l.material, 0, 0, null))
}
}
}
function Vo(e, t) {
const n = e.getParameter(e.MAX_VERTEX_ATTRIBS)
, r = {}
, i = c(null);
let s = i
, a = !1;
function o(t) {
return e.bindVertexArray(t)
}
function l(t) {
return e.deleteVertexArray(t)
}
function c(e) {
const t = []
, r = []
, i = [];
for (let s = 0; s < n; s++)
t[s] = 0,
r[s] = 0,
i[s] = 0;
return {
geometry: null,
program: null,
wireframe: !1,
newAttributes: t,
enabledAttributes: r,
attributeDivisors: i,
object: e,
attributes: {},
index: null
}
}
function u() {
const e = s.newAttributes;
for (let t = 0, n = e.length; t < n; t++)
e[t] = 0
}
function d(e) {
h(e, 0)
}
function h(t, n) {
const r = s.newAttributes
, i = s.enabledAttributes
, a = s.attributeDivisors;
r[t] = 1,
0 === i[t] && (e.enableVertexAttribArray(t),
i[t] = 1),
a[t] !== n && (e.vertexAttribDivisor(t, n),
a[t] = n)
}
function p() {
const t = s.newAttributes
, n = s.enabledAttributes;
for (let r = 0, i = n.length; r < i; r++)
n[r] !== t[r] && (e.disableVertexAttribArray(r),
n[r] = 0)
}
function f(t, n, r, i, s, a, o) {
!0 === o ? e.vertexAttribIPointer(t, n, r, s, a) : e.vertexAttribPointer(t, n, r, i, s, a)
}
function m() {
g(),
a = !0,
s !== i && (s = i,
o(s.object))
}
function g() {
i.geometry = null,
i.program = null,
i.wireframe = !1
}
return {
setup: function(n, i, l, m, g) {
let v = !1;
const y = function(t, n, i) {
const s = !0 === i.wireframe;
let a = r[t.id];
void 0 === a && (a = {},
r[t.id] = a);
let o = a[n.id];
void 0 === o && (o = {},
a[n.id] = o);
let l = o[s];
void 0 === l && (l = c(e.createVertexArray()),
o[s] = l);
return l
}(m, l, i);
s !== y && (s = y,
o(s.object)),
v = function(e, t, n, r) {
const i = s.attributes
, a = t.attributes;
let o = 0;
const l = n.getAttributes();
for (const s in l) {
if (l[s].location >= 0) {
const t = i[s];
let n = a[s];
if (void 0 === n && ("instanceMatrix" === s && e.instanceMatrix && (n = e.instanceMatrix),
"instanceColor" === s && e.instanceColor && (n = e.instanceColor)),
void 0 === t)
return !0;
if (t.attribute !== n)
return !0;
if (n && t.data !== n.data)
return !0;
o++
}
}
return s.attributesNum !== o || s.index !== r
}(n, m, l, g),
v && function(e, t, n, r) {
const i = {}
, a = t.attributes;
let o = 0;
const l = n.getAttributes();
for (const s in l) {
if (l[s].location >= 0) {
let t = a[s];
void 0 === t && ("instanceMatrix" === s && e.instanceMatrix && (t = e.instanceMatrix),
"instanceColor" === s && e.instanceColor && (t = e.instanceColor));
const n = {};
n.attribute = t,
t && t.data && (n.data = t.data),
i[s] = n,
o++
}
}
s.attributes = i,
s.attributesNum = o,
s.index = r
}(n, m, l, g),
null !== g && t.update(g, e.ELEMENT_ARRAY_BUFFER),
(v || a) && (a = !1,
function(n, r, i, s) {
u();
const a = s.attributes
, o = i.getAttributes()
, l = r.defaultAttributeValues;
for (const c in o) {
const r = o[c];
if (r.location >= 0) {
let i = a[c];
if (void 0 === i && ("instanceMatrix" === c && n.instanceMatrix && (i = n.instanceMatrix),
"instanceColor" === c && n.instanceColor && (i = n.instanceColor)),
void 0 !== i) {
const a = i.normalized
, o = i.itemSize
, l = t.get(i);
if (void 0 === l)
continue;
const c = l.buffer
, u = l.type
, p = l.bytesPerElement
, m = u === e.INT || u === e.UNSIGNED_INT || i.gpuType === Zt;
if (i.isInterleavedBufferAttribute) {
const t = i.data
, l = t.stride
, g = i.offset;
if (t.isInstancedInterleavedBuffer) {
for (let e = 0; e < r.locationSize; e++)
h(r.location + e, t.meshPerAttribute);
!0 !== n.isInstancedMesh && void 0 === s._maxInstanceCount && (s._maxInstanceCount = t.meshPerAttribute * t.count)
} else
for (let e = 0; e < r.locationSize; e++)
d(r.location + e);
e.bindBuffer(e.ARRAY_BUFFER, c);
for (let e = 0; e < r.locationSize; e++)
f(r.location + e, o / r.locationSize, u, a, l * p, (g + o / r.locationSize * e) * p, m)
} else {
if (i.isInstancedBufferAttribute) {
for (let e = 0; e < r.locationSize; e++)
h(r.location + e, i.meshPerAttribute);
!0 !== n.isInstancedMesh && void 0 === s._maxInstanceCount && (s._maxInstanceCount = i.meshPerAttribute * i.count)
} else
for (let e = 0; e < r.locationSize; e++)
d(r.location + e);
e.bindBuffer(e.ARRAY_BUFFER, c);
for (let e = 0; e < r.locationSize; e++)
f(r.location + e, o / r.locationSize, u, a, o * p, o / r.locationSize * e * p, m)
}
} else if (void 0 !== l) {
const t = l[c];
if (void 0 !== t)
switch (t.length) {
case 2:
e.vertexAttrib2fv(r.location, t);
break;
case 3:
e.vertexAttrib3fv(r.location, t);
break;
case 4:
e.vertexAttrib4fv(r.location, t);
break;
default:
e.vertexAttrib1fv(r.location, t)
}
}
}
}
p()
}(n, i, l, m),
null !== g && e.bindBuffer(e.ELEMENT_ARRAY_BUFFER, t.get(g).buffer))
},
reset: m,
resetDefaultState: g,
dispose: function() {
m();
for (const e in r) {
const t = r[e];
for (const e in t) {
const n = t[e];
for (const e in n)
l(n[e].object),
delete n[e];
delete t[e]
}
delete r[e]
}
},
releaseStatesOfGeometry: function(e) {
if (void 0 === r[e.id])
return;
const t = r[e.id];
for (const n in t) {
const e = t[n];
for (const t in e)
l(e[t].object),
delete e[t];
delete t[n]
}
delete r[e.id]
},
releaseStatesOfProgram: function(e) {
for (const t in r) {
const n = r[t];
if (void 0 === n[e.id])
continue;
const i = n[e.id];
for (const e in i)
l(i[e].object),
delete i[e];
delete n[e.id]
}
},
initAttributes: u,
enableAttribute: d,
disableUnusedAttributes: p
}
}
function Wo(e, t, n) {
let r;
function i(t, i, s) {
0 !== s && (e.drawArraysInstanced(r, t, i, s),
n.update(i, r, s))
}
this.setMode = function(e) {
r = e
}
,
this.render = function(t, i) {
e.drawArrays(r, t, i),
n.update(i, r, 1)
}
,
this.renderInstances = i,
this.renderMultiDraw = function(e, i, s) {
if (0 === s)
return;
const a = t.get("WEBGL_multi_draw");
if (null === a)
for (let t = 0; t < s; t++)
this.render(e[t], i[t]);
else {
a.multiDrawArraysWEBGL(r, e, 0, i, 0, s);
let t = 0;
for (let e = 0; e < s; e++)
t += i[e];
n.update(t, r, 1)
}
}
,
this.renderMultiDrawInstances = function(e, s, a, o) {
if (0 === a)
return;
const l = t.get("WEBGL_multi_draw");
if (null === l)
for (let t = 0; t < e.length; t++)
i(e[t], s[t], o[t]);
else {
l.multiDrawArraysInstancedWEBGL(r, e, 0, s, 0, o, 0, a);
let t = 0;
for (let e = 0; e < a; e++)
t += s[e];
for (let e = 0; e < o.length; e++)
n.update(t, r, o[e])
}
}
}
function Jo(e, t, n, r) {
let i;
function s(t) {
if ("highp" === t) {
if (e.getShaderPrecisionFormat(e.VERTEX_SHADER, e.HIGH_FLOAT).precision > 0 && e.getShaderPrecisionFormat(e.FRAGMENT_SHADER, e.HIGH_FLOAT).precision > 0)
return "highp";
t = "mediump"
}
return "mediump" === t && e.getShaderPrecisionFormat(e.VERTEX_SHADER, e.MEDIUM_FLOAT).precision > 0 && e.getShaderPrecisionFormat(e.FRAGMENT_SHADER, e.MEDIUM_FLOAT).precision > 0 ? "mediump" : "lowp"
}
let a = void 0 !== n.precision ? n.precision : "highp";
const o = s(a);
o !== a && (console.warn("THREE.WebGLRenderer:", a, "not supported, using", o, "instead."),
a = o);
const l = !0 === n.logarithmicDepthBuffer
, c = e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS)
, u = e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS);
return {
isWebGL2: !0,
getMaxAnisotropy: function() {
if (void 0 !== i)
return i;
if (!0 === t.has("EXT_texture_filter_anisotropic")) {
const n = t.get("EXT_texture_filter_anisotropic");
i = e.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT)
} else
i = 0;
return i
},
getMaxPrecision: s,
textureFormatReadable: function(t) {
return t === cn || r.convert(t) === e.getParameter(e.IMPLEMENTATION_COLOR_READ_FORMAT)
},
textureTypeReadable: function(n) {
const i = n === tn && (t.has("EXT_color_buffer_half_float") || t.has("EXT_color_buffer_float"));
return !(n !== Kt && r.convert(n) !== e.getParameter(e.IMPLEMENTATION_COLOR_READ_TYPE) && n !== en && !i)
},
precision: a,
logarithmicDepthBuffer: l,
maxTextures: c,
maxVertexTextures: u,
maxTextureSize: e.getParameter(e.MAX_TEXTURE_SIZE),
maxCubemapSize: e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE),
maxAttributes: e.getParameter(e.MAX_VERTEX_ATTRIBS),
maxVertexUniforms: e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS),
maxVaryings: e.getParameter(e.MAX_VARYING_VECTORS),
maxFragmentUniforms: e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS),
vertexTextures: u > 0,
maxSamples: e.getParameter(e.MAX_SAMPLES)
}
}
function Xo(e) {
const t = this;
let n = null
, r = 0
, i = !1
, s = !1;
const a = new Bo
, o = new bi
, l = {
value: null,
needsUpdate: !1
};
function c(e, n, r, i) {
const s = null !== e ? e.length : 0;
let c = null;
if (0 !== s) {
if (c = l.value,
!0 !== i || null === c) {
const t = r + 4 * s
, i = n.matrixWorldInverse;
o.getNormalMatrix(i),
(null === c || c.length < t) && (c = new Float32Array(t));
for (let n = 0, l = r; n !== s; ++n,
l += 4)
a.copy(e[n]).applyMatrix4(i, o),
a.normal.toArray(c, l),
c[l + 3] = a.constant
}
l.value = c,
l.needsUpdate = !0
}
return t.numPlanes = s,
t.numIntersection = 0,
c
}
this.uniform = l,
this.numPlanes = 0,
this.numIntersection = 0,
this.init = function(e, t) {
const n = 0 !== e.length || t || 0 !== r || i;
return i = t,
r = e.length,
n
}
,
this.beginShadows = function() {
s = !0,
c(null)
}
,
this.endShadows = function() {
s = !1
}
,
this.setGlobalState = function(e, t) {
n = c(e, t, 0)
}
,
this.setState = function(a, o, u) {
const d = a.clippingPlanes
, h = a.clipIntersection
, p = a.clipShadows
, f = e.get(a);
if (!i || null === d || 0 === d.length || s && !p)
s ? c(null) : function() {
l.value !== n && (l.value = n,
l.needsUpdate = r > 0);
t.numPlanes = r,
t.numIntersection = 0
}();
else {
const e = s ? 0 : r
, t = 4 * e;
let i = f.clippingState || null;
l.value = i,
i = c(d, o, t, u);
for (let r = 0; r !== t; ++r)
i[r] = n[r];
f.clippingState = i,
this.numIntersection = h ? this.numPlanes : 0,
this.numPlanes += e
}
}
}
function Ko(e) {
let t = new WeakMap;
function n(e, t) {
return t === kt ? e.mapping = Bt : t === Lt && (e.mapping = Pt),
e
}
function r(e) {
const n = e.target;
n.removeEventListener("dispose", r);
const i = t.get(n);
void 0 !== i && (t.delete(n),
i.dispose())
}
return {
get: function(i) {
if (i && i.isTexture) {
const s = i.mapping;
if (s === kt || s === Lt) {
if (t.has(i)) {
return n(t.get(i).texture, i.mapping)
}
{
const s = i.image;
if (s && s.height > 0) {
const a = new Co(s.height);
return a.fromEquirectangularTexture(e, i),
t.set(i, a),
i.addEventListener("dispose", r),
n(a.texture, i.mapping)
}
return null
}
}
}
return i
},
dispose: function() {
t = new WeakMap
}
}
}
class qo extends yo {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : -1
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 1
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 1
, r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : -1
, i = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : .1
, s = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : 2e3;
super(),
this.isOrthographicCamera = !0,
this.type = "OrthographicCamera",
this.zoom = 1,
this.view = null,
this.left = e,
this.right = t,
this.top = n,
this.bottom = r,
this.near = i,
this.far = s,
this.updateProjectionMatrix()
}
copy(e, t) {
return super.copy(e, t),
this.left = e.left,
this.right = e.right,
this.top = e.top,
this.bottom = e.bottom,
this.near = e.near,
this.far = e.far,
this.zoom = e.zoom,
this.view = null === e.view ? null : Object.assign({}, e.view),
this
}
setViewOffset(e, t, n, r, i, s) {
null === this.view && (this.view = {
enabled: !0,
fullWidth: 1,
fullHeight: 1,
offsetX: 0,
offsetY: 0,
width: 1,
height: 1
}),
this.view.enabled = !0,
this.view.fullWidth = e,
this.view.fullHeight = t,
this.view.offsetX = n,
this.view.offsetY = r,
this.view.width = i,
this.view.height = s,
this.updateProjectionMatrix()
}
clearViewOffset() {
null !== this.view && (this.view.enabled = !1),
this.updateProjectionMatrix()
}
updateProjectionMatrix() {
const e = (this.right - this.left) / (2 * this.zoom)
, t = (this.top - this.bottom) / (2 * this.zoom)
, n = (this.right + this.left) / 2
, r = (this.top + this.bottom) / 2;
let i = n - e
, s = n + e
, a = r + t
, o = r - t;
if (null !== this.view && this.view.enabled) {
const e = (this.right - this.left) / this.view.fullWidth / this.zoom
, t = (this.top - this.bottom) / this.view.fullHeight / this.zoom;
i += e * this.view.offsetX,
s = i + e * this.view.width,
a -= t * this.view.offsetY,
o = a - t * this.view.height
}
this.projectionMatrix.makeOrthographic(i, s, a, o, this.near, this.far, this.coordinateSystem),
this.projectionMatrixInverse.copy(this.projectionMatrix).invert()
}
toJSON(e) {
const t = super.toJSON(e);
return t.object.zoom = this.zoom,
t.object.left = this.left,
t.object.right = this.right,
t.object.top = this.top,
t.object.bottom = this.bottom,
t.object.near = this.near,
t.object.far = this.far,
null !== this.view && (t.object.view = Object.assign({}, this.view)),
t
}
}
const Yo = [.125, .215, .35, .446, .526, .582]
, Qo = 20
, Zo = new qo
, $o = new ga;
let el = null
, tl = 0
, nl = 0
, rl = !1;
const il = (1 + Math.sqrt(5)) / 2
, sl = 1 / il
, al = [new Qi(-il,sl,0), new Qi(il,sl,0), new Qi(-sl,0,il), new Qi(sl,0,il), new Qi(0,il,-sl), new Qi(0,il,sl), new Qi(-1,1,-1), new Qi(1,1,-1), new Qi(-1,1,1), new Qi(1,1,1)];
class ol {
constructor(e) {
this._renderer = e,
this._pingPongRenderTarget = null,
this._lodMax = 0,
this._cubeSize = 0,
this._lodPlanes = [],
this._sizeLods = [],
this._sigmas = [],
this._blurMaterial = null,
this._cubemapMaterial = null,
this._equirectMaterial = null,
this._compileMaterial(this._blurMaterial)
}
fromScene(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : .1
, r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : 100;
el = this._renderer.getRenderTarget(),
tl = this._renderer.getActiveCubeFace(),
nl = this._renderer.getActiveMipmapLevel(),
rl = this._renderer.xr.enabled,
this._renderer.xr.enabled = !1,
this._setSize(256);
const i = this._allocateTargets();
return i.depthBuffer = !0,
this._sceneToCubeUV(e, n, r, i),
t > 0 && this._blur(i, 0, 0, t),
this._applyPMREM(i),
this._cleanup(i),
i
}
fromEquirectangular(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : null;
return this._fromTexture(e, t)
}
fromCubemap(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : null;
return this._fromTexture(e, t)
}
compileCubemapShader() {
null === this._cubemapMaterial && (this._cubemapMaterial = dl(),
this._compileMaterial(this._cubemapMaterial))
}
compileEquirectangularShader() {
null === this._equirectMaterial && (this._equirectMaterial = ul(),
this._compileMaterial(this._equirectMaterial))
}
dispose() {
this._dispose(),
null !== this._cubemapMaterial && this._cubemapMaterial.dispose(),
null !== this._equirectMaterial && this._equirectMaterial.dispose()
}
_setSize(e) {
this._lodMax = Math.floor(Math.log2(e)),
this._cubeSize = Math.pow(2, this._lodMax)
}
_dispose() {
null !== this._blurMaterial && this._blurMaterial.dispose(),
null !== this._pingPongRenderTarget && this._pingPongRenderTarget.dispose();
for (let e = 0; e < this._lodPlanes.length; e++)
this._lodPlanes[e].dispose()
}
_cleanup(e) {
this._renderer.setRenderTarget(el, tl, nl),
this._renderer.xr.enabled = rl,
e.scissorTest = !1,
cl(e, 0, 0, e.width, e.height)
}
_fromTexture(e, t) {
e.mapping === Bt || e.mapping === Pt ? this._setSize(0 === e.image.length ? 16 : e.image[0].width || e.image[0].image.width) : this._setSize(e.image.width / 4),
el = this._renderer.getRenderTarget(),
tl = this._renderer.getActiveCubeFace(),
nl = this._renderer.getActiveMipmapLevel(),
rl = this._renderer.xr.enabled,
this._renderer.xr.enabled = !1;
const n = t || this._allocateTargets();
return this._textureToCubeUV(e, n),
this._applyPMREM(n),
this._cleanup(n),
n
}
_allocateTargets() {
const e = 3 * Math.max(this._cubeSize, 112)
, t = 4 * this._cubeSize
, n = {
magFilter: Ht,
minFilter: Ht,
generateMipmaps: !1,
type: tn,
format: cn,
colorSpace: vr,
depthBuffer: !1
}
, r = ll(e, t, n);
if (null === this._pingPongRenderTarget || this._pingPongRenderTarget.width !== e || this._pingPongRenderTarget.height !== t) {
null !== this._pingPongRenderTarget && this._dispose(),
this._pingPongRenderTarget = ll(e, t, n);
const {_lodMax: r} = this;
({sizeLods: this._sizeLods, lodPlanes: this._lodPlanes, sigmas: this._sigmas} = function(e) {
const t = []
, n = []
, r = [];
let i = e;
const s = e - 4 + 1 + Yo.length;
for (let a = 0; a < s; a++) {
const s = Math.pow(2, i);
n.push(s);
let o = 1 / s;
a > e - 4 ? o = Yo[a - e + 4 - 1] : 0 === a && (o = 0),
r.push(o);
const l = 1 / (s - 2)
, c = -l
, u = 1 + l
, d = [c, c, u, c, u, u, c, c, u, u, c, u]
, h = 6
, p = 6
, f = 3
, m = 2
, g = 1
, v = new Float32Array(f * p * h)
, y = new Float32Array(m * p * h)
, x = new Float32Array(g * p * h);
for (let e = 0; e < h; e++) {
const t = e % 3 * 2 / 3 - 1
, n = e > 2 ? 0 : -1
, r = [t, n, 0, t + 2 / 3, n, 0, t + 2 / 3, n + 1, 0, t, n, 0, t + 2 / 3, n + 1, 0, t, n + 1, 0];
v.set(r, f * p * e),
y.set(d, m * p * e);
const i = [e, e, e, e, e, e];
x.set(i, g * p * e)
}
const b = new Wa;
b.setAttribute("position", new Ta(v,f)),
b.setAttribute("uv", new Ta(y,m)),
b.setAttribute("faceIndex", new Ta(x,g)),
t.push(b),
i > 4 && i--
}
return {
lodPlanes: t,
sizeLods: n,
sigmas: r
}
}(r)),
this._blurMaterial = function(e, t, n) {
const r = new Float32Array(Qo)
, i = new Qi(0,1,0)
, s = new vo({
name: "SphericalGaussianBlur",
defines: {
n: Qo,
CUBEUV_TEXEL_WIDTH: 1 / t,
CUBEUV_TEXEL_HEIGHT: 1 / n,
CUBEUV_MAX_MIP: "".concat(e, ".0")
},
uniforms: {
envMap: {
value: null
},
samples: {
value: 1
},
weights: {
value: r
},
latitudinal: {
value: !1
},
dTheta: {
value: 0
},
mipInt: {
value: 0
},
poleAxis: {
value: i
}
},
vertexShader: "\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",
fragmentShader: "\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include <cube_uv_reflection_fragment>\n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t",
blending: De,
depthTest: !1,
depthWrite: !1
});
return s
}(r, e, t)
}
return r
}
_compileMaterial(e) {
const t = new co(this._lodPlanes[0],e);
this._renderer.compile(t, Zo)
}
_sceneToCubeUV(e, t, n, r) {
const i = new wo(90,1,t,n)
, s = [1, -1, 1, 1, 1, 1]
, a = [1, 1, 1, -1, -1, -1]
, o = this._renderer
, l = o.autoClear
, c = o.toneMapping;
o.getClearColor($o),
o.toneMapping = xt,
o.autoClear = !1;
const u = new ba({
name: "PMREM.Background",
side: Ie,
depthWrite: !1,
depthTest: !1
})
, d = new co(new ho,u);
let h = !1;
const p = e.background;
p ? p.isColor && (u.color.copy(p),
e.background = null,
h = !0) : (u.color.copy($o),
h = !0);
for (let f = 0; f < 6; f++) {
const t = f % 3;
0 === t ? (i.up.set(0, s[f], 0),
i.lookAt(a[f], 0, 0)) : 1 === t ? (i.up.set(0, 0, s[f]),
i.lookAt(0, a[f], 0)) : (i.up.set(0, s[f], 0),
i.lookAt(0, 0, a[f]));
const n = this._cubeSize;
cl(r, t * n, f > 2 ? n : 0, n, n),
o.setRenderTarget(r),
h && o.render(d, i),
o.render(e, i)
}
d.geometry.dispose(),
d.material.dispose(),
o.toneMapping = c,
o.autoClear = l,
e.background = p
}
_textureToCubeUV(e, t) {
const n = this._renderer
, r = e.mapping === Bt || e.mapping === Pt;
r ? (null === this._cubemapMaterial && (this._cubemapMaterial = dl()),
this._cubemapMaterial.uniforms.flipEnvMap.value = !1 === e.isRenderTargetTexture ? -1 : 1) : null === this._equirectMaterial && (this._equirectMaterial = ul());
const i = r ? this._cubemapMaterial : this._equirectMaterial
, s = new co(this._lodPlanes[0],i);
i.uniforms.envMap.value = e;
const a = this._cubeSize;
cl(t, 0, 0, 3 * a, 2 * a),
n.setRenderTarget(t),
n.render(s, Zo)
}
_applyPMREM(e) {
const t = this._renderer
, n = t.autoClear;
t.autoClear = !1;
const r = this._lodPlanes.length;
for (let i = 1; i < r; i++) {
const t = Math.sqrt(this._sigmas[i] * this._sigmas[i] - this._sigmas[i - 1] * this._sigmas[i - 1])
, n = al[(r - i - 1) % al.length];
this._blur(e, i - 1, i, t, n)
}
t.autoClear = n
}
_blur(e, t, n, r, i) {
const s = this._pingPongRenderTarget;
this._halfBlur(e, s, t, n, r, "latitudinal", i),
this._halfBlur(s, e, n, n, r, "longitudinal", i)
}
_halfBlur(e, t, n, r, i, s, a) {
const o = this._renderer
, l = this._blurMaterial;
"latitudinal" !== s && "longitudinal" !== s && console.error("blur direction must be either latitudinal or longitudinal!");
const c = new co(this._lodPlanes[r],l)
, u = l.uniforms
, d = this._sizeLods[n] - 1
, h = isFinite(i) ? Math.PI / (2 * d) : 2 * Math.PI / 39
, p = i / h
, f = isFinite(i) ? 1 + Math.floor(3 * p) : Qo;
f > Qo && console.warn("sigmaRadians, ".concat(i, ", is too large and will clip, as it requested ").concat(f, " samples when the maximum is set to ").concat(Qo));
const m = [];
let g = 0;
for (let x = 0; x < Qo; ++x) {
const e = x / p
, t = Math.exp(-e * e / 2);
m.push(t),
0 === x ? g += t : x < f && (g += 2 * t)
}
for (let x = 0; x < m.length; x++)
m[x] = m[x] / g;
u.envMap.value = e.texture,
u.samples.value = f,
u.weights.value = m,
u.latitudinal.value = "latitudinal" === s,
a && (u.poleAxis.value = a);
const {_lodMax: v} = this;
u.dTheta.value = h,
u.mipInt.value = v - n;
const y = this._sizeLods[r];
cl(t, 3 * y * (r > v - 4 ? r - v + 4 : 0), 4 * (this._cubeSize - y), 3 * y, 2 * y),
o.setRenderTarget(t),
o.render(c, Zo)
}
}
function ll(e, t, n) {
const r = new Wi(e,t,n);
return r.texture.mapping = It,
r.texture.name = "PMREM.cubeUv",
r.scissorTest = !0,
r
}
function cl(e, t, n, r, i) {
e.viewport.set(t, n, r, i),
e.scissor.set(t, n, r, i)
}
function ul() {
return new vo({
name: "EquirectangularToCubeUV",
uniforms: {
envMap: {
value: null
}
},
vertexShader: "\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",
fragmentShader: "\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\n\t\t\t#include <common>\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tgl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );\n\n\t\t\t}\n\t\t",
blending: De,
depthTest: !1,
depthWrite: !1
})
}
function dl() {
return new vo({
name: "CubemapToCubeUV",
uniforms: {
envMap: {
value: null
},
flipEnvMap: {
value: -1
}
},
vertexShader: "\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",
fragmentShader: "\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tuniform float flipEnvMap;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );\n\n\t\t\t}\n\t\t",
blending: De,
depthTest: !1,
depthWrite: !1
})
}
function hl(e) {
let t = new WeakMap
, n = null;
function r(e) {
const n = e.target;
n.removeEventListener("dispose", r);
const i = t.get(n);
void 0 !== i && (t.delete(n),
i.dispose())
}
return {
get: function(i) {
if (i && i.isTexture) {
const s = i.mapping
, a = s === kt || s === Lt
, o = s === Bt || s === Pt;
if (a || o) {
let s = t.get(i);
const l = void 0 !== s ? s.texture.pmremVersion : 0;
if (i.isRenderTargetTexture && i.pmremVersion !== l)
return null === n && (n = new ol(e)),
s = a ? n.fromEquirectangular(i, s) : n.fromCubemap(i, s),
s.texture.pmremVersion = i.pmremVersion,
t.set(i, s),
s.texture;
if (void 0 !== s)
return s.texture;
{
const l = i.image;
return a && l && l.height > 0 || o && l && function(e) {
let t = 0;
const n = 6;
for (let r = 0; r < n; r++)
void 0 !== e[r] && t++;
return t === n
}(l) ? (null === n && (n = new ol(e)),
s = a ? n.fromEquirectangular(i) : n.fromCubemap(i),
s.texture.pmremVersion = i.pmremVersion,
t.set(i, s),
i.addEventListener("dispose", r),
s.texture) : null
}
}
}
return i
},
dispose: function() {
t = new WeakMap,
null !== n && (n.dispose(),
n = null)
}
}
}
function pl(e) {
const t = {};
function n(n) {
if (void 0 !== t[n])
return t[n];
let r;
switch (n) {
case "WEBGL_depth_texture":
r = e.getExtension("WEBGL_depth_texture") || e.getExtension("MOZ_WEBGL_depth_texture") || e.getExtension("WEBKIT_WEBGL_depth_texture");
break;
case "EXT_texture_filter_anisotropic":
r = e.getExtension("EXT_texture_filter_anisotropic") || e.getExtension("MOZ_EXT_texture_filter_anisotropic") || e.getExtension("WEBKIT_EXT_texture_filter_anisotropic");
break;
case "WEBGL_compressed_texture_s3tc":
r = e.getExtension("WEBGL_compressed_texture_s3tc") || e.getExtension("MOZ_WEBGL_compressed_texture_s3tc") || e.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");
break;
case "WEBGL_compressed_texture_pvrtc":
r = e.getExtension("WEBGL_compressed_texture_pvrtc") || e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");
break;
default:
r = e.getExtension(n)
}
return t[n] = r,
r
}
return {
has: function(e) {
return null !== n(e)
},
init: function() {
n("EXT_color_buffer_float"),
n("WEBGL_clip_cull_distance"),
n("OES_texture_float_linear"),
n("EXT_color_buffer_half_float"),
n("WEBGL_multisampled_render_to_texture"),
n("WEBGL_render_shared_exponent")
},
get: function(e) {
const t = n(e);
return null === t && Ti("THREE.WebGLRenderer: " + e + " extension not supported."),
t
}
}
}
function fl(e, t, n, r) {
const i = {}
, s = new WeakMap;
function a(e) {
const o = e.target;
null !== o.index && t.remove(o.index);
for (const n in o.attributes)
t.remove(o.attributes[n]);
for (const n in o.morphAttributes) {
const e = o.morphAttributes[n];
for (let n = 0, r = e.length; n < r; n++)
t.remove(e[n])
}
o.removeEventListener("dispose", a),
delete i[o.id];
const l = s.get(o);
l && (t.remove(l),
s.delete(o)),
r.releaseStatesOfGeometry(o),
!0 === o.isInstancedBufferGeometry && delete o._maxInstanceCount,
n.memory.geometries--
}
function o(e) {
const n = []
, r = e.index
, i = e.attributes.position;
let a = 0;
if (null !== r) {
const e = r.array;
a = r.version;
for (let t = 0, r = e.length; t < r; t += 3) {
const r = e[t + 0]
, i = e[t + 1]
, s = e[t + 2];
n.push(r, i, i, s, s, r)
}
} else {
if (void 0 === i)
return;
{
const e = i.array;
a = i.version;
for (let t = 0, r = e.length / 3 - 1; t < r; t += 3) {
const e = t + 0
, r = t + 1
, i = t + 2;
n.push(e, r, r, i, i, e)
}
}
}
const o = new (wi(n) ? Na : La)(n,1);
o.version = a;
const l = s.get(e);
l && t.remove(l),
s.set(e, o)
}
return {
get: function(e, t) {
return !0 === i[t.id] || (t.addEventListener("dispose", a),
i[t.id] = !0,
n.memory.geometries++),
t
},
update: function(n) {
const r = n.attributes;
for (const s in r)
t.update(r[s], e.ARRAY_BUFFER);
const i = n.morphAttributes;
for (const s in i) {
const n = i[s];
for (let r = 0, i = n.length; r < i; r++)
t.update(n[r], e.ARRAY_BUFFER)
}
},
getWireframeAttribute: function(e) {
const t = s.get(e);
if (t) {
const n = e.index;
null !== n && t.version < n.version && o(e)
} else
o(e);
return s.get(e)
}
}
}
function ml(e, t, n) {
let r, i, s;
function a(t, a, o) {
0 !== o && (e.drawElementsInstanced(r, a, i, t * s, o),
n.update(a, r, o))
}
this.setMode = function(e) {
r = e
}
,
this.setIndex = function(e) {
i = e.type,
s = e.bytesPerElement
}
,
this.render = function(t, a) {
e.drawElements(r, a, i, t * s),
n.update(a, r, 1)
}
,
this.renderInstances = a,
this.renderMultiDraw = function(e, a, o) {
if (0 === o)
return;
const l = t.get("WEBGL_multi_draw");
if (null === l)
for (let t = 0; t < o; t++)
this.render(e[t] / s, a[t]);
else {
l.multiDrawElementsWEBGL(r, a, 0, i, e, 0, o);
let t = 0;
for (let e = 0; e < o; e++)
t += a[e];
n.update(t, r, 1)
}
}
,
this.renderMultiDrawInstances = function(e, o, l, c) {
if (0 === l)
return;
const u = t.get("WEBGL_multi_draw");
if (null === u)
for (let t = 0; t < e.length; t++)
a(e[t] / s, o[t], c[t]);
else {
u.multiDrawElementsInstancedWEBGL(r, o, 0, i, e, 0, c, 0, l);
let t = 0;
for (let e = 0; e < l; e++)
t += o[e];
for (let e = 0; e < c.length; e++)
n.update(t, r, c[e])
}
}
}
function gl(e) {
const t = {
frame: 0,
calls: 0,
triangles: 0,
points: 0,
lines: 0
};
return {
memory: {
geometries: 0,
textures: 0
},
render: t,
programs: null,
autoReset: !0,
reset: function() {
t.calls = 0,
t.triangles = 0,
t.points = 0,
t.lines = 0
},
update: function(n, r, i) {
switch (t.calls++,
r) {
case e.TRIANGLES:
t.triangles += i * (n / 3);
break;
case e.LINES:
t.lines += i * (n / 2);
break;
case e.LINE_STRIP:
t.lines += i * (n - 1);
break;
case e.LINE_LOOP:
t.lines += i * n;
break;
case e.POINTS:
t.points += i * n;
break;
default:
console.error("THREE.WebGLInfo: Unknown draw mode:", r)
}
}
}
}
function vl(e, t, n) {
const r = new WeakMap
, i = new Hi;
return {
update: function(s, a, o) {
const l = s.morphTargetInfluences
, c = a.morphAttributes.position || a.morphAttributes.normal || a.morphAttributes.color
, u = void 0 !== c ? c.length : 0;
let d = r.get(a);
if (void 0 === d || d.count !== u) {
void 0 !== d && d.texture.dispose();
const h = void 0 !== a.morphAttributes.position
, p = void 0 !== a.morphAttributes.normal
, f = void 0 !== a.morphAttributes.color
, m = a.morphAttributes.position || []
, g = a.morphAttributes.normal || []
, v = a.morphAttributes.color || [];
let y = 0;
!0 === h && (y = 1),
!0 === p && (y = 2),
!0 === f && (y = 3);
let x = a.attributes.position.count * y
, b = 1;
x > t.maxTextureSize && (b = Math.ceil(x / t.maxTextureSize),
x = t.maxTextureSize);
const _ = new Float32Array(x * b * 4 * u)
, w = new Ji(_,x,b,u);
w.type = en,
w.needsUpdate = !0;
const S = 4 * y;
for (let M = 0; M < u; M++) {
const C = m[M]
, E = g[M]
, T = v[M]
, R = x * b * 4 * M;
for (let B = 0; B < C.count; B++) {
const P = B * S;
!0 === h && (i.fromBufferAttribute(C, B),
_[R + P + 0] = i.x,
_[R + P + 1] = i.y,
_[R + P + 2] = i.z,
_[R + P + 3] = 0),
!0 === p && (i.fromBufferAttribute(E, B),
_[R + P + 4] = i.x,
_[R + P + 5] = i.y,
_[R + P + 6] = i.z,
_[R + P + 7] = 0),
!0 === f && (i.fromBufferAttribute(T, B),
_[R + P + 8] = i.x,
_[R + P + 9] = i.y,
_[R + P + 10] = i.z,
_[R + P + 11] = 4 === T.itemSize ? i.w : 1)
}
}
function A() {
w.dispose(),
r.delete(a),
a.removeEventListener("dispose", A)
}
d = {
count: u,
texture: w,
size: new xi(x,b)
},
r.set(a, d),
a.addEventListener("dispose", A)
}
if (!0 === s.isInstancedMesh && null !== s.morphTexture)
o.getUniforms().setValue(e, "morphTexture", s.morphTexture, n);
else {
let k = 0;
for (let I = 0; I < l.length; I++)
k += l[I];
const L = a.morphTargetsRelative ? 1 : 1 - k;
o.getUniforms().setValue(e, "morphTargetBaseInfluence", L),
o.getUniforms().setValue(e, "morphTargetInfluences", l)
}
o.getUniforms().setValue(e, "morphTargetsTexture", d.texture, n),
o.getUniforms().setValue(e, "morphTargetsTextureSize", d.size)
}
}
}
function yl(e, t, n, r) {
let i = new WeakMap;
function s(e) {
const t = e.target;
t.removeEventListener("dispose", s),
n.remove(t.instanceMatrix),
null !== t.instanceColor && n.remove(t.instanceColor)
}
return {
update: function(a) {
const o = r.render.frame
, l = a.geometry
, c = t.get(a, l);
if (i.get(c) !== o && (t.update(c),
i.set(c, o)),
a.isInstancedMesh && (!1 === a.hasEventListener("dispose", s) && a.addEventListener("dispose", s),
i.get(a) !== o && (n.update(a.instanceMatrix, e.ARRAY_BUFFER),
null !== a.instanceColor && n.update(a.instanceColor, e.ARRAY_BUFFER),
i.set(a, o))),
a.isSkinnedMesh) {
const e = a.skeleton;
i.get(e) !== o && (e.update(),
i.set(e, o))
}
return c
},
dispose: function() {
i = new WeakMap
}
}
}
class xl extends Gi {
constructor(e, t, n, r, i, s, a, o, l) {
let c = arguments.length > 9 && void 0 !== arguments[9] ? arguments[9] : hn;
if (c !== hn && c !== pn)
throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");
void 0 === n && c === hn && (n = $t),
void 0 === n && c === pn && (n = sn),
super(null, r, i, s, a, o, c, n, l),
this.isDepthTexture = !0,
this.image = {
width: e,
height: t
},
this.magFilter = void 0 !== a ? a : Ft,
this.minFilter = void 0 !== o ? o : Ft,
this.flipY = !1,
this.generateMipmaps = !1,
this.compareFunction = null
}
copy(e) {
return super.copy(e),
this.compareFunction = e.compareFunction,
this
}
toJSON(e) {
const t = super.toJSON(e);
return null !== this.compareFunction && (t.compareFunction = this.compareFunction),
t
}
}
const bl = new Gi
, _l = new xl(1,1);
_l.compareFunction = Hr;
const wl = new Ji
, Sl = new Ki
, Al = new Mo
, Ml = []
, Cl = []
, El = new Float32Array(16)
, Tl = new Float32Array(9)
, Rl = new Float32Array(4);
function Bl(e, t, n) {
const r = e[0];
if (r <= 0 || r > 0)
return e;
const i = t * n;
let s = Ml[i];
if (void 0 === s && (s = new Float32Array(i),
Ml[i] = s),
0 !== t) {
r.toArray(s, 0);
for (let r = 1, i = 0; r !== t; ++r)
i += n,
e[r].toArray(s, i)
}
return s
}
function Pl(e, t) {
if (e.length !== t.length)
return !1;
for (let n = 0, r = e.length; n < r; n++)
if (e[n] !== t[n])
return !1;
return !0
}
function kl(e, t) {
for (let n = 0, r = t.length; n < r; n++)
e[n] = t[n]
}
function Ll(e, t) {
let n = Cl[t];
void 0 === n && (n = new Int32Array(t),
Cl[t] = n);
for (let r = 0; r !== t; ++r)
n[r] = e.allocateTextureUnit();
return n
}
function Il(e, t) {
const n = this.cache;
n[0] !== t && (e.uniform1f(this.addr, t),
n[0] = t)
}
function Nl(e, t) {
const n = this.cache;
if (void 0 !== t.x)
n[0] === t.x && n[1] === t.y || (e.uniform2f(this.addr, t.x, t.y),
n[0] = t.x,
n[1] = t.y);
else {
if (Pl(n, t))
return;
e.uniform2fv(this.addr, t),
kl(n, t)
}
}
function Dl(e, t) {
const n = this.cache;
if (void 0 !== t.x)
n[0] === t.x && n[1] === t.y && n[2] === t.z || (e.uniform3f(this.addr, t.x, t.y, t.z),
n[0] = t.x,
n[1] = t.y,
n[2] = t.z);
else if (void 0 !== t.r)
n[0] === t.r && n[1] === t.g && n[2] === t.b || (e.uniform3f(this.addr, t.r, t.g, t.b),
n[0] = t.r,
n[1] = t.g,
n[2] = t.b);
else {
if (Pl(n, t))
return;
e.uniform3fv(this.addr, t),
kl(n, t)
}
}
function jl(e, t) {
const n = this.cache;
if (void 0 !== t.x)
n[0] === t.x && n[1] === t.y && n[2] === t.z && n[3] === t.w || (e.uniform4f(this.addr, t.x, t.y, t.z, t.w),
n[0] = t.x,
n[1] = t.y,
n[2] = t.z,
n[3] = t.w);
else {
if (Pl(n, t))
return;
e.uniform4fv(this.addr, t),
kl(n, t)
}
}
function Fl(e, t) {
const n = this.cache
, r = t.elements;
if (void 0 === r) {
if (Pl(n, t))
return;
e.uniformMatrix2fv(this.addr, !1, t),
kl(n, t)
} else {
if (Pl(n, r))
return;
Rl.set(r),
e.uniformMatrix2fv(this.addr, !1, Rl),
kl(n, r)
}
}
function Ol(e, t) {
const n = this.cache
, r = t.elements;
if (void 0 === r) {
if (Pl(n, t))
return;
e.uniformMatrix3fv(this.addr, !1, t),
kl(n, t)
} else {
if (Pl(n, r))
return;
Tl.set(r),
e.uniformMatrix3fv(this.addr, !1, Tl),
kl(n, r)
}
}
function Ul(e, t) {
const n = this.cache
, r = t.elements;
if (void 0 === r) {
if (Pl(n, t))
return;
e.uniformMatrix4fv(this.addr, !1, t),
kl(n, t)
} else {
if (Pl(n, r))
return;
El.set(r),
e.uniformMatrix4fv(this.addr, !1, El),
kl(n, r)
}
}
function zl(e, t) {
const n = this.cache;
n[0] !== t && (e.uniform1i(this.addr, t),
n[0] = t)
}
function Gl(e, t) {
const n = this.cache;
if (void 0 !== t.x)
n[0] === t.x && n[1] === t.y || (e.uniform2i(this.addr, t.x, t.y),
n[0] = t.x,
n[1] = t.y);
else {
if (Pl(n, t))
return;
e.uniform2iv(this.addr, t),
kl(n, t)
}
}
function Hl(e, t) {
const n = this.cache;
if (void 0 !== t.x)
n[0] === t.x && n[1] === t.y && n[2] === t.z || (e.uniform3i(this.addr, t.x, t.y, t.z),
n[0] = t.x,
n[1] = t.y,
n[2] = t.z);
else {
if (Pl(n, t))
return;
e.uniform3iv(this.addr, t),
kl(n, t)
}
}
function Vl(e, t) {
const n = this.cache;
if (void 0 !== t.x)
n[0] === t.x && n[1] === t.y && n[2] === t.z && n[3] === t.w || (e.uniform4i(this.addr, t.x, t.y, t.z, t.w),
n[0] = t.x,
n[1] = t.y,
n[2] = t.z,
n[3] = t.w);
else {
if (Pl(n, t))
return;
e.uniform4iv(this.addr, t),
kl(n, t)
}
}
function Wl(e, t) {
const n = this.cache;
n[0] !== t && (e.uniform1ui(this.addr, t),
n[0] = t)
}
function Jl(e, t) {
const n = this.cache;
if (void 0 !== t.x)
n[0] === t.x && n[1] === t.y || (e.uniform2ui(this.addr, t.x, t.y),
n[0] = t.x,
n[1] = t.y);
else {
if (Pl(n, t))
return;
e.uniform2uiv(this.addr, t),
kl(n, t)
}
}
function Xl(e, t) {
const n = this.cache;
if (void 0 !== t.x)
n[0] === t.x && n[1] === t.y && n[2] === t.z || (e.uniform3ui(this.addr, t.x, t.y, t.z),
n[0] = t.x,
n[1] = t.y,
n[2] = t.z);
else {
if (Pl(n, t))
return;
e.uniform3uiv(this.addr, t),
kl(n, t)
}
}
function Kl(e, t) {
const n = this.cache;
if (void 0 !== t.x)
n[0] === t.x && n[1] === t.y && n[2] === t.z && n[3] === t.w || (e.uniform4ui(this.addr, t.x, t.y, t.z, t.w),
n[0] = t.x,
n[1] = t.y,
n[2] = t.z,
n[3] = t.w);
else {
if (Pl(n, t))
return;
e.uniform4uiv(this.addr, t),
kl(n, t)
}
}
function ql(e, t, n) {
const r = this.cache
, i = n.allocateTextureUnit();
r[0] !== i && (e.uniform1i(this.addr, i),
r[0] = i);
const s = this.type === e.SAMPLER_2D_SHADOW ? _l : bl;
n.setTexture2D(t || s, i)
}
function Yl(e, t, n) {
const r = this.cache
, i = n.allocateTextureUnit();
r[0] !== i && (e.uniform1i(this.addr, i),
r[0] = i),
n.setTexture3D(t || Sl, i)
}
function Ql(e, t, n) {
const r = this.cache
, i = n.allocateTextureUnit();
r[0] !== i && (e.uniform1i(this.addr, i),
r[0] = i),
n.setTextureCube(t || Al, i)
}
function Zl(e, t, n) {
const r = this.cache
, i = n.allocateTextureUnit();
r[0] !== i && (e.uniform1i(this.addr, i),
r[0] = i),
n.setTexture2DArray(t || wl, i)
}
function $l(e, t) {
e.uniform1fv(this.addr, t)
}
function ec(e, t) {
const n = Bl(t, this.size, 2);
e.uniform2fv(this.addr, n)
}
function tc(e, t) {
const n = Bl(t, this.size, 3);
e.uniform3fv(this.addr, n)
}
function nc(e, t) {
const n = Bl(t, this.size, 4);
e.uniform4fv(this.addr, n)
}
function rc(e, t) {
const n = Bl(t, this.size, 4);
e.uniformMatrix2fv(this.addr, !1, n)
}
function ic(e, t) {
const n = Bl(t, this.size, 9);
e.uniformMatrix3fv(this.addr, !1, n)
}
function sc(e, t) {
const n = Bl(t, this.size, 16);
e.uniformMatrix4fv(this.addr, !1, n)
}
function ac(e, t) {
e.uniform1iv(this.addr, t)
}
function oc(e, t) {
e.uniform2iv(this.addr, t)
}
function lc(e, t) {
e.uniform3iv(this.addr, t)
}
function cc(e, t) {
e.uniform4iv(this.addr, t)
}
function uc(e, t) {
e.uniform1uiv(this.addr, t)
}
function dc(e, t) {
e.uniform2uiv(this.addr, t)
}
function hc(e, t) {
e.uniform3uiv(this.addr, t)
}
function pc(e, t) {
e.uniform4uiv(this.addr, t)
}
function fc(e, t, n) {
const r = this.cache
, i = t.length
, s = Ll(n, i);
Pl(r, s) || (e.uniform1iv(this.addr, s),
kl(r, s));
for (let a = 0; a !== i; ++a)
n.setTexture2D(t[a] || bl, s[a])
}
function mc(e, t, n) {
const r = this.cache
, i = t.length
, s = Ll(n, i);
Pl(r, s) || (e.uniform1iv(this.addr, s),
kl(r, s));
for (let a = 0; a !== i; ++a)
n.setTexture3D(t[a] || Sl, s[a])
}
function gc(e, t, n) {
const r = this.cache
, i = t.length
, s = Ll(n, i);
Pl(r, s) || (e.uniform1iv(this.addr, s),
kl(r, s));
for (let a = 0; a !== i; ++a)
n.setTextureCube(t[a] || Al, s[a])
}
function vc(e, t, n) {
const r = this.cache
, i = t.length
, s = Ll(n, i);
Pl(r, s) || (e.uniform1iv(this.addr, s),
kl(r, s));
for (let a = 0; a !== i; ++a)
n.setTexture2DArray(t[a] || wl, s[a])
}
class yc {
constructor(e, t, n) {
this.id = e,
this.addr = n,
this.cache = [],
this.type = t.type,
this.setValue = function(e) {
switch (e) {
case 5126:
return Il;
case 35664:
return Nl;
case 35665:
return Dl;
case 35666:
return jl;
case 35674:
return Fl;
case 35675:
return Ol;
case 35676:
return Ul;
case 5124:
case 35670:
return zl;
case 35667:
case 35671:
return Gl;
case 35668:
case 35672:
return Hl;
case 35669:
case 35673:
return Vl;
case 5125:
return Wl;
case 36294:
return Jl;
case 36295:
return Xl;
case 36296:
return Kl;
case 35678:
case 36198:
case 36298:
case 36306:
case 35682:
return ql;
case 35679:
case 36299:
case 36307:
return Yl;
case 35680:
case 36300:
case 36308:
case 36293:
return Ql;
case 36289:
case 36303:
case 36311:
case 36292:
return Zl
}
}(t.type)
}
}
class xc {
constructor(e, t, n) {
this.id = e,
this.addr = n,
this.cache = [],
this.type = t.type,
this.size = t.size,
this.setValue = function(e) {
switch (e) {
case 5126:
return $l;
case 35664:
return ec;
case 35665:
return tc;
case 35666:
return nc;
case 35674:
return rc;
case 35675:
return ic;
case 35676:
return sc;
case 5124:
case 35670:
return ac;
case 35667:
case 35671:
return oc;
case 35668:
case 35672:
return lc;
case 35669:
case 35673:
return cc;
case 5125:
return uc;
case 36294:
return dc;
case 36295:
return hc;
case 36296:
return pc;
case 35678:
case 36198:
case 36298:
case 36306:
case 35682:
return fc;
case 35679:
case 36299:
case 36307:
return mc;
case 35680:
case 36300:
case 36308:
case 36293:
return gc;
case 36289:
case 36303:
case 36311:
case 36292:
return vc
}
}(t.type)
}
}
class bc {
constructor(e) {
this.id = e,
this.seq = [],
this.map = {}
}
setValue(e, t, n) {
const r = this.seq;
for (let i = 0, s = r.length; i !== s; ++i) {
const s = r[i];
s.setValue(e, t[s.id], n)
}
}
}
const _c = /(\w+)(\])?(\[|\.)?/g;
function wc(e, t) {
e.seq.push(t),
e.map[t.id] = t
}
function Sc(e, t, n) {
const r = e.name
, i = r.length;
for (_c.lastIndex = 0; ; ) {
const s = _c.exec(r)
, a = _c.lastIndex;
let o = s[1];
const l = "]" === s[2]
, c = s[3];
if (l && (o |= 0),
void 0 === c || "[" === c && a + 2 === i) {
wc(n, void 0 === c ? new yc(o,e,t) : new xc(o,e,t));
break
}
{
let e = n.map[o];
void 0 === e && (e = new bc(o),
wc(n, e)),
n = e
}
}
}
class Ac {
constructor(e, t) {
this.seq = [],
this.map = {};
const n = e.getProgramParameter(t, e.ACTIVE_UNIFORMS);
for (let r = 0; r < n; ++r) {
const n = e.getActiveUniform(t, r);
Sc(n, e.getUniformLocation(t, n.name), this)
}
}
setValue(e, t, n, r) {
const i = this.map[t];
void 0 !== i && i.setValue(e, n, r)
}
setOptional(e, t, n) {
const r = t[n];
void 0 !== r && this.setValue(e, n, r)
}
static upload(e, t, n, r) {
for (let i = 0, s = t.length; i !== s; ++i) {
const s = t[i]
, a = n[s.id];
!1 !== a.needsUpdate && s.setValue(e, a.value, r)
}
}
static seqWithValue(e, t) {
const n = [];
for (let r = 0, i = e.length; r !== i; ++r) {
const i = e[r];
i.id in t && n.push(i)
}
return n
}
}
function Mc(e, t, n) {
const r = e.createShader(t);
return e.shaderSource(r, n),
e.compileShader(r),
r
}
const Cc = 37297;
let Ec = 0;
function Tc(e, t, n) {
const r = e.getShaderParameter(t, e.COMPILE_STATUS)
, i = e.getShaderInfoLog(t).trim();
if (r && "" === i)
return "";
const s = /ERROR: 0:(\d+)/.exec(i);
if (s) {
const r = parseInt(s[1]);
return n.toUpperCase() + "\n\n" + i + "\n\n" + function(e, t) {
const n = e.split("\n")
, r = []
, i = Math.max(t - 6, 0)
, s = Math.min(t + 6, n.length);
for (let a = i; a < s; a++) {
const e = a + 1;
r.push("".concat(e === t ? ">" : " ", " ").concat(e, ": ").concat(n[a]))
}
return r.join("\n")
}(e.getShaderSource(t), r)
}
return i
}
function Rc(e, t) {
const n = function(e) {
const t = Li.getPrimaries(Li.workingColorSpace)
, n = Li.getPrimaries(e);
let r;
switch (t === n ? r = "" : t === Sr && n === wr ? r = "LinearDisplayP3ToLinearSRGB" : t === wr && n === Sr && (r = "LinearSRGBToLinearDisplayP3"),
e) {
case vr:
case xr:
return [r, "LinearTransferOETF"];
case gr:
case yr:
return [r, "sRGBTransferOETF"];
default:
return console.warn("THREE.WebGLProgram: Unsupported color space:", e),
[r, "LinearTransferOETF"]
}
}(t);
return "vec4 ".concat(e, "( vec4 value ) { return ").concat(n[0], "( ").concat(n[1], "( value ) ); }")
}
function Bc(e, t) {
let n;
switch (t) {
case bt:
n = "Linear";
break;
case _t:
n = "Reinhard";
break;
case wt:
n = "OptimizedCineon";
break;
case St:
n = "ACESFilmic";
break;
case Mt:
n = "AgX";
break;
case Ct:
n = "Neutral";
break;
case At:
n = "Custom";
break;
default:
console.warn("THREE.WebGLProgram: Unsupported toneMapping:", t),
n = "Linear"
}
return "vec3 " + e + "( vec3 color ) { return " + n + "ToneMapping( color ); }"
}
function Pc(e) {
return "" !== e
}
function kc(e, t) {
const n = t.numSpotLightShadows + t.numSpotLightMaps - t.numSpotLightShadowsWithMaps;
return e.replace(/NUM_DIR_LIGHTS/g, t.numDirLights).replace(/NUM_SPOT_LIGHTS/g, t.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g, t.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g, n).replace(/NUM_RECT_AREA_LIGHTS/g, t.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g, t.numPointLights).replace(/NUM_HEMI_LIGHTS/g, t.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g, t.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g, t.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g, t.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g, t.numPointLightShadows)
}
function Lc(e, t) {
return e.replace(/NUM_CLIPPING_PLANES/g, t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g, t.numClippingPlanes - t.numClipIntersection)
}
const Ic = /^[ \t]*#include +<([\w\d./]+)>/gm;
function Nc(e) {
return e.replace(Ic, jc)
}
const Dc = new Map;
function jc(e, t) {
let n = jo[t];
if (void 0 === n) {
const e = Dc.get(t);
if (void 0 === e)
throw new Error("Can not resolve #include <" + t + ">");
n = jo[e],
console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.', t, e)
}
return Nc(n)
}
const Fc = /#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;
function Oc(e) {
return e.replace(Fc, Uc)
}
function Uc(e, t, n, r) {
let i = "";
for (let s = parseInt(t); s < parseInt(n); s++)
i += r.replace(/\[\s*i\s*\]/g, "[ " + s + " ]").replace(/UNROLLED_LOOP_INDEX/g, s);
return i
}
function zc(e) {
let t = "precision ".concat(e.precision, " float;\n\tprecision ").concat(e.precision, " int;\n\tprecision ").concat(e.precision, " sampler2D;\n\tprecision ").concat(e.precision, " samplerCube;\n\tprecision ").concat(e.precision, " sampler3D;\n\tprecision ").concat(e.precision, " sampler2DArray;\n\tprecision ").concat(e.precision, " sampler2DShadow;\n\tprecision ").concat(e.precision, " samplerCubeShadow;\n\tprecision ").concat(e.precision, " sampler2DArrayShadow;\n\tprecision ").concat(e.precision, " isampler2D;\n\tprecision ").concat(e.precision, " isampler3D;\n\tprecision ").concat(e.precision, " isamplerCube;\n\tprecision ").concat(e.precision, " isampler2DArray;\n\tprecision ").concat(e.precision, " usampler2D;\n\tprecision ").concat(e.precision, " usampler3D;\n\tprecision ").concat(e.precision, " usamplerCube;\n\tprecision ").concat(e.precision, " usampler2DArray;\n\t");
return "highp" === e.precision ? t += "\n#define HIGH_PRECISION" : "mediump" === e.precision ? t += "\n#define MEDIUM_PRECISION" : "lowp" === e.precision && (t += "\n#define LOW_PRECISION"),
t
}
function Gc(e, t, n, r) {
const i = e.getContext()
, s = n.defines;
let a = n.vertexShader
, o = n.fragmentShader;
const l = function(e) {
let t = "SHADOWMAP_TYPE_BASIC";
return e.shadowMapType === Be ? t = "SHADOWMAP_TYPE_PCF" : e.shadowMapType === Pe ? t = "SHADOWMAP_TYPE_PCF_SOFT" : e.shadowMapType === ke && (t = "SHADOWMAP_TYPE_VSM"),
t
}(n)
, c = function(e) {
let t = "ENVMAP_TYPE_CUBE";
if (e.envMap)
switch (e.envMapMode) {
case Bt:
case Pt:
t = "ENVMAP_TYPE_CUBE";
break;
case It:
t = "ENVMAP_TYPE_CUBE_UV"
}
return t
}(n)
, u = function(e) {
let t = "ENVMAP_MODE_REFLECTION";
e.envMap && e.envMapMode === Pt && (t = "ENVMAP_MODE_REFRACTION");
return t
}(n)
, d = function(e) {
let t = "ENVMAP_BLENDING_NONE";
if (e.envMap)
switch (e.combine) {
case gt:
t = "ENVMAP_BLENDING_MULTIPLY";
break;
case vt:
t = "ENVMAP_BLENDING_MIX";
break;
case yt:
t = "ENVMAP_BLENDING_ADD"
}
return t
}(n)
, h = function(e) {
const t = e.envMapCubeUVHeight;
if (null === t)
return null;
const n = Math.log2(t) - 2
, r = 1 / t;
return {
texelWidth: 1 / (3 * Math.max(Math.pow(2, n), 112)),
texelHeight: r,
maxMip: n
}
}(n)
, p = function(e) {
return [e.extensionClipCullDistance ? "#extension GL_ANGLE_clip_cull_distance : require" : "", e.extensionMultiDraw ? "#extension GL_ANGLE_multi_draw : require" : ""].filter(Pc).join("\n")
}(n)
, f = function(e) {
const t = [];
for (const n in e) {
const r = e[n];
!1 !== r && t.push("#define " + n + " " + r)
}
return t.join("\n")
}(s)
, m = i.createProgram();
let g, v, y = n.glslVersion ? "#version " + n.glslVersion + "\n" : "";
n.isRawShaderMaterial ? (g = ["#define SHADER_TYPE " + n.shaderType, "#define SHADER_NAME " + n.shaderName, f].filter(Pc).join("\n"),
g.length > 0 && (g += "\n"),
v = ["#define SHADER_TYPE " + n.shaderType, "#define SHADER_NAME " + n.shaderName, f].filter(Pc).join("\n"),
v.length > 0 && (v += "\n")) : (g = [zc(n), "#define SHADER_TYPE " + n.shaderType, "#define SHADER_NAME " + n.shaderName, f, n.extensionClipCullDistance ? "#define USE_CLIP_DISTANCE" : "", n.batching ? "#define USE_BATCHING" : "", n.batchingColor ? "#define USE_BATCHING_COLOR" : "", n.instancing ? "#define USE_INSTANCING" : "", n.instancingColor ? "#define USE_INSTANCING_COLOR" : "", n.instancingMorph ? "#define USE_INSTANCING_MORPH" : "", n.useFog && n.fog ? "#define USE_FOG" : "", n.useFog && n.fogExp2 ? "#define FOG_EXP2" : "", n.map ? "#define USE_MAP" : "", n.envMap ? "#define USE_ENVMAP" : "", n.envMap ? "#define " + u : "", n.lightMap ? "#define USE_LIGHTMAP" : "", n.aoMap ? "#define USE_AOMAP" : "", n.bumpMap ? "#define USE_BUMPMAP" : "", n.normalMap ? "#define USE_NORMALMAP" : "", n.normalMapObjectSpace ? "#define USE_NORMALMAP_OBJECTSPACE" : "", n.normalMapTangentSpace ? "#define USE_NORMALMAP_TANGENTSPACE" : "", n.displacementMap ? "#define USE_DISPLACEMENTMAP" : "", n.emissiveMap ? "#define USE_EMISSIVEMAP" : "", n.anisotropy ? "#define USE_ANISOTROPY" : "", n.anisotropyMap ? "#define USE_ANISOTROPYMAP" : "", n.clearcoatMap ? "#define USE_CLEARCOATMAP" : "", n.clearcoatRoughnessMap ? "#define USE_CLEARCOAT_ROUGHNESSMAP" : "", n.clearcoatNormalMap ? "#define USE_CLEARCOAT_NORMALMAP" : "", n.iridescenceMap ? "#define USE_IRIDESCENCEMAP" : "", n.iridescenceThicknessMap ? "#define USE_IRIDESCENCE_THICKNESSMAP" : "", n.specularMap ? "#define USE_SPECULARMAP" : "", n.specularColorMap ? "#define USE_SPECULAR_COLORMAP" : "", n.specularIntensityMap ? "#define USE_SPECULAR_INTENSITYMAP" : "", n.roughnessMap ? "#define USE_ROUGHNESSMAP" : "", n.metalnessMap ? "#define USE_METALNESSMAP" : "", n.alphaMap ? "#define USE_ALPHAMAP" : "", n.alphaHash ? "#define USE_ALPHAHASH" : "", n.transmission ? "#define USE_TRANSMISSION" : "", n.transmissionMap ? "#define USE_TRANSMISSIONMAP" : "", n.thicknessMap ? "#define USE_THICKNESSMAP" : "", n.sheenColorMap ? "#define USE_SHEEN_COLORMAP" : "", n.sheenRoughnessMap ? "#define USE_SHEEN_ROUGHNESSMAP" : "", n.mapUv ? "#define MAP_UV " + n.mapUv : "", n.alphaMapUv ? "#define ALPHAMAP_UV " + n.alphaMapUv : "", n.lightMapUv ? "#define LIGHTMAP_UV " + n.lightMapUv : "", n.aoMapUv ? "#define AOMAP_UV " + n.aoMapUv : "", n.emissiveMapUv ? "#define EMISSIVEMAP_UV " + n.emissiveMapUv : "", n.bumpMapUv ? "#define BUMPMAP_UV " + n.bumpMapUv : "", n.normalMapUv ? "#define NORMALMAP_UV " + n.normalMapUv : "", n.displacementMapUv ? "#define DISPLACEMENTMAP_UV " + n.displacementMapUv : "", n.metalnessMapUv ? "#define METALNESSMAP_UV " + n.metalnessMapUv : "", n.roughnessMapUv ? "#define ROUGHNESSMAP_UV " + n.roughnessMapUv : "", n.anisotropyMapUv ? "#define ANISOTROPYMAP_UV " + n.anisotropyMapUv : "", n.clearcoatMapUv ? "#define CLEARCOATMAP_UV " + n.clearcoatMapUv : "", n.clearcoatNormalMapUv ? "#define CLEARCOAT_NORMALMAP_UV " + n.clearcoatNormalMapUv : "", n.clearcoatRoughnessMapUv ? "#define CLEARCOAT_ROUGHNESSMAP_UV " + n.clearcoatRoughnessMapUv : "", n.iridescenceMapUv ? "#define IRIDESCENCEMAP_UV " + n.iridescenceMapUv : "", n.iridescenceThicknessMapUv ? "#define IRIDESCENCE_THICKNESSMAP_UV " + n.iridescenceThicknessMapUv : "", n.sheenColorMapUv ? "#define SHEEN_COLORMAP_UV " + n.sheenColorMapUv : "", n.sheenRoughnessMapUv ? "#define SHEEN_ROUGHNESSMAP_UV " + n.sheenRoughnessMapUv : "", n.specularMapUv ? "#define SPECULARMAP_UV " + n.specularMapUv : "", n.specularColorMapUv ? "#define SPECULAR_COLORMAP_UV " + n.specularColorMapUv : "", n.specularIntensityMapUv ? "#define SPECULAR_INTENSITYMAP_UV " + n.specularIntensityMapUv : "", n.transmissionMapUv ? "#define TRANSMISSIONMAP_UV " + n.transmissionMapUv : "", n.thicknessMapUv ? "#define THICKNESSMAP_UV " + n.thicknessMapUv : "", n.vertexTangents && !1 === n.flatShading ? "#define USE_TANGENT" : "", n.vertexColors ? "#define USE_COLOR" : "", n.vertexAlphas ? "#define USE_COLOR_ALPHA" : "", n.vertexUv1s ? "#define USE_UV1" : "", n.vertexUv2s ? "#define USE_UV2" : "", n.vertexUv3s ? "#define USE_UV3" : "", n.pointsUvs ? "#define USE_POINTS_UV" : "", n.flatShading ? "#define FLAT_SHADED" : "", n.skinning ? "#define USE_SKINNING" : "", n.morphTargets ? "#define USE_MORPHTARGETS" : "", n.morphNormals && !1 === n.flatShading ? "#define USE_MORPHNORMALS" : "", n.morphColors ? "#define USE_MORPHCOLORS" : "", n.morphTargetsCount > 0 ? "#define MORPHTARGETS_TEXTURE_STRIDE " + n.morphTextureStride : "", n.morphTargetsCount > 0 ? "#define MORPHTARGETS_COUNT " + n.morphTargetsCount : "", n.doubleSided ? "#define DOUBLE_SIDED" : "", n.flipSided ? "#define FLIP_SIDED" : "", n.shadowMapEnabled ? "#define USE_SHADOWMAP" : "", n.shadowMapEnabled ? "#define " + l : "", n.sizeAttenuation ? "#define USE_SIZEATTENUATION" : "", n.numLightProbes > 0 ? "#define USE_LIGHT_PROBES" : "", n.logarithmicDepthBuffer ? "#define USE_LOGDEPTHBUF" : "", "uniform mat4 modelMatrix;", "uniform mat4 modelViewMatrix;", "uniform mat4 projectionMatrix;", "uniform mat4 viewMatrix;", "uniform mat3 normalMatrix;", "uniform vec3 cameraPosition;", "uniform bool isOrthographic;", "#ifdef USE_INSTANCING", "\tattribute mat4 instanceMatrix;", "#endif", "#ifdef USE_INSTANCING_COLOR", "\tattribute vec3 instanceColor;", "#endif", "#ifdef USE_INSTANCING_MORPH", "\tuniform sampler2D morphTexture;", "#endif", "attribute vec3 position;", "attribute vec3 normal;", "attribute vec2 uv;", "#ifdef USE_UV1", "\tattribute vec2 uv1;", "#endif", "#ifdef USE_UV2", "\tattribute vec2 uv2;", "#endif", "#ifdef USE_UV3", "\tattribute vec2 uv3;", "#endif", "#ifdef USE_TANGENT", "\tattribute vec4 tangent;", "#endif", "#if defined( USE_COLOR_ALPHA )", "\tattribute vec4 color;", "#elif defined( USE_COLOR )", "\tattribute vec3 color;", "#endif", "#ifdef USE_SKINNING", "\tattribute vec4 skinIndex;", "\tattribute vec4 skinWeight;", "#endif", "\n"].filter(Pc).join("\n"),
v = [zc(n), "#define SHADER_TYPE " + n.shaderType, "#define SHADER_NAME " + n.shaderName, f, n.useFog && n.fog ? "#define USE_FOG" : "", n.useFog && n.fogExp2 ? "#define FOG_EXP2" : "", n.alphaToCoverage ? "#define ALPHA_TO_COVERAGE" : "", n.map ? "#define USE_MAP" : "", n.matcap ? "#define USE_MATCAP" : "", n.envMap ? "#define USE_ENVMAP" : "", n.envMap ? "#define " + c : "", n.envMap ? "#define " + u : "", n.envMap ? "#define " + d : "", h ? "#define CUBEUV_TEXEL_WIDTH " + h.texelWidth : "", h ? "#define CUBEUV_TEXEL_HEIGHT " + h.texelHeight : "", h ? "#define CUBEUV_MAX_MIP " + h.maxMip + ".0" : "", n.lightMap ? "#define USE_LIGHTMAP" : "", n.aoMap ? "#define USE_AOMAP" : "", n.bumpMap ? "#define USE_BUMPMAP" : "", n.normalMap ? "#define USE_NORMALMAP" : "", n.normalMapObjectSpace ? "#define USE_NORMALMAP_OBJECTSPACE" : "", n.normalMapTangentSpace ? "#define USE_NORMALMAP_TANGENTSPACE" : "", n.emissiveMap ? "#define USE_EMISSIVEMAP" : "", n.anisotropy ? "#define USE_ANISOTROPY" : "", n.anisotropyMap ? "#define USE_ANISOTROPYMAP" : "", n.clearcoat ? "#define USE_CLEARCOAT" : "", n.clearcoatMap ? "#define USE_CLEARCOATMAP" : "", n.clearcoatRoughnessMap ? "#define USE_CLEARCOAT_ROUGHNESSMAP" : "", n.clearcoatNormalMap ? "#define USE_CLEARCOAT_NORMALMAP" : "", n.dispersion ? "#define USE_DISPERSION" : "", n.iridescence ? "#define USE_IRIDESCENCE" : "", n.iridescenceMap ? "#define USE_IRIDESCENCEMAP" : "", n.iridescenceThicknessMap ? "#define USE_IRIDESCENCE_THICKNESSMAP" : "", n.specularMap ? "#define USE_SPECULARMAP" : "", n.specularColorMap ? "#define USE_SPECULAR_COLORMAP" : "", n.specularIntensityMap ? "#define USE_SPECULAR_INTENSITYMAP" : "", n.roughnessMap ? "#define USE_ROUGHNESSMAP" : "", n.metalnessMap ? "#define USE_METALNESSMAP" : "", n.alphaMap ? "#define USE_ALPHAMAP" : "", n.alphaTest ? "#define USE_ALPHATEST" : "", n.alphaHash ? "#define USE_ALPHAHASH" : "", n.sheen ? "#define USE_SHEEN" : "", n.sheenColorMap ? "#define USE_SHEEN_COLORMAP" : "", n.sheenRoughnessMap ? "#define USE_SHEEN_ROUGHNESSMAP" : "", n.transmission ? "#define USE_TRANSMISSION" : "", n.transmissionMap ? "#define USE_TRANSMISSIONMAP" : "", n.thicknessMap ? "#define USE_THICKNESSMAP" : "", n.vertexTangents && !1 === n.flatShading ? "#define USE_TANGENT" : "", n.vertexColors || n.instancingColor || n.batchingColor ? "#define USE_COLOR" : "", n.vertexAlphas ? "#define USE_COLOR_ALPHA" : "", n.vertexUv1s ? "#define USE_UV1" : "", n.vertexUv2s ? "#define USE_UV2" : "", n.vertexUv3s ? "#define USE_UV3" : "", n.pointsUvs ? "#define USE_POINTS_UV" : "", n.gradientMap ? "#define USE_GRADIENTMAP" : "", n.flatShading ? "#define FLAT_SHADED" : "", n.doubleSided ? "#define DOUBLE_SIDED" : "", n.flipSided ? "#define FLIP_SIDED" : "", n.shadowMapEnabled ? "#define USE_SHADOWMAP" : "", n.shadowMapEnabled ? "#define " + l : "", n.premultipliedAlpha ? "#define PREMULTIPLIED_ALPHA" : "", n.numLightProbes > 0 ? "#define USE_LIGHT_PROBES" : "", n.decodeVideoTexture ? "#define DECODE_VIDEO_TEXTURE" : "", n.logarithmicDepthBuffer ? "#define USE_LOGDEPTHBUF" : "", "uniform mat4 viewMatrix;", "uniform vec3 cameraPosition;", "uniform bool isOrthographic;", n.toneMapping !== xt ? "#define TONE_MAPPING" : "", n.toneMapping !== xt ? jo.tonemapping_pars_fragment : "", n.toneMapping !== xt ? Bc("toneMapping", n.toneMapping) : "", n.dithering ? "#define DITHERING" : "", n.opaque ? "#define OPAQUE" : "", jo.colorspace_pars_fragment, Rc("linearToOutputTexel", n.outputColorSpace), n.useDepthPacking ? "#define DEPTH_PACKING " + n.depthPacking : "", "\n"].filter(Pc).join("\n")),
a = Nc(a),
a = kc(a, n),
a = Lc(a, n),
o = Nc(o),
o = kc(o, n),
o = Lc(o, n),
a = Oc(a),
o = Oc(o),
!0 !== n.isRawShaderMaterial && (y = "#version 300 es\n",
g = [p, "#define attribute in", "#define varying out", "#define texture2D texture"].join("\n") + "\n" + g,
v = ["#define varying in", n.glslVersion === ii ? "" : "layout(location = 0) out highp vec4 pc_fragColor;", n.glslVersion === ii ? "" : "#define gl_FragColor pc_fragColor", "#define gl_FragDepthEXT gl_FragDepth", "#define texture2D texture", "#define textureCube texture", "#define texture2DProj textureProj", "#define texture2DLodEXT textureLod", "#define texture2DProjLodEXT textureProjLod", "#define textureCubeLodEXT textureLod", "#define texture2DGradEXT textureGrad", "#define texture2DProjGradEXT textureProjGrad", "#define textureCubeGradEXT textureGrad"].join("\n") + "\n" + v);
const x = y + g + a
, b = y + v + o
, _ = Mc(i, i.VERTEX_SHADER, x)
, w = Mc(i, i.FRAGMENT_SHADER, b);
function S(t) {
if (e.debug.checkShaderErrors) {
const n = i.getProgramInfoLog(m).trim()
, r = i.getShaderInfoLog(_).trim()
, s = i.getShaderInfoLog(w).trim();
let a = !0
, o = !0;
if (!1 === i.getProgramParameter(m, i.LINK_STATUS))
if (a = !1,
"function" === typeof e.debug.onShaderError)
e.debug.onShaderError(i, m, _, w);
else {
const e = Tc(i, _, "vertex")
, r = Tc(i, w, "fragment");
console.error("THREE.WebGLProgram: Shader Error " + i.getError() + " - VALIDATE_STATUS " + i.getProgramParameter(m, i.VALIDATE_STATUS) + "\n\nMaterial Name: " + t.name + "\nMaterial Type: " + t.type + "\n\nProgram Info Log: " + n + "\n" + e + "\n" + r)
}
else
"" !== n ? console.warn("THREE.WebGLProgram: Program Info Log:", n) : "" !== r && "" !== s || (o = !1);
o && (t.diagnostics = {
runnable: a,
programLog: n,
vertexShader: {
log: r,
prefix: g
},
fragmentShader: {
log: s,
prefix: v
}
})
}
i.deleteShader(_),
i.deleteShader(w),
A = new Ac(i,m),
M = function(e, t) {
const n = {}
, r = e.getProgramParameter(t, e.ACTIVE_ATTRIBUTES);
for (let i = 0; i < r; i++) {
const r = e.getActiveAttrib(t, i)
, s = r.name;
let a = 1;
r.type === e.FLOAT_MAT2 && (a = 2),
r.type === e.FLOAT_MAT3 && (a = 3),
r.type === e.FLOAT_MAT4 && (a = 4),
n[s] = {
type: r.type,
location: e.getAttribLocation(t, s),
locationSize: a
}
}
return n
}(i, m)
}
let A, M;
i.attachShader(m, _),
i.attachShader(m, w),
void 0 !== n.index0AttributeName ? i.bindAttribLocation(m, 0, n.index0AttributeName) : !0 === n.morphTargets && i.bindAttribLocation(m, 0, "position"),
i.linkProgram(m),
this.getUniforms = function() {
return void 0 === A && S(this),
A
}
,
this.getAttributes = function() {
return void 0 === M && S(this),
M
}
;
let C = !1 === n.rendererExtensionParallelShaderCompile;
return this.isReady = function() {
return !1 === C && (C = i.getProgramParameter(m, Cc)),
C
}
,
this.destroy = function() {
r.releaseStatesOfProgram(this),
i.deleteProgram(m),
this.program = void 0
}
,
this.type = n.shaderType,
this.name = n.shaderName,
this.id = Ec++,
this.cacheKey = t,
this.usedTimes = 1,
this.program = m,
this.vertexShader = _,
this.fragmentShader = w,
this
}
let Hc = 0;
class Vc {
constructor() {
this.shaderCache = new Map,
this.materialCache = new Map
}
update(e) {
const t = e.vertexShader
, n = e.fragmentShader
, r = this._getShaderStage(t)
, i = this._getShaderStage(n)
, s = this._getShaderCacheForMaterial(e);
return !1 === s.has(r) && (s.add(r),
r.usedTimes++),
!1 === s.has(i) && (s.add(i),
i.usedTimes++),
this
}
remove(e) {
const t = this.materialCache.get(e);
for (const n of t)
n.usedTimes--,
0 === n.usedTimes && this.shaderCache.delete(n.code);
return this.materialCache.delete(e),
this
}
getVertexShaderID(e) {
return this._getShaderStage(e.vertexShader).id
}
getFragmentShaderID(e) {
return this._getShaderStage(e.fragmentShader).id
}
dispose() {
this.shaderCache.clear(),
this.materialCache.clear()
}
_getShaderCacheForMaterial(e) {
const t = this.materialCache;
let n = t.get(e);
return void 0 === n && (n = new Set,
t.set(e, n)),
n
}
_getShaderStage(e) {
const t = this.shaderCache;
let n = t.get(e);
return void 0 === n && (n = new Wc(e),
t.set(e, n)),
n
}
}
class Wc {
constructor(e) {
this.id = Hc++,
this.code = e,
this.usedTimes = 0
}
}
function Jc(e, t, n, r, i, s, a) {
const o = new Fs
, l = new Vc
, c = new Set
, u = []
, d = i.logarithmicDepthBuffer
, h = i.vertexTextures;
let p = i.precision;
const f = {
MeshDepthMaterial: "depth",
MeshDistanceMaterial: "distanceRGBA",
MeshNormalMaterial: "normal",
MeshBasicMaterial: "basic",
MeshLambertMaterial: "lambert",
MeshPhongMaterial: "phong",
MeshToonMaterial: "toon",
MeshStandardMaterial: "physical",
MeshPhysicalMaterial: "physical",
MeshMatcapMaterial: "matcap",
LineBasicMaterial: "basic",
LineDashedMaterial: "dashed",
PointsMaterial: "points",
ShadowMaterial: "shadow",
SpriteMaterial: "sprite"
};
function m(e) {
return c.add(e),
0 === e ? "uv" : "uv".concat(e)
}
return {
getParameters: function(s, o, u, g, v) {
const y = g.fog
, x = v.geometry
, b = s.isMeshStandardMaterial ? g.environment : null
, _ = (s.isMeshStandardMaterial ? n : t).get(s.envMap || b)
, w = _ && _.mapping === It ? _.image.height : null
, S = f[s.type];
null !== s.precision && (p = i.getMaxPrecision(s.precision),
p !== s.precision && console.warn("THREE.WebGLProgram.getParameters:", s.precision, "not supported, using", p, "instead."));
const A = x.morphAttributes.position || x.morphAttributes.normal || x.morphAttributes.color
, M = void 0 !== A ? A.length : 0;
let C, E, T, R, B = 0;
if (void 0 !== x.morphAttributes.position && (B = 1),
void 0 !== x.morphAttributes.normal && (B = 2),
void 0 !== x.morphAttributes.color && (B = 3),
S) {
const e = Oo[S];
C = e.vertexShader,
E = e.fragmentShader
} else
C = s.vertexShader,
E = s.fragmentShader,
l.update(s),
T = l.getVertexShaderID(s),
R = l.getFragmentShaderID(s);
const P = e.getRenderTarget()
, k = !0 === v.isInstancedMesh
, L = !0 === v.isBatchedMesh
, I = !!s.map
, N = !!s.matcap
, D = !!_
, j = !!s.aoMap
, F = !!s.lightMap
, O = !!s.bumpMap
, U = !!s.normalMap
, z = !!s.displacementMap
, G = !!s.emissiveMap
, H = !!s.metalnessMap
, V = !!s.roughnessMap
, W = s.anisotropy > 0
, J = s.clearcoat > 0
, X = s.dispersion > 0
, K = s.iridescence > 0
, q = s.sheen > 0
, Y = s.transmission > 0
, Q = W && !!s.anisotropyMap
, Z = J && !!s.clearcoatMap
, $ = J && !!s.clearcoatNormalMap
, ee = J && !!s.clearcoatRoughnessMap
, te = K && !!s.iridescenceMap
, ne = K && !!s.iridescenceThicknessMap
, re = q && !!s.sheenColorMap
, ie = q && !!s.sheenRoughnessMap
, se = !!s.specularMap
, ae = !!s.specularColorMap
, oe = !!s.specularIntensityMap
, le = Y && !!s.transmissionMap
, ce = Y && !!s.thicknessMap
, ue = !!s.gradientMap
, de = !!s.alphaMap
, he = s.alphaTest > 0
, pe = !!s.alphaHash
, fe = !!s.extensions;
let me = xt;
s.toneMapped && (null !== P && !0 !== P.isXRRenderTarget || (me = e.toneMapping));
const ge = {
shaderID: S,
shaderType: s.type,
shaderName: s.name,
vertexShader: C,
fragmentShader: E,
defines: s.defines,
customVertexShaderID: T,
customFragmentShaderID: R,
isRawShaderMaterial: !0 === s.isRawShaderMaterial,
glslVersion: s.glslVersion,
precision: p,
batching: L,
batchingColor: L && null !== v._colorsTexture,
instancing: k,
instancingColor: k && null !== v.instanceColor,
instancingMorph: k && null !== v.morphTexture,
supportsVertexTextures: h,
outputColorSpace: null === P ? e.outputColorSpace : !0 === P.isXRRenderTarget ? P.texture.colorSpace : vr,
alphaToCoverage: !!s.alphaToCoverage,
map: I,
matcap: N,
envMap: D,
envMapMode: D && _.mapping,
envMapCubeUVHeight: w,
aoMap: j,
lightMap: F,
bumpMap: O,
normalMap: U,
displacementMap: h && z,
emissiveMap: G,
normalMapObjectSpace: U && s.normalMapType === fr,
normalMapTangentSpace: U && s.normalMapType === pr,
metalnessMap: H,
roughnessMap: V,
anisotropy: W,
anisotropyMap: Q,
clearcoat: J,
clearcoatMap: Z,
clearcoatNormalMap: $,
clearcoatRoughnessMap: ee,
dispersion: X,
iridescence: K,
iridescenceMap: te,
iridescenceThicknessMap: ne,
sheen: q,
sheenColorMap: re,
sheenRoughnessMap: ie,
specularMap: se,
specularColorMap: ae,
specularIntensityMap: oe,
transmission: Y,
transmissionMap: le,
thicknessMap: ce,
gradientMap: ue,
opaque: !1 === s.transparent && s.blending === je && !1 === s.alphaToCoverage,
alphaMap: de,
alphaTest: he,
alphaHash: pe,
combine: s.combine,
mapUv: I && m(s.map.channel),
aoMapUv: j && m(s.aoMap.channel),
lightMapUv: F && m(s.lightMap.channel),
bumpMapUv: O && m(s.bumpMap.channel),
normalMapUv: U && m(s.normalMap.channel),
displacementMapUv: z && m(s.displacementMap.channel),
emissiveMapUv: G && m(s.emissiveMap.channel),
metalnessMapUv: H && m(s.metalnessMap.channel),
roughnessMapUv: V && m(s.roughnessMap.channel),
anisotropyMapUv: Q && m(s.anisotropyMap.channel),
clearcoatMapUv: Z && m(s.clearcoatMap.channel),
clearcoatNormalMapUv: $ && m(s.clearcoatNormalMap.channel),
clearcoatRoughnessMapUv: ee && m(s.clearcoatRoughnessMap.channel),
iridescenceMapUv: te && m(s.iridescenceMap.channel),
iridescenceThicknessMapUv: ne && m(s.iridescenceThicknessMap.channel),
sheenColorMapUv: re && m(s.sheenColorMap.channel),
sheenRoughnessMapUv: ie && m(s.sheenRoughnessMap.channel),
specularMapUv: se && m(s.specularMap.channel),
specularColorMapUv: ae && m(s.specularColorMap.channel),
specularIntensityMapUv: oe && m(s.specularIntensityMap.channel),
transmissionMapUv: le && m(s.transmissionMap.channel),
thicknessMapUv: ce && m(s.thicknessMap.channel),
alphaMapUv: de && m(s.alphaMap.channel),
vertexTangents: !!x.attributes.tangent && (U || W),
vertexColors: s.vertexColors,
vertexAlphas: !0 === s.vertexColors && !!x.attributes.color && 4 === x.attributes.color.itemSize,
pointsUvs: !0 === v.isPoints && !!x.attributes.uv && (I || de),
fog: !!y,
useFog: !0 === s.fog,
fogExp2: !!y && y.isFogExp2,
flatShading: !0 === s.flatShading,
sizeAttenuation: !0 === s.sizeAttenuation,
logarithmicDepthBuffer: d,
skinning: !0 === v.isSkinnedMesh,
morphTargets: void 0 !== x.morphAttributes.position,
morphNormals: void 0 !== x.morphAttributes.normal,
morphColors: void 0 !== x.morphAttributes.color,
morphTargetsCount: M,
morphTextureStride: B,
numDirLights: o.directional.length,
numPointLights: o.point.length,
numSpotLights: o.spot.length,
numSpotLightMaps: o.spotLightMap.length,
numRectAreaLights: o.rectArea.length,
numHemiLights: o.hemi.length,
numDirLightShadows: o.directionalShadowMap.length,
numPointLightShadows: o.pointShadowMap.length,
numSpotLightShadows: o.spotShadowMap.length,
numSpotLightShadowsWithMaps: o.numSpotLightShadowsWithMaps,
numLightProbes: o.numLightProbes,
numClippingPlanes: a.numPlanes,
numClipIntersection: a.numIntersection,
dithering: s.dithering,
shadowMapEnabled: e.shadowMap.enabled && u.length > 0,
shadowMapType: e.shadowMap.type,
toneMapping: me,
decodeVideoTexture: I && !0 === s.map.isVideoTexture && Li.getTransfer(s.map.colorSpace) === _r,
premultipliedAlpha: s.premultipliedAlpha,
doubleSided: s.side === Ne,
flipSided: s.side === Ie,
useDepthPacking: s.depthPacking >= 0,
depthPacking: s.depthPacking || 0,
index0AttributeName: s.index0AttributeName,
extensionClipCullDistance: fe && !0 === s.extensions.clipCullDistance && r.has("WEBGL_clip_cull_distance"),
extensionMultiDraw: fe && !0 === s.extensions.multiDraw && r.has("WEBGL_multi_draw"),
rendererExtensionParallelShaderCompile: r.has("KHR_parallel_shader_compile"),
customProgramCacheKey: s.customProgramCacheKey()
};
return ge.vertexUv1s = c.has(1),
ge.vertexUv2s = c.has(2),
ge.vertexUv3s = c.has(3),
c.clear(),
ge
},
getProgramCacheKey: function(t) {
const n = [];
if (t.shaderID ? n.push(t.shaderID) : (n.push(t.customVertexShaderID),
n.push(t.customFragmentShaderID)),
void 0 !== t.defines)
for (const e in t.defines)
n.push(e),
n.push(t.defines[e]);
return !1 === t.isRawShaderMaterial && (!function(e, t) {
e.push(t.precision),
e.push(t.outputColorSpace),
e.push(t.envMapMode),
e.push(t.envMapCubeUVHeight),
e.push(t.mapUv),
e.push(t.alphaMapUv),
e.push(t.lightMapUv),
e.push(t.aoMapUv),
e.push(t.bumpMapUv),
e.push(t.normalMapUv),
e.push(t.displacementMapUv),
e.push(t.emissiveMapUv),
e.push(t.metalnessMapUv),
e.push(t.roughnessMapUv),
e.push(t.anisotropyMapUv),
e.push(t.clearcoatMapUv),
e.push(t.clearcoatNormalMapUv),
e.push(t.clearcoatRoughnessMapUv),
e.push(t.iridescenceMapUv),
e.push(t.iridescenceThicknessMapUv),
e.push(t.sheenColorMapUv),
e.push(t.sheenRoughnessMapUv),
e.push(t.specularMapUv),
e.push(t.specularColorMapUv),
e.push(t.specularIntensityMapUv),
e.push(t.transmissionMapUv),
e.push(t.thicknessMapUv),
e.push(t.combine),
e.push(t.fogExp2),
e.push(t.sizeAttenuation),
e.push(t.morphTargetsCount),
e.push(t.morphAttributeCount),
e.push(t.numDirLights),
e.push(t.numPointLights),
e.push(t.numSpotLights),
e.push(t.numSpotLightMaps),
e.push(t.numHemiLights),
e.push(t.numRectAreaLights),
e.push(t.numDirLightShadows),
e.push(t.numPointLightShadows),
e.push(t.numSpotLightShadows),
e.push(t.numSpotLightShadowsWithMaps),
e.push(t.numLightProbes),
e.push(t.shadowMapType),
e.push(t.toneMapping),
e.push(t.numClippingPlanes),
e.push(t.numClipIntersection),
e.push(t.depthPacking)
}(n, t),
function(e, t) {
o.disableAll(),
t.supportsVertexTextures && o.enable(0);
t.instancing && o.enable(1);
t.instancingColor && o.enable(2);
t.instancingMorph && o.enable(3);
t.matcap && o.enable(4);
t.envMap && o.enable(5);
t.normalMapObjectSpace && o.enable(6);
t.normalMapTangentSpace && o.enable(7);
t.clearcoat && o.enable(8);
t.iridescence && o.enable(9);
t.alphaTest && o.enable(10);
t.vertexColors && o.enable(11);
t.vertexAlphas && o.enable(12);
t.vertexUv1s && o.enable(13);
t.vertexUv2s && o.enable(14);
t.vertexUv3s && o.enable(15);
t.vertexTangents && o.enable(16);
t.anisotropy && o.enable(17);
t.alphaHash && o.enable(18);
t.batching && o.enable(19);
t.dispersion && o.enable(20);
t.batchingColor && o.enable(21);
e.push(o.mask),
o.disableAll(),
t.fog && o.enable(0);
t.useFog && o.enable(1);
t.flatShading && o.enable(2);
t.logarithmicDepthBuffer && o.enable(3);
t.skinning && o.enable(4);
t.morphTargets && o.enable(5);
t.morphNormals && o.enable(6);
t.morphColors && o.enable(7);
t.premultipliedAlpha && o.enable(8);
t.shadowMapEnabled && o.enable(9);
t.doubleSided && o.enable(10);
t.flipSided && o.enable(11);
t.useDepthPacking && o.enable(12);
t.dithering && o.enable(13);
t.transmission && o.enable(14);
t.sheen && o.enable(15);
t.opaque && o.enable(16);
t.pointsUvs && o.enable(17);
t.decodeVideoTexture && o.enable(18);
t.alphaToCoverage && o.enable(19);
e.push(o.mask)
}(n, t),
n.push(e.outputColorSpace)),
n.push(t.customProgramCacheKey),
n.join()
},
getUniforms: function(e) {
const t = f[e.type];
let n;
if (t) {
const e = Oo[t];
n = go.clone(e.uniforms)
} else
n = e.uniforms;
return n
},
acquireProgram: function(t, n) {
let r;
for (let e = 0, i = u.length; e < i; e++) {
const t = u[e];
if (t.cacheKey === n) {
r = t,
++r.usedTimes;
break
}
}
return void 0 === r && (r = new Gc(e,n,t,s),
u.push(r)),
r
},
releaseProgram: function(e) {
if (0 === --e.usedTimes) {
const t = u.indexOf(e);
u[t] = u[u.length - 1],
u.pop(),
e.destroy()
}
},
releaseShaderCache: function(e) {
l.remove(e)
},
programs: u,
dispose: function() {
l.dispose()
}
}
}
function Xc() {
let e = new WeakMap;
return {
get: function(t) {
let n = e.get(t);
return void 0 === n && (n = {},
e.set(t, n)),
n
},
remove: function(t) {
e.delete(t)
},
update: function(t, n, r) {
e.get(t)[n] = r
},
dispose: function() {
e = new WeakMap
}
}
}
function Kc(e, t) {
return e.groupOrder !== t.groupOrder ? e.groupOrder - t.groupOrder : e.renderOrder !== t.renderOrder ? e.renderOrder - t.renderOrder : e.material.id !== t.material.id ? e.material.id - t.material.id : e.z !== t.z ? e.z - t.z : e.id - t.id
}
function qc(e, t) {
return e.groupOrder !== t.groupOrder ? e.groupOrder - t.groupOrder : e.renderOrder !== t.renderOrder ? e.renderOrder - t.renderOrder : e.z !== t.z ? t.z - e.z : e.id - t.id
}
function Yc() {
const e = [];
let t = 0;
const n = []
, r = []
, i = [];
function s(n, r, i, s, a, o) {
let l = e[t];
return void 0 === l ? (l = {
id: n.id,
object: n,
geometry: r,
material: i,
groupOrder: s,
renderOrder: n.renderOrder,
z: a,
group: o
},
e[t] = l) : (l.id = n.id,
l.object = n,
l.geometry = r,
l.material = i,
l.groupOrder = s,
l.renderOrder = n.renderOrder,
l.z = a,
l.group = o),
t++,
l
}
return {
opaque: n,
transmissive: r,
transparent: i,
init: function() {
t = 0,
n.length = 0,
r.length = 0,
i.length = 0
},
push: function(e, t, a, o, l, c) {
const u = s(e, t, a, o, l, c);
a.transmission > 0 ? r.push(u) : !0 === a.transparent ? i.push(u) : n.push(u)
},
unshift: function(e, t, a, o, l, c) {
const u = s(e, t, a, o, l, c);
a.transmission > 0 ? r.unshift(u) : !0 === a.transparent ? i.unshift(u) : n.unshift(u)
},
finish: function() {
for (let n = t, r = e.length; n < r; n++) {
const t = e[n];
if (null === t.id)
break;
t.id = null,
t.object = null,
t.geometry = null,
t.material = null,
t.group = null
}
},
sort: function(e, t) {
n.length > 1 && n.sort(e || Kc),
r.length > 1 && r.sort(t || qc),
i.length > 1 && i.sort(t || qc)
}
}
}
function Qc() {
let e = new WeakMap;
return {
get: function(t, n) {
const r = e.get(t);
let i;
return void 0 === r ? (i = new Yc,
e.set(t, [i])) : n >= r.length ? (i = new Yc,
r.push(i)) : i = r[n],
i
},
dispose: function() {
e = new WeakMap
}
}
}
function Zc() {
const e = {};
return {
get: function(t) {
if (void 0 !== e[t.id])
return e[t.id];
let n;
switch (t.type) {
case "DirectionalLight":
n = {
direction: new Qi,
color: new ga
};
break;
case "SpotLight":
n = {
position: new Qi,
direction: new Qi,
color: new ga,
distance: 0,
coneCos: 0,
penumbraCos: 0,
decay: 0
};
break;
case "PointLight":
n = {
position: new Qi,
color: new ga,
distance: 0,
decay: 0
};
break;
case "HemisphereLight":
n = {
direction: new Qi,
skyColor: new ga,
groundColor: new ga
};
break;
case "RectAreaLight":
n = {
color: new ga,
position: new Qi,
halfWidth: new Qi,
halfHeight: new Qi
}
}
return e[t.id] = n,
n
}
}
}
let $c = 0;
function eu(e, t) {
return (t.castShadow ? 2 : 0) - (e.castShadow ? 2 : 0) + (t.map ? 1 : 0) - (e.map ? 1 : 0)
}
function tu(e) {
const t = new Zc
, n = function() {
const e = {};
return {
get: function(t) {
if (void 0 !== e[t.id])
return e[t.id];
let n;
switch (t.type) {
case "DirectionalLight":
case "SpotLight":
n = {
shadowBias: 0,
shadowNormalBias: 0,
shadowRadius: 1,
shadowMapSize: new xi
};
break;
case "PointLight":
n = {
shadowBias: 0,
shadowNormalBias: 0,
shadowRadius: 1,
shadowMapSize: new xi,
shadowCameraNear: 1,
shadowCameraFar: 1e3
}
}
return e[t.id] = n,
n
}
}
}()
, r = {
version: 0,
hash: {
directionalLength: -1,
pointLength: -1,
spotLength: -1,
rectAreaLength: -1,
hemiLength: -1,
numDirectionalShadows: -1,
numPointShadows: -1,
numSpotShadows: -1,
numSpotMaps: -1,
numLightProbes: -1
},
ambient: [0, 0, 0],
probe: [],
directional: [],
directionalShadow: [],
directionalShadowMap: [],
directionalShadowMatrix: [],
spot: [],
spotLightMap: [],
spotShadow: [],
spotShadowMap: [],
spotLightMatrix: [],
rectArea: [],
rectAreaLTC1: null,
rectAreaLTC2: null,
point: [],
pointShadow: [],
pointShadowMap: [],
pointShadowMatrix: [],
hemi: [],
numSpotLightShadowsWithMaps: 0,
numLightProbes: 0
};
for (let o = 0; o < 9; o++)
r.probe.push(new Qi);
const i = new Qi
, s = new Es
, a = new Es;
return {
setup: function(i) {
let s = 0
, a = 0
, o = 0;
for (let e = 0; e < 9; e++)
r.probe[e].set(0, 0, 0);
let l = 0
, c = 0
, u = 0
, d = 0
, h = 0
, p = 0
, f = 0
, m = 0
, g = 0
, v = 0
, y = 0;
i.sort(eu);
for (let e = 0, b = i.length; e < b; e++) {
const x = i[e]
, b = x.color
, _ = x.intensity
, w = x.distance
, S = x.shadow && x.shadow.map ? x.shadow.map.texture : null;
if (x.isAmbientLight)
s += b.r * _,
a += b.g * _,
o += b.b * _;
else if (x.isLightProbe) {
for (let e = 0; e < 9; e++)
r.probe[e].addScaledVector(x.sh.coefficients[e], _);
y++
} else if (x.isDirectionalLight) {
const e = t.get(x);
if (e.color.copy(x.color).multiplyScalar(x.intensity),
x.castShadow) {
const e = x.shadow
, t = n.get(x);
t.shadowBias = e.bias,
t.shadowNormalBias = e.normalBias,
t.shadowRadius = e.radius,
t.shadowMapSize = e.mapSize,
r.directionalShadow[l] = t,
r.directionalShadowMap[l] = S,
r.directionalShadowMatrix[l] = x.shadow.matrix,
p++
}
r.directional[l] = e,
l++
} else if (x.isSpotLight) {
const e = t.get(x);
e.position.setFromMatrixPosition(x.matrixWorld),
e.color.copy(b).multiplyScalar(_),
e.distance = w,
e.coneCos = Math.cos(x.angle),
e.penumbraCos = Math.cos(x.angle * (1 - x.penumbra)),
e.decay = x.decay,
r.spot[u] = e;
const i = x.shadow;
if (x.map && (r.spotLightMap[g] = x.map,
g++,
i.updateMatrices(x),
x.castShadow && v++),
r.spotLightMatrix[u] = i.matrix,
x.castShadow) {
const e = n.get(x);
e.shadowBias = i.bias,
e.shadowNormalBias = i.normalBias,
e.shadowRadius = i.radius,
e.shadowMapSize = i.mapSize,
r.spotShadow[u] = e,
r.spotShadowMap[u] = S,
m++
}
u++
} else if (x.isRectAreaLight) {
const e = t.get(x);
e.color.copy(b).multiplyScalar(_),
e.halfWidth.set(.5 * x.width, 0, 0),
e.halfHeight.set(0, .5 * x.height, 0),
r.rectArea[d] = e,
d++
} else if (x.isPointLight) {
const e = t.get(x);
if (e.color.copy(x.color).multiplyScalar(x.intensity),
e.distance = x.distance,
e.decay = x.decay,
x.castShadow) {
const e = x.shadow
, t = n.get(x);
t.shadowBias = e.bias,
t.shadowNormalBias = e.normalBias,
t.shadowRadius = e.radius,
t.shadowMapSize = e.mapSize,
t.shadowCameraNear = e.camera.near,
t.shadowCameraFar = e.camera.far,
r.pointShadow[c] = t,
r.pointShadowMap[c] = S,
r.pointShadowMatrix[c] = x.shadow.matrix,
f++
}
r.point[c] = e,
c++
} else if (x.isHemisphereLight) {
const e = t.get(x);
e.skyColor.copy(x.color).multiplyScalar(_),
e.groundColor.copy(x.groundColor).multiplyScalar(_),
r.hemi[h] = e,
h++
}
}
d > 0 && (!0 === e.has("OES_texture_float_linear") ? (r.rectAreaLTC1 = Fo.LTC_FLOAT_1,
r.rectAreaLTC2 = Fo.LTC_FLOAT_2) : (r.rectAreaLTC1 = Fo.LTC_HALF_1,
r.rectAreaLTC2 = Fo.LTC_HALF_2)),
r.ambient[0] = s,
r.ambient[1] = a,
r.ambient[2] = o;
const x = r.hash;
x.directionalLength === l && x.pointLength === c && x.spotLength === u && x.rectAreaLength === d && x.hemiLength === h && x.numDirectionalShadows === p && x.numPointShadows === f && x.numSpotShadows === m && x.numSpotMaps === g && x.numLightProbes === y || (r.directional.length = l,
r.spot.length = u,
r.rectArea.length = d,
r.point.length = c,
r.hemi.length = h,
r.directionalShadow.length = p,
r.directionalShadowMap.length = p,
r.pointShadow.length = f,
r.pointShadowMap.length = f,
r.spotShadow.length = m,
r.spotShadowMap.length = m,
r.directionalShadowMatrix.length = p,
r.pointShadowMatrix.length = f,
r.spotLightMatrix.length = m + g - v,
r.spotLightMap.length = g,
r.numSpotLightShadowsWithMaps = v,
r.numLightProbes = y,
x.directionalLength = l,
x.pointLength = c,
x.spotLength = u,
x.rectAreaLength = d,
x.hemiLength = h,
x.numDirectionalShadows = p,
x.numPointShadows = f,
x.numSpotShadows = m,
x.numSpotMaps = g,
x.numLightProbes = y,
r.version = $c++)
},
setupView: function(e, t) {
let n = 0
, o = 0
, l = 0
, c = 0
, u = 0;
const d = t.matrixWorldInverse;
for (let h = 0, p = e.length; h < p; h++) {
const t = e[h];
if (t.isDirectionalLight) {
const e = r.directional[n];
e.direction.setFromMatrixPosition(t.matrixWorld),
i.setFromMatrixPosition(t.target.matrixWorld),
e.direction.sub(i),
e.direction.transformDirection(d),
n++
} else if (t.isSpotLight) {
const e = r.spot[l];
e.position.setFromMatrixPosition(t.matrixWorld),
e.position.applyMatrix4(d),
e.direction.setFromMatrixPosition(t.matrixWorld),
i.setFromMatrixPosition(t.target.matrixWorld),
e.direction.sub(i),
e.direction.transformDirection(d),
l++
} else if (t.isRectAreaLight) {
const e = r.rectArea[c];
e.position.setFromMatrixPosition(t.matrixWorld),
e.position.applyMatrix4(d),
a.identity(),
s.copy(t.matrixWorld),
s.premultiply(d),
a.extractRotation(s),
e.halfWidth.set(.5 * t.width, 0, 0),
e.halfHeight.set(0, .5 * t.height, 0),
e.halfWidth.applyMatrix4(a),
e.halfHeight.applyMatrix4(a),
c++
} else if (t.isPointLight) {
const e = r.point[o];
e.position.setFromMatrixPosition(t.matrixWorld),
e.position.applyMatrix4(d),
o++
} else if (t.isHemisphereLight) {
const e = r.hemi[u];
e.direction.setFromMatrixPosition(t.matrixWorld),
e.direction.transformDirection(d),
u++
}
}
},
state: r
}
}
function nu(e) {
const t = new tu(e)
, n = []
, r = [];
const i = {
lightsArray: n,
shadowsArray: r,
camera: null,
lights: t,
transmissionRenderTarget: {}
};
return {
init: function(e) {
i.camera = e,
n.length = 0,
r.length = 0
},
state: i,
setupLights: function() {
t.setup(n)
},
setupLightsView: function(e) {
t.setupView(n, e)
},
pushLight: function(e) {
n.push(e)
},
pushShadow: function(e) {
r.push(e)
}
}
}
function ru(e) {
let t = new WeakMap;
return {
get: function(n) {
let r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;
const i = t.get(n);
let s;
return void 0 === i ? (s = new nu(e),
t.set(n, [s])) : r >= i.length ? (s = new nu(e),
i.push(s)) : s = i[r],
s
},
dispose: function() {
t = new WeakMap
}
}
}
class iu extends xa {
constructor(e) {
super(),
this.isMeshDepthMaterial = !0,
this.type = "MeshDepthMaterial",
this.depthPacking = dr,
this.map = null,
this.alphaMap = null,
this.displacementMap = null,
this.displacementScale = 1,
this.displacementBias = 0,
this.wireframe = !1,
this.wireframeLinewidth = 1,
this.setValues(e)
}
copy(e) {
return super.copy(e),
this.depthPacking = e.depthPacking,
this.map = e.map,
this.alphaMap = e.alphaMap,
this.displacementMap = e.displacementMap,
this.displacementScale = e.displacementScale,
this.displacementBias = e.displacementBias,
this.wireframe = e.wireframe,
this.wireframeLinewidth = e.wireframeLinewidth,
this
}
}
class su extends xa {
constructor(e) {
super(),
this.isMeshDistanceMaterial = !0,
this.type = "MeshDistanceMaterial",
this.map = null,
this.alphaMap = null,
this.displacementMap = null,
this.displacementScale = 1,
this.displacementBias = 0,
this.setValues(e)
}
copy(e) {
return super.copy(e),
this.map = e.map,
this.alphaMap = e.alphaMap,
this.displacementMap = e.displacementMap,
this.displacementScale = e.displacementScale,
this.displacementBias = e.displacementBias,
this
}
}
function au(e, t, n) {
let r = new Lo;
const i = new xi
, s = new xi
, a = new Hi
, o = new iu({
depthPacking: hr
})
, l = new su
, c = {}
, u = n.maxTextureSize
, d = {
[Le]: Ie,
[Ie]: Le,
[Ne]: Ne
}
, h = new vo({
defines: {
VSM_SAMPLES: 8
},
uniforms: {
shadow_pass: {
value: null
},
resolution: {
value: new xi
},
radius: {
value: 4
}
},
vertexShader: "void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",
fragmentShader: "uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include <packing>\nvoid main() {\n\tconst float samples = float( VSM_SAMPLES );\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"
})
, p = h.clone();
p.defines.HORIZONTAL_PASS = 1;
const f = new Wa;
f.setAttribute("position", new Ta(new Float32Array([-1, -1, .5, 3, -1, .5, -1, 3, .5]),3));
const m = new co(f,h)
, g = this;
this.enabled = !1,
this.autoUpdate = !0,
this.needsUpdate = !1,
this.type = Be;
let v = this.type;
function y(n, r) {
const s = t.update(m);
h.defines.VSM_SAMPLES !== n.blurSamples && (h.defines.VSM_SAMPLES = n.blurSamples,
p.defines.VSM_SAMPLES = n.blurSamples,
h.needsUpdate = !0,
p.needsUpdate = !0),
null === n.mapPass && (n.mapPass = new Wi(i.x,i.y)),
h.uniforms.shadow_pass.value = n.map.texture,
h.uniforms.resolution.value = n.mapSize,
h.uniforms.radius.value = n.radius,
e.setRenderTarget(n.mapPass),
e.clear(),
e.renderBufferDirect(r, null, s, h, m, null),
p.uniforms.shadow_pass.value = n.mapPass.texture,
p.uniforms.resolution.value = n.mapSize,
p.uniforms.radius.value = n.radius,
e.setRenderTarget(n.map),
e.clear(),
e.renderBufferDirect(r, null, s, p, m, null)
}
function x(t, n, r, i) {
let s = null;
const a = !0 === r.isPointLight ? t.customDistanceMaterial : t.customDepthMaterial;
if (void 0 !== a)
s = a;
else if (s = !0 === r.isPointLight ? l : o,
e.localClippingEnabled && !0 === n.clipShadows && Array.isArray(n.clippingPlanes) && 0 !== n.clippingPlanes.length || n.displacementMap && 0 !== n.displacementScale || n.alphaMap && n.alphaTest > 0 || n.map && n.alphaTest > 0) {
const e = s.uuid
, t = n.uuid;
let r = c[e];
void 0 === r && (r = {},
c[e] = r);
let i = r[t];
void 0 === i && (i = s.clone(),
r[t] = i,
n.addEventListener("dispose", _)),
s = i
}
if (s.visible = n.visible,
s.wireframe = n.wireframe,
s.side = i === ke ? null !== n.shadowSide ? n.shadowSide : n.side : null !== n.shadowSide ? n.shadowSide : d[n.side],
s.alphaMap = n.alphaMap,
s.alphaTest = n.alphaTest,
s.map = n.map,
s.clipShadows = n.clipShadows,
s.clippingPlanes = n.clippingPlanes,
s.clipIntersection = n.clipIntersection,
s.displacementMap = n.displacementMap,
s.displacementScale = n.displacementScale,
s.displacementBias = n.displacementBias,
s.wireframeLinewidth = n.wireframeLinewidth,
s.linewidth = n.linewidth,
!0 === r.isPointLight && !0 === s.isMeshDistanceMaterial) {
e.properties.get(s).light = r
}
return s
}
function b(n, i, s, a, o) {
if (!1 === n.visible)
return;
if (n.layers.test(i.layers) && (n.isMesh || n.isLine || n.isPoints) && (n.castShadow || n.receiveShadow && o === ke) && (!n.frustumCulled || r.intersectsObject(n))) {
n.modelViewMatrix.multiplyMatrices(s.matrixWorldInverse, n.matrixWorld);
const r = t.update(n)
, l = n.material;
if (Array.isArray(l)) {
const t = r.groups;
for (let c = 0, u = t.length; c < u; c++) {
const u = t[c]
, d = l[u.materialIndex];
if (d && d.visible) {
const t = x(n, d, a, o);
n.onBeforeShadow(e, n, i, s, r, t, u),
e.renderBufferDirect(s, null, r, t, n, u),
n.onAfterShadow(e, n, i, s, r, t, u)
}
}
} else if (l.visible) {
const t = x(n, l, a, o);
n.onBeforeShadow(e, n, i, s, r, t, null),
e.renderBufferDirect(s, null, r, t, n, null),
n.onAfterShadow(e, n, i, s, r, t, null)
}
}
const l = n.children;
for (let e = 0, t = l.length; e < t; e++)
b(l[e], i, s, a, o)
}
function _(e) {
e.target.removeEventListener("dispose", _);
for (const t in c) {
const n = c[t]
, r = e.target.uuid;
if (r in n) {
n[r].dispose(),
delete n[r]
}
}
}
this.render = function(t, n, o) {
if (!1 === g.enabled)
return;
if (!1 === g.autoUpdate && !1 === g.needsUpdate)
return;
if (0 === t.length)
return;
const l = e.getRenderTarget()
, c = e.getActiveCubeFace()
, d = e.getActiveMipmapLevel()
, h = e.state;
h.setBlending(De),
h.buffers.color.setClear(1, 1, 1, 1),
h.buffers.depth.setTest(!0),
h.setScissorTest(!1);
const p = v !== ke && this.type === ke
, f = v === ke && this.type !== ke;
for (let m = 0, g = t.length; m < g; m++) {
const l = t[m]
, c = l.shadow;
if (void 0 === c) {
console.warn("THREE.WebGLShadowMap:", l, "has no shadow.");
continue
}
if (!1 === c.autoUpdate && !1 === c.needsUpdate)
continue;
i.copy(c.mapSize);
const d = c.getFrameExtents();
if (i.multiply(d),
s.copy(c.mapSize),
(i.x > u || i.y > u) && (i.x > u && (s.x = Math.floor(u / d.x),
i.x = s.x * d.x,
c.mapSize.x = s.x),
i.y > u && (s.y = Math.floor(u / d.y),
i.y = s.y * d.y,
c.mapSize.y = s.y)),
null === c.map || !0 === p || !0 === f) {
const e = this.type !== ke ? {
minFilter: Ft,
magFilter: Ft
} : {};
null !== c.map && c.map.dispose(),
c.map = new Wi(i.x,i.y,e),
c.map.texture.name = l.name + ".shadowMap",
c.camera.updateProjectionMatrix()
}
e.setRenderTarget(c.map),
e.clear();
const g = c.getViewportCount();
for (let e = 0; e < g; e++) {
const t = c.getViewport(e);
a.set(s.x * t.x, s.y * t.y, s.x * t.z, s.y * t.w),
h.viewport(a),
c.updateMatrices(l, e),
r = c.getFrustum(),
b(n, o, c.camera, l, this.type)
}
!0 !== c.isPointLightShadow && this.type === ke && y(c, o),
c.needsUpdate = !1
}
v = this.type,
g.needsUpdate = !1,
e.setRenderTarget(l, c, d)
}
}
function ou(e) {
const t = new function() {
let t = !1;
const n = new Hi;
let r = null;
const i = new Hi(0,0,0,0);
return {
setMask: function(n) {
r === n || t || (e.colorMask(n, n, n, n),
r = n)
},
setLocked: function(e) {
t = e
},
setClear: function(t, r, s, a, o) {
!0 === o && (t *= a,
r *= a,
s *= a),
n.set(t, r, s, a),
!1 === i.equals(n) && (e.clearColor(t, r, s, a),
i.copy(n))
},
reset: function() {
t = !1,
r = null,
i.set(-1, 0, 0, 0)
}
}
}
, n = new function() {
let t = !1
, n = null
, r = null
, i = null;
return {
setTest: function(t) {
t ? O(e.DEPTH_TEST) : U(e.DEPTH_TEST)
},
setMask: function(r) {
n === r || t || (e.depthMask(r),
n = r)
},
setFunc: function(t) {
if (r !== t) {
switch (t) {
case lt:
e.depthFunc(e.NEVER);
break;
case ct:
e.depthFunc(e.ALWAYS);
break;
case ut:
e.depthFunc(e.LESS);
break;
case dt:
e.depthFunc(e.LEQUAL);
break;
case ht:
e.depthFunc(e.EQUAL);
break;
case pt:
e.depthFunc(e.GEQUAL);
break;
case ft:
e.depthFunc(e.GREATER);
break;
case mt:
e.depthFunc(e.NOTEQUAL);
break;
default:
e.depthFunc(e.LEQUAL)
}
r = t
}
},
setLocked: function(e) {
t = e
},
setClear: function(t) {
i !== t && (e.clearDepth(t),
i = t)
},
reset: function() {
t = !1,
n = null,
r = null,
i = null
}
}
}
, r = new function() {
let t = !1
, n = null
, r = null
, i = null
, s = null
, a = null
, o = null
, l = null
, c = null;
return {
setTest: function(n) {
t || (n ? O(e.STENCIL_TEST) : U(e.STENCIL_TEST))
},
setMask: function(r) {
n === r || t || (e.stencilMask(r),
n = r)
},
setFunc: function(t, n, a) {
r === t && i === n && s === a || (e.stencilFunc(t, n, a),
r = t,
i = n,
s = a)
},
setOp: function(t, n, r) {
a === t && o === n && l === r || (e.stencilOp(t, n, r),
a = t,
o = n,
l = r)
},
setLocked: function(e) {
t = e
},
setClear: function(t) {
c !== t && (e.clearStencil(t),
c = t)
},
reset: function() {
t = !1,
n = null,
r = null,
i = null,
s = null,
a = null,
o = null,
l = null,
c = null
}
}
}
, i = new WeakMap
, s = new WeakMap;
let a = {}
, o = {}
, l = new WeakMap
, c = []
, u = null
, d = !1
, h = null
, p = null
, f = null
, m = null
, g = null
, v = null
, y = null
, x = new ga(0,0,0)
, b = 0
, _ = !1
, w = null
, S = null
, A = null
, M = null
, C = null;
const E = e.getParameter(e.MAX_COMBINED_TEXTURE_IMAGE_UNITS);
let T = !1
, R = 0;
const B = e.getParameter(e.VERSION);
-1 !== B.indexOf("WebGL") ? (R = parseFloat(/^WebGL (\d)/.exec(B)[1]),
T = R >= 1) : -1 !== B.indexOf("OpenGL ES") && (R = parseFloat(/^OpenGL ES (\d)/.exec(B)[1]),
T = R >= 2);
let P = null
, k = {};
const L = e.getParameter(e.SCISSOR_BOX)
, I = e.getParameter(e.VIEWPORT)
, N = (new Hi).fromArray(L)
, D = (new Hi).fromArray(I);
function j(t, n, r, i) {
const s = new Uint8Array(4)
, a = e.createTexture();
e.bindTexture(t, a),
e.texParameteri(t, e.TEXTURE_MIN_FILTER, e.NEAREST),
e.texParameteri(t, e.TEXTURE_MAG_FILTER, e.NEAREST);
for (let o = 0; o < r; o++)
t === e.TEXTURE_3D || t === e.TEXTURE_2D_ARRAY ? e.texImage3D(n, 0, e.RGBA, 1, 1, i, 0, e.RGBA, e.UNSIGNED_BYTE, s) : e.texImage2D(n + o, 0, e.RGBA, 1, 1, 0, e.RGBA, e.UNSIGNED_BYTE, s);
return a
}
const F = {};
function O(t) {
!0 !== a[t] && (e.enable(t),
a[t] = !0)
}
function U(t) {
!1 !== a[t] && (e.disable(t),
a[t] = !1)
}
F[e.TEXTURE_2D] = j(e.TEXTURE_2D, e.TEXTURE_2D, 1),
F[e.TEXTURE_CUBE_MAP] = j(e.TEXTURE_CUBE_MAP, e.TEXTURE_CUBE_MAP_POSITIVE_X, 6),
F[e.TEXTURE_2D_ARRAY] = j(e.TEXTURE_2D_ARRAY, e.TEXTURE_2D_ARRAY, 1, 1),
F[e.TEXTURE_3D] = j(e.TEXTURE_3D, e.TEXTURE_3D, 1, 1),
t.setClear(0, 0, 0, 1),
n.setClear(1),
r.setClear(0),
O(e.DEPTH_TEST),
n.setFunc(dt),
V(!1),
W(Ce),
O(e.CULL_FACE),
H(De);
const z = {
[Ge]: e.FUNC_ADD,
[He]: e.FUNC_SUBTRACT,
[Ve]: e.FUNC_REVERSE_SUBTRACT
};
z[We] = e.MIN,
z[Je] = e.MAX;
const G = {
[Xe]: e.ZERO,
[Ke]: e.ONE,
[qe]: e.SRC_COLOR,
[Qe]: e.SRC_ALPHA,
[rt]: e.SRC_ALPHA_SATURATE,
[tt]: e.DST_COLOR,
[$e]: e.DST_ALPHA,
[Ye]: e.ONE_MINUS_SRC_COLOR,
[Ze]: e.ONE_MINUS_SRC_ALPHA,
[nt]: e.ONE_MINUS_DST_COLOR,
[et]: e.ONE_MINUS_DST_ALPHA,
[it]: e.CONSTANT_COLOR,
[st]: e.ONE_MINUS_CONSTANT_COLOR,
[at]: e.CONSTANT_ALPHA,
[ot]: e.ONE_MINUS_CONSTANT_ALPHA
};
function H(t, n, r, i, s, a, o, l, c, u) {
if (t !== De) {
if (!1 === d && (O(e.BLEND),
d = !0),
t === ze)
s = s || n,
a = a || r,
o = o || i,
n === p && s === g || (e.blendEquationSeparate(z[n], z[s]),
p = n,
g = s),
r === f && i === m && a === v && o === y || (e.blendFuncSeparate(G[r], G[i], G[a], G[o]),
f = r,
m = i,
v = a,
y = o),
!1 !== l.equals(x) && c === b || (e.blendColor(l.r, l.g, l.b, c),
x.copy(l),
b = c),
h = t,
_ = !1;
else if (t !== h || u !== _) {
if (p === Ge && g === Ge || (e.blendEquation(e.FUNC_ADD),
p = Ge,
g = Ge),
u)
switch (t) {
case je:
e.blendFuncSeparate(e.ONE, e.ONE_MINUS_SRC_ALPHA, e.ONE, e.ONE_MINUS_SRC_ALPHA);
break;
case Fe:
e.blendFunc(e.ONE, e.ONE);
break;
case Oe:
e.blendFuncSeparate(e.ZERO, e.ONE_MINUS_SRC_COLOR, e.ZERO, e.ONE);
break;
case Ue:
e.blendFuncSeparate(e.ZERO, e.SRC_COLOR, e.ZERO, e.SRC_ALPHA);
break;
default:
console.error("THREE.WebGLState: Invalid blending: ", t)
}
else
switch (t) {
case je:
e.blendFuncSeparate(e.SRC_ALPHA, e.ONE_MINUS_SRC_ALPHA, e.ONE, e.ONE_MINUS_SRC_ALPHA);
break;
case Fe:
e.blendFunc(e.SRC_ALPHA, e.ONE);
break;
case Oe:
e.blendFuncSeparate(e.ZERO, e.ONE_MINUS_SRC_COLOR, e.ZERO, e.ONE);
break;
case Ue:
e.blendFunc(e.ZERO, e.SRC_COLOR);
break;
default:
console.error("THREE.WebGLState: Invalid blending: ", t)
}
f = null,
m = null,
v = null,
y = null,
x.set(0, 0, 0),
b = 0,
h = t,
_ = u
}
} else
!0 === d && (U(e.BLEND),
d = !1)
}
function V(t) {
w !== t && (t ? e.frontFace(e.CW) : e.frontFace(e.CCW),
w = t)
}
function W(t) {
t !== Me ? (O(e.CULL_FACE),
t !== S && (t === Ce ? e.cullFace(e.BACK) : t === Ee ? e.cullFace(e.FRONT) : e.cullFace(e.FRONT_AND_BACK))) : U(e.CULL_FACE),
S = t
}
function J(t, n, r) {
t ? (O(e.POLYGON_OFFSET_FILL),
M === n && C === r || (e.polygonOffset(n, r),
M = n,
C = r)) : U(e.POLYGON_OFFSET_FILL)
}
return {
buffers: {
color: t,
depth: n,
stencil: r
},
enable: O,
disable: U,
bindFramebuffer: function(t, n) {
return o[t] !== n && (e.bindFramebuffer(t, n),
o[t] = n,
t === e.DRAW_FRAMEBUFFER && (o[e.FRAMEBUFFER] = n),
t === e.FRAMEBUFFER && (o[e.DRAW_FRAMEBUFFER] = n),
!0)
},
drawBuffers: function(t, n) {
let r = c
, i = !1;
if (t) {
r = l.get(n),
void 0 === r && (r = [],
l.set(n, r));
const s = t.textures;
if (r.length !== s.length || r[0] !== e.COLOR_ATTACHMENT0) {
for (let t = 0, n = s.length; t < n; t++)
r[t] = e.COLOR_ATTACHMENT0 + t;
r.length = s.length,
i = !0
}
} else
r[0] !== e.BACK && (r[0] = e.BACK,
i = !0);
i && e.drawBuffers(r)
},
useProgram: function(t) {
return u !== t && (e.useProgram(t),
u = t,
!0)
},
setBlending: H,
setMaterial: function(i, s) {
i.side === Ne ? U(e.CULL_FACE) : O(e.CULL_FACE);
let a = i.side === Ie;
s && (a = !a),
V(a),
i.blending === je && !1 === i.transparent ? H(De) : H(i.blending, i.blendEquation, i.blendSrc, i.blendDst, i.blendEquationAlpha, i.blendSrcAlpha, i.blendDstAlpha, i.blendColor, i.blendAlpha, i.premultipliedAlpha),
n.setFunc(i.depthFunc),
n.setTest(i.depthTest),
n.setMask(i.depthWrite),
t.setMask(i.colorWrite);
const o = i.stencilWrite;
r.setTest(o),
o && (r.setMask(i.stencilWriteMask),
r.setFunc(i.stencilFunc, i.stencilRef, i.stencilFuncMask),
r.setOp(i.stencilFail, i.stencilZFail, i.stencilZPass)),
J(i.polygonOffset, i.polygonOffsetFactor, i.polygonOffsetUnits),
!0 === i.alphaToCoverage ? O(e.SAMPLE_ALPHA_TO_COVERAGE) : U(e.SAMPLE_ALPHA_TO_COVERAGE)
},
setFlipSided: V,
setCullFace: W,
setLineWidth: function(t) {
t !== A && (T && e.lineWidth(t),
A = t)
},
setPolygonOffset: J,
setScissorTest: function(t) {
t ? O(e.SCISSOR_TEST) : U(e.SCISSOR_TEST)
},
activeTexture: function(t) {
void 0 === t && (t = e.TEXTURE0 + E - 1),
P !== t && (e.activeTexture(t),
P = t)
},
bindTexture: function(t, n, r) {
void 0 === r && (r = null === P ? e.TEXTURE0 + E - 1 : P);
let i = k[r];
void 0 === i && (i = {
type: void 0,
texture: void 0
},
k[r] = i),
i.type === t && i.texture === n || (P !== r && (e.activeTexture(r),
P = r),
e.bindTexture(t, n || F[t]),
i.type = t,
i.texture = n)
},
unbindTexture: function() {
const t = k[P];
void 0 !== t && void 0 !== t.type && (e.bindTexture(t.type, null),
t.type = void 0,
t.texture = void 0)
},
compressedTexImage2D: function() {
try {
e.compressedTexImage2D.apply(e, arguments)
} catch (iy) {
console.error("THREE.WebGLState:", iy)
}
},
compressedTexImage3D: function() {
try {
e.compressedTexImage3D.apply(e, arguments)
} catch (iy) {
console.error("THREE.WebGLState:", iy)
}
},
texImage2D: function() {
try {
e.texImage2D.apply(e, arguments)
} catch (iy) {
console.error("THREE.WebGLState:", iy)
}
},
texImage3D: function() {
try {
e.texImage3D.apply(e, arguments)
} catch (iy) {
console.error("THREE.WebGLState:", iy)
}
},
updateUBOMapping: function(t, n) {
let r = s.get(n);
void 0 === r && (r = new WeakMap,
s.set(n, r));
let i = r.get(t);
void 0 === i && (i = e.getUniformBlockIndex(n, t.name),
r.set(t, i))
},
uniformBlockBinding: function(t, n) {
const r = s.get(n).get(t);
i.get(n) !== r && (e.uniformBlockBinding(n, r, t.__bindingPointIndex),
i.set(n, r))
},
texStorage2D: function() {
try {
e.texStorage2D.apply(e, arguments)
} catch (iy) {
console.error("THREE.WebGLState:", iy)
}
},
texStorage3D: function() {
try {
e.texStorage3D.apply(e, arguments)
} catch (iy) {
console.error("THREE.WebGLState:", iy)
}
},
texSubImage2D: function() {
try {
e.texSubImage2D.apply(e, arguments)
} catch (iy) {
console.error("THREE.WebGLState:", iy)
}
},
texSubImage3D: function() {
try {
e.texSubImage3D.apply(e, arguments)
} catch (iy) {
console.error("THREE.WebGLState:", iy)
}
},
compressedTexSubImage2D: function() {
try {
e.compressedTexSubImage2D.apply(e, arguments)
} catch (iy) {
console.error("THREE.WebGLState:", iy)
}
},
compressedTexSubImage3D: function() {
try {
e.compressedTexSubImage3D.apply(e, arguments)
} catch (iy) {
console.error("THREE.WebGLState:", iy)
}
},
scissor: function(t) {
!1 === N.equals(t) && (e.scissor(t.x, t.y, t.z, t.w),
N.copy(t))
},
viewport: function(t) {
!1 === D.equals(t) && (e.viewport(t.x, t.y, t.z, t.w),
D.copy(t))
},
reset: function() {
e.disable(e.BLEND),
e.disable(e.CULL_FACE),
e.disable(e.DEPTH_TEST),
e.disable(e.POLYGON_OFFSET_FILL),
e.disable(e.SCISSOR_TEST),
e.disable(e.STENCIL_TEST),
e.disable(e.SAMPLE_ALPHA_TO_COVERAGE),
e.blendEquation(e.FUNC_ADD),
e.blendFunc(e.ONE, e.ZERO),
e.blendFuncSeparate(e.ONE, e.ZERO, e.ONE, e.ZERO),
e.blendColor(0, 0, 0, 0),
e.colorMask(!0, !0, !0, !0),
e.clearColor(0, 0, 0, 0),
e.depthMask(!0),
e.depthFunc(e.LESS),
e.clearDepth(1),
e.stencilMask(4294967295),
e.stencilFunc(e.ALWAYS, 0, 4294967295),
e.stencilOp(e.KEEP, e.KEEP, e.KEEP),
e.clearStencil(0),
e.cullFace(e.BACK),
e.frontFace(e.CCW),
e.polygonOffset(0, 0),
e.activeTexture(e.TEXTURE0),
e.bindFramebuffer(e.FRAMEBUFFER, null),
e.bindFramebuffer(e.DRAW_FRAMEBUFFER, null),
e.bindFramebuffer(e.READ_FRAMEBUFFER, null),
e.useProgram(null),
e.lineWidth(1),
e.scissor(0, 0, e.canvas.width, e.canvas.height),
e.viewport(0, 0, e.canvas.width, e.canvas.height),
a = {},
P = null,
k = {},
o = {},
l = new WeakMap,
c = [],
u = null,
d = !1,
h = null,
p = null,
f = null,
m = null,
g = null,
v = null,
y = null,
x = new ga(0,0,0),
b = 0,
_ = !1,
w = null,
S = null,
A = null,
M = null,
C = null,
N.set(0, 0, e.canvas.width, e.canvas.height),
D.set(0, 0, e.canvas.width, e.canvas.height),
t.reset(),
n.reset(),
r.reset()
}
}
}
function lu(e, t, n, r, i, s, a) {
const o = t.has("WEBGL_multisampled_render_to_texture") ? t.get("WEBGL_multisampled_render_to_texture") : null
, l = "undefined" !== typeof navigator && /OculusBrowser/g.test(navigator.userAgent)
, c = new xi
, u = new WeakMap;
let d;
const h = new WeakMap;
let p = !1;
try {
p = "undefined" !== typeof OffscreenCanvas && null !== new OffscreenCanvas(1,1).getContext("2d")
} catch (z) {}
function f(e, t) {
return p ? new OffscreenCanvas(e,t) : Mi("canvas")
}
function m(e, t, n) {
let r = 1;
const i = U(e);
if ((i.width > n || i.height > n) && (r = n / Math.max(i.width, i.height)),
r < 1) {
if ("undefined" !== typeof HTMLImageElement && e instanceof HTMLImageElement || "undefined" !== typeof HTMLCanvasElement && e instanceof HTMLCanvasElement || "undefined" !== typeof ImageBitmap && e instanceof ImageBitmap || "undefined" !== typeof VideoFrame && e instanceof VideoFrame) {
const n = Math.floor(r * i.width)
, s = Math.floor(r * i.height);
void 0 === d && (d = f(n, s));
const a = t ? f(n, s) : d;
a.width = n,
a.height = s;
return a.getContext("2d").drawImage(e, 0, 0, n, s),
console.warn("THREE.WebGLRenderer: Texture has been resized from (" + i.width + "x" + i.height + ") to (" + n + "x" + s + ")."),
a
}
return "data"in e && console.warn("THREE.WebGLRenderer: Image in DataTexture is too big (" + i.width + "x" + i.height + ")."),
e
}
return e
}
function g(e) {
return e.generateMipmaps && e.minFilter !== Ft && e.minFilter !== Ht
}
function v(t) {
e.generateMipmap(t)
}
function y(n, r, i, s) {
let a = arguments.length > 4 && void 0 !== arguments[4] && arguments[4];
if (null !== n) {
if (void 0 !== e[n])
return e[n];
console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '" + n + "'")
}
let o = r;
if (r === e.RED && (i === e.FLOAT && (o = e.R32F),
i === e.HALF_FLOAT && (o = e.R16F),
i === e.UNSIGNED_BYTE && (o = e.R8)),
r === e.RED_INTEGER && (i === e.UNSIGNED_BYTE && (o = e.R8UI),
i === e.UNSIGNED_SHORT && (o = e.R16UI),
i === e.UNSIGNED_INT && (o = e.R32UI),
i === e.BYTE && (o = e.R8I),
i === e.SHORT && (o = e.R16I),
i === e.INT && (o = e.R32I)),
r === e.RG && (i === e.FLOAT && (o = e.RG32F),
i === e.HALF_FLOAT && (o = e.RG16F),
i === e.UNSIGNED_BYTE && (o = e.RG8)),
r === e.RG_INTEGER && (i === e.UNSIGNED_BYTE && (o = e.RG8UI),
i === e.UNSIGNED_SHORT && (o = e.RG16UI),
i === e.UNSIGNED_INT && (o = e.RG32UI),
i === e.BYTE && (o = e.RG8I),
i === e.SHORT && (o = e.RG16I),
i === e.INT && (o = e.RG32I)),
r === e.RGB && i === e.UNSIGNED_INT_5_9_9_9_REV && (o = e.RGB9_E5),
r === e.RGBA) {
const t = a ? br : Li.getTransfer(s);
i === e.FLOAT && (o = e.RGBA32F),
i === e.HALF_FLOAT && (o = e.RGBA16F),
i === e.UNSIGNED_BYTE && (o = t === _r ? e.SRGB8_ALPHA8 : e.RGBA8),
i === e.UNSIGNED_SHORT_4_4_4_4 && (o = e.RGBA4),
i === e.UNSIGNED_SHORT_5_5_5_1 && (o = e.RGB5_A1)
}
return o !== e.R16F && o !== e.R32F && o !== e.RG16F && o !== e.RG32F && o !== e.RGBA16F && o !== e.RGBA32F || t.get("EXT_color_buffer_float"),
o
}
function x(t, n) {
let r;
return t ? null === n || n === $t || n === sn ? r = e.DEPTH24_STENCIL8 : n === en ? r = e.DEPTH32F_STENCIL8 : n === Qt && (r = e.DEPTH24_STENCIL8,
console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")) : null === n || n === $t || n === sn ? r = e.DEPTH_COMPONENT24 : n === en ? r = e.DEPTH_COMPONENT32F : n === Qt && (r = e.DEPTH_COMPONENT16),
r
}
function b(e, t) {
return !0 === g(e) || e.isFramebufferTexture && e.minFilter !== Ft && e.minFilter !== Ht ? Math.log2(Math.max(t.width, t.height)) + 1 : void 0 !== e.mipmaps && e.mipmaps.length > 0 ? e.mipmaps.length : e.isCompressedTexture && Array.isArray(e.image) ? t.mipmaps.length : 1
}
function _(e) {
const t = e.target;
t.removeEventListener("dispose", _),
function(e) {
const t = r.get(e);
if (void 0 === t.__webglInit)
return;
const n = e.source
, i = h.get(n);
if (i) {
const r = i[t.__cacheKey];
r.usedTimes--,
0 === r.usedTimes && S(e),
0 === Object.keys(i).length && h.delete(n)
}
r.remove(e)
}(t),
t.isVideoTexture && u.delete(t)
}
function w(t) {
const n = t.target;
n.removeEventListener("dispose", w),
function(t) {
const n = r.get(t);
t.depthTexture && t.depthTexture.dispose();
if (t.isWebGLCubeRenderTarget)
for (let r = 0; r < 6; r++) {
if (Array.isArray(n.__webglFramebuffer[r]))
for (let t = 0; t < n.__webglFramebuffer[r].length; t++)
e.deleteFramebuffer(n.__webglFramebuffer[r][t]);
else
e.deleteFramebuffer(n.__webglFramebuffer[r]);
n.__webglDepthbuffer && e.deleteRenderbuffer(n.__webglDepthbuffer[r])
}
else {
if (Array.isArray(n.__webglFramebuffer))
for (let t = 0; t < n.__webglFramebuffer.length; t++)
e.deleteFramebuffer(n.__webglFramebuffer[t]);
else
e.deleteFramebuffer(n.__webglFramebuffer);
if (n.__webglDepthbuffer && e.deleteRenderbuffer(n.__webglDepthbuffer),
n.__webglMultisampledFramebuffer && e.deleteFramebuffer(n.__webglMultisampledFramebuffer),
n.__webglColorRenderbuffer)
for (let t = 0; t < n.__webglColorRenderbuffer.length; t++)
n.__webglColorRenderbuffer[t] && e.deleteRenderbuffer(n.__webglColorRenderbuffer[t]);
n.__webglDepthRenderbuffer && e.deleteRenderbuffer(n.__webglDepthRenderbuffer)
}
const i = t.textures;
for (let s = 0, o = i.length; s < o; s++) {
const t = r.get(i[s]);
t.__webglTexture && (e.deleteTexture(t.__webglTexture),
a.memory.textures--),
r.remove(i[s])
}
r.remove(t)
}(n)
}
function S(t) {
const n = r.get(t);
e.deleteTexture(n.__webglTexture);
const i = t.source;
delete h.get(i)[n.__cacheKey],
a.memory.textures--
}
let A = 0;
function M(t, i) {
const s = r.get(t);
if (t.isVideoTexture && function(e) {
const t = a.render.frame;
u.get(e) !== t && (u.set(e, t),
e.update())
}(t),
!1 === t.isRenderTargetTexture && t.version > 0 && s.__version !== t.version) {
const e = t.image;
if (null === e)
console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");
else {
if (!1 !== e.complete)
return void P(s, t, i);
console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")
}
}
n.bindTexture(e.TEXTURE_2D, s.__webglTexture, e.TEXTURE0 + i)
}
const C = {
[Nt]: e.REPEAT,
[Dt]: e.CLAMP_TO_EDGE,
[jt]: e.MIRRORED_REPEAT
}
, E = {
[Ft]: e.NEAREST,
[Ot]: e.NEAREST_MIPMAP_NEAREST,
[zt]: e.NEAREST_MIPMAP_LINEAR,
[Ht]: e.LINEAR,
[Vt]: e.LINEAR_MIPMAP_NEAREST,
[Jt]: e.LINEAR_MIPMAP_LINEAR
}
, T = {
[Ur]: e.NEVER,
[Xr]: e.ALWAYS,
[zr]: e.LESS,
[Hr]: e.LEQUAL,
[Gr]: e.EQUAL,
[Jr]: e.GEQUAL,
[Vr]: e.GREATER,
[Wr]: e.NOTEQUAL
};
function R(n, s) {
if (s.type !== en || !1 !== t.has("OES_texture_float_linear") || s.magFilter !== Ht && s.magFilter !== Vt && s.magFilter !== zt && s.magFilter !== Jt && s.minFilter !== Ht && s.minFilter !== Vt && s.minFilter !== zt && s.minFilter !== Jt || console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),
e.texParameteri(n, e.TEXTURE_WRAP_S, C[s.wrapS]),
e.texParameteri(n, e.TEXTURE_WRAP_T, C[s.wrapT]),
n !== e.TEXTURE_3D && n !== e.TEXTURE_2D_ARRAY || e.texParameteri(n, e.TEXTURE_WRAP_R, C[s.wrapR]),
e.texParameteri(n, e.TEXTURE_MAG_FILTER, E[s.magFilter]),
e.texParameteri(n, e.TEXTURE_MIN_FILTER, E[s.minFilter]),
s.compareFunction && (e.texParameteri(n, e.TEXTURE_COMPARE_MODE, e.COMPARE_REF_TO_TEXTURE),
e.texParameteri(n, e.TEXTURE_COMPARE_FUNC, T[s.compareFunction])),
!0 === t.has("EXT_texture_filter_anisotropic")) {
if (s.magFilter === Ft)
return;
if (s.minFilter !== zt && s.minFilter !== Jt)
return;
if (s.type === en && !1 === t.has("OES_texture_float_linear"))
return;
if (s.anisotropy > 1 || r.get(s).__currentAnisotropy) {
const a = t.get("EXT_texture_filter_anisotropic");
e.texParameterf(n, a.TEXTURE_MAX_ANISOTROPY_EXT, Math.min(s.anisotropy, i.getMaxAnisotropy())),
r.get(s).__currentAnisotropy = s.anisotropy
}
}
}
function B(t, n) {
let r = !1;
void 0 === t.__webglInit && (t.__webglInit = !0,
n.addEventListener("dispose", _));
const i = n.source;
let s = h.get(i);
void 0 === s && (s = {},
h.set(i, s));
const o = function(e) {
const t = [];
return t.push(e.wrapS),
t.push(e.wrapT),
t.push(e.wrapR || 0),
t.push(e.magFilter),
t.push(e.minFilter),
t.push(e.anisotropy),
t.push(e.internalFormat),
t.push(e.format),
t.push(e.type),
t.push(e.generateMipmaps),
t.push(e.premultiplyAlpha),
t.push(e.flipY),
t.push(e.unpackAlignment),
t.push(e.colorSpace),
t.join()
}(n);
if (o !== t.__cacheKey) {
void 0 === s[o] && (s[o] = {
texture: e.createTexture(),
usedTimes: 0
},
a.memory.textures++,
r = !0),
s[o].usedTimes++;
const i = s[t.__cacheKey];
void 0 !== i && (s[t.__cacheKey].usedTimes--,
0 === i.usedTimes && S(n)),
t.__cacheKey = o,
t.__webglTexture = s[o].texture
}
return r
}
function P(t, a, o) {
let l = e.TEXTURE_2D;
(a.isDataArrayTexture || a.isCompressedArrayTexture) && (l = e.TEXTURE_2D_ARRAY),
a.isData3DTexture && (l = e.TEXTURE_3D);
const c = B(t, a)
, u = a.source;
n.bindTexture(l, t.__webglTexture, e.TEXTURE0 + o);
const d = r.get(u);
if (u.version !== d.__version || !0 === c) {
n.activeTexture(e.TEXTURE0 + o);
const t = Li.getPrimaries(Li.workingColorSpace)
, r = a.colorSpace === mr ? null : Li.getPrimaries(a.colorSpace)
, h = a.colorSpace === mr || t === r ? e.NONE : e.BROWSER_DEFAULT_WEBGL;
e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL, a.flipY),
e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL, a.premultiplyAlpha),
e.pixelStorei(e.UNPACK_ALIGNMENT, a.unpackAlignment),
e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL, h);
let p = m(a.image, !1, i.maxTextureSize);
p = O(a, p);
const f = s.convert(a.format, a.colorSpace)
, _ = s.convert(a.type);
let w, S = y(a.internalFormat, f, _, a.colorSpace, a.isVideoTexture);
R(l, a);
const A = a.mipmaps
, M = !0 !== a.isVideoTexture
, C = void 0 === d.__version || !0 === c
, E = u.dataReady
, T = b(a, p);
if (a.isDepthTexture)
S = x(a.format === pn, a.type),
C && (M ? n.texStorage2D(e.TEXTURE_2D, 1, S, p.width, p.height) : n.texImage2D(e.TEXTURE_2D, 0, S, p.width, p.height, 0, f, _, null));
else if (a.isDataTexture)
if (A.length > 0) {
M && C && n.texStorage2D(e.TEXTURE_2D, T, S, A[0].width, A[0].height);
for (let t = 0, r = A.length; t < r; t++)
w = A[t],
M ? E && n.texSubImage2D(e.TEXTURE_2D, t, 0, 0, w.width, w.height, f, _, w.data) : n.texImage2D(e.TEXTURE_2D, t, S, w.width, w.height, 0, f, _, w.data);
a.generateMipmaps = !1
} else
M ? (C && n.texStorage2D(e.TEXTURE_2D, T, S, p.width, p.height),
E && n.texSubImage2D(e.TEXTURE_2D, 0, 0, 0, p.width, p.height, f, _, p.data)) : n.texImage2D(e.TEXTURE_2D, 0, S, p.width, p.height, 0, f, _, p.data);
else if (a.isCompressedTexture)
if (a.isCompressedArrayTexture) {
M && C && n.texStorage3D(e.TEXTURE_2D_ARRAY, T, S, A[0].width, A[0].height, p.depth);
for (let t = 0, r = A.length; t < r; t++)
if (w = A[t],
a.format !== cn)
if (null !== f)
if (M) {
if (E)
if (a.layerUpdates.size > 0) {
for (const r of a.layerUpdates) {
const i = w.width * w.height;
n.compressedTexSubImage3D(e.TEXTURE_2D_ARRAY, t, 0, 0, r, w.width, w.height, 1, f, w.data.slice(i * r, i * (r + 1)), 0, 0)
}
a.clearLayerUpdates()
} else
n.compressedTexSubImage3D(e.TEXTURE_2D_ARRAY, t, 0, 0, 0, w.width, w.height, p.depth, f, w.data, 0, 0)
} else
n.compressedTexImage3D(e.TEXTURE_2D_ARRAY, t, S, w.width, w.height, p.depth, 0, w.data, 0, 0);
else
console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");
else
M ? E && n.texSubImage3D(e.TEXTURE_2D_ARRAY, t, 0, 0, 0, w.width, w.height, p.depth, f, _, w.data) : n.texImage3D(e.TEXTURE_2D_ARRAY, t, S, w.width, w.height, p.depth, 0, f, _, w.data)
} else {
M && C && n.texStorage2D(e.TEXTURE_2D, T, S, A[0].width, A[0].height);
for (let t = 0, r = A.length; t < r; t++)
w = A[t],
a.format !== cn ? null !== f ? M ? E && n.compressedTexSubImage2D(e.TEXTURE_2D, t, 0, 0, w.width, w.height, f, w.data) : n.compressedTexImage2D(e.TEXTURE_2D, t, S, w.width, w.height, 0, w.data) : console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()") : M ? E && n.texSubImage2D(e.TEXTURE_2D, t, 0, 0, w.width, w.height, f, _, w.data) : n.texImage2D(e.TEXTURE_2D, t, S, w.width, w.height, 0, f, _, w.data)
}
else if (a.isDataArrayTexture)
if (M) {
if (C && n.texStorage3D(e.TEXTURE_2D_ARRAY, T, S, p.width, p.height, p.depth),
E)
if (a.layerUpdates.size > 0) {
let t;
switch (_) {
case e.UNSIGNED_BYTE:
switch (f) {
case e.ALPHA:
case e.LUMINANCE:
t = 1;
break;
case e.LUMINANCE_ALPHA:
t = 2;
break;
case e.RGB:
t = 3;
break;
case e.RGBA:
t = 4;
break;
default:
throw new Error("Unknown texel size for format ".concat(f, "."))
}
break;
case e.UNSIGNED_SHORT_4_4_4_4:
case e.UNSIGNED_SHORT_5_5_5_1:
case e.UNSIGNED_SHORT_5_6_5:
t = 1;
break;
default:
throw new Error("Unknown texel size for type ".concat(_, "."))
}
const r = p.width * p.height * t;
for (const i of a.layerUpdates)
n.texSubImage3D(e.TEXTURE_2D_ARRAY, 0, 0, 0, i, p.width, p.height, 1, f, _, p.data.slice(r * i, r * (i + 1)));
a.clearLayerUpdates()
} else
n.texSubImage3D(e.TEXTURE_2D_ARRAY, 0, 0, 0, 0, p.width, p.height, p.depth, f, _, p.data)
} else
n.texImage3D(e.TEXTURE_2D_ARRAY, 0, S, p.width, p.height, p.depth, 0, f, _, p.data);
else if (a.isData3DTexture)
M ? (C && n.texStorage3D(e.TEXTURE_3D, T, S, p.width, p.height, p.depth),
E && n.texSubImage3D(e.TEXTURE_3D, 0, 0, 0, 0, p.width, p.height, p.depth, f, _, p.data)) : n.texImage3D(e.TEXTURE_3D, 0, S, p.width, p.height, p.depth, 0, f, _, p.data);
else if (a.isFramebufferTexture) {
if (C)
if (M)
n.texStorage2D(e.TEXTURE_2D, T, S, p.width, p.height);
else {
let t = p.width
, r = p.height;
for (let i = 0; i < T; i++)
n.texImage2D(e.TEXTURE_2D, i, S, t, r, 0, f, _, null),
t >>= 1,
r >>= 1
}
} else if (A.length > 0) {
if (M && C) {
const t = U(A[0]);
n.texStorage2D(e.TEXTURE_2D, T, S, t.width, t.height)
}
for (let t = 0, r = A.length; t < r; t++)
w = A[t],
M ? E && n.texSubImage2D(e.TEXTURE_2D, t, 0, 0, f, _, w) : n.texImage2D(e.TEXTURE_2D, t, S, f, _, w);
a.generateMipmaps = !1
} else if (M) {
if (C) {
const t = U(p);
n.texStorage2D(e.TEXTURE_2D, T, S, t.width, t.height)
}
E && n.texSubImage2D(e.TEXTURE_2D, 0, 0, 0, f, _, p)
} else
n.texImage2D(e.TEXTURE_2D, 0, S, f, _, p);
g(a) && v(l),
d.__version = u.version,
a.onUpdate && a.onUpdate(a)
}
t.__version = a.version
}
function k(t, i, a, l, c, u) {
const d = s.convert(a.format, a.colorSpace)
, h = s.convert(a.type)
, p = y(a.internalFormat, d, h, a.colorSpace);
if (!r.get(i).__hasExternalTextures) {
const t = Math.max(1, i.width >> u)
, r = Math.max(1, i.height >> u);
c === e.TEXTURE_3D || c === e.TEXTURE_2D_ARRAY ? n.texImage3D(c, u, p, t, r, i.depth, 0, d, h, null) : n.texImage2D(c, u, p, t, r, 0, d, h, null)
}
n.bindFramebuffer(e.FRAMEBUFFER, t),
F(i) ? o.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER, l, c, r.get(a).__webglTexture, 0, j(i)) : (c === e.TEXTURE_2D || c >= e.TEXTURE_CUBE_MAP_POSITIVE_X && c <= e.TEXTURE_CUBE_MAP_NEGATIVE_Z) && e.framebufferTexture2D(e.FRAMEBUFFER, l, c, r.get(a).__webglTexture, u),
n.bindFramebuffer(e.FRAMEBUFFER, null)
}
function L(t, n, r) {
if (e.bindRenderbuffer(e.RENDERBUFFER, t),
n.depthBuffer) {
const i = n.depthTexture
, s = i && i.isDepthTexture ? i.type : null
, a = x(n.stencilBuffer, s)
, l = n.stencilBuffer ? e.DEPTH_STENCIL_ATTACHMENT : e.DEPTH_ATTACHMENT
, c = j(n);
F(n) ? o.renderbufferStorageMultisampleEXT(e.RENDERBUFFER, c, a, n.width, n.height) : r ? e.renderbufferStorageMultisample(e.RENDERBUFFER, c, a, n.width, n.height) : e.renderbufferStorage(e.RENDERBUFFER, a, n.width, n.height),
e.framebufferRenderbuffer(e.FRAMEBUFFER, l, e.RENDERBUFFER, t)
} else {
const t = n.textures;
for (let i = 0; i < t.length; i++) {
const a = t[i]
, l = s.convert(a.format, a.colorSpace)
, c = s.convert(a.type)
, u = y(a.internalFormat, l, c, a.colorSpace)
, d = j(n);
r && !1 === F(n) ? e.renderbufferStorageMultisample(e.RENDERBUFFER, d, u, n.width, n.height) : F(n) ? o.renderbufferStorageMultisampleEXT(e.RENDERBUFFER, d, u, n.width, n.height) : e.renderbufferStorage(e.RENDERBUFFER, u, n.width, n.height)
}
}
e.bindRenderbuffer(e.RENDERBUFFER, null)
}
function I(t) {
const i = r.get(t)
, s = !0 === t.isWebGLCubeRenderTarget;
if (t.depthTexture && !i.__autoAllocateDepthBuffer) {
if (s)
throw new Error("target.depthTexture not supported in Cube render targets");
!function(t, i) {
if (i && i.isWebGLCubeRenderTarget)
throw new Error("Depth Texture with cube render targets is not supported");
if (n.bindFramebuffer(e.FRAMEBUFFER, t),
!i.depthTexture || !i.depthTexture.isDepthTexture)
throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");
r.get(i.depthTexture).__webglTexture && i.depthTexture.image.width === i.width && i.depthTexture.image.height === i.height || (i.depthTexture.image.width = i.width,
i.depthTexture.image.height = i.height,
i.depthTexture.needsUpdate = !0),
M(i.depthTexture, 0);
const s = r.get(i.depthTexture).__webglTexture
, a = j(i);
if (i.depthTexture.format === hn)
F(i) ? o.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER, e.DEPTH_ATTACHMENT, e.TEXTURE_2D, s, 0, a) : e.framebufferTexture2D(e.FRAMEBUFFER, e.DEPTH_ATTACHMENT, e.TEXTURE_2D, s, 0);
else {
if (i.depthTexture.format !== pn)
throw new Error("Unknown depthTexture format");
F(i) ? o.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER, e.DEPTH_STENCIL_ATTACHMENT, e.TEXTURE_2D, s, 0, a) : e.framebufferTexture2D(e.FRAMEBUFFER, e.DEPTH_STENCIL_ATTACHMENT, e.TEXTURE_2D, s, 0)
}
}(i.__webglFramebuffer, t)
} else if (s) {
i.__webglDepthbuffer = [];
for (let r = 0; r < 6; r++)
n.bindFramebuffer(e.FRAMEBUFFER, i.__webglFramebuffer[r]),
i.__webglDepthbuffer[r] = e.createRenderbuffer(),
L(i.__webglDepthbuffer[r], t, !1)
} else
n.bindFramebuffer(e.FRAMEBUFFER, i.__webglFramebuffer),
i.__webglDepthbuffer = e.createRenderbuffer(),
L(i.__webglDepthbuffer, t, !1);
n.bindFramebuffer(e.FRAMEBUFFER, null)
}
const N = []
, D = [];
function j(e) {
return Math.min(i.maxSamples, e.samples)
}
function F(e) {
const n = r.get(e);
return e.samples > 0 && !0 === t.has("WEBGL_multisampled_render_to_texture") && !1 !== n.__useRenderToTexture
}
function O(e, t) {
const n = e.colorSpace
, r = e.format
, i = e.type;
return !0 === e.isCompressedTexture || !0 === e.isVideoTexture || n !== vr && n !== mr && (Li.getTransfer(n) === _r ? r === cn && i === Kt || console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType.") : console.error("THREE.WebGLTextures: Unsupported texture color space:", n)),
t
}
function U(e) {
return "undefined" !== typeof HTMLImageElement && e instanceof HTMLImageElement ? (c.width = e.naturalWidth || e.width,
c.height = e.naturalHeight || e.height) : "undefined" !== typeof VideoFrame && e instanceof VideoFrame ? (c.width = e.displayWidth,
c.height = e.displayHeight) : (c.width = e.width,
c.height = e.height),
c
}
this.allocateTextureUnit = function() {
const e = A;
return e >= i.maxTextures && console.warn("THREE.WebGLTextures: Trying to use " + e + " texture units while this GPU supports only " + i.maxTextures),
A += 1,
e
}
,
this.resetTextureUnits = function() {
A = 0
}
,
this.setTexture2D = M,
this.setTexture2DArray = function(t, i) {
const s = r.get(t);
t.version > 0 && s.__version !== t.version ? P(s, t, i) : n.bindTexture(e.TEXTURE_2D_ARRAY, s.__webglTexture, e.TEXTURE0 + i)
}
,
this.setTexture3D = function(t, i) {
const s = r.get(t);
t.version > 0 && s.__version !== t.version ? P(s, t, i) : n.bindTexture(e.TEXTURE_3D, s.__webglTexture, e.TEXTURE0 + i)
}
,
this.setTextureCube = function(t, a) {
const o = r.get(t);
t.version > 0 && o.__version !== t.version ? function(t, a, o) {
if (6 !== a.image.length)
return;
const l = B(t, a)
, c = a.source;
n.bindTexture(e.TEXTURE_CUBE_MAP, t.__webglTexture, e.TEXTURE0 + o);
const u = r.get(c);
if (c.version !== u.__version || !0 === l) {
n.activeTexture(e.TEXTURE0 + o);
const t = Li.getPrimaries(Li.workingColorSpace)
, r = a.colorSpace === mr ? null : Li.getPrimaries(a.colorSpace)
, d = a.colorSpace === mr || t === r ? e.NONE : e.BROWSER_DEFAULT_WEBGL;
e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL, a.flipY),
e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL, a.premultiplyAlpha),
e.pixelStorei(e.UNPACK_ALIGNMENT, a.unpackAlignment),
e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL, d);
const h = a.isCompressedTexture || a.image[0].isCompressedTexture
, p = a.image[0] && a.image[0].isDataTexture
, f = [];
for (let e = 0; e < 6; e++)
f[e] = h || p ? p ? a.image[e].image : a.image[e] : m(a.image[e], !0, i.maxCubemapSize),
f[e] = O(a, f[e]);
const x = f[0]
, _ = s.convert(a.format, a.colorSpace)
, w = s.convert(a.type)
, S = y(a.internalFormat, _, w, a.colorSpace)
, A = !0 !== a.isVideoTexture
, M = void 0 === u.__version || !0 === l
, C = c.dataReady;
let E, T = b(a, x);
if (R(e.TEXTURE_CUBE_MAP, a),
h) {
A && M && n.texStorage2D(e.TEXTURE_CUBE_MAP, T, S, x.width, x.height);
for (let t = 0; t < 6; t++) {
E = f[t].mipmaps;
for (let r = 0; r < E.length; r++) {
const i = E[r];
a.format !== cn ? null !== _ ? A ? C && n.compressedTexSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X + t, r, 0, 0, i.width, i.height, _, i.data) : n.compressedTexImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X + t, r, S, i.width, i.height, 0, i.data) : console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()") : A ? C && n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X + t, r, 0, 0, i.width, i.height, _, w, i.data) : n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X + t, r, S, i.width, i.height, 0, _, w, i.data)
}
}
} else {
if (E = a.mipmaps,
A && M) {
E.length > 0 && T++;
const t = U(f[0]);
n.texStorage2D(e.TEXTURE_CUBE_MAP, T, S, t.width, t.height)
}
for (let t = 0; t < 6; t++)
if (p) {
A ? C && n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X + t, 0, 0, 0, f[t].width, f[t].height, _, w, f[t].data) : n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X + t, 0, S, f[t].width, f[t].height, 0, _, w, f[t].data);
for (let r = 0; r < E.length; r++) {
const i = E[r].image[t].image;
A ? C && n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X + t, r + 1, 0, 0, i.width, i.height, _, w, i.data) : n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X + t, r + 1, S, i.width, i.height, 0, _, w, i.data)
}
} else {
A ? C && n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X + t, 0, 0, 0, _, w, f[t]) : n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X + t, 0, S, _, w, f[t]);
for (let r = 0; r < E.length; r++) {
const i = E[r];
A ? C && n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X + t, r + 1, 0, 0, _, w, i.image[t]) : n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X + t, r + 1, S, _, w, i.image[t])
}
}
}
g(a) && v(e.TEXTURE_CUBE_MAP),
u.__version = c.version,
a.onUpdate && a.onUpdate(a)
}
t.__version = a.version
}(o, t, a) : n.bindTexture(e.TEXTURE_CUBE_MAP, o.__webglTexture, e.TEXTURE0 + a)
}
,
this.rebindTextures = function(t, n, i) {
const s = r.get(t);
void 0 !== n && k(s.__webglFramebuffer, t, t.texture, e.COLOR_ATTACHMENT0, e.TEXTURE_2D, 0),
void 0 !== i && I(t)
}
,
this.setupRenderTarget = function(t) {
const i = t.texture
, o = r.get(t)
, l = r.get(i);
t.addEventListener("dispose", w);
const c = t.textures
, u = !0 === t.isWebGLCubeRenderTarget
, d = c.length > 1;
if (d || (void 0 === l.__webglTexture && (l.__webglTexture = e.createTexture()),
l.__version = i.version,
a.memory.textures++),
u) {
o.__webglFramebuffer = [];
for (let t = 0; t < 6; t++)
if (i.mipmaps && i.mipmaps.length > 0) {
o.__webglFramebuffer[t] = [];
for (let n = 0; n < i.mipmaps.length; n++)
o.__webglFramebuffer[t][n] = e.createFramebuffer()
} else
o.__webglFramebuffer[t] = e.createFramebuffer()
} else {
if (i.mipmaps && i.mipmaps.length > 0) {
o.__webglFramebuffer = [];
for (let t = 0; t < i.mipmaps.length; t++)
o.__webglFramebuffer[t] = e.createFramebuffer()
} else
o.__webglFramebuffer = e.createFramebuffer();
if (d)
for (let t = 0, n = c.length; t < n; t++) {
const n = r.get(c[t]);
void 0 === n.__webglTexture && (n.__webglTexture = e.createTexture(),
a.memory.textures++)
}
if (t.samples > 0 && !1 === F(t)) {
o.__webglMultisampledFramebuffer = e.createFramebuffer(),
o.__webglColorRenderbuffer = [],
n.bindFramebuffer(e.FRAMEBUFFER, o.__webglMultisampledFramebuffer);
for (let n = 0; n < c.length; n++) {
const r = c[n];
o.__webglColorRenderbuffer[n] = e.createRenderbuffer(),
e.bindRenderbuffer(e.RENDERBUFFER, o.__webglColorRenderbuffer[n]);
const i = s.convert(r.format, r.colorSpace)
, a = s.convert(r.type)
, l = y(r.internalFormat, i, a, r.colorSpace, !0 === t.isXRRenderTarget)
, u = j(t);
e.renderbufferStorageMultisample(e.RENDERBUFFER, u, l, t.width, t.height),
e.framebufferRenderbuffer(e.FRAMEBUFFER, e.COLOR_ATTACHMENT0 + n, e.RENDERBUFFER, o.__webglColorRenderbuffer[n])
}
e.bindRenderbuffer(e.RENDERBUFFER, null),
t.depthBuffer && (o.__webglDepthRenderbuffer = e.createRenderbuffer(),
L(o.__webglDepthRenderbuffer, t, !0)),
n.bindFramebuffer(e.FRAMEBUFFER, null)
}
}
if (u) {
n.bindTexture(e.TEXTURE_CUBE_MAP, l.__webglTexture),
R(e.TEXTURE_CUBE_MAP, i);
for (let n = 0; n < 6; n++)
if (i.mipmaps && i.mipmaps.length > 0)
for (let r = 0; r < i.mipmaps.length; r++)
k(o.__webglFramebuffer[n][r], t, i, e.COLOR_ATTACHMENT0, e.TEXTURE_CUBE_MAP_POSITIVE_X + n, r);
else
k(o.__webglFramebuffer[n], t, i, e.COLOR_ATTACHMENT0, e.TEXTURE_CUBE_MAP_POSITIVE_X + n, 0);
g(i) && v(e.TEXTURE_CUBE_MAP),
n.unbindTexture()
} else if (d) {
for (let i = 0, s = c.length; i < s; i++) {
const s = c[i]
, a = r.get(s);
n.bindTexture(e.TEXTURE_2D, a.__webglTexture),
R(e.TEXTURE_2D, s),
k(o.__webglFramebuffer, t, s, e.COLOR_ATTACHMENT0 + i, e.TEXTURE_2D, 0),
g(s) && v(e.TEXTURE_2D)
}
n.unbindTexture()
} else {
let r = e.TEXTURE_2D;
if ((t.isWebGL3DRenderTarget || t.isWebGLArrayRenderTarget) && (r = t.isWebGL3DRenderTarget ? e.TEXTURE_3D : e.TEXTURE_2D_ARRAY),
n.bindTexture(r, l.__webglTexture),
R(r, i),
i.mipmaps && i.mipmaps.length > 0)
for (let n = 0; n < i.mipmaps.length; n++)
k(o.__webglFramebuffer[n], t, i, e.COLOR_ATTACHMENT0, r, n);
else
k(o.__webglFramebuffer, t, i, e.COLOR_ATTACHMENT0, r, 0);
g(i) && v(r),
n.unbindTexture()
}
t.depthBuffer && I(t)
}
,
this.updateRenderTargetMipmap = function(t) {
const i = t.textures;
for (let s = 0, a = i.length; s < a; s++) {
const a = i[s];
if (g(a)) {
const i = t.isWebGLCubeRenderTarget ? e.TEXTURE_CUBE_MAP : e.TEXTURE_2D
, s = r.get(a).__webglTexture;
n.bindTexture(i, s),
v(i),
n.unbindTexture()
}
}
}
,
this.updateMultisampleRenderTarget = function(t) {
if (t.samples > 0)
if (!1 === F(t)) {
const i = t.textures
, s = t.width
, a = t.height;
let o = e.COLOR_BUFFER_BIT;
const c = t.stencilBuffer ? e.DEPTH_STENCIL_ATTACHMENT : e.DEPTH_ATTACHMENT
, u = r.get(t)
, d = i.length > 1;
if (d)
for (let t = 0; t < i.length; t++)
n.bindFramebuffer(e.FRAMEBUFFER, u.__webglMultisampledFramebuffer),
e.framebufferRenderbuffer(e.FRAMEBUFFER, e.COLOR_ATTACHMENT0 + t, e.RENDERBUFFER, null),
n.bindFramebuffer(e.FRAMEBUFFER, u.__webglFramebuffer),
e.framebufferTexture2D(e.DRAW_FRAMEBUFFER, e.COLOR_ATTACHMENT0 + t, e.TEXTURE_2D, null, 0);
n.bindFramebuffer(e.READ_FRAMEBUFFER, u.__webglMultisampledFramebuffer),
n.bindFramebuffer(e.DRAW_FRAMEBUFFER, u.__webglFramebuffer);
for (let n = 0; n < i.length; n++) {
if (t.resolveDepthBuffer && (t.depthBuffer && (o |= e.DEPTH_BUFFER_BIT),
t.stencilBuffer && t.resolveStencilBuffer && (o |= e.STENCIL_BUFFER_BIT)),
d) {
e.framebufferRenderbuffer(e.READ_FRAMEBUFFER, e.COLOR_ATTACHMENT0, e.RENDERBUFFER, u.__webglColorRenderbuffer[n]);
const t = r.get(i[n]).__webglTexture;
e.framebufferTexture2D(e.DRAW_FRAMEBUFFER, e.COLOR_ATTACHMENT0, e.TEXTURE_2D, t, 0)
}
e.blitFramebuffer(0, 0, s, a, 0, 0, s, a, o, e.NEAREST),
!0 === l && (N.length = 0,
D.length = 0,
N.push(e.COLOR_ATTACHMENT0 + n),
t.depthBuffer && !1 === t.resolveDepthBuffer && (N.push(c),
D.push(c),
e.invalidateFramebuffer(e.DRAW_FRAMEBUFFER, D)),
e.invalidateFramebuffer(e.READ_FRAMEBUFFER, N))
}
if (n.bindFramebuffer(e.READ_FRAMEBUFFER, null),
n.bindFramebuffer(e.DRAW_FRAMEBUFFER, null),
d)
for (let t = 0; t < i.length; t++) {
n.bindFramebuffer(e.FRAMEBUFFER, u.__webglMultisampledFramebuffer),
e.framebufferRenderbuffer(e.FRAMEBUFFER, e.COLOR_ATTACHMENT0 + t, e.RENDERBUFFER, u.__webglColorRenderbuffer[t]);
const s = r.get(i[t]).__webglTexture;
n.bindFramebuffer(e.FRAMEBUFFER, u.__webglFramebuffer),
e.framebufferTexture2D(e.DRAW_FRAMEBUFFER, e.COLOR_ATTACHMENT0 + t, e.TEXTURE_2D, s, 0)
}
n.bindFramebuffer(e.DRAW_FRAMEBUFFER, u.__webglMultisampledFramebuffer)
} else if (t.depthBuffer && !1 === t.resolveDepthBuffer && l) {
const n = t.stencilBuffer ? e.DEPTH_STENCIL_ATTACHMENT : e.DEPTH_ATTACHMENT;
e.invalidateFramebuffer(e.DRAW_FRAMEBUFFER, [n])
}
}
,
this.setupDepthRenderbuffer = I,
this.setupFrameBufferTexture = k,
this.useMultisampledRTT = F
}
function cu(e, t) {
return {
convert: function(n) {
let r, i = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : mr;
const s = Li.getTransfer(i);
if (n === Kt)
return e.UNSIGNED_BYTE;
if (n === nn)
return e.UNSIGNED_SHORT_4_4_4_4;
if (n === rn)
return e.UNSIGNED_SHORT_5_5_5_1;
if (n === an)
return e.UNSIGNED_INT_5_9_9_9_REV;
if (n === qt)
return e.BYTE;
if (n === Yt)
return e.SHORT;
if (n === Qt)
return e.UNSIGNED_SHORT;
if (n === Zt)
return e.INT;
if (n === $t)
return e.UNSIGNED_INT;
if (n === en)
return e.FLOAT;
if (n === tn)
return e.HALF_FLOAT;
if (n === on)
return e.ALPHA;
if (n === ln)
return e.RGB;
if (n === cn)
return e.RGBA;
if (n === un)
return e.LUMINANCE;
if (n === dn)
return e.LUMINANCE_ALPHA;
if (n === hn)
return e.DEPTH_COMPONENT;
if (n === pn)
return e.DEPTH_STENCIL;
if (n === fn)
return e.RED;
if (n === mn)
return e.RED_INTEGER;
if (n === gn)
return e.RG;
if (n === vn)
return e.RG_INTEGER;
if (n === yn)
return e.RGBA_INTEGER;
if (n === xn || n === bn || n === _n || n === wn)
if (s === _r) {
if (r = t.get("WEBGL_compressed_texture_s3tc_srgb"),
null === r)
return null;
if (n === xn)
return r.COMPRESSED_SRGB_S3TC_DXT1_EXT;
if (n === bn)
return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;
if (n === _n)
return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;
if (n === wn)
return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT
} else {
if (r = t.get("WEBGL_compressed_texture_s3tc"),
null === r)
return null;
if (n === xn)
return r.COMPRESSED_RGB_S3TC_DXT1_EXT;
if (n === bn)
return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;
if (n === _n)
return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;
if (n === wn)
return r.COMPRESSED_RGBA_S3TC_DXT5_EXT
}
if (n === Sn || n === An || n === Mn || n === Cn) {
if (r = t.get("WEBGL_compressed_texture_pvrtc"),
null === r)
return null;
if (n === Sn)
return r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;
if (n === An)
return r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;
if (n === Mn)
return r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;
if (n === Cn)
return r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG
}
if (n === En || n === Tn || n === Rn) {
if (r = t.get("WEBGL_compressed_texture_etc"),
null === r)
return null;
if (n === En || n === Tn)
return s === _r ? r.COMPRESSED_SRGB8_ETC2 : r.COMPRESSED_RGB8_ETC2;
if (n === Rn)
return s === _r ? r.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC : r.COMPRESSED_RGBA8_ETC2_EAC
}
if (n === Bn || n === Pn || n === kn || n === Ln || n === In || n === Nn || n === Dn || n === jn || n === Fn || n === On || n === Un || n === zn || n === Gn || n === Hn) {
if (r = t.get("WEBGL_compressed_texture_astc"),
null === r)
return null;
if (n === Bn)
return s === _r ? r.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR : r.COMPRESSED_RGBA_ASTC_4x4_KHR;
if (n === Pn)
return s === _r ? r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR : r.COMPRESSED_RGBA_ASTC_5x4_KHR;
if (n === kn)
return s === _r ? r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR : r.COMPRESSED_RGBA_ASTC_5x5_KHR;
if (n === Ln)
return s === _r ? r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR : r.COMPRESSED_RGBA_ASTC_6x5_KHR;
if (n === In)
return s === _r ? r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR : r.COMPRESSED_RGBA_ASTC_6x6_KHR;
if (n === Nn)
return s === _r ? r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR : r.COMPRESSED_RGBA_ASTC_8x5_KHR;
if (n === Dn)
return s === _r ? r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR : r.COMPRESSED_RGBA_ASTC_8x6_KHR;
if (n === jn)
return s === _r ? r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR : r.COMPRESSED_RGBA_ASTC_8x8_KHR;
if (n === Fn)
return s === _r ? r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR : r.COMPRESSED_RGBA_ASTC_10x5_KHR;
if (n === On)
return s === _r ? r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR : r.COMPRESSED_RGBA_ASTC_10x6_KHR;
if (n === Un)
return s === _r ? r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR : r.COMPRESSED_RGBA_ASTC_10x8_KHR;
if (n === zn)
return s === _r ? r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR : r.COMPRESSED_RGBA_ASTC_10x10_KHR;
if (n === Gn)
return s === _r ? r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR : r.COMPRESSED_RGBA_ASTC_12x10_KHR;
if (n === Hn)
return s === _r ? r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR : r.COMPRESSED_RGBA_ASTC_12x12_KHR
}
if (n === Vn || n === Wn || n === Jn) {
if (r = t.get("EXT_texture_compression_bptc"),
null === r)
return null;
if (n === Vn)
return s === _r ? r.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT : r.COMPRESSED_RGBA_BPTC_UNORM_EXT;
if (n === Wn)
return r.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;
if (n === Jn)
return r.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT
}
if (n === Xn || n === Kn || n === qn || n === Yn) {
if (r = t.get("EXT_texture_compression_rgtc"),
null === r)
return null;
if (n === Vn)
return r.COMPRESSED_RED_RGTC1_EXT;
if (n === Kn)
return r.COMPRESSED_SIGNED_RED_RGTC1_EXT;
if (n === qn)
return r.COMPRESSED_RED_GREEN_RGTC2_EXT;
if (n === Yn)
return r.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT
}
return n === sn ? e.UNSIGNED_INT_24_8 : void 0 !== e[n] ? e[n] : null
}
}
}
class uu extends wo {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [];
super(),
this.isArrayCamera = !0,
this.cameras = e
}
}
class du extends ea {
constructor() {
super(),
this.isGroup = !0,
this.type = "Group"
}
}
const hu = {
type: "move"
};
class pu {
constructor() {
this._targetRay = null,
this._grip = null,
this._hand = null
}
getHandSpace() {
return null === this._hand && (this._hand = new du,
this._hand.matrixAutoUpdate = !1,
this._hand.visible = !1,
this._hand.joints = {},
this._hand.inputState = {
pinching: !1
}),
this._hand
}
getTargetRaySpace() {
return null === this._targetRay && (this._targetRay = new du,
this._targetRay.matrixAutoUpdate = !1,
this._targetRay.visible = !1,
this._targetRay.hasLinearVelocity = !1,
this._targetRay.linearVelocity = new Qi,
this._targetRay.hasAngularVelocity = !1,
this._targetRay.angularVelocity = new Qi),
this._targetRay
}
getGripSpace() {
return null === this._grip && (this._grip = new du,
this._grip.matrixAutoUpdate = !1,
this._grip.visible = !1,
this._grip.hasLinearVelocity = !1,
this._grip.linearVelocity = new Qi,
this._grip.hasAngularVelocity = !1,
this._grip.angularVelocity = new Qi),
this._grip
}
dispatchEvent(e) {
return null !== this._targetRay && this._targetRay.dispatchEvent(e),
null !== this._grip && this._grip.dispatchEvent(e),
null !== this._hand && this._hand.dispatchEvent(e),
this
}
connect(e) {
if (e && e.hand) {
const t = this._hand;
if (t)
for (const n of e.hand.values())
this._getHandJoint(t, n)
}
return this.dispatchEvent({
type: "connected",
data: e
}),
this
}
disconnect(e) {
return this.dispatchEvent({
type: "disconnected",
data: e
}),
null !== this._targetRay && (this._targetRay.visible = !1),
null !== this._grip && (this._grip.visible = !1),
null !== this._hand && (this._hand.visible = !1),
this
}
update(e, t, n) {
let r = null
, i = null
, s = null;
const a = this._targetRay
, o = this._grip
, l = this._hand;
if (e && "visible-blurred" !== t.session.visibilityState) {
if (l && e.hand) {
s = !0;
for (const s of e.hand.values()) {
const e = t.getJointPose(s, n)
, r = this._getHandJoint(l, s);
null !== e && (r.matrix.fromArray(e.transform.matrix),
r.matrix.decompose(r.position, r.rotation, r.scale),
r.matrixWorldNeedsUpdate = !0,
r.jointRadius = e.radius),
r.visible = null !== e
}
const r = l.joints["index-finger-tip"]
, i = l.joints["thumb-tip"]
, a = r.position.distanceTo(i.position)
, o = .02
, c = .005;
l.inputState.pinching && a > o + c ? (l.inputState.pinching = !1,
this.dispatchEvent({
type: "pinchend",
handedness: e.handedness,
target: this
})) : !l.inputState.pinching && a <= o - c && (l.inputState.pinching = !0,
this.dispatchEvent({
type: "pinchstart",
handedness: e.handedness,
target: this
}))
} else
null !== o && e.gripSpace && (i = t.getPose(e.gripSpace, n),
null !== i && (o.matrix.fromArray(i.transform.matrix),
o.matrix.decompose(o.position, o.rotation, o.scale),
o.matrixWorldNeedsUpdate = !0,
i.linearVelocity ? (o.hasLinearVelocity = !0,
o.linearVelocity.copy(i.linearVelocity)) : o.hasLinearVelocity = !1,
i.angularVelocity ? (o.hasAngularVelocity = !0,
o.angularVelocity.copy(i.angularVelocity)) : o.hasAngularVelocity = !1));
null !== a && (r = t.getPose(e.targetRaySpace, n),
null === r && null !== i && (r = i),
null !== r && (a.matrix.fromArray(r.transform.matrix),
a.matrix.decompose(a.position, a.rotation, a.scale),
a.matrixWorldNeedsUpdate = !0,
r.linearVelocity ? (a.hasLinearVelocity = !0,
a.linearVelocity.copy(r.linearVelocity)) : a.hasLinearVelocity = !1,
r.angularVelocity ? (a.hasAngularVelocity = !0,
a.angularVelocity.copy(r.angularVelocity)) : a.hasAngularVelocity = !1,
this.dispatchEvent(hu)))
}
return null !== a && (a.visible = null !== r),
null !== o && (o.visible = null !== i),
null !== l && (l.visible = null !== s),
this
}
_getHandJoint(e, t) {
if (void 0 === e.joints[t.jointName]) {
const n = new du;
n.matrixAutoUpdate = !1,
n.visible = !1,
e.joints[t.jointName] = n,
e.add(n)
}
return e.joints[t.jointName]
}
}
class fu {
constructor() {
this.texture = null,
this.mesh = null,
this.depthNear = 0,
this.depthFar = 0
}
init(e, t, n) {
if (null === this.texture) {
const r = new Gi;
e.properties.get(r).__webglTexture = t.texture,
t.depthNear == n.depthNear && t.depthFar == n.depthFar || (this.depthNear = t.depthNear,
this.depthFar = t.depthFar),
this.texture = r
}
}
getMesh(e) {
if (null !== this.texture && null === this.mesh) {
const t = e.cameras[0].viewport
, n = new vo({
vertexShader: "\nvoid main() {\n\n\tgl_Position = vec4( position, 1.0 );\n\n}",
fragmentShader: "\nuniform sampler2DArray depthColor;\nuniform float depthWidth;\nuniform float depthHeight;\n\nvoid main() {\n\n\tvec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight );\n\n\tif ( coord.x >= 1.0 ) {\n\n\t\tgl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r;\n\n\t} else {\n\n\t\tgl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r;\n\n\t}\n\n}",
uniforms: {
depthColor: {
value: this.texture
},
depthWidth: {
value: t.z
},
depthHeight: {
value: t.w
}
}
});
this.mesh = new co(new Do(20,20),n)
}
return this.mesh
}
reset() {
this.texture = null,
this.mesh = null
}
}
class mu extends oi {
constructor(e, t) {
super();
const n = this;
let r = null
, i = 1
, s = null
, a = "local-floor"
, o = 1
, l = null
, c = null
, u = null
, d = null
, h = null
, p = null;
const f = new fu
, m = t.getContextAttributes();
let g = null
, v = null;
const y = []
, x = []
, b = new xi;
let _ = null;
const w = new wo;
w.layers.enable(1),
w.viewport = new Hi;
const S = new wo;
S.layers.enable(2),
S.viewport = new Hi;
const A = [w, S]
, M = new uu;
M.layers.enable(1),
M.layers.enable(2);
let C = null
, E = null;
function T(e) {
const t = x.indexOf(e.inputSource);
if (-1 === t)
return;
const n = y[t];
void 0 !== n && (n.update(e.inputSource, e.frame, l || s),
n.dispatchEvent({
type: e.type,
data: e.inputSource
}))
}
function R() {
r.removeEventListener("select", T),
r.removeEventListener("selectstart", T),
r.removeEventListener("selectend", T),
r.removeEventListener("squeeze", T),
r.removeEventListener("squeezestart", T),
r.removeEventListener("squeezeend", T),
r.removeEventListener("end", R),
r.removeEventListener("inputsourceschange", B);
for (let e = 0; e < y.length; e++) {
const t = x[e];
null !== t && (x[e] = null,
y[e].disconnect(t))
}
C = null,
E = null,
f.reset(),
e.setRenderTarget(g),
h = null,
d = null,
u = null,
r = null,
v = null,
N.stop(),
n.isPresenting = !1,
e.setPixelRatio(_),
e.setSize(b.width, b.height, !1),
n.dispatchEvent({
type: "sessionend"
})
}
function B(e) {
for (let t = 0; t < e.removed.length; t++) {
const n = e.removed[t]
, r = x.indexOf(n);
r >= 0 && (x[r] = null,
y[r].disconnect(n))
}
for (let t = 0; t < e.added.length; t++) {
const n = e.added[t];
let r = x.indexOf(n);
if (-1 === r) {
for (let e = 0; e < y.length; e++) {
if (e >= x.length) {
x.push(n),
r = e;
break
}
if (null === x[e]) {
x[e] = n,
r = e;
break
}
}
if (-1 === r)
break
}
const i = y[r];
i && i.connect(n)
}
}
this.cameraAutoUpdate = !0,
this.enabled = !1,
this.isPresenting = !1,
this.getController = function(e) {
let t = y[e];
return void 0 === t && (t = new pu,
y[e] = t),
t.getTargetRaySpace()
}
,
this.getControllerGrip = function(e) {
let t = y[e];
return void 0 === t && (t = new pu,
y[e] = t),
t.getGripSpace()
}
,
this.getHand = function(e) {
let t = y[e];
return void 0 === t && (t = new pu,
y[e] = t),
t.getHandSpace()
}
,
this.setFramebufferScaleFactor = function(e) {
i = e,
!0 === n.isPresenting && console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")
}
,
this.setReferenceSpaceType = function(e) {
a = e,
!0 === n.isPresenting && console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")
}
,
this.getReferenceSpace = function() {
return l || s
}
,
this.setReferenceSpace = function(e) {
l = e
}
,
this.getBaseLayer = function() {
return null !== d ? d : h
}
,
this.getBinding = function() {
return u
}
,
this.getFrame = function() {
return p
}
,
this.getSession = function() {
return r
}
,
this.setSession = async function(c) {
if (r = c,
null !== r) {
if (g = e.getRenderTarget(),
r.addEventListener("select", T),
r.addEventListener("selectstart", T),
r.addEventListener("selectend", T),
r.addEventListener("squeeze", T),
r.addEventListener("squeezestart", T),
r.addEventListener("squeezeend", T),
r.addEventListener("end", R),
r.addEventListener("inputsourceschange", B),
!0 !== m.xrCompatible && await t.makeXRCompatible(),
_ = e.getPixelRatio(),
e.getSize(b),
void 0 === r.renderState.layers) {
const n = {
antialias: m.antialias,
alpha: !0,
depth: m.depth,
stencil: m.stencil,
framebufferScaleFactor: i
};
h = new XRWebGLLayer(r,t,n),
r.updateRenderState({
baseLayer: h
}),
e.setPixelRatio(1),
e.setSize(h.framebufferWidth, h.framebufferHeight, !1),
v = new Wi(h.framebufferWidth,h.framebufferHeight,{
format: cn,
type: Kt,
colorSpace: e.outputColorSpace,
stencilBuffer: m.stencil
})
} else {
let n = null
, s = null
, a = null;
m.depth && (a = m.stencil ? t.DEPTH24_STENCIL8 : t.DEPTH_COMPONENT24,
n = m.stencil ? pn : hn,
s = m.stencil ? sn : $t);
const o = {
colorFormat: t.RGBA8,
depthFormat: a,
scaleFactor: i
};
u = new XRWebGLBinding(r,t),
d = u.createProjectionLayer(o),
r.updateRenderState({
layers: [d]
}),
e.setPixelRatio(1),
e.setSize(d.textureWidth, d.textureHeight, !1),
v = new Wi(d.textureWidth,d.textureHeight,{
format: cn,
type: Kt,
depthTexture: new xl(d.textureWidth,d.textureHeight,s,void 0,void 0,void 0,void 0,void 0,void 0,n),
stencilBuffer: m.stencil,
colorSpace: e.outputColorSpace,
samples: m.antialias ? 4 : 0,
resolveDepthBuffer: !1 === d.ignoreDepthValues
})
}
v.isXRRenderTarget = !0,
this.setFoveation(o),
l = null,
s = await r.requestReferenceSpace(a),
N.setContext(r),
N.start(),
n.isPresenting = !0,
n.dispatchEvent({
type: "sessionstart"
})
}
}
,
this.getEnvironmentBlendMode = function() {
if (null !== r)
return r.environmentBlendMode
}
;
const P = new Qi
, k = new Qi;
function L(e, t) {
null === t ? e.matrixWorld.copy(e.matrix) : e.matrixWorld.multiplyMatrices(t.matrixWorld, e.matrix),
e.matrixWorldInverse.copy(e.matrixWorld).invert()
}
this.updateCamera = function(e) {
if (null === r)
return;
null !== f.texture && (e.near = f.depthNear,
e.far = f.depthFar),
M.near = S.near = w.near = e.near,
M.far = S.far = w.far = e.far,
C === M.near && E === M.far || (r.updateRenderState({
depthNear: M.near,
depthFar: M.far
}),
C = M.near,
E = M.far,
w.near = C,
w.far = E,
S.near = C,
S.far = E,
w.updateProjectionMatrix(),
S.updateProjectionMatrix(),
e.updateProjectionMatrix());
const t = e.parent
, n = M.cameras;
L(M, t);
for (let r = 0; r < n.length; r++)
L(n[r], t);
2 === n.length ? function(e, t, n) {
P.setFromMatrixPosition(t.matrixWorld),
k.setFromMatrixPosition(n.matrixWorld);
const r = P.distanceTo(k)
, i = t.projectionMatrix.elements
, s = n.projectionMatrix.elements
, a = i[14] / (i[10] - 1)
, o = i[14] / (i[10] + 1)
, l = (i[9] + 1) / i[5]
, c = (i[9] - 1) / i[5]
, u = (i[8] - 1) / i[0]
, d = (s[8] + 1) / s[0]
, h = a * u
, p = a * d
, f = r / (-u + d)
, m = f * -u;
t.matrixWorld.decompose(e.position, e.quaternion, e.scale),
e.translateX(m),
e.translateZ(f),
e.matrixWorld.compose(e.position, e.quaternion, e.scale),
e.matrixWorldInverse.copy(e.matrixWorld).invert();
const g = a + f
, v = o + f
, y = h - m
, x = p + (r - m)
, b = l * o / v * g
, _ = c * o / v * g;
e.projectionMatrix.makePerspective(y, x, b, _, g, v),
e.projectionMatrixInverse.copy(e.projectionMatrix).invert()
}(M, w, S) : M.projectionMatrix.copy(w.projectionMatrix),
function(e, t, n) {
null === n ? e.matrix.copy(t.matrixWorld) : (e.matrix.copy(n.matrixWorld),
e.matrix.invert(),
e.matrix.multiply(t.matrixWorld));
e.matrix.decompose(e.position, e.quaternion, e.scale),
e.updateMatrixWorld(!0),
e.projectionMatrix.copy(t.projectionMatrix),
e.projectionMatrixInverse.copy(t.projectionMatrixInverse),
e.isPerspectiveCamera && (e.fov = 2 * di * Math.atan(1 / e.projectionMatrix.elements[5]),
e.zoom = 1)
}(e, M, t)
}
,
this.getCamera = function() {
return M
}
,
this.getFoveation = function() {
if (null !== d || null !== h)
return o
}
,
this.setFoveation = function(e) {
o = e,
null !== d && (d.fixedFoveation = e),
null !== h && void 0 !== h.fixedFoveation && (h.fixedFoveation = e)
}
,
this.hasDepthSensing = function() {
return null !== f.texture
}
,
this.getDepthSensingMesh = function() {
return f.getMesh(M)
}
;
let I = null;
const N = new Io;
N.setAnimationLoop((function(t, i) {
if (c = i.getViewerPose(l || s),
p = i,
null !== c) {
const t = c.views;
null !== h && (e.setRenderTargetFramebuffer(v, h.framebuffer),
e.setRenderTarget(v));
let n = !1;
t.length !== M.cameras.length && (M.cameras.length = 0,
n = !0);
for (let r = 0; r < t.length; r++) {
const i = t[r];
let s = null;
if (null !== h)
s = h.getViewport(i);
else {
const t = u.getViewSubImage(d, i);
s = t.viewport,
0 === r && (e.setRenderTargetTextures(v, t.colorTexture, d.ignoreDepthValues ? void 0 : t.depthStencilTexture),
e.setRenderTarget(v))
}
let a = A[r];
void 0 === a && (a = new wo,
a.layers.enable(r),
a.viewport = new Hi,
A[r] = a),
a.matrix.fromArray(i.transform.matrix),
a.matrix.decompose(a.position, a.quaternion, a.scale),
a.projectionMatrix.fromArray(i.projectionMatrix),
a.projectionMatrixInverse.copy(a.projectionMatrix).invert(),
a.viewport.set(s.x, s.y, s.width, s.height),
0 === r && (M.matrix.copy(a.matrix),
M.matrix.decompose(M.position, M.quaternion, M.scale)),
!0 === n && M.cameras.push(a)
}
const i = r.enabledFeatures;
if (i && i.includes("depth-sensing")) {
const n = u.getDepthInformation(t[0]);
n && n.isValid && n.texture && f.init(e, n, r.renderState)
}
}
for (let e = 0; e < y.length; e++) {
const t = x[e]
, n = y[e];
null !== t && void 0 !== n && n.update(t, i, l || s)
}
I && I(t, i),
i.detectedPlanes && n.dispatchEvent({
type: "planesdetected",
data: i
}),
p = null
}
)),
this.setAnimationLoop = function(e) {
I = e
}
,
this.dispose = function() {}
}
}
const gu = new js
, vu = new Es;
function yu(e, t) {
function n(e, t) {
!0 === e.matrixAutoUpdate && e.updateMatrix(),
t.value.copy(e.matrix)
}
function r(e, r) {
e.opacity.value = r.opacity,
r.color && e.diffuse.value.copy(r.color),
r.emissive && e.emissive.value.copy(r.emissive).multiplyScalar(r.emissiveIntensity),
r.map && (e.map.value = r.map,
n(r.map, e.mapTransform)),
r.alphaMap && (e.alphaMap.value = r.alphaMap,
n(r.alphaMap, e.alphaMapTransform)),
r.bumpMap && (e.bumpMap.value = r.bumpMap,
n(r.bumpMap, e.bumpMapTransform),
e.bumpScale.value = r.bumpScale,
r.side === Ie && (e.bumpScale.value *= -1)),
r.normalMap && (e.normalMap.value = r.normalMap,
n(r.normalMap, e.normalMapTransform),
e.normalScale.value.copy(r.normalScale),
r.side === Ie && e.normalScale.value.negate()),
r.displacementMap && (e.displacementMap.value = r.displacementMap,
n(r.displacementMap, e.displacementMapTransform),
e.displacementScale.value = r.displacementScale,
e.displacementBias.value = r.displacementBias),
r.emissiveMap && (e.emissiveMap.value = r.emissiveMap,
n(r.emissiveMap, e.emissiveMapTransform)),
r.specularMap && (e.specularMap.value = r.specularMap,
n(r.specularMap, e.specularMapTransform)),
r.alphaTest > 0 && (e.alphaTest.value = r.alphaTest);
const i = t.get(r)
, s = i.envMap
, a = i.envMapRotation;
s && (e.envMap.value = s,
gu.copy(a),
gu.x *= -1,
gu.y *= -1,
gu.z *= -1,
s.isCubeTexture && !1 === s.isRenderTargetTexture && (gu.y *= -1,
gu.z *= -1),
e.envMapRotation.value.setFromMatrix4(vu.makeRotationFromEuler(gu)),
e.flipEnvMap.value = s.isCubeTexture && !1 === s.isRenderTargetTexture ? -1 : 1,
e.reflectivity.value = r.reflectivity,
e.ior.value = r.ior,
e.refractionRatio.value = r.refractionRatio),
r.lightMap && (e.lightMap.value = r.lightMap,
e.lightMapIntensity.value = r.lightMapIntensity,
n(r.lightMap, e.lightMapTransform)),
r.aoMap && (e.aoMap.value = r.aoMap,
e.aoMapIntensity.value = r.aoMapIntensity,
n(r.aoMap, e.aoMapTransform))
}
return {
refreshFogUniforms: function(t, n) {
n.color.getRGB(t.fogColor.value, mo(e)),
n.isFog ? (t.fogNear.value = n.near,
t.fogFar.value = n.far) : n.isFogExp2 && (t.fogDensity.value = n.density)
},
refreshMaterialUniforms: function(e, i, s, a, o) {
i.isMeshBasicMaterial || i.isMeshLambertMaterial ? r(e, i) : i.isMeshToonMaterial ? (r(e, i),
function(e, t) {
t.gradientMap && (e.gradientMap.value = t.gradientMap)
}(e, i)) : i.isMeshPhongMaterial ? (r(e, i),
function(e, t) {
e.specular.value.copy(t.specular),
e.shininess.value = Math.max(t.shininess, 1e-4)
}(e, i)) : i.isMeshStandardMaterial ? (r(e, i),
function(e, t) {
e.metalness.value = t.metalness,
t.metalnessMap && (e.metalnessMap.value = t.metalnessMap,
n(t.metalnessMap, e.metalnessMapTransform));
e.roughness.value = t.roughness,
t.roughnessMap && (e.roughnessMap.value = t.roughnessMap,
n(t.roughnessMap, e.roughnessMapTransform));
t.envMap && (e.envMapIntensity.value = t.envMapIntensity)
}(e, i),
i.isMeshPhysicalMaterial && function(e, t, r) {
e.ior.value = t.ior,
t.sheen > 0 && (e.sheenColor.value.copy(t.sheenColor).multiplyScalar(t.sheen),
e.sheenRoughness.value = t.sheenRoughness,
t.sheenColorMap && (e.sheenColorMap.value = t.sheenColorMap,
n(t.sheenColorMap, e.sheenColorMapTransform)),
t.sheenRoughnessMap && (e.sheenRoughnessMap.value = t.sheenRoughnessMap,
n(t.sheenRoughnessMap, e.sheenRoughnessMapTransform)));
t.clearcoat > 0 && (e.clearcoat.value = t.clearcoat,
e.clearcoatRoughness.value = t.clearcoatRoughness,
t.clearcoatMap && (e.clearcoatMap.value = t.clearcoatMap,
n(t.clearcoatMap, e.clearcoatMapTransform)),
t.clearcoatRoughnessMap && (e.clearcoatRoughnessMap.value = t.clearcoatRoughnessMap,
n(t.clearcoatRoughnessMap, e.clearcoatRoughnessMapTransform)),
t.clearcoatNormalMap && (e.clearcoatNormalMap.value = t.clearcoatNormalMap,
n(t.clearcoatNormalMap, e.clearcoatNormalMapTransform),
e.clearcoatNormalScale.value.copy(t.clearcoatNormalScale),
t.side === Ie && e.clearcoatNormalScale.value.negate()));
t.dispersion > 0 && (e.dispersion.value = t.dispersion);
t.iridescence > 0 && (e.iridescence.value = t.iridescence,
e.iridescenceIOR.value = t.iridescenceIOR,
e.iridescenceThicknessMinimum.value = t.iridescenceThicknessRange[0],
e.iridescenceThicknessMaximum.value = t.iridescenceThicknessRange[1],
t.iridescenceMap && (e.iridescenceMap.value = t.iridescenceMap,
n(t.iridescenceMap, e.iridescenceMapTransform)),
t.iridescenceThicknessMap && (e.iridescenceThicknessMap.value = t.iridescenceThicknessMap,
n(t.iridescenceThicknessMap, e.iridescenceThicknessMapTransform)));
t.transmission > 0 && (e.transmission.value = t.transmission,
e.transmissionSamplerMap.value = r.texture,
e.transmissionSamplerSize.value.set(r.width, r.height),
t.transmissionMap && (e.transmissionMap.value = t.transmissionMap,
n(t.transmissionMap, e.transmissionMapTransform)),
e.thickness.value = t.thickness,
t.thicknessMap && (e.thicknessMap.value = t.thicknessMap,
n(t.thicknessMap, e.thicknessMapTransform)),
e.attenuationDistance.value = t.attenuationDistance,
e.attenuationColor.value.copy(t.attenuationColor));
t.anisotropy > 0 && (e.anisotropyVector.value.set(t.anisotropy * Math.cos(t.anisotropyRotation), t.anisotropy * Math.sin(t.anisotropyRotation)),
t.anisotropyMap && (e.anisotropyMap.value = t.anisotropyMap,
n(t.anisotropyMap, e.anisotropyMapTransform)));
e.specularIntensity.value = t.specularIntensity,
e.specularColor.value.copy(t.specularColor),
t.specularColorMap && (e.specularColorMap.value = t.specularColorMap,
n(t.specularColorMap, e.specularColorMapTransform));
t.specularIntensityMap && (e.specularIntensityMap.value = t.specularIntensityMap,
n(t.specularIntensityMap, e.specularIntensityMapTransform))
}(e, i, o)) : i.isMeshMatcapMaterial ? (r(e, i),
function(e, t) {
t.matcap && (e.matcap.value = t.matcap)
}(e, i)) : i.isMeshDepthMaterial ? r(e, i) : i.isMeshDistanceMaterial ? (r(e, i),
function(e, n) {
const r = t.get(n).light;
e.referencePosition.value.setFromMatrixPosition(r.matrixWorld),
e.nearDistance.value = r.shadow.camera.near,
e.farDistance.value = r.shadow.camera.far
}(e, i)) : i.isMeshNormalMaterial ? r(e, i) : i.isLineBasicMaterial ? (function(e, t) {
e.diffuse.value.copy(t.color),
e.opacity.value = t.opacity,
t.map && (e.map.value = t.map,
n(t.map, e.mapTransform))
}(e, i),
i.isLineDashedMaterial && function(e, t) {
e.dashSize.value = t.dashSize,
e.totalSize.value = t.dashSize + t.gapSize,
e.scale.value = t.scale
}(e, i)) : i.isPointsMaterial ? function(e, t, r, i) {
e.diffuse.value.copy(t.color),
e.opacity.value = t.opacity,
e.size.value = t.size * r,
e.scale.value = .5 * i,
t.map && (e.map.value = t.map,
n(t.map, e.uvTransform));
t.alphaMap && (e.alphaMap.value = t.alphaMap,
n(t.alphaMap, e.alphaMapTransform));
t.alphaTest > 0 && (e.alphaTest.value = t.alphaTest)
}(e, i, s, a) : i.isSpriteMaterial ? function(e, t) {
e.diffuse.value.copy(t.color),
e.opacity.value = t.opacity,
e.rotation.value = t.rotation,
t.map && (e.map.value = t.map,
n(t.map, e.mapTransform));
t.alphaMap && (e.alphaMap.value = t.alphaMap,
n(t.alphaMap, e.alphaMapTransform));
t.alphaTest > 0 && (e.alphaTest.value = t.alphaTest)
}(e, i) : i.isShadowMaterial ? (e.color.value.copy(i.color),
e.opacity.value = i.opacity) : i.isShaderMaterial && (i.uniformsNeedUpdate = !1)
}
}
}
function xu(e, t, n, r) {
let i = {}
, s = {}
, a = [];
const o = e.getParameter(e.MAX_UNIFORM_BUFFER_BINDINGS);
function l(e, t, n, r) {
const i = e.value
, s = t + "_" + n;
if (void 0 === r[s])
return r[s] = "number" === typeof i || "boolean" === typeof i ? i : i.clone(),
!0;
{
const e = r[s];
if ("number" === typeof i || "boolean" === typeof i) {
if (e !== i)
return r[s] = i,
!0
} else if (!1 === e.equals(i))
return e.copy(i),
!0
}
return !1
}
function c(e) {
const t = {
boundary: 0,
storage: 0
};
return "number" === typeof e || "boolean" === typeof e ? (t.boundary = 4,
t.storage = 4) : e.isVector2 ? (t.boundary = 8,
t.storage = 8) : e.isVector3 || e.isColor ? (t.boundary = 16,
t.storage = 12) : e.isVector4 ? (t.boundary = 16,
t.storage = 16) : e.isMatrix3 ? (t.boundary = 48,
t.storage = 48) : e.isMatrix4 ? (t.boundary = 64,
t.storage = 64) : e.isTexture ? console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group.") : console.warn("THREE.WebGLRenderer: Unsupported uniform value type.", e),
t
}
function u(t) {
const n = t.target;
n.removeEventListener("dispose", u);
const r = a.indexOf(n.__bindingPointIndex);
a.splice(r, 1),
e.deleteBuffer(i[n.id]),
delete i[n.id],
delete s[n.id]
}
return {
bind: function(e, t) {
const n = t.program;
r.uniformBlockBinding(e, n)
},
update: function(n, d) {
let h = i[n.id];
void 0 === h && (!function(e) {
const t = e.uniforms;
let n = 0;
const r = 16;
for (let s = 0, a = t.length; s < a; s++) {
const e = Array.isArray(t[s]) ? t[s] : [t[s]];
for (let t = 0, i = e.length; t < i; t++) {
const i = e[t]
, s = Array.isArray(i.value) ? i.value : [i.value];
for (let e = 0, t = s.length; e < t; e++) {
const t = c(s[e])
, a = n % r;
0 !== a && r - a < t.boundary && (n += r - a),
i.__data = new Float32Array(t.storage / Float32Array.BYTES_PER_ELEMENT),
i.__offset = n,
n += t.storage
}
}
}
const i = n % r;
i > 0 && (n += r - i);
e.__size = n,
e.__cache = {}
}(n),
h = function(t) {
const n = function() {
for (let e = 0; e < o; e++)
if (-1 === a.indexOf(e))
return a.push(e),
e;
return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),
0
}();
t.__bindingPointIndex = n;
const r = e.createBuffer()
, i = t.__size
, s = t.usage;
return e.bindBuffer(e.UNIFORM_BUFFER, r),
e.bufferData(e.UNIFORM_BUFFER, i, s),
e.bindBuffer(e.UNIFORM_BUFFER, null),
e.bindBufferBase(e.UNIFORM_BUFFER, n, r),
r
}(n),
i[n.id] = h,
n.addEventListener("dispose", u));
const p = d.program;
r.updateUBOMapping(n, p);
const f = t.render.frame;
s[n.id] !== f && (!function(t) {
const n = i[t.id]
, r = t.uniforms
, s = t.__cache;
e.bindBuffer(e.UNIFORM_BUFFER, n);
for (let i = 0, a = r.length; i < a; i++) {
const t = Array.isArray(r[i]) ? r[i] : [r[i]];
for (let n = 0, r = t.length; n < r; n++) {
const r = t[n];
if (!0 === l(r, i, n, s)) {
const t = r.__offset
, n = Array.isArray(r.value) ? r.value : [r.value];
let i = 0;
for (let s = 0; s < n.length; s++) {
const a = n[s]
, o = c(a);
"number" === typeof a || "boolean" === typeof a ? (r.__data[0] = a,
e.bufferSubData(e.UNIFORM_BUFFER, t + i, r.__data)) : a.isMatrix3 ? (r.__data[0] = a.elements[0],
r.__data[1] = a.elements[1],
r.__data[2] = a.elements[2],
r.__data[3] = 0,
r.__data[4] = a.elements[3],
r.__data[5] = a.elements[4],
r.__data[6] = a.elements[5],
r.__data[7] = 0,
r.__data[8] = a.elements[6],
r.__data[9] = a.elements[7],
r.__data[10] = a.elements[8],
r.__data[11] = 0) : (a.toArray(r.__data, i),
i += o.storage / Float32Array.BYTES_PER_ELEMENT)
}
e.bufferSubData(e.UNIFORM_BUFFER, t, r.__data)
}
}
}
e.bindBuffer(e.UNIFORM_BUFFER, null)
}(n),
s[n.id] = f)
},
dispose: function() {
for (const t in i)
e.deleteBuffer(i[t]);
a = [],
i = {},
s = {}
}
}
}
class bu {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
const {canvas: t=Ci(), context: n=null, depth: r=!0, stencil: i=!1, alpha: s=!1, antialias: a=!1, premultipliedAlpha: o=!0, preserveDrawingBuffer: l=!1, powerPreference: c="default", failIfMajorPerformanceCaveat: u=!1} = e;
let d;
if (this.isWebGLRenderer = !0,
null !== n) {
if ("undefined" !== typeof WebGLRenderingContext && n instanceof WebGLRenderingContext)
throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");
d = n.getContextAttributes().alpha
} else
d = s;
const h = new Uint32Array(4)
, p = new Int32Array(4);
let f = null
, m = null;
const g = []
, v = [];
this.domElement = t,
this.debug = {
checkShaderErrors: !0,
onShaderError: null
},
this.autoClear = !0,
this.autoClearColor = !0,
this.autoClearDepth = !0,
this.autoClearStencil = !0,
this.sortObjects = !0,
this.clippingPlanes = [],
this.localClippingEnabled = !1,
this._outputColorSpace = gr,
this.toneMapping = xt,
this.toneMappingExposure = 1;
const y = this;
let x = !1
, b = 0
, _ = 0
, w = null
, S = -1
, A = null;
const M = new Hi
, C = new Hi;
let E = null;
const T = new ga(0);
let R = 0
, B = t.width
, P = t.height
, k = 1
, L = null
, I = null;
const N = new Hi(0,0,B,P)
, D = new Hi(0,0,B,P);
let j = !1;
const F = new Lo;
let O = !1
, U = !1;
const z = new Es
, G = new Qi
, H = {
background: null,
fog: null,
environment: null,
overrideMaterial: null,
isScene: !0
};
let V = !1;
function W() {
return null === w ? k : 1
}
let J, X, K, q, Y, Q, Z, $, ee, te, ne, re, ie, se, ae, oe, le, ce, ue, de, he, pe, fe, me, ge = n;
function ve(e, n) {
return t.getContext(e, n)
}
try {
const e = {
alpha: !0,
depth: r,
stencil: i,
antialias: a,
premultipliedAlpha: o,
preserveDrawingBuffer: l,
powerPreference: c,
failIfMajorPerformanceCaveat: u
};
if ("setAttribute"in t && t.setAttribute("data-engine", "three.js r".concat(we)),
t.addEventListener("webglcontextlost", be, !1),
t.addEventListener("webglcontextrestored", _e, !1),
t.addEventListener("webglcontextcreationerror", Se, !1),
null === ge) {
const t = "webgl2";
if (ge = ve(t, e),
null === ge)
throw ve(t) ? new Error("Error creating WebGL context with your selected attributes.") : new Error("Error creating WebGL context.")
}
} catch (iy) {
throw console.error("THREE.WebGLRenderer: " + iy.message),
iy
}
function ye() {
J = new pl(ge),
J.init(),
pe = new cu(ge,J),
X = new Jo(ge,J,e,pe),
K = new ou(ge),
q = new gl(ge),
Y = new Xc,
Q = new lu(ge,J,K,Y,X,pe,q),
Z = new Ko(y),
$ = new hl(y),
ee = new No(ge),
fe = new Vo(ge,ee),
te = new fl(ge,ee,q,fe),
ne = new yl(ge,te,ee,q),
ue = new vl(ge,X,Q),
oe = new Xo(Y),
re = new Jc(y,Z,$,J,X,fe,oe),
ie = new yu(y,Y),
se = new Qc,
ae = new ru(J),
ce = new Ho(y,Z,$,K,ne,d,o),
le = new au(y,ne,X),
me = new xu(ge,q,X,K),
de = new Wo(ge,J,q),
he = new ml(ge,J,q),
q.programs = re.programs,
y.capabilities = X,
y.extensions = J,
y.properties = Y,
y.renderLists = se,
y.shadowMap = le,
y.state = K,
y.info = q
}
ye();
const xe = new mu(y,ge);
function be(e) {
e.preventDefault(),
console.log("THREE.WebGLRenderer: Context Lost."),
x = !0
}
function _e() {
console.log("THREE.WebGLRenderer: Context Restored."),
x = !1;
const e = q.autoReset
, t = le.enabled
, n = le.autoUpdate
, r = le.needsUpdate
, i = le.type;
ye(),
q.autoReset = e,
le.enabled = t,
le.autoUpdate = n,
le.needsUpdate = r,
le.type = i
}
function Se(e) {
console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ", e.statusMessage)
}
function Ae(e) {
const t = e.target;
t.removeEventListener("dispose", Ae),
function(e) {
(function(e) {
const t = Y.get(e).programs;
void 0 !== t && (t.forEach((function(e) {
re.releaseProgram(e)
}
)),
e.isShaderMaterial && re.releaseShaderCache(e))
}
)(e),
Y.remove(e)
}(t)
}
function Me(e, t, n) {
!0 === e.transparent && e.side === Ne && !1 === e.forceSinglePass ? (e.side = Ie,
e.needsUpdate = !0,
Fe(e, t, n),
e.side = Le,
e.needsUpdate = !0,
Fe(e, t, n),
e.side = Ne) : Fe(e, t, n)
}
this.xr = xe,
this.getContext = function() {
return ge
}
,
this.getContextAttributes = function() {
return ge.getContextAttributes()
}
,
this.forceContextLoss = function() {
const e = J.get("WEBGL_lose_context");
e && e.loseContext()
}
,
this.forceContextRestore = function() {
const e = J.get("WEBGL_lose_context");
e && e.restoreContext()
}
,
this.getPixelRatio = function() {
return k
}
,
this.setPixelRatio = function(e) {
void 0 !== e && (k = e,
this.setSize(B, P, !1))
}
,
this.getSize = function(e) {
return e.set(B, P)
}
,
this.setSize = function(e, n) {
let r = !(arguments.length > 2 && void 0 !== arguments[2]) || arguments[2];
xe.isPresenting ? console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.") : (B = e,
P = n,
t.width = Math.floor(e * k),
t.height = Math.floor(n * k),
!0 === r && (t.style.width = e + "px",
t.style.height = n + "px"),
this.setViewport(0, 0, e, n))
}
,
this.getDrawingBufferSize = function(e) {
return e.set(B * k, P * k).floor()
}
,
this.setDrawingBufferSize = function(e, n, r) {
B = e,
P = n,
k = r,
t.width = Math.floor(e * r),
t.height = Math.floor(n * r),
this.setViewport(0, 0, e, n)
}
,
this.getCurrentViewport = function(e) {
return e.copy(M)
}
,
this.getViewport = function(e) {
return e.copy(N)
}
,
this.setViewport = function(e, t, n, r) {
e.isVector4 ? N.set(e.x, e.y, e.z, e.w) : N.set(e, t, n, r),
K.viewport(M.copy(N).multiplyScalar(k).round())
}
,
this.getScissor = function(e) {
return e.copy(D)
}
,
this.setScissor = function(e, t, n, r) {
e.isVector4 ? D.set(e.x, e.y, e.z, e.w) : D.set(e, t, n, r),
K.scissor(C.copy(D).multiplyScalar(k).round())
}
,
this.getScissorTest = function() {
return j
}
,
this.setScissorTest = function(e) {
K.setScissorTest(j = e)
}
,
this.setOpaqueSort = function(e) {
L = e
}
,
this.setTransparentSort = function(e) {
I = e
}
,
this.getClearColor = function(e) {
return e.copy(ce.getClearColor())
}
,
this.setClearColor = function() {
ce.setClearColor.apply(ce, arguments)
}
,
this.getClearAlpha = function() {
return ce.getClearAlpha()
}
,
this.setClearAlpha = function() {
ce.setClearAlpha.apply(ce, arguments)
}
,
this.clear = function() {
let e = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1]
, t = !(arguments.length > 2 && void 0 !== arguments[2]) || arguments[2]
, n = 0;
if (!(arguments.length > 0 && void 0 !== arguments[0]) || arguments[0]) {
let e = !1;
if (null !== w) {
const t = w.texture.format;
e = t === yn || t === vn || t === mn
}
if (e) {
const e = w.texture.type
, t = e === Kt || e === $t || e === Qt || e === sn || e === nn || e === rn
, n = ce.getClearColor()
, r = ce.getClearAlpha()
, i = n.r
, s = n.g
, a = n.b;
t ? (h[0] = i,
h[1] = s,
h[2] = a,
h[3] = r,
ge.clearBufferuiv(ge.COLOR, 0, h)) : (p[0] = i,
p[1] = s,
p[2] = a,
p[3] = r,
ge.clearBufferiv(ge.COLOR, 0, p))
} else
n |= ge.COLOR_BUFFER_BIT
}
e && (n |= ge.DEPTH_BUFFER_BIT),
t && (n |= ge.STENCIL_BUFFER_BIT,
this.state.buffers.stencil.setMask(4294967295)),
ge.clear(n)
}
,
this.clearColor = function() {
this.clear(!0, !1, !1)
}
,
this.clearDepth = function() {
this.clear(!1, !0, !1)
}
,
this.clearStencil = function() {
this.clear(!1, !1, !0)
}
,
this.dispose = function() {
t.removeEventListener("webglcontextlost", be, !1),
t.removeEventListener("webglcontextrestored", _e, !1),
t.removeEventListener("webglcontextcreationerror", Se, !1),
se.dispose(),
ae.dispose(),
Y.dispose(),
Z.dispose(),
$.dispose(),
ne.dispose(),
fe.dispose(),
me.dispose(),
re.dispose(),
xe.dispose(),
xe.removeEventListener("sessionstart", Ee),
xe.removeEventListener("sessionend", Te),
Re.stop()
}
,
this.renderBufferDirect = function(e, t, n, r, i, s) {
null === t && (t = H);
const a = i.isMesh && i.matrixWorld.determinant() < 0
, o = function(e, t, n, r, i) {
!0 !== t.isScene && (t = H);
Q.resetTextureUnits();
const s = t.fog
, a = r.isMeshStandardMaterial ? t.environment : null
, o = null === w ? y.outputColorSpace : !0 === w.isXRRenderTarget ? w.texture.colorSpace : vr
, l = (r.isMeshStandardMaterial ? $ : Z).get(r.envMap || a)
, c = !0 === r.vertexColors && !!n.attributes.color && 4 === n.attributes.color.itemSize
, u = !!n.attributes.tangent && (!!r.normalMap || r.anisotropy > 0)
, d = !!n.morphAttributes.position
, h = !!n.morphAttributes.normal
, p = !!n.morphAttributes.color;
let f = xt;
r.toneMapped && (null !== w && !0 !== w.isXRRenderTarget || (f = y.toneMapping));
const g = n.morphAttributes.position || n.morphAttributes.normal || n.morphAttributes.color
, v = void 0 !== g ? g.length : 0
, x = Y.get(r)
, b = m.state.lights;
if (!0 === O && (!0 === U || e !== A)) {
const t = e === A && r.id === S;
oe.setState(r, e, t)
}
let _ = !1;
r.version === x.__version ? x.needsLights && x.lightsStateVersion !== b.state.version || x.outputColorSpace !== o || i.isBatchedMesh && !1 === x.batching ? _ = !0 : i.isBatchedMesh || !0 !== x.batching ? i.isBatchedMesh && !0 === x.batchingColor && null === i.colorTexture || i.isBatchedMesh && !1 === x.batchingColor && null !== i.colorTexture || i.isInstancedMesh && !1 === x.instancing ? _ = !0 : i.isInstancedMesh || !0 !== x.instancing ? i.isSkinnedMesh && !1 === x.skinning ? _ = !0 : i.isSkinnedMesh || !0 !== x.skinning ? i.isInstancedMesh && !0 === x.instancingColor && null === i.instanceColor || i.isInstancedMesh && !1 === x.instancingColor && null !== i.instanceColor || i.isInstancedMesh && !0 === x.instancingMorph && null === i.morphTexture || i.isInstancedMesh && !1 === x.instancingMorph && null !== i.morphTexture || x.envMap !== l || !0 === r.fog && x.fog !== s ? _ = !0 : void 0 === x.numClippingPlanes || x.numClippingPlanes === oe.numPlanes && x.numIntersection === oe.numIntersection ? (x.vertexAlphas !== c || x.vertexTangents !== u || x.morphTargets !== d || x.morphNormals !== h || x.morphColors !== p || x.toneMapping !== f || x.morphTargetsCount !== v) && (_ = !0) : _ = !0 : _ = !0 : _ = !0 : _ = !0 : (_ = !0,
x.__version = r.version);
let M = x.currentProgram;
!0 === _ && (M = Fe(r, t, i));
let C = !1
, E = !1
, T = !1;
const R = M.getUniforms()
, B = x.uniforms;
K.useProgram(M.program) && (C = !0,
E = !0,
T = !0);
r.id !== S && (S = r.id,
E = !0);
if (C || A !== e) {
R.setValue(ge, "projectionMatrix", e.projectionMatrix),
R.setValue(ge, "viewMatrix", e.matrixWorldInverse);
const t = R.map.cameraPosition;
void 0 !== t && t.setValue(ge, G.setFromMatrixPosition(e.matrixWorld)),
X.logarithmicDepthBuffer && R.setValue(ge, "logDepthBufFC", 2 / (Math.log(e.far + 1) / Math.LN2)),
(r.isMeshPhongMaterial || r.isMeshToonMaterial || r.isMeshLambertMaterial || r.isMeshBasicMaterial || r.isMeshStandardMaterial || r.isShaderMaterial) && R.setValue(ge, "isOrthographic", !0 === e.isOrthographicCamera),
A !== e && (A = e,
E = !0,
T = !0)
}
if (i.isSkinnedMesh) {
R.setOptional(ge, i, "bindMatrix"),
R.setOptional(ge, i, "bindMatrixInverse");
const e = i.skeleton;
e && (null === e.boneTexture && e.computeBoneTexture(),
R.setValue(ge, "boneTexture", e.boneTexture, Q))
}
i.isBatchedMesh && (R.setOptional(ge, i, "batchingTexture"),
R.setValue(ge, "batchingTexture", i._matricesTexture, Q),
R.setOptional(ge, i, "batchingColorTexture"),
null !== i._colorsTexture && R.setValue(ge, "batchingColorTexture", i._colorsTexture, Q));
const L = n.morphAttributes;
void 0 === L.position && void 0 === L.normal && void 0 === L.color || ue.update(i, n, M);
(E || x.receiveShadow !== i.receiveShadow) && (x.receiveShadow = i.receiveShadow,
R.setValue(ge, "receiveShadow", i.receiveShadow));
r.isMeshGouraudMaterial && null !== r.envMap && (B.envMap.value = l,
B.flipEnvMap.value = l.isCubeTexture && !1 === l.isRenderTargetTexture ? -1 : 1);
r.isMeshStandardMaterial && null === r.envMap && null !== t.environment && (B.envMapIntensity.value = t.environmentIntensity);
E && (R.setValue(ge, "toneMappingExposure", y.toneMappingExposure),
x.needsLights && (N = T,
(I = B).ambientLightColor.needsUpdate = N,
I.lightProbe.needsUpdate = N,
I.directionalLights.needsUpdate = N,
I.directionalLightShadows.needsUpdate = N,
I.pointLights.needsUpdate = N,
I.pointLightShadows.needsUpdate = N,
I.spotLights.needsUpdate = N,
I.spotLightShadows.needsUpdate = N,
I.rectAreaLights.needsUpdate = N,
I.hemisphereLights.needsUpdate = N),
s && !0 === r.fog && ie.refreshFogUniforms(B, s),
ie.refreshMaterialUniforms(B, r, k, P, m.state.transmissionRenderTarget[e.id]),
Ac.upload(ge, Oe(x), B, Q));
var I, N;
r.isShaderMaterial && !0 === r.uniformsNeedUpdate && (Ac.upload(ge, Oe(x), B, Q),
r.uniformsNeedUpdate = !1);
r.isSpriteMaterial && R.setValue(ge, "center", i.center);
if (R.setValue(ge, "modelViewMatrix", i.modelViewMatrix),
R.setValue(ge, "normalMatrix", i.normalMatrix),
R.setValue(ge, "modelMatrix", i.matrixWorld),
r.isShaderMaterial || r.isRawShaderMaterial) {
const e = r.uniformsGroups;
for (let t = 0, n = e.length; t < n; t++) {
const n = e[t];
me.update(n, M),
me.bind(n, M)
}
}
return M
}(e, t, n, r, i);
K.setMaterial(r, a);
let l = n.index
, c = 1;
if (!0 === r.wireframe) {
if (l = te.getWireframeAttribute(n),
void 0 === l)
return;
c = 2
}
const u = n.drawRange
, d = n.attributes.position;
let h = u.start * c
, p = (u.start + u.count) * c;
null !== s && (h = Math.max(h, s.start * c),
p = Math.min(p, (s.start + s.count) * c)),
null !== l ? (h = Math.max(h, 0),
p = Math.min(p, l.count)) : void 0 !== d && null !== d && (h = Math.max(h, 0),
p = Math.min(p, d.count));
const f = p - h;
if (f < 0 || f === 1 / 0)
return;
let g;
fe.setup(i, r, o, n, l);
let v = de;
if (null !== l && (g = ee.get(l),
v = he,
v.setIndex(g)),
i.isMesh)
!0 === r.wireframe ? (K.setLineWidth(r.wireframeLinewidth * W()),
v.setMode(ge.LINES)) : v.setMode(ge.TRIANGLES);
else if (i.isLine) {
let e = r.linewidth;
void 0 === e && (e = 1),
K.setLineWidth(e * W()),
i.isLineSegments ? v.setMode(ge.LINES) : i.isLineLoop ? v.setMode(ge.LINE_LOOP) : v.setMode(ge.LINE_STRIP)
} else
i.isPoints ? v.setMode(ge.POINTS) : i.isSprite && v.setMode(ge.TRIANGLES);
if (i.isBatchedMesh)
null !== i._multiDrawInstances ? v.renderMultiDrawInstances(i._multiDrawStarts, i._multiDrawCounts, i._multiDrawCount, i._multiDrawInstances) : v.renderMultiDraw(i._multiDrawStarts, i._multiDrawCounts, i._multiDrawCount);
else if (i.isInstancedMesh)
v.renderInstances(h, f, i.count);
else if (n.isInstancedBufferGeometry) {
const e = void 0 !== n._maxInstanceCount ? n._maxInstanceCount : 1 / 0
, t = Math.min(n.instanceCount, e);
v.renderInstances(h, f, t)
} else
v.render(h, f)
}
,
this.compile = function(e, t) {
let n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : null;
null === n && (n = e),
m = ae.get(n),
m.init(t),
v.push(m),
n.traverseVisible((function(e) {
e.isLight && e.layers.test(t.layers) && (m.pushLight(e),
e.castShadow && m.pushShadow(e))
}
)),
e !== n && e.traverseVisible((function(e) {
e.isLight && e.layers.test(t.layers) && (m.pushLight(e),
e.castShadow && m.pushShadow(e))
}
)),
m.setupLights();
const r = new Set;
return e.traverse((function(e) {
const t = e.material;
if (t)
if (Array.isArray(t))
for (let i = 0; i < t.length; i++) {
const s = t[i];
Me(s, n, e),
r.add(s)
}
else
Me(t, n, e),
r.add(t)
}
)),
v.pop(),
m = null,
r
}
,
this.compileAsync = function(e, t) {
let n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : null;
const r = this.compile(e, t, n);
return new Promise((t => {
function n() {
r.forEach((function(e) {
Y.get(e).currentProgram.isReady() && r.delete(e)
}
)),
0 !== r.size ? setTimeout(n, 10) : t(e)
}
null !== J.get("KHR_parallel_shader_compile") ? n() : setTimeout(n, 10)
}
))
}
;
let Ce = null;
function Ee() {
Re.stop()
}
function Te() {
Re.start()
}
const Re = new Io;
function Be(e, t, n, r) {
if (!1 === e.visible)
return;
if (e.layers.test(t.layers))
if (e.isGroup)
n = e.renderOrder;
else if (e.isLOD)
!0 === e.autoUpdate && e.update(t);
else if (e.isLight)
m.pushLight(e),
e.castShadow && m.pushShadow(e);
else if (e.isSprite) {
if (!e.frustumCulled || F.intersectsSprite(e)) {
r && G.setFromMatrixPosition(e.matrixWorld).applyMatrix4(z);
const t = ne.update(e)
, i = e.material;
i.visible && f.push(e, t, i, n, G.z, null)
}
} else if ((e.isMesh || e.isLine || e.isPoints) && (!e.frustumCulled || F.intersectsObject(e))) {
const t = ne.update(e)
, i = e.material;
if (r && (void 0 !== e.boundingSphere ? (null === e.boundingSphere && e.computeBoundingSphere(),
G.copy(e.boundingSphere.center)) : (null === t.boundingSphere && t.computeBoundingSphere(),
G.copy(t.boundingSphere.center)),
G.applyMatrix4(e.matrixWorld).applyMatrix4(z)),
Array.isArray(i)) {
const r = t.groups;
for (let s = 0, a = r.length; s < a; s++) {
const a = r[s]
, o = i[a.materialIndex];
o && o.visible && f.push(e, t, o, n, G.z, a)
}
} else
i.visible && f.push(e, t, i, n, G.z, null)
}
const i = e.children;
for (let s = 0, a = i.length; s < a; s++)
Be(i[s], t, n, r)
}
function Pe(e, t, n, r) {
const i = e.opaque
, s = e.transmissive
, a = e.transparent;
m.setupLightsView(n),
!0 === O && oe.setGlobalState(y.clippingPlanes, n),
r && K.viewport(M.copy(r)),
i.length > 0 && De(i, t, n),
s.length > 0 && De(s, t, n),
a.length > 0 && De(a, t, n),
K.buffers.depth.setTest(!0),
K.buffers.depth.setMask(!0),
K.buffers.color.setMask(!0),
K.setPolygonOffset(!1)
}
function ke(e, t, n, r) {
if (null !== (!0 === n.isScene ? n.overrideMaterial : null))
return;
void 0 === m.state.transmissionRenderTarget[r.id] && (m.state.transmissionRenderTarget[r.id] = new Wi(1,1,{
generateMipmaps: !0,
type: J.has("EXT_color_buffer_half_float") || J.has("EXT_color_buffer_float") ? tn : Kt,
minFilter: Jt,
samples: 4,
stencilBuffer: i,
resolveDepthBuffer: !1,
resolveStencilBuffer: !1,
colorSpace: Li.workingColorSpace
}));
const s = m.state.transmissionRenderTarget[r.id]
, a = r.viewport || M;
s.setSize(a.z, a.w);
const o = y.getRenderTarget();
y.setRenderTarget(s),
y.getClearColor(T),
R = y.getClearAlpha(),
R < 1 && y.setClearColor(16777215, .5),
V ? ce.render(n) : y.clear();
const l = y.toneMapping;
y.toneMapping = xt;
const c = r.viewport;
if (void 0 !== r.viewport && (r.viewport = void 0),
m.setupLightsView(r),
!0 === O && oe.setGlobalState(y.clippingPlanes, r),
De(e, n, r),
Q.updateMultisampleRenderTarget(s),
Q.updateRenderTargetMipmap(s),
!1 === J.has("WEBGL_multisampled_render_to_texture")) {
let e = !1;
for (let i = 0, s = t.length; i < s; i++) {
const s = t[i]
, a = s.object
, o = s.geometry
, l = s.material
, c = s.group;
if (l.side === Ne && a.layers.test(r.layers)) {
const t = l.side;
l.side = Ie,
l.needsUpdate = !0,
je(a, n, r, o, l, c),
l.side = t,
l.needsUpdate = !0,
e = !0
}
}
!0 === e && (Q.updateMultisampleRenderTarget(s),
Q.updateRenderTargetMipmap(s))
}
y.setRenderTarget(o),
y.setClearColor(T, R),
void 0 !== c && (r.viewport = c),
y.toneMapping = l
}
function De(e, t, n) {
const r = !0 === t.isScene ? t.overrideMaterial : null;
for (let i = 0, s = e.length; i < s; i++) {
const s = e[i]
, a = s.object
, o = s.geometry
, l = null === r ? s.material : r
, c = s.group;
a.layers.test(n.layers) && je(a, t, n, o, l, c)
}
}
function je(e, t, n, r, i, s) {
e.onBeforeRender(y, t, n, r, i, s),
e.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse, e.matrixWorld),
e.normalMatrix.getNormalMatrix(e.modelViewMatrix),
i.onBeforeRender(y, t, n, r, e, s),
!0 === i.transparent && i.side === Ne && !1 === i.forceSinglePass ? (i.side = Ie,
i.needsUpdate = !0,
y.renderBufferDirect(n, t, r, i, e, s),
i.side = Le,
i.needsUpdate = !0,
y.renderBufferDirect(n, t, r, i, e, s),
i.side = Ne) : y.renderBufferDirect(n, t, r, i, e, s),
e.onAfterRender(y, t, n, r, i, s)
}
function Fe(e, t, n) {
!0 !== t.isScene && (t = H);
const r = Y.get(e)
, i = m.state.lights
, s = m.state.shadowsArray
, a = i.state.version
, o = re.getParameters(e, i.state, s, t, n)
, l = re.getProgramCacheKey(o);
let c = r.programs;
r.environment = e.isMeshStandardMaterial ? t.environment : null,
r.fog = t.fog,
r.envMap = (e.isMeshStandardMaterial ? $ : Z).get(e.envMap || r.environment),
r.envMapRotation = null !== r.environment && null === e.envMap ? t.environmentRotation : e.envMapRotation,
void 0 === c && (e.addEventListener("dispose", Ae),
c = new Map,
r.programs = c);
let u = c.get(l);
if (void 0 !== u) {
if (r.currentProgram === u && r.lightsStateVersion === a)
return Ue(e, o),
u
} else
o.uniforms = re.getUniforms(e),
e.onBuild(n, o, y),
e.onBeforeCompile(o, y),
u = re.acquireProgram(o, l),
c.set(l, u),
r.uniforms = o.uniforms;
const d = r.uniforms;
return (e.isShaderMaterial || e.isRawShaderMaterial) && !0 !== e.clipping || (d.clippingPlanes = oe.uniform),
Ue(e, o),
r.needsLights = function(e) {
return e.isMeshLambertMaterial || e.isMeshToonMaterial || e.isMeshPhongMaterial || e.isMeshStandardMaterial || e.isShadowMaterial || e.isShaderMaterial && !0 === e.lights
}(e),
r.lightsStateVersion = a,
r.needsLights && (d.ambientLightColor.value = i.state.ambient,
d.lightProbe.value = i.state.probe,
d.directionalLights.value = i.state.directional,
d.directionalLightShadows.value = i.state.directionalShadow,
d.spotLights.value = i.state.spot,
d.spotLightShadows.value = i.state.spotShadow,
d.rectAreaLights.value = i.state.rectArea,
d.ltc_1.value = i.state.rectAreaLTC1,
d.ltc_2.value = i.state.rectAreaLTC2,
d.pointLights.value = i.state.point,
d.pointLightShadows.value = i.state.pointShadow,
d.hemisphereLights.value = i.state.hemi,
d.directionalShadowMap.value = i.state.directionalShadowMap,
d.directionalShadowMatrix.value = i.state.directionalShadowMatrix,
d.spotShadowMap.value = i.state.spotShadowMap,
d.spotLightMatrix.value = i.state.spotLightMatrix,
d.spotLightMap.value = i.state.spotLightMap,
d.pointShadowMap.value = i.state.pointShadowMap,
d.pointShadowMatrix.value = i.state.pointShadowMatrix),
r.currentProgram = u,
r.uniformsList = null,
u
}
function Oe(e) {
if (null === e.uniformsList) {
const t = e.currentProgram.getUniforms();
e.uniformsList = Ac.seqWithValue(t.seq, e.uniforms)
}
return e.uniformsList
}
function Ue(e, t) {
const n = Y.get(e);
n.outputColorSpace = t.outputColorSpace,
n.batching = t.batching,
n.batchingColor = t.batchingColor,
n.instancing = t.instancing,
n.instancingColor = t.instancingColor,
n.instancingMorph = t.instancingMorph,
n.skinning = t.skinning,
n.morphTargets = t.morphTargets,
n.morphNormals = t.morphNormals,
n.morphColors = t.morphColors,
n.morphTargetsCount = t.morphTargetsCount,
n.numClippingPlanes = t.numClippingPlanes,
n.numIntersection = t.numClipIntersection,
n.vertexAlphas = t.vertexAlphas,
n.vertexTangents = t.vertexTangents,
n.toneMapping = t.toneMapping
}
Re.setAnimationLoop((function(e) {
Ce && Ce(e)
}
)),
"undefined" !== typeof self && Re.setContext(self),
this.setAnimationLoop = function(e) {
Ce = e,
xe.setAnimationLoop(e),
null === e ? Re.stop() : Re.start()
}
,
xe.addEventListener("sessionstart", Ee),
xe.addEventListener("sessionend", Te),
this.render = function(e, t) {
if (void 0 !== t && !0 !== t.isCamera)
return void console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");
if (!0 === x)
return;
if (!0 === e.matrixWorldAutoUpdate && e.updateMatrixWorld(),
null === t.parent && !0 === t.matrixWorldAutoUpdate && t.updateMatrixWorld(),
!0 === xe.enabled && !0 === xe.isPresenting && (!0 === xe.cameraAutoUpdate && xe.updateCamera(t),
t = xe.getCamera()),
!0 === e.isScene && e.onBeforeRender(y, e, t, w),
m = ae.get(e, v.length),
m.init(t),
v.push(m),
z.multiplyMatrices(t.projectionMatrix, t.matrixWorldInverse),
F.setFromProjectionMatrix(z),
U = this.localClippingEnabled,
O = oe.init(this.clippingPlanes, U),
f = se.get(e, g.length),
f.init(),
g.push(f),
!0 === xe.enabled && !0 === xe.isPresenting) {
const e = y.xr.getDepthSensingMesh();
null !== e && Be(e, t, -1 / 0, y.sortObjects)
}
Be(e, t, 0, y.sortObjects),
f.finish(),
!0 === y.sortObjects && f.sort(L, I),
V = !1 === xe.enabled || !1 === xe.isPresenting || !1 === xe.hasDepthSensing(),
V && ce.addToRenderList(f, e),
this.info.render.frame++,
!0 === O && oe.beginShadows();
const n = m.state.shadowsArray;
le.render(n, e, t),
!0 === O && oe.endShadows(),
!0 === this.info.autoReset && this.info.reset();
const r = f.opaque
, i = f.transmissive;
if (m.setupLights(),
t.isArrayCamera) {
const n = t.cameras;
if (i.length > 0)
for (let t = 0, s = n.length; t < s; t++) {
ke(r, i, e, n[t])
}
V && ce.render(e);
for (let t = 0, r = n.length; t < r; t++) {
const r = n[t];
Pe(f, e, r, r.viewport)
}
} else
i.length > 0 && ke(r, i, e, t),
V && ce.render(e),
Pe(f, e, t);
null !== w && (Q.updateMultisampleRenderTarget(w),
Q.updateRenderTargetMipmap(w)),
!0 === e.isScene && e.onAfterRender(y, e, t),
fe.resetDefaultState(),
S = -1,
A = null,
v.pop(),
v.length > 0 ? (m = v[v.length - 1],
!0 === O && oe.setGlobalState(y.clippingPlanes, m.state.camera)) : m = null,
g.pop(),
f = g.length > 0 ? g[g.length - 1] : null
}
,
this.getActiveCubeFace = function() {
return b
}
,
this.getActiveMipmapLevel = function() {
return _
}
,
this.getRenderTarget = function() {
return w
}
,
this.setRenderTargetTextures = function(e, t, n) {
Y.get(e.texture).__webglTexture = t,
Y.get(e.depthTexture).__webglTexture = n;
const r = Y.get(e);
r.__hasExternalTextures = !0,
r.__autoAllocateDepthBuffer = void 0 === n,
r.__autoAllocateDepthBuffer || !0 === J.has("WEBGL_multisampled_render_to_texture") && (console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),
r.__useRenderToTexture = !1)
}
,
this.setRenderTargetFramebuffer = function(e, t) {
const n = Y.get(e);
n.__webglFramebuffer = t,
n.__useDefaultFramebuffer = void 0 === t
}
,
this.setRenderTarget = function(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 0;
w = e,
b = t,
_ = n;
let r = !0
, i = null
, s = !1
, a = !1;
if (e) {
const o = Y.get(e);
void 0 !== o.__useDefaultFramebuffer ? (K.bindFramebuffer(ge.FRAMEBUFFER, null),
r = !1) : void 0 === o.__webglFramebuffer ? Q.setupRenderTarget(e) : o.__hasExternalTextures && Q.rebindTextures(e, Y.get(e.texture).__webglTexture, Y.get(e.depthTexture).__webglTexture);
const l = e.texture;
(l.isData3DTexture || l.isDataArrayTexture || l.isCompressedArrayTexture) && (a = !0);
const c = Y.get(e).__webglFramebuffer;
e.isWebGLCubeRenderTarget ? (i = Array.isArray(c[t]) ? c[t][n] : c[t],
s = !0) : i = e.samples > 0 && !1 === Q.useMultisampledRTT(e) ? Y.get(e).__webglMultisampledFramebuffer : Array.isArray(c) ? c[n] : c,
M.copy(e.viewport),
C.copy(e.scissor),
E = e.scissorTest
} else
M.copy(N).multiplyScalar(k).floor(),
C.copy(D).multiplyScalar(k).floor(),
E = j;
if (K.bindFramebuffer(ge.FRAMEBUFFER, i) && r && K.drawBuffers(e, i),
K.viewport(M),
K.scissor(C),
K.setScissorTest(E),
s) {
const r = Y.get(e.texture);
ge.framebufferTexture2D(ge.FRAMEBUFFER, ge.COLOR_ATTACHMENT0, ge.TEXTURE_CUBE_MAP_POSITIVE_X + t, r.__webglTexture, n)
} else if (a) {
const r = Y.get(e.texture)
, i = t || 0;
ge.framebufferTextureLayer(ge.FRAMEBUFFER, ge.COLOR_ATTACHMENT0, r.__webglTexture, n || 0, i)
}
S = -1
}
,
this.readRenderTargetPixels = function(e, t, n, r, i, s, a) {
if (!e || !e.isWebGLRenderTarget)
return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");
let o = Y.get(e).__webglFramebuffer;
if (e.isWebGLCubeRenderTarget && void 0 !== a && (o = o[a]),
o) {
K.bindFramebuffer(ge.FRAMEBUFFER, o);
try {
const a = e.texture
, o = a.format
, l = a.type;
if (!X.textureFormatReadable(o))
return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");
if (!X.textureTypeReadable(l))
return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");
t >= 0 && t <= e.width - r && n >= 0 && n <= e.height - i && ge.readPixels(t, n, r, i, pe.convert(o), pe.convert(l), s)
} finally {
const e = null !== w ? Y.get(w).__webglFramebuffer : null;
K.bindFramebuffer(ge.FRAMEBUFFER, e)
}
}
}
,
this.readRenderTargetPixelsAsync = async function(e, t, n, r, i, s, a) {
if (!e || !e.isWebGLRenderTarget)
throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");
let o = Y.get(e).__webglFramebuffer;
if (e.isWebGLCubeRenderTarget && void 0 !== a && (o = o[a]),
o) {
K.bindFramebuffer(ge.FRAMEBUFFER, o);
try {
const a = e.texture
, o = a.format
, l = a.type;
if (!X.textureFormatReadable(o))
throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");
if (!X.textureTypeReadable(l))
throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");
if (t >= 0 && t <= e.width - r && n >= 0 && n <= e.height - i) {
const e = ge.createBuffer();
ge.bindBuffer(ge.PIXEL_PACK_BUFFER, e),
ge.bufferData(ge.PIXEL_PACK_BUFFER, s.byteLength, ge.STREAM_READ),
ge.readPixels(t, n, r, i, pe.convert(o), pe.convert(l), 0),
ge.flush();
const a = ge.fenceSync(ge.SYNC_GPU_COMMANDS_COMPLETE, 0);
await function(e, t, n) {
return new Promise((function(r, i) {
setTimeout((function s() {
switch (e.clientWaitSync(t, e.SYNC_FLUSH_COMMANDS_BIT, 0)) {
case e.WAIT_FAILED:
i();
break;
case e.TIMEOUT_EXPIRED:
setTimeout(s, n);
break;
default:
r()
}
}
), n)
}
))
}(ge, a, 4);
try {
ge.bindBuffer(ge.PIXEL_PACK_BUFFER, e),
ge.getBufferSubData(ge.PIXEL_PACK_BUFFER, 0, s)
} finally {
ge.deleteBuffer(e),
ge.deleteSync(a)
}
return s
}
} finally {
const e = null !== w ? Y.get(w).__webglFramebuffer : null;
K.bindFramebuffer(ge.FRAMEBUFFER, e)
}
}
}
,
this.copyFramebufferToTexture = function(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : null
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 0;
!0 !== e.isTexture && (console.warn("WebGLRenderer: copyFramebufferToTexture function signature has changed."),
t = arguments[0] || null,
e = arguments[1]);
const r = Math.pow(2, -n)
, i = Math.floor(e.image.width * r)
, s = Math.floor(e.image.height * r)
, a = null !== t ? t.x : 0
, o = null !== t ? t.y : 0;
Q.setTexture2D(e, 0),
ge.copyTexSubImage2D(ge.TEXTURE_2D, n, 0, 0, a, o, i, s),
K.unbindTexture()
}
,
this.copyTextureToTexture = function(e, t) {
let n, r, i, s, a, o, l = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : null, c = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : null, u = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : 0;
!0 !== e.isTexture && (console.warn("WebGLRenderer: copyTextureToTexture function signature has changed."),
c = arguments[0] || null,
e = arguments[1],
t = arguments[2],
u = arguments[3] || 0,
l = null),
null !== l ? (n = l.max.x - l.min.x,
r = l.max.y - l.min.y,
i = l.min.x,
s = l.min.y) : (n = e.image.width,
r = e.image.height,
i = 0,
s = 0),
null !== c ? (a = c.x,
o = c.y) : (a = 0,
o = 0);
const d = pe.convert(t.format)
, h = pe.convert(t.type);
Q.setTexture2D(t, 0),
ge.pixelStorei(ge.UNPACK_FLIP_Y_WEBGL, t.flipY),
ge.pixelStorei(ge.UNPACK_PREMULTIPLY_ALPHA_WEBGL, t.premultiplyAlpha),
ge.pixelStorei(ge.UNPACK_ALIGNMENT, t.unpackAlignment);
const p = ge.getParameter(ge.UNPACK_ROW_LENGTH)
, f = ge.getParameter(ge.UNPACK_IMAGE_HEIGHT)
, m = ge.getParameter(ge.UNPACK_SKIP_PIXELS)
, g = ge.getParameter(ge.UNPACK_SKIP_ROWS)
, v = ge.getParameter(ge.UNPACK_SKIP_IMAGES)
, y = e.isCompressedTexture ? e.mipmaps[u] : e.image;
ge.pixelStorei(ge.UNPACK_ROW_LENGTH, y.width),
ge.pixelStorei(ge.UNPACK_IMAGE_HEIGHT, y.height),
ge.pixelStorei(ge.UNPACK_SKIP_PIXELS, i),
ge.pixelStorei(ge.UNPACK_SKIP_ROWS, s),
e.isDataTexture ? ge.texSubImage2D(ge.TEXTURE_2D, u, a, o, n, r, d, h, y.data) : e.isCompressedTexture ? ge.compressedTexSubImage2D(ge.TEXTURE_2D, u, a, o, y.width, y.height, d, y.data) : ge.texSubImage2D(ge.TEXTURE_2D, u, a, o, d, h, y),
ge.pixelStorei(ge.UNPACK_ROW_LENGTH, p),
ge.pixelStorei(ge.UNPACK_IMAGE_HEIGHT, f),
ge.pixelStorei(ge.UNPACK_SKIP_PIXELS, m),
ge.pixelStorei(ge.UNPACK_SKIP_ROWS, g),
ge.pixelStorei(ge.UNPACK_SKIP_IMAGES, v),
0 === u && t.generateMipmaps && ge.generateMipmap(ge.TEXTURE_2D),
K.unbindTexture()
}
,
this.copyTextureToTexture3D = function(e, t) {
let n, r, i, s, a, o, l, c, u, d = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : null, h = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : null, p = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : 0;
!0 !== e.isTexture && (console.warn("WebGLRenderer: copyTextureToTexture3D function signature has changed."),
d = arguments[0] || null,
h = arguments[1] || null,
e = arguments[2],
t = arguments[3],
p = arguments[4] || 0);
const f = e.isCompressedTexture ? e.mipmaps[p] : e.image;
null !== d ? (n = d.max.x - d.min.x,
r = d.max.y - d.min.y,
i = d.max.z - d.min.z,
s = d.min.x,
a = d.min.y,
o = d.min.z) : (n = f.width,
r = f.height,
i = f.depth,
s = 0,
a = 0,
o = 0),
null !== h ? (l = h.x,
c = h.y,
u = h.z) : (l = 0,
c = 0,
u = 0);
const m = pe.convert(t.format)
, g = pe.convert(t.type);
let v;
if (t.isData3DTexture)
Q.setTexture3D(t, 0),
v = ge.TEXTURE_3D;
else {
if (!t.isDataArrayTexture && !t.isCompressedArrayTexture)
return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");
Q.setTexture2DArray(t, 0),
v = ge.TEXTURE_2D_ARRAY
}
ge.pixelStorei(ge.UNPACK_FLIP_Y_WEBGL, t.flipY),
ge.pixelStorei(ge.UNPACK_PREMULTIPLY_ALPHA_WEBGL, t.premultiplyAlpha),
ge.pixelStorei(ge.UNPACK_ALIGNMENT, t.unpackAlignment);
const y = ge.getParameter(ge.UNPACK_ROW_LENGTH)
, x = ge.getParameter(ge.UNPACK_IMAGE_HEIGHT)
, b = ge.getParameter(ge.UNPACK_SKIP_PIXELS)
, _ = ge.getParameter(ge.UNPACK_SKIP_ROWS)
, w = ge.getParameter(ge.UNPACK_SKIP_IMAGES);
ge.pixelStorei(ge.UNPACK_ROW_LENGTH, f.width),
ge.pixelStorei(ge.UNPACK_IMAGE_HEIGHT, f.height),
ge.pixelStorei(ge.UNPACK_SKIP_PIXELS, s),
ge.pixelStorei(ge.UNPACK_SKIP_ROWS, a),
ge.pixelStorei(ge.UNPACK_SKIP_IMAGES, o),
e.isDataTexture || e.isData3DTexture ? ge.texSubImage3D(v, p, l, c, u, n, r, i, m, g, f.data) : t.isCompressedArrayTexture ? ge.compressedTexSubImage3D(v, p, l, c, u, n, r, i, m, f.data) : ge.texSubImage3D(v, p, l, c, u, n, r, i, m, g, f),
ge.pixelStorei(ge.UNPACK_ROW_LENGTH, y),
ge.pixelStorei(ge.UNPACK_IMAGE_HEIGHT, x),
ge.pixelStorei(ge.UNPACK_SKIP_PIXELS, b),
ge.pixelStorei(ge.UNPACK_SKIP_ROWS, _),
ge.pixelStorei(ge.UNPACK_SKIP_IMAGES, w),
0 === p && t.generateMipmaps && ge.generateMipmap(v),
K.unbindTexture()
}
,
this.initRenderTarget = function(e) {
void 0 === Y.get(e).__webglFramebuffer && Q.setupRenderTarget(e)
}
,
this.initTexture = function(e) {
e.isCubeTexture ? Q.setTextureCube(e, 0) : e.isData3DTexture ? Q.setTexture3D(e, 0) : e.isDataArrayTexture || e.isCompressedArrayTexture ? Q.setTexture2DArray(e, 0) : Q.setTexture2D(e, 0),
K.unbindTexture()
}
,
this.resetState = function() {
b = 0,
_ = 0,
w = null,
K.reset(),
fe.reset()
}
,
"undefined" !== typeof __THREE_DEVTOOLS__ && __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{
detail: this
}))
}
get coordinateSystem() {
return si
}
get outputColorSpace() {
return this._outputColorSpace
}
set outputColorSpace(e) {
this._outputColorSpace = e;
const t = this.getContext();
t.drawingBufferColorSpace = e === yr ? "display-p3" : "srgb",
t.unpackColorSpace = Li.workingColorSpace === xr ? "display-p3" : "srgb"
}
}
class _u {
constructor(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 25e-5;
this.isFogExp2 = !0,
this.name = "",
this.color = new ga(e),
this.density = t
}
clone() {
return new _u(this.color,this.density)
}
toJSON() {
return {
type: "FogExp2",
name: this.name,
color: this.color.getHex(),
density: this.density
}
}
}
class wu {
constructor(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 1
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 1e3;
this.isFog = !0,
this.name = "",
this.color = new ga(e),
this.near = t,
this.far = n
}
clone() {
return new wu(this.color,this.near,this.far)
}
toJSON() {
return {
type: "Fog",
name: this.name,
color: this.color.getHex(),
near: this.near,
far: this.far
}
}
}
class Su extends ea {
constructor() {
super(),
this.isScene = !0,
this.type = "Scene",
this.background = null,
this.environment = null,
this.fog = null,
this.backgroundBlurriness = 0,
this.backgroundIntensity = 1,
this.backgroundRotation = new js,
this.environmentIntensity = 1,
this.environmentRotation = new js,
this.overrideMaterial = null,
"undefined" !== typeof __THREE_DEVTOOLS__ && __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{
detail: this
}))
}
copy(e, t) {
return super.copy(e, t),
null !== e.background && (this.background = e.background.clone()),
null !== e.environment && (this.environment = e.environment.clone()),
null !== e.fog && (this.fog = e.fog.clone()),
this.backgroundBlurriness = e.backgroundBlurriness,
this.backgroundIntensity = e.backgroundIntensity,
this.backgroundRotation.copy(e.backgroundRotation),
this.environmentIntensity = e.environmentIntensity,
this.environmentRotation.copy(e.environmentRotation),
null !== e.overrideMaterial && (this.overrideMaterial = e.overrideMaterial.clone()),
this.matrixAutoUpdate = e.matrixAutoUpdate,
this
}
toJSON(e) {
const t = super.toJSON(e);
return null !== this.fog && (t.object.fog = this.fog.toJSON()),
this.backgroundBlurriness > 0 && (t.object.backgroundBlurriness = this.backgroundBlurriness),
1 !== this.backgroundIntensity && (t.object.backgroundIntensity = this.backgroundIntensity),
t.object.backgroundRotation = this.backgroundRotation.toArray(),
1 !== this.environmentIntensity && (t.object.environmentIntensity = this.environmentIntensity),
t.object.environmentRotation = this.environmentRotation.toArray(),
t
}
}
class Au {
constructor(e, t) {
this.isInterleavedBuffer = !0,
this.array = e,
this.stride = t,
this.count = void 0 !== e ? e.length / t : 0,
this.usage = Kr,
this._updateRange = {
offset: 0,
count: -1
},
this.updateRanges = [],
this.version = 0,
this.uuid = hi()
}
onUploadCallback() {}
set needsUpdate(e) {
!0 === e && this.version++
}
get updateRange() {
return Ti("THREE.InterleavedBuffer: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),
this._updateRange
}
setUsage(e) {
return this.usage = e,
this
}
addUpdateRange(e, t) {
this.updateRanges.push({
start: e,
count: t
})
}
clearUpdateRanges() {
this.updateRanges.length = 0
}
copy(e) {
return this.array = new e.array.constructor(e.array),
this.count = e.count,
this.stride = e.stride,
this.usage = e.usage,
this
}
copyAt(e, t, n) {
e *= this.stride,
n *= t.stride;
for (let r = 0, i = this.stride; r < i; r++)
this.array[e + r] = t.array[n + r];
return this
}
set(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;
return this.array.set(e, t),
this
}
clone(e) {
void 0 === e.arrayBuffers && (e.arrayBuffers = {}),
void 0 === this.array.buffer._uuid && (this.array.buffer._uuid = hi()),
void 0 === e.arrayBuffers[this.array.buffer._uuid] && (e.arrayBuffers[this.array.buffer._uuid] = this.array.slice(0).buffer);
const t = new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid])
, n = new this.constructor(t,this.stride);
return n.setUsage(this.usage),
n
}
onUpload(e) {
return this.onUploadCallback = e,
this
}
toJSON(e) {
return void 0 === e.arrayBuffers && (e.arrayBuffers = {}),
void 0 === this.array.buffer._uuid && (this.array.buffer._uuid = hi()),
void 0 === e.arrayBuffers[this.array.buffer._uuid] && (e.arrayBuffers[this.array.buffer._uuid] = Array.from(new Uint32Array(this.array.buffer))),
{
uuid: this.uuid,
buffer: this.array.buffer._uuid,
type: this.array.constructor.name,
stride: this.stride
}
}
}
const Mu = new Qi;
class Cu {
constructor(e, t, n) {
let r = arguments.length > 3 && void 0 !== arguments[3] && arguments[3];
this.isInterleavedBufferAttribute = !0,
this.name = "",
this.data = e,
this.itemSize = t,
this.offset = n,
this.normalized = r
}
get count() {
return this.data.count
}
get array() {
return this.data.array
}
set needsUpdate(e) {
this.data.needsUpdate = e
}
applyMatrix4(e) {
for (let t = 0, n = this.data.count; t < n; t++)
Mu.fromBufferAttribute(this, t),
Mu.applyMatrix4(e),
this.setXYZ(t, Mu.x, Mu.y, Mu.z);
return this
}
applyNormalMatrix(e) {
for (let t = 0, n = this.count; t < n; t++)
Mu.fromBufferAttribute(this, t),
Mu.applyNormalMatrix(e),
this.setXYZ(t, Mu.x, Mu.y, Mu.z);
return this
}
transformDirection(e) {
for (let t = 0, n = this.count; t < n; t++)
Mu.fromBufferAttribute(this, t),
Mu.transformDirection(e),
this.setXYZ(t, Mu.x, Mu.y, Mu.z);
return this
}
getComponent(e, t) {
let n = this.array[e * this.data.stride + this.offset + t];
return this.normalized && (n = gi(n, this.array)),
n
}
setComponent(e, t, n) {
return this.normalized && (n = vi(n, this.array)),
this.data.array[e * this.data.stride + this.offset + t] = n,
this
}
setX(e, t) {
return this.normalized && (t = vi(t, this.array)),
this.data.array[e * this.data.stride + this.offset] = t,
this
}
setY(e, t) {
return this.normalized && (t = vi(t, this.array)),
this.data.array[e * this.data.stride + this.offset + 1] = t,
this
}
setZ(e, t) {
return this.normalized && (t = vi(t, this.array)),
this.data.array[e * this.data.stride + this.offset + 2] = t,
this
}
setW(e, t) {
return this.normalized && (t = vi(t, this.array)),
this.data.array[e * this.data.stride + this.offset + 3] = t,
this
}
getX(e) {
let t = this.data.array[e * this.data.stride + this.offset];
return this.normalized && (t = gi(t, this.array)),
t
}
getY(e) {
let t = this.data.array[e * this.data.stride + this.offset + 1];
return this.normalized && (t = gi(t, this.array)),
t
}
getZ(e) {
let t = this.data.array[e * this.data.stride + this.offset + 2];
return this.normalized && (t = gi(t, this.array)),
t
}
getW(e) {
let t = this.data.array[e * this.data.stride + this.offset + 3];
return this.normalized && (t = gi(t, this.array)),
t
}
setXY(e, t, n) {
return e = e * this.data.stride + this.offset,
this.normalized && (t = vi(t, this.array),
n = vi(n, this.array)),
this.data.array[e + 0] = t,
this.data.array[e + 1] = n,
this
}
setXYZ(e, t, n, r) {
return e = e * this.data.stride + this.offset,
this.normalized && (t = vi(t, this.array),
n = vi(n, this.array),
r = vi(r, this.array)),
this.data.array[e + 0] = t,
this.data.array[e + 1] = n,
this.data.array[e + 2] = r,
this
}
setXYZW(e, t, n, r, i) {
return e = e * this.data.stride + this.offset,
this.normalized && (t = vi(t, this.array),
n = vi(n, this.array),
r = vi(r, this.array),
i = vi(i, this.array)),
this.data.array[e + 0] = t,
this.data.array[e + 1] = n,
this.data.array[e + 2] = r,
this.data.array[e + 3] = i,
this
}
clone(e) {
if (void 0 === e) {
console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");
const e = [];
for (let t = 0; t < this.count; t++) {
const n = t * this.data.stride + this.offset;
for (let t = 0; t < this.itemSize; t++)
e.push(this.data.array[n + t])
}
return new Ta(new this.array.constructor(e),this.itemSize,this.normalized)
}
return void 0 === e.interleavedBuffers && (e.interleavedBuffers = {}),
void 0 === e.interleavedBuffers[this.data.uuid] && (e.interleavedBuffers[this.data.uuid] = this.data.clone(e)),
new Cu(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)
}
toJSON(e) {
if (void 0 === e) {
console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");
const e = [];
for (let t = 0; t < this.count; t++) {
const n = t * this.data.stride + this.offset;
for (let t = 0; t < this.itemSize; t++)
e.push(this.data.array[n + t])
}
return {
itemSize: this.itemSize,
type: this.array.constructor.name,
array: e,
normalized: this.normalized
}
}
return void 0 === e.interleavedBuffers && (e.interleavedBuffers = {}),
void 0 === e.interleavedBuffers[this.data.uuid] && (e.interleavedBuffers[this.data.uuid] = this.data.toJSON(e)),
{
isInterleavedBufferAttribute: !0,
itemSize: this.itemSize,
data: this.data.uuid,
offset: this.offset,
normalized: this.normalized
}
}
}
class Eu extends xa {
constructor(e) {
super(),
this.isSpriteMaterial = !0,
this.type = "SpriteMaterial",
this.color = new ga(16777215),
this.map = null,
this.alphaMap = null,
this.rotation = 0,
this.sizeAttenuation = !0,
this.transparent = !0,
this.fog = !0,
this.setValues(e)
}
copy(e) {
return super.copy(e),
this.color.copy(e.color),
this.map = e.map,
this.alphaMap = e.alphaMap,
this.rotation = e.rotation,
this.sizeAttenuation = e.sizeAttenuation,
this.fog = e.fog,
this
}
}
let Tu;
const Ru = new Qi
, Bu = new Qi
, Pu = new Qi
, ku = new xi
, Lu = new xi
, Iu = new Es
, Nu = new Qi
, Du = new Qi
, ju = new Qi
, Fu = new xi
, Ou = new xi
, Uu = new xi;
class zu extends ea {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : new Eu;
if (super(),
this.isSprite = !0,
this.type = "Sprite",
void 0 === Tu) {
Tu = new Wa;
const e = new Float32Array([-.5, -.5, 0, 0, 0, .5, -.5, 0, 1, 0, .5, .5, 0, 1, 1, -.5, .5, 0, 0, 1])
, t = new Au(e,5);
Tu.setIndex([0, 1, 2, 0, 2, 3]),
Tu.setAttribute("position", new Cu(t,3,0,!1)),
Tu.setAttribute("uv", new Cu(t,2,3,!1))
}
this.geometry = Tu,
this.material = e,
this.center = new xi(.5,.5)
}
raycast(e, t) {
null === e.camera && console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),
Bu.setFromMatrixScale(this.matrixWorld),
Iu.copy(e.camera.matrixWorld),
this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse, this.matrixWorld),
Pu.setFromMatrixPosition(this.modelViewMatrix),
e.camera.isPerspectiveCamera && !1 === this.material.sizeAttenuation && Bu.multiplyScalar(-Pu.z);
const n = this.material.rotation;
let r, i;
0 !== n && (i = Math.cos(n),
r = Math.sin(n));
const s = this.center;
Gu(Nu.set(-.5, -.5, 0), Pu, s, Bu, r, i),
Gu(Du.set(.5, -.5, 0), Pu, s, Bu, r, i),
Gu(ju.set(.5, .5, 0), Pu, s, Bu, r, i),
Fu.set(0, 0),
Ou.set(1, 0),
Uu.set(1, 1);
let a = e.ray.intersectTriangle(Nu, Du, ju, !1, Ru);
if (null === a && (Gu(Du.set(-.5, .5, 0), Pu, s, Bu, r, i),
Ou.set(0, 1),
a = e.ray.intersectTriangle(Nu, ju, Du, !1, Ru),
null === a))
return;
const o = e.ray.origin.distanceTo(Ru);
o < e.near || o > e.far || t.push({
distance: o,
point: Ru.clone(),
uv: da.getInterpolation(Ru, Nu, Du, ju, Fu, Ou, Uu, new xi),
face: null,
object: this
})
}
copy(e, t) {
return super.copy(e, t),
void 0 !== e.center && this.center.copy(e.center),
this.material = e.material,
this
}
}
function Gu(e, t, n, r, i, s) {
ku.subVectors(e, n).addScalar(.5).multiply(r),
void 0 !== i ? (Lu.x = s * ku.x - i * ku.y,
Lu.y = i * ku.x + s * ku.y) : Lu.copy(ku),
e.copy(t),
e.x += Lu.x,
e.y += Lu.y,
e.applyMatrix4(Iu)
}
const Hu = new Qi
, Vu = new Qi;
class Wu extends ea {
constructor() {
super(),
this._currentLevel = 0,
this.type = "LOD",
Object.defineProperties(this, {
levels: {
enumerable: !0,
value: []
},
isLOD: {
value: !0
}
}),
this.autoUpdate = !0
}
copy(e) {
super.copy(e, !1);
const t = e.levels;
for (let n = 0, r = t.length; n < r; n++) {
const e = t[n];
this.addLevel(e.object.clone(), e.distance, e.hysteresis)
}
return this.autoUpdate = e.autoUpdate,
this
}
addLevel(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 0;
t = Math.abs(t);
const r = this.levels;
let i;
for (i = 0; i < r.length && !(t < r[i].distance); i++)
;
return r.splice(i, 0, {
distance: t,
hysteresis: n,
object: e
}),
this.add(e),
this
}
getCurrentLevel() {
return this._currentLevel
}
getObjectForDistance(e) {
const t = this.levels;
if (t.length > 0) {
let n, r;
for (n = 1,
r = t.length; n < r; n++) {
let r = t[n].distance;
if (t[n].object.visible && (r -= r * t[n].hysteresis),
e < r)
break
}
return t[n - 1].object
}
return null
}
raycast(e, t) {
if (this.levels.length > 0) {
Hu.setFromMatrixPosition(this.matrixWorld);
const n = e.ray.origin.distanceTo(Hu);
this.getObjectForDistance(n).raycast(e, t)
}
}
update(e) {
const t = this.levels;
if (t.length > 1) {
Hu.setFromMatrixPosition(e.matrixWorld),
Vu.setFromMatrixPosition(this.matrixWorld);
const n = Hu.distanceTo(Vu) / e.zoom;
let r, i;
for (t[0].object.visible = !0,
r = 1,
i = t.length; r < i; r++) {
let e = t[r].distance;
if (t[r].object.visible && (e -= e * t[r].hysteresis),
!(n >= e))
break;
t[r - 1].object.visible = !1,
t[r].object.visible = !0
}
for (this._currentLevel = r - 1; r < i; r++)
t[r].object.visible = !1
}
}
toJSON(e) {
const t = super.toJSON(e);
!1 === this.autoUpdate && (t.object.autoUpdate = !1),
t.object.levels = [];
const n = this.levels;
for (let r = 0, i = n.length; r < i; r++) {
const e = n[r];
t.object.levels.push({
object: e.object.uuid,
distance: e.distance,
hysteresis: e.hysteresis
})
}
return t
}
}
const Ju = new Qi
, Xu = new Hi
, Ku = new Hi
, qu = new Qi
, Yu = new Es
, Qu = new Qi
, Zu = new ys
, $u = new Es
, ed = new Cs;
class td extends co {
constructor(e, t) {
super(e, t),
this.isSkinnedMesh = !0,
this.type = "SkinnedMesh",
this.bindMode = Et,
this.bindMatrix = new Es,
this.bindMatrixInverse = new Es,
this.boundingBox = null,
this.boundingSphere = null
}
computeBoundingBox() {
const e = this.geometry;
null === this.boundingBox && (this.boundingBox = new es),
this.boundingBox.makeEmpty();
const t = e.getAttribute("position");
for (let n = 0; n < t.count; n++)
this.getVertexPosition(n, Qu),
this.boundingBox.expandByPoint(Qu)
}
computeBoundingSphere() {
const e = this.geometry;
null === this.boundingSphere && (this.boundingSphere = new ys),
this.boundingSphere.makeEmpty();
const t = e.getAttribute("position");
for (let n = 0; n < t.count; n++)
this.getVertexPosition(n, Qu),
this.boundingSphere.expandByPoint(Qu)
}
copy(e, t) {
return super.copy(e, t),
this.bindMode = e.bindMode,
this.bindMatrix.copy(e.bindMatrix),
this.bindMatrixInverse.copy(e.bindMatrixInverse),
this.skeleton = e.skeleton,
null !== e.boundingBox && (this.boundingBox = e.boundingBox.clone()),
null !== e.boundingSphere && (this.boundingSphere = e.boundingSphere.clone()),
this
}
raycast(e, t) {
const n = this.material
, r = this.matrixWorld;
void 0 !== n && (null === this.boundingSphere && this.computeBoundingSphere(),
Zu.copy(this.boundingSphere),
Zu.applyMatrix4(r),
!1 !== e.ray.intersectsSphere(Zu) && ($u.copy(r).invert(),
ed.copy(e.ray).applyMatrix4($u),
null !== this.boundingBox && !1 === ed.intersectsBox(this.boundingBox) || this._computeIntersections(e, t, ed)))
}
getVertexPosition(e, t) {
return super.getVertexPosition(e, t),
this.applyBoneTransform(e, t),
t
}
bind(e, t) {
this.skeleton = e,
void 0 === t && (this.updateMatrixWorld(!0),
this.skeleton.calculateInverses(),
t = this.matrixWorld),
this.bindMatrix.copy(t),
this.bindMatrixInverse.copy(t).invert()
}
pose() {
this.skeleton.pose()
}
normalizeSkinWeights() {
const e = new Hi
, t = this.geometry.attributes.skinWeight;
for (let n = 0, r = t.count; n < r; n++) {
e.fromBufferAttribute(t, n);
const r = 1 / e.manhattanLength();
r !== 1 / 0 ? e.multiplyScalar(r) : e.set(1, 0, 0, 0),
t.setXYZW(n, e.x, e.y, e.z, e.w)
}
}
updateMatrixWorld(e) {
super.updateMatrixWorld(e),
this.bindMode === Et ? this.bindMatrixInverse.copy(this.matrixWorld).invert() : this.bindMode === Tt ? this.bindMatrixInverse.copy(this.bindMatrix).invert() : console.warn("THREE.SkinnedMesh: Unrecognized bindMode: " + this.bindMode)
}
applyBoneTransform(e, t) {
const n = this.skeleton
, r = this.geometry;
Xu.fromBufferAttribute(r.attributes.skinIndex, e),
Ku.fromBufferAttribute(r.attributes.skinWeight, e),
Ju.copy(t).applyMatrix4(this.bindMatrix),
t.set(0, 0, 0);
for (let i = 0; i < 4; i++) {
const e = Ku.getComponent(i);
if (0 !== e) {
const r = Xu.getComponent(i);
Yu.multiplyMatrices(n.bones[r].matrixWorld, n.boneInverses[r]),
t.addScaledVector(qu.copy(Ju).applyMatrix4(Yu), e)
}
}
return t.applyMatrix4(this.bindMatrixInverse)
}
}
class nd extends ea {
constructor() {
super(),
this.isBone = !0,
this.type = "Bone"
}
}
class rd extends Gi {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : null
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 1
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 1;
super(null, arguments.length > 5 ? arguments[5] : void 0, arguments.length > 6 ? arguments[6] : void 0, arguments.length > 7 ? arguments[7] : void 0, arguments.length > 8 && void 0 !== arguments[8] ? arguments[8] : Ft, arguments.length > 9 && void 0 !== arguments[9] ? arguments[9] : Ft, arguments.length > 3 ? arguments[3] : void 0, arguments.length > 4 ? arguments[4] : void 0, arguments.length > 10 ? arguments[10] : void 0, arguments.length > 11 ? arguments[11] : void 0),
this.isDataTexture = !0,
this.image = {
data: e,
width: t,
height: n
},
this.generateMipmaps = !1,
this.flipY = !1,
this.unpackAlignment = 1
}
}
const id = new Es
, sd = new Es;
class ad {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : [];
this.uuid = hi(),
this.bones = e.slice(0),
this.boneInverses = t,
this.boneMatrices = null,
this.boneTexture = null,
this.init()
}
init() {
const e = this.bones
, t = this.boneInverses;
if (this.boneMatrices = new Float32Array(16 * e.length),
0 === t.length)
this.calculateInverses();
else if (e.length !== t.length) {
console.warn("THREE.Skeleton: Number of inverse bone matrices does not match amount of bones."),
this.boneInverses = [];
for (let e = 0, t = this.bones.length; e < t; e++)
this.boneInverses.push(new Es)
}
}
calculateInverses() {
this.boneInverses.length = 0;
for (let e = 0, t = this.bones.length; e < t; e++) {
const t = new Es;
this.bones[e] && t.copy(this.bones[e].matrixWorld).invert(),
this.boneInverses.push(t)
}
}
pose() {
for (let e = 0, t = this.bones.length; e < t; e++) {
const t = this.bones[e];
t && t.matrixWorld.copy(this.boneInverses[e]).invert()
}
for (let e = 0, t = this.bones.length; e < t; e++) {
const t = this.bones[e];
t && (t.parent && t.parent.isBone ? (t.matrix.copy(t.parent.matrixWorld).invert(),
t.matrix.multiply(t.matrixWorld)) : t.matrix.copy(t.matrixWorld),
t.matrix.decompose(t.position, t.quaternion, t.scale))
}
}
update() {
const e = this.bones
, t = this.boneInverses
, n = this.boneMatrices
, r = this.boneTexture;
for (let i = 0, s = e.length; i < s; i++) {
const r = e[i] ? e[i].matrixWorld : sd;
id.multiplyMatrices(r, t[i]),
id.toArray(n, 16 * i)
}
null !== r && (r.needsUpdate = !0)
}
clone() {
return new ad(this.bones,this.boneInverses)
}
computeBoneTexture() {
let e = Math.sqrt(4 * this.bones.length);
e = 4 * Math.ceil(e / 4),
e = Math.max(e, 4);
const t = new Float32Array(e * e * 4);
t.set(this.boneMatrices);
const n = new rd(t,e,e,cn,en);
return n.needsUpdate = !0,
this.boneMatrices = t,
this.boneTexture = n,
this
}
getBoneByName(e) {
for (let t = 0, n = this.bones.length; t < n; t++) {
const n = this.bones[t];
if (n.name === e)
return n
}
}
dispose() {
null !== this.boneTexture && (this.boneTexture.dispose(),
this.boneTexture = null)
}
fromJSON(e, t) {
this.uuid = e.uuid;
for (let n = 0, r = e.bones.length; n < r; n++) {
const r = e.bones[n];
let i = t[r];
void 0 === i && (console.warn("THREE.Skeleton: No bone found with UUID:", r),
i = new nd),
this.bones.push(i),
this.boneInverses.push((new Es).fromArray(e.boneInverses[n]))
}
return this.init(),
this
}
toJSON() {
const e = {
metadata: {
version: 4.6,
type: "Skeleton",
generator: "Skeleton.toJSON"
},
bones: [],
boneInverses: []
};
e.uuid = this.uuid;
const t = this.bones
, n = this.boneInverses;
for (let r = 0, i = t.length; r < i; r++) {
const i = t[r];
e.bones.push(i.uuid);
const s = n[r];
e.boneInverses.push(s.toArray())
}
return e
}
}
class od extends Ta {
constructor(e, t, n) {
let r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : 1;
super(e, t, n),
this.isInstancedBufferAttribute = !0,
this.meshPerAttribute = r
}
copy(e) {
return super.copy(e),
this.meshPerAttribute = e.meshPerAttribute,
this
}
toJSON() {
const e = super.toJSON();
return e.meshPerAttribute = this.meshPerAttribute,
e.isInstancedBufferAttribute = !0,
e
}
}
const ld = new Es
, cd = new Es
, ud = []
, dd = new es
, hd = new Es
, pd = new co
, fd = new ys;
class md extends co {
constructor(e, t, n) {
super(e, t),
this.isInstancedMesh = !0,
this.instanceMatrix = new od(new Float32Array(16 * n),16),
this.instanceColor = null,
this.morphTexture = null,
this.count = n,
this.boundingBox = null,
this.boundingSphere = null;
for (let r = 0; r < n; r++)
this.setMatrixAt(r, hd)
}
computeBoundingBox() {
const e = this.geometry
, t = this.count;
null === this.boundingBox && (this.boundingBox = new es),
null === e.boundingBox && e.computeBoundingBox(),
this.boundingBox.makeEmpty();
for (let n = 0; n < t; n++)
this.getMatrixAt(n, ld),
dd.copy(e.boundingBox).applyMatrix4(ld),
this.boundingBox.union(dd)
}
computeBoundingSphere() {
const e = this.geometry
, t = this.count;
null === this.boundingSphere && (this.boundingSphere = new ys),
null === e.boundingSphere && e.computeBoundingSphere(),
this.boundingSphere.makeEmpty();
for (let n = 0; n < t; n++)
this.getMatrixAt(n, ld),
fd.copy(e.boundingSphere).applyMatrix4(ld),
this.boundingSphere.union(fd)
}
copy(e, t) {
return super.copy(e, t),
this.instanceMatrix.copy(e.instanceMatrix),
null !== e.morphTexture && (this.morphTexture = e.morphTexture.clone()),
null !== e.instanceColor && (this.instanceColor = e.instanceColor.clone()),
this.count = e.count,
null !== e.boundingBox && (this.boundingBox = e.boundingBox.clone()),
null !== e.boundingSphere && (this.boundingSphere = e.boundingSphere.clone()),
this
}
getColorAt(e, t) {
t.fromArray(this.instanceColor.array, 3 * e)
}
getMatrixAt(e, t) {
t.fromArray(this.instanceMatrix.array, 16 * e)
}
getMorphAt(e, t) {
const n = t.morphTargetInfluences
, r = this.morphTexture.source.data.data
, i = e * (n.length + 1) + 1;
for (let s = 0; s < n.length; s++)
n[s] = r[i + s]
}
raycast(e, t) {
const n = this.matrixWorld
, r = this.count;
if (pd.geometry = this.geometry,
pd.material = this.material,
void 0 !== pd.material && (null === this.boundingSphere && this.computeBoundingSphere(),
fd.copy(this.boundingSphere),
fd.applyMatrix4(n),
!1 !== e.ray.intersectsSphere(fd)))
for (let i = 0; i < r; i++) {
this.getMatrixAt(i, ld),
cd.multiplyMatrices(n, ld),
pd.matrixWorld = cd,
pd.raycast(e, ud);
for (let e = 0, n = ud.length; e < n; e++) {
const n = ud[e];
n.instanceId = i,
n.object = this,
t.push(n)
}
ud.length = 0
}
}
setColorAt(e, t) {
null === this.instanceColor && (this.instanceColor = new od(new Float32Array(3 * this.instanceMatrix.count),3)),
t.toArray(this.instanceColor.array, 3 * e)
}
setMatrixAt(e, t) {
t.toArray(this.instanceMatrix.array, 16 * e)
}
setMorphAt(e, t) {
const n = t.morphTargetInfluences
, r = n.length + 1;
null === this.morphTexture && (this.morphTexture = new rd(new Float32Array(r * this.count),r,this.count,fn,en));
const i = this.morphTexture.source.data.data;
let s = 0;
for (let l = 0; l < n.length; l++)
s += n[l];
const a = this.geometry.morphTargetsRelative ? 1 : 1 - s
, o = r * e;
i[o] = a,
i.set(n, o + 1)
}
updateMorphTargets() {}
dispose() {
return this.dispatchEvent({
type: "dispose"
}),
null !== this.morphTexture && (this.morphTexture.dispose(),
this.morphTexture = null),
this
}
}
function gd(e, t) {
return e.z - t.z
}
function vd(e, t) {
return t.z - e.z
}
class yd {
constructor() {
this.index = 0,
this.pool = [],
this.list = []
}
push(e, t) {
const n = this.pool
, r = this.list;
this.index >= n.length && n.push({
start: -1,
count: -1,
z: -1
});
const i = n[this.index];
r.push(i),
this.index++,
i.start = e.start,
i.count = e.count,
i.z = t
}
reset() {
this.list.length = 0,
this.index = 0
}
}
const xd = "batchId"
, bd = new Es
, _d = new Es
, wd = new Es
, Sd = new ga(1,1,1)
, Ad = new Es
, Md = new Lo
, Cd = new es
, Ed = new ys
, Td = new Qi
, Rd = new Qi
, Bd = new Qi
, Pd = new yd
, kd = new co
, Ld = [];
function Id(e, t) {
let n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 0;
const r = t.itemSize;
if (e.isInterleavedBufferAttribute || e.array.constructor !== t.array.constructor) {
const i = e.count;
for (let s = 0; s < i; s++)
for (let i = 0; i < r; i++)
t.setComponent(s + n, i, e.getComponent(s, i))
} else
t.array.set(e.array, n * r);
t.needsUpdate = !0
}
class Nd extends co {
get maxGeometryCount() {
return this._maxGeometryCount
}
constructor(e, t) {
let n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 2 * t
, r = arguments.length > 3 ? arguments[3] : void 0;
super(new Wa, r),
this.isBatchedMesh = !0,
this.perObjectFrustumCulled = !0,
this.sortObjects = !0,
this.boundingBox = null,
this.boundingSphere = null,
this.customSort = null,
this._drawRanges = [],
this._reservedRanges = [],
this._visibility = [],
this._active = [],
this._bounds = [],
this._maxGeometryCount = e,
this._maxVertexCount = t,
this._maxIndexCount = n,
this._geometryInitialized = !1,
this._geometryCount = 0,
this._multiDrawCounts = new Int32Array(e),
this._multiDrawStarts = new Int32Array(e),
this._multiDrawCount = 0,
this._multiDrawInstances = null,
this._visibilityChanged = !0,
this._matricesTexture = null,
this._initMatricesTexture(),
this._colorsTexture = null
}
_initMatricesTexture() {
let e = Math.sqrt(4 * this._maxGeometryCount);
e = 4 * Math.ceil(e / 4),
e = Math.max(e, 4);
const t = new Float32Array(e * e * 4)
, n = new rd(t,e,e,cn,en);
this._matricesTexture = n
}
_initColorsTexture() {
let e = Math.sqrt(this._maxGeometryCount);
e = Math.ceil(e);
const t = new Float32Array(e * e * 4).fill(1)
, n = new rd(t,e,e,cn,en);
n.colorSpace = Li.workingColorSpace,
this._colorsTexture = n
}
_initializeGeometry(e) {
const t = this.geometry
, n = this._maxVertexCount
, r = this._maxGeometryCount
, i = this._maxIndexCount;
if (!1 === this._geometryInitialized) {
for (const r in e.attributes) {
const i = e.getAttribute(r)
, {array: s, itemSize: a, normalized: o} = i
, l = new s.constructor(n * a)
, c = new Ta(l,a,o);
t.setAttribute(r, c)
}
if (null !== e.getIndex()) {
const e = n > 65536 ? new Uint32Array(i) : new Uint16Array(i);
t.setIndex(new Ta(e,1))
}
const s = r > 65536 ? new Uint32Array(n) : new Uint16Array(n);
t.setAttribute(xd, new Ta(s,1)),
this._geometryInitialized = !0
}
}
_validateGeometry(e) {
if (e.getAttribute(xd))
throw new Error('BatchedMesh: Geometry cannot use attribute "'.concat(xd, '"'));
const t = this.geometry;
if (Boolean(e.getIndex()) !== Boolean(t.getIndex()))
throw new Error('BatchedMesh: All geometries must consistently have "index".');
for (const n in t.attributes) {
if (n === xd)
continue;
if (!e.hasAttribute(n))
throw new Error('BatchedMesh: Added geometry missing "'.concat(n, '". All geometries must have consistent attributes.'));
const r = e.getAttribute(n)
, i = t.getAttribute(n);
if (r.itemSize !== i.itemSize || r.normalized !== i.normalized)
throw new Error("BatchedMesh: All attributes must have a consistent itemSize and normalized value.")
}
}
setCustomSort(e) {
return this.customSort = e,
this
}
computeBoundingBox() {
null === this.boundingBox && (this.boundingBox = new es);
const e = this._geometryCount
, t = this.boundingBox
, n = this._active;
t.makeEmpty();
for (let r = 0; r < e; r++)
!1 !== n[r] && (this.getMatrixAt(r, bd),
this.getBoundingBoxAt(r, Cd).applyMatrix4(bd),
t.union(Cd))
}
computeBoundingSphere() {
null === this.boundingSphere && (this.boundingSphere = new ys);
const e = this._geometryCount
, t = this.boundingSphere
, n = this._active;
t.makeEmpty();
for (let r = 0; r < e; r++)
!1 !== n[r] && (this.getMatrixAt(r, bd),
this.getBoundingSphereAt(r, Ed).applyMatrix4(bd),
t.union(Ed))
}
addGeometry(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : -1
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : -1;
if (this._initializeGeometry(e),
this._validateGeometry(e),
this._geometryCount >= this._maxGeometryCount)
throw new Error("BatchedMesh: Maximum geometry count reached.");
const r = {
vertexStart: -1,
vertexCount: -1,
indexStart: -1,
indexCount: -1
};
let i = null;
const s = this._reservedRanges
, a = this._drawRanges
, o = this._bounds;
0 !== this._geometryCount && (i = s[s.length - 1]),
r.vertexCount = -1 === t ? e.getAttribute("position").count : t,
r.vertexStart = null === i ? 0 : i.vertexStart + i.vertexCount;
const l = e.getIndex()
, c = null !== l;
if (c && (r.indexCount = -1 === n ? l.count : n,
r.indexStart = null === i ? 0 : i.indexStart + i.indexCount),
-1 !== r.indexStart && r.indexStart + r.indexCount > this._maxIndexCount || r.vertexStart + r.vertexCount > this._maxVertexCount)
throw new Error("BatchedMesh: Reserved space request exceeds the maximum buffer size.");
const u = this._visibility
, d = this._active
, h = this._matricesTexture
, p = this._matricesTexture.image.data
, f = this._colorsTexture;
u.push(!0),
d.push(!0);
const m = this._geometryCount;
this._geometryCount++,
wd.toArray(p, 16 * m),
h.needsUpdate = !0,
null !== f && (Sd.toArray(f.image.data, 4 * m),
f.needsUpdate = !0),
s.push(r),
a.push({
start: c ? r.indexStart : r.vertexStart,
count: -1
}),
o.push({
boxInitialized: !1,
box: new es,
sphereInitialized: !1,
sphere: new ys
});
const g = this.geometry.getAttribute(xd);
for (let v = 0; v < r.vertexCount; v++)
g.setX(r.vertexStart + v, m);
return g.needsUpdate = !0,
this.setGeometryAt(m, e),
m
}
setGeometryAt(e, t) {
if (e >= this._geometryCount)
throw new Error("BatchedMesh: Maximum geometry count reached.");
this._validateGeometry(t);
const n = this.geometry
, r = null !== n.getIndex()
, i = n.getIndex()
, s = t.getIndex()
, a = this._reservedRanges[e];
if (r && s.count > a.indexCount || t.attributes.position.count > a.vertexCount)
throw new Error("BatchedMesh: Reserved space not large enough for provided geometry.");
const o = a.vertexStart
, l = a.vertexCount;
for (const h in n.attributes) {
if (h === xd)
continue;
const e = t.getAttribute(h)
, r = n.getAttribute(h);
Id(e, r, o);
const i = e.itemSize;
for (let t = e.count, n = l; t < n; t++) {
const e = o + t;
for (let t = 0; t < i; t++)
r.setComponent(e, t, 0)
}
r.needsUpdate = !0,
r.addUpdateRange(o * i, l * i)
}
if (r) {
const e = a.indexStart;
for (let t = 0; t < s.count; t++)
i.setX(e + t, o + s.getX(t));
for (let t = s.count, n = a.indexCount; t < n; t++)
i.setX(e + t, o);
i.needsUpdate = !0,
i.addUpdateRange(e, a.indexCount)
}
const c = this._bounds[e];
null !== t.boundingBox ? (c.box.copy(t.boundingBox),
c.boxInitialized = !0) : c.boxInitialized = !1,
null !== t.boundingSphere ? (c.sphere.copy(t.boundingSphere),
c.sphereInitialized = !0) : c.sphereInitialized = !1;
const u = this._drawRanges[e]
, d = t.getAttribute("position");
return u.count = r ? s.count : d.count,
this._visibilityChanged = !0,
e
}
deleteGeometry(e) {
const t = this._active;
return e >= t.length || !1 === t[e] || (t[e] = !1,
this._visibilityChanged = !0),
this
}
getInstanceCountAt(e) {
return null === this._multiDrawInstances ? null : this._multiDrawInstances[e]
}
setInstanceCountAt(e, t) {
return null === this._multiDrawInstances && (this._multiDrawInstances = new Int32Array(this._maxGeometryCount).fill(1)),
this._multiDrawInstances[e] = t,
e
}
getBoundingBoxAt(e, t) {
if (!1 === this._active[e])
return null;
const n = this._bounds[e]
, r = n.box
, i = this.geometry;
if (!1 === n.boxInitialized) {
r.makeEmpty();
const t = i.index
, s = i.attributes.position
, a = this._drawRanges[e];
for (let e = a.start, n = a.start + a.count; e < n; e++) {
let n = e;
t && (n = t.getX(n)),
r.expandByPoint(Td.fromBufferAttribute(s, n))
}
n.boxInitialized = !0
}
return t.copy(r),
t
}
getBoundingSphereAt(e, t) {
if (!1 === this._active[e])
return null;
const n = this._bounds[e]
, r = n.sphere
, i = this.geometry;
if (!1 === n.sphereInitialized) {
r.makeEmpty(),
this.getBoundingBoxAt(e, Cd),
Cd.getCenter(r.center);
const t = i.index
, s = i.attributes.position
, a = this._drawRanges[e];
let o = 0;
for (let e = a.start, n = a.start + a.count; e < n; e++) {
let n = e;
t && (n = t.getX(n)),
Td.fromBufferAttribute(s, n),
o = Math.max(o, r.center.distanceToSquared(Td))
}
r.radius = Math.sqrt(o),
n.sphereInitialized = !0
}
return t.copy(r),
t
}
setMatrixAt(e, t) {
const n = this._active
, r = this._matricesTexture
, i = this._matricesTexture.image.data;
return e >= this._geometryCount || !1 === n[e] || (t.toArray(i, 16 * e),
r.needsUpdate = !0),
this
}
getMatrixAt(e, t) {
const n = this._active
, r = this._matricesTexture.image.data;
return e >= this._geometryCount || !1 === n[e] ? null : t.fromArray(r, 16 * e)
}
setColorAt(e, t) {
null === this._colorsTexture && this._initColorsTexture();
const n = this._active
, r = this._colorsTexture
, i = this._colorsTexture.image.data;
return e >= this._geometryCount || !1 === n[e] || (t.toArray(i, 4 * e),
r.needsUpdate = !0),
this
}
getColorAt(e, t) {
const n = this._active
, r = this._colorsTexture.image.data;
return e >= this._geometryCount || !1 === n[e] ? null : t.fromArray(r, 4 * e)
}
setVisibleAt(e, t) {
const n = this._visibility
, r = this._active;
return e >= this._geometryCount || !1 === r[e] || n[e] === t || (n[e] = t,
this._visibilityChanged = !0),
this
}
getVisibleAt(e) {
const t = this._visibility
, n = this._active;
return !(e >= this._geometryCount || !1 === n[e]) && t[e]
}
raycast(e, t) {
const n = this._visibility
, r = this._active
, i = this._drawRanges
, s = this._geometryCount
, a = this.matrixWorld
, o = this.geometry;
kd.material = this.material,
kd.geometry.index = o.index,
kd.geometry.attributes = o.attributes,
null === kd.geometry.boundingBox && (kd.geometry.boundingBox = new es),
null === kd.geometry.boundingSphere && (kd.geometry.boundingSphere = new ys);
for (let l = 0; l < s; l++) {
if (!n[l] || !r[l])
continue;
const s = i[l];
kd.geometry.setDrawRange(s.start, s.count),
this.getMatrixAt(l, kd.matrixWorld).premultiply(a),
this.getBoundingBoxAt(l, kd.geometry.boundingBox),
this.getBoundingSphereAt(l, kd.geometry.boundingSphere),
kd.raycast(e, Ld);
for (let e = 0, n = Ld.length; e < n; e++) {
const n = Ld[e];
n.object = this,
n.batchId = l,
t.push(n)
}
Ld.length = 0
}
kd.material = null,
kd.geometry.index = null,
kd.geometry.attributes = {},
kd.geometry.setDrawRange(0, 1 / 0)
}
copy(e) {
return super.copy(e),
this.geometry = e.geometry.clone(),
this.perObjectFrustumCulled = e.perObjectFrustumCulled,
this.sortObjects = e.sortObjects,
this.boundingBox = null !== e.boundingBox ? e.boundingBox.clone() : null,
this.boundingSphere = null !== e.boundingSphere ? e.boundingSphere.clone() : null,
this._drawRanges = e._drawRanges.map((e => ({
...e
}))),
this._reservedRanges = e._reservedRanges.map((e => ({
...e
}))),
this._visibility = e._visibility.slice(),
this._active = e._active.slice(),
this._bounds = e._bounds.map((e => ({
boxInitialized: e.boxInitialized,
box: e.box.clone(),
sphereInitialized: e.sphereInitialized,
sphere: e.sphere.clone()
}))),
this._maxGeometryCount = e._maxGeometryCount,
this._maxVertexCount = e._maxVertexCount,
this._maxIndexCount = e._maxIndexCount,
this._geometryInitialized = e._geometryInitialized,
this._geometryCount = e._geometryCount,
this._multiDrawCounts = e._multiDrawCounts.slice(),
this._multiDrawStarts = e._multiDrawStarts.slice(),
this._matricesTexture = e._matricesTexture.clone(),
this._matricesTexture.image.data = this._matricesTexture.image.slice(),
null !== this._colorsTexture && (this._colorsTexture = e._colorsTexture.clone(),
this._colorsTexture.image.data = this._colorsTexture.image.slice()),
this
}
dispose() {
return this.geometry.dispose(),
this._matricesTexture.dispose(),
this._matricesTexture = null,
null !== this._colorsTexture && (this._colorsTexture.dispose(),
this._colorsTexture = null),
this
}
onBeforeRender(e, t, n, r, i) {
if (!this._visibilityChanged && !this.perObjectFrustumCulled && !this.sortObjects)
return;
const s = r.getIndex()
, a = null === s ? 1 : s.array.BYTES_PER_ELEMENT
, o = this._active
, l = this._visibility
, c = this._multiDrawStarts
, u = this._multiDrawCounts
, d = this._drawRanges
, h = this.perObjectFrustumCulled;
h && (Ad.multiplyMatrices(n.projectionMatrix, n.matrixWorldInverse).multiply(this.matrixWorld),
Md.setFromProjectionMatrix(Ad, e.coordinateSystem));
let p = 0;
if (this.sortObjects) {
_d.copy(this.matrixWorld).invert(),
Td.setFromMatrixPosition(n.matrixWorld).applyMatrix4(_d),
Rd.set(0, 0, -1).transformDirection(n.matrixWorld).transformDirection(_d);
for (let n = 0, r = l.length; n < r; n++)
if (l[n] && o[n]) {
this.getMatrixAt(n, bd),
this.getBoundingSphereAt(n, Ed).applyMatrix4(bd);
let e = !1;
if (h && (e = !Md.intersectsSphere(Ed)),
!e) {
const e = Bd.subVectors(Ed.center, Td).dot(Rd);
Pd.push(d[n], e)
}
}
const e = Pd.list
, t = this.customSort;
null === t ? e.sort(i.transparent ? vd : gd) : t.call(this, e, n);
for (let n = 0, r = e.length; n < r; n++) {
const t = e[n];
c[p] = t.start * a,
u[p] = t.count,
p++
}
Pd.reset()
} else
for (let f = 0, m = l.length; f < m; f++)
if (l[f] && o[f]) {
let e = !1;
if (h && (this.getMatrixAt(f, bd),
this.getBoundingSphereAt(f, Ed).applyMatrix4(bd),
e = !Md.intersectsSphere(Ed)),
!e) {
const e = d[f];
c[p] = e.start * a,
u[p] = e.count,
p++
}
}
this._multiDrawCount = p,
this._visibilityChanged = !1
}
onBeforeShadow(e, t, n, r, i, s) {
this.onBeforeRender(e, null, r, i, s)
}
}
class Dd extends xa {
constructor(e) {
super(),
this.isLineBasicMaterial = !0,
this.type = "LineBasicMaterial",
this.color = new ga(16777215),
this.map = null,
this.linewidth = 1,
this.linecap = "round",
this.linejoin = "round",
this.fog = !0,
this.setValues(e)
}
copy(e) {
return super.copy(e),
this.color.copy(e.color),
this.map = e.map,
this.linewidth = e.linewidth,
this.linecap = e.linecap,
this.linejoin = e.linejoin,
this.fog = e.fog,
this
}
}
const jd = new Qi
, Fd = new Qi
, Od = new Es
, Ud = new Cs
, zd = new ys
, Gd = new Qi
, Hd = new Qi;
class Vd extends ea {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : new Wa
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : new Dd;
super(),
this.isLine = !0,
this.type = "Line",
this.geometry = e,
this.material = t,
this.updateMorphTargets()
}
copy(e, t) {
return super.copy(e, t),
this.material = Array.isArray(e.material) ? e.material.slice() : e.material,
this.geometry = e.geometry,
this
}
computeLineDistances() {
const e = this.geometry;
if (null === e.index) {
const t = e.attributes.position
, n = [0];
for (let e = 1, r = t.count; e < r; e++)
jd.fromBufferAttribute(t, e - 1),
Fd.fromBufferAttribute(t, e),
n[e] = n[e - 1],
n[e] += jd.distanceTo(Fd);
e.setAttribute("lineDistance", new ja(n,1))
} else
console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");
return this
}
raycast(e, t) {
const n = this.geometry
, r = this.matrixWorld
, i = e.params.Line.threshold
, s = n.drawRange;
if (null === n.boundingSphere && n.computeBoundingSphere(),
zd.copy(n.boundingSphere),
zd.applyMatrix4(r),
zd.radius += i,
!1 === e.ray.intersectsSphere(zd))
return;
Od.copy(r).invert(),
Ud.copy(e.ray).applyMatrix4(Od);
const a = i / ((this.scale.x + this.scale.y + this.scale.z) / 3)
, o = a * a
, l = this.isLineSegments ? 2 : 1
, c = n.index
, u = n.attributes.position;
if (null !== c) {
const n = Math.max(0, s.start)
, r = Math.min(c.count, s.start + s.count);
for (let i = n, s = r - 1; i < s; i += l) {
const n = c.getX(i)
, r = c.getX(i + 1)
, s = Wd(this, e, Ud, o, n, r);
s && t.push(s)
}
if (this.isLineLoop) {
const i = c.getX(r - 1)
, s = c.getX(n)
, a = Wd(this, e, Ud, o, i, s);
a && t.push(a)
}
} else {
const n = Math.max(0, s.start)
, r = Math.min(u.count, s.start + s.count);
for (let i = n, s = r - 1; i < s; i += l) {
const n = Wd(this, e, Ud, o, i, i + 1);
n && t.push(n)
}
if (this.isLineLoop) {
const i = Wd(this, e, Ud, o, r - 1, n);
i && t.push(i)
}
}
}
updateMorphTargets() {
const e = this.geometry.morphAttributes
, t = Object.keys(e);
if (t.length > 0) {
const n = e[t[0]];
if (void 0 !== n) {
this.morphTargetInfluences = [],
this.morphTargetDictionary = {};
for (let e = 0, t = n.length; e < t; e++) {
const t = n[e].name || String(e);
this.morphTargetInfluences.push(0),
this.morphTargetDictionary[t] = e
}
}
}
}
}
function Wd(e, t, n, r, i, s) {
const a = e.geometry.attributes.position;
jd.fromBufferAttribute(a, i),
Fd.fromBufferAttribute(a, s);
if (n.distanceSqToSegment(jd, Fd, Gd, Hd) > r)
return;
Gd.applyMatrix4(e.matrixWorld);
const o = t.ray.origin.distanceTo(Gd);
return o < t.near || o > t.far ? void 0 : {
distance: o,
point: Hd.clone().applyMatrix4(e.matrixWorld),
index: i,
face: null,
faceIndex: null,
object: e
}
}
const Jd = new Qi
, Xd = new Qi;
class Kd extends Vd {
constructor(e, t) {
super(e, t),
this.isLineSegments = !0,
this.type = "LineSegments"
}
computeLineDistances() {
const e = this.geometry;
if (null === e.index) {
const t = e.attributes.position
, n = [];
for (let e = 0, r = t.count; e < r; e += 2)
Jd.fromBufferAttribute(t, e),
Xd.fromBufferAttribute(t, e + 1),
n[e] = 0 === e ? 0 : n[e - 1],
n[e + 1] = n[e] + Jd.distanceTo(Xd);
e.setAttribute("lineDistance", new ja(n,1))
} else
console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");
return this
}
}
class qd extends Vd {
constructor(e, t) {
super(e, t),
this.isLineLoop = !0,
this.type = "LineLoop"
}
}
class Yd extends xa {
constructor(e) {
super(),
this.isPointsMaterial = !0,
this.type = "PointsMaterial",
this.color = new ga(16777215),
this.map = null,
this.alphaMap = null,
this.size = 1,
this.sizeAttenuation = !0,
this.fog = !0,
this.setValues(e)
}
copy(e) {
return super.copy(e),
this.color.copy(e.color),
this.map = e.map,
this.alphaMap = e.alphaMap,
this.size = e.size,
this.sizeAttenuation = e.sizeAttenuation,
this.fog = e.fog,
this
}
}
const Qd = new Es
, Zd = new Cs
, $d = new ys
, eh = new Qi;
class th extends ea {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : new Wa
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : new Yd;
super(),
this.isPoints = !0,
this.type = "Points",
this.geometry = e,
this.material = t,
this.updateMorphTargets()
}
copy(e, t) {
return super.copy(e, t),
this.material = Array.isArray(e.material) ? e.material.slice() : e.material,
this.geometry = e.geometry,
this
}
raycast(e, t) {
const n = this.geometry
, r = this.matrixWorld
, i = e.params.Points.threshold
, s = n.drawRange;
if (null === n.boundingSphere && n.computeBoundingSphere(),
$d.copy(n.boundingSphere),
$d.applyMatrix4(r),
$d.radius += i,
!1 === e.ray.intersectsSphere($d))
return;
Qd.copy(r).invert(),
Zd.copy(e.ray).applyMatrix4(Qd);
const a = i / ((this.scale.x + this.scale.y + this.scale.z) / 3)
, o = a * a
, l = n.index
, c = n.attributes.position;
if (null !== l) {
for (let n = Math.max(0, s.start), i = Math.min(l.count, s.start + s.count); n < i; n++) {
const i = l.getX(n);
eh.fromBufferAttribute(c, i),
nh(eh, i, o, r, e, t, this)
}
} else {
for (let n = Math.max(0, s.start), i = Math.min(c.count, s.start + s.count); n < i; n++)
eh.fromBufferAttribute(c, n),
nh(eh, n, o, r, e, t, this)
}
}
updateMorphTargets() {
const e = this.geometry.morphAttributes
, t = Object.keys(e);
if (t.length > 0) {
const n = e[t[0]];
if (void 0 !== n) {
this.morphTargetInfluences = [],
this.morphTargetDictionary = {};
for (let e = 0, t = n.length; e < t; e++) {
const t = n[e].name || String(e);
this.morphTargetInfluences.push(0),
this.morphTargetDictionary[t] = e
}
}
}
}
}
function nh(e, t, n, r, i, s, a) {
const o = Zd.distanceSqToPoint(e);
if (o < n) {
const n = new Qi;
Zd.closestPointToPoint(e, n),
n.applyMatrix4(r);
const l = i.ray.origin.distanceTo(n);
if (l < i.near || l > i.far)
return;
s.push({
distance: l,
distanceToRay: Math.sqrt(o),
point: n,
index: t,
face: null,
object: a
})
}
}
class rh extends Gi {
constructor(e, t, n, r, i, s, a, o, l) {
super(e, t, n, r, i, s, a, o, l),
this.isVideoTexture = !0,
this.minFilter = void 0 !== s ? s : Ht,
this.magFilter = void 0 !== i ? i : Ht,
this.generateMipmaps = !1;
const c = this;
"requestVideoFrameCallback"in e && e.requestVideoFrameCallback((function t() {
c.needsUpdate = !0,
e.requestVideoFrameCallback(t)
}
))
}
clone() {
return new this.constructor(this.image).copy(this)
}
update() {
const e = this.image;
!1 === "requestVideoFrameCallback"in e && e.readyState >= e.HAVE_CURRENT_DATA && (this.needsUpdate = !0)
}
}
class ih extends Gi {
constructor(e, t) {
super({
width: e,
height: t
}),
this.isFramebufferTexture = !0,
this.magFilter = Ft,
this.minFilter = Ft,
this.generateMipmaps = !1,
this.needsUpdate = !0
}
}
class sh extends Gi {
constructor(e, t, n, r, i, s, a, o, l, c, u, d) {
super(null, s, a, o, l, c, r, i, u, d),
this.isCompressedTexture = !0,
this.image = {
width: t,
height: n
},
this.mipmaps = e,
this.flipY = !1,
this.generateMipmaps = !1
}
}
class ah extends sh {
constructor(e, t, n, r, i, s) {
super(e, t, n, i, s),
this.isCompressedArrayTexture = !0,
this.image.depth = r,
this.wrapR = Dt,
this.layerUpdates = new Set
}
addLayerUpdates(e) {
this.layerUpdates.add(e)
}
clearLayerUpdates() {
this.layerUpdates.clear()
}
}
class oh extends sh {
constructor(e, t, n) {
super(void 0, e[0].width, e[0].height, t, n, Bt),
this.isCompressedCubeTexture = !0,
this.isCubeTexture = !0,
this.image = e
}
}
class lh extends Gi {
constructor(e, t, n, r, i, s, a, o, l) {
super(e, t, n, r, i, s, a, o, l),
this.isCanvasTexture = !0,
this.needsUpdate = !0
}
}
class ch {
constructor() {
this.type = "Curve",
this.arcLengthDivisions = 200
}
getPoint() {
return console.warn("THREE.Curve: .getPoint() not implemented."),
null
}
getPointAt(e, t) {
const n = this.getUtoTmapping(e);
return this.getPoint(n, t)
}
getPoints() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 5;
const t = [];
for (let n = 0; n <= e; n++)
t.push(this.getPoint(n / e));
return t
}
getSpacedPoints() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 5;
const t = [];
for (let n = 0; n <= e; n++)
t.push(this.getPointAt(n / e));
return t
}
getLength() {
const e = this.getLengths();
return e[e.length - 1]
}
getLengths() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.arcLengthDivisions;
if (this.cacheArcLengths && this.cacheArcLengths.length === e + 1 && !this.needsUpdate)
return this.cacheArcLengths;
this.needsUpdate = !1;
const t = [];
let n, r = this.getPoint(0), i = 0;
t.push(0);
for (let s = 1; s <= e; s++)
n = this.getPoint(s / e),
i += n.distanceTo(r),
t.push(i),
r = n;
return this.cacheArcLengths = t,
t
}
updateArcLengths() {
this.needsUpdate = !0,
this.getLengths()
}
getUtoTmapping(e, t) {
const n = this.getLengths();
let r = 0;
const i = n.length;
let s;
s = t || e * n[i - 1];
let a, o = 0, l = i - 1;
for (; o <= l; )
if (r = Math.floor(o + (l - o) / 2),
a = n[r] - s,
a < 0)
o = r + 1;
else {
if (!(a > 0)) {
l = r;
break
}
l = r - 1
}
if (r = l,
n[r] === s)
return r / (i - 1);
const c = n[r];
return (r + (s - c) / (n[r + 1] - c)) / (i - 1)
}
getTangent(e, t) {
const n = 1e-4;
let r = e - n
, i = e + n;
r < 0 && (r = 0),
i > 1 && (i = 1);
const s = this.getPoint(r)
, a = this.getPoint(i)
, o = t || (s.isVector2 ? new xi : new Qi);
return o.copy(a).sub(s).normalize(),
o
}
getTangentAt(e, t) {
const n = this.getUtoTmapping(e);
return this.getTangent(n, t)
}
computeFrenetFrames(e, t) {
const n = new Qi
, r = []
, i = []
, s = []
, a = new Qi
, o = new Es;
for (let h = 0; h <= e; h++) {
const t = h / e;
r[h] = this.getTangentAt(t, new Qi)
}
i[0] = new Qi,
s[0] = new Qi;
let l = Number.MAX_VALUE;
const c = Math.abs(r[0].x)
, u = Math.abs(r[0].y)
, d = Math.abs(r[0].z);
c <= l && (l = c,
n.set(1, 0, 0)),
u <= l && (l = u,
n.set(0, 1, 0)),
d <= l && n.set(0, 0, 1),
a.crossVectors(r[0], n).normalize(),
i[0].crossVectors(r[0], a),
s[0].crossVectors(r[0], i[0]);
for (let h = 1; h <= e; h++) {
if (i[h] = i[h - 1].clone(),
s[h] = s[h - 1].clone(),
a.crossVectors(r[h - 1], r[h]),
a.length() > Number.EPSILON) {
a.normalize();
const e = Math.acos(pi(r[h - 1].dot(r[h]), -1, 1));
i[h].applyMatrix4(o.makeRotationAxis(a, e))
}
s[h].crossVectors(r[h], i[h])
}
if (!0 === t) {
let t = Math.acos(pi(i[0].dot(i[e]), -1, 1));
t /= e,
r[0].dot(a.crossVectors(i[0], i[e])) > 0 && (t = -t);
for (let n = 1; n <= e; n++)
i[n].applyMatrix4(o.makeRotationAxis(r[n], t * n)),
s[n].crossVectors(r[n], i[n])
}
return {
tangents: r,
normals: i,
binormals: s
}
}
clone() {
return (new this.constructor).copy(this)
}
copy(e) {
return this.arcLengthDivisions = e.arcLengthDivisions,
this
}
toJSON() {
const e = {
metadata: {
version: 4.6,
type: "Curve",
generator: "Curve.toJSON"
}
};
return e.arcLengthDivisions = this.arcLengthDivisions,
e.type = this.type,
e
}
fromJSON(e) {
return this.arcLengthDivisions = e.arcLengthDivisions,
this
}
}
class uh extends ch {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 1
, r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : 1
, i = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : 0
, s = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : 2 * Math.PI
, a = arguments.length > 6 && void 0 !== arguments[6] && arguments[6]
, o = arguments.length > 7 && void 0 !== arguments[7] ? arguments[7] : 0;
super(),
this.isEllipseCurve = !0,
this.type = "EllipseCurve",
this.aX = e,
this.aY = t,
this.xRadius = n,
this.yRadius = r,
this.aStartAngle = i,
this.aEndAngle = s,
this.aClockwise = a,
this.aRotation = o
}
getPoint(e) {
const t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : new xi
, n = 2 * Math.PI;
let r = this.aEndAngle - this.aStartAngle;
const i = Math.abs(r) < Number.EPSILON;
for (; r < 0; )
r += n;
for (; r > n; )
r -= n;
r < Number.EPSILON && (r = i ? 0 : n),
!0 !== this.aClockwise || i || (r === n ? r = -n : r -= n);
const s = this.aStartAngle + e * r;
let a = this.aX + this.xRadius * Math.cos(s)
, o = this.aY + this.yRadius * Math.sin(s);
if (0 !== this.aRotation) {
const e = Math.cos(this.aRotation)
, t = Math.sin(this.aRotation)
, n = a - this.aX
, r = o - this.aY;
a = n * e - r * t + this.aX,
o = n * t + r * e + this.aY
}
return t.set(a, o)
}
copy(e) {
return super.copy(e),
this.aX = e.aX,
this.aY = e.aY,
this.xRadius = e.xRadius,
this.yRadius = e.yRadius,
this.aStartAngle = e.aStartAngle,
this.aEndAngle = e.aEndAngle,
this.aClockwise = e.aClockwise,
this.aRotation = e.aRotation,
this
}
toJSON() {
const e = super.toJSON();
return e.aX = this.aX,
e.aY = this.aY,
e.xRadius = this.xRadius,
e.yRadius = this.yRadius,
e.aStartAngle = this.aStartAngle,
e.aEndAngle = this.aEndAngle,
e.aClockwise = this.aClockwise,
e.aRotation = this.aRotation,
e
}
fromJSON(e) {
return super.fromJSON(e),
this.aX = e.aX,
this.aY = e.aY,
this.xRadius = e.xRadius,
this.yRadius = e.yRadius,
this.aStartAngle = e.aStartAngle,
this.aEndAngle = e.aEndAngle,
this.aClockwise = e.aClockwise,
this.aRotation = e.aRotation,
this
}
}
class dh extends uh {
constructor(e, t, n, r, i, s) {
super(e, t, n, n, r, i, s),
this.isArcCurve = !0,
this.type = "ArcCurve"
}
}
function hh() {
let e = 0
, t = 0
, n = 0
, r = 0;
function i(i, s, a, o) {
e = i,
t = a,
n = -3 * i + 3 * s - 2 * a - o,
r = 2 * i - 2 * s + a + o
}
return {
initCatmullRom: function(e, t, n, r, s) {
i(t, n, s * (n - e), s * (r - t))
},
initNonuniformCatmullRom: function(e, t, n, r, s, a, o) {
let l = (t - e) / s - (n - e) / (s + a) + (n - t) / a
, c = (n - t) / a - (r - t) / (a + o) + (r - n) / o;
l *= a,
c *= a,
i(t, n, l, c)
},
calc: function(i) {
const s = i * i;
return e + t * i + n * s + r * (s * i)
}
}
}
const ph = new Qi
, fh = new hh
, mh = new hh
, gh = new hh;
class vh extends ch {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []
, t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1]
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : "centripetal"
, r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : .5;
super(),
this.isCatmullRomCurve3 = !0,
this.type = "CatmullRomCurve3",
this.points = e,
this.closed = t,
this.curveType = n,
this.tension = r
}
getPoint(e) {
const t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : new Qi
, n = this.points
, r = n.length
, i = (r - (this.closed ? 0 : 1)) * e;
let s, a, o = Math.floor(i), l = i - o;
this.closed ? o += o > 0 ? 0 : (Math.floor(Math.abs(o) / r) + 1) * r : 0 === l && o === r - 1 && (o = r - 2,
l = 1),
this.closed || o > 0 ? s = n[(o - 1) % r] : (ph.subVectors(n[0], n[1]).add(n[0]),
s = ph);
const c = n[o % r]
, u = n[(o + 1) % r];
if (this.closed || o + 2 < r ? a = n[(o + 2) % r] : (ph.subVectors(n[r - 1], n[r - 2]).add(n[r - 1]),
a = ph),
"centripetal" === this.curveType || "chordal" === this.curveType) {
const e = "chordal" === this.curveType ? .5 : .25;
let t = Math.pow(s.distanceToSquared(c), e)
, n = Math.pow(c.distanceToSquared(u), e)
, r = Math.pow(u.distanceToSquared(a), e);
n < 1e-4 && (n = 1),
t < 1e-4 && (t = n),
r < 1e-4 && (r = n),
fh.initNonuniformCatmullRom(s.x, c.x, u.x, a.x, t, n, r),
mh.initNonuniformCatmullRom(s.y, c.y, u.y, a.y, t, n, r),
gh.initNonuniformCatmullRom(s.z, c.z, u.z, a.z, t, n, r)
} else
"catmullrom" === this.curveType && (fh.initCatmullRom(s.x, c.x, u.x, a.x, this.tension),
mh.initCatmullRom(s.y, c.y, u.y, a.y, this.tension),
gh.initCatmullRom(s.z, c.z, u.z, a.z, this.tension));
return t.set(fh.calc(l), mh.calc(l), gh.calc(l)),
t
}
copy(e) {
super.copy(e),
this.points = [];
for (let t = 0, n = e.points.length; t < n; t++) {
const n = e.points[t];
this.points.push(n.clone())
}
return this.closed = e.closed,
this.curveType = e.curveType,
this.tension = e.tension,
this
}
toJSON() {
const e = super.toJSON();
e.points = [];
for (let t = 0, n = this.points.length; t < n; t++) {
const n = this.points[t];
e.points.push(n.toArray())
}
return e.closed = this.closed,
e.curveType = this.curveType,
e.tension = this.tension,
e
}
fromJSON(e) {
super.fromJSON(e),
this.points = [];
for (let t = 0, n = e.points.length; t < n; t++) {
const n = e.points[t];
this.points.push((new Qi).fromArray(n))
}
return this.closed = e.closed,
this.curveType = e.curveType,
this.tension = e.tension,
this
}
}
function yh(e, t, n, r, i) {
const s = .5 * (r - t)
, a = .5 * (i - n)
, o = e * e;
return (2 * n - 2 * r + s + a) * (e * o) + (-3 * n + 3 * r - 2 * s - a) * o + s * e + n
}
function xh(e, t, n, r) {
return function(e, t) {
const n = 1 - e;
return n * n * t
}(e, t) + function(e, t) {
return 2 * (1 - e) * e * t
}(e, n) + function(e, t) {
return e * e * t
}(e, r)
}
function bh(e, t, n, r, i) {
return function(e, t) {
const n = 1 - e;
return n * n * n * t
}(e, t) + function(e, t) {
const n = 1 - e;
return 3 * n * n * e * t
}(e, n) + function(e, t) {
return 3 * (1 - e) * e * e * t
}(e, r) + function(e, t) {
return e * e * e * t
}(e, i)
}
class _h extends ch {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : new xi
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : new xi
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : new xi
, r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : new xi;
super(),
this.isCubicBezierCurve = !0,
this.type = "CubicBezierCurve",
this.v0 = e,
this.v1 = t,
this.v2 = n,
this.v3 = r
}
getPoint(e) {
const t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : new xi
, n = this.v0
, r = this.v1
, i = this.v2
, s = this.v3;
return t.set(bh(e, n.x, r.x, i.x, s.x), bh(e, n.y, r.y, i.y, s.y)),
t
}
copy(e) {
return super.copy(e),
this.v0.copy(e.v0),
this.v1.copy(e.v1),
this.v2.copy(e.v2),
this.v3.copy(e.v3),
this
}
toJSON() {
const e = super.toJSON();
return e.v0 = this.v0.toArray(),
e.v1 = this.v1.toArray(),
e.v2 = this.v2.toArray(),
e.v3 = this.v3.toArray(),
e
}
fromJSON(e) {
return super.fromJSON(e),
this.v0.fromArray(e.v0),
this.v1.fromArray(e.v1),
this.v2.fromArray(e.v2),
this.v3.fromArray(e.v3),
this
}
}
class wh extends ch {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : new Qi
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : new Qi
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : new Qi
, r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : new Qi;
super(),
this.isCubicBezierCurve3 = !0,
this.type = "CubicBezierCurve3",
this.v0 = e,
this.v1 = t,
this.v2 = n,
this.v3 = r
}
getPoint(e) {
const t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : new Qi
, n = this.v0
, r = this.v1
, i = this.v2
, s = this.v3;
return t.set(bh(e, n.x, r.x, i.x, s.x), bh(e, n.y, r.y, i.y, s.y), bh(e, n.z, r.z, i.z, s.z)),
t
}
copy(e) {
return super.copy(e),
this.v0.copy(e.v0),
this.v1.copy(e.v1),
this.v2.copy(e.v2),
this.v3.copy(e.v3),
this
}
toJSON() {
const e = super.toJSON();
return e.v0 = this.v0.toArray(),
e.v1 = this.v1.toArray(),
e.v2 = this.v2.toArray(),
e.v3 = this.v3.toArray(),
e
}
fromJSON(e) {
return super.fromJSON(e),
this.v0.fromArray(e.v0),
this.v1.fromArray(e.v1),
this.v2.fromArray(e.v2),
this.v3.fromArray(e.v3),
this
}
}
class Sh extends ch {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : new xi
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : new xi;
super(),
this.isLineCurve = !0,
this.type = "LineCurve",
this.v1 = e,
this.v2 = t
}
getPoint(e) {
const t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : new xi;
return 1 === e ? t.copy(this.v2) : (t.copy(this.v2).sub(this.v1),
t.multiplyScalar(e).add(this.v1)),
t
}
getPointAt(e, t) {
return this.getPoint(e, t)
}
getTangent(e) {
return (arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : new xi).subVectors(this.v2, this.v1).normalize()
}
getTangentAt(e, t) {
return this.getTangent(e, t)
}
copy(e) {
return super.copy(e),
this.v1.copy(e.v1),
this.v2.copy(e.v2),
this
}
toJSON() {
const e = super.toJSON();
return e.v1 = this.v1.toArray(),
e.v2 = this.v2.toArray(),
e
}
fromJSON(e) {
return super.fromJSON(e),
this.v1.fromArray(e.v1),
this.v2.fromArray(e.v2),
this
}
}
class Ah extends ch {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : new Qi
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : new Qi;
super(),
this.isLineCurve3 = !0,
this.type = "LineCurve3",
this.v1 = e,
this.v2 = t
}
getPoint(e) {
const t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : new Qi;
return 1 === e ? t.copy(this.v2) : (t.copy(this.v2).sub(this.v1),
t.multiplyScalar(e).add(this.v1)),
t
}
getPointAt(e, t) {
return this.getPoint(e, t)
}
getTangent(e) {
return (arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : new Qi).subVectors(this.v2, this.v1).normalize()
}
getTangentAt(e, t) {
return this.getTangent(e, t)
}
copy(e) {
return super.copy(e),
this.v1.copy(e.v1),
this.v2.copy(e.v2),
this
}
toJSON() {
const e = super.toJSON();
return e.v1 = this.v1.toArray(),
e.v2 = this.v2.toArray(),
e
}
fromJSON(e) {
return super.fromJSON(e),
this.v1.fromArray(e.v1),
this.v2.fromArray(e.v2),
this
}
}
class Mh extends ch {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : new xi
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : new xi
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : new xi;
super(),
this.isQuadraticBezierCurve = !0,
this.type = "QuadraticBezierCurve",
this.v0 = e,
this.v1 = t,
this.v2 = n
}
getPoint(e) {
const t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : new xi
, n = this.v0
, r = this.v1
, i = this.v2;
return t.set(xh(e, n.x, r.x, i.x), xh(e, n.y, r.y, i.y)),
t
}
copy(e) {
return super.copy(e),
this.v0.copy(e.v0),
this.v1.copy(e.v1),
this.v2.copy(e.v2),
this
}
toJSON() {
const e = super.toJSON();
return e.v0 = this.v0.toArray(),
e.v1 = this.v1.toArray(),
e.v2 = this.v2.toArray(),
e
}
fromJSON(e) {
return super.fromJSON(e),
this.v0.fromArray(e.v0),
this.v1.fromArray(e.v1),
this.v2.fromArray(e.v2),
this
}
}
class Ch extends ch {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : new Qi
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : new Qi
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : new Qi;
super(),
this.isQuadraticBezierCurve3 = !0,
this.type = "QuadraticBezierCurve3",
this.v0 = e,
this.v1 = t,
this.v2 = n
}
getPoint(e) {
const t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : new Qi
, n = this.v0
, r = this.v1
, i = this.v2;
return t.set(xh(e, n.x, r.x, i.x), xh(e, n.y, r.y, i.y), xh(e, n.z, r.z, i.z)),
t
}
copy(e) {
return super.copy(e),
this.v0.copy(e.v0),
this.v1.copy(e.v1),
this.v2.copy(e.v2),
this
}
toJSON() {
const e = super.toJSON();
return e.v0 = this.v0.toArray(),
e.v1 = this.v1.toArray(),
e.v2 = this.v2.toArray(),
e
}
fromJSON(e) {
return super.fromJSON(e),
this.v0.fromArray(e.v0),
this.v1.fromArray(e.v1),
this.v2.fromArray(e.v2),
this
}
}
class Eh extends ch {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [];
super(),
this.isSplineCurve = !0,
this.type = "SplineCurve",
this.points = e
}
getPoint(e) {
const t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : new xi
, n = this.points
, r = (n.length - 1) * e
, i = Math.floor(r)
, s = r - i
, a = n[0 === i ? i : i - 1]
, o = n[i]
, l = n[i > n.length - 2 ? n.length - 1 : i + 1]
, c = n[i > n.length - 3 ? n.length - 1 : i + 2];
return t.set(yh(s, a.x, o.x, l.x, c.x), yh(s, a.y, o.y, l.y, c.y)),
t
}
copy(e) {
super.copy(e),
this.points = [];
for (let t = 0, n = e.points.length; t < n; t++) {
const n = e.points[t];
this.points.push(n.clone())
}
return this
}
toJSON() {
const e = super.toJSON();
e.points = [];
for (let t = 0, n = this.points.length; t < n; t++) {
const n = this.points[t];
e.points.push(n.toArray())
}
return e
}
fromJSON(e) {
super.fromJSON(e),
this.points = [];
for (let t = 0, n = e.points.length; t < n; t++) {
const n = e.points[t];
this.points.push((new xi).fromArray(n))
}
return this
}
}
var Th = Object.freeze({
__proto__: null,
ArcCurve: dh,
CatmullRomCurve3: vh,
CubicBezierCurve: _h,
CubicBezierCurve3: wh,
EllipseCurve: uh,
LineCurve: Sh,
LineCurve3: Ah,
QuadraticBezierCurve: Mh,
QuadraticBezierCurve3: Ch,
SplineCurve: Eh
});
class Rh extends ch {
constructor() {
super(),
this.type = "CurvePath",
this.curves = [],
this.autoClose = !1
}
add(e) {
this.curves.push(e)
}
closePath() {
const e = this.curves[0].getPoint(0)
, t = this.curves[this.curves.length - 1].getPoint(1);
if (!e.equals(t)) {
const n = !0 === e.isVector2 ? "LineCurve" : "LineCurve3";
this.curves.push(new Th[n](t,e))
}
return this
}
getPoint(e, t) {
const n = e * this.getLength()
, r = this.getCurveLengths();
let i = 0;
for (; i < r.length; ) {
if (r[i] >= n) {
const e = r[i] - n
, s = this.curves[i]
, a = s.getLength()
, o = 0 === a ? 0 : 1 - e / a;
return s.getPointAt(o, t)
}
i++
}
return null
}
getLength() {
const e = this.getCurveLengths();
return e[e.length - 1]
}
updateArcLengths() {
this.needsUpdate = !0,
this.cacheLengths = null,
this.getCurveLengths()
}
getCurveLengths() {
if (this.cacheLengths && this.cacheLengths.length === this.curves.length)
return this.cacheLengths;
const e = [];
let t = 0;
for (let n = 0, r = this.curves.length; n < r; n++)
t += this.curves[n].getLength(),
e.push(t);
return this.cacheLengths = e,
e
}
getSpacedPoints() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 40;
const t = [];
for (let n = 0; n <= e; n++)
t.push(this.getPoint(n / e));
return this.autoClose && t.push(t[0]),
t
}
getPoints() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 12;
const t = [];
let n;
for (let r = 0, i = this.curves; r < i.length; r++) {
const s = i[r]
, a = s.isEllipseCurve ? 2 * e : s.isLineCurve || s.isLineCurve3 ? 1 : s.isSplineCurve ? e * s.points.length : e
, o = s.getPoints(a);
for (let e = 0; e < o.length; e++) {
const r = o[e];
n && n.equals(r) || (t.push(r),
n = r)
}
}
return this.autoClose && t.length > 1 && !t[t.length - 1].equals(t[0]) && t.push(t[0]),
t
}
copy(e) {
super.copy(e),
this.curves = [];
for (let t = 0, n = e.curves.length; t < n; t++) {
const n = e.curves[t];
this.curves.push(n.clone())
}
return this.autoClose = e.autoClose,
this
}
toJSON() {
const e = super.toJSON();
e.autoClose = this.autoClose,
e.curves = [];
for (let t = 0, n = this.curves.length; t < n; t++) {
const n = this.curves[t];
e.curves.push(n.toJSON())
}
return e
}
fromJSON(e) {
super.fromJSON(e),
this.autoClose = e.autoClose,
this.curves = [];
for (let t = 0, n = e.curves.length; t < n; t++) {
const n = e.curves[t];
this.curves.push((new Th[n.type]).fromJSON(n))
}
return this
}
}
class Bh extends Rh {
constructor(e) {
super(),
this.type = "Path",
this.currentPoint = new xi,
e && this.setFromPoints(e)
}
setFromPoints(e) {
this.moveTo(e[0].x, e[0].y);
for (let t = 1, n = e.length; t < n; t++)
this.lineTo(e[t].x, e[t].y);
return this
}
moveTo(e, t) {
return this.currentPoint.set(e, t),
this
}
lineTo(e, t) {
const n = new Sh(this.currentPoint.clone(),new xi(e,t));
return this.curves.push(n),
this.currentPoint.set(e, t),
this
}
quadraticCurveTo(e, t, n, r) {
const i = new Mh(this.currentPoint.clone(),new xi(e,t),new xi(n,r));
return this.curves.push(i),
this.currentPoint.set(n, r),
this
}
bezierCurveTo(e, t, n, r, i, s) {
const a = new _h(this.currentPoint.clone(),new xi(e,t),new xi(n,r),new xi(i,s));
return this.curves.push(a),
this.currentPoint.set(i, s),
this
}
splineThru(e) {
const t = [this.currentPoint.clone()].concat(e)
, n = new Eh(t);
return this.curves.push(n),
this.currentPoint.copy(e[e.length - 1]),
this
}
arc(e, t, n, r, i, s) {
const a = this.currentPoint.x
, o = this.currentPoint.y;
return this.absarc(e + a, t + o, n, r, i, s),
this
}
absarc(e, t, n, r, i, s) {
return this.absellipse(e, t, n, n, r, i, s),
this
}
ellipse(e, t, n, r, i, s, a, o) {
const l = this.currentPoint.x
, c = this.currentPoint.y;
return this.absellipse(e + l, t + c, n, r, i, s, a, o),
this
}
absellipse(e, t, n, r, i, s, a, o) {
const l = new uh(e,t,n,r,i,s,a,o);
if (this.curves.length > 0) {
const e = l.getPoint(0);
e.equals(this.currentPoint) || this.lineTo(e.x, e.y)
}
this.curves.push(l);
const c = l.getPoint(1);
return this.currentPoint.copy(c),
this
}
copy(e) {
return super.copy(e),
this.currentPoint.copy(e.currentPoint),
this
}
toJSON() {
const e = super.toJSON();
return e.currentPoint = this.currentPoint.toArray(),
e
}
fromJSON(e) {
return super.fromJSON(e),
this.currentPoint.fromArray(e.currentPoint),
this
}
}
class Ph extends Wa {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [new xi(0,-.5), new xi(.5,0), new xi(0,.5)]
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 12
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 0
, r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : 2 * Math.PI;
super(),
this.type = "LatheGeometry",
this.parameters = {
points: e,
segments: t,
phiStart: n,
phiLength: r
},
t = Math.floor(t),
r = pi(r, 0, 2 * Math.PI);
const i = []
, s = []
, a = []
, o = []
, l = []
, c = 1 / t
, u = new Qi
, d = new xi
, h = new Qi
, p = new Qi
, f = new Qi;
let m = 0
, g = 0;
for (let v = 0; v <= e.length - 1; v++)
switch (v) {
case 0:
m = e[v + 1].x - e[v].x,
g = e[v + 1].y - e[v].y,
h.x = 1 * g,
h.y = -m,
h.z = 0 * g,
f.copy(h),
h.normalize(),
o.push(h.x, h.y, h.z);
break;
case e.length - 1:
o.push(f.x, f.y, f.z);
break;
default:
m = e[v + 1].x - e[v].x,
g = e[v + 1].y - e[v].y,
h.x = 1 * g,
h.y = -m,
h.z = 0 * g,
p.copy(h),
h.x += f.x,
h.y += f.y,
h.z += f.z,
h.normalize(),
o.push(h.x, h.y, h.z),
f.copy(p)
}
for (let v = 0; v <= t; v++) {
const i = n + v * c * r
, h = Math.sin(i)
, p = Math.cos(i);
for (let n = 0; n <= e.length - 1; n++) {
u.x = e[n].x * h,
u.y = e[n].y,
u.z = e[n].x * p,
s.push(u.x, u.y, u.z),
d.x = v / t,
d.y = n / (e.length - 1),
a.push(d.x, d.y);
const r = o[3 * n + 0] * h
, i = o[3 * n + 1]
, c = o[3 * n + 0] * p;
l.push(r, i, c)
}
}
for (let v = 0; v < t; v++)
for (let t = 0; t < e.length - 1; t++) {
const n = t + v * e.length
, r = n
, s = n + e.length
, a = n + e.length + 1
, o = n + 1;
i.push(r, s, o),
i.push(a, o, s)
}
this.setIndex(i),
this.setAttribute("position", new ja(s,3)),
this.setAttribute("uv", new ja(a,2)),
this.setAttribute("normal", new ja(l,3))
}
copy(e) {
return super.copy(e),
this.parameters = Object.assign({}, e.parameters),
this
}
static fromJSON(e) {
return new Ph(e.points,e.segments,e.phiStart,e.phiLength)
}
}
class kh extends Ph {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 1
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 1
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 4
, r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : 8;
const i = new Bh;
i.absarc(0, -t / 2, e, 1.5 * Math.PI, 0),
i.absarc(0, t / 2, e, 0, .5 * Math.PI),
super(i.getPoints(n), r),
this.type = "CapsuleGeometry",
this.parameters = {
radius: e,
length: t,
capSegments: n,
radialSegments: r
}
}
static fromJSON(e) {
return new kh(e.radius,e.length,e.capSegments,e.radialSegments)
}
}
class Lh extends Wa {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 1
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 32
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 0
, r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : 2 * Math.PI;
super(),
this.type = "CircleGeometry",
this.parameters = {
radius: e,
segments: t,
thetaStart: n,
thetaLength: r
},
t = Math.max(3, t);
const i = []
, s = []
, a = []
, o = []
, l = new Qi
, c = new xi;
s.push(0, 0, 0),
a.push(0, 0, 1),
o.push(.5, .5);
for (let u = 0, d = 3; u <= t; u++,
d += 3) {
const i = n + u / t * r;
l.x = e * Math.cos(i),
l.y = e * Math.sin(i),
s.push(l.x, l.y, l.z),
a.push(0, 0, 1),
c.x = (s[d] / e + 1) / 2,
c.y = (s[d + 1] / e + 1) / 2,
o.push(c.x, c.y)
}
for (let u = 1; u <= t; u++)
i.push(u, u + 1, 0);
this.setIndex(i),
this.setAttribute("position", new ja(s,3)),
this.setAttribute("normal", new ja(a,3)),
this.setAttribute("uv", new ja(o,2))
}
copy(e) {
return super.copy(e),
this.parameters = Object.assign({}, e.parameters),
this
}
static fromJSON(e) {
return new Lh(e.radius,e.segments,e.thetaStart,e.thetaLength)
}
}
class Ih extends Wa {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 1
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 1
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 1
, r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : 32
, i = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : 1
, s = arguments.length > 5 && void 0 !== arguments[5] && arguments[5]
, a = arguments.length > 6 && void 0 !== arguments[6] ? arguments[6] : 0
, o = arguments.length > 7 && void 0 !== arguments[7] ? arguments[7] : 2 * Math.PI;
super(),
this.type = "CylinderGeometry",
this.parameters = {
radiusTop: e,
radiusBottom: t,
height: n,
radialSegments: r,
heightSegments: i,
openEnded: s,
thetaStart: a,
thetaLength: o
};
const l = this;
r = Math.floor(r),
i = Math.floor(i);
const c = []
, u = []
, d = []
, h = [];
let p = 0;
const f = []
, m = n / 2;
let g = 0;
function v(n) {
const i = p
, s = new xi
, f = new Qi;
let v = 0;
const y = !0 === n ? e : t
, x = !0 === n ? 1 : -1;
for (let e = 1; e <= r; e++)
u.push(0, m * x, 0),
d.push(0, x, 0),
h.push(.5, .5),
p++;
const b = p;
for (let e = 0; e <= r; e++) {
const t = e / r * o + a
, n = Math.cos(t)
, i = Math.sin(t);
f.x = y * i,
f.y = m * x,
f.z = y * n,
u.push(f.x, f.y, f.z),
d.push(0, x, 0),
s.x = .5 * n + .5,
s.y = .5 * i * x + .5,
h.push(s.x, s.y),
p++
}
for (let e = 0; e < r; e++) {
const t = i + e
, r = b + e;
!0 === n ? c.push(r, r + 1, t) : c.push(r + 1, r, t),
v += 3
}
l.addGroup(g, v, !0 === n ? 1 : 2),
g += v
}
!function() {
const s = new Qi
, v = new Qi;
let y = 0;
const x = (t - e) / n;
for (let l = 0; l <= i; l++) {
const c = []
, g = l / i
, y = g * (t - e) + e;
for (let e = 0; e <= r; e++) {
const t = e / r
, i = t * o + a
, l = Math.sin(i)
, f = Math.cos(i);
v.x = y * l,
v.y = -g * n + m,
v.z = y * f,
u.push(v.x, v.y, v.z),
s.set(l, x, f).normalize(),
d.push(s.x, s.y, s.z),
h.push(t, 1 - g),
c.push(p++)
}
f.push(c)
}
for (let e = 0; e < r; e++)
for (let t = 0; t < i; t++) {
const n = f[t][e]
, r = f[t + 1][e]
, i = f[t + 1][e + 1]
, s = f[t][e + 1];
c.push(n, r, s),
c.push(r, i, s),
y += 6
}
l.addGroup(g, y, 0),
g += y
}(),
!1 === s && (e > 0 && v(!0),
t > 0 && v(!1)),
this.setIndex(c),
this.setAttribute("position", new ja(u,3)),
this.setAttribute("normal", new ja(d,3)),
this.setAttribute("uv", new ja(h,2))
}
copy(e) {
return super.copy(e),
this.parameters = Object.assign({}, e.parameters),
this
}
static fromJSON(e) {
return new Ih(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)
}
}
class Nh extends Ih {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 1
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 1
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 32
, r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : 1
, i = arguments.length > 4 && void 0 !== arguments[4] && arguments[4]
, s = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : 0
, a = arguments.length > 6 && void 0 !== arguments[6] ? arguments[6] : 2 * Math.PI;
super(0, e, t, n, r, i, s, a),
this.type = "ConeGeometry",
this.parameters = {
radius: e,
height: t,
radialSegments: n,
heightSegments: r,
openEnded: i,
thetaStart: s,
thetaLength: a
}
}
static fromJSON(e) {
return new Nh(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)
}
}
class Dh extends Wa {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : []
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 1
, r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : 0;
super(),
this.type = "PolyhedronGeometry",
this.parameters = {
vertices: e,
indices: t,
radius: n,
detail: r
};
const i = []
, s = [];
function a(e, t, n, r) {
const i = r + 1
, s = [];
for (let a = 0; a <= i; a++) {
s[a] = [];
const r = e.clone().lerp(n, a / i)
, o = t.clone().lerp(n, a / i)
, l = i - a;
for (let e = 0; e <= l; e++)
s[a][e] = 0 === e && a === i ? r : r.clone().lerp(o, e / l)
}
for (let a = 0; a < i; a++)
for (let e = 0; e < 2 * (i - a) - 1; e++) {
const t = Math.floor(e / 2);
e % 2 === 0 ? (o(s[a][t + 1]),
o(s[a + 1][t]),
o(s[a][t])) : (o(s[a][t + 1]),
o(s[a + 1][t + 1]),
o(s[a + 1][t]))
}
}
function o(e) {
i.push(e.x, e.y, e.z)
}
function l(t, n) {
const r = 3 * t;
n.x = e[r + 0],
n.y = e[r + 1],
n.z = e[r + 2]
}
function c(e, t, n, r) {
r < 0 && 1 === e.x && (s[t] = e.x - 1),
0 === n.x && 0 === n.z && (s[t] = r / 2 / Math.PI + .5)
}
function u(e) {
return Math.atan2(e.z, -e.x)
}
!function(e) {
const n = new Qi
, r = new Qi
, i = new Qi;
for (let s = 0; s < t.length; s += 3)
l(t[s + 0], n),
l(t[s + 1], r),
l(t[s + 2], i),
a(n, r, i, e)
}(r),
function(e) {
const t = new Qi;
for (let n = 0; n < i.length; n += 3)
t.x = i[n + 0],
t.y = i[n + 1],
t.z = i[n + 2],
t.normalize().multiplyScalar(e),
i[n + 0] = t.x,
i[n + 1] = t.y,
i[n + 2] = t.z
}(n),
function() {
const e = new Qi;
for (let n = 0; n < i.length; n += 3) {
e.x = i[n + 0],
e.y = i[n + 1],
e.z = i[n + 2];
const r = u(e) / 2 / Math.PI + .5
, a = (t = e,
Math.atan2(-t.y, Math.sqrt(t.x * t.x + t.z * t.z)) / Math.PI + .5);
s.push(r, 1 - a)
}
var t;
(function() {
const e = new Qi
, t = new Qi
, n = new Qi
, r = new Qi
, a = new xi
, o = new xi
, l = new xi;
for (let d = 0, h = 0; d < i.length; d += 9,
h += 6) {
e.set(i[d + 0], i[d + 1], i[d + 2]),
t.set(i[d + 3], i[d + 4], i[d + 5]),
n.set(i[d + 6], i[d + 7], i[d + 8]),
a.set(s[h + 0], s[h + 1]),
o.set(s[h + 2], s[h + 3]),
l.set(s[h + 4], s[h + 5]),
r.copy(e).add(t).add(n).divideScalar(3);
const p = u(r);
c(a, h + 0, e, p),
c(o, h + 2, t, p),
c(l, h + 4, n, p)
}
}
)(),
function() {
for (let e = 0; e < s.length; e += 6) {
const t = s[e + 0]
, n = s[e + 2]
, r = s[e + 4]
, i = Math.max(t, n, r)
, a = Math.min(t, n, r);
i > .9 && a < .1 && (t < .2 && (s[e + 0] += 1),
n < .2 && (s[e + 2] += 1),
r < .2 && (s[e + 4] += 1))
}
}()
}(),
this.setAttribute("position", new ja(i,3)),
this.setAttribute("normal", new ja(i.slice(),3)),
this.setAttribute("uv", new ja(s,2)),
0 === r ? this.computeVertexNormals() : this.normalizeNormals()
}
copy(e) {
return super.copy(e),
this.parameters = Object.assign({}, e.parameters),
this
}
static fromJSON(e) {
return new Dh(e.vertices,e.indices,e.radius,e.details)
}
}
class jh extends Dh {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 1
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;
const n = (1 + Math.sqrt(5)) / 2
, r = 1 / n;
super([-1, -1, -1, -1, -1, 1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 0, -r, -n, 0, -r, n, 0, r, -n, 0, r, n, -r, -n, 0, -r, n, 0, r, -n, 0, r, n, 0, -n, 0, -r, n, 0, -r, -n, 0, r, n, 0, r], [3, 11, 7, 3, 7, 15, 3, 15, 13, 7, 19, 17, 7, 17, 6, 7, 6, 15, 17, 4, 8, 17, 8, 10, 17, 10, 6, 8, 0, 16, 8, 16, 2, 8, 2, 10, 0, 12, 1, 0, 1, 18, 0, 18, 16, 6, 10, 2, 6, 2, 13, 6, 13, 15, 2, 16, 18, 2, 18, 3, 2, 3, 13, 18, 1, 9, 18, 9, 11, 18, 11, 3, 4, 14, 12, 4, 12, 0, 4, 0, 8, 11, 9, 5, 11, 5, 19, 11, 19, 7, 19, 5, 14, 19, 14, 4, 19, 4, 17, 1, 12, 14, 1, 14, 5, 1, 5, 9], e, t),
this.type = "DodecahedronGeometry",
this.parameters = {
radius: e,
detail: t
}
}
static fromJSON(e) {
return new jh(e.radius,e.detail)
}
}
const Fh = new Qi
, Oh = new Qi
, Uh = new Qi
, zh = new da;
class Gh extends Wa {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : null
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 1;
if (super(),
this.type = "EdgesGeometry",
this.parameters = {
geometry: e,
thresholdAngle: t
},
null !== e) {
const n = 4
, r = Math.pow(10, n)
, i = Math.cos(ui * t)
, s = e.getIndex()
, a = e.getAttribute("position")
, o = s ? s.count : a.count
, l = [0, 0, 0]
, c = ["a", "b", "c"]
, u = new Array(3)
, d = {}
, h = [];
for (let e = 0; e < o; e += 3) {
s ? (l[0] = s.getX(e),
l[1] = s.getX(e + 1),
l[2] = s.getX(e + 2)) : (l[0] = e,
l[1] = e + 1,
l[2] = e + 2);
const {a: t, b: n, c: o} = zh;
if (t.fromBufferAttribute(a, l[0]),
n.fromBufferAttribute(a, l[1]),
o.fromBufferAttribute(a, l[2]),
zh.getNormal(Uh),
u[0] = "".concat(Math.round(t.x * r), ",").concat(Math.round(t.y * r), ",").concat(Math.round(t.z * r)),
u[1] = "".concat(Math.round(n.x * r), ",").concat(Math.round(n.y * r), ",").concat(Math.round(n.z * r)),
u[2] = "".concat(Math.round(o.x * r), ",").concat(Math.round(o.y * r), ",").concat(Math.round(o.z * r)),
u[0] !== u[1] && u[1] !== u[2] && u[2] !== u[0])
for (let e = 0; e < 3; e++) {
const t = (e + 1) % 3
, n = u[e]
, r = u[t]
, s = zh[c[e]]
, a = zh[c[t]]
, o = "".concat(n, "_").concat(r)
, p = "".concat(r, "_").concat(n);
p in d && d[p] ? (Uh.dot(d[p].normal) <= i && (h.push(s.x, s.y, s.z),
h.push(a.x, a.y, a.z)),
d[p] = null) : o in d || (d[o] = {
index0: l[e],
index1: l[t],
normal: Uh.clone()
})
}
}
for (const e in d)
if (d[e]) {
const {index0: t, index1: n} = d[e];
Fh.fromBufferAttribute(a, t),
Oh.fromBufferAttribute(a, n),
h.push(Fh.x, Fh.y, Fh.z),
h.push(Oh.x, Oh.y, Oh.z)
}
this.setAttribute("position", new ja(h,3))
}
}
copy(e) {
return super.copy(e),
this.parameters = Object.assign({}, e.parameters),
this
}
}
class Hh extends Bh {
constructor(e) {
super(e),
this.uuid = hi(),
this.type = "Shape",
this.holes = []
}
getPointsHoles(e) {
const t = [];
for (let n = 0, r = this.holes.length; n < r; n++)
t[n] = this.holes[n].getPoints(e);
return t
}
extractPoints(e) {
return {
shape: this.getPoints(e),
holes: this.getPointsHoles(e)
}
}
copy(e) {
super.copy(e),
this.holes = [];
for (let t = 0, n = e.holes.length; t < n; t++) {
const n = e.holes[t];
this.holes.push(n.clone())
}
return this
}
toJSON() {
const e = super.toJSON();
e.uuid = this.uuid,
e.holes = [];
for (let t = 0, n = this.holes.length; t < n; t++) {
const n = this.holes[t];
e.holes.push(n.toJSON())
}
return e
}
fromJSON(e) {
super.fromJSON(e),
this.uuid = e.uuid,
this.holes = [];
for (let t = 0, n = e.holes.length; t < n; t++) {
const n = e.holes[t];
this.holes.push((new Bh).fromJSON(n))
}
return this
}
}
const Vh = function(e, t) {
let n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 2;
const r = t && t.length
, i = r ? t[0] * n : e.length;
let s = Wh(e, 0, i, n, !0);
const a = [];
if (!s || s.next === s.prev)
return a;
let o, l, c, u, d, h, p;
if (r && (s = function(e, t, n, r) {
const i = [];
let s, a, o, l, c;
for (s = 0,
a = t.length; s < a; s++)
o = t[s] * r,
l = s < a - 1 ? t[s + 1] * r : e.length,
c = Wh(e, o, l, r, !1),
c === c.next && (c.steiner = !0),
i.push(np(c));
for (i.sort(Zh),
s = 0; s < i.length; s++)
n = $h(i[s], n);
return n
}(e, t, s, n)),
e.length > 80 * n) {
o = c = e[0],
l = u = e[1];
for (let t = n; t < i; t += n)
d = e[t],
h = e[t + 1],
d < o && (o = d),
h < l && (l = h),
d > c && (c = d),
h > u && (u = h);
p = Math.max(c - o, u - l),
p = 0 !== p ? 32767 / p : 0
}
return Xh(s, a, n, o, l, p, 0),
a
};
function Wh(e, t, n, r, i) {
let s, a;
if (i === function(e, t, n, r) {
let i = 0;
for (let s = t, a = n - r; s < n; s += r)
i += (e[a] - e[s]) * (e[s + 1] + e[a + 1]),
a = s;
return i
}(e, t, n, r) > 0)
for (s = t; s < n; s += r)
a = hp(s, e[s], e[s + 1], a);
else
for (s = n - r; s >= t; s -= r)
a = hp(s, e[s], e[s + 1], a);
return a && ap(a, a.next) && (pp(a),
a = a.next),
a
}
function Jh(e, t) {
if (!e)
return e;
t || (t = e);
let n, r = e;
do {
if (n = !1,
r.steiner || !ap(r, r.next) && 0 !== sp(r.prev, r, r.next))
r = r.next;
else {
if (pp(r),
r = t = r.prev,
r === r.next)
break;
n = !0
}
} while (n || r !== t);
return t
}
function Xh(e, t, n, r, i, s, a) {
if (!e)
return;
!a && s && function(e, t, n, r) {
let i = e;
do {
0 === i.z && (i.z = tp(i.x, i.y, t, n, r)),
i.prevZ = i.prev,
i.nextZ = i.next,
i = i.next
} while (i !== e);
i.prevZ.nextZ = null,
i.prevZ = null,
function(e) {
let t, n, r, i, s, a, o, l, c = 1;
do {
for (n = e,
e = null,
s = null,
a = 0; n; ) {
for (a++,
r = n,
o = 0,
t = 0; t < c && (o++,
r = r.nextZ,
r); t++)
;
for (l = c; o > 0 || l > 0 && r; )
0 !== o && (0 === l || !r || n.z <= r.z) ? (i = n,
n = n.nextZ,
o--) : (i = r,
r = r.nextZ,
l--),
s ? s.nextZ = i : e = i,
i.prevZ = s,
s = i;
n = r
}
s.nextZ = null,
c *= 2
} while (a > 1)
}(i)
}(e, r, i, s);
let o, l, c = e;
for (; e.prev !== e.next; )
if (o = e.prev,
l = e.next,
s ? qh(e, r, i, s) : Kh(e))
t.push(o.i / n | 0),
t.push(e.i / n | 0),
t.push(l.i / n | 0),
pp(e),
e = l.next,
c = l.next;
else if ((e = l) === c) {
a ? 1 === a ? Xh(e = Yh(Jh(e), t, n), t, n, r, i, s, 2) : 2 === a && Qh(e, t, n, r, i, s) : Xh(Jh(e), t, n, r, i, s, 1);
break
}
}
function Kh(e) {
const t = e.prev
, n = e
, r = e.next;
if (sp(t, n, r) >= 0)
return !1;
const i = t.x
, s = n.x
, a = r.x
, o = t.y
, l = n.y
, c = r.y
, u = i < s ? i < a ? i : a : s < a ? s : a
, d = o < l ? o < c ? o : c : l < c ? l : c
, h = i > s ? i > a ? i : a : s > a ? s : a
, p = o > l ? o > c ? o : c : l > c ? l : c;
let f = r.next;
for (; f !== t; ) {
if (f.x >= u && f.x <= h && f.y >= d && f.y <= p && rp(i, o, s, l, a, c, f.x, f.y) && sp(f.prev, f, f.next) >= 0)
return !1;
f = f.next
}
return !0
}
function qh(e, t, n, r) {
const i = e.prev
, s = e
, a = e.next;
if (sp(i, s, a) >= 0)
return !1;
const o = i.x
, l = s.x
, c = a.x
, u = i.y
, d = s.y
, h = a.y
, p = o < l ? o < c ? o : c : l < c ? l : c
, f = u < d ? u < h ? u : h : d < h ? d : h
, m = o > l ? o > c ? o : c : l > c ? l : c
, g = u > d ? u > h ? u : h : d > h ? d : h
, v = tp(p, f, t, n, r)
, y = tp(m, g, t, n, r);
let x = e.prevZ
, b = e.nextZ;
for (; x && x.z >= v && b && b.z <= y; ) {
if (x.x >= p && x.x <= m && x.y >= f && x.y <= g && x !== i && x !== a && rp(o, u, l, d, c, h, x.x, x.y) && sp(x.prev, x, x.next) >= 0)
return !1;
if (x = x.prevZ,
b.x >= p && b.x <= m && b.y >= f && b.y <= g && b !== i && b !== a && rp(o, u, l, d, c, h, b.x, b.y) && sp(b.prev, b, b.next) >= 0)
return !1;
b = b.nextZ
}
for (; x && x.z >= v; ) {
if (x.x >= p && x.x <= m && x.y >= f && x.y <= g && x !== i && x !== a && rp(o, u, l, d, c, h, x.x, x.y) && sp(x.prev, x, x.next) >= 0)
return !1;
x = x.prevZ
}
for (; b && b.z <= y; ) {
if (b.x >= p && b.x <= m && b.y >= f && b.y <= g && b !== i && b !== a && rp(o, u, l, d, c, h, b.x, b.y) && sp(b.prev, b, b.next) >= 0)
return !1;
b = b.nextZ
}
return !0
}
function Yh(e, t, n) {
let r = e;
do {
const i = r.prev
, s = r.next.next;
!ap(i, s) && op(i, r, r.next, s) && up(i, s) && up(s, i) && (t.push(i.i / n | 0),
t.push(r.i / n | 0),
t.push(s.i / n | 0),
pp(r),
pp(r.next),
r = e = s),
r = r.next
} while (r !== e);
return Jh(r)
}
function Qh(e, t, n, r, i, s) {
let a = e;
do {
let e = a.next.next;
for (; e !== a.prev; ) {
if (a.i !== e.i && ip(a, e)) {
let o = dp(a, e);
return a = Jh(a, a.next),
o = Jh(o, o.next),
Xh(a, t, n, r, i, s, 0),
void Xh(o, t, n, r, i, s, 0)
}
e = e.next
}
a = a.next
} while (a !== e)
}
function Zh(e, t) {
return e.x - t.x
}
function $h(e, t) {
const n = function(e, t) {
let n, r = t, i = -1 / 0;
const s = e.x
, a = e.y;
do {
if (a <= r.y && a >= r.next.y && r.next.y !== r.y) {
const e = r.x + (a - r.y) * (r.next.x - r.x) / (r.next.y - r.y);
if (e <= s && e > i && (i = e,
n = r.x < r.next.x ? r : r.next,
e === s))
return n
}
r = r.next
} while (r !== t);
if (!n)
return null;
const o = n
, l = n.x
, c = n.y;
let u, d = 1 / 0;
r = n;
do {
s >= r.x && r.x >= l && s !== r.x && rp(a < c ? s : i, a, l, c, a < c ? i : s, a, r.x, r.y) && (u = Math.abs(a - r.y) / (s - r.x),
up(r, e) && (u < d || u === d && (r.x > n.x || r.x === n.x && ep(n, r))) && (n = r,
d = u)),
r = r.next
} while (r !== o);
return n
}(e, t);
if (!n)
return t;
const r = dp(n, e);
return Jh(r, r.next),
Jh(n, n.next)
}
function ep(e, t) {
return sp(e.prev, e, t.prev) < 0 && sp(t.next, e, e.next) < 0
}
function tp(e, t, n, r, i) {
return (e = 1431655765 & ((e = 858993459 & ((e = 252645135 & ((e = 16711935 & ((e = (e - n) * i | 0) | e << 8)) | e << 4)) | e << 2)) | e << 1)) | (t = 1431655765 & ((t = 858993459 & ((t = 252645135 & ((t = 16711935 & ((t = (t - r) * i | 0) | t << 8)) | t << 4)) | t << 2)) | t << 1)) << 1
}
function np(e) {
let t = e
, n = e;
do {
(t.x < n.x || t.x === n.x && t.y < n.y) && (n = t),
t = t.next
} while (t !== e);
return n
}
function rp(e, t, n, r, i, s, a, o) {
return (i - a) * (t - o) >= (e - a) * (s - o) && (e - a) * (r - o) >= (n - a) * (t - o) && (n - a) * (s - o) >= (i - a) * (r - o)
}
function ip(e, t) {
return e.next.i !== t.i && e.prev.i !== t.i && !function(e, t) {
let n = e;
do {
if (n.i !== e.i && n.next.i !== e.i && n.i !== t.i && n.next.i !== t.i && op(n, n.next, e, t))
return !0;
n = n.next
} while (n !== e);
return !1
}(e, t) && (up(e, t) && up(t, e) && function(e, t) {
let n = e
, r = !1;
const i = (e.x + t.x) / 2
, s = (e.y + t.y) / 2;
do {
n.y > s !== n.next.y > s && n.next.y !== n.y && i < (n.next.x - n.x) * (s - n.y) / (n.next.y - n.y) + n.x && (r = !r),
n = n.next
} while (n !== e);
return r
}(e, t) && (sp(e.prev, e, t.prev) || sp(e, t.prev, t)) || ap(e, t) && sp(e.prev, e, e.next) > 0 && sp(t.prev, t, t.next) > 0)
}
function sp(e, t, n) {
return (t.y - e.y) * (n.x - t.x) - (t.x - e.x) * (n.y - t.y)
}
function ap(e, t) {
return e.x === t.x && e.y === t.y
}
function op(e, t, n, r) {
const i = cp(sp(e, t, n))
, s = cp(sp(e, t, r))
, a = cp(sp(n, r, e))
, o = cp(sp(n, r, t));
return i !== s && a !== o || (!(0 !== i || !lp(e, n, t)) || (!(0 !== s || !lp(e, r, t)) || (!(0 !== a || !lp(n, e, r)) || !(0 !== o || !lp(n, t, r)))))
}
function lp(e, t, n) {
return t.x <= Math.max(e.x, n.x) && t.x >= Math.min(e.x, n.x) && t.y <= Math.max(e.y, n.y) && t.y >= Math.min(e.y, n.y)
}
function cp(e) {
return e > 0 ? 1 : e < 0 ? -1 : 0
}
function up(e, t) {
return sp(e.prev, e, e.next) < 0 ? sp(e, t, e.next) >= 0 && sp(e, e.prev, t) >= 0 : sp(e, t, e.prev) < 0 || sp(e, e.next, t) < 0
}
function dp(e, t) {
const n = new fp(e.i,e.x,e.y)
, r = new fp(t.i,t.x,t.y)
, i = e.next
, s = t.prev;
return e.next = t,
t.prev = e,
n.next = i,
i.prev = n,
r.next = n,
n.prev = r,
s.next = r,
r.prev = s,
r
}
function hp(e, t, n, r) {
const i = new fp(e,t,n);
return r ? (i.next = r.next,
i.prev = r,
r.next.prev = i,
r.next = i) : (i.prev = i,
i.next = i),
i
}
function pp(e) {
e.next.prev = e.prev,
e.prev.next = e.next,
e.prevZ && (e.prevZ.nextZ = e.nextZ),
e.nextZ && (e.nextZ.prevZ = e.prevZ)
}
function fp(e, t, n) {
this.i = e,
this.x = t,
this.y = n,
this.prev = null,
this.next = null,
this.z = 0,
this.prevZ = null,
this.nextZ = null,
this.steiner = !1
}
class mp {
static area(e) {
const t = e.length;
let n = 0;
for (let r = t - 1, i = 0; i < t; r = i++)
n += e[r].x * e[i].y - e[i].x * e[r].y;
return .5 * n
}
static isClockWise(e) {
return mp.area(e) < 0
}
static triangulateShape(e, t) {
const n = []
, r = []
, i = [];
gp(e),
vp(n, e);
let s = e.length;
t.forEach(gp);
for (let o = 0; o < t.length; o++)
r.push(s),
s += t[o].length,
vp(n, t[o]);
const a = Vh(n, r);
for (let o = 0; o < a.length; o += 3)
i.push(a.slice(o, o + 3));
return i
}
}
function gp(e) {
const t = e.length;
t > 2 && e[t - 1].equals(e[0]) && e.pop()
}
function vp(e, t) {
for (let n = 0; n < t.length; n++)
e.push(t[n].x),
e.push(t[n].y)
}
class yp extends Wa {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : new Hh([new xi(.5,.5), new xi(-.5,.5), new xi(-.5,-.5), new xi(.5,-.5)])
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
super(),
this.type = "ExtrudeGeometry",
this.parameters = {
shapes: e,
options: t
},
e = Array.isArray(e) ? e : [e];
const n = this
, r = []
, i = [];
for (let a = 0, o = e.length; a < o; a++) {
s(e[a])
}
function s(e) {
const s = []
, a = void 0 !== t.curveSegments ? t.curveSegments : 12
, o = void 0 !== t.steps ? t.steps : 1
, l = void 0 !== t.depth ? t.depth : 1;
let c = void 0 === t.bevelEnabled || t.bevelEnabled
, u = void 0 !== t.bevelThickness ? t.bevelThickness : .2
, d = void 0 !== t.bevelSize ? t.bevelSize : u - .1
, h = void 0 !== t.bevelOffset ? t.bevelOffset : 0
, p = void 0 !== t.bevelSegments ? t.bevelSegments : 3;
const f = t.extrudePath
, m = void 0 !== t.UVGenerator ? t.UVGenerator : xp;
let g, v, y, x, b, _ = !1;
f && (g = f.getSpacedPoints(o),
_ = !0,
c = !1,
v = f.computeFrenetFrames(o, !1),
y = new Qi,
x = new Qi,
b = new Qi),
c || (p = 0,
u = 0,
d = 0,
h = 0);
const w = e.extractPoints(a);
let S = w.shape;
const A = w.holes;
if (!mp.isClockWise(S)) {
S = S.reverse();
for (let e = 0, t = A.length; e < t; e++) {
const t = A[e];
mp.isClockWise(t) && (A[e] = t.reverse())
}
}
const M = mp.triangulateShape(S, A)
, C = S;
for (let t = 0, n = A.length; t < n; t++) {
const e = A[t];
S = S.concat(e)
}
function E(e, t, n) {
return t || console.error("THREE.ExtrudeGeometry: vec does not exist"),
e.clone().addScaledVector(t, n)
}
const T = S.length
, R = M.length;
function B(e, t, n) {
let r, i, s;
const a = e.x - t.x
, o = e.y - t.y
, l = n.x - e.x
, c = n.y - e.y
, u = a * a + o * o
, d = a * c - o * l;
if (Math.abs(d) > Number.EPSILON) {
const d = Math.sqrt(u)
, h = Math.sqrt(l * l + c * c)
, p = t.x - o / d
, f = t.y + a / d
, m = ((n.x - c / h - p) * c - (n.y + l / h - f) * l) / (a * c - o * l);
r = p + a * m - e.x,
i = f + o * m - e.y;
const g = r * r + i * i;
if (g <= 2)
return new xi(r,i);
s = Math.sqrt(g / 2)
} else {
let e = !1;
a > Number.EPSILON ? l > Number.EPSILON && (e = !0) : a < -Number.EPSILON ? l < -Number.EPSILON && (e = !0) : Math.sign(o) === Math.sign(c) && (e = !0),
e ? (r = -o,
i = a,
s = Math.sqrt(u)) : (r = a,
i = o,
s = Math.sqrt(u / 2))
}
return new xi(r / s,i / s)
}
const P = [];
for (let t = 0, n = C.length, r = n - 1, i = t + 1; t < n; t++,
r++,
i++)
r === n && (r = 0),
i === n && (i = 0),
P[t] = B(C[t], C[r], C[i]);
const k = [];
let L, I = P.concat();
for (let t = 0, n = A.length; t < n; t++) {
const e = A[t];
L = [];
for (let t = 0, n = e.length, r = n - 1, i = t + 1; t < n; t++,
r++,
i++)
r === n && (r = 0),
i === n && (i = 0),
L[t] = B(e[t], e[r], e[i]);
k.push(L),
I = I.concat(L)
}
for (let t = 0; t < p; t++) {
const e = t / p
, n = u * Math.cos(e * Math.PI / 2)
, r = d * Math.sin(e * Math.PI / 2) + h;
for (let t = 0, i = C.length; t < i; t++) {
const e = E(C[t], P[t], r);
j(e.x, e.y, -n)
}
for (let t = 0, i = A.length; t < i; t++) {
const e = A[t];
L = k[t];
for (let t = 0, i = e.length; t < i; t++) {
const i = E(e[t], L[t], r);
j(i.x, i.y, -n)
}
}
}
const N = d + h;
for (let t = 0; t < T; t++) {
const e = c ? E(S[t], I[t], N) : S[t];
_ ? (x.copy(v.normals[0]).multiplyScalar(e.x),
y.copy(v.binormals[0]).multiplyScalar(e.y),
b.copy(g[0]).add(x).add(y),
j(b.x, b.y, b.z)) : j(e.x, e.y, 0)
}
for (let t = 1; t <= o; t++)
for (let e = 0; e < T; e++) {
const n = c ? E(S[e], I[e], N) : S[e];
_ ? (x.copy(v.normals[t]).multiplyScalar(n.x),
y.copy(v.binormals[t]).multiplyScalar(n.y),
b.copy(g[t]).add(x).add(y),
j(b.x, b.y, b.z)) : j(n.x, n.y, l / o * t)
}
for (let t = p - 1; t >= 0; t--) {
const e = t / p
, n = u * Math.cos(e * Math.PI / 2)
, r = d * Math.sin(e * Math.PI / 2) + h;
for (let t = 0, i = C.length; t < i; t++) {
const e = E(C[t], P[t], r);
j(e.x, e.y, l + n)
}
for (let t = 0, i = A.length; t < i; t++) {
const e = A[t];
L = k[t];
for (let t = 0, i = e.length; t < i; t++) {
const i = E(e[t], L[t], r);
_ ? j(i.x, i.y + g[o - 1].y, g[o - 1].x + n) : j(i.x, i.y, l + n)
}
}
}
function D(e, t) {
let n = e.length;
for (; --n >= 0; ) {
const r = n;
let i = n - 1;
i < 0 && (i = e.length - 1);
for (let e = 0, n = o + 2 * p; e < n; e++) {
const n = T * e
, s = T * (e + 1);
O(t + r + n, t + i + n, t + i + s, t + r + s)
}
}
}
function j(e, t, n) {
s.push(e),
s.push(t),
s.push(n)
}
function F(e, t, i) {
U(e),
U(t),
U(i);
const s = r.length / 3
, a = m.generateTopUV(n, r, s - 3, s - 2, s - 1);
z(a[0]),
z(a[1]),
z(a[2])
}
function O(e, t, i, s) {
U(e),
U(t),
U(s),
U(t),
U(i),
U(s);
const a = r.length / 3
, o = m.generateSideWallUV(n, r, a - 6, a - 3, a - 2, a - 1);
z(o[0]),
z(o[1]),
z(o[3]),
z(o[1]),
z(o[2]),
z(o[3])
}
function U(e) {
r.push(s[3 * e + 0]),
r.push(s[3 * e + 1]),
r.push(s[3 * e + 2])
}
function z(e) {
i.push(e.x),
i.push(e.y)
}
!function() {
const e = r.length / 3;
if (c) {
let e = 0
, t = T * e;
for (let n = 0; n < R; n++) {
const e = M[n];
F(e[2] + t, e[1] + t, e[0] + t)
}
e = o + 2 * p,
t = T * e;
for (let n = 0; n < R; n++) {
const e = M[n];
F(e[0] + t, e[1] + t, e[2] + t)
}
} else {
for (let e = 0; e < R; e++) {
const t = M[e];
F(t[2], t[1], t[0])
}
for (let e = 0; e < R; e++) {
const t = M[e];
F(t[0] + T * o, t[1] + T * o, t[2] + T * o)
}
}
n.addGroup(e, r.length / 3 - e, 0)
}(),
function() {
const e = r.length / 3;
let t = 0;
D(C, t),
t += C.length;
for (let n = 0, r = A.length; n < r; n++) {
const e = A[n];
D(e, t),
t += e.length
}
n.addGroup(e, r.length / 3 - e, 1)
}()
}
this.setAttribute("position", new ja(r,3)),
this.setAttribute("uv", new ja(i,2)),
this.computeVertexNormals()
}
copy(e) {
return super.copy(e),
this.parameters = Object.assign({}, e.parameters),
this
}
toJSON() {
const e = super.toJSON();
return function(e, t, n) {
if (n.shapes = [],
Array.isArray(e))
for (let r = 0, i = e.length; r < i; r++) {
const t = e[r];
n.shapes.push(t.uuid)
}
else
n.shapes.push(e.uuid);
n.options = Object.assign({}, t),
void 0 !== t.extrudePath && (n.options.extrudePath = t.extrudePath.toJSON());
return n
}(this.parameters.shapes, this.parameters.options, e)
}
static fromJSON(e, t) {
const n = [];
for (let i = 0, s = e.shapes.length; i < s; i++) {
const r = t[e.shapes[i]];
n.push(r)
}
const r = e.options.extrudePath;
return void 0 !== r && (e.options.extrudePath = (new Th[r.type]).fromJSON(r)),
new yp(n,e.options)
}
}
const xp = {
generateTopUV: function(e, t, n, r, i) {
const s = t[3 * n]
, a = t[3 * n + 1]
, o = t[3 * r]
, l = t[3 * r + 1]
, c = t[3 * i]
, u = t[3 * i + 1];
return [new xi(s,a), new xi(o,l), new xi(c,u)]
},
generateSideWallUV: function(e, t, n, r, i, s) {
const a = t[3 * n]
, o = t[3 * n + 1]
, l = t[3 * n + 2]
, c = t[3 * r]
, u = t[3 * r + 1]
, d = t[3 * r + 2]
, h = t[3 * i]
, p = t[3 * i + 1]
, f = t[3 * i + 2]
, m = t[3 * s]
, g = t[3 * s + 1]
, v = t[3 * s + 2];
return Math.abs(o - u) < Math.abs(a - c) ? [new xi(a,1 - l), new xi(c,1 - d), new xi(h,1 - f), new xi(m,1 - v)] : [new xi(o,1 - l), new xi(u,1 - d), new xi(p,1 - f), new xi(g,1 - v)]
}
};
class bp extends Dh {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 1
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;
const n = (1 + Math.sqrt(5)) / 2;
super([-1, n, 0, 1, n, 0, -1, -n, 0, 1, -n, 0, 0, -1, n, 0, 1, n, 0, -1, -n, 0, 1, -n, n, 0, -1, n, 0, 1, -n, 0, -1, -n, 0, 1], [0, 11, 5, 0, 5, 1, 0, 1, 7, 0, 7, 10, 0, 10, 11, 1, 5, 9, 5, 11, 4, 11, 10, 2, 10, 7, 6, 7, 1, 8, 3, 9, 4, 3, 4, 2, 3, 2, 6, 3, 6, 8, 3, 8, 9, 4, 9, 5, 2, 4, 11, 6, 2, 10, 8, 6, 7, 9, 8, 1], e, t),
this.type = "IcosahedronGeometry",
this.parameters = {
radius: e,
detail: t
}
}
static fromJSON(e) {
return new bp(e.radius,e.detail)
}
}
class _p extends Dh {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 1
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;
super([1, 0, 0, -1, 0, 0, 0, 1, 0, 0, -1, 0, 0, 0, 1, 0, 0, -1], [0, 2, 4, 0, 4, 3, 0, 3, 5, 0, 5, 2, 1, 2, 5, 1, 5, 3, 1, 3, 4, 1, 4, 2], e, t),
this.type = "OctahedronGeometry",
this.parameters = {
radius: e,
detail: t
}
}
static fromJSON(e) {
return new _p(e.radius,e.detail)
}
}
class wp extends Wa {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : .5
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 1
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 32
, r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : 1
, i = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : 0
, s = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : 2 * Math.PI;
super(),
this.type = "RingGeometry",
this.parameters = {
innerRadius: e,
outerRadius: t,
thetaSegments: n,
phiSegments: r,
thetaStart: i,
thetaLength: s
},
n = Math.max(3, n),
r = Math.max(1, r);
const a = []
, o = []
, l = []
, c = [];
let u = e;
const d = (t - e) / r
, h = new Qi
, p = new xi;
for (let f = 0; f <= r; f++) {
for (let e = 0; e <= n; e++) {
const r = i + e / n * s;
h.x = u * Math.cos(r),
h.y = u * Math.sin(r),
o.push(h.x, h.y, h.z),
l.push(0, 0, 1),
p.x = (h.x / t + 1) / 2,
p.y = (h.y / t + 1) / 2,
c.push(p.x, p.y)
}
u += d
}
for (let f = 0; f < r; f++) {
const e = f * (n + 1);
for (let t = 0; t < n; t++) {
const r = t + e
, i = r
, s = r + n + 1
, o = r + n + 2
, l = r + 1;
a.push(i, s, l),
a.push(s, o, l)
}
}
this.setIndex(a),
this.setAttribute("position", new ja(o,3)),
this.setAttribute("normal", new ja(l,3)),
this.setAttribute("uv", new ja(c,2))
}
copy(e) {
return super.copy(e),
this.parameters = Object.assign({}, e.parameters),
this
}
static fromJSON(e) {
return new wp(e.innerRadius,e.outerRadius,e.thetaSegments,e.phiSegments,e.thetaStart,e.thetaLength)
}
}
class Sp extends Wa {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : new Hh([new xi(0,.5), new xi(-.5,-.5), new xi(.5,-.5)])
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 12;
super(),
this.type = "ShapeGeometry",
this.parameters = {
shapes: e,
curveSegments: t
};
const n = []
, r = []
, i = []
, s = [];
let a = 0
, o = 0;
if (!1 === Array.isArray(e))
l(e);
else
for (let c = 0; c < e.length; c++)
l(e[c]),
this.addGroup(a, o, c),
a += o,
o = 0;
function l(e) {
const a = r.length / 3
, l = e.extractPoints(t);
let c = l.shape;
const u = l.holes;
!1 === mp.isClockWise(c) && (c = c.reverse());
for (let t = 0, n = u.length; t < n; t++) {
const e = u[t];
!0 === mp.isClockWise(e) && (u[t] = e.reverse())
}
const d = mp.triangulateShape(c, u);
for (let t = 0, n = u.length; t < n; t++) {
const e = u[t];
c = c.concat(e)
}
for (let t = 0, n = c.length; t < n; t++) {
const e = c[t];
r.push(e.x, e.y, 0),
i.push(0, 0, 1),
s.push(e.x, e.y)
}
for (let t = 0, r = d.length; t < r; t++) {
const e = d[t]
, r = e[0] + a
, i = e[1] + a
, s = e[2] + a;
n.push(r, i, s),
o += 3
}
}
this.setIndex(n),
this.setAttribute("position", new ja(r,3)),
this.setAttribute("normal", new ja(i,3)),
this.setAttribute("uv", new ja(s,2))
}
copy(e) {
return super.copy(e),
this.parameters = Object.assign({}, e.parameters),
this
}
toJSON() {
const e = super.toJSON();
return function(e, t) {
if (t.shapes = [],
Array.isArray(e))
for (let n = 0, r = e.length; n < r; n++) {
const r = e[n];
t.shapes.push(r.uuid)
}
else
t.shapes.push(e.uuid);
return t
}(this.parameters.shapes, e)
}
static fromJSON(e, t) {
const n = [];
for (let r = 0, i = e.shapes.length; r < i; r++) {
const i = t[e.shapes[r]];
n.push(i)
}
return new Sp(n,e.curveSegments)
}
}
class Ap extends Wa {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 1
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 32
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 16
, r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : 0
, i = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : 2 * Math.PI
, s = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : 0
, a = arguments.length > 6 && void 0 !== arguments[6] ? arguments[6] : Math.PI;
super(),
this.type = "SphereGeometry",
this.parameters = {
radius: e,
widthSegments: t,
heightSegments: n,
phiStart: r,
phiLength: i,
thetaStart: s,
thetaLength: a
},
t = Math.max(3, Math.floor(t)),
n = Math.max(2, Math.floor(n));
const o = Math.min(s + a, Math.PI);
let l = 0;
const c = []
, u = new Qi
, d = new Qi
, h = []
, p = []
, f = []
, m = [];
for (let g = 0; g <= n; g++) {
const h = []
, v = g / n;
let y = 0;
0 === g && 0 === s ? y = .5 / t : g === n && o === Math.PI && (y = -.5 / t);
for (let n = 0; n <= t; n++) {
const o = n / t;
u.x = -e * Math.cos(r + o * i) * Math.sin(s + v * a),
u.y = e * Math.cos(s + v * a),
u.z = e * Math.sin(r + o * i) * Math.sin(s + v * a),
p.push(u.x, u.y, u.z),
d.copy(u).normalize(),
f.push(d.x, d.y, d.z),
m.push(o + y, 1 - v),
h.push(l++)
}
c.push(h)
}
for (let g = 0; g < n; g++)
for (let e = 0; e < t; e++) {
const t = c[g][e + 1]
, r = c[g][e]
, i = c[g + 1][e]
, a = c[g + 1][e + 1];
(0 !== g || s > 0) && h.push(t, r, a),
(g !== n - 1 || o < Math.PI) && h.push(r, i, a)
}
this.setIndex(h),
this.setAttribute("position", new ja(p,3)),
this.setAttribute("normal", new ja(f,3)),
this.setAttribute("uv", new ja(m,2))
}
copy(e) {
return super.copy(e),
this.parameters = Object.assign({}, e.parameters),
this
}
static fromJSON(e) {
return new Ap(e.radius,e.widthSegments,e.heightSegments,e.phiStart,e.phiLength,e.thetaStart,e.thetaLength)
}
}
class Mp extends Dh {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 1
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;
super([1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1], [2, 1, 0, 0, 3, 2, 1, 3, 0, 2, 3, 1], e, t),
this.type = "TetrahedronGeometry",
this.parameters = {
radius: e,
detail: t
}
}
static fromJSON(e) {
return new Mp(e.radius,e.detail)
}
}
class Cp extends Wa {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 1
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : .4
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 12
, r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : 48
, i = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : 2 * Math.PI;
super(),
this.type = "TorusGeometry",
this.parameters = {
radius: e,
tube: t,
radialSegments: n,
tubularSegments: r,
arc: i
},
n = Math.floor(n),
r = Math.floor(r);
const s = []
, a = []
, o = []
, l = []
, c = new Qi
, u = new Qi
, d = new Qi;
for (let h = 0; h <= n; h++)
for (let s = 0; s <= r; s++) {
const p = s / r * i
, f = h / n * Math.PI * 2;
u.x = (e + t * Math.cos(f)) * Math.cos(p),
u.y = (e + t * Math.cos(f)) * Math.sin(p),
u.z = t * Math.sin(f),
a.push(u.x, u.y, u.z),
c.x = e * Math.cos(p),
c.y = e * Math.sin(p),
d.subVectors(u, c).normalize(),
o.push(d.x, d.y, d.z),
l.push(s / r),
l.push(h / n)
}
for (let h = 1; h <= n; h++)
for (let e = 1; e <= r; e++) {
const t = (r + 1) * h + e - 1
, n = (r + 1) * (h - 1) + e - 1
, i = (r + 1) * (h - 1) + e
, a = (r + 1) * h + e;
s.push(t, n, a),
s.push(n, i, a)
}
this.setIndex(s),
this.setAttribute("position", new ja(a,3)),
this.setAttribute("normal", new ja(o,3)),
this.setAttribute("uv", new ja(l,2))
}
copy(e) {
return super.copy(e),
this.parameters = Object.assign({}, e.parameters),
this
}
static fromJSON(e) {
return new Cp(e.radius,e.tube,e.radialSegments,e.tubularSegments,e.arc)
}
}
class Ep extends Wa {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 1
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : .4
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 64
, r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : 8
, i = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : 2
, s = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : 3;
super(),
this.type = "TorusKnotGeometry",
this.parameters = {
radius: e,
tube: t,
tubularSegments: n,
radialSegments: r,
p: i,
q: s
},
n = Math.floor(n),
r = Math.floor(r);
const a = []
, o = []
, l = []
, c = []
, u = new Qi
, d = new Qi
, h = new Qi
, p = new Qi
, f = new Qi
, m = new Qi
, g = new Qi;
for (let y = 0; y <= n; ++y) {
const a = y / n * i * Math.PI * 2;
v(a, i, s, e, h),
v(a + .01, i, s, e, p),
m.subVectors(p, h),
g.addVectors(p, h),
f.crossVectors(m, g),
g.crossVectors(f, m),
f.normalize(),
g.normalize();
for (let e = 0; e <= r; ++e) {
const i = e / r * Math.PI * 2
, s = -t * Math.cos(i)
, a = t * Math.sin(i);
u.x = h.x + (s * g.x + a * f.x),
u.y = h.y + (s * g.y + a * f.y),
u.z = h.z + (s * g.z + a * f.z),
o.push(u.x, u.y, u.z),
d.subVectors(u, h).normalize(),
l.push(d.x, d.y, d.z),
c.push(y / n),
c.push(e / r)
}
}
for (let y = 1; y <= n; y++)
for (let e = 1; e <= r; e++) {
const t = (r + 1) * (y - 1) + (e - 1)
, n = (r + 1) * y + (e - 1)
, i = (r + 1) * y + e
, s = (r + 1) * (y - 1) + e;
a.push(t, n, s),
a.push(n, i, s)
}
function v(e, t, n, r, i) {
const s = Math.cos(e)
, a = Math.sin(e)
, o = n / t * e
, l = Math.cos(o);
i.x = r * (2 + l) * .5 * s,
i.y = r * (2 + l) * a * .5,
i.z = r * Math.sin(o) * .5
}
this.setIndex(a),
this.setAttribute("position", new ja(o,3)),
this.setAttribute("normal", new ja(l,3)),
this.setAttribute("uv", new ja(c,2))
}
copy(e) {
return super.copy(e),
this.parameters = Object.assign({}, e.parameters),
this
}
static fromJSON(e) {
return new Ep(e.radius,e.tube,e.tubularSegments,e.radialSegments,e.p,e.q)
}
}
class Tp extends Wa {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : new Ch(new Qi(-1,-1,0),new Qi(-1,1,0),new Qi(1,1,0))
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 64
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 1
, r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : 8
, i = arguments.length > 4 && void 0 !== arguments[4] && arguments[4];
super(),
this.type = "TubeGeometry",
this.parameters = {
path: e,
tubularSegments: t,
radius: n,
radialSegments: r,
closed: i
};
const s = e.computeFrenetFrames(t, i);
this.tangents = s.tangents,
this.normals = s.normals,
this.binormals = s.binormals;
const a = new Qi
, o = new Qi
, l = new xi;
let c = new Qi;
const u = []
, d = []
, h = []
, p = [];
function f(i) {
c = e.getPointAt(i / t, c);
const l = s.normals[i]
, h = s.binormals[i];
for (let e = 0; e <= r; e++) {
const t = e / r * Math.PI * 2
, i = Math.sin(t)
, s = -Math.cos(t);
o.x = s * l.x + i * h.x,
o.y = s * l.y + i * h.y,
o.z = s * l.z + i * h.z,
o.normalize(),
d.push(o.x, o.y, o.z),
a.x = c.x + n * o.x,
a.y = c.y + n * o.y,
a.z = c.z + n * o.z,
u.push(a.x, a.y, a.z)
}
}
!function() {
for (let e = 0; e < t; e++)
f(e);
f(!1 === i ? t : 0),
function() {
for (let e = 0; e <= t; e++)
for (let n = 0; n <= r; n++)
l.x = e / t,
l.y = n / r,
h.push(l.x, l.y)
}(),
function() {
for (let e = 1; e <= t; e++)
for (let t = 1; t <= r; t++) {
const n = (r + 1) * (e - 1) + (t - 1)
, i = (r + 1) * e + (t - 1)
, s = (r + 1) * e + t
, a = (r + 1) * (e - 1) + t;
p.push(n, i, a),
p.push(i, s, a)
}
}()
}(),
this.setIndex(p),
this.setAttribute("position", new ja(u,3)),
this.setAttribute("normal", new ja(d,3)),
this.setAttribute("uv", new ja(h,2))
}
copy(e) {
return super.copy(e),
this.parameters = Object.assign({}, e.parameters),
this
}
toJSON() {
const e = super.toJSON();
return e.path = this.parameters.path.toJSON(),
e
}
static fromJSON(e) {
return new Tp((new Th[e.path.type]).fromJSON(e.path),e.tubularSegments,e.radius,e.radialSegments,e.closed)
}
}
class Rp extends Wa {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : null;
if (super(),
this.type = "WireframeGeometry",
this.parameters = {
geometry: e
},
null !== e) {
const t = []
, n = new Set
, r = new Qi
, i = new Qi;
if (null !== e.index) {
const s = e.attributes.position
, a = e.index;
let o = e.groups;
0 === o.length && (o = [{
start: 0,
count: a.count,
materialIndex: 0
}]);
for (let e = 0, l = o.length; e < l; ++e) {
const l = o[e]
, c = l.start;
for (let e = c, o = c + l.count; e < o; e += 3)
for (let l = 0; l < 3; l++) {
const o = a.getX(e + l)
, c = a.getX(e + (l + 1) % 3);
r.fromBufferAttribute(s, o),
i.fromBufferAttribute(s, c),
!0 === Bp(r, i, n) && (t.push(r.x, r.y, r.z),
t.push(i.x, i.y, i.z))
}
}
} else {
const s = e.attributes.position;
for (let e = 0, a = s.count / 3; e < a; e++)
for (let o = 0; o < 3; o++) {
const a = 3 * e + o
, l = 3 * e + (o + 1) % 3;
r.fromBufferAttribute(s, a),
i.fromBufferAttribute(s, l),
!0 === Bp(r, i, n) && (t.push(r.x, r.y, r.z),
t.push(i.x, i.y, i.z))
}
}
this.setAttribute("position", new ja(t,3))
}
}
copy(e) {
return super.copy(e),
this.parameters = Object.assign({}, e.parameters),
this
}
}
function Bp(e, t, n) {
const r = "".concat(e.x, ",").concat(e.y, ",").concat(e.z, "-").concat(t.x, ",").concat(t.y, ",").concat(t.z)
, i = "".concat(t.x, ",").concat(t.y, ",").concat(t.z, "-").concat(e.x, ",").concat(e.y, ",").concat(e.z);
return !0 !== n.has(r) && !0 !== n.has(i) && (n.add(r),
n.add(i),
!0)
}
var Pp = Object.freeze({
__proto__: null,
BoxGeometry: ho,
CapsuleGeometry: kh,
CircleGeometry: Lh,
ConeGeometry: Nh,
CylinderGeometry: Ih,
DodecahedronGeometry: jh,
EdgesGeometry: Gh,
ExtrudeGeometry: yp,
IcosahedronGeometry: bp,
LatheGeometry: Ph,
OctahedronGeometry: _p,
PlaneGeometry: Do,
PolyhedronGeometry: Dh,
RingGeometry: wp,
ShapeGeometry: Sp,
SphereGeometry: Ap,
TetrahedronGeometry: Mp,
TorusGeometry: Cp,
TorusKnotGeometry: Ep,
TubeGeometry: Tp,
WireframeGeometry: Rp
});
class kp extends xa {
constructor(e) {
super(),
this.isShadowMaterial = !0,
this.type = "ShadowMaterial",
this.color = new ga(0),
this.transparent = !0,
this.fog = !0,
this.setValues(e)
}
copy(e) {
return super.copy(e),
this.color.copy(e.color),
this.fog = e.fog,
this
}
}
class Lp extends vo {
constructor(e) {
super(e),
this.isRawShaderMaterial = !0,
this.type = "RawShaderMaterial"
}
}
class Ip extends xa {
constructor(e) {
super(),
this.isMeshStandardMaterial = !0,
this.defines = {
STANDARD: ""
},
this.type = "MeshStandardMaterial",
this.color = new ga(16777215),
this.roughness = 1,
this.metalness = 0,
this.map = null,
this.lightMap = null,
this.lightMapIntensity = 1,
this.aoMap = null,
this.aoMapIntensity = 1,
this.emissive = new ga(0),
this.emissiveIntensity = 1,
this.emissiveMap = null,
this.bumpMap = null,
this.bumpScale = 1,
this.normalMap = null,
this.normalMapType = pr,
this.normalScale = new xi(1,1),
this.displacementMap = null,
this.displacementScale = 1,
this.displacementBias = 0,
this.roughnessMap = null,
this.metalnessMap = null,
this.alphaMap = null,
this.envMap = null,
this.envMapRotation = new js,
this.envMapIntensity = 1,
this.wireframe = !1,
this.wireframeLinewidth = 1,
this.wireframeLinecap = "round",
this.wireframeLinejoin = "round",
this.flatShading = !1,
this.fog = !0,
this.setValues(e)
}
copy(e) {
return super.copy(e),
this.defines = {
STANDARD: ""
},
this.color.copy(e.color),
this.roughness = e.roughness,
this.metalness = e.metalness,
this.map = e.map,
this.lightMap = e.lightMap,
this.lightMapIntensity = e.lightMapIntensity,
this.aoMap = e.aoMap,
this.aoMapIntensity = e.aoMapIntensity,
this.emissive.copy(e.emissive),
this.emissiveMap = e.emissiveMap,
this.emissiveIntensity = e.emissiveIntensity,
this.bumpMap = e.bumpMap,
this.bumpScale = e.bumpScale,
this.normalMap = e.normalMap,
this.normalMapType = e.normalMapType,
this.normalScale.copy(e.normalScale),
this.displacementMap = e.displacementMap,
this.displacementScale = e.displacementScale,
this.displacementBias = e.displacementBias,
this.roughnessMap = e.roughnessMap,
this.metalnessMap = e.metalnessMap,
this.alphaMap = e.alphaMap,
this.envMap = e.envMap,
this.envMapRotation.copy(e.envMapRotation),
this.envMapIntensity = e.envMapIntensity,
this.wireframe = e.wireframe,
this.wireframeLinewidth = e.wireframeLinewidth,
this.wireframeLinecap = e.wireframeLinecap,
this.wireframeLinejoin = e.wireframeLinejoin,
this.flatShading = e.flatShading,
this.fog = e.fog,
this
}
}
class Np extends Ip {
constructor(e) {
super(),
this.isMeshPhysicalMaterial = !0,
this.defines = {
STANDARD: "",
PHYSICAL: ""
},
this.type = "MeshPhysicalMaterial",
this.anisotropyRotation = 0,
this.anisotropyMap = null,
this.clearcoatMap = null,
this.clearcoatRoughness = 0,
this.clearcoatRoughnessMap = null,
this.clearcoatNormalScale = new xi(1,1),
this.clearcoatNormalMap = null,
this.ior = 1.5,
Object.defineProperty(this, "reflectivity", {
get: function() {
return pi(2.5 * (this.ior - 1) / (this.ior + 1), 0, 1)
},
set: function(e) {
this.ior = (1 + .4 * e) / (1 - .4 * e)
}
}),
this.iridescenceMap = null,
this.iridescenceIOR = 1.3,
this.iridescenceThicknessRange = [100, 400],
this.iridescenceThicknessMap = null,
this.sheenColor = new ga(0),
this.sheenColorMap = null,
this.sheenRoughness = 1,
this.sheenRoughnessMap = null,
this.transmissionMap = null,
this.thickness = 0,
this.thicknessMap = null,
this.attenuationDistance = 1 / 0,
this.attenuationColor = new ga(1,1,1),
this.specularIntensity = 1,
this.specularIntensityMap = null,
this.specularColor = new ga(1,1,1),
this.specularColorMap = null,
this._anisotropy = 0,
this._clearcoat = 0,
this._dispersion = 0,
this._iridescence = 0,
this._sheen = 0,
this._transmission = 0,
this.setValues(e)
}
get anisotropy() {
return this._anisotropy
}
set anisotropy(e) {
this._anisotropy > 0 !== e > 0 && this.version++,
this._anisotropy = e
}
get clearcoat() {
return this._clearcoat
}
set clearcoat(e) {
this._clearcoat > 0 !== e > 0 && this.version++,
this._clearcoat = e
}
get iridescence() {
return this._iridescence
}
set iridescence(e) {
this._iridescence > 0 !== e > 0 && this.version++,
this._iridescence = e
}
get dispersion() {
return this._dispersion
}
set dispersion(e) {
this._dispersion > 0 !== e > 0 && this.version++,
this._dispersion = e
}
get sheen() {
return this._sheen
}
set sheen(e) {
this._sheen > 0 !== e > 0 && this.version++,
this._sheen = e
}
get transmission() {
return this._transmission
}
set transmission(e) {
this._transmission > 0 !== e > 0 && this.version++,
this._transmission = e
}
copy(e) {
return super.copy(e),
this.defines = {
STANDARD: "",
PHYSICAL: ""
},
this.anisotropy = e.anisotropy,
this.anisotropyRotation = e.anisotropyRotation,
this.anisotropyMap = e.anisotropyMap,
this.clearcoat = e.clearcoat,
this.clearcoatMap = e.clearcoatMap,
this.clearcoatRoughness = e.clearcoatRoughness,
this.clearcoatRoughnessMap = e.clearcoatRoughnessMap,
this.clearcoatNormalMap = e.clearcoatNormalMap,
this.clearcoatNormalScale.copy(e.clearcoatNormalScale),
this.dispersion = e.dispersion,
this.ior = e.ior,
this.iridescence = e.iridescence,
this.iridescenceMap = e.iridescenceMap,
this.iridescenceIOR = e.iridescenceIOR,
this.iridescenceThicknessRange = [...e.iridescenceThicknessRange],
this.iridescenceThicknessMap = e.iridescenceThicknessMap,
this.sheen = e.sheen,
this.sheenColor.copy(e.sheenColor),
this.sheenColorMap = e.sheenColorMap,
this.sheenRoughness = e.sheenRoughness,
this.sheenRoughnessMap = e.sheenRoughnessMap,
this.transmission = e.transmission,
this.transmissionMap = e.transmissionMap,
this.thickness = e.thickness,
this.thicknessMap = e.thicknessMap,
this.attenuationDistance = e.attenuationDistance,
this.attenuationColor.copy(e.attenuationColor),
this.specularIntensity = e.specularIntensity,
this.specularIntensityMap = e.specularIntensityMap,
this.specularColor.copy(e.specularColor),
this.specularColorMap = e.specularColorMap,
this
}
}
class Dp extends xa {
constructor(e) {
super(),
this.isMeshPhongMaterial = !0,
this.type = "MeshPhongMaterial",
this.color = new ga(16777215),
this.specular = new ga(1118481),
this.shininess = 30,
this.map = null,
this.lightMap = null,
this.lightMapIntensity = 1,
this.aoMap = null,
this.aoMapIntensity = 1,
this.emissive = new ga(0),
this.emissiveIntensity = 1,
this.emissiveMap = null,
this.bumpMap = null,
this.bumpScale = 1,
this.normalMap = null,
this.normalMapType = pr,
this.normalScale = new xi(1,1),
this.displacementMap = null,
this.displacementScale = 1,
this.displacementBias = 0,
this.specularMap = null,
this.alphaMap = null,
this.envMap = null,
this.envMapRotation = new js,
this.combine = gt,
this.reflectivity = 1,
this.refractionRatio = .98,
this.wireframe = !1,
this.wireframeLinewidth = 1,
this.wireframeLinecap = "round",
this.wireframeLinejoin = "round",
this.flatShading = !1,
this.fog = !0,
this.setValues(e)
}
copy(e) {
return super.copy(e),
this.color.copy(e.color),
this.specular.copy(e.specular),
this.shininess = e.shininess,
this.map = e.map,
this.lightMap = e.lightMap,
this.lightMapIntensity = e.lightMapIntensity,
this.aoMap = e.aoMap,
this.aoMapIntensity = e.aoMapIntensity,
this.emissive.copy(e.emissive),
this.emissiveMap = e.emissiveMap,
this.emissiveIntensity = e.emissiveIntensity,
this.bumpMap = e.bumpMap,
this.bumpScale = e.bumpScale,
this.normalMap = e.normalMap,
this.normalMapType = e.normalMapType,
this.normalScale.copy(e.normalScale),
this.displacementMap = e.displacementMap,
this.displacementScale = e.displacementScale,
this.displacementBias = e.displacementBias,
this.specularMap = e.specularMap,
this.alphaMap = e.alphaMap,
this.envMap = e.envMap,
this.envMapRotation.copy(e.envMapRotation),
this.combine = e.combine,
this.reflectivity = e.reflectivity,
this.refractionRatio = e.refractionRatio,
this.wireframe = e.wireframe,
this.wireframeLinewidth = e.wireframeLinewidth,
this.wireframeLinecap = e.wireframeLinecap,
this.wireframeLinejoin = e.wireframeLinejoin,
this.flatShading = e.flatShading,
this.fog = e.fog,
this
}
}
class jp extends xa {
constructor(e) {
super(),
this.isMeshToonMaterial = !0,
this.defines = {
TOON: ""
},
this.type = "MeshToonMaterial",
this.color = new ga(16777215),
this.map = null,
this.gradientMap = null,
this.lightMap = null,
this.lightMapIntensity = 1,
this.aoMap = null,
this.aoMapIntensity = 1,
this.emissive = new ga(0),
this.emissiveIntensity = 1,
this.emissiveMap = null,
this.bumpMap = null,
this.bumpScale = 1,
this.normalMap = null,
this.normalMapType = pr,
this.normalScale = new xi(1,1),
this.displacementMap = null,
this.displacementScale = 1,
this.displacementBias = 0,
this.alphaMap = null,
this.wireframe = !1,
this.wireframeLinewidth = 1,
this.wireframeLinecap = "round",
this.wireframeLinejoin = "round",
this.fog = !0,
this.setValues(e)
}
copy(e) {
return super.copy(e),
this.color.copy(e.color),
this.map = e.map,
this.gradientMap = e.gradientMap,
this.lightMap = e.lightMap,
this.lightMapIntensity = e.lightMapIntensity,
this.aoMap = e.aoMap,
this.aoMapIntensity = e.aoMapIntensity,
this.emissive.copy(e.emissive),
this.emissiveMap = e.emissiveMap,
this.emissiveIntensity = e.emissiveIntensity,
this.bumpMap = e.bumpMap,
this.bumpScale = e.bumpScale,
this.normalMap = e.normalMap,
this.normalMapType = e.normalMapType,
this.normalScale.copy(e.normalScale),
this.displacementMap = e.displacementMap,
this.displacementScale = e.displacementScale,
this.displacementBias = e.displacementBias,
this.alphaMap = e.alphaMap,
this.wireframe = e.wireframe,
this.wireframeLinewidth = e.wireframeLinewidth,
this.wireframeLinecap = e.wireframeLinecap,
this.wireframeLinejoin = e.wireframeLinejoin,
this.fog = e.fog,
this
}
}
class Fp extends xa {
constructor(e) {
super(),
this.isMeshNormalMaterial = !0,
this.type = "MeshNormalMaterial",
this.bumpMap = null,
this.bumpScale = 1,
this.normalMap = null,
this.normalMapType = pr,
this.normalScale = new xi(1,1),
this.displacementMap = null,
this.displacementScale = 1,
this.displacementBias = 0,
this.wireframe = !1,
this.wireframeLinewidth = 1,
this.flatShading = !1,
this.setValues(e)
}
copy(e) {
return super.copy(e),
this.bumpMap = e.bumpMap,
this.bumpScale = e.bumpScale,
this.normalMap = e.normalMap,
this.normalMapType = e.normalMapType,
this.normalScale.copy(e.normalScale),
this.displacementMap = e.displacementMap,
this.displacementScale = e.displacementScale,
this.displacementBias = e.displacementBias,
this.wireframe = e.wireframe,
this.wireframeLinewidth = e.wireframeLinewidth,
this.flatShading = e.flatShading,
this
}
}
class Op extends xa {
constructor(e) {
super(),
this.isMeshLambertMaterial = !0,
this.type = "MeshLambertMaterial",
this.color = new ga(16777215),
this.map = null,
this.lightMap = null,
this.lightMapIntensity = 1,
this.aoMap = null,
this.aoMapIntensity = 1,
this.emissive = new ga(0),
this.emissiveIntensity = 1,
this.emissiveMap = null,
this.bumpMap = null,
this.bumpScale = 1,
this.normalMap = null,
this.normalMapType = pr,
this.normalScale = new xi(1,1),
this.displacementMap = null,
this.displacementScale = 1,
this.displacementBias = 0,
this.specularMap = null,
this.alphaMap = null,
this.envMap = null,
this.envMapRotation = new js,
this.combine = gt,
this.reflectivity = 1,
this.refractionRatio = .98,
this.wireframe = !1,
this.wireframeLinewidth = 1,
this.wireframeLinecap = "round",
this.wireframeLinejoin = "round",
this.flatShading = !1,
this.fog = !0,
this.setValues(e)
}
copy(e) {
return super.copy(e),
this.color.copy(e.color),
this.map = e.map,
this.lightMap = e.lightMap,
this.lightMapIntensity = e.lightMapIntensity,
this.aoMap = e.aoMap,
this.aoMapIntensity = e.aoMapIntensity,
this.emissive.copy(e.emissive),
this.emissiveMap = e.emissiveMap,
this.emissiveIntensity = e.emissiveIntensity,
this.bumpMap = e.bumpMap,
this.bumpScale = e.bumpScale,
this.normalMap = e.normalMap,
this.normalMapType = e.normalMapType,
this.normalScale.copy(e.normalScale),
this.displacementMap = e.displacementMap,
this.displacementScale = e.displacementScale,
this.displacementBias = e.displacementBias,
this.specularMap = e.specularMap,
this.alphaMap = e.alphaMap,
this.envMap = e.envMap,
this.envMapRotation.copy(e.envMapRotation),
this.combine = e.combine,
this.reflectivity = e.reflectivity,
this.refractionRatio = e.refractionRatio,
this.wireframe = e.wireframe,
this.wireframeLinewidth = e.wireframeLinewidth,
this.wireframeLinecap = e.wireframeLinecap,
this.wireframeLinejoin = e.wireframeLinejoin,
this.flatShading = e.flatShading,
this.fog = e.fog,
this
}
}
class Up extends xa {
constructor(e) {
super(),
this.isMeshMatcapMaterial = !0,
this.defines = {
MATCAP: ""
},
this.type = "MeshMatcapMaterial",
this.color = new ga(16777215),
this.matcap = null,
this.map = null,
this.bumpMap = null,
this.bumpScale = 1,
this.normalMap = null,
this.normalMapType = pr,
this.normalScale = new xi(1,1),
this.displacementMap = null,
this.displacementScale = 1,
this.displacementBias = 0,
this.alphaMap = null,
this.flatShading = !1,
this.fog = !0,
this.setValues(e)
}
copy(e) {
return super.copy(e),
this.defines = {
MATCAP: ""
},
this.color.copy(e.color),
this.matcap = e.matcap,
this.map = e.map,
this.bumpMap = e.bumpMap,
this.bumpScale = e.bumpScale,
this.normalMap = e.normalMap,
this.normalMapType = e.normalMapType,
this.normalScale.copy(e.normalScale),
this.displacementMap = e.displacementMap,
this.displacementScale = e.displacementScale,
this.displacementBias = e.displacementBias,
this.alphaMap = e.alphaMap,
this.flatShading = e.flatShading,
this.fog = e.fog,
this
}
}
class zp extends Dd {
constructor(e) {
super(),
this.isLineDashedMaterial = !0,
this.type = "LineDashedMaterial",
this.scale = 1,
this.dashSize = 3,
this.gapSize = 1,
this.setValues(e)
}
copy(e) {
return super.copy(e),
this.scale = e.scale,
this.dashSize = e.dashSize,
this.gapSize = e.gapSize,
this
}
}
function Gp(e, t, n) {
return !e || !n && e.constructor === t ? e : "number" === typeof t.BYTES_PER_ELEMENT ? new t(e) : Array.prototype.slice.call(e)
}
function Hp(e) {
return ArrayBuffer.isView(e) && !(e instanceof DataView)
}
function Vp(e) {
const t = e.length
, n = new Array(t);
for (let r = 0; r !== t; ++r)
n[r] = r;
return n.sort((function(t, n) {
return e[t] - e[n]
}
)),
n
}
function Wp(e, t, n) {
const r = e.length
, i = new e.constructor(r);
for (let s = 0, a = 0; a !== r; ++s) {
const r = n[s] * t;
for (let n = 0; n !== t; ++n)
i[a++] = e[r + n]
}
return i
}
function Jp(e, t, n, r) {
let i = 1
, s = e[0];
for (; void 0 !== s && void 0 === s[r]; )
s = e[i++];
if (void 0 === s)
return;
let a = s[r];
if (void 0 !== a)
if (Array.isArray(a))
do {
a = s[r],
void 0 !== a && (t.push(s.time),
n.push.apply(n, a)),
s = e[i++]
} while (void 0 !== s);
else if (void 0 !== a.toArray)
do {
a = s[r],
void 0 !== a && (t.push(s.time),
a.toArray(n, n.length)),
s = e[i++]
} while (void 0 !== s);
else
do {
a = s[r],
void 0 !== a && (t.push(s.time),
n.push(a)),
s = e[i++]
} while (void 0 !== s)
}
const Xp = {
convertArray: Gp,
isTypedArray: Hp,
getKeyframeOrder: Vp,
sortedArray: Wp,
flattenJSON: Jp,
subclip: function(e, t, n, r) {
let i = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : 30;
const s = e.clone();
s.name = t;
const a = [];
for (let l = 0; l < s.tracks.length; ++l) {
const e = s.tracks[l]
, t = e.getValueSize()
, o = []
, c = [];
for (let s = 0; s < e.times.length; ++s) {
const a = e.times[s] * i;
if (!(a < n || a >= r)) {
o.push(e.times[s]);
for (let n = 0; n < t; ++n)
c.push(e.values[s * t + n])
}
}
0 !== o.length && (e.times = Gp(o, e.times.constructor),
e.values = Gp(c, e.values.constructor),
a.push(e))
}
s.tracks = a;
let o = 1 / 0;
for (let l = 0; l < s.tracks.length; ++l)
o > s.tracks[l].times[0] && (o = s.tracks[l].times[0]);
for (let l = 0; l < s.tracks.length; ++l)
s.tracks[l].shift(-1 * o);
return s.resetDuration(),
s
},
makeClipAdditive: function(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : e
, r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : 30;
r <= 0 && (r = 30);
const i = n.tracks.length
, s = t / r;
for (let a = 0; a < i; ++a) {
const t = n.tracks[a]
, r = t.ValueTypeName;
if ("bool" === r || "string" === r)
continue;
const i = e.tracks.find((function(e) {
return e.name === t.name && e.ValueTypeName === r
}
));
if (void 0 === i)
continue;
let o = 0;
const l = t.getValueSize();
t.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline && (o = l / 3);
let c = 0;
const u = i.getValueSize();
i.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline && (c = u / 3);
const d = t.times.length - 1;
let h;
if (s <= t.times[0]) {
const e = o
, n = l - o;
h = t.values.slice(e, n)
} else if (s >= t.times[d]) {
const e = d * l + o
, n = e + l - o;
h = t.values.slice(e, n)
} else {
const e = t.createInterpolant()
, n = o
, r = l - o;
e.evaluate(s),
h = e.resultBuffer.slice(n, r)
}
if ("quaternion" === r) {
(new Yi).fromArray(h).normalize().conjugate().toArray(h)
}
const p = i.times.length;
for (let e = 0; e < p; ++e) {
const t = e * u + c;
if ("quaternion" === r)
Yi.multiplyQuaternionsFlat(i.values, t, h, 0, i.values, t);
else {
const e = u - 2 * c;
for (let n = 0; n < e; ++n)
i.values[t + n] -= h[n]
}
}
}
return e.blendMode = or,
e
}
};
class Kp {
constructor(e, t, n, r) {
this.parameterPositions = e,
this._cachedIndex = 0,
this.resultBuffer = void 0 !== r ? r : new t.constructor(n),
this.sampleValues = t,
this.valueSize = n,
this.settings = null,
this.DefaultSettings_ = {}
}
evaluate(e) {
const t = this.parameterPositions;
let n = this._cachedIndex
, r = t[n]
, i = t[n - 1];
e: {
t: {
let s;
n: {
r: if (!(e < r)) {
for (let s = n + 2; ; ) {
if (void 0 === r) {
if (e < i)
break r;
return n = t.length,
this._cachedIndex = n,
this.copySampleValue_(n - 1)
}
if (n === s)
break;
if (i = r,
r = t[++n],
e < r)
break t
}
s = t.length;
break n
}
if (e >= i)
break e;
{
const a = t[1];
e < a && (n = 2,
i = a);
for (let s = n - 2; ; ) {
if (void 0 === i)
return this._cachedIndex = 0,
this.copySampleValue_(0);
if (n === s)
break;
if (r = i,
i = t[--n - 1],
e >= i)
break t
}
s = n,
n = 0
}
}
for (; n < s; ) {
const r = n + s >>> 1;
e < t[r] ? s = r : n = r + 1
}
if (r = t[n],
i = t[n - 1],
void 0 === i)
return this._cachedIndex = 0,
this.copySampleValue_(0);
if (void 0 === r)
return n = t.length,
this._cachedIndex = n,
this.copySampleValue_(n - 1)
}
this._cachedIndex = n,
this.intervalChanged_(n, i, r)
}
return this.interpolate_(n, i, e, r)
}
getSettings_() {
return this.settings || this.DefaultSettings_
}
copySampleValue_(e) {
const t = this.resultBuffer
, n = this.sampleValues
, r = this.valueSize
, i = e * r;
for (let s = 0; s !== r; ++s)
t[s] = n[i + s];
return t
}
interpolate_() {
throw new Error("call to abstract method")
}
intervalChanged_() {}
}
class qp extends Kp {
constructor(e, t, n, r) {
super(e, t, n, r),
this._weightPrev = -0,
this._offsetPrev = -0,
this._weightNext = -0,
this._offsetNext = -0,
this.DefaultSettings_ = {
endingStart: rr,
endingEnd: rr
}
}
intervalChanged_(e, t, n) {
const r = this.parameterPositions;
let i = e - 2
, s = e + 1
, a = r[i]
, o = r[s];
if (void 0 === a)
switch (this.getSettings_().endingStart) {
case ir:
i = e,
a = 2 * t - n;
break;
case sr:
i = r.length - 2,
a = t + r[i] - r[i + 1];
break;
default:
i = e,
a = n
}
if (void 0 === o)
switch (this.getSettings_().endingEnd) {
case ir:
s = e,
o = 2 * n - t;
break;
case sr:
s = 1,
o = n + r[1] - r[0];
break;
default:
s = e - 1,
o = t
}
const l = .5 * (n - t)
, c = this.valueSize;
this._weightPrev = l / (t - a),
this._weightNext = l / (o - n),
this._offsetPrev = i * c,
this._offsetNext = s * c
}
interpolate_(e, t, n, r) {
const i = this.resultBuffer
, s = this.sampleValues
, a = this.valueSize
, o = e * a
, l = o - a
, c = this._offsetPrev
, u = this._offsetNext
, d = this._weightPrev
, h = this._weightNext
, p = (n - t) / (r - t)
, f = p * p
, m = f * p
, g = -d * m + 2 * d * f - d * p
, v = (1 + d) * m + (-1.5 - 2 * d) * f + (-.5 + d) * p + 1
, y = (-1 - h) * m + (1.5 + h) * f + .5 * p
, x = h * m - h * f;
for (let b = 0; b !== a; ++b)
i[b] = g * s[c + b] + v * s[l + b] + y * s[o + b] + x * s[u + b];
return i
}
}
class Yp extends Kp {
constructor(e, t, n, r) {
super(e, t, n, r)
}
interpolate_(e, t, n, r) {
const i = this.resultBuffer
, s = this.sampleValues
, a = this.valueSize
, o = e * a
, l = o - a
, c = (n - t) / (r - t)
, u = 1 - c;
for (let d = 0; d !== a; ++d)
i[d] = s[l + d] * u + s[o + d] * c;
return i
}
}
class Qp extends Kp {
constructor(e, t, n, r) {
super(e, t, n, r)
}
interpolate_(e) {
return this.copySampleValue_(e - 1)
}
}
class Zp {
constructor(e, t, n, r) {
if (void 0 === e)
throw new Error("THREE.KeyframeTrack: track name is undefined");
if (void 0 === t || 0 === t.length)
throw new Error("THREE.KeyframeTrack: no keyframes in track named " + e);
this.name = e,
this.times = Gp(t, this.TimeBufferType),
this.values = Gp(n, this.ValueBufferType),
this.setInterpolation(r || this.DefaultInterpolation)
}
static toJSON(e) {
const t = e.constructor;
let n;
if (t.toJSON !== this.toJSON)
n = t.toJSON(e);
else {
n = {
name: e.name,
times: Gp(e.times, Array),
values: Gp(e.values, Array)
};
const t = e.getInterpolation();
t !== e.DefaultInterpolation && (n.interpolation = t)
}
return n.type = e.ValueTypeName,
n
}
InterpolantFactoryMethodDiscrete(e) {
return new Qp(this.times,this.values,this.getValueSize(),e)
}
InterpolantFactoryMethodLinear(e) {
return new Yp(this.times,this.values,this.getValueSize(),e)
}
InterpolantFactoryMethodSmooth(e) {
return new qp(this.times,this.values,this.getValueSize(),e)
}
setInterpolation(e) {
let t;
switch (e) {
case er:
t = this.InterpolantFactoryMethodDiscrete;
break;
case tr:
t = this.InterpolantFactoryMethodLinear;
break;
case nr:
t = this.InterpolantFactoryMethodSmooth
}
if (void 0 === t) {
const t = "unsupported interpolation for " + this.ValueTypeName + " keyframe track named " + this.name;
if (void 0 === this.createInterpolant) {
if (e === this.DefaultInterpolation)
throw new Error(t);
this.setInterpolation(this.DefaultInterpolation)
}
return console.warn("THREE.KeyframeTrack:", t),
this
}
return this.createInterpolant = t,
this
}
getInterpolation() {
switch (this.createInterpolant) {
case this.InterpolantFactoryMethodDiscrete:
return er;
case this.InterpolantFactoryMethodLinear:
return tr;
case this.InterpolantFactoryMethodSmooth:
return nr
}
}
getValueSize() {
return this.values.length / this.times.length
}
shift(e) {
if (0 !== e) {
const t = this.times;
for (let n = 0, r = t.length; n !== r; ++n)
t[n] += e
}
return this
}
scale(e) {
if (1 !== e) {
const t = this.times;
for (let n = 0, r = t.length; n !== r; ++n)
t[n] *= e
}
return this
}
trim(e, t) {
const n = this.times
, r = n.length;
let i = 0
, s = r - 1;
for (; i !== r && n[i] < e; )
++i;
for (; -1 !== s && n[s] > t; )
--s;
if (++s,
0 !== i || s !== r) {
i >= s && (s = Math.max(s, 1),
i = s - 1);
const e = this.getValueSize();
this.times = n.slice(i, s),
this.values = this.values.slice(i * e, s * e)
}
return this
}
validate() {
let e = !0;
const t = this.getValueSize();
t - Math.floor(t) !== 0 && (console.error("THREE.KeyframeTrack: Invalid value size in track.", this),
e = !1);
const n = this.times
, r = this.values
, i = n.length;
0 === i && (console.error("THREE.KeyframeTrack: Track is empty.", this),
e = !1);
let s = null;
for (let a = 0; a !== i; a++) {
const t = n[a];
if ("number" === typeof t && isNaN(t)) {
console.error("THREE.KeyframeTrack: Time is not a valid number.", this, a, t),
e = !1;
break
}
if (null !== s && s > t) {
console.error("THREE.KeyframeTrack: Out of order keys.", this, a, t, s),
e = !1;
break
}
s = t
}
if (void 0 !== r && Hp(r))
for (let a = 0, o = r.length; a !== o; ++a) {
const t = r[a];
if (isNaN(t)) {
console.error("THREE.KeyframeTrack: Value is not a valid number.", this, a, t),
e = !1;
break
}
}
return e
}
optimize() {
const e = this.times.slice()
, t = this.values.slice()
, n = this.getValueSize()
, r = this.getInterpolation() === nr
, i = e.length - 1;
let s = 1;
for (let a = 1; a < i; ++a) {
let i = !1;
const o = e[a];
if (o !== e[a + 1] && (1 !== a || o !== e[0]))
if (r)
i = !0;
else {
const e = a * n
, r = e - n
, s = e + n;
for (let a = 0; a !== n; ++a) {
const n = t[e + a];
if (n !== t[r + a] || n !== t[s + a]) {
i = !0;
break
}
}
}
if (i) {
if (a !== s) {
e[s] = e[a];
const r = a * n
, i = s * n;
for (let e = 0; e !== n; ++e)
t[i + e] = t[r + e]
}
++s
}
}
if (i > 0) {
e[s] = e[i];
for (let e = i * n, r = s * n, a = 0; a !== n; ++a)
t[r + a] = t[e + a];
++s
}
return s !== e.length ? (this.times = e.slice(0, s),
this.values = t.slice(0, s * n)) : (this.times = e,
this.values = t),
this
}
clone() {
const e = this.times.slice()
, t = this.values.slice()
, n = new (0,
this.constructor)(this.name,e,t);
return n.createInterpolant = this.createInterpolant,
n
}
}
Zp.prototype.TimeBufferType = Float32Array,
Zp.prototype.ValueBufferType = Float32Array,
Zp.prototype.DefaultInterpolation = tr;
class $p extends Zp {
constructor(e, t, n) {
super(e, t, n)
}
}
$p.prototype.ValueTypeName = "bool",
$p.prototype.ValueBufferType = Array,
$p.prototype.DefaultInterpolation = er,
$p.prototype.InterpolantFactoryMethodLinear = void 0,
$p.prototype.InterpolantFactoryMethodSmooth = void 0;
class ef extends Zp {
}
ef.prototype.ValueTypeName = "color";
class tf extends Zp {
}
tf.prototype.ValueTypeName = "number";
class nf extends Kp {
constructor(e, t, n, r) {
super(e, t, n, r)
}
interpolate_(e, t, n, r) {
const i = this.resultBuffer
, s = this.sampleValues
, a = this.valueSize
, o = (n - t) / (r - t);
let l = e * a;
for (let c = l + a; l !== c; l += 4)
Yi.slerpFlat(i, 0, s, l - a, s, l, o);
return i
}
}
class rf extends Zp {
InterpolantFactoryMethodLinear(e) {
return new nf(this.times,this.values,this.getValueSize(),e)
}
}
rf.prototype.ValueTypeName = "quaternion",
rf.prototype.InterpolantFactoryMethodSmooth = void 0;
class sf extends Zp {
constructor(e, t, n) {
super(e, t, n)
}
}
sf.prototype.ValueTypeName = "string",
sf.prototype.ValueBufferType = Array,
sf.prototype.DefaultInterpolation = er,
sf.prototype.InterpolantFactoryMethodLinear = void 0,
sf.prototype.InterpolantFactoryMethodSmooth = void 0;
class af extends Zp {
}
af.prototype.ValueTypeName = "vector";
class of {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : ""
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : -1
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : []
, r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : ar;
this.name = e,
this.tracks = n,
this.duration = t,
this.blendMode = r,
this.uuid = hi(),
this.duration < 0 && this.resetDuration()
}
static parse(e) {
const t = []
, n = e.tracks
, r = 1 / (e.fps || 1);
for (let s = 0, a = n.length; s !== a; ++s)
t.push(lf(n[s]).scale(r));
const i = new this(e.name,e.duration,t,e.blendMode);
return i.uuid = e.uuid,
i
}
static toJSON(e) {
const t = []
, n = e.tracks
, r = {
name: e.name,
duration: e.duration,
tracks: t,
uuid: e.uuid,
blendMode: e.blendMode
};
for (let i = 0, s = n.length; i !== s; ++i)
t.push(Zp.toJSON(n[i]));
return r
}
static CreateFromMorphTargetSequence(e, t, n, r) {
const i = t.length
, s = [];
for (let a = 0; a < i; a++) {
let e = []
, o = [];
e.push((a + i - 1) % i, a, (a + 1) % i),
o.push(0, 1, 0);
const l = Vp(e);
e = Wp(e, 1, l),
o = Wp(o, 1, l),
r || 0 !== e[0] || (e.push(i),
o.push(o[0])),
s.push(new tf(".morphTargetInfluences[" + t[a].name + "]",e,o).scale(1 / n))
}
return new this(e,-1,s)
}
static findByName(e, t) {
let n = e;
if (!Array.isArray(e)) {
const t = e;
n = t.geometry && t.geometry.animations || t.animations
}
for (let r = 0; r < n.length; r++)
if (n[r].name === t)
return n[r];
return null
}
static CreateClipsFromMorphTargetSequences(e, t, n) {
const r = {}
, i = /^([\w-]*?)([\d]+)$/;
for (let a = 0, o = e.length; a < o; a++) {
const t = e[a]
, n = t.name.match(i);
if (n && n.length > 1) {
const e = n[1];
let i = r[e];
i || (r[e] = i = []),
i.push(t)
}
}
const s = [];
for (const a in r)
s.push(this.CreateFromMorphTargetSequence(a, r[a], t, n));
return s
}
static parseAnimation(e, t) {
if (!e)
return console.error("THREE.AnimationClip: No animation in JSONLoader data."),
null;
const n = function(e, t, n, r, i) {
if (0 !== n.length) {
const s = []
, a = [];
Jp(n, s, a, r),
0 !== s.length && i.push(new e(t,s,a))
}
}
, r = []
, i = e.name || "default"
, s = e.fps || 30
, a = e.blendMode;
let o = e.length || -1;
const l = e.hierarchy || [];
for (let c = 0; c < l.length; c++) {
const e = l[c].keys;
if (e && 0 !== e.length)
if (e[0].morphTargets) {
const t = {};
let n;
for (n = 0; n < e.length; n++)
if (e[n].morphTargets)
for (let r = 0; r < e[n].morphTargets.length; r++)
t[e[n].morphTargets[r]] = -1;
for (const i in t) {
const t = []
, s = [];
for (let r = 0; r !== e[n].morphTargets.length; ++r) {
const r = e[n];
t.push(r.time),
s.push(r.morphTarget === i ? 1 : 0)
}
r.push(new tf(".morphTargetInfluence[" + i + "]",t,s))
}
o = t.length * s
} else {
const i = ".bones[" + t[c].name + "]";
n(af, i + ".position", e, "pos", r),
n(rf, i + ".quaternion", e, "rot", r),
n(af, i + ".scale", e, "scl", r)
}
}
if (0 === r.length)
return null;
return new this(i,o,r,a)
}
resetDuration() {
let e = 0;
for (let t = 0, n = this.tracks.length; t !== n; ++t) {
const n = this.tracks[t];
e = Math.max(e, n.times[n.times.length - 1])
}
return this.duration = e,
this
}
trim() {
for (let e = 0; e < this.tracks.length; e++)
this.tracks[e].trim(0, this.duration);
return this
}
validate() {
let e = !0;
for (let t = 0; t < this.tracks.length; t++)
e = e && this.tracks[t].validate();
return e
}
optimize() {
for (let e = 0; e < this.tracks.length; e++)
this.tracks[e].optimize();
return this
}
clone() {
const e = [];
for (let t = 0; t < this.tracks.length; t++)
e.push(this.tracks[t].clone());
return new this.constructor(this.name,this.duration,e,this.blendMode)
}
toJSON() {
return this.constructor.toJSON(this)
}
}
function lf(e) {
if (void 0 === e.type)
throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");
const t = function(e) {
switch (e.toLowerCase()) {
case "scalar":
case "double":
case "float":
case "number":
case "integer":
return tf;
case "vector":
case "vector2":
case "vector3":
case "vector4":
return af;
case "color":
return ef;
case "quaternion":
return rf;
case "bool":
case "boolean":
return $p;
case "string":
return sf
}
throw new Error("THREE.KeyframeTrack: Unsupported typeName: " + e)
}(e.type);
if (void 0 === e.times) {
const t = []
, n = [];
Jp(e.keys, t, n, "value"),
e.times = t,
e.values = n
}
return void 0 !== t.parse ? t.parse(e) : new t(e.name,e.times,e.values,e.interpolation)
}
const cf = {
enabled: !1,
files: {},
add: function(e, t) {
!1 !== this.enabled && (this.files[e] = t)
},
get: function(e) {
if (!1 !== this.enabled)
return this.files[e]
},
remove: function(e) {
delete this.files[e]
},
clear: function() {
this.files = {}
}
};
class uf {
constructor(e, t, n) {
const r = this;
let i, s = !1, a = 0, o = 0;
const l = [];
this.onStart = void 0,
this.onLoad = e,
this.onProgress = t,
this.onError = n,
this.itemStart = function(e) {
o++,
!1 === s && void 0 !== r.onStart && r.onStart(e, a, o),
s = !0
}
,
this.itemEnd = function(e) {
a++,
void 0 !== r.onProgress && r.onProgress(e, a, o),
a === o && (s = !1,
void 0 !== r.onLoad && r.onLoad())
}
,
this.itemError = function(e) {
void 0 !== r.onError && r.onError(e)
}
,
this.resolveURL = function(e) {
return i ? i(e) : e
}
,
this.setURLModifier = function(e) {
return i = e,
this
}
,
this.addHandler = function(e, t) {
return l.push(e, t),
this
}
,
this.removeHandler = function(e) {
const t = l.indexOf(e);
return -1 !== t && l.splice(t, 2),
this
}
,
this.getHandler = function(e) {
for (let t = 0, n = l.length; t < n; t += 2) {
const n = l[t]
, r = l[t + 1];
if (n.global && (n.lastIndex = 0),
n.test(e))
return r
}
return null
}
}
}
const df = new uf;
class hf {
constructor(e) {
this.manager = void 0 !== e ? e : df,
this.crossOrigin = "anonymous",
this.withCredentials = !1,
this.path = "",
this.resourcePath = "",
this.requestHeader = {}
}
load() {}
loadAsync(e, t) {
const n = this;
return new Promise((function(r, i) {
n.load(e, r, t, i)
}
))
}
parse() {}
setCrossOrigin(e) {
return this.crossOrigin = e,
this
}
setWithCredentials(e) {
return this.withCredentials = e,
this
}
setPath(e) {
return this.path = e,
this
}
setResourcePath(e) {
return this.resourcePath = e,
this
}
setRequestHeader(e) {
return this.requestHeader = e,
this
}
}
hf.DEFAULT_MATERIAL_NAME = "__DEFAULT";
const pf = {};
class ff extends Error {
constructor(e, t) {
super(e),
this.response = t
}
}
class mf extends hf {
constructor(e) {
super(e)
}
load(e, t, n, r) {
void 0 === e && (e = ""),
void 0 !== this.path && (e = this.path + e),
e = this.manager.resolveURL(e);
const i = cf.get(e);
if (void 0 !== i)
return this.manager.itemStart(e),
setTimeout(( () => {
t && t(i),
this.manager.itemEnd(e)
}
), 0),
i;
if (void 0 !== pf[e])
return void pf[e].push({
onLoad: t,
onProgress: n,
onError: r
});
pf[e] = [],
pf[e].push({
onLoad: t,
onProgress: n,
onError: r
});
const s = new Request(e,{
headers: new Headers(this.requestHeader),
credentials: this.withCredentials ? "include" : "same-origin"
})
, a = this.mimeType
, o = this.responseType;
fetch(s).then((t => {
if (200 === t.status || 0 === t.status) {
if (0 === t.status && console.warn("THREE.FileLoader: HTTP Status 0 received."),
"undefined" === typeof ReadableStream || void 0 === t.body || void 0 === t.body.getReader)
return t;
const n = pf[e]
, r = t.body.getReader()
, i = t.headers.get("X-File-Size") || t.headers.get("Content-Length")
, s = i ? parseInt(i) : 0
, a = 0 !== s;
let o = 0;
const l = new ReadableStream({
start(e) {
!function t() {
r.read().then((r => {
let {done: i, value: l} = r;
if (i)
e.close();
else {
o += l.byteLength;
const r = new ProgressEvent("progress",{
lengthComputable: a,
loaded: o,
total: s
});
for (let e = 0, t = n.length; e < t; e++) {
const t = n[e];
t.onProgress && t.onProgress(r)
}
e.enqueue(l),
t()
}
}
), (t => {
e.error(t)
}
))
}()
}
});
return new Response(l)
}
throw new ff('fetch for "'.concat(t.url, '" responded with ').concat(t.status, ": ").concat(t.statusText),t)
}
)).then((e => {
switch (o) {
case "arraybuffer":
return e.arrayBuffer();
case "blob":
return e.blob();
case "document":
return e.text().then((e => (new DOMParser).parseFromString(e, a)));
case "json":
return e.json();
default:
if (void 0 === a)
return e.text();
{
const t = /charset="?([^;"\s]*)"?/i.exec(a)
, n = t && t[1] ? t[1].toLowerCase() : void 0
, r = new TextDecoder(n);
return e.arrayBuffer().then((e => r.decode(e)))
}
}
}
)).then((t => {
cf.add(e, t);
const n = pf[e];
delete pf[e];
for (let e = 0, r = n.length; e < r; e++) {
const r = n[e];
r.onLoad && r.onLoad(t)
}
}
)).catch((t => {
const n = pf[e];
if (void 0 === n)
throw this.manager.itemError(e),
t;
delete pf[e];
for (let e = 0, r = n.length; e < r; e++) {
const r = n[e];
r.onError && r.onError(t)
}
this.manager.itemError(e)
}
)).finally(( () => {
this.manager.itemEnd(e)
}
)),
this.manager.itemStart(e)
}
setResponseType(e) {
return this.responseType = e,
this
}
setMimeType(e) {
return this.mimeType = e,
this
}
}
class gf extends hf {
constructor(e) {
super(e)
}
load(e, t, n, r) {
const i = this
, s = new mf(this.manager);
s.setPath(this.path),
s.setRequestHeader(this.requestHeader),
s.setWithCredentials(this.withCredentials),
s.load(e, (function(n) {
try {
t(i.parse(JSON.parse(n)))
} catch (CB) {
r ? r(CB) : console.error(CB),
i.manager.itemError(e)
}
}
), n, r)
}
parse(e) {
const t = [];
for (let n = 0; n < e.length; n++) {
const r = of.parse(e[n]);
t.push(r)
}
return t
}
}
class vf extends hf {
constructor(e) {
super(e)
}
load(e, t, n, r) {
const i = this
, s = []
, a = new sh
, o = new mf(this.manager);
o.setPath(this.path),
o.setResponseType("arraybuffer"),
o.setRequestHeader(this.requestHeader),
o.setWithCredentials(i.withCredentials);
let l = 0;
function c(c) {
o.load(e[c], (function(e) {
const n = i.parse(e, !0);
s[c] = {
width: n.width,
height: n.height,
format: n.format,
mipmaps: n.mipmaps
},
l += 1,
6 === l && (1 === n.mipmapCount && (a.minFilter = Ht),
a.image = s,
a.format = n.format,
a.needsUpdate = !0,
t && t(a))
}
), n, r)
}
if (Array.isArray(e))
for (let u = 0, d = e.length; u < d; ++u)
c(u);
else
o.load(e, (function(e) {
const n = i.parse(e, !0);
if (n.isCubemap) {
const e = n.mipmaps.length / n.mipmapCount;
for (let t = 0; t < e; t++) {
s[t] = {
mipmaps: []
};
for (let e = 0; e < n.mipmapCount; e++)
s[t].mipmaps.push(n.mipmaps[t * n.mipmapCount + e]),
s[t].format = n.format,
s[t].width = n.width,
s[t].height = n.height
}
a.image = s
} else
a.image.width = n.width,
a.image.height = n.height,
a.mipmaps = n.mipmaps;
1 === n.mipmapCount && (a.minFilter = Ht),
a.format = n.format,
a.needsUpdate = !0,
t && t(a)
}
), n, r);
return a
}
}
class yf extends hf {
constructor(e) {
super(e)
}
load(e, t, n, r) {
void 0 !== this.path && (e = this.path + e),
e = this.manager.resolveURL(e);
const i = this
, s = cf.get(e);
if (void 0 !== s)
return i.manager.itemStart(e),
setTimeout((function() {
t && t(s),
i.manager.itemEnd(e)
}
), 0),
s;
const a = Mi("img");
function o() {
c(),
cf.add(e, this),
t && t(this),
i.manager.itemEnd(e)
}
function l(t) {
c(),
r && r(t),
i.manager.itemError(e),
i.manager.itemEnd(e)
}
function c() {
a.removeEventListener("load", o, !1),
a.removeEventListener("error", l, !1)
}
return a.addEventListener("load", o, !1),
a.addEventListener("error", l, !1),
"data:" !== e.slice(0, 5) && void 0 !== this.crossOrigin && (a.crossOrigin = this.crossOrigin),
i.manager.itemStart(e),
a.src = e,
a
}
}
class xf extends hf {
constructor(e) {
super(e)
}
load(e, t, n, r) {
const i = new Mo;
i.colorSpace = gr;
const s = new yf(this.manager);
s.setCrossOrigin(this.crossOrigin),
s.setPath(this.path);
let a = 0;
function o(n) {
s.load(e[n], (function(e) {
i.images[n] = e,
a++,
6 === a && (i.needsUpdate = !0,
t && t(i))
}
), void 0, r)
}
for (let l = 0; l < e.length; ++l)
o(l);
return i
}
}
class bf extends hf {
constructor(e) {
super(e)
}
load(e, t, n, r) {
const i = this
, s = new rd
, a = new mf(this.manager);
return a.setResponseType("arraybuffer"),
a.setRequestHeader(this.requestHeader),
a.setPath(this.path),
a.setWithCredentials(i.withCredentials),
a.load(e, (function(e) {
let n;
try {
n = i.parse(e)
} catch (iy) {
if (void 0 === r)
return void console.error(iy);
r(iy)
}
void 0 !== n.image ? s.image = n.image : void 0 !== n.data && (s.image.width = n.width,
s.image.height = n.height,
s.image.data = n.data),
s.wrapS = void 0 !== n.wrapS ? n.wrapS : Dt,
s.wrapT = void 0 !== n.wrapT ? n.wrapT : Dt,
s.magFilter = void 0 !== n.magFilter ? n.magFilter : Ht,
s.minFilter = void 0 !== n.minFilter ? n.minFilter : Ht,
s.anisotropy = void 0 !== n.anisotropy ? n.anisotropy : 1,
void 0 !== n.colorSpace && (s.colorSpace = n.colorSpace),
void 0 !== n.flipY && (s.flipY = n.flipY),
void 0 !== n.format && (s.format = n.format),
void 0 !== n.type && (s.type = n.type),
void 0 !== n.mipmaps && (s.mipmaps = n.mipmaps,
s.minFilter = Jt),
1 === n.mipmapCount && (s.minFilter = Ht),
void 0 !== n.generateMipmaps && (s.generateMipmaps = n.generateMipmaps),
s.needsUpdate = !0,
t && t(s, n)
}
), n, r),
s
}
}
class _f extends hf {
constructor(e) {
super(e)
}
load(e, t, n, r) {
const i = new Gi
, s = new yf(this.manager);
return s.setCrossOrigin(this.crossOrigin),
s.setPath(this.path),
s.load(e, (function(e) {
i.image = e,
i.needsUpdate = !0,
void 0 !== t && t(i)
}
), n, r),
i
}
}
class wf extends ea {
constructor(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 1;
super(),
this.isLight = !0,
this.type = "Light",
this.color = new ga(e),
this.intensity = t
}
dispose() {}
copy(e, t) {
return super.copy(e, t),
this.color.copy(e.color),
this.intensity = e.intensity,
this
}
toJSON(e) {
const t = super.toJSON(e);
return t.object.color = this.color.getHex(),
t.object.intensity = this.intensity,
void 0 !== this.groundColor && (t.object.groundColor = this.groundColor.getHex()),
void 0 !== this.distance && (t.object.distance = this.distance),
void 0 !== this.angle && (t.object.angle = this.angle),
void 0 !== this.decay && (t.object.decay = this.decay),
void 0 !== this.penumbra && (t.object.penumbra = this.penumbra),
void 0 !== this.shadow && (t.object.shadow = this.shadow.toJSON()),
t
}
}
class Sf extends wf {
constructor(e, t, n) {
super(e, n),
this.isHemisphereLight = !0,
this.type = "HemisphereLight",
this.position.copy(ea.DEFAULT_UP),
this.updateMatrix(),
this.groundColor = new ga(t)
}
copy(e, t) {
return super.copy(e, t),
this.groundColor.copy(e.groundColor),
this
}
}
const Af = new Es
, Mf = new Qi
, Cf = new Qi;
class Ef {
constructor(e) {
this.camera = e,
this.bias = 0,
this.normalBias = 0,
this.radius = 1,
this.blurSamples = 8,
this.mapSize = new xi(512,512),
this.map = null,
this.mapPass = null,
this.matrix = new Es,
this.autoUpdate = !0,
this.needsUpdate = !1,
this._frustum = new Lo,
this._frameExtents = new xi(1,1),
this._viewportCount = 1,
this._viewports = [new Hi(0,0,1,1)]
}
getViewportCount() {
return this._viewportCount
}
getFrustum() {
return this._frustum
}
updateMatrices(e) {
const t = this.camera
, n = this.matrix;
Mf.setFromMatrixPosition(e.matrixWorld),
t.position.copy(Mf),
Cf.setFromMatrixPosition(e.target.matrixWorld),
t.lookAt(Cf),
t.updateMatrixWorld(),
Af.multiplyMatrices(t.projectionMatrix, t.matrixWorldInverse),
this._frustum.setFromProjectionMatrix(Af),
n.set(.5, 0, 0, .5, 0, .5, 0, .5, 0, 0, .5, .5, 0, 0, 0, 1),
n.multiply(Af)
}
getViewport(e) {
return this._viewports[e]
}
getFrameExtents() {
return this._frameExtents
}
dispose() {
this.map && this.map.dispose(),
this.mapPass && this.mapPass.dispose()
}
copy(e) {
return this.camera = e.camera.clone(),
this.bias = e.bias,
this.radius = e.radius,
this.mapSize.copy(e.mapSize),
this
}
clone() {
return (new this.constructor).copy(this)
}
toJSON() {
const e = {};
return 0 !== this.bias && (e.bias = this.bias),
0 !== this.normalBias && (e.normalBias = this.normalBias),
1 !== this.radius && (e.radius = this.radius),
512 === this.mapSize.x && 512 === this.mapSize.y || (e.mapSize = this.mapSize.toArray()),
e.camera = this.camera.toJSON(!1).object,
delete e.camera.matrix,
e
}
}
class Tf extends Ef {
constructor() {
super(new wo(50,1,.5,500)),
this.isSpotLightShadow = !0,
this.focus = 1
}
updateMatrices(e) {
const t = this.camera
, n = 2 * di * e.angle * this.focus
, r = this.mapSize.width / this.mapSize.height
, i = e.distance || t.far;
n === t.fov && r === t.aspect && i === t.far || (t.fov = n,
t.aspect = r,
t.far = i,
t.updateProjectionMatrix()),
super.updateMatrices(e)
}
copy(e) {
return super.copy(e),
this.focus = e.focus,
this
}
}
class Rf extends wf {
constructor(e, t) {
let n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 0
, r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : Math.PI / 3
, i = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : 0
, s = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : 2;
super(e, t),
this.isSpotLight = !0,
this.type = "SpotLight",
this.position.copy(ea.DEFAULT_UP),
this.updateMatrix(),
this.target = new ea,
this.distance = n,
this.angle = r,
this.penumbra = i,
this.decay = s,
this.map = null,
this.shadow = new Tf
}
get power() {
return this.intensity * Math.PI
}
set power(e) {
this.intensity = e / Math.PI
}
dispose() {
this.shadow.dispose()
}
copy(e, t) {
return super.copy(e, t),
this.distance = e.distance,
this.angle = e.angle,
this.penumbra = e.penumbra,
this.decay = e.decay,
this.target = e.target.clone(),
this.shadow = e.shadow.clone(),
this
}
}
const Bf = new Es
, Pf = new Qi
, kf = new Qi;
class Lf extends Ef {
constructor() {
super(new wo(90,1,.5,500)),
this.isPointLightShadow = !0,
this._frameExtents = new xi(4,2),
this._viewportCount = 6,
this._viewports = [new Hi(2,1,1,1), new Hi(0,1,1,1), new Hi(3,1,1,1), new Hi(1,1,1,1), new Hi(3,0,1,1), new Hi(1,0,1,1)],
this._cubeDirections = [new Qi(1,0,0), new Qi(-1,0,0), new Qi(0,0,1), new Qi(0,0,-1), new Qi(0,1,0), new Qi(0,-1,0)],
this._cubeUps = [new Qi(0,1,0), new Qi(0,1,0), new Qi(0,1,0), new Qi(0,1,0), new Qi(0,0,1), new Qi(0,0,-1)]
}
updateMatrices(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;
const n = this.camera
, r = this.matrix
, i = e.distance || n.far;
i !== n.far && (n.far = i,
n.updateProjectionMatrix()),
Pf.setFromMatrixPosition(e.matrixWorld),
n.position.copy(Pf),
kf.copy(n.position),
kf.add(this._cubeDirections[t]),
n.up.copy(this._cubeUps[t]),
n.lookAt(kf),
n.updateMatrixWorld(),
r.makeTranslation(-Pf.x, -Pf.y, -Pf.z),
Bf.multiplyMatrices(n.projectionMatrix, n.matrixWorldInverse),
this._frustum.setFromProjectionMatrix(Bf)
}
}
class If extends wf {
constructor(e, t) {
let n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 0
, r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : 2;
super(e, t),
this.isPointLight = !0,
this.type = "PointLight",
this.distance = n,
this.decay = r,
this.shadow = new Lf
}
get power() {
return 4 * this.intensity * Math.PI
}
set power(e) {
this.intensity = e / (4 * Math.PI)
}
dispose() {
this.shadow.dispose()
}
copy(e, t) {
return super.copy(e, t),
this.distance = e.distance,
this.decay = e.decay,
this.shadow = e.shadow.clone(),
this
}
}
class Nf extends Ef {
constructor() {
super(new qo(-5,5,5,-5,.5,500)),
this.isDirectionalLightShadow = !0
}
}
class Df extends wf {
constructor(e, t) {
super(e, t),
this.isDirectionalLight = !0,
this.type = "DirectionalLight",
this.position.copy(ea.DEFAULT_UP),
this.updateMatrix(),
this.target = new ea,
this.shadow = new Nf
}
dispose() {
this.shadow.dispose()
}
copy(e) {
return super.copy(e),
this.target = e.target.clone(),
this.shadow = e.shadow.clone(),
this
}
}
class jf extends wf {
constructor(e, t) {
super(e, t),
this.isAmbientLight = !0,
this.type = "AmbientLight"
}
}
class Ff extends wf {
constructor(e, t) {
let n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 10
, r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : 10;
super(e, t),
this.isRectAreaLight = !0,
this.type = "RectAreaLight",
this.width = n,
this.height = r
}
get power() {
return this.intensity * this.width * this.height * Math.PI
}
set power(e) {
this.intensity = e / (this.width * this.height * Math.PI)
}
copy(e) {
return super.copy(e),
this.width = e.width,
this.height = e.height,
this
}
toJSON(e) {
const t = super.toJSON(e);
return t.object.width = this.width,
t.object.height = this.height,
t
}
}
class Of {
constructor() {
this.isSphericalHarmonics3 = !0,
this.coefficients = [];
for (let e = 0; e < 9; e++)
this.coefficients.push(new Qi)
}
set(e) {
for (let t = 0; t < 9; t++)
this.coefficients[t].copy(e[t]);
return this
}
zero() {
for (let e = 0; e < 9; e++)
this.coefficients[e].set(0, 0, 0);
return this
}
getAt(e, t) {
const n = e.x
, r = e.y
, i = e.z
, s = this.coefficients;
return t.copy(s[0]).multiplyScalar(.282095),
t.addScaledVector(s[1], .488603 * r),
t.addScaledVector(s[2], .488603 * i),
t.addScaledVector(s[3], .488603 * n),
t.addScaledVector(s[4], n * r * 1.092548),
t.addScaledVector(s[5], r * i * 1.092548),
t.addScaledVector(s[6], .315392 * (3 * i * i - 1)),
t.addScaledVector(s[7], n * i * 1.092548),
t.addScaledVector(s[8], .546274 * (n * n - r * r)),
t
}
getIrradianceAt(e, t) {
const n = e.x
, r = e.y
, i = e.z
, s = this.coefficients;
return t.copy(s[0]).multiplyScalar(.886227),
t.addScaledVector(s[1], 1.023328 * r),
t.addScaledVector(s[2], 1.023328 * i),
t.addScaledVector(s[3], 1.023328 * n),
t.addScaledVector(s[4], .858086 * n * r),
t.addScaledVector(s[5], .858086 * r * i),
t.addScaledVector(s[6], .743125 * i * i - .247708),
t.addScaledVector(s[7], .858086 * n * i),
t.addScaledVector(s[8], .429043 * (n * n - r * r)),
t
}
add(e) {
for (let t = 0; t < 9; t++)
this.coefficients[t].add(e.coefficients[t]);
return this
}
addScaledSH(e, t) {
for (let n = 0; n < 9; n++)
this.coefficients[n].addScaledVector(e.coefficients[n], t);
return this
}
scale(e) {
for (let t = 0; t < 9; t++)
this.coefficients[t].multiplyScalar(e);
return this
}
lerp(e, t) {
for (let n = 0; n < 9; n++)
this.coefficients[n].lerp(e.coefficients[n], t);
return this
}
equals(e) {
for (let t = 0; t < 9; t++)
if (!this.coefficients[t].equals(e.coefficients[t]))
return !1;
return !0
}
copy(e) {
return this.set(e.coefficients)
}
clone() {
return (new this.constructor).copy(this)
}
fromArray(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;
const n = this.coefficients;
for (let r = 0; r < 9; r++)
n[r].fromArray(e, t + 3 * r);
return this
}
toArray() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;
const n = this.coefficients;
for (let r = 0; r < 9; r++)
n[r].toArray(e, t + 3 * r);
return e
}
static getBasisAt(e, t) {
const n = e.x
, r = e.y
, i = e.z;
t[0] = .282095,
t[1] = .488603 * r,
t[2] = .488603 * i,
t[3] = .488603 * n,
t[4] = 1.092548 * n * r,
t[5] = 1.092548 * r * i,
t[6] = .315392 * (3 * i * i - 1),
t[7] = 1.092548 * n * i,
t[8] = .546274 * (n * n - r * r)
}
}
class Uf extends wf {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : new Of;
super(void 0, arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 1),
this.isLightProbe = !0,
this.sh = e
}
copy(e) {
return super.copy(e),
this.sh.copy(e.sh),
this
}
fromJSON(e) {
return this.intensity = e.intensity,
this.sh.fromArray(e.sh),
this
}
toJSON(e) {
const t = super.toJSON(e);
return t.object.sh = this.sh.toArray(),
t
}
}
class zf extends hf {
constructor(e) {
super(e),
this.textures = {}
}
load(e, t, n, r) {
const i = this
, s = new mf(i.manager);
s.setPath(i.path),
s.setRequestHeader(i.requestHeader),
s.setWithCredentials(i.withCredentials),
s.load(e, (function(n) {
try {
t(i.parse(JSON.parse(n)))
} catch (CB) {
r ? r(CB) : console.error(CB),
i.manager.itemError(e)
}
}
), n, r)
}
parse(e) {
const t = this.textures;
function n(e) {
return void 0 === t[e] && console.warn("THREE.MaterialLoader: Undefined texture", e),
t[e]
}
const r = zf.createMaterialFromType(e.type);
if (void 0 !== e.uuid && (r.uuid = e.uuid),
void 0 !== e.name && (r.name = e.name),
void 0 !== e.color && void 0 !== r.color && r.color.setHex(e.color),
void 0 !== e.roughness && (r.roughness = e.roughness),
void 0 !== e.metalness && (r.metalness = e.metalness),
void 0 !== e.sheen && (r.sheen = e.sheen),
void 0 !== e.sheenColor && (r.sheenColor = (new ga).setHex(e.sheenColor)),
void 0 !== e.sheenRoughness && (r.sheenRoughness = e.sheenRoughness),
void 0 !== e.emissive && void 0 !== r.emissive && r.emissive.setHex(e.emissive),
void 0 !== e.specular && void 0 !== r.specular && r.specular.setHex(e.specular),
void 0 !== e.specularIntensity && (r.specularIntensity = e.specularIntensity),
void 0 !== e.specularColor && void 0 !== r.specularColor && r.specularColor.setHex(e.specularColor),
void 0 !== e.shininess && (r.shininess = e.shininess),
void 0 !== e.clearcoat && (r.clearcoat = e.clearcoat),
void 0 !== e.clearcoatRoughness && (r.clearcoatRoughness = e.clearcoatRoughness),
void 0 !== e.dispersion && (r.dispersion = e.dispersion),
void 0 !== e.iridescence && (r.iridescence = e.iridescence),
void 0 !== e.iridescenceIOR && (r.iridescenceIOR = e.iridescenceIOR),
void 0 !== e.iridescenceThicknessRange && (r.iridescenceThicknessRange = e.iridescenceThicknessRange),
void 0 !== e.transmission && (r.transmission = e.transmission),
void 0 !== e.thickness && (r.thickness = e.thickness),
void 0 !== e.attenuationDistance && (r.attenuationDistance = e.attenuationDistance),
void 0 !== e.attenuationColor && void 0 !== r.attenuationColor && r.attenuationColor.setHex(e.attenuationColor),
void 0 !== e.anisotropy && (r.anisotropy = e.anisotropy),
void 0 !== e.anisotropyRotation && (r.anisotropyRotation = e.anisotropyRotation),
void 0 !== e.fog && (r.fog = e.fog),
void 0 !== e.flatShading && (r.flatShading = e.flatShading),
void 0 !== e.blending && (r.blending = e.blending),
void 0 !== e.combine && (r.combine = e.combine),
void 0 !== e.side && (r.side = e.side),
void 0 !== e.shadowSide && (r.shadowSide = e.shadowSide),
void 0 !== e.opacity && (r.opacity = e.opacity),
void 0 !== e.transparent && (r.transparent = e.transparent),
void 0 !== e.alphaTest && (r.alphaTest = e.alphaTest),
void 0 !== e.alphaHash && (r.alphaHash = e.alphaHash),
void 0 !== e.depthFunc && (r.depthFunc = e.depthFunc),
void 0 !== e.depthTest && (r.depthTest = e.depthTest),
void 0 !== e.depthWrite && (r.depthWrite = e.depthWrite),
void 0 !== e.colorWrite && (r.colorWrite = e.colorWrite),
void 0 !== e.blendSrc && (r.blendSrc = e.blendSrc),
void 0 !== e.blendDst && (r.blendDst = e.blendDst),
void 0 !== e.blendEquation && (r.blendEquation = e.blendEquation),
void 0 !== e.blendSrcAlpha && (r.blendSrcAlpha = e.blendSrcAlpha),
void 0 !== e.blendDstAlpha && (r.blendDstAlpha = e.blendDstAlpha),
void 0 !== e.blendEquationAlpha && (r.blendEquationAlpha = e.blendEquationAlpha),
void 0 !== e.blendColor && void 0 !== r.blendColor && r.blendColor.setHex(e.blendColor),
void 0 !== e.blendAlpha && (r.blendAlpha = e.blendAlpha),
void 0 !== e.stencilWriteMask && (r.stencilWriteMask = e.stencilWriteMask),
void 0 !== e.stencilFunc && (r.stencilFunc = e.stencilFunc),
void 0 !== e.stencilRef && (r.stencilRef = e.stencilRef),
void 0 !== e.stencilFuncMask && (r.stencilFuncMask = e.stencilFuncMask),
void 0 !== e.stencilFail && (r.stencilFail = e.stencilFail),
void 0 !== e.stencilZFail && (r.stencilZFail = e.stencilZFail),
void 0 !== e.stencilZPass && (r.stencilZPass = e.stencilZPass),
void 0 !== e.stencilWrite && (r.stencilWrite = e.stencilWrite),
void 0 !== e.wireframe && (r.wireframe = e.wireframe),
void 0 !== e.wireframeLinewidth && (r.wireframeLinewidth = e.wireframeLinewidth),
void 0 !== e.wireframeLinecap && (r.wireframeLinecap = e.wireframeLinecap),
void 0 !== e.wireframeLinejoin && (r.wireframeLinejoin = e.wireframeLinejoin),
void 0 !== e.rotation && (r.rotation = e.rotation),
void 0 !== e.linewidth && (r.linewidth = e.linewidth),
void 0 !== e.dashSize && (r.dashSize = e.dashSize),
void 0 !== e.gapSize && (r.gapSize = e.gapSize),
void 0 !== e.scale && (r.scale = e.scale),
void 0 !== e.polygonOffset && (r.polygonOffset = e.polygonOffset),
void 0 !== e.polygonOffsetFactor && (r.polygonOffsetFactor = e.polygonOffsetFactor),
void 0 !== e.polygonOffsetUnits && (r.polygonOffsetUnits = e.polygonOffsetUnits),
void 0 !== e.dithering && (r.dithering = e.dithering),
void 0 !== e.alphaToCoverage && (r.alphaToCoverage = e.alphaToCoverage),
void 0 !== e.premultipliedAlpha && (r.premultipliedAlpha = e.premultipliedAlpha),
void 0 !== e.forceSinglePass && (r.forceSinglePass = e.forceSinglePass),
void 0 !== e.visible && (r.visible = e.visible),
void 0 !== e.toneMapped && (r.toneMapped = e.toneMapped),
void 0 !== e.userData && (r.userData = e.userData),
void 0 !== e.vertexColors && ("number" === typeof e.vertexColors ? r.vertexColors = e.vertexColors > 0 : r.vertexColors = e.vertexColors),
void 0 !== e.uniforms)
for (const i in e.uniforms) {
const t = e.uniforms[i];
switch (r.uniforms[i] = {},
t.type) {
case "t":
r.uniforms[i].value = n(t.value);
break;
case "c":
r.uniforms[i].value = (new ga).setHex(t.value);
break;
case "v2":
r.uniforms[i].value = (new xi).fromArray(t.value);
break;
case "v3":
r.uniforms[i].value = (new Qi).fromArray(t.value);
break;
case "v4":
r.uniforms[i].value = (new Hi).fromArray(t.value);
break;
case "m3":
r.uniforms[i].value = (new bi).fromArray(t.value);
break;
case "m4":
r.uniforms[i].value = (new Es).fromArray(t.value);
break;
default:
r.uniforms[i].value = t.value
}
}
if (void 0 !== e.defines && (r.defines = e.defines),
void 0 !== e.vertexShader && (r.vertexShader = e.vertexShader),
void 0 !== e.fragmentShader && (r.fragmentShader = e.fragmentShader),
void 0 !== e.glslVersion && (r.glslVersion = e.glslVersion),
void 0 !== e.extensions)
for (const i in e.extensions)
r.extensions[i] = e.extensions[i];
if (void 0 !== e.lights && (r.lights = e.lights),
void 0 !== e.clipping && (r.clipping = e.clipping),
void 0 !== e.size && (r.size = e.size),
void 0 !== e.sizeAttenuation && (r.sizeAttenuation = e.sizeAttenuation),
void 0 !== e.map && (r.map = n(e.map)),
void 0 !== e.matcap && (r.matcap = n(e.matcap)),
void 0 !== e.alphaMap && (r.alphaMap = n(e.alphaMap)),
void 0 !== e.bumpMap && (r.bumpMap = n(e.bumpMap)),
void 0 !== e.bumpScale && (r.bumpScale = e.bumpScale),
void 0 !== e.normalMap && (r.normalMap = n(e.normalMap)),
void 0 !== e.normalMapType && (r.normalMapType = e.normalMapType),
void 0 !== e.normalScale) {
let t = e.normalScale;
!1 === Array.isArray(t) && (t = [t, t]),
r.normalScale = (new xi).fromArray(t)
}
return void 0 !== e.displacementMap && (r.displacementMap = n(e.displacementMap)),
void 0 !== e.displacementScale && (r.displacementScale = e.displacementScale),
void 0 !== e.displacementBias && (r.displacementBias = e.displacementBias),
void 0 !== e.roughnessMap && (r.roughnessMap = n(e.roughnessMap)),
void 0 !== e.metalnessMap && (r.metalnessMap = n(e.metalnessMap)),
void 0 !== e.emissiveMap && (r.emissiveMap = n(e.emissiveMap)),
void 0 !== e.emissiveIntensity && (r.emissiveIntensity = e.emissiveIntensity),
void 0 !== e.specularMap && (r.specularMap = n(e.specularMap)),
void 0 !== e.specularIntensityMap && (r.specularIntensityMap = n(e.specularIntensityMap)),
void 0 !== e.specularColorMap && (r.specularColorMap = n(e.specularColorMap)),
void 0 !== e.envMap && (r.envMap = n(e.envMap)),
void 0 !== e.envMapRotation && r.envMapRotation.fromArray(e.envMapRotation),
void 0 !== e.envMapIntensity && (r.envMapIntensity = e.envMapIntensity),
void 0 !== e.reflectivity && (r.reflectivity = e.reflectivity),
void 0 !== e.refractionRatio && (r.refractionRatio = e.refractionRatio),
void 0 !== e.lightMap && (r.lightMap = n(e.lightMap)),
void 0 !== e.lightMapIntensity && (r.lightMapIntensity = e.lightMapIntensity),
void 0 !== e.aoMap && (r.aoMap = n(e.aoMap)),
void 0 !== e.aoMapIntensity && (r.aoMapIntensity = e.aoMapIntensity),
void 0 !== e.gradientMap && (r.gradientMap = n(e.gradientMap)),
void 0 !== e.clearcoatMap && (r.clearcoatMap = n(e.clearcoatMap)),
void 0 !== e.clearcoatRoughnessMap && (r.clearcoatRoughnessMap = n(e.clearcoatRoughnessMap)),
void 0 !== e.clearcoatNormalMap && (r.clearcoatNormalMap = n(e.clearcoatNormalMap)),
void 0 !== e.clearcoatNormalScale && (r.clearcoatNormalScale = (new xi).fromArray(e.clearcoatNormalScale)),
void 0 !== e.iridescenceMap && (r.iridescenceMap = n(e.iridescenceMap)),
void 0 !== e.iridescenceThicknessMap && (r.iridescenceThicknessMap = n(e.iridescenceThicknessMap)),
void 0 !== e.transmissionMap && (r.transmissionMap = n(e.transmissionMap)),
void 0 !== e.thicknessMap && (r.thicknessMap = n(e.thicknessMap)),
void 0 !== e.anisotropyMap && (r.anisotropyMap = n(e.anisotropyMap)),
void 0 !== e.sheenColorMap && (r.sheenColorMap = n(e.sheenColorMap)),
void 0 !== e.sheenRoughnessMap && (r.sheenRoughnessMap = n(e.sheenRoughnessMap)),
r
}
setTextures(e) {
return this.textures = e,
this
}
static createMaterialFromType(e) {
return new {
ShadowMaterial: kp,
SpriteMaterial: Eu,
RawShaderMaterial: Lp,
ShaderMaterial: vo,
PointsMaterial: Yd,
MeshPhysicalMaterial: Np,
MeshStandardMaterial: Ip,
MeshPhongMaterial: Dp,
MeshToonMaterial: jp,
MeshNormalMaterial: Fp,
MeshLambertMaterial: Op,
MeshDepthMaterial: iu,
MeshDistanceMaterial: su,
MeshBasicMaterial: ba,
MeshMatcapMaterial: Up,
LineDashedMaterial: zp,
LineBasicMaterial: Dd,
Material: xa
}[e]
}
}
class Gf {
static decodeText(e) {
if (console.warn("THREE.LoaderUtils: decodeText() has been deprecated with r165 and will be removed with r175. Use TextDecoder instead."),
"undefined" !== typeof TextDecoder)
return (new TextDecoder).decode(e);
let t = "";
for (let n = 0, r = e.length; n < r; n++)
t += String.fromCharCode(e[n]);
try {
return decodeURIComponent(escape(t))
} catch (CB) {
return t
}
}
static extractUrlBase(e) {
const t = e.lastIndexOf("/");
return -1 === t ? "./" : e.slice(0, t + 1)
}
static resolveURL(e, t) {
return "string" !== typeof e || "" === e ? "" : (/^https?:\/\//i.test(t) && /^\//.test(e) && (t = t.replace(/(^https?:\/\/[^\/]+).*/i, "$1")),
/^(https?:)?\/\//i.test(e) || /^data:.*,.*$/i.test(e) || /^blob:.*$/i.test(e) ? e : t + e)
}
}
class Hf extends Wa {
constructor() {
super(),
this.isInstancedBufferGeometry = !0,
this.type = "InstancedBufferGeometry",
this.instanceCount = 1 / 0
}
copy(e) {
return super.copy(e),
this.instanceCount = e.instanceCount,
this
}
toJSON() {
const e = super.toJSON();
return e.instanceCount = this.instanceCount,
e.isInstancedBufferGeometry = !0,
e
}
}
class Vf extends hf {
constructor(e) {
super(e)
}
load(e, t, n, r) {
const i = this
, s = new mf(i.manager);
s.setPath(i.path),
s.setRequestHeader(i.requestHeader),
s.setWithCredentials(i.withCredentials),
s.load(e, (function(n) {
try {
t(i.parse(JSON.parse(n)))
} catch (CB) {
r ? r(CB) : console.error(CB),
i.manager.itemError(e)
}
}
), n, r)
}
parse(e) {
const t = {}
, n = {};
function r(e, r) {
if (void 0 !== t[r])
return t[r];
const i = e.interleavedBuffers[r]
, s = function(e, t) {
if (void 0 !== n[t])
return n[t];
const r = e.arrayBuffers
, i = r[t]
, s = new Uint32Array(i).buffer;
return n[t] = s,
s
}(e, i.buffer)
, a = Ai(i.type, s)
, o = new Au(a,i.stride);
return o.uuid = i.uuid,
t[r] = o,
o
}
const i = e.isInstancedBufferGeometry ? new Hf : new Wa
, s = e.data.index;
if (void 0 !== s) {
const e = Ai(s.type, s.array);
i.setIndex(new Ta(e,1))
}
const a = e.data.attributes;
for (const u in a) {
const t = a[u];
let n;
if (t.isInterleavedBufferAttribute) {
const i = r(e.data, t.data);
n = new Cu(i,t.itemSize,t.offset,t.normalized)
} else {
const e = Ai(t.type, t.array);
n = new (t.isInstancedBufferAttribute ? od : Ta)(e,t.itemSize,t.normalized)
}
void 0 !== t.name && (n.name = t.name),
void 0 !== t.usage && n.setUsage(t.usage),
i.setAttribute(u, n)
}
const o = e.data.morphAttributes;
if (o)
for (const u in o) {
const t = o[u]
, n = [];
for (let i = 0, s = t.length; i < s; i++) {
const s = t[i];
let a;
if (s.isInterleavedBufferAttribute) {
const t = r(e.data, s.data);
a = new Cu(t,s.itemSize,s.offset,s.normalized)
} else {
const e = Ai(s.type, s.array);
a = new Ta(e,s.itemSize,s.normalized)
}
void 0 !== s.name && (a.name = s.name),
n.push(a)
}
i.morphAttributes[u] = n
}
e.data.morphTargetsRelative && (i.morphTargetsRelative = !0);
const l = e.data.groups || e.data.drawcalls || e.data.offsets;
if (void 0 !== l)
for (let u = 0, d = l.length; u !== d; ++u) {
const e = l[u];
i.addGroup(e.start, e.count, e.materialIndex)
}
const c = e.data.boundingSphere;
if (void 0 !== c) {
const e = new Qi;
void 0 !== c.center && e.fromArray(c.center),
i.boundingSphere = new ys(e,c.radius)
}
return e.name && (i.name = e.name),
e.userData && (i.userData = e.userData),
i
}
}
class Wf extends hf {
constructor(e) {
super(e)
}
load(e, t, n, r) {
const i = this
, s = "" === this.path ? Gf.extractUrlBase(e) : this.path;
this.resourcePath = this.resourcePath || s;
const a = new mf(this.manager);
a.setPath(this.path),
a.setRequestHeader(this.requestHeader),
a.setWithCredentials(this.withCredentials),
a.load(e, (function(n) {
let s = null;
try {
s = JSON.parse(n)
} catch (iy) {
return void 0 !== r && r(iy),
void console.error("THREE:ObjectLoader: Can't parse " + e + ".", iy.message)
}
const a = s.metadata;
if (void 0 === a || void 0 === a.type || "geometry" === a.type.toLowerCase())
return void 0 !== r && r(new Error("THREE.ObjectLoader: Can't load " + e)),
void console.error("THREE.ObjectLoader: Can't load " + e);
i.parse(s, t)
}
), n, r)
}
async loadAsync(e, t) {
const n = "" === this.path ? Gf.extractUrlBase(e) : this.path;
this.resourcePath = this.resourcePath || n;
const r = new mf(this.manager);
r.setPath(this.path),
r.setRequestHeader(this.requestHeader),
r.setWithCredentials(this.withCredentials);
const i = await r.loadAsync(e, t)
, s = JSON.parse(i)
, a = s.metadata;
if (void 0 === a || void 0 === a.type || "geometry" === a.type.toLowerCase())
throw new Error("THREE.ObjectLoader: Can't load " + e);
return await this.parseAsync(s)
}
parse(e, t) {
const n = this.parseAnimations(e.animations)
, r = this.parseShapes(e.shapes)
, i = this.parseGeometries(e.geometries, r)
, s = this.parseImages(e.images, (function() {
void 0 !== t && t(l)
}
))
, a = this.parseTextures(e.textures, s)
, o = this.parseMaterials(e.materials, a)
, l = this.parseObject(e.object, i, o, a, n)
, c = this.parseSkeletons(e.skeletons, l);
if (this.bindSkeletons(l, c),
void 0 !== t) {
let e = !1;
for (const t in s)
if (s[t].data instanceof HTMLImageElement) {
e = !0;
break
}
!1 === e && t(l)
}
return l
}
async parseAsync(e) {
const t = this.parseAnimations(e.animations)
, n = this.parseShapes(e.shapes)
, r = this.parseGeometries(e.geometries, n)
, i = await this.parseImagesAsync(e.images)
, s = this.parseTextures(e.textures, i)
, a = this.parseMaterials(e.materials, s)
, o = this.parseObject(e.object, r, a, s, t)
, l = this.parseSkeletons(e.skeletons, o);
return this.bindSkeletons(o, l),
o
}
parseShapes(e) {
const t = {};
if (void 0 !== e)
for (let n = 0, r = e.length; n < r; n++) {
const r = (new Hh).fromJSON(e[n]);
t[r.uuid] = r
}
return t
}
parseSkeletons(e, t) {
const n = {}
, r = {};
if (t.traverse((function(e) {
e.isBone && (r[e.uuid] = e)
}
)),
void 0 !== e)
for (let i = 0, s = e.length; i < s; i++) {
const t = (new ad).fromJSON(e[i], r);
n[t.uuid] = t
}
return n
}
parseGeometries(e, t) {
const n = {};
if (void 0 !== e) {
const r = new Vf;
for (let i = 0, s = e.length; i < s; i++) {
let s;
const a = e[i];
switch (a.type) {
case "BufferGeometry":
case "InstancedBufferGeometry":
s = r.parse(a);
break;
default:
a.type in Pp ? s = Pp[a.type].fromJSON(a, t) : console.warn('THREE.ObjectLoader: Unsupported geometry type "'.concat(a.type, '"'))
}
s.uuid = a.uuid,
void 0 !== a.name && (s.name = a.name),
void 0 !== a.userData && (s.userData = a.userData),
n[a.uuid] = s
}
}
return n
}
parseMaterials(e, t) {
const n = {}
, r = {};
if (void 0 !== e) {
const i = new zf;
i.setTextures(t);
for (let t = 0, s = e.length; t < s; t++) {
const s = e[t];
void 0 === n[s.uuid] && (n[s.uuid] = i.parse(s)),
r[s.uuid] = n[s.uuid]
}
}
return r
}
parseAnimations(e) {
const t = {};
if (void 0 !== e)
for (let n = 0; n < e.length; n++) {
const r = e[n]
, i = of.parse(r);
t[i.uuid] = i
}
return t
}
parseImages(e, t) {
const n = this
, r = {};
let i;
function s(e) {
if ("string" === typeof e) {
const t = e;
return function(e) {
return n.manager.itemStart(e),
i.load(e, (function() {
n.manager.itemEnd(e)
}
), void 0, (function() {
n.manager.itemError(e),
n.manager.itemEnd(e)
}
))
}(/^(\/\/)|([a-z]+:(\/\/)?)/i.test(t) ? t : n.resourcePath + t)
}
return e.data ? {
data: Ai(e.type, e.data),
width: e.width,
height: e.height
} : null
}
if (void 0 !== e && e.length > 0) {
const n = new uf(t);
i = new yf(n),
i.setCrossOrigin(this.crossOrigin);
for (let t = 0, i = e.length; t < i; t++) {
const n = e[t]
, i = n.url;
if (Array.isArray(i)) {
const e = [];
for (let t = 0, n = i.length; t < n; t++) {
const n = s(i[t]);
null !== n && (n instanceof HTMLImageElement ? e.push(n) : e.push(new rd(n.data,n.width,n.height)))
}
r[n.uuid] = new Oi(e)
} else {
const e = s(n.url);
r[n.uuid] = new Oi(e)
}
}
}
return r
}
async parseImagesAsync(e) {
const t = this
, n = {};
let r;
async function i(e) {
if ("string" === typeof e) {
const n = e
, i = /^(\/\/)|([a-z]+:(\/\/)?)/i.test(n) ? n : t.resourcePath + n;
return await r.loadAsync(i)
}
return e.data ? {
data: Ai(e.type, e.data),
width: e.width,
height: e.height
} : null
}
if (void 0 !== e && e.length > 0) {
r = new yf(this.manager),
r.setCrossOrigin(this.crossOrigin);
for (let t = 0, r = e.length; t < r; t++) {
const r = e[t]
, s = r.url;
if (Array.isArray(s)) {
const e = [];
for (let t = 0, n = s.length; t < n; t++) {
const n = s[t]
, r = await i(n);
null !== r && (r instanceof HTMLImageElement ? e.push(r) : e.push(new rd(r.data,r.width,r.height)))
}
n[r.uuid] = new Oi(e)
} else {
const e = await i(r.url);
n[r.uuid] = new Oi(e)
}
}
}
return n
}
parseTextures(e, t) {
function n(e, t) {
return "number" === typeof e ? e : (console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.", e),
t[e])
}
const r = {};
if (void 0 !== e)
for (let i = 0, s = e.length; i < s; i++) {
const s = e[i];
void 0 === s.image && console.warn('THREE.ObjectLoader: No "image" specified for', s.uuid),
void 0 === t[s.image] && console.warn("THREE.ObjectLoader: Undefined image", s.image);
const a = t[s.image]
, o = a.data;
let l;
Array.isArray(o) ? (l = new Mo,
6 === o.length && (l.needsUpdate = !0)) : (l = o && o.data ? new rd : new Gi,
o && (l.needsUpdate = !0)),
l.source = a,
l.uuid = s.uuid,
void 0 !== s.name && (l.name = s.name),
void 0 !== s.mapping && (l.mapping = n(s.mapping, Jf)),
void 0 !== s.channel && (l.channel = s.channel),
void 0 !== s.offset && l.offset.fromArray(s.offset),
void 0 !== s.repeat && l.repeat.fromArray(s.repeat),
void 0 !== s.center && l.center.fromArray(s.center),
void 0 !== s.rotation && (l.rotation = s.rotation),
void 0 !== s.wrap && (l.wrapS = n(s.wrap[0], Xf),
l.wrapT = n(s.wrap[1], Xf)),
void 0 !== s.format && (l.format = s.format),
void 0 !== s.internalFormat && (l.internalFormat = s.internalFormat),
void 0 !== s.type && (l.type = s.type),
void 0 !== s.colorSpace && (l.colorSpace = s.colorSpace),
void 0 !== s.minFilter && (l.minFilter = n(s.minFilter, Kf)),
void 0 !== s.magFilter && (l.magFilter = n(s.magFilter, Kf)),
void 0 !== s.anisotropy && (l.anisotropy = s.anisotropy),
void 0 !== s.flipY && (l.flipY = s.flipY),
void 0 !== s.generateMipmaps && (l.generateMipmaps = s.generateMipmaps),
void 0 !== s.premultiplyAlpha && (l.premultiplyAlpha = s.premultiplyAlpha),
void 0 !== s.unpackAlignment && (l.unpackAlignment = s.unpackAlignment),
void 0 !== s.compareFunction && (l.compareFunction = s.compareFunction),
void 0 !== s.userData && (l.userData = s.userData),
r[s.uuid] = l
}
return r
}
parseObject(e, t, n, r, i) {
let s, a, o;
function l(e) {
return void 0 === t[e] && console.warn("THREE.ObjectLoader: Undefined geometry", e),
t[e]
}
function c(e) {
if (void 0 !== e) {
if (Array.isArray(e)) {
const t = [];
for (let r = 0, i = e.length; r < i; r++) {
const i = e[r];
void 0 === n[i] && console.warn("THREE.ObjectLoader: Undefined material", i),
t.push(n[i])
}
return t
}
return void 0 === n[e] && console.warn("THREE.ObjectLoader: Undefined material", e),
n[e]
}
}
function u(e) {
return void 0 === r[e] && console.warn("THREE.ObjectLoader: Undefined texture", e),
r[e]
}
switch (e.type) {
case "Scene":
s = new Su,
void 0 !== e.background && (Number.isInteger(e.background) ? s.background = new ga(e.background) : s.background = u(e.background)),
void 0 !== e.environment && (s.environment = u(e.environment)),
void 0 !== e.fog && ("Fog" === e.fog.type ? s.fog = new wu(e.fog.color,e.fog.near,e.fog.far) : "FogExp2" === e.fog.type && (s.fog = new _u(e.fog.color,e.fog.density)),
"" !== e.fog.name && (s.fog.name = e.fog.name)),
void 0 !== e.backgroundBlurriness && (s.backgroundBlurriness = e.backgroundBlurriness),
void 0 !== e.backgroundIntensity && (s.backgroundIntensity = e.backgroundIntensity),
void 0 !== e.backgroundRotation && s.backgroundRotation.fromArray(e.backgroundRotation),
void 0 !== e.environmentIntensity && (s.environmentIntensity = e.environmentIntensity),
void 0 !== e.environmentRotation && s.environmentRotation.fromArray(e.environmentRotation);
break;
case "PerspectiveCamera":
s = new wo(e.fov,e.aspect,e.near,e.far),
void 0 !== e.focus && (s.focus = e.focus),
void 0 !== e.zoom && (s.zoom = e.zoom),
void 0 !== e.filmGauge && (s.filmGauge = e.filmGauge),
void 0 !== e.filmOffset && (s.filmOffset = e.filmOffset),
void 0 !== e.view && (s.view = Object.assign({}, e.view));
break;
case "OrthographicCamera":
s = new qo(e.left,e.right,e.top,e.bottom,e.near,e.far),
void 0 !== e.zoom && (s.zoom = e.zoom),
void 0 !== e.view && (s.view = Object.assign({}, e.view));
break;
case "AmbientLight":
s = new jf(e.color,e.intensity);
break;
case "DirectionalLight":
s = new Df(e.color,e.intensity);
break;
case "PointLight":
s = new If(e.color,e.intensity,e.distance,e.decay);
break;
case "RectAreaLight":
s = new Ff(e.color,e.intensity,e.width,e.height);
break;
case "SpotLight":
s = new Rf(e.color,e.intensity,e.distance,e.angle,e.penumbra,e.decay);
break;
case "HemisphereLight":
s = new Sf(e.color,e.groundColor,e.intensity);
break;
case "LightProbe":
s = (new Uf).fromJSON(e);
break;
case "SkinnedMesh":
a = l(e.geometry),
o = c(e.material),
s = new td(a,o),
void 0 !== e.bindMode && (s.bindMode = e.bindMode),
void 0 !== e.bindMatrix && s.bindMatrix.fromArray(e.bindMatrix),
void 0 !== e.skeleton && (s.skeleton = e.skeleton);
break;
case "Mesh":
a = l(e.geometry),
o = c(e.material),
s = new co(a,o);
break;
case "InstancedMesh":
a = l(e.geometry),
o = c(e.material);
const t = e.count
, n = e.instanceMatrix
, r = e.instanceColor;
s = new md(a,o,t),
s.instanceMatrix = new od(new Float32Array(n.array),16),
void 0 !== r && (s.instanceColor = new od(new Float32Array(r.array),r.itemSize));
break;
case "BatchedMesh":
a = l(e.geometry),
o = c(e.material),
s = new Nd(e.maxGeometryCount,e.maxVertexCount,e.maxIndexCount,o),
s.geometry = a,
s.perObjectFrustumCulled = e.perObjectFrustumCulled,
s.sortObjects = e.sortObjects,
s._drawRanges = e.drawRanges,
s._reservedRanges = e.reservedRanges,
s._visibility = e.visibility,
s._active = e.active,
s._bounds = e.bounds.map((e => {
const t = new es;
t.min.fromArray(e.boxMin),
t.max.fromArray(e.boxMax);
const n = new ys;
return n.radius = e.sphereRadius,
n.center.fromArray(e.sphereCenter),
{
boxInitialized: e.boxInitialized,
box: t,
sphereInitialized: e.sphereInitialized,
sphere: n
}
}
)),
s._maxGeometryCount = e.maxGeometryCount,
s._maxVertexCount = e.maxVertexCount,
s._maxIndexCount = e.maxIndexCount,
s._geometryInitialized = e.geometryInitialized,
s._geometryCount = e.geometryCount,
s._matricesTexture = u(e.matricesTexture.uuid),
void 0 !== e.colorsTexture && (s._colorsTexture = u(e.colorsTexture.uuid));
break;
case "LOD":
s = new Wu;
break;
case "Line":
s = new Vd(l(e.geometry),c(e.material));
break;
case "LineLoop":
s = new qd(l(e.geometry),c(e.material));
break;
case "LineSegments":
s = new Kd(l(e.geometry),c(e.material));
break;
case "PointCloud":
case "Points":
s = new th(l(e.geometry),c(e.material));
break;
case "Sprite":
s = new zu(c(e.material));
break;
case "Group":
s = new du;
break;
case "Bone":
s = new nd;
break;
default:
s = new ea
}
if (s.uuid = e.uuid,
void 0 !== e.name && (s.name = e.name),
void 0 !== e.matrix ? (s.matrix.fromArray(e.matrix),
void 0 !== e.matrixAutoUpdate && (s.matrixAutoUpdate = e.matrixAutoUpdate),
s.matrixAutoUpdate && s.matrix.decompose(s.position, s.quaternion, s.scale)) : (void 0 !== e.position && s.position.fromArray(e.position),
void 0 !== e.rotation && s.rotation.fromArray(e.rotation),
void 0 !== e.quaternion && s.quaternion.fromArray(e.quaternion),
void 0 !== e.scale && s.scale.fromArray(e.scale)),
void 0 !== e.up && s.up.fromArray(e.up),
void 0 !== e.castShadow && (s.castShadow = e.castShadow),
void 0 !== e.receiveShadow && (s.receiveShadow = e.receiveShadow),
e.shadow && (void 0 !== e.shadow.bias && (s.shadow.bias = e.shadow.bias),
void 0 !== e.shadow.normalBias && (s.shadow.normalBias = e.shadow.normalBias),
void 0 !== e.shadow.radius && (s.shadow.radius = e.shadow.radius),
void 0 !== e.shadow.mapSize && s.shadow.mapSize.fromArray(e.shadow.mapSize),
void 0 !== e.shadow.camera && (s.shadow.camera = this.parseObject(e.shadow.camera))),
void 0 !== e.visible && (s.visible = e.visible),
void 0 !== e.frustumCulled && (s.frustumCulled = e.frustumCulled),
void 0 !== e.renderOrder && (s.renderOrder = e.renderOrder),
void 0 !== e.userData && (s.userData = e.userData),
void 0 !== e.layers && (s.layers.mask = e.layers),
void 0 !== e.children) {
const a = e.children;
for (let e = 0; e < a.length; e++)
s.add(this.parseObject(a[e], t, n, r, i))
}
if (void 0 !== e.animations) {
const t = e.animations;
for (let e = 0; e < t.length; e++) {
const n = t[e];
s.animations.push(i[n])
}
}
if ("LOD" === e.type) {
void 0 !== e.autoUpdate && (s.autoUpdate = e.autoUpdate);
const t = e.levels;
for (let e = 0; e < t.length; e++) {
const n = t[e]
, r = s.getObjectByProperty("uuid", n.object);
void 0 !== r && s.addLevel(r, n.distance, n.hysteresis)
}
}
return s
}
bindSkeletons(e, t) {
0 !== Object.keys(t).length && e.traverse((function(e) {
if (!0 === e.isSkinnedMesh && void 0 !== e.skeleton) {
const n = t[e.skeleton];
void 0 === n ? console.warn("THREE.ObjectLoader: No skeleton found with UUID:", e.skeleton) : e.bind(n, e.bindMatrix)
}
}
))
}
}
const Jf = {
UVMapping: Rt,
CubeReflectionMapping: Bt,
CubeRefractionMapping: Pt,
EquirectangularReflectionMapping: kt,
EquirectangularRefractionMapping: Lt,
CubeUVReflectionMapping: It
}
, Xf = {
RepeatWrapping: Nt,
ClampToEdgeWrapping: Dt,
MirroredRepeatWrapping: jt
}
, Kf = {
NearestFilter: Ft,
NearestMipmapNearestFilter: Ot,
NearestMipmapLinearFilter: zt,
LinearFilter: Ht,
LinearMipmapNearestFilter: Vt,
LinearMipmapLinearFilter: Jt
};
class qf extends hf {
constructor(e) {
super(e),
this.isImageBitmapLoader = !0,
"undefined" === typeof createImageBitmap && console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),
"undefined" === typeof fetch && console.warn("THREE.ImageBitmapLoader: fetch() not supported."),
this.options = {
premultiplyAlpha: "none"
}
}
setOptions(e) {
return this.options = e,
this
}
load(e, t, n, r) {
void 0 === e && (e = ""),
void 0 !== this.path && (e = this.path + e),
e = this.manager.resolveURL(e);
const i = this
, s = cf.get(e);
if (void 0 !== s)
return i.manager.itemStart(e),
s.then ? void s.then((n => {
t && t(n),
i.manager.itemEnd(e)
}
)).catch((e => {
r && r(e)
}
)) : (setTimeout((function() {
t && t(s),
i.manager.itemEnd(e)
}
), 0),
s);
const a = {};
a.credentials = "anonymous" === this.crossOrigin ? "same-origin" : "include",
a.headers = this.requestHeader;
const o = fetch(e, a).then((function(e) {
return e.blob()
}
)).then((function(e) {
return createImageBitmap(e, Object.assign(i.options, {
colorSpaceConversion: "none"
}))
}
)).then((function(n) {
return cf.add(e, n),
t && t(n),
i.manager.itemEnd(e),
n
}
)).catch((function(t) {
r && r(t),
cf.remove(e),
i.manager.itemError(e),
i.manager.itemEnd(e)
}
));
cf.add(e, o),
i.manager.itemStart(e)
}
}
let Yf;
class Qf {
static getContext() {
return void 0 === Yf && (Yf = new (window.AudioContext || window.webkitAudioContext)),
Yf
}
static setContext(e) {
Yf = e
}
}
class Zf extends hf {
constructor(e) {
super(e)
}
load(e, t, n, r) {
const i = this
, s = new mf(this.manager);
function a(t) {
r ? r(t) : console.error(t),
i.manager.itemError(e)
}
s.setResponseType("arraybuffer"),
s.setPath(this.path),
s.setRequestHeader(this.requestHeader),
s.setWithCredentials(this.withCredentials),
s.load(e, (function(e) {
try {
const n = e.slice(0);
Qf.getContext().decodeAudioData(n, (function(e) {
t(e)
}
)).catch(a)
} catch (CB) {
a(CB)
}
}
), n, r)
}
}
const $f = new Es
, em = new Es
, tm = new Es;
class nm {
constructor() {
this.type = "StereoCamera",
this.aspect = 1,
this.eyeSep = .064,
this.cameraL = new wo,
this.cameraL.layers.enable(1),
this.cameraL.matrixAutoUpdate = !1,
this.cameraR = new wo,
this.cameraR.layers.enable(2),
this.cameraR.matrixAutoUpdate = !1,
this._cache = {
focus: null,
fov: null,
aspect: null,
near: null,
far: null,
zoom: null,
eyeSep: null
}
}
update(e) {
const t = this._cache;
if (t.focus !== e.focus || t.fov !== e.fov || t.aspect !== e.aspect * this.aspect || t.near !== e.near || t.far !== e.far || t.zoom !== e.zoom || t.eyeSep !== this.eyeSep) {
t.focus = e.focus,
t.fov = e.fov,
t.aspect = e.aspect * this.aspect,
t.near = e.near,
t.far = e.far,
t.zoom = e.zoom,
t.eyeSep = this.eyeSep,
tm.copy(e.projectionMatrix);
const n = t.eyeSep / 2
, r = n * t.near / t.focus
, i = t.near * Math.tan(ui * t.fov * .5) / t.zoom;
let s, a;
em.elements[12] = -n,
$f.elements[12] = n,
s = -i * t.aspect + r,
a = i * t.aspect + r,
tm.elements[0] = 2 * t.near / (a - s),
tm.elements[8] = (a + s) / (a - s),
this.cameraL.projectionMatrix.copy(tm),
s = -i * t.aspect - r,
a = i * t.aspect - r,
tm.elements[0] = 2 * t.near / (a - s),
tm.elements[8] = (a + s) / (a - s),
this.cameraR.projectionMatrix.copy(tm)
}
this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(em),
this.cameraR.matrixWorld.copy(e.matrixWorld).multiply($f)
}
}
class rm {
constructor() {
let e = !(arguments.length > 0 && void 0 !== arguments[0]) || arguments[0];
this.autoStart = e,
this.startTime = 0,
this.oldTime = 0,
this.elapsedTime = 0,
this.running = !1
}
start() {
this.startTime = im(),
this.oldTime = this.startTime,
this.elapsedTime = 0,
this.running = !0
}
stop() {
this.getElapsedTime(),
this.running = !1,
this.autoStart = !1
}
getElapsedTime() {
return this.getDelta(),
this.elapsedTime
}
getDelta() {
let e = 0;
if (this.autoStart && !this.running)
return this.start(),
0;
if (this.running) {
const t = im();
e = (t - this.oldTime) / 1e3,
this.oldTime = t,
this.elapsedTime += e
}
return e
}
}
function im() {
return ("undefined" === typeof performance ? Date : performance).now()
}
const sm = new Qi
, am = new Yi
, om = new Qi
, lm = new Qi;
class cm extends ea {
constructor() {
super(),
this.type = "AudioListener",
this.context = Qf.getContext(),
this.gain = this.context.createGain(),
this.gain.connect(this.context.destination),
this.filter = null,
this.timeDelta = 0,
this._clock = new rm
}
getInput() {
return this.gain
}
removeFilter() {
return null !== this.filter && (this.gain.disconnect(this.filter),
this.filter.disconnect(this.context.destination),
this.gain.connect(this.context.destination),
this.filter = null),
this
}
getFilter() {
return this.filter
}
setFilter(e) {
return null !== this.filter ? (this.gain.disconnect(this.filter),
this.filter.disconnect(this.context.destination)) : this.gain.disconnect(this.context.destination),
this.filter = e,
this.gain.connect(this.filter),
this.filter.connect(this.context.destination),
this
}
getMasterVolume() {
return this.gain.gain.value
}
setMasterVolume(e) {
return this.gain.gain.setTargetAtTime(e, this.context.currentTime, .01),
this
}
updateMatrixWorld(e) {
super.updateMatrixWorld(e);
const t = this.context.listener
, n = this.up;
if (this.timeDelta = this._clock.getDelta(),
this.matrixWorld.decompose(sm, am, om),
lm.set(0, 0, -1).applyQuaternion(am),
t.positionX) {
const e = this.context.currentTime + this.timeDelta;
t.positionX.linearRampToValueAtTime(sm.x, e),
t.positionY.linearRampToValueAtTime(sm.y, e),
t.positionZ.linearRampToValueAtTime(sm.z, e),
t.forwardX.linearRampToValueAtTime(lm.x, e),
t.forwardY.linearRampToValueAtTime(lm.y, e),
t.forwardZ.linearRampToValueAtTime(lm.z, e),
t.upX.linearRampToValueAtTime(n.x, e),
t.upY.linearRampToValueAtTime(n.y, e),
t.upZ.linearRampToValueAtTime(n.z, e)
} else
t.setPosition(sm.x, sm.y, sm.z),
t.setOrientation(lm.x, lm.y, lm.z, n.x, n.y, n.z)
}
}
class um extends ea {
constructor(e) {
super(),
this.type = "Audio",
this.listener = e,
this.context = e.context,
this.gain = this.context.createGain(),
this.gain.connect(e.getInput()),
this.autoplay = !1,
this.buffer = null,
this.detune = 0,
this.loop = !1,
this.loopStart = 0,
this.loopEnd = 0,
this.offset = 0,
this.duration = void 0,
this.playbackRate = 1,
this.isPlaying = !1,
this.hasPlaybackControl = !0,
this.source = null,
this.sourceType = "empty",
this._startedAt = 0,
this._progress = 0,
this._connected = !1,
this.filters = []
}
getOutput() {
return this.gain
}
setNodeSource(e) {
return this.hasPlaybackControl = !1,
this.sourceType = "audioNode",
this.source = e,
this.connect(),
this
}
setMediaElementSource(e) {
return this.hasPlaybackControl = !1,
this.sourceType = "mediaNode",
this.source = this.context.createMediaElementSource(e),
this.connect(),
this
}
setMediaStreamSource(e) {
return this.hasPlaybackControl = !1,
this.sourceType = "mediaStreamNode",
this.source = this.context.createMediaStreamSource(e),
this.connect(),
this
}
setBuffer(e) {
return this.buffer = e,
this.sourceType = "buffer",
this.autoplay && this.play(),
this
}
play() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0;
if (!0 === this.isPlaying)
return void console.warn("THREE.Audio: Audio is already playing.");
if (!1 === this.hasPlaybackControl)
return void console.warn("THREE.Audio: this Audio has no playback control.");
this._startedAt = this.context.currentTime + e;
const t = this.context.createBufferSource();
return t.buffer = this.buffer,
t.loop = this.loop,
t.loopStart = this.loopStart,
t.loopEnd = this.loopEnd,
t.onended = this.onEnded.bind(this),
t.start(this._startedAt, this._progress + this.offset, this.duration),
this.isPlaying = !0,
this.source = t,
this.setDetune(this.detune),
this.setPlaybackRate(this.playbackRate),
this.connect()
}
pause() {
if (!1 !== this.hasPlaybackControl)
return !0 === this.isPlaying && (this._progress += Math.max(this.context.currentTime - this._startedAt, 0) * this.playbackRate,
!0 === this.loop && (this._progress = this._progress % (this.duration || this.buffer.duration)),
this.source.stop(),
this.source.onended = null,
this.isPlaying = !1),
this;
console.warn("THREE.Audio: this Audio has no playback control.")
}
stop() {
if (!1 !== this.hasPlaybackControl)
return this._progress = 0,
null !== this.source && (this.source.stop(),
this.source.onended = null),
this.isPlaying = !1,
this;
console.warn("THREE.Audio: this Audio has no playback control.")
}
connect() {
if (this.filters.length > 0) {
this.source.connect(this.filters[0]);
for (let e = 1, t = this.filters.length; e < t; e++)
this.filters[e - 1].connect(this.filters[e]);
this.filters[this.filters.length - 1].connect(this.getOutput())
} else
this.source.connect(this.getOutput());
return this._connected = !0,
this
}
disconnect() {
if (!1 !== this._connected) {
if (this.filters.length > 0) {
this.source.disconnect(this.filters[0]);
for (let e = 1, t = this.filters.length; e < t; e++)
this.filters[e - 1].disconnect(this.filters[e]);
this.filters[this.filters.length - 1].disconnect(this.getOutput())
} else
this.source.disconnect(this.getOutput());
return this._connected = !1,
this
}
}
getFilters() {
return this.filters
}
setFilters(e) {
return e || (e = []),
!0 === this._connected ? (this.disconnect(),
this.filters = e.slice(),
this.connect()) : this.filters = e.slice(),
this
}
setDetune(e) {
return this.detune = e,
!0 === this.isPlaying && void 0 !== this.source.detune && this.source.detune.setTargetAtTime(this.detune, this.context.currentTime, .01),
this
}
getDetune() {
return this.detune
}
getFilter() {
return this.getFilters()[0]
}
setFilter(e) {
return this.setFilters(e ? [e] : [])
}
setPlaybackRate(e) {
if (!1 !== this.hasPlaybackControl)
return this.playbackRate = e,
!0 === this.isPlaying && this.source.playbackRate.setTargetAtTime(this.playbackRate, this.context.currentTime, .01),
this;
console.warn("THREE.Audio: this Audio has no playback control.")
}
getPlaybackRate() {
return this.playbackRate
}
onEnded() {
this.isPlaying = !1
}
getLoop() {
return !1 === this.hasPlaybackControl ? (console.warn("THREE.Audio: this Audio has no playback control."),
!1) : this.loop
}
setLoop(e) {
if (!1 !== this.hasPlaybackControl)
return this.loop = e,
!0 === this.isPlaying && (this.source.loop = this.loop),
this;
console.warn("THREE.Audio: this Audio has no playback control.")
}
setLoopStart(e) {
return this.loopStart = e,
this
}
setLoopEnd(e) {
return this.loopEnd = e,
this
}
getVolume() {
return this.gain.gain.value
}
setVolume(e) {
return this.gain.gain.setTargetAtTime(e, this.context.currentTime, .01),
this
}
}
const dm = new Qi
, hm = new Yi
, pm = new Qi
, fm = new Qi;
class mm extends um {
constructor(e) {
super(e),
this.panner = this.context.createPanner(),
this.panner.panningModel = "HRTF",
this.panner.connect(this.gain)
}
connect() {
super.connect(),
this.panner.connect(this.gain)
}
disconnect() {
super.disconnect(),
this.panner.disconnect(this.gain)
}
getOutput() {
return this.panner
}
getRefDistance() {
return this.panner.refDistance
}
setRefDistance(e) {
return this.panner.refDistance = e,
this
}
getRolloffFactor() {
return this.panner.rolloffFactor
}
setRolloffFactor(e) {
return this.panner.rolloffFactor = e,
this
}
getDistanceModel() {
return this.panner.distanceModel
}
setDistanceModel(e) {
return this.panner.distanceModel = e,
this
}
getMaxDistance() {
return this.panner.maxDistance
}
setMaxDistance(e) {
return this.panner.maxDistance = e,
this
}
setDirectionalCone(e, t, n) {
return this.panner.coneInnerAngle = e,
this.panner.coneOuterAngle = t,
this.panner.coneOuterGain = n,
this
}
updateMatrixWorld(e) {
if (super.updateMatrixWorld(e),
!0 === this.hasPlaybackControl && !1 === this.isPlaying)
return;
this.matrixWorld.decompose(dm, hm, pm),
fm.set(0, 0, 1).applyQuaternion(hm);
const t = this.panner;
if (t.positionX) {
const e = this.context.currentTime + this.listener.timeDelta;
t.positionX.linearRampToValueAtTime(dm.x, e),
t.positionY.linearRampToValueAtTime(dm.y, e),
t.positionZ.linearRampToValueAtTime(dm.z, e),
t.orientationX.linearRampToValueAtTime(fm.x, e),
t.orientationY.linearRampToValueAtTime(fm.y, e),
t.orientationZ.linearRampToValueAtTime(fm.z, e)
} else
t.setPosition(dm.x, dm.y, dm.z),
t.setOrientation(fm.x, fm.y, fm.z)
}
}
class gm {
constructor(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 2048;
this.analyser = e.context.createAnalyser(),
this.analyser.fftSize = t,
this.data = new Uint8Array(this.analyser.frequencyBinCount),
e.getOutput().connect(this.analyser)
}
getFrequencyData() {
return this.analyser.getByteFrequencyData(this.data),
this.data
}
getAverageFrequency() {
let e = 0;
const t = this.getFrequencyData();
for (let n = 0; n < t.length; n++)
e += t[n];
return e / t.length
}
}
class vm {
constructor(e, t, n) {
let r, i, s;
switch (this.binding = e,
this.valueSize = n,
t) {
case "quaternion":
r = this._slerp,
i = this._slerpAdditive,
s = this._setAdditiveIdentityQuaternion,
this.buffer = new Float64Array(6 * n),
this._workIndex = 5;
break;
case "string":
case "bool":
r = this._select,
i = this._select,
s = this._setAdditiveIdentityOther,
this.buffer = new Array(5 * n);
break;
default:
r = this._lerp,
i = this._lerpAdditive,
s = this._setAdditiveIdentityNumeric,
this.buffer = new Float64Array(5 * n)
}
this._mixBufferRegion = r,
this._mixBufferRegionAdditive = i,
this._setIdentity = s,
this._origIndex = 3,
this._addIndex = 4,
this.cumulativeWeight = 0,
this.cumulativeWeightAdditive = 0,
this.useCount = 0,
this.referenceCount = 0
}
accumulate(e, t) {
const n = this.buffer
, r = this.valueSize
, i = e * r + r;
let s = this.cumulativeWeight;
if (0 === s) {
for (let e = 0; e !== r; ++e)
n[i + e] = n[e];
s = t
} else {
s += t;
const e = t / s;
this._mixBufferRegion(n, i, 0, e, r)
}
this.cumulativeWeight = s
}
accumulateAdditive(e) {
const t = this.buffer
, n = this.valueSize
, r = n * this._addIndex;
0 === this.cumulativeWeightAdditive && this._setIdentity(),
this._mixBufferRegionAdditive(t, r, 0, e, n),
this.cumulativeWeightAdditive += e
}
apply(e) {
const t = this.valueSize
, n = this.buffer
, r = e * t + t
, i = this.cumulativeWeight
, s = this.cumulativeWeightAdditive
, a = this.binding;
if (this.cumulativeWeight = 0,
this.cumulativeWeightAdditive = 0,
i < 1) {
const e = t * this._origIndex;
this._mixBufferRegion(n, r, e, 1 - i, t)
}
s > 0 && this._mixBufferRegionAdditive(n, r, this._addIndex * t, 1, t);
for (let o = t, l = t + t; o !== l; ++o)
if (n[o] !== n[o + t]) {
a.setValue(n, r);
break
}
}
saveOriginalState() {
const e = this.binding
, t = this.buffer
, n = this.valueSize
, r = n * this._origIndex;
e.getValue(t, r);
for (let i = n, s = r; i !== s; ++i)
t[i] = t[r + i % n];
this._setIdentity(),
this.cumulativeWeight = 0,
this.cumulativeWeightAdditive = 0
}
restoreOriginalState() {
const e = 3 * this.valueSize;
this.binding.setValue(this.buffer, e)
}
_setAdditiveIdentityNumeric() {
const e = this._addIndex * this.valueSize
, t = e + this.valueSize;
for (let n = e; n < t; n++)
this.buffer[n] = 0
}
_setAdditiveIdentityQuaternion() {
this._setAdditiveIdentityNumeric(),
this.buffer[this._addIndex * this.valueSize + 3] = 1
}
_setAdditiveIdentityOther() {
const e = this._origIndex * this.valueSize
, t = this._addIndex * this.valueSize;
for (let n = 0; n < this.valueSize; n++)
this.buffer[t + n] = this.buffer[e + n]
}
_select(e, t, n, r, i) {
if (r >= .5)
for (let s = 0; s !== i; ++s)
e[t + s] = e[n + s]
}
_slerp(e, t, n, r) {
Yi.slerpFlat(e, t, e, t, e, n, r)
}
_slerpAdditive(e, t, n, r, i) {
const s = this._workIndex * i;
Yi.multiplyQuaternionsFlat(e, s, e, t, e, n),
Yi.slerpFlat(e, t, e, t, e, s, r)
}
_lerp(e, t, n, r, i) {
const s = 1 - r;
for (let a = 0; a !== i; ++a) {
const i = t + a;
e[i] = e[i] * s + e[n + a] * r
}
}
_lerpAdditive(e, t, n, r, i) {
for (let s = 0; s !== i; ++s) {
const i = t + s;
e[i] = e[i] + e[n + s] * r
}
}
}
const ym = "\\[\\]\\.:\\/"
, xm = new RegExp("[" + ym + "]","g")
, bm = "[^" + ym + "]"
, _m = "[^" + ym.replace("\\.", "") + "]"
, wm = new RegExp("^" + /((?:WC+[\/:])*)/.source.replace("WC", bm) + /(WCOD+)?/.source.replace("WCOD", _m) + /(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC", bm) + /\.(WC+)(?:\[(.+)\])?/.source.replace("WC", bm) + "$")
, Sm = ["material", "materials", "bones", "map"];
class Am {
constructor(e, t, n) {
this.path = t,
this.parsedPath = n || Am.parseTrackName(t),
this.node = Am.findNode(e, this.parsedPath.nodeName),
this.rootNode = e,
this.getValue = this._getValue_unbound,
this.setValue = this._setValue_unbound
}
static create(e, t, n) {
return e && e.isAnimationObjectGroup ? new Am.Composite(e,t,n) : new Am(e,t,n)
}
static sanitizeNodeName(e) {
return e.replace(/\s/g, "_").replace(xm, "")
}
static parseTrackName(e) {
const t = wm.exec(e);
if (null === t)
throw new Error("PropertyBinding: Cannot parse trackName: " + e);
const n = {
nodeName: t[2],
objectName: t[3],
objectIndex: t[4],
propertyName: t[5],
propertyIndex: t[6]
}
, r = n.nodeName && n.nodeName.lastIndexOf(".");
if (void 0 !== r && -1 !== r) {
const e = n.nodeName.substring(r + 1);
-1 !== Sm.indexOf(e) && (n.nodeName = n.nodeName.substring(0, r),
n.objectName = e)
}
if (null === n.propertyName || 0 === n.propertyName.length)
throw new Error("PropertyBinding: can not parse propertyName from trackName: " + e);
return n
}
static findNode(e, t) {
if (void 0 === t || "" === t || "." === t || -1 === t || t === e.name || t === e.uuid)
return e;
if (e.skeleton) {
const n = e.skeleton.getBoneByName(t);
if (void 0 !== n)
return n
}
if (e.children) {
const n = function(e) {
for (let r = 0; r < e.length; r++) {
const i = e[r];
if (i.name === t || i.uuid === t)
return i;
const s = n(i.children);
if (s)
return s
}
return null
}
, r = n(e.children);
if (r)
return r
}
return null
}
_getValue_unavailable() {}
_setValue_unavailable() {}
_getValue_direct(e, t) {
e[t] = this.targetObject[this.propertyName]
}
_getValue_array(e, t) {
const n = this.resolvedProperty;
for (let r = 0, i = n.length; r !== i; ++r)
e[t++] = n[r]
}
_getValue_arrayElement(e, t) {
e[t] = this.resolvedProperty[this.propertyIndex]
}
_getValue_toArray(e, t) {
this.resolvedProperty.toArray(e, t)
}
_setValue_direct(e, t) {
this.targetObject[this.propertyName] = e[t]
}
_setValue_direct_setNeedsUpdate(e, t) {
this.targetObject[this.propertyName] = e[t],
this.targetObject.needsUpdate = !0
}
_setValue_direct_setMatrixWorldNeedsUpdate(e, t) {
this.targetObject[this.propertyName] = e[t],
this.targetObject.matrixWorldNeedsUpdate = !0
}
_setValue_array(e, t) {
const n = this.resolvedProperty;
for (let r = 0, i = n.length; r !== i; ++r)
n[r] = e[t++]
}
_setValue_array_setNeedsUpdate(e, t) {
const n = this.resolvedProperty;
for (let r = 0, i = n.length; r !== i; ++r)
n[r] = e[t++];
this.targetObject.needsUpdate = !0
}
_setValue_array_setMatrixWorldNeedsUpdate(e, t) {
const n = this.resolvedProperty;
for (let r = 0, i = n.length; r !== i; ++r)
n[r] = e[t++];
this.targetObject.matrixWorldNeedsUpdate = !0
}
_setValue_arrayElement(e, t) {
this.resolvedProperty[this.propertyIndex] = e[t]
}
_setValue_arrayElement_setNeedsUpdate(e, t) {
this.resolvedProperty[this.propertyIndex] = e[t],
this.targetObject.needsUpdate = !0
}
_setValue_arrayElement_setMatrixWorldNeedsUpdate(e, t) {
this.resolvedProperty[this.propertyIndex] = e[t],
this.targetObject.matrixWorldNeedsUpdate = !0
}
_setValue_fromArray(e, t) {
this.resolvedProperty.fromArray(e, t)
}
_setValue_fromArray_setNeedsUpdate(e, t) {
this.resolvedProperty.fromArray(e, t),
this.targetObject.needsUpdate = !0
}
_setValue_fromArray_setMatrixWorldNeedsUpdate(e, t) {
this.resolvedProperty.fromArray(e, t),
this.targetObject.matrixWorldNeedsUpdate = !0
}
_getValue_unbound(e, t) {
this.bind(),
this.getValue(e, t)
}
_setValue_unbound(e, t) {
this.bind(),
this.setValue(e, t)
}
bind() {
let e = this.node;
const t = this.parsedPath
, n = t.objectName
, r = t.propertyName;
let i = t.propertyIndex;
if (e || (e = Am.findNode(this.rootNode, t.nodeName),
this.node = e),
this.getValue = this._getValue_unavailable,
this.setValue = this._setValue_unavailable,
!e)
return void console.warn("THREE.PropertyBinding: No target node found for track: " + this.path + ".");
if (n) {
let r = t.objectIndex;
switch (n) {
case "materials":
if (!e.material)
return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.", this);
if (!e.material.materials)
return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.", this);
e = e.material.materials;
break;
case "bones":
if (!e.skeleton)
return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.", this);
e = e.skeleton.bones;
for (let t = 0; t < e.length; t++)
if (e[t].name === r) {
r = t;
break
}
break;
case "map":
if ("map"in e) {
e = e.map;
break
}
if (!e.material)
return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.", this);
if (!e.material.map)
return void console.error("THREE.PropertyBinding: Can not bind to material.map as node.material does not have a map.", this);
e = e.material.map;
break;
default:
if (void 0 === e[n])
return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.", this);
e = e[n]
}
if (void 0 !== r) {
if (void 0 === e[r])
return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.", this, e);
e = e[r]
}
}
const s = e[r];
if (void 0 === s) {
const n = t.nodeName;
return void console.error("THREE.PropertyBinding: Trying to update property for track: " + n + "." + r + " but it wasn't found.", e)
}
let a = this.Versioning.None;
this.targetObject = e,
void 0 !== e.needsUpdate ? a = this.Versioning.NeedsUpdate : void 0 !== e.matrixWorldNeedsUpdate && (a = this.Versioning.MatrixWorldNeedsUpdate);
let o = this.BindingType.Direct;
if (void 0 !== i) {
if ("morphTargetInfluences" === r) {
if (!e.geometry)
return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.", this);
if (!e.geometry.morphAttributes)
return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.", this);
void 0 !== e.morphTargetDictionary[i] && (i = e.morphTargetDictionary[i])
}
o = this.BindingType.ArrayElement,
this.resolvedProperty = s,
this.propertyIndex = i
} else
void 0 !== s.fromArray && void 0 !== s.toArray ? (o = this.BindingType.HasFromToArray,
this.resolvedProperty = s) : Array.isArray(s) ? (o = this.BindingType.EntireArray,
this.resolvedProperty = s) : this.propertyName = r;
this.getValue = this.GetterByBindingType[o],
this.setValue = this.SetterByBindingTypeAndVersioning[o][a]
}
unbind() {
this.node = null,
this.getValue = this._getValue_unbound,
this.setValue = this._setValue_unbound
}
}
Am.Composite = class {
constructor(e, t, n) {
const r = n || Am.parseTrackName(t);
this._targetGroup = e,
this._bindings = e.subscribe_(t, r)
}
getValue(e, t) {
this.bind();
const n = this._targetGroup.nCachedObjects_
, r = this._bindings[n];
void 0 !== r && r.getValue(e, t)
}
setValue(e, t) {
const n = this._bindings;
for (let r = this._targetGroup.nCachedObjects_, i = n.length; r !== i; ++r)
n[r].setValue(e, t)
}
bind() {
const e = this._bindings;
for (let t = this._targetGroup.nCachedObjects_, n = e.length; t !== n; ++t)
e[t].bind()
}
unbind() {
const e = this._bindings;
for (let t = this._targetGroup.nCachedObjects_, n = e.length; t !== n; ++t)
e[t].unbind()
}
}
,
Am.prototype.BindingType = {
Direct: 0,
EntireArray: 1,
ArrayElement: 2,
HasFromToArray: 3
},
Am.prototype.Versioning = {
None: 0,
NeedsUpdate: 1,
MatrixWorldNeedsUpdate: 2
},
Am.prototype.GetterByBindingType = [Am.prototype._getValue_direct, Am.prototype._getValue_array, Am.prototype._getValue_arrayElement, Am.prototype._getValue_toArray],
Am.prototype.SetterByBindingTypeAndVersioning = [[Am.prototype._setValue_direct, Am.prototype._setValue_direct_setNeedsUpdate, Am.prototype._setValue_direct_setMatrixWorldNeedsUpdate], [Am.prototype._setValue_array, Am.prototype._setValue_array_setNeedsUpdate, Am.prototype._setValue_array_setMatrixWorldNeedsUpdate], [Am.prototype._setValue_arrayElement, Am.prototype._setValue_arrayElement_setNeedsUpdate, Am.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate], [Am.prototype._setValue_fromArray, Am.prototype._setValue_fromArray_setNeedsUpdate, Am.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];
class Mm {
constructor() {
this.isAnimationObjectGroup = !0,
this.uuid = hi(),
this._objects = Array.prototype.slice.call(arguments),
this.nCachedObjects_ = 0;
const e = {};
this._indicesByUUID = e;
for (let n = 0, r = arguments.length; n !== r; ++n)
e[arguments[n].uuid] = n;
this._paths = [],
this._parsedPaths = [],
this._bindings = [],
this._bindingsIndicesByPath = {};
const t = this;
this.stats = {
objects: {
get total() {
return t._objects.length
},
get inUse() {
return this.total - t.nCachedObjects_
}
},
get bindingsPerObject() {
return t._bindings.length
}
}
}
add() {
const e = this._objects
, t = this._indicesByUUID
, n = this._paths
, r = this._parsedPaths
, i = this._bindings
, s = i.length;
let a, o = e.length, l = this.nCachedObjects_;
for (let c = 0, u = arguments.length; c !== u; ++c) {
const u = arguments[c]
, d = u.uuid;
let h = t[d];
if (void 0 === h) {
h = o++,
t[d] = h,
e.push(u);
for (let e = 0, t = s; e !== t; ++e)
i[e].push(new Am(u,n[e],r[e]))
} else if (h < l) {
a = e[h];
const o = --l
, c = e[o];
t[c.uuid] = h,
e[h] = c,
t[d] = o,
e[o] = u;
for (let e = 0, t = s; e !== t; ++e) {
const t = i[e]
, s = t[o];
let a = t[h];
t[h] = s,
void 0 === a && (a = new Am(u,n[e],r[e])),
t[o] = a
}
} else
e[h] !== a && console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")
}
this.nCachedObjects_ = l
}
remove() {
const e = this._objects
, t = this._indicesByUUID
, n = this._bindings
, r = n.length;
let i = this.nCachedObjects_;
for (let s = 0, a = arguments.length; s !== a; ++s) {
const a = arguments[s]
, o = a.uuid
, l = t[o];
if (void 0 !== l && l >= i) {
const s = i++
, c = e[s];
t[c.uuid] = l,
e[l] = c,
t[o] = s,
e[s] = a;
for (let e = 0, t = r; e !== t; ++e) {
const t = n[e]
, r = t[s]
, i = t[l];
t[l] = r,
t[s] = i
}
}
}
this.nCachedObjects_ = i
}
uncache() {
const e = this._objects
, t = this._indicesByUUID
, n = this._bindings
, r = n.length;
let i = this.nCachedObjects_
, s = e.length;
for (let a = 0, o = arguments.length; a !== o; ++a) {
const o = arguments[a].uuid
, l = t[o];
if (void 0 !== l)
if (delete t[o],
l < i) {
const a = --i
, o = e[a]
, c = --s
, u = e[c];
t[o.uuid] = l,
e[l] = o,
t[u.uuid] = a,
e[a] = u,
e.pop();
for (let e = 0, t = r; e !== t; ++e) {
const t = n[e]
, r = t[a]
, i = t[c];
t[l] = r,
t[a] = i,
t.pop()
}
} else {
const i = --s
, a = e[i];
i > 0 && (t[a.uuid] = l),
e[l] = a,
e.pop();
for (let e = 0, t = r; e !== t; ++e) {
const t = n[e];
t[l] = t[i],
t.pop()
}
}
}
this.nCachedObjects_ = i
}
subscribe_(e, t) {
const n = this._bindingsIndicesByPath;
let r = n[e];
const i = this._bindings;
if (void 0 !== r)
return i[r];
const s = this._paths
, a = this._parsedPaths
, o = this._objects
, l = o.length
, c = this.nCachedObjects_
, u = new Array(l);
r = i.length,
n[e] = r,
s.push(e),
a.push(t),
i.push(u);
for (let d = c, h = o.length; d !== h; ++d) {
const n = o[d];
u[d] = new Am(n,e,t)
}
return u
}
unsubscribe_(e) {
const t = this._bindingsIndicesByPath
, n = t[e];
if (void 0 !== n) {
const r = this._paths
, i = this._parsedPaths
, s = this._bindings
, a = s.length - 1
, o = s[a];
t[e[a]] = n,
s[n] = o,
s.pop(),
i[n] = i[a],
i.pop(),
r[n] = r[a],
r.pop()
}
}
}
class Cm {
constructor(e, t) {
let n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : null
, r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : t.blendMode;
this._mixer = e,
this._clip = t,
this._localRoot = n,
this.blendMode = r;
const i = t.tracks
, s = i.length
, a = new Array(s)
, o = {
endingStart: rr,
endingEnd: rr
};
for (let l = 0; l !== s; ++l) {
const e = i[l].createInterpolant(null);
a[l] = e,
e.settings = o
}
this._interpolantSettings = o,
this._interpolants = a,
this._propertyBindings = new Array(s),
this._cacheIndex = null,
this._byClipCacheIndex = null,
this._timeScaleInterpolant = null,
this._weightInterpolant = null,
this.loop = Zn,
this._loopCount = -1,
this._startTime = null,
this.time = 0,
this.timeScale = 1,
this._effectiveTimeScale = 1,
this.weight = 1,
this._effectiveWeight = 1,
this.repetitions = 1 / 0,
this.paused = !1,
this.enabled = !0,
this.clampWhenFinished = !1,
this.zeroSlopeAtStart = !0,
this.zeroSlopeAtEnd = !0
}
play() {
return this._mixer._activateAction(this),
this
}
stop() {
return this._mixer._deactivateAction(this),
this.reset()
}
reset() {
return this.paused = !1,
this.enabled = !0,
this.time = 0,
this._loopCount = -1,
this._startTime = null,
this.stopFading().stopWarping()
}
isRunning() {
return this.enabled && !this.paused && 0 !== this.timeScale && null === this._startTime && this._mixer._isActiveAction(this)
}
isScheduled() {
return this._mixer._isActiveAction(this)
}
startAt(e) {
return this._startTime = e,
this
}
setLoop(e, t) {
return this.loop = e,
this.repetitions = t,
this
}
setEffectiveWeight(e) {
return this.weight = e,
this._effectiveWeight = this.enabled ? e : 0,
this.stopFading()
}
getEffectiveWeight() {
return this._effectiveWeight
}
fadeIn(e) {
return this._scheduleFading(e, 0, 1)
}
fadeOut(e) {
return this._scheduleFading(e, 1, 0)
}
crossFadeFrom(e, t, n) {
if (e.fadeOut(t),
this.fadeIn(t),
n) {
const n = this._clip.duration
, r = e._clip.duration
, i = r / n
, s = n / r;
e.warp(1, i, t),
this.warp(s, 1, t)
}
return this
}
crossFadeTo(e, t, n) {
return e.crossFadeFrom(this, t, n)
}
stopFading() {
const e = this._weightInterpolant;
return null !== e && (this._weightInterpolant = null,
this._mixer._takeBackControlInterpolant(e)),
this
}
setEffectiveTimeScale(e) {
return this.timeScale = e,
this._effectiveTimeScale = this.paused ? 0 : e,
this.stopWarping()
}
getEffectiveTimeScale() {
return this._effectiveTimeScale
}
setDuration(e) {
return this.timeScale = this._clip.duration / e,
this.stopWarping()
}
syncWith(e) {
return this.time = e.time,
this.timeScale = e.timeScale,
this.stopWarping()
}
halt(e) {
return this.warp(this._effectiveTimeScale, 0, e)
}
warp(e, t, n) {
const r = this._mixer
, i = r.time
, s = this.timeScale;
let a = this._timeScaleInterpolant;
null === a && (a = r._lendControlInterpolant(),
this._timeScaleInterpolant = a);
const o = a.parameterPositions
, l = a.sampleValues;
return o[0] = i,
o[1] = i + n,
l[0] = e / s,
l[1] = t / s,
this
}
stopWarping() {
const e = this._timeScaleInterpolant;
return null !== e && (this._timeScaleInterpolant = null,
this._mixer._takeBackControlInterpolant(e)),
this
}
getMixer() {
return this._mixer
}
getClip() {
return this._clip
}
getRoot() {
return this._localRoot || this._mixer._root
}
_update(e, t, n, r) {
if (!this.enabled)
return void this._updateWeight(e);
const i = this._startTime;
if (null !== i) {
const r = (e - i) * n;
r < 0 || 0 === n ? t = 0 : (this._startTime = null,
t = n * r)
}
t *= this._updateTimeScale(e);
const s = this._updateTime(t)
, a = this._updateWeight(e);
if (a > 0) {
const e = this._interpolants
, t = this._propertyBindings;
if (this.blendMode === or)
for (let n = 0, r = e.length; n !== r; ++n)
e[n].evaluate(s),
t[n].accumulateAdditive(a);
else
for (let n = 0, i = e.length; n !== i; ++n)
e[n].evaluate(s),
t[n].accumulate(r, a)
}
}
_updateWeight(e) {
let t = 0;
if (this.enabled) {
t = this.weight;
const n = this._weightInterpolant;
if (null !== n) {
const r = n.evaluate(e)[0];
t *= r,
e > n.parameterPositions[1] && (this.stopFading(),
0 === r && (this.enabled = !1))
}
}
return this._effectiveWeight = t,
t
}
_updateTimeScale(e) {
let t = 0;
if (!this.paused) {
t = this.timeScale;
const n = this._timeScaleInterpolant;
if (null !== n) {
t *= n.evaluate(e)[0],
e > n.parameterPositions[1] && (this.stopWarping(),
0 === t ? this.paused = !0 : this.timeScale = t)
}
}
return this._effectiveTimeScale = t,
t
}
_updateTime(e) {
const t = this._clip.duration
, n = this.loop;
let r = this.time + e
, i = this._loopCount;
const s = n === $n;
if (0 === e)
return -1 === i ? r : s && 1 === (1 & i) ? t - r : r;
if (n === Qn) {
-1 === i && (this._loopCount = 0,
this._setEndings(!0, !0, !1));
e: {
if (r >= t)
r = t;
else {
if (!(r < 0)) {
this.time = r;
break e
}
r = 0
}
this.clampWhenFinished ? this.paused = !0 : this.enabled = !1,
this.time = r,
this._mixer.dispatchEvent({
type: "finished",
action: this,
direction: e < 0 ? -1 : 1
})
}
} else {
if (-1 === i && (e >= 0 ? (i = 0,
this._setEndings(!0, 0 === this.repetitions, s)) : this._setEndings(0 === this.repetitions, !0, s)),
r >= t || r < 0) {
const n = Math.floor(r / t);
r -= t * n,
i += Math.abs(n);
const a = this.repetitions - i;
if (a <= 0)
this.clampWhenFinished ? this.paused = !0 : this.enabled = !1,
r = e > 0 ? t : 0,
this.time = r,
this._mixer.dispatchEvent({
type: "finished",
action: this,
direction: e > 0 ? 1 : -1
});
else {
if (1 === a) {
const t = e < 0;
this._setEndings(t, !t, s)
} else
this._setEndings(!1, !1, s);
this._loopCount = i,
this.time = r,
this._mixer.dispatchEvent({
type: "loop",
action: this,
loopDelta: n
})
}
} else
this.time = r;
if (s && 1 === (1 & i))
return t - r
}
return r
}
_setEndings(e, t, n) {
const r = this._interpolantSettings;
n ? (r.endingStart = ir,
r.endingEnd = ir) : (r.endingStart = e ? this.zeroSlopeAtStart ? ir : rr : sr,
r.endingEnd = t ? this.zeroSlopeAtEnd ? ir : rr : sr)
}
_scheduleFading(e, t, n) {
const r = this._mixer
, i = r.time;
let s = this._weightInterpolant;
null === s && (s = r._lendControlInterpolant(),
this._weightInterpolant = s);
const a = s.parameterPositions
, o = s.sampleValues;
return a[0] = i,
o[0] = t,
a[1] = i + e,
o[1] = n,
this
}
}
const Em = new Float32Array(1);
class Tm extends oi {
constructor(e) {
super(),
this._root = e,
this._initMemoryManager(),
this._accuIndex = 0,
this.time = 0,
this.timeScale = 1
}
_bindAction(e, t) {
const n = e._localRoot || this._root
, r = e._clip.tracks
, i = r.length
, s = e._propertyBindings
, a = e._interpolants
, o = n.uuid
, l = this._bindingsByRootAndName;
let c = l[o];
void 0 === c && (c = {},
l[o] = c);
for (let u = 0; u !== i; ++u) {
const e = r[u]
, i = e.name;
let l = c[i];
if (void 0 !== l)
++l.referenceCount,
s[u] = l;
else {
if (l = s[u],
void 0 !== l) {
null === l._cacheIndex && (++l.referenceCount,
this._addInactiveBinding(l, o, i));
continue
}
const r = t && t._propertyBindings[u].binding.parsedPath;
l = new vm(Am.create(n, i, r),e.ValueTypeName,e.getValueSize()),
++l.referenceCount,
this._addInactiveBinding(l, o, i),
s[u] = l
}
a[u].resultBuffer = l.buffer
}
}
_activateAction(e) {
if (!this._isActiveAction(e)) {
if (null === e._cacheIndex) {
const t = (e._localRoot || this._root).uuid
, n = e._clip.uuid
, r = this._actionsByClip[n];
this._bindAction(e, r && r.knownActions[0]),
this._addInactiveAction(e, n, t)
}
const t = e._propertyBindings;
for (let e = 0, n = t.length; e !== n; ++e) {
const n = t[e];
0 === n.useCount++ && (this._lendBinding(n),
n.saveOriginalState())
}
this._lendAction(e)
}
}
_deactivateAction(e) {
if (this._isActiveAction(e)) {
const t = e._propertyBindings;
for (let e = 0, n = t.length; e !== n; ++e) {
const n = t[e];
0 === --n.useCount && (n.restoreOriginalState(),
this._takeBackBinding(n))
}
this._takeBackAction(e)
}
}
_initMemoryManager() {
this._actions = [],
this._nActiveActions = 0,
this._actionsByClip = {},
this._bindings = [],
this._nActiveBindings = 0,
this._bindingsByRootAndName = {},
this._controlInterpolants = [],
this._nActiveControlInterpolants = 0;
const e = this;
this.stats = {
actions: {
get total() {
return e._actions.length
},
get inUse() {
return e._nActiveActions
}
},
bindings: {
get total() {
return e._bindings.length
},
get inUse() {
return e._nActiveBindings
}
},
controlInterpolants: {
get total() {
return e._controlInterpolants.length
},
get inUse() {
return e._nActiveControlInterpolants
}
}
}
}
_isActiveAction(e) {
const t = e._cacheIndex;
return null !== t && t < this._nActiveActions
}
_addInactiveAction(e, t, n) {
const r = this._actions
, i = this._actionsByClip;
let s = i[t];
if (void 0 === s)
s = {
knownActions: [e],
actionByRoot: {}
},
e._byClipCacheIndex = 0,
i[t] = s;
else {
const t = s.knownActions;
e._byClipCacheIndex = t.length,
t.push(e)
}
e._cacheIndex = r.length,
r.push(e),
s.actionByRoot[n] = e
}
_removeInactiveAction(e) {
const t = this._actions
, n = t[t.length - 1]
, r = e._cacheIndex;
n._cacheIndex = r,
t[r] = n,
t.pop(),
e._cacheIndex = null;
const i = e._clip.uuid
, s = this._actionsByClip
, a = s[i]
, o = a.knownActions
, l = o[o.length - 1]
, c = e._byClipCacheIndex;
l._byClipCacheIndex = c,
o[c] = l,
o.pop(),
e._byClipCacheIndex = null;
delete a.actionByRoot[(e._localRoot || this._root).uuid],
0 === o.length && delete s[i],
this._removeInactiveBindingsForAction(e)
}
_removeInactiveBindingsForAction(e) {
const t = e._propertyBindings;
for (let n = 0, r = t.length; n !== r; ++n) {
const e = t[n];
0 === --e.referenceCount && this._removeInactiveBinding(e)
}
}
_lendAction(e) {
const t = this._actions
, n = e._cacheIndex
, r = this._nActiveActions++
, i = t[r];
e._cacheIndex = r,
t[r] = e,
i._cacheIndex = n,
t[n] = i
}
_takeBackAction(e) {
const t = this._actions
, n = e._cacheIndex
, r = --this._nActiveActions
, i = t[r];
e._cacheIndex = r,
t[r] = e,
i._cacheIndex = n,
t[n] = i
}
_addInactiveBinding(e, t, n) {
const r = this._bindingsByRootAndName
, i = this._bindings;
let s = r[t];
void 0 === s && (s = {},
r[t] = s),
s[n] = e,
e._cacheIndex = i.length,
i.push(e)
}
_removeInactiveBinding(e) {
const t = this._bindings
, n = e.binding
, r = n.rootNode.uuid
, i = n.path
, s = this._bindingsByRootAndName
, a = s[r]
, o = t[t.length - 1]
, l = e._cacheIndex;
o._cacheIndex = l,
t[l] = o,
t.pop(),
delete a[i],
0 === Object.keys(a).length && delete s[r]
}
_lendBinding(e) {
const t = this._bindings
, n = e._cacheIndex
, r = this._nActiveBindings++
, i = t[r];
e._cacheIndex = r,
t[r] = e,
i._cacheIndex = n,
t[n] = i
}
_takeBackBinding(e) {
const t = this._bindings
, n = e._cacheIndex
, r = --this._nActiveBindings
, i = t[r];
e._cacheIndex = r,
t[r] = e,
i._cacheIndex = n,
t[n] = i
}
_lendControlInterpolant() {
const e = this._controlInterpolants
, t = this._nActiveControlInterpolants++;
let n = e[t];
return void 0 === n && (n = new Yp(new Float32Array(2),new Float32Array(2),1,Em),
n.__cacheIndex = t,
e[t] = n),
n
}
_takeBackControlInterpolant(e) {
const t = this._controlInterpolants
, n = e.__cacheIndex
, r = --this._nActiveControlInterpolants
, i = t[r];
e.__cacheIndex = r,
t[r] = e,
i.__cacheIndex = n,
t[n] = i
}
clipAction(e, t, n) {
const r = t || this._root
, i = r.uuid;
let s = "string" === typeof e ? of.findByName(r, e) : e;
const a = null !== s ? s.uuid : e
, o = this._actionsByClip[a];
let l = null;
if (void 0 === n && (n = null !== s ? s.blendMode : ar),
void 0 !== o) {
const e = o.actionByRoot[i];
if (void 0 !== e && e.blendMode === n)
return e;
l = o.knownActions[0],
null === s && (s = l._clip)
}
if (null === s)
return null;
const c = new Cm(this,s,t,n);
return this._bindAction(c, l),
this._addInactiveAction(c, a, i),
c
}
existingAction(e, t) {
const n = t || this._root
, r = n.uuid
, i = "string" === typeof e ? of.findByName(n, e) : e
, s = i ? i.uuid : e
, a = this._actionsByClip[s];
return void 0 !== a && a.actionByRoot[r] || null
}
stopAllAction() {
const e = this._actions;
for (let t = this._nActiveActions - 1; t >= 0; --t)
e[t].stop();
return this
}
update(e) {
e *= this.timeScale;
const t = this._actions
, n = this._nActiveActions
, r = this.time += e
, i = Math.sign(e)
, s = this._accuIndex ^= 1;
for (let l = 0; l !== n; ++l) {
t[l]._update(r, e, i, s)
}
const a = this._bindings
, o = this._nActiveBindings;
for (let l = 0; l !== o; ++l)
a[l].apply(s);
return this
}
setTime(e) {
this.time = 0;
for (let t = 0; t < this._actions.length; t++)
this._actions[t].time = 0;
return this.update(e)
}
getRoot() {
return this._root
}
uncacheClip(e) {
const t = this._actions
, n = e.uuid
, r = this._actionsByClip
, i = r[n];
if (void 0 !== i) {
const e = i.knownActions;
for (let n = 0, r = e.length; n !== r; ++n) {
const r = e[n];
this._deactivateAction(r);
const i = r._cacheIndex
, s = t[t.length - 1];
r._cacheIndex = null,
r._byClipCacheIndex = null,
s._cacheIndex = i,
t[i] = s,
t.pop(),
this._removeInactiveBindingsForAction(r)
}
delete r[n]
}
}
uncacheRoot(e) {
const t = e.uuid
, n = this._actionsByClip;
for (const i in n) {
const e = n[i].actionByRoot[t];
void 0 !== e && (this._deactivateAction(e),
this._removeInactiveAction(e))
}
const r = this._bindingsByRootAndName[t];
if (void 0 !== r)
for (const i in r) {
const e = r[i];
e.restoreOriginalState(),
this._removeInactiveBinding(e)
}
}
uncacheAction(e, t) {
const n = this.existingAction(e, t);
null !== n && (this._deactivateAction(n),
this._removeInactiveAction(n))
}
}
class Rm {
constructor(e) {
this.value = e
}
clone() {
return new Rm(void 0 === this.value.clone ? this.value : this.value.clone())
}
}
let Bm = 0;
class Pm extends oi {
constructor() {
super(),
this.isUniformsGroup = !0,
Object.defineProperty(this, "id", {
value: Bm++
}),
this.name = "",
this.usage = Kr,
this.uniforms = []
}
add(e) {
return this.uniforms.push(e),
this
}
remove(e) {
const t = this.uniforms.indexOf(e);
return -1 !== t && this.uniforms.splice(t, 1),
this
}
setName(e) {
return this.name = e,
this
}
setUsage(e) {
return this.usage = e,
this
}
dispose() {
return this.dispatchEvent({
type: "dispose"
}),
this
}
copy(e) {
this.name = e.name,
this.usage = e.usage;
const t = e.uniforms;
this.uniforms.length = 0;
for (let n = 0, r = t.length; n < r; n++) {
const e = Array.isArray(t[n]) ? t[n] : [t[n]];
for (let t = 0; t < e.length; t++)
this.uniforms.push(e[t].clone())
}
return this
}
clone() {
return (new this.constructor).copy(this)
}
}
class km extends Au {
constructor(e, t) {
let n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 1;
super(e, t),
this.isInstancedInterleavedBuffer = !0,
this.meshPerAttribute = n
}
copy(e) {
return super.copy(e),
this.meshPerAttribute = e.meshPerAttribute,
this
}
clone(e) {
const t = super.clone(e);
return t.meshPerAttribute = this.meshPerAttribute,
t
}
toJSON(e) {
const t = super.toJSON(e);
return t.isInstancedInterleavedBuffer = !0,
t.meshPerAttribute = this.meshPerAttribute,
t
}
}
class Lm {
constructor(e, t, n, r, i) {
this.isGLBufferAttribute = !0,
this.name = "",
this.buffer = e,
this.type = t,
this.itemSize = n,
this.elementSize = r,
this.count = i,
this.version = 0
}
set needsUpdate(e) {
!0 === e && this.version++
}
setBuffer(e) {
return this.buffer = e,
this
}
setType(e, t) {
return this.type = e,
this.elementSize = t,
this
}
setItemSize(e) {
return this.itemSize = e,
this
}
setCount(e) {
return this.count = e,
this
}
}
const Im = new Es;
class Nm {
constructor(e, t) {
let n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 0
, r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : 1 / 0;
this.ray = new Cs(e,t),
this.near = n,
this.far = r,
this.camera = null,
this.layers = new Fs,
this.params = {
Mesh: {},
Line: {
threshold: 1
},
LOD: {},
Points: {
threshold: 1
},
Sprite: {}
}
}
set(e, t) {
this.ray.set(e, t)
}
setFromCamera(e, t) {
t.isPerspectiveCamera ? (this.ray.origin.setFromMatrixPosition(t.matrixWorld),
this.ray.direction.set(e.x, e.y, .5).unproject(t).sub(this.ray.origin).normalize(),
this.camera = t) : t.isOrthographicCamera ? (this.ray.origin.set(e.x, e.y, (t.near + t.far) / (t.near - t.far)).unproject(t),
this.ray.direction.set(0, 0, -1).transformDirection(t.matrixWorld),
this.camera = t) : console.error("THREE.Raycaster: Unsupported camera type: " + t.type)
}
setFromXRController(e) {
return Im.identity().extractRotation(e.matrixWorld),
this.ray.origin.setFromMatrixPosition(e.matrixWorld),
this.ray.direction.set(0, 0, -1).applyMatrix4(Im),
this
}
intersectObject(e) {
let t = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : [];
return jm(e, this, t, !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1]),
t.sort(Dm),
t
}
intersectObjects(e) {
let t = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1]
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : [];
for (let r = 0, i = e.length; r < i; r++)
jm(e[r], this, n, t);
return n.sort(Dm),
n
}
}
function Dm(e, t) {
return e.distance - t.distance
}
function jm(e, t, n, r) {
let i = !0;
if (e.layers.test(t.layers)) {
!1 === e.raycast(t, n) && (i = !1)
}
if (!0 === i && !0 === r) {
const r = e.children;
for (let e = 0, i = r.length; e < i; e++)
jm(r[e], t, n, !0)
}
}
class Fm {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 1
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 0;
return this.radius = e,
this.phi = t,
this.theta = n,
this
}
set(e, t, n) {
return this.radius = e,
this.phi = t,
this.theta = n,
this
}
copy(e) {
return this.radius = e.radius,
this.phi = e.phi,
this.theta = e.theta,
this
}
makeSafe() {
const e = 1e-6;
return this.phi = Math.max(e, Math.min(Math.PI - e, this.phi)),
this
}
setFromVector3(e) {
return this.setFromCartesianCoords(e.x, e.y, e.z)
}
setFromCartesianCoords(e, t, n) {
return this.radius = Math.sqrt(e * e + t * t + n * n),
0 === this.radius ? (this.theta = 0,
this.phi = 0) : (this.theta = Math.atan2(e, n),
this.phi = Math.acos(pi(t / this.radius, -1, 1))),
this
}
clone() {
return (new this.constructor).copy(this)
}
}
class Om {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 1
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 0;
return this.radius = e,
this.theta = t,
this.y = n,
this
}
set(e, t, n) {
return this.radius = e,
this.theta = t,
this.y = n,
this
}
copy(e) {
return this.radius = e.radius,
this.theta = e.theta,
this.y = e.y,
this
}
setFromVector3(e) {
return this.setFromCartesianCoords(e.x, e.y, e.z)
}
setFromCartesianCoords(e, t, n) {
return this.radius = Math.sqrt(e * e + n * n),
this.theta = Math.atan2(e, n),
this.y = t,
this
}
clone() {
return (new this.constructor).copy(this)
}
}
const Um = new xi;
class zm {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : new xi(1 / 0,1 / 0)
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : new xi(-1 / 0,-1 / 0);
this.isBox2 = !0,
this.min = e,
this.max = t
}
set(e, t) {
return this.min.copy(e),
this.max.copy(t),
this
}
setFromPoints(e) {
this.makeEmpty();
for (let t = 0, n = e.length; t < n; t++)
this.expandByPoint(e[t]);
return this
}
setFromCenterAndSize(e, t) {
const n = Um.copy(t).multiplyScalar(.5);
return this.min.copy(e).sub(n),
this.max.copy(e).add(n),
this
}
clone() {
return (new this.constructor).copy(this)
}
copy(e) {
return this.min.copy(e.min),
this.max.copy(e.max),
this
}
makeEmpty() {
return this.min.x = this.min.y = 1 / 0,
this.max.x = this.max.y = -1 / 0,
this
}
isEmpty() {
return this.max.x < this.min.x || this.max.y < this.min.y
}
getCenter(e) {
return this.isEmpty() ? e.set(0, 0) : e.addVectors(this.min, this.max).multiplyScalar(.5)
}
getSize(e) {
return this.isEmpty() ? e.set(0, 0) : e.subVectors(this.max, this.min)
}
expandByPoint(e) {
return this.min.min(e),
this.max.max(e),
this
}
expandByVector(e) {
return this.min.sub(e),
this.max.add(e),
this
}
expandByScalar(e) {
return this.min.addScalar(-e),
this.max.addScalar(e),
this
}
containsPoint(e) {
return !(e.x < this.min.x || e.x > this.max.x || e.y < this.min.y || e.y > this.max.y)
}
containsBox(e) {
return this.min.x <= e.min.x && e.max.x <= this.max.x && this.min.y <= e.min.y && e.max.y <= this.max.y
}
getParameter(e, t) {
return t.set((e.x - this.min.x) / (this.max.x - this.min.x), (e.y - this.min.y) / (this.max.y - this.min.y))
}
intersectsBox(e) {
return !(e.max.x < this.min.x || e.min.x > this.max.x || e.max.y < this.min.y || e.min.y > this.max.y)
}
clampPoint(e, t) {
return t.copy(e).clamp(this.min, this.max)
}
distanceToPoint(e) {
return this.clampPoint(e, Um).distanceTo(e)
}
intersect(e) {
return this.min.max(e.min),
this.max.min(e.max),
this.isEmpty() && this.makeEmpty(),
this
}
union(e) {
return this.min.min(e.min),
this.max.max(e.max),
this
}
translate(e) {
return this.min.add(e),
this.max.add(e),
this
}
equals(e) {
return e.min.equals(this.min) && e.max.equals(this.max)
}
}
const Gm = new Qi
, Hm = new Qi;
class Vm {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : new Qi
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : new Qi;
this.start = e,
this.end = t
}
set(e, t) {
return this.start.copy(e),
this.end.copy(t),
this
}
copy(e) {
return this.start.copy(e.start),
this.end.copy(e.end),
this
}
getCenter(e) {
return e.addVectors(this.start, this.end).multiplyScalar(.5)
}
delta(e) {
return e.subVectors(this.end, this.start)
}
distanceSq() {
return this.start.distanceToSquared(this.end)
}
distance() {
return this.start.distanceTo(this.end)
}
at(e, t) {
return this.delta(t).multiplyScalar(e).add(this.start)
}
closestPointToPointParameter(e, t) {
Gm.subVectors(e, this.start),
Hm.subVectors(this.end, this.start);
const n = Hm.dot(Hm);
let r = Hm.dot(Gm) / n;
return t && (r = pi(r, 0, 1)),
r
}
closestPointToPoint(e, t, n) {
const r = this.closestPointToPointParameter(e, t);
return this.delta(n).multiplyScalar(r).add(this.start)
}
applyMatrix4(e) {
return this.start.applyMatrix4(e),
this.end.applyMatrix4(e),
this
}
equals(e) {
return e.start.equals(this.start) && e.end.equals(this.end)
}
clone() {
return (new this.constructor).copy(this)
}
}
const Wm = new Qi;
class Jm extends ea {
constructor(e, t) {
super(),
this.light = e,
this.matrixAutoUpdate = !1,
this.color = t,
this.type = "SpotLightHelper";
const n = new Wa
, r = [0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, -1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, -1, 1];
for (let s = 0, a = 1, o = 32; s < o; s++,
a++) {
const e = s / o * Math.PI * 2
, t = a / o * Math.PI * 2;
r.push(Math.cos(e), Math.sin(e), 1, Math.cos(t), Math.sin(t), 1)
}
n.setAttribute("position", new ja(r,3));
const i = new Dd({
fog: !1,
toneMapped: !1
});
this.cone = new Kd(n,i),
this.add(this.cone),
this.update()
}
dispose() {
this.cone.geometry.dispose(),
this.cone.material.dispose()
}
update() {
this.light.updateWorldMatrix(!0, !1),
this.light.target.updateWorldMatrix(!0, !1),
this.parent ? (this.parent.updateWorldMatrix(!0),
this.matrix.copy(this.parent.matrixWorld).invert().multiply(this.light.matrixWorld)) : this.matrix.copy(this.light.matrixWorld),
this.matrixWorld.copy(this.light.matrixWorld);
const e = this.light.distance ? this.light.distance : 1e3
, t = e * Math.tan(this.light.angle);
this.cone.scale.set(t, t, e),
Wm.setFromMatrixPosition(this.light.target.matrixWorld),
this.cone.lookAt(Wm),
void 0 !== this.color ? this.cone.material.color.set(this.color) : this.cone.material.color.copy(this.light.color)
}
}
const Xm = new Qi
, Km = new Es
, qm = new Es;
class Ym extends Kd {
constructor(e) {
const t = Qm(e)
, n = new Wa
, r = []
, i = []
, s = new ga(0,0,1)
, a = new ga(0,1,0);
for (let o = 0; o < t.length; o++) {
const e = t[o];
e.parent && e.parent.isBone && (r.push(0, 0, 0),
r.push(0, 0, 0),
i.push(s.r, s.g, s.b),
i.push(a.r, a.g, a.b))
}
n.setAttribute("position", new ja(r,3)),
n.setAttribute("color", new ja(i,3));
super(n, new Dd({
vertexColors: !0,
depthTest: !1,
depthWrite: !1,
toneMapped: !1,
transparent: !0
})),
this.isSkeletonHelper = !0,
this.type = "SkeletonHelper",
this.root = e,
this.bones = t,
this.matrix = e.matrixWorld,
this.matrixAutoUpdate = !1
}
updateMatrixWorld(e) {
const t = this.bones
, n = this.geometry
, r = n.getAttribute("position");
qm.copy(this.root.matrixWorld).invert();
for (let i = 0, s = 0; i < t.length; i++) {
const e = t[i];
e.parent && e.parent.isBone && (Km.multiplyMatrices(qm, e.matrixWorld),
Xm.setFromMatrixPosition(Km),
r.setXYZ(s, Xm.x, Xm.y, Xm.z),
Km.multiplyMatrices(qm, e.parent.matrixWorld),
Xm.setFromMatrixPosition(Km),
r.setXYZ(s + 1, Xm.x, Xm.y, Xm.z),
s += 2)
}
n.getAttribute("position").needsUpdate = !0,
super.updateMatrixWorld(e)
}
dispose() {
this.geometry.dispose(),
this.material.dispose()
}
}
function Qm(e) {
const t = [];
!0 === e.isBone && t.push(e);
for (let n = 0; n < e.children.length; n++)
t.push.apply(t, Qm(e.children[n]));
return t
}
class Zm extends co {
constructor(e, t, n) {
super(new Ap(t,4,2), new ba({
wireframe: !0,
fog: !1,
toneMapped: !1
})),
this.light = e,
this.color = n,
this.type = "PointLightHelper",
this.matrix = this.light.matrixWorld,
this.matrixAutoUpdate = !1,
this.update()
}
dispose() {
this.geometry.dispose(),
this.material.dispose()
}
update() {
this.light.updateWorldMatrix(!0, !1),
void 0 !== this.color ? this.material.color.set(this.color) : this.material.color.copy(this.light.color)
}
}
const $m = new Qi
, eg = new ga
, tg = new ga;
class ng extends ea {
constructor(e, t, n) {
super(),
this.light = e,
this.matrix = e.matrixWorld,
this.matrixAutoUpdate = !1,
this.color = n,
this.type = "HemisphereLightHelper";
const r = new _p(t);
r.rotateY(.5 * Math.PI),
this.material = new ba({
wireframe: !0,
fog: !1,
toneMapped: !1
}),
void 0 === this.color && (this.material.vertexColors = !0);
const i = r.getAttribute("position")
, s = new Float32Array(3 * i.count);
r.setAttribute("color", new Ta(s,3)),
this.add(new co(r,this.material)),
this.update()
}
dispose() {
this.children[0].geometry.dispose(),
this.children[0].material.dispose()
}
update() {
const e = this.children[0];
if (void 0 !== this.color)
this.material.color.set(this.color);
else {
const t = e.geometry.getAttribute("color");
eg.copy(this.light.color),
tg.copy(this.light.groundColor);
for (let e = 0, n = t.count; e < n; e++) {
const r = e < n / 2 ? eg : tg;
t.setXYZ(e, r.r, r.g, r.b)
}
t.needsUpdate = !0
}
this.light.updateWorldMatrix(!0, !1),
e.lookAt($m.setFromMatrixPosition(this.light.matrixWorld).negate())
}
}
class rg extends Kd {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 10
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 10
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 4473924
, r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : 8947848;
n = new ga(n),
r = new ga(r);
const i = t / 2
, s = e / t
, a = e / 2
, o = []
, l = [];
for (let u = 0, d = 0, h = -a; u <= t; u++,
h += s) {
o.push(-a, 0, h, a, 0, h),
o.push(h, 0, -a, h, 0, a);
const e = u === i ? n : r;
e.toArray(l, d),
d += 3,
e.toArray(l, d),
d += 3,
e.toArray(l, d),
d += 3,
e.toArray(l, d),
d += 3
}
const c = new Wa;
c.setAttribute("position", new ja(o,3)),
c.setAttribute("color", new ja(l,3));
super(c, new Dd({
vertexColors: !0,
toneMapped: !1
})),
this.type = "GridHelper"
}
dispose() {
this.geometry.dispose(),
this.material.dispose()
}
}
class ig extends Kd {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 10
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 16
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 8
, r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : 64
, i = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : 4473924
, s = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : 8947848;
i = new ga(i),
s = new ga(s);
const a = []
, o = [];
if (t > 1)
for (let c = 0; c < t; c++) {
const n = c / t * (2 * Math.PI)
, r = Math.sin(n) * e
, l = Math.cos(n) * e;
a.push(0, 0, 0),
a.push(r, 0, l);
const u = 1 & c ? i : s;
o.push(u.r, u.g, u.b),
o.push(u.r, u.g, u.b)
}
for (let c = 0; c < n; c++) {
const t = 1 & c ? i : s
, l = e - e / n * c;
for (let e = 0; e < r; e++) {
let n = e / r * (2 * Math.PI)
, i = Math.sin(n) * l
, s = Math.cos(n) * l;
a.push(i, 0, s),
o.push(t.r, t.g, t.b),
n = (e + 1) / r * (2 * Math.PI),
i = Math.sin(n) * l,
s = Math.cos(n) * l,
a.push(i, 0, s),
o.push(t.r, t.g, t.b)
}
}
const l = new Wa;
l.setAttribute("position", new ja(a,3)),
l.setAttribute("color", new ja(o,3));
super(l, new Dd({
vertexColors: !0,
toneMapped: !1
})),
this.type = "PolarGridHelper"
}
dispose() {
this.geometry.dispose(),
this.material.dispose()
}
}
const sg = new Qi
, ag = new Qi
, og = new Qi;
class lg extends ea {
constructor(e, t, n) {
super(),
this.light = e,
this.matrix = e.matrixWorld,
this.matrixAutoUpdate = !1,
this.color = n,
this.type = "DirectionalLightHelper",
void 0 === t && (t = 1);
let r = new Wa;
r.setAttribute("position", new ja([-t, t, 0, t, t, 0, t, -t, 0, -t, -t, 0, -t, t, 0],3));
const i = new Dd({
fog: !1,
toneMapped: !1
});
this.lightPlane = new Vd(r,i),
this.add(this.lightPlane),
r = new Wa,
r.setAttribute("position", new ja([0, 0, 0, 0, 0, 1],3)),
this.targetLine = new Vd(r,i),
this.add(this.targetLine),
this.update()
}
dispose() {
this.lightPlane.geometry.dispose(),
this.lightPlane.material.dispose(),
this.targetLine.geometry.dispose(),
this.targetLine.material.dispose()
}
update() {
this.light.updateWorldMatrix(!0, !1),
this.light.target.updateWorldMatrix(!0, !1),
sg.setFromMatrixPosition(this.light.matrixWorld),
ag.setFromMatrixPosition(this.light.target.matrixWorld),
og.subVectors(ag, sg),
this.lightPlane.lookAt(ag),
void 0 !== this.color ? (this.lightPlane.material.color.set(this.color),
this.targetLine.material.color.set(this.color)) : (this.lightPlane.material.color.copy(this.light.color),
this.targetLine.material.color.copy(this.light.color)),
this.targetLine.lookAt(ag),
this.targetLine.scale.z = og.length()
}
}
const cg = new Qi
, ug = new yo;
class dg extends Kd {
constructor(e) {
const t = new Wa
, n = new Dd({
color: 16777215,
vertexColors: !0,
toneMapped: !1
})
, r = []
, i = []
, s = {};
function a(e, t) {
o(e),
o(t)
}
function o(e) {
r.push(0, 0, 0),
i.push(0, 0, 0),
void 0 === s[e] && (s[e] = []),
s[e].push(r.length / 3 - 1)
}
a("n1", "n2"),
a("n2", "n4"),
a("n4", "n3"),
a("n3", "n1"),
a("f1", "f2"),
a("f2", "f4"),
a("f4", "f3"),
a("f3", "f1"),
a("n1", "f1"),
a("n2", "f2"),
a("n3", "f3"),
a("n4", "f4"),
a("p", "n1"),
a("p", "n2"),
a("p", "n3"),
a("p", "n4"),
a("u1", "u2"),
a("u2", "u3"),
a("u3", "u1"),
a("c", "t"),
a("p", "c"),
a("cn1", "cn2"),
a("cn3", "cn4"),
a("cf1", "cf2"),
a("cf3", "cf4"),
t.setAttribute("position", new ja(r,3)),
t.setAttribute("color", new ja(i,3)),
super(t, n),
this.type = "CameraHelper",
this.camera = e,
this.camera.updateProjectionMatrix && this.camera.updateProjectionMatrix(),
this.matrix = e.matrixWorld,
this.matrixAutoUpdate = !1,
this.pointMap = s,
this.update();
const l = new ga(16755200)
, c = new ga(16711680)
, u = new ga(43775)
, d = new ga(16777215)
, h = new ga(3355443);
this.setColors(l, c, u, d, h)
}
setColors(e, t, n, r, i) {
const s = this.geometry.getAttribute("color");
s.setXYZ(0, e.r, e.g, e.b),
s.setXYZ(1, e.r, e.g, e.b),
s.setXYZ(2, e.r, e.g, e.b),
s.setXYZ(3, e.r, e.g, e.b),
s.setXYZ(4, e.r, e.g, e.b),
s.setXYZ(5, e.r, e.g, e.b),
s.setXYZ(6, e.r, e.g, e.b),
s.setXYZ(7, e.r, e.g, e.b),
s.setXYZ(8, e.r, e.g, e.b),
s.setXYZ(9, e.r, e.g, e.b),
s.setXYZ(10, e.r, e.g, e.b),
s.setXYZ(11, e.r, e.g, e.b),
s.setXYZ(12, e.r, e.g, e.b),
s.setXYZ(13, e.r, e.g, e.b),
s.setXYZ(14, e.r, e.g, e.b),
s.setXYZ(15, e.r, e.g, e.b),
s.setXYZ(16, e.r, e.g, e.b),
s.setXYZ(17, e.r, e.g, e.b),
s.setXYZ(18, e.r, e.g, e.b),
s.setXYZ(19, e.r, e.g, e.b),
s.setXYZ(20, e.r, e.g, e.b),
s.setXYZ(21, e.r, e.g, e.b),
s.setXYZ(22, e.r, e.g, e.b),
s.setXYZ(23, e.r, e.g, e.b),
s.setXYZ(24, t.r, t.g, t.b),
s.setXYZ(25, t.r, t.g, t.b),
s.setXYZ(26, t.r, t.g, t.b),
s.setXYZ(27, t.r, t.g, t.b),
s.setXYZ(28, t.r, t.g, t.b),
s.setXYZ(29, t.r, t.g, t.b),
s.setXYZ(30, t.r, t.g, t.b),
s.setXYZ(31, t.r, t.g, t.b),
s.setXYZ(32, n.r, n.g, n.b),
s.setXYZ(33, n.r, n.g, n.b),
s.setXYZ(34, n.r, n.g, n.b),
s.setXYZ(35, n.r, n.g, n.b),
s.setXYZ(36, n.r, n.g, n.b),
s.setXYZ(37, n.r, n.g, n.b),
s.setXYZ(38, r.r, r.g, r.b),
s.setXYZ(39, r.r, r.g, r.b),
s.setXYZ(40, i.r, i.g, i.b),
s.setXYZ(41, i.r, i.g, i.b),
s.setXYZ(42, i.r, i.g, i.b),
s.setXYZ(43, i.r, i.g, i.b),
s.setXYZ(44, i.r, i.g, i.b),
s.setXYZ(45, i.r, i.g, i.b),
s.setXYZ(46, i.r, i.g, i.b),
s.setXYZ(47, i.r, i.g, i.b),
s.setXYZ(48, i.r, i.g, i.b),
s.setXYZ(49, i.r, i.g, i.b),
s.needsUpdate = !0
}
update() {
const e = this.geometry
, t = this.pointMap;
ug.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse),
hg("c", t, e, ug, 0, 0, -1),
hg("t", t, e, ug, 0, 0, 1),
hg("n1", t, e, ug, -1, -1, -1),
hg("n2", t, e, ug, 1, -1, -1),
hg("n3", t, e, ug, -1, 1, -1),
hg("n4", t, e, ug, 1, 1, -1),
hg("f1", t, e, ug, -1, -1, 1),
hg("f2", t, e, ug, 1, -1, 1),
hg("f3", t, e, ug, -1, 1, 1),
hg("f4", t, e, ug, 1, 1, 1),
hg("u1", t, e, ug, .7, 1.1, -1),
hg("u2", t, e, ug, -.7, 1.1, -1),
hg("u3", t, e, ug, 0, 2, -1),
hg("cf1", t, e, ug, -1, 0, 1),
hg("cf2", t, e, ug, 1, 0, 1),
hg("cf3", t, e, ug, 0, -1, 1),
hg("cf4", t, e, ug, 0, 1, 1),
hg("cn1", t, e, ug, -1, 0, -1),
hg("cn2", t, e, ug, 1, 0, -1),
hg("cn3", t, e, ug, 0, -1, -1),
hg("cn4", t, e, ug, 0, 1, -1),
e.getAttribute("position").needsUpdate = !0
}
dispose() {
this.geometry.dispose(),
this.material.dispose()
}
}
function hg(e, t, n, r, i, s, a) {
cg.set(i, s, a).unproject(r);
const o = t[e];
if (void 0 !== o) {
const e = n.getAttribute("position");
for (let t = 0, n = o.length; t < n; t++)
e.setXYZ(o[t], cg.x, cg.y, cg.z)
}
}
const pg = new es;
class fg extends Kd {
constructor(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 16776960;
const n = new Uint16Array([0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 0, 4, 1, 5, 2, 6, 3, 7])
, r = new Float32Array(24)
, i = new Wa;
i.setIndex(new Ta(n,1)),
i.setAttribute("position", new Ta(r,3)),
super(i, new Dd({
color: t,
toneMapped: !1
})),
this.object = e,
this.type = "BoxHelper",
this.matrixAutoUpdate = !1,
this.update()
}
update(e) {
if (void 0 !== e && console.warn("THREE.BoxHelper: .update() has no longer arguments."),
void 0 !== this.object && pg.setFromObject(this.object),
pg.isEmpty())
return;
const t = pg.min
, n = pg.max
, r = this.geometry.attributes.position
, i = r.array;
i[0] = n.x,
i[1] = n.y,
i[2] = n.z,
i[3] = t.x,
i[4] = n.y,
i[5] = n.z,
i[6] = t.x,
i[7] = t.y,
i[8] = n.z,
i[9] = n.x,
i[10] = t.y,
i[11] = n.z,
i[12] = n.x,
i[13] = n.y,
i[14] = t.z,
i[15] = t.x,
i[16] = n.y,
i[17] = t.z,
i[18] = t.x,
i[19] = t.y,
i[20] = t.z,
i[21] = n.x,
i[22] = t.y,
i[23] = t.z,
r.needsUpdate = !0,
this.geometry.computeBoundingSphere()
}
setFromObject(e) {
return this.object = e,
this.update(),
this
}
copy(e, t) {
return super.copy(e, t),
this.object = e.object,
this
}
dispose() {
this.geometry.dispose(),
this.material.dispose()
}
}
class mg extends Kd {
constructor(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 16776960;
const n = new Uint16Array([0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 0, 4, 1, 5, 2, 6, 3, 7])
, r = new Wa;
r.setIndex(new Ta(n,1)),
r.setAttribute("position", new ja([1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, -1, -1, -1, 1, -1, -1],3)),
super(r, new Dd({
color: t,
toneMapped: !1
})),
this.box = e,
this.type = "Box3Helper",
this.geometry.computeBoundingSphere()
}
updateMatrixWorld(e) {
const t = this.box;
t.isEmpty() || (t.getCenter(this.position),
t.getSize(this.scale),
this.scale.multiplyScalar(.5),
super.updateMatrixWorld(e))
}
dispose() {
this.geometry.dispose(),
this.material.dispose()
}
}
class gg extends Vd {
constructor(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 1;
const n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 16776960
, r = new Wa;
r.setAttribute("position", new ja([1, -1, 0, -1, 1, 0, -1, -1, 0, 1, 1, 0, -1, 1, 0, -1, -1, 0, 1, -1, 0, 1, 1, 0],3)),
r.computeBoundingSphere(),
super(r, new Dd({
color: n,
toneMapped: !1
})),
this.type = "PlaneHelper",
this.plane = e,
this.size = t;
const i = new Wa;
i.setAttribute("position", new ja([1, 1, 0, -1, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, 0, 1, -1, 0],3)),
i.computeBoundingSphere(),
this.add(new co(i,new ba({
color: n,
opacity: .2,
transparent: !0,
depthWrite: !1,
toneMapped: !1
})))
}
updateMatrixWorld(e) {
this.position.set(0, 0, 0),
this.scale.set(.5 * this.size, .5 * this.size, 1),
this.lookAt(this.plane.normal),
this.translateZ(-this.plane.constant),
super.updateMatrixWorld(e)
}
dispose() {
this.geometry.dispose(),
this.material.dispose(),
this.children[0].geometry.dispose(),
this.children[0].material.dispose()
}
}
const vg = new Qi;
let yg, xg;
class bg extends ea {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : new Qi(0,0,1)
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : new Qi(0,0,0)
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 1
, r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : 16776960
, i = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : .2 * n
, s = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : .2 * i;
super(),
this.type = "ArrowHelper",
void 0 === yg && (yg = new Wa,
yg.setAttribute("position", new ja([0, 0, 0, 0, 1, 0],3)),
xg = new Ih(0,.5,1,5,1),
xg.translate(0, -.5, 0)),
this.position.copy(t),
this.line = new Vd(yg,new Dd({
color: r,
toneMapped: !1
})),
this.line.matrixAutoUpdate = !1,
this.add(this.line),
this.cone = new co(xg,new ba({
color: r,
toneMapped: !1
})),
this.cone.matrixAutoUpdate = !1,
this.add(this.cone),
this.setDirection(e),
this.setLength(n, i, s)
}
setDirection(e) {
if (e.y > .99999)
this.quaternion.set(0, 0, 0, 1);
else if (e.y < -.99999)
this.quaternion.set(1, 0, 0, 0);
else {
vg.set(e.z, 0, -e.x).normalize();
const t = Math.acos(e.y);
this.quaternion.setFromAxisAngle(vg, t)
}
}
setLength(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : .2 * e
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : .2 * t;
this.line.scale.set(1, Math.max(1e-4, e - t), 1),
this.line.updateMatrix(),
this.cone.scale.set(n, t, n),
this.cone.position.y = e,
this.cone.updateMatrix()
}
setColor(e) {
this.line.material.color.set(e),
this.cone.material.color.set(e)
}
copy(e) {
return super.copy(e, !1),
this.line.copy(e.line),
this.cone.copy(e.cone),
this
}
dispose() {
this.line.geometry.dispose(),
this.line.material.dispose(),
this.cone.geometry.dispose(),
this.cone.material.dispose()
}
}
class _g extends Kd {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 1;
const t = [0, 0, 0, e, 0, 0, 0, 0, 0, 0, e, 0, 0, 0, 0, 0, 0, e]
, n = new Wa;
n.setAttribute("position", new ja(t,3)),
n.setAttribute("color", new ja([1, 0, 0, 1, .6, 0, 0, 1, 0, .6, 1, 0, 0, 0, 1, 0, .6, 1],3));
super(n, new Dd({
vertexColors: !0,
toneMapped: !1
})),
this.type = "AxesHelper"
}
setColors(e, t, n) {
const r = new ga
, i = this.geometry.attributes.color.array;
return r.set(e),
r.toArray(i, 0),
r.toArray(i, 3),
r.set(t),
r.toArray(i, 6),
r.toArray(i, 9),
r.set(n),
r.toArray(i, 12),
r.toArray(i, 15),
this.geometry.attributes.color.needsUpdate = !0,
this
}
dispose() {
this.geometry.dispose(),
this.material.dispose()
}
}
class wg {
constructor() {
this.type = "ShapePath",
this.color = new ga,
this.subPaths = [],
this.currentPath = null
}
moveTo(e, t) {
return this.currentPath = new Bh,
this.subPaths.push(this.currentPath),
this.currentPath.moveTo(e, t),
this
}
lineTo(e, t) {
return this.currentPath.lineTo(e, t),
this
}
quadraticCurveTo(e, t, n, r) {
return this.currentPath.quadraticCurveTo(e, t, n, r),
this
}
bezierCurveTo(e, t, n, r, i, s) {
return this.currentPath.bezierCurveTo(e, t, n, r, i, s),
this
}
splineThru(e) {
return this.currentPath.splineThru(e),
this
}
toShapes(e) {
function t(e, t) {
const n = t.length;
let r = !1;
for (let i = n - 1, s = 0; s < n; i = s++) {
let n = t[i]
, a = t[s]
, o = a.x - n.x
, l = a.y - n.y;
if (Math.abs(l) > Number.EPSILON) {
if (l < 0 && (n = t[s],
o = -o,
a = t[i],
l = -l),
e.y < n.y || e.y > a.y)
continue;
if (e.y === n.y) {
if (e.x === n.x)
return !0
} else {
const t = l * (e.x - n.x) - o * (e.y - n.y);
if (0 === t)
return !0;
if (t < 0)
continue;
r = !r
}
} else {
if (e.y !== n.y)
continue;
if (a.x <= e.x && e.x <= n.x || n.x <= e.x && e.x <= a.x)
return !0
}
}
return r
}
const n = mp.isClockWise
, r = this.subPaths;
if (0 === r.length)
return [];
let i, s, a;
const o = [];
if (1 === r.length)
return s = r[0],
a = new Hh,
a.curves = s.curves,
o.push(a),
o;
let l = !n(r[0].getPoints());
l = e ? !l : l;
const c = []
, u = [];
let d, h, p = [], f = 0;
u[f] = void 0,
p[f] = [];
for (let m = 0, g = r.length; m < g; m++)
s = r[m],
d = s.getPoints(),
i = n(d),
i = e ? !i : i,
i ? (!l && u[f] && f++,
u[f] = {
s: new Hh,
p: d
},
u[f].s.curves = s.curves,
l && f++,
p[f] = []) : p[f].push({
h: s,
p: d[0]
});
if (!u[0])
return function(e) {
const t = [];
for (let n = 0, r = e.length; n < r; n++) {
const r = e[n]
, i = new Hh;
i.curves = r.curves,
t.push(i)
}
return t
}(r);
if (u.length > 1) {
let e = !1
, n = 0;
for (let t = 0, r = u.length; t < r; t++)
c[t] = [];
for (let r = 0, i = u.length; r < i; r++) {
const i = p[r];
for (let s = 0; s < i.length; s++) {
const a = i[s];
let o = !0;
for (let i = 0; i < u.length; i++)
t(a.p, u[i].p) && (r !== i && n++,
o ? (o = !1,
c[i].push(a)) : e = !0);
o && c[r].push(a)
}
}
n > 0 && !1 === e && (p = c)
}
for (let m = 0, g = u.length; m < g; m++) {
a = u[m].s,
o.push(a),
h = p[m];
for (let e = 0, t = h.length; e < t; e++)
a.holes.push(h[e].h)
}
return o
}
}
class Sg extends Wi {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 1
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 1
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 1
, r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {};
console.warn('THREE.WebGLMultipleRenderTargets has been deprecated and will be removed in r172. Use THREE.WebGLRenderTarget and set the "count" parameter to enable MRT.'),
super(e, t, {
...r,
count: n
}),
this.isWebGLMultipleRenderTargets = !0
}
get texture() {
return this.textures
}
}
"undefined" !== typeof __THREE_DEVTOOLS__ && __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{
detail: {
revision: we
}
})),
"undefined" !== typeof window && (window.__THREE__ ? console.warn("WARNING: Multiple instances of Three.js being imported.") : window.__THREE__ = we);
var Ag = n(205);
function Mg(e) {
let t;
const n = new Set
, r = (e, r) => {
const i = "function" === typeof e ? e(t) : e;
if (i !== t) {
const e = t;
t = r ? i : Object.assign({}, t, i),
n.forEach((n => n(t, e)))
}
}
, i = () => t
, s = {
setState: r,
getState: i,
subscribe: (e, r, s) => r || s ? function(e) {
let r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : i
, s = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : Object.is;
console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");
let a = r(t);
function o() {
const n = r(t);
if (!s(a, n)) {
const t = a;
e(a = n, t)
}
}
return n.add(o),
() => n.delete(o)
}(e, r, s) : (n.add(e),
() => n.delete(e)),
destroy: () => n.clear()
};
return t = e(r, i, s),
s
}
const Cg = "undefined" === typeof window || !window.navigator || /ServerSideRendering|^Deno\//.test(window.navigator.userAgent) ? i.useEffect : i.useLayoutEffect;
var Eg = n(16)
, Tg = n.n(Eg)
, Rg = n(853);
const Bg = [];
function Pg(e, t) {
let n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : (e, t) => e === t;
if (e === t)
return !0;
if (!e || !t)
return !1;
const r = e.length;
if (t.length !== r)
return !1;
for (let i = 0; i < r; i++)
if (!n(e[i], t[i]))
return !1;
return !0
}
function kg(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : null
, n = arguments.length > 2 && void 0 !== arguments[2] && arguments[2]
, r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {};
null === t && (t = [e]);
for (const a of Bg)
if (Pg(t, a.keys, a.equal)) {
if (n)
return;
if (Object.prototype.hasOwnProperty.call(a, "error"))
throw a.error;
if (Object.prototype.hasOwnProperty.call(a, "response"))
return r.lifespan && r.lifespan > 0 && (a.timeout && clearTimeout(a.timeout),
a.timeout = setTimeout(a.remove, r.lifespan)),
a.response;
if (!n)
throw a.promise
}
const i = {
keys: t,
equal: r.equal,
remove: () => {
const e = Bg.indexOf(i);
-1 !== e && Bg.splice(e, 1)
}
,
promise: (s = e,
"object" === typeof s && "function" === typeof s.then ? e : e(...t)).then((e => {
i.response = e,
r.lifespan && r.lifespan > 0 && (i.timeout = setTimeout(i.remove, r.lifespan))
}
)).catch((e => i.error = e))
};
var s;
if (Bg.push(i),
!n)
throw i.promise
}
const Lg = (e, t, n) => kg(e, t, !1, n);
var Ig = n(579);
const Ng = {}
, Dg = e => {
Object.assign(Ng, e)
}
;
var jg, Fg;
const Og = e => "colorSpace"in e || "outputColorSpace"in e
, Ug = () => {
var e;
return null != (e = Ng.ColorManagement) ? e : null
}
, zg = e => e && e.isOrthographicCamera
, Gg = "undefined" !== typeof window && (null != (jg = window.document) && jg.createElement || "ReactNative" === (null == (Fg = window.navigator) ? void 0 : Fg.product)) ? i.useLayoutEffect : i.useEffect;
function Hg(e) {
const t = i.useRef(e);
return Gg(( () => {
t.current = e
}
), [e]),
t
}
function Vg(e) {
let {set: t} = e;
return Gg(( () => (t(new Promise(( () => null))),
() => t(!1))), [t]),
null
}
class Wg extends i.Component {
constructor() {
super(...arguments),
this.state = {
error: !1
}
}
componentDidCatch(e) {
this.props.set(e)
}
render() {
return this.state.error ? null : this.props.children
}
}
Wg.getDerivedStateFromError = () => ({
error: !0
});
const Jg = "__default"
, Xg = new Map
, Kg = e => e && !!e.memoized && !!e.changes;
function qg(e) {
var t;
const n = "undefined" !== typeof window ? null != (t = window.devicePixelRatio) ? t : 2 : 1;
return Array.isArray(e) ? Math.min(Math.max(e[0], n), e[1]) : e
}
const Yg = e => {
var t;
return null == (t = e.__r3f) ? void 0 : t.root.getState()
}
;
function Qg(e) {
let t = e.__r3f.root;
for (; t.getState().previousRoot; )
t = t.getState().previousRoot;
return t
}
const Zg = {
obj: e => e === Object(e) && !Zg.arr(e) && "function" !== typeof e,
fun: e => "function" === typeof e,
str: e => "string" === typeof e,
num: e => "number" === typeof e,
boo: e => "boolean" === typeof e,
und: e => void 0 === e,
arr: e => Array.isArray(e),
equ(e, t) {
let {arrays: n="shallow", objects: r="reference", strict: i=!0} = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {};
if (typeof e !== typeof t || !!e !== !!t)
return !1;
if (Zg.str(e) || Zg.num(e) || Zg.boo(e))
return e === t;
const s = Zg.obj(e);
if (s && "reference" === r)
return e === t;
const a = Zg.arr(e);
if (a && "reference" === n)
return e === t;
if ((a || s) && e === t)
return !0;
let o;
for (o in e)
if (!(o in t))
return !1;
if (s && "shallow" === n && "shallow" === r) {
for (o in i ? t : e)
if (!Zg.equ(e[o], t[o], {
strict: i,
objects: "reference"
}))
return !1
} else
for (o in i ? t : e)
if (e[o] !== t[o])
return !1;
if (Zg.und(o)) {
if (a && 0 === e.length && 0 === t.length)
return !0;
if (s && 0 === Object.keys(e).length && 0 === Object.keys(t).length)
return !0;
if (e !== t)
return !1
}
return !0
}
};
function $g(e) {
const t = {
nodes: {},
materials: {}
};
return e && e.traverse((e => {
e.name && (t.nodes[e.name] = e),
e.material && !t.materials[e.material.name] && (t.materials[e.material.name] = e.material)
}
)),
t
}
function ev(e, t) {
return e.__r3f = {
type: "",
root: null,
previousAttach: null,
memoizedProps: {},
eventCount: 0,
handlers: {},
objects: [],
parent: null,
...t
},
e
}
function tv(e, t) {
let n = e;
if (t.includes("-")) {
const r = t.split("-")
, i = r.pop();
return n = r.reduce(( (e, t) => e[t]), e),
{
target: n,
key: i
}
}
return {
target: n,
key: t
}
}
const nv = /-\d+$/;
function rv(e, t, n) {
if (Zg.str(n)) {
if (nv.test(n)) {
const t = n.replace(nv, "")
, {target: r, key: i} = tv(e, t);
Array.isArray(r[i]) || (r[i] = [])
}
const {target: r, key: i} = tv(e, n);
t.__r3f.previousAttach = r[i],
r[i] = t
} else
t.__r3f.previousAttach = n(e, t)
}
function iv(e, t, n) {
var r, i;
if (Zg.str(n)) {
const {target: r, key: i} = tv(e, n)
, s = t.__r3f.previousAttach;
void 0 === s ? delete r[i] : r[i] = s
} else
null == (r = t.__r3f) || null == r.previousAttach || r.previousAttach(e, t);
null == (i = t.__r3f) || delete i.previousAttach
}
function sv(e, t) {
let {children: n, key: r, ref: i, ...s} = t
, {children: a, key: o, ref: l, ...c} = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}
, u = arguments.length > 3 && void 0 !== arguments[3] && arguments[3];
const d = e.__r3f
, h = Object.entries(s)
, p = [];
if (u) {
const e = Object.keys(c);
for (let t = 0; t < e.length; t++)
s.hasOwnProperty(e[t]) || h.unshift([e[t], Jg + "remove"])
}
h.forEach((t => {
let[n,r] = t;
var i;
if (null != (i = e.__r3f) && i.primitive && "object" === n)
return;
if (Zg.equ(r, c[n]))
return;
if (/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/.test(n))
return p.push([n, r, !0, []]);
let a = [];
n.includes("-") && (a = n.split("-")),
p.push([n, r, !1, a]);
for (const e in s) {
const t = s[e];
e.startsWith("".concat(n, "-")) && p.push([e, t, !1, e.split("-")])
}
}
));
const f = {
...s
};
return null != d && d.memoizedProps && null != d && d.memoizedProps.args && (f.args = d.memoizedProps.args),
null != d && d.memoizedProps && null != d && d.memoizedProps.attach && (f.attach = d.memoizedProps.attach),
{
memoized: f,
changes: p
}
}
const av = "undefined" !== typeof process && !1;
function ov(e, t) {
var n;
const r = e.__r3f
, i = null == r ? void 0 : r.root
, s = null == i || null == i.getState ? void 0 : i.getState()
, {memoized: a, changes: o} = Kg(t) ? t : sv(e, t)
, l = null == r ? void 0 : r.eventCount;
e.__r3f && (e.__r3f.memoizedProps = a);
for (let c = 0; c < o.length; c++) {
let[t,n,i,a] = o[c];
if (Og(e)) {
const e = 3001
, r = "srgb"
, i = "srgb-linear";
"encoding" === t ? (t = "colorSpace",
n = n === e ? r : i) : "outputEncoding" === t && (t = "outputColorSpace",
n = n === e ? r : i)
}
let l = e
, u = l[t];
if (a.length && (u = a.reduce(( (e, t) => e[t]), e),
!u || !u.set)) {
const [n,...r] = a.reverse();
l = r.reverse().reduce(( (e, t) => e[t]), e),
t = n
}
if (n === Jg + "remove")
if (l.constructor) {
let e = Xg.get(l.constructor);
e || (e = new l.constructor,
Xg.set(l.constructor, e)),
n = e[t]
} else
n = 0;
if (i && r)
n ? r.handlers[t] = n : delete r.handlers[t],
r.eventCount = Object.keys(r.handlers).length;
else if (u && u.set && (u.copy || u instanceof Fs)) {
if (Array.isArray(n))
u.fromArray ? u.fromArray(n) : u.set(...n);
else if (u.copy && n && n.constructor && (av ? u.constructor.name === n.constructor.name : u.constructor === n.constructor))
u.copy(n);
else if (void 0 !== n) {
const e = u instanceof ga;
!e && u.setScalar ? u.setScalar(n) : u instanceof Fs && n instanceof Fs ? u.mask = n.mask : u.set(n),
!Ug() && s && !s.linear && e && u.convertSRGBToLinear()
}
} else if (l[t] = n,
l[t]instanceof Gi && l[t].format === cn && l[t].type === Kt && s) {
const e = l[t];
Og(e) && Og(s.gl) ? e.colorSpace = s.gl.outputColorSpace : e.encoding = s.gl.outputEncoding
}
lv(e)
}
if (r && r.parent && e.raycast && l !== r.eventCount) {
const t = Qg(e).getState().internal
, n = t.interaction.indexOf(e);
n > -1 && t.interaction.splice(n, 1),
r.eventCount && t.interaction.push(e)
}
return !(1 === o.length && "onUpdate" === o[0][0]) && o.length && null != (n = e.__r3f) && n.parent && cv(e),
e
}
function lv(e) {
var t, n;
const r = null == (t = e.__r3f) || null == (n = t.root) || null == n.getState ? void 0 : n.getState();
r && 0 === r.internal.frames && r.invalidate()
}
function cv(e) {
null == e.onUpdate || e.onUpdate(e)
}
function uv(e, t) {
e.manual || (zg(e) ? (e.left = t.width / -2,
e.right = t.width / 2,
e.top = t.height / 2,
e.bottom = t.height / -2) : e.aspect = t.width / t.height,
e.updateProjectionMatrix(),
e.updateMatrixWorld())
}
function dv(e) {
return (e.eventObject || e.object).uuid + "/" + e.index + e.instanceId
}
function hv(e, t, n, r) {
const i = n.get(t);
i && (n.delete(t),
0 === n.size && (e.delete(r),
i.target.releasePointerCapture(r)))
}
function pv(e) {
function t(e) {
return e.filter((e => ["Move", "Over", "Enter", "Out", "Leave"].some((t => {
var n;
return null == (n = e.__r3f) ? void 0 : n.handlers["onPointer" + t]
}
))))
}
function n(t) {
const {internal: n} = e.getState();
for (const e of n.hovered.values())
if (!t.length || !t.find((t => t.object === e.object && t.index === e.index && t.instanceId === e.instanceId))) {
const r = e.eventObject.__r3f
, i = null == r ? void 0 : r.handlers;
if (n.hovered.delete(dv(e)),
null != r && r.eventCount) {
const n = {
...e,
intersections: t
};
null == i.onPointerOut || i.onPointerOut(n),
null == i.onPointerLeave || i.onPointerLeave(n)
}
}
}
function r(e, t) {
for (let n = 0; n < t.length; n++) {
const r = t[n].__r3f;
null == r || null == r.handlers.onPointerMissed || r.handlers.onPointerMissed(e)
}
}
return {
handlePointer: function(i) {
switch (i) {
case "onPointerLeave":
case "onPointerCancel":
return () => n([]);
case "onLostPointerCapture":
return t => {
const {internal: r} = e.getState();
"pointerId"in t && r.capturedMap.has(t.pointerId) && requestAnimationFrame(( () => {
r.capturedMap.has(t.pointerId) && (r.capturedMap.delete(t.pointerId),
n([]))
}
))
}
}
return function(s) {
const {onPointerMissed: a, internal: o} = e.getState();
o.lastEvent.current = s;
const l = "onPointerMove" === i
, c = "onClick" === i || "onContextMenu" === i || "onDoubleClick" === i
, u = function(t, n) {
const r = e.getState()
, i = new Set
, s = []
, a = n ? n(r.internal.interaction) : r.internal.interaction;
for (let e = 0; e < a.length; e++) {
const t = Yg(a[e]);
t && (t.raycaster.camera = void 0)
}
r.previousRoot || null == r.events.compute || r.events.compute(t, r);
let o = a.flatMap((function(e) {
const n = Yg(e);
return n && n.events.enabled && null !== n.raycaster.camera ? (void 0 === n.raycaster.camera && (null == n.events.compute || n.events.compute(t, n, null == (r = n.previousRoot) ? void 0 : r.getState()),
void 0 === n.raycaster.camera && (n.raycaster.camera = null)),
n.raycaster.camera ? n.raycaster.intersectObject(e, !0) : []) : [];
var r
}
)).sort(( (e, t) => {
const n = Yg(e.object)
, r = Yg(t.object);
return n && r && r.events.priority - n.events.priority || e.distance - t.distance
}
)).filter((e => {
const t = dv(e);
return !i.has(t) && (i.add(t),
!0)
}
));
r.events.filter && (o = r.events.filter(o, r));
for (const e of o) {
let t = e.object;
for (; t; ) {
var l;
null != (l = t.__r3f) && l.eventCount && s.push({
...e,
eventObject: t
}),
t = t.parent
}
}
if ("pointerId"in t && r.internal.capturedMap.has(t.pointerId))
for (let e of r.internal.capturedMap.get(t.pointerId).values())
i.has(dv(e.intersection)) || s.push(e.intersection);
return s
}(s, l ? t : void 0)
, d = c ? function(t) {
const {internal: n} = e.getState()
, r = t.offsetX - n.initialClick[0]
, i = t.offsetY - n.initialClick[1];
return Math.round(Math.sqrt(r * r + i * i))
}(s) : 0;
"onPointerDown" === i && (o.initialClick = [s.offsetX, s.offsetY],
o.initialHits = u.map((e => e.eventObject))),
c && !u.length && d <= 2 && (r(s, o.interaction),
a && a(s)),
l && n(u),
function(t, r, i, s) {
const a = e.getState();
if (t.length) {
const e = {
stopped: !1
};
for (const o of t) {
const l = Yg(o.object) || a
, {raycaster: c, pointer: u, camera: d, internal: h} = l
, p = new Qi(u.x,u.y,0).unproject(d)
, f = e => {
var t, n;
return null != (t = null == (n = h.capturedMap.get(e)) ? void 0 : n.has(o.eventObject)) && t
}
, m = e => {
const t = {
intersection: o,
target: r.target
};
h.capturedMap.has(e) ? h.capturedMap.get(e).set(o.eventObject, t) : h.capturedMap.set(e, new Map([[o.eventObject, t]])),
r.target.setPointerCapture(e)
}
, g = e => {
const t = h.capturedMap.get(e);
t && hv(h.capturedMap, o.eventObject, t, e)
}
;
let v = {};
for (let e in r) {
let t = r[e];
"function" !== typeof t && (v[e] = t)
}
let y = {
...o,
...v,
pointer: u,
intersections: t,
stopped: e.stopped,
delta: i,
unprojectedPoint: p,
ray: c.ray,
camera: d,
stopPropagation() {
const i = "pointerId"in r && h.capturedMap.get(r.pointerId);
(!i || i.has(o.eventObject)) && (y.stopped = e.stopped = !0,
h.hovered.size && Array.from(h.hovered.values()).find((e => e.eventObject === o.eventObject))) && n([...t.slice(0, t.indexOf(o)), o])
},
target: {
hasPointerCapture: f,
setPointerCapture: m,
releasePointerCapture: g
},
currentTarget: {
hasPointerCapture: f,
setPointerCapture: m,
releasePointerCapture: g
},
nativeEvent: r
};
if (s(y),
!0 === e.stopped)
break
}
}
}(u, s, d, (function(e) {
const t = e.eventObject
, n = t.__r3f
, a = null == n ? void 0 : n.handlers;
if (null != n && n.eventCount)
if (l) {
if (a.onPointerOver || a.onPointerEnter || a.onPointerOut || a.onPointerLeave) {
const t = dv(e)
, n = o.hovered.get(t);
n ? n.stopped && e.stopPropagation() : (o.hovered.set(t, e),
null == a.onPointerOver || a.onPointerOver(e),
null == a.onPointerEnter || a.onPointerEnter(e))
}
null == a.onPointerMove || a.onPointerMove(e)
} else {
const n = a[i];
n ? c && !o.initialHits.includes(t) || (r(s, o.interaction.filter((e => !o.initialHits.includes(e)))),
n(e)) : c && o.initialHits.includes(t) && r(s, o.interaction.filter((e => !o.initialHits.includes(e))))
}
}
))
}
}
}
}
const fv = e => !(null == e || !e.render)
, mv = i.createContext(null)
, gv = (e, t) => {
const n = function(e) {
const t = "function" === typeof e ? Mg(e) : e
, n = function() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : t.getState
, n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : Object.is;
const [,r] = (0,
i.useReducer)((e => e + 1), 0)
, s = t.getState()
, a = (0,
i.useRef)(s)
, o = (0,
i.useRef)(e)
, l = (0,
i.useRef)(n)
, c = (0,
i.useRef)(!1)
, u = (0,
i.useRef)();
let d;
void 0 === u.current && (u.current = e(s));
let h = !1;
(a.current !== s || o.current !== e || l.current !== n || c.current) && (d = e(s),
h = !n(u.current, d)),
Cg(( () => {
h && (u.current = d),
a.current = s,
o.current = e,
l.current = n,
c.current = !1
}
));
const p = (0,
i.useRef)(s);
Cg(( () => {
const e = () => {
try {
const e = t.getState()
, n = o.current(e);
l.current(u.current, n) || (a.current = e,
u.current = n,
r())
} catch (iy) {
c.current = !0,
r()
}
}
, n = t.subscribe(e);
return t.getState() !== p.current && e(),
n
}
), []);
const f = h ? d : u.current;
return (0,
i.useDebugValue)(f),
f
};
return Object.assign(n, t),
n[Symbol.iterator] = function() {
console.warn("[useStore, api] = create() is deprecated and will be removed in v4");
const e = [n, t];
return {
next() {
const t = e.length <= 0;
return {
value: e.shift(),
done: t
}
}
}
}
,
n
}(( (n, r) => {
const s = new Qi
, a = new Qi
, o = new Qi;
function l() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : r().camera
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : a
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : r().size;
const {width: i, height: l, top: c, left: u} = n
, d = i / l;
t instanceof Qi ? o.copy(t) : o.set(...t);
const h = e.getWorldPosition(s).distanceTo(o);
if (zg(e))
return {
width: i / e.zoom,
height: l / e.zoom,
top: c,
left: u,
factor: 1,
distance: h,
aspect: d
};
{
const t = e.fov * Math.PI / 180
, n = 2 * Math.tan(t / 2) * h
, r = n * (i / l);
return {
width: r,
height: n,
top: c,
left: u,
factor: i / r,
distance: h,
aspect: d
}
}
}
let c;
const u = e => n((t => ({
performance: {
...t.performance,
current: e
}
})))
, d = new xi
, h = {
set: n,
get: r,
gl: null,
camera: null,
raycaster: null,
events: {
priority: 1,
enabled: !0,
connected: !1
},
xr: null,
scene: null,
invalidate: function() {
let t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 1;
return e(r(), t)
},
advance: (e, n) => t(e, n, r()),
legacy: !1,
linear: !1,
flat: !1,
controls: null,
clock: new rm,
pointer: d,
mouse: d,
frameloop: "always",
onPointerMissed: void 0,
performance: {
current: 1,
min: .5,
max: 1,
debounce: 200,
regress: () => {
const e = r();
c && clearTimeout(c),
e.performance.current !== e.performance.min && u(e.performance.min),
c = setTimeout(( () => u(r().performance.max)), e.performance.debounce)
}
},
size: {
width: 0,
height: 0,
top: 0,
left: 0,
updateStyle: !1
},
viewport: {
initialDpr: 0,
dpr: 0,
width: 0,
height: 0,
top: 0,
left: 0,
aspect: 0,
distance: 0,
factor: 0,
getCurrentViewport: l
},
setEvents: e => n((t => ({
...t,
events: {
...t.events,
...e
}
}))),
setSize: (e, t, i, s, o) => {
const c = r().camera
, u = {
width: e,
height: t,
top: s || 0,
left: o || 0,
updateStyle: i
};
n((e => ({
size: u,
viewport: {
...e.viewport,
...l(c, a, u)
}
})))
}
,
setDpr: e => n((t => {
const n = qg(e);
return {
viewport: {
...t.viewport,
dpr: n,
initialDpr: t.viewport.initialDpr || n
}
}
}
)),
setFrameloop: function() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "always";
const t = r().clock;
t.stop(),
t.elapsedTime = 0,
"never" !== e && (t.start(),
t.elapsedTime = 0),
n(( () => ({
frameloop: e
})))
},
previousRoot: void 0,
internal: {
active: !1,
priority: 0,
frames: 0,
lastEvent: i.createRef(),
interaction: [],
hovered: new Map,
subscribers: [],
initialClick: [0, 0],
initialHits: [],
capturedMap: new Map,
subscribe: (e, t, n) => {
const i = r().internal;
return i.priority = i.priority + (t > 0 ? 1 : 0),
i.subscribers.push({
ref: e,
priority: t,
store: n
}),
i.subscribers = i.subscribers.sort(( (e, t) => e.priority - t.priority)),
() => {
const n = r().internal;
null != n && n.subscribers && (n.priority = n.priority - (t > 0 ? 1 : 0),
n.subscribers = n.subscribers.filter((t => t.ref !== e)))
}
}
}
};
return h
}
))
, r = n.getState();
let s = r.size
, a = r.viewport.dpr
, o = r.camera;
return n.subscribe(( () => {
const {camera: e, size: t, viewport: r, gl: i, set: l} = n.getState();
if (t.width !== s.width || t.height !== s.height || r.dpr !== a) {
var c;
s = t,
a = r.dpr,
uv(e, t),
i.setPixelRatio(r.dpr);
const n = null != (c = t.updateStyle) ? c : "undefined" !== typeof HTMLCanvasElement && i.domElement instanceof HTMLCanvasElement;
i.setSize(t.width, t.height, n)
}
e !== o && (o = e,
l((t => ({
viewport: {
...t.viewport,
...t.viewport.getCurrentViewport(e)
}
}))))
}
)),
n.subscribe((t => e(t))),
n
}
;
let vv, yv = new Set, xv = new Set, bv = new Set;
function _v(e, t) {
if (e.size)
for (const {callback: n} of e.values())
n(t)
}
function wv(e, t) {
switch (e) {
case "before":
return _v(yv, t);
case "after":
return _v(xv, t);
case "tail":
return _v(bv, t)
}
}
let Sv, Av;
function Mv(e, t, n) {
let r = t.clock.getDelta();
for ("never" === t.frameloop && "number" === typeof e && (r = e - t.clock.elapsedTime,
t.clock.oldTime = t.clock.elapsedTime,
t.clock.elapsedTime = e),
Sv = t.internal.subscribers,
vv = 0; vv < Sv.length; vv++)
Av = Sv[vv],
Av.ref.current(Av.store.getState(), r, n);
return !t.internal.priority && t.gl.render && t.gl.render(t.scene, t.camera),
t.internal.frames = Math.max(0, t.internal.frames - 1),
"always" === t.frameloop ? 1 : t.internal.frames
}
function Cv() {
const e = i.useContext(mv);
if (!e)
throw new Error("R3F: Hooks can only be used within the Canvas component!");
return e
}
const Ev = new WeakMap;
function Tv(e, t) {
return function(n) {
let r = Ev.get(n);
r || (r = new n,
Ev.set(n, r)),
e && e(r);
for (var i = arguments.length, s = new Array(i > 1 ? i - 1 : 0), a = 1; a < i; a++)
s[a - 1] = arguments[a];
return Promise.all(s.map((e => new Promise(( (n, i) => r.load(e, (e => {
e.scene && Object.assign(e, $g(e.scene)),
n(e)
}
), t, (t => i(new Error("Could not load ".concat(e, ": ").concat(null == t ? void 0 : t.message))))))))))
}
}
function Rv(e, t, n, r) {
const i = Array.isArray(t) ? t : [t]
, s = Lg(Tv(n, r), [e, ...i], {
equal: Zg.equ
});
return Array.isArray(t) ? s : s[0]
}
Rv.preload = function(e, t, n) {
const r = Array.isArray(t) ? t : [t];
return ( (e, t, n) => {
kg(e, t, !0, n)
}
)(Tv(n), [e, ...r])
}
,
Rv.clear = function(e, t) {
return (e => {
if (void 0 === e || 0 === e.length)
Bg.splice(0, Bg.length);
else {
const t = Bg.find((t => Pg(e, t.keys, t.equal)));
t && t.remove()
}
}
)([e, ...Array.isArray(t) ? t : [t]])
}
;
const Bv = new Map
, {invalidate: Pv, advance: kv} = function(e) {
let t, n, r, i = !1, s = !1;
function a(o) {
n = requestAnimationFrame(a),
i = !0,
t = 0,
wv("before", o),
s = !0;
for (const n of e.values()) {
var l;
r = n.store.getState(),
!r.internal.active || !("always" === r.frameloop || r.internal.frames > 0) || null != (l = r.gl.xr) && l.isPresenting || (t += Mv(o, r))
}
if (s = !1,
wv("after", o),
0 === t)
return wv("tail", o),
i = !1,
cancelAnimationFrame(n)
}
return {
loop: a,
invalidate: function t(n) {
let r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 1;
var o;
if (!n)
return e.forEach((e => t(e.store.getState(), r)));
null != (o = n.gl.xr) && o.isPresenting || !n.internal.active || "never" === n.frameloop || (n.internal.frames = r > 1 ? Math.min(60, n.internal.frames + r) : s ? 2 : 1,
i || (i = !0,
requestAnimationFrame(a)))
},
advance: function(t) {
let n = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1]
, r = arguments.length > 2 ? arguments[2] : void 0
, i = arguments.length > 3 ? arguments[3] : void 0;
if (n && wv("before", t),
r)
Mv(t, r, i);
else
for (const s of e.values())
Mv(t, s.store.getState());
n && wv("after", t)
}
}
}(Bv)
, {reconciler: Lv, applyProps: Iv} = function(e, t) {
function n(e, t, n) {
let r, {args: i=[], attach: s, ...a} = t, o = "".concat(e[0].toUpperCase()).concat(e.slice(1));
if ("primitive" === e) {
if (void 0 === a.object)
throw new Error("R3F: Primitives without 'object' are invalid!");
r = ev(a.object, {
type: e,
root: n,
attach: s,
primitive: !0
})
} else {
const t = Ng[o];
if (!t)
throw new Error("R3F: ".concat(o, " is not part of the THREE namespace! Did you forget to extend? See: https://docs.pmnd.rs/react-three-fiber/api/objects#using-3rd-party-objects-declaratively"));
if (!Array.isArray(i))
throw new Error("R3F: The args prop must be an array!");
r = ev(new t(...i), {
type: e,
root: n,
attach: s,
memoizedProps: {
args: i
}
})
}
return void 0 === r.__r3f.attach && (r instanceof Wa ? r.__r3f.attach = "geometry" : r instanceof xa && (r.__r3f.attach = "material")),
"inject" !== o && ov(r, a),
r
}
function r(e, t) {
let n = !1;
var r, i;
t && (null != (r = t.__r3f) && r.attach ? rv(e, t, t.__r3f.attach) : t.isObject3D && e.isObject3D && (e.add(t),
n = !0),
n || null == (i = e.__r3f) || i.objects.push(t),
t.__r3f || ev(t, {}),
t.__r3f.parent = e,
cv(t),
lv(t))
}
function i(e, t, n) {
let r = !1;
if (t) {
var i, s;
if (null != (i = t.__r3f) && i.attach)
rv(e, t, t.__r3f.attach);
else if (t.isObject3D && e.isObject3D) {
t.parent = e,
t.dispatchEvent({
type: "added"
}),
e.dispatchEvent({
type: "childadded",
child: t
});
const i = e.children.filter((e => e !== t))
, s = i.indexOf(n);
e.children = [...i.slice(0, s), t, ...i.slice(s)],
r = !0
}
r || null == (s = e.__r3f) || s.objects.push(t),
t.__r3f || ev(t, {}),
t.__r3f.parent = e,
cv(t),
lv(t)
}
}
function s(e, t) {
let n = arguments.length > 2 && void 0 !== arguments[2] && arguments[2];
e && [...e].forEach((e => a(t, e, n)))
}
function a(e, t, n) {
if (t) {
var r, i, a;
if (t.__r3f && (t.__r3f.parent = null),
null != (r = e.__r3f) && r.objects && (e.__r3f.objects = e.__r3f.objects.filter((e => e !== t))),
null != (i = t.__r3f) && i.attach)
iv(e, t, t.__r3f.attach);
else if (t.isObject3D && e.isObject3D) {
var o;
e.remove(t),
null != (o = t.__r3f) && o.root && function(e, t) {
const {internal: n} = e.getState();
n.interaction = n.interaction.filter((e => e !== t)),
n.initialHits = n.initialHits.filter((e => e !== t)),
n.hovered.forEach(( (e, r) => {
e.eventObject !== t && e.object !== t || n.hovered.delete(r)
}
)),
n.capturedMap.forEach(( (e, r) => {
hv(n.capturedMap, t, e, r)
}
))
}(Qg(t), t)
}
const c = null == (a = t.__r3f) ? void 0 : a.primitive
, u = !c && (void 0 === n ? null !== t.dispose : n);
var l;
if (!c)
s(null == (l = t.__r3f) ? void 0 : l.objects, t, u),
s(t.children, t, u);
if (delete t.__r3f,
u && t.dispose && "Scene" !== t.type) {
const e = () => {
try {
t.dispose()
} catch (CB) {}
}
;
"undefined" === typeof IS_REACT_ACT_ENVIRONMENT ? (0,
Rg.unstable_scheduleCallback)(Rg.unstable_IdlePriority, e) : e()
}
lv(e)
}
}
const o = () => console.warn("Text is not allowed in the R3F tree! This could be stray whitespace or characters.");
return {
reconciler: Tg()({
createInstance: n,
removeChild: a,
appendChild: r,
appendInitialChild: r,
insertBefore: i,
supportsMutation: !0,
isPrimaryRenderer: !1,
supportsPersistence: !1,
supportsHydration: !1,
noTimeout: -1,
appendChildToContainer: (e, t) => {
if (!t)
return;
const n = e.getState().scene;
n.__r3f && (n.__r3f.root = e,
r(n, t))
}
,
removeChildFromContainer: (e, t) => {
t && a(e.getState().scene, t)
}
,
insertInContainerBefore: (e, t, n) => {
if (!t || !n)
return;
const r = e.getState().scene;
r.__r3f && i(r, t, n)
}
,
getRootHostContext: () => null,
getChildHostContext: e => e,
finalizeInitialChildren(e) {
var t;
const n = null != (t = null == e ? void 0 : e.__r3f) ? t : {};
return Boolean(n.handlers)
},
prepareUpdate(e, t, n, r) {
var i;
if ((null != (i = null == e ? void 0 : e.__r3f) ? i : {}).primitive && r.object && r.object !== e)
return [!0];
{
const {args: t=[], children: i, ...s} = r
, {args: a=[], children: o, ...l} = n;
if (!Array.isArray(t))
throw new Error("R3F: the args prop must be an array!");
if (t.some(( (e, t) => e !== a[t])))
return [!0];
const c = sv(e, s, l, !0);
return c.changes.length ? [!1, c] : null
}
},
commitUpdate(e, t, i, s, o, l) {
let[c,u] = t;
c ? function(e, t, i, s) {
var o;
const l = null == (o = e.__r3f) ? void 0 : o.parent;
if (!l)
return;
const c = n(t, i, e.__r3f.root);
if (e.children) {
for (const t of e.children)
t.__r3f && r(c, t);
e.children = e.children.filter((e => !e.__r3f))
}
e.__r3f.objects.forEach((e => r(c, e))),
e.__r3f.objects = [],
e.__r3f.autoRemovedBeforeAppend || a(l, e),
c.parent && (c.__r3f.autoRemovedBeforeAppend = !0),
r(l, c),
c.raycast && c.__r3f.eventCount && Qg(c).getState().internal.interaction.push(c);
[s, s.alternate].forEach((e => {
null !== e && (e.stateNode = c,
e.ref && ("function" === typeof e.ref ? e.ref(c) : e.ref.current = c))
}
))
}(e, i, o, l) : ov(e, u)
},
commitMount(e, t, n, r) {
var i;
const s = null != (i = e.__r3f) ? i : {};
e.raycast && s.handlers && s.eventCount && Qg(e).getState().internal.interaction.push(e)
},
getPublicInstance: e => e,
prepareForCommit: () => null,
preparePortalMount: e => ev(e.getState().scene),
resetAfterCommit: () => {}
,
shouldSetTextContent: () => !1,
clearContainer: () => !1,
hideInstance(e) {
var t;
const {attach: n, parent: r} = null != (t = e.__r3f) ? t : {};
n && r && iv(r, e, n),
e.isObject3D && (e.visible = !1),
lv(e)
},
unhideInstance(e, t) {
var n;
const {attach: r, parent: i} = null != (n = e.__r3f) ? n : {};
r && i && rv(i, e, r),
(e.isObject3D && null == t.visible || t.visible) && (e.visible = !0),
lv(e)
},
createTextInstance: o,
hideTextInstance: o,
unhideTextInstance: o,
getCurrentEventPriority: () => t ? t() : Ag.DefaultEventPriority,
beforeActiveInstanceBlur: () => {}
,
afterActiveInstanceBlur: () => {}
,
detachDeletedInstance: () => {}
,
now: "undefined" !== typeof performance && Zg.fun(performance.now) ? performance.now : Zg.fun(Date.now) ? Date.now : () => 0,
scheduleTimeout: Zg.fun(setTimeout) ? setTimeout : void 0,
cancelTimeout: Zg.fun(clearTimeout) ? clearTimeout : void 0
}),
applyProps: ov
}
}(0, (function() {
var e;
const t = "undefined" !== typeof self && self || "undefined" !== typeof window && window;
if (!t)
return Ag.DefaultEventPriority;
switch (null == (e = t.event) ? void 0 : e.type) {
case "click":
case "contextmenu":
case "dblclick":
case "pointercancel":
case "pointerdown":
case "pointerup":
return Ag.DiscreteEventPriority;
case "pointermove":
case "pointerout":
case "pointerover":
case "pointerenter":
case "pointerleave":
case "wheel":
return Ag.ContinuousEventPriority;
default:
return Ag.DefaultEventPriority
}
}
))
, Nv = {
objects: "shallow",
strict: !1
}
, Dv = (e, t) => {
const n = "function" === typeof e ? e(t) : e;
return fv(n) ? n : new bu({
powerPreference: "high-performance",
canvas: t,
antialias: !0,
alpha: !0,
...e
})
}
;
function jv(e) {
const t = Bv.get(e)
, n = null == t ? void 0 : t.fiber
, r = null == t ? void 0 : t.store;
t && console.warn("R3F.createRoot should only be called once!");
const i = "function" === typeof reportError ? reportError : console.error
, s = r || gv(Pv, kv)
, a = n || Lv.createContainer(s, Ag.ConcurrentRoot, null, !1, null, "", i, null);
let o;
t || Bv.set(e, {
fiber: a,
store: s
});
let l, c = !1;
return {
configure() {
let t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}
, {gl: n, size: r, scene: i, events: a, onCreated: u, shadows: d=!1, linear: h=!1, flat: p=!1, legacy: f=!1, orthographic: m=!1, frameloop: g="always", dpr: v=[1, 2], performance: y, raycaster: x, camera: b, onPointerMissed: _} = t
, w = s.getState()
, S = w.gl;
w.gl || w.set({
gl: S = Dv(n, e)
});
let A = w.raycaster;
A || w.set({
raycaster: A = new Nm
});
const {params: M, ...C} = x || {};
if (Zg.equ(C, A, Nv) || Iv(A, {
...C
}),
Zg.equ(M, A.params, Nv) || Iv(A, {
params: {
...A.params,
...M
}
}),
!w.camera || w.camera === l && !Zg.equ(l, b, Nv)) {
l = b;
const e = b instanceof yo
, t = e ? b : m ? new qo(0,0,0,0,.1,1e3) : new wo(75,0,.1,1e3);
e || (t.position.z = 5,
b && (Iv(t, b),
("aspect"in b || "left"in b || "right"in b || "bottom"in b || "top"in b) && (t.manual = !0,
t.updateProjectionMatrix())),
w.camera || null != b && b.rotation || t.lookAt(0, 0, 0)),
w.set({
camera: t
}),
A.camera = t
}
if (!w.scene) {
let e;
i instanceof Su ? e = i : (e = new Su,
i && Iv(e, i)),
w.set({
scene: ev(e)
})
}
if (!w.xr) {
var E;
const e = (e, t) => {
const n = s.getState();
"never" !== n.frameloop && kv(e, !0, n, t)
}
, t = () => {
const t = s.getState();
t.gl.xr.enabled = t.gl.xr.isPresenting,
t.gl.xr.setAnimationLoop(t.gl.xr.isPresenting ? e : null),
t.gl.xr.isPresenting || Pv(t)
}
, n = {
connect() {
const e = s.getState().gl;
e.xr.addEventListener("sessionstart", t),
e.xr.addEventListener("sessionend", t)
},
disconnect() {
const e = s.getState().gl;
e.xr.removeEventListener("sessionstart", t),
e.xr.removeEventListener("sessionend", t)
}
};
"function" === typeof (null == (E = S.xr) ? void 0 : E.addEventListener) && n.connect(),
w.set({
xr: n
})
}
if (S.shadowMap) {
const e = S.shadowMap.enabled
, t = S.shadowMap.type;
if (S.shadowMap.enabled = !!d,
Zg.boo(d))
S.shadowMap.type = Pe;
else if (Zg.str(d)) {
var T;
const e = {
basic: Re,
percentage: Be,
soft: Pe,
variance: ke
};
S.shadowMap.type = null != (T = e[d]) ? T : Pe
} else
Zg.obj(d) && Object.assign(S.shadowMap, d);
e === S.shadowMap.enabled && t === S.shadowMap.type || (S.shadowMap.needsUpdate = !0)
}
const R = Ug();
if (R && ("enabled"in R ? R.enabled = !f : "legacyMode"in R && (R.legacyMode = f)),
!c) {
Iv(S, {
outputEncoding: h ? 3e3 : 3001,
toneMapping: p ? xt : St
})
}
w.legacy !== f && w.set(( () => ({
legacy: f
}))),
w.linear !== h && w.set(( () => ({
linear: h
}))),
w.flat !== p && w.set(( () => ({
flat: p
}))),
!n || Zg.fun(n) || fv(n) || Zg.equ(n, S, Nv) || Iv(S, n),
a && !w.events.handlers && w.set({
events: a(s)
});
const B = function(e, t) {
const n = "undefined" !== typeof HTMLCanvasElement && e instanceof HTMLCanvasElement;
if (t) {
const {width: e, height: r, top: i, left: s, updateStyle: a=n} = t;
return {
width: e,
height: r,
top: i,
left: s,
updateStyle: a
}
}
if ("undefined" !== typeof HTMLCanvasElement && e instanceof HTMLCanvasElement && e.parentElement) {
const {width: t, height: r, top: i, left: s} = e.parentElement.getBoundingClientRect();
return {
width: t,
height: r,
top: i,
left: s,
updateStyle: n
}
}
return "undefined" !== typeof OffscreenCanvas && e instanceof OffscreenCanvas ? {
width: e.width,
height: e.height,
top: 0,
left: 0,
updateStyle: n
} : {
width: 0,
height: 0,
top: 0,
left: 0
}
}(e, r);
return Zg.equ(B, w.size, Nv) || w.setSize(B.width, B.height, B.updateStyle, B.top, B.left),
v && w.viewport.dpr !== qg(v) && w.setDpr(v),
w.frameloop !== g && w.setFrameloop(g),
w.onPointerMissed || w.set({
onPointerMissed: _
}),
y && !Zg.equ(y, w.performance, Nv) && w.set((e => ({
performance: {
...e.performance,
...y
}
}))),
o = u,
c = !0,
this
},
render(t) {
return c || this.configure(),
Lv.updateContainer((0,
Ig.jsx)(Fv, {
store: s,
children: t,
onCreated: o,
rootElement: e
}), a, null, ( () => {}
)),
s
},
unmount() {
Ov(e)
}
}
}
function Fv(e) {
let {store: t, children: n, onCreated: r, rootElement: i} = e;
return Gg(( () => {
const e = t.getState();
e.set((e => ({
internal: {
...e.internal,
active: !0
}
}))),
r && r(e),
t.getState().events.connected || null == e.events.connect || e.events.connect(i)
}
), []),
(0,
Ig.jsx)(mv.Provider, {
value: t,
children: n
})
}
function Ov(e, t) {
const n = Bv.get(e)
, r = null == n ? void 0 : n.fiber;
if (r) {
const i = null == n ? void 0 : n.store.getState();
i && (i.internal.active = !1),
Lv.updateContainer(null, r, null, ( () => {
i && setTimeout(( () => {
try {
var n, r, s, a;
null == i.events.disconnect || i.events.disconnect(),
null == (n = i.gl) || null == (r = n.renderLists) || null == r.dispose || r.dispose(),
null == (s = i.gl) || null == s.forceContextLoss || s.forceContextLoss(),
null != (a = i.gl) && a.xr && i.xr.disconnect(),
function(e) {
e.dispose && "Scene" !== e.type && e.dispose();
for (const t in e)
null == t.dispose || t.dispose(),
delete e[t]
}(i),
Bv.delete(e),
t && t(e)
} catch (CB) {}
}
), 500)
}
))
}
}
Lv.injectIntoDevTools({
bundleType: 0,
rendererPackageName: "@react-three/fiber",
version: i.version
});
i.unstable_act;
var Uv = n(695)
, zv = n.n(Uv);
function Gv(e) {
let {debounce: t, scroll: n, polyfill: r, offsetSize: s} = void 0 === e ? {
debounce: 0,
scroll: !1,
offsetSize: !1
} : e;
const a = r || ("undefined" === typeof window ? class {
}
: window.ResizeObserver);
if (!a)
throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");
const [o,l] = (0,
i.useState)({
left: 0,
top: 0,
width: 0,
height: 0,
bottom: 0,
right: 0,
x: 0,
y: 0
})
, c = (0,
i.useRef)({
element: null,
scrollContainers: null,
resizeObserver: null,
lastBounds: o
})
, u = t ? "number" === typeof t ? t : t.scroll : null
, d = t ? "number" === typeof t ? t : t.resize : null
, h = (0,
i.useRef)(!1);
(0,
i.useEffect)(( () => (h.current = !0,
() => {
h.current = !1
}
)));
const [p,f,m] = (0,
i.useMemo)(( () => {
const e = () => {
if (!c.current.element)
return;
const {left: e, top: t, width: n, height: r, bottom: i, right: a, x: o, y: u} = c.current.element.getBoundingClientRect()
, d = {
left: e,
top: t,
width: n,
height: r,
bottom: i,
right: a,
x: o,
y: u
};
c.current.element instanceof HTMLElement && s && (d.height = c.current.element.offsetHeight,
d.width = c.current.element.offsetWidth),
Object.freeze(d),
h.current && !Wv(c.current.lastBounds, d) && l(c.current.lastBounds = d)
}
;
return [e, d ? zv()(e, d) : e, u ? zv()(e, u) : e]
}
), [l, s, u, d]);
function g() {
c.current.scrollContainers && (c.current.scrollContainers.forEach((e => e.removeEventListener("scroll", m, !0))),
c.current.scrollContainers = null),
c.current.resizeObserver && (c.current.resizeObserver.disconnect(),
c.current.resizeObserver = null)
}
function v() {
c.current.element && (c.current.resizeObserver = new a(m),
c.current.resizeObserver.observe(c.current.element),
n && c.current.scrollContainers && c.current.scrollContainers.forEach((e => e.addEventListener("scroll", m, {
capture: !0,
passive: !0
}))))
}
var y, x, b;
return y = m,
x = Boolean(n),
(0,
i.useEffect)(( () => {
if (x) {
const e = y;
return window.addEventListener("scroll", e, {
capture: !0,
passive: !0
}),
() => {
window.removeEventListener("scroll", e, !0)
}
}
}
), [y, x]),
b = f,
(0,
i.useEffect)(( () => {
const e = b;
return window.addEventListener("resize", e),
() => {
window.removeEventListener("resize", e)
}
}
), [b]),
(0,
i.useEffect)(( () => {
g(),
v()
}
), [n, m, f]),
(0,
i.useEffect)(( () => g), []),
[e => {
e && e !== c.current.element && (g(),
c.current.element = e,
c.current.scrollContainers = Hv(e),
v())
}
, o, p]
}
function Hv(e) {
const t = [];
if (!e || e === document.body)
return t;
const {overflow: n, overflowX: r, overflowY: i} = window.getComputedStyle(e);
return [n, r, i].some((e => "auto" === e || "scroll" === e)) && t.push(e),
[...t, ...Hv(e.parentElement)]
}
const Vv = ["x", "y", "top", "bottom", "left", "right", "width", "height"]
, Wv = (e, t) => Vv.every((n => e[n] === t[n]));
var Jv, Xv, Kv = Object.defineProperty, qv = Object.defineProperties, Yv = Object.getOwnPropertyDescriptors, Qv = Object.getOwnPropertySymbols, Zv = Object.prototype.hasOwnProperty, $v = Object.prototype.propertyIsEnumerable, ey = (e, t, n) => t in e ? Kv(e, t, {
enumerable: !0,
configurable: !0,
writable: !0,
value: n
}) : e[t] = n, ty = (e, t) => {
for (var n in t || (t = {}))
Zv.call(t, n) && ey(e, n, t[n]);
if (Qv)
for (var n of Qv(t))
$v.call(t, n) && ey(e, n, t[n]);
return e
}
;
"undefined" === typeof window || !(null == (Jv = window.document) ? void 0 : Jv.createElement) && "ReactNative" !== (null == (Xv = window.navigator) ? void 0 : Xv.product) ? i.useEffect : i.useLayoutEffect;
function ny(e, t, n) {
if (!e)
return;
if (!0 === n(e))
return e;
let r = t ? e.return : e.child;
for (; r; ) {
const e = ny(r, t, n);
if (e)
return e;
r = t ? null : r.sibling
}
}
function ry(e) {
try {
return Object.defineProperties(e, {
_currentRenderer: {
get: () => null,
set() {}
},
_currentRenderer2: {
get: () => null,
set() {}
}
})
} catch (t) {
return e
}
}
const iy = console.error;
console.error = function() {
const e = [...arguments].join("");
if (!(null == e ? void 0 : e.startsWith("Warning:")) || !e.includes("useContext"))
return iy.apply(this, arguments);
console.error = iy
}
;
const sy = ry(i.createContext(null));
class ay extends i.Component {
render() {
return i.createElement(sy.Provider, {
value: this._reactInternals
}, this.props.children)
}
}
function oy() {
const e = i.useContext(sy);
if (null === e)
throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");
const t = i.useId();
return i.useMemo(( () => {
for (const n of [e, null == e ? void 0 : e.alternate]) {
if (!n)
continue;
const e = ny(n, !1, (e => {
let n = e.memoizedState;
for (; n; ) {
if (n.memoizedState === t)
return !0;
n = n.next
}
}
));
if (e)
return e
}
}
), [e, t])
}
function ly() {
const e = function() {
const e = oy()
, [t] = i.useState(( () => new Map));
t.clear();
let n = e;
for (; n; ) {
if (n.type && "object" === typeof n.type) {
const e = void 0 === n.type._context && n.type.Provider === n.type ? n.type : n.type._context;
e && e !== sy && !t.has(e) && t.set(e, i.useContext(ry(e)))
}
n = n.return
}
return t
}();
return i.useMemo(( () => Array.from(e.keys()).reduce(( (t, n) => r => {
return i.createElement(t, null, i.createElement(n.Provider, (s = ty({}, r),
a = {
value: e.get(n)
},
qv(s, Yv(a)))));
var s, a
}
), (e => i.createElement(ay, ty({}, e))))), [e])
}
const cy = {
onClick: ["click", !1],
onContextMenu: ["contextmenu", !1],
onDoubleClick: ["dblclick", !1],
onWheel: ["wheel", !0],
onPointerDown: ["pointerdown", !0],
onPointerUp: ["pointerup", !0],
onPointerLeave: ["pointerleave", !0],
onPointerMove: ["pointermove", !0],
onPointerCancel: ["pointercancel", !0],
onLostPointerCapture: ["lostpointercapture", !0]
};
function uy(e) {
const {handlePointer: t} = pv(e);
return {
priority: 1,
enabled: !0,
compute(e, t, n) {
t.pointer.set(e.offsetX / t.size.width * 2 - 1, -e.offsetY / t.size.height * 2 + 1),
t.raycaster.setFromCamera(t.pointer, t.camera)
},
connected: void 0,
handlers: Object.keys(cy).reduce(( (e, n) => ({
...e,
[n]: t(n)
})), {}),
update: () => {
var t;
const {events: n, internal: r} = e.getState();
null != (t = r.lastEvent) && t.current && n.handlers && n.handlers.onPointerMove(r.lastEvent.current)
}
,
connect: t => {
var n;
const {set: r, events: i} = e.getState();
null == i.disconnect || i.disconnect(),
r((e => ({
events: {
...e.events,
connected: t
}
}))),
Object.entries(null != (n = i.handlers) ? n : []).forEach((e => {
let[n,r] = e;
const [i,s] = cy[n];
t.addEventListener(i, r, {
passive: s
})
}
))
}
,
disconnect: () => {
const {set: t, events: n} = e.getState();
var r;
n.connected && (Object.entries(null != (r = n.handlers) ? r : []).forEach((e => {
let[t,r] = e;
if (n && n.connected instanceof HTMLElement) {
const [e] = cy[t];
n.connected.removeEventListener(e, r)
}
}
)),
t((e => ({
events: {
...e.events,
connected: void 0
}
}))))
}
}
}
const dy = i.forwardRef((function(t, n) {
let {children: r, fallback: s, resize: a, style: o, gl: l, events: c=uy, eventSource: u, eventPrefix: d, shadows: h, linear: p, flat: f, legacy: m, orthographic: g, frameloop: v, dpr: y, performance: x, raycaster: b, camera: _, scene: w, onPointerMissed: S, onCreated: A, ...M} = t;
i.useMemo(( () => Dg(e)), []);
const C = ly()
, [E,T] = Gv({
scroll: !0,
debounce: {
scroll: 50,
resize: 0
},
...a
})
, R = i.useRef(null)
, B = i.useRef(null);
i.useImperativeHandle(n, ( () => R.current));
const P = Hg(S)
, [k,L] = i.useState(!1)
, [I,N] = i.useState(!1);
if (k)
throw k;
if (I)
throw I;
const D = i.useRef(null);
Gg(( () => {
const e = R.current;
T.width > 0 && T.height > 0 && e && (D.current || (D.current = jv(e)),
D.current.configure({
gl: l,
events: c,
shadows: h,
linear: p,
flat: f,
legacy: m,
orthographic: g,
frameloop: v,
dpr: y,
performance: x,
raycaster: b,
camera: _,
scene: w,
size: T,
onPointerMissed: function() {
return null == P.current ? void 0 : P.current(...arguments)
},
onCreated: e => {
var t;
null == e.events.connect || e.events.connect(u ? (t = u) && t.hasOwnProperty("current") ? u.current : u : B.current),
d && e.setEvents({
compute: (e, t) => {
const n = e[d + "X"]
, r = e[d + "Y"];
t.pointer.set(n / t.size.width * 2 - 1, -r / t.size.height * 2 + 1),
t.raycaster.setFromCamera(t.pointer, t.camera)
}
}),
null == A || A(e)
}
}),
D.current.render((0,
Ig.jsx)(C, {
children: (0,
Ig.jsx)(Wg, {
set: N,
children: (0,
Ig.jsx)(i.Suspense, {
fallback: (0,
Ig.jsx)(Vg, {
set: L
}),
children: r
})
})
})))
}
)),
i.useEffect(( () => {
const e = R.current;
if (e)
return () => Ov(e)
}
), []);
const j = u ? "none" : "auto";
return (0,
Ig.jsx)("div", {
ref: B,
style: {
position: "relative",
width: "100%",
height: "100%",
overflow: "hidden",
pointerEvents: j,
...o
},
...M,
children: (0,
Ig.jsx)("div", {
ref: E,
style: {
width: "100%",
height: "100%"
},
children: (0,
Ig.jsx)("canvas", {
ref: R,
style: {
display: "block"
},
children: s
})
})
})
}
))
, hy = i.forwardRef((function(e, t) {
return (0,
Ig.jsx)(ay, {
children: (0,
Ig.jsx)(dy, {
...e,
ref: t
})
})
}
));
function py(e, t) {
return function() {
return e.apply(t, arguments)
}
}
const {toString: fy} = Object.prototype
, {getPrototypeOf: my} = Object
, gy = (vy = Object.create(null),
e => {
const t = fy.call(e);
return vy[t] || (vy[t] = t.slice(8, -1).toLowerCase())
}
);
var vy;
const yy = e => (e = e.toLowerCase(),
t => gy(t) === e)
, xy = e => t => typeof t === e
, {isArray: by} = Array
, _y = xy("undefined");
const wy = yy("ArrayBuffer");
const Sy = xy("string")
, Ay = xy("function")
, My = xy("number")
, Cy = e => null !== e && "object" === typeof e
, Ey = e => {
if ("object" !== gy(e))
return !1;
const t = my(e);
return (null === t || t === Object.prototype || null === Object.getPrototypeOf(t)) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e)
}
, Ty = yy("Date")
, Ry = yy("File")
, By = yy("Blob")
, Py = yy("FileList")
, ky = yy("URLSearchParams")
, [Ly,Iy,Ny,Dy] = ["ReadableStream", "Request", "Response", "Headers"].map(yy);
function jy(e, t) {
let n, r, {allOwnKeys: i=!1} = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {};
if (null !== e && "undefined" !== typeof e)
if ("object" !== typeof e && (e = [e]),
by(e))
for (n = 0,
r = e.length; n < r; n++)
t.call(null, e[n], n, e);
else {
const r = i ? Object.getOwnPropertyNames(e) : Object.keys(e)
, s = r.length;
let a;
for (n = 0; n < s; n++)
a = r[n],
t.call(null, e[a], a, e)
}
}
function Fy(e, t) {
t = t.toLowerCase();
const n = Object.keys(e);
let r, i = n.length;
for (; i-- > 0; )
if (r = n[i],
t === r.toLowerCase())
return r;
return null
}
const Oy = "undefined" !== typeof globalThis ? globalThis : "undefined" !== typeof self ? self : "undefined" !== typeof window ? window : global
, Uy = e => !_y(e) && e !== Oy;
const zy = (Gy = "undefined" !== typeof Uint8Array && my(Uint8Array),
e => Gy && e instanceof Gy);
var Gy;
const Hy = yy("HTMLFormElement")
, Vy = (e => {
let {hasOwnProperty: t} = e;
return (e, n) => t.call(e, n)
}
)(Object.prototype)
, Wy = yy("RegExp")
, Jy = (e, t) => {
const n = Object.getOwnPropertyDescriptors(e)
, r = {};
jy(n, ( (n, i) => {
let s;
!1 !== (s = t(n, i, e)) && (r[i] = s || n)
}
)),
Object.defineProperties(e, r)
}
, Xy = "abcdefghijklmnopqrstuvwxyz"
, Ky = "0123456789"
, qy = {
DIGIT: Ky,
ALPHA: Xy,
ALPHA_DIGIT: Xy + Xy.toUpperCase() + Ky
};
const Yy = yy("AsyncFunction")
, Qy = {
isArray: by,
isArrayBuffer: wy,
isBuffer: function(e) {
return null !== e && !_y(e) && null !== e.constructor && !_y(e.constructor) && Ay(e.constructor.isBuffer) && e.constructor.isBuffer(e)
},
isFormData: e => {
let t;
return e && ("function" === typeof FormData && e instanceof FormData || Ay(e.append) && ("formdata" === (t = gy(e)) || "object" === t && Ay(e.toString) && "[object FormData]" === e.toString()))
}
,
isArrayBufferView: function(e) {
let t;
return t = "undefined" !== typeof ArrayBuffer && ArrayBuffer.isView ? ArrayBuffer.isView(e) : e && e.buffer && wy(e.buffer),
t
},
isString: Sy,
isNumber: My,
isBoolean: e => !0 === e || !1 === e,
isObject: Cy,
isPlainObject: Ey,
isReadableStream: Ly,
isRequest: Iy,
isResponse: Ny,
isHeaders: Dy,
isUndefined: _y,
isDate: Ty,
isFile: Ry,
isBlob: By,
isRegExp: Wy,
isFunction: Ay,
isStream: e => Cy(e) && Ay(e.pipe),
isURLSearchParams: ky,
isTypedArray: zy,
isFileList: Py,
forEach: jy,
merge: function e() {
const {caseless: t} = Uy(this) && this || {}
, n = {}
, r = (r, i) => {
const s = t && Fy(n, i) || i;
Ey(n[s]) && Ey(r) ? n[s] = e(n[s], r) : Ey(r) ? n[s] = e({}, r) : by(r) ? n[s] = r.slice() : n[s] = r
}
;
for (let i = 0, s = arguments.length; i < s; i++)
arguments[i] && jy(arguments[i], r);
return n
},
extend: function(e, t, n) {
let {allOwnKeys: r} = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {};
return jy(t, ( (t, r) => {
n && Ay(t) ? e[r] = py(t, n) : e[r] = t
}
), {
allOwnKeys: r
}),
e
},
trim: e => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""),
stripBOM: e => (65279 === e.charCodeAt(0) && (e = e.slice(1)),
e),
inherits: (e, t, n, r) => {
e.prototype = Object.create(t.prototype, r),
e.prototype.constructor = e,
Object.defineProperty(e, "super", {
value: t.prototype
}),
n && Object.assign(e.prototype, n)
}
,
toFlatObject: (e, t, n, r) => {
let i, s, a;
const o = {};
if (t = t || {},
null == e)
return t;
do {
for (i = Object.getOwnPropertyNames(e),
s = i.length; s-- > 0; )
a = i[s],
r && !r(a, e, t) || o[a] || (t[a] = e[a],
o[a] = !0);
e = !1 !== n && my(e)
} while (e && (!n || n(e, t)) && e !== Object.prototype);
return t
}
,
kindOf: gy,
kindOfTest: yy,
endsWith: (e, t, n) => {
e = String(e),
(void 0 === n || n > e.length) && (n = e.length),
n -= t.length;
const r = e.indexOf(t, n);
return -1 !== r && r === n
}
,
toArray: e => {
if (!e)
return null;
if (by(e))
return e;
let t = e.length;
if (!My(t))
return null;
const n = new Array(t);
for (; t-- > 0; )
n[t] = e[t];
return n
}
,
forEachEntry: (e, t) => {
const n = (e && e[Symbol.iterator]).call(e);
let r;
for (; (r = n.next()) && !r.done; ) {
const n = r.value;
t.call(e, n[0], n[1])
}
}
,
matchAll: (e, t) => {
let n;
const r = [];
for (; null !== (n = e.exec(t)); )
r.push(n);
return r
}
,
isHTMLForm: Hy,
hasOwnProperty: Vy,
hasOwnProp: Vy,
reduceDescriptors: Jy,
freezeMethods: e => {
Jy(e, ( (t, n) => {
if (Ay(e) && -1 !== ["arguments", "caller", "callee"].indexOf(n))
return !1;
const r = e[n];
Ay(r) && (t.enumerable = !1,
"writable"in t ? t.writable = !1 : t.set || (t.set = () => {
throw Error("Can not rewrite read-only method '" + n + "'")
}
))
}
))
}
,
toObjectSet: (e, t) => {
const n = {}
, r = e => {
e.forEach((e => {
n[e] = !0
}
))
}
;
return by(e) ? r(e) : r(String(e).split(t)),
n
}
,
toCamelCase: e => e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, (function(e, t, n) {
return t.toUpperCase() + n
}
)),
noop: () => {}
,
toFiniteNumber: (e, t) => null != e && Number.isFinite(e = +e) ? e : t,
findKey: Fy,
global: Oy,
isContextDefined: Uy,
ALPHABET: qy,
generateString: function() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 16
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : qy.ALPHA_DIGIT
, n = "";
const {length: r} = t;
for (; e--; )
n += t[Math.random() * r | 0];
return n
},
isSpecCompliantForm: function(e) {
return !!(e && Ay(e.append) && "FormData" === e[Symbol.toStringTag] && e[Symbol.iterator])
},
toJSONObject: e => {
const t = new Array(10)
, n = (e, r) => {
if (Cy(e)) {
if (t.indexOf(e) >= 0)
return;
if (!("toJSON"in e)) {
t[r] = e;
const i = by(e) ? [] : {};
return jy(e, ( (e, t) => {
const s = n(e, r + 1);
!_y(s) && (i[t] = s)
}
)),
t[r] = void 0,
i
}
}
return e
}
;
return n(e, 0)
}
,
isAsyncFn: Yy,
isThenable: e => e && (Cy(e) || Ay(e)) && Ay(e.then) && Ay(e.catch)
};
function Zy(e, t, n, r, i) {
Error.call(this),
Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = (new Error).stack,
this.message = e,
this.name = "AxiosError",
t && (this.code = t),
n && (this.config = n),
r && (this.request = r),
i && (this.response = i)
}
Qy.inherits(Zy, Error, {
toJSON: function() {
return {
message: this.message,
name: this.name,
description: this.description,
number: this.number,
fileName: this.fileName,
lineNumber: this.lineNumber,
columnNumber: this.columnNumber,
stack: this.stack,
config: Qy.toJSONObject(this.config),
code: this.code,
status: this.response && this.response.status ? this.response.status : null
}
}
});
const $y = Zy.prototype
, ex = {};
["ERR_BAD_OPTION_VALUE", "ERR_BAD_OPTION", "ECONNABORTED", "ETIMEDOUT", "ERR_NETWORK", "ERR_FR_TOO_MANY_REDIRECTS", "ERR_DEPRECATED", "ERR_BAD_RESPONSE", "ERR_BAD_REQUEST", "ERR_CANCELED", "ERR_NOT_SUPPORT", "ERR_INVALID_URL"].forEach((e => {
ex[e] = {
value: e
}
}
)),
Object.defineProperties(Zy, ex),
Object.defineProperty($y, "isAxiosError", {
value: !0
}),
Zy.from = (e, t, n, r, i, s) => {
const a = Object.create($y);
return Qy.toFlatObject(e, a, (function(e) {
return e !== Error.prototype
}
), (e => "isAxiosError" !== e)),
Zy.call(a, e.message, t, n, r, i),
a.cause = e,
a.name = e.name,
s && Object.assign(a, s),
a
}
;
const tx = Zy;
function nx(e) {
return Qy.isPlainObject(e) || Qy.isArray(e)
}
function rx(e) {
return Qy.endsWith(e, "[]") ? e.slice(0, -2) : e
}
function ix(e, t, n) {
return e ? e.concat(t).map((function(e, t) {
return e = rx(e),
!n && t ? "[" + e + "]" : e
}
)).join(n ? "." : "") : t
}
const sx = Qy.toFlatObject(Qy, {}, null, (function(e) {
return /^is[A-Z]/.test(e)
}
));
const ax = function(e, t, n) {
if (!Qy.isObject(e))
throw new TypeError("target must be an object");
t = t || new FormData;
const r = (n = Qy.toFlatObject(n, {
metaTokens: !0,
dots: !1,
indexes: !1
}, !1, (function(e, t) {
return !Qy.isUndefined(t[e])
}
))).metaTokens
, i = n.visitor || c
, s = n.dots
, a = n.indexes
, o = (n.Blob || "undefined" !== typeof Blob && Blob) && Qy.isSpecCompliantForm(t);
if (!Qy.isFunction(i))
throw new TypeError("visitor must be a function");
function l(e) {
if (null === e)
return "";
if (Qy.isDate(e))
return e.toISOString();
if (!o && Qy.isBlob(e))
throw new tx("Blob is not supported. Use a Buffer instead.");
return Qy.isArrayBuffer(e) || Qy.isTypedArray(e) ? o && "function" === typeof Blob ? new Blob([e]) : Buffer.from(e) : e
}
function c(e, n, i) {
let o = e;
if (e && !i && "object" === typeof e)
if (Qy.endsWith(n, "{}"))
n = r ? n : n.slice(0, -2),
e = JSON.stringify(e);
else if (Qy.isArray(e) && function(e) {
return Qy.isArray(e) && !e.some(nx)
}(e) || (Qy.isFileList(e) || Qy.endsWith(n, "[]")) && (o = Qy.toArray(e)))
return n = rx(n),
o.forEach((function(e, r) {
!Qy.isUndefined(e) && null !== e && t.append(!0 === a ? ix([n], r, s) : null === a ? n : n + "[]", l(e))
}
)),
!1;
return !!nx(e) || (t.append(ix(i, n, s), l(e)),
!1)
}
const u = []
, d = Object.assign(sx, {
defaultVisitor: c,
convertValue: l,
isVisitable: nx
});
if (!Qy.isObject(e))
throw new TypeError("data must be an object");
return function e(n, r) {
if (!Qy.isUndefined(n)) {
if (-1 !== u.indexOf(n))
throw Error("Circular reference detected in " + r.join("."));
u.push(n),
Qy.forEach(n, (function(n, s) {
!0 === (!(Qy.isUndefined(n) || null === n) && i.call(t, n, Qy.isString(s) ? s.trim() : s, r, d)) && e(n, r ? r.concat(s) : [s])
}
)),
u.pop()
}
}(e),
t
};
function ox(e) {
const t = {
"!": "%21",
"'": "%27",
"(": "%28",
")": "%29",
"~": "%7E",
"%20": "+",
"%00": "\0"
};
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, (function(e) {
return t[e]
}
))
}
function lx(e, t) {
this._pairs = [],
e && ax(e, this, t)
}
const cx = lx.prototype;
cx.append = function(e, t) {
this._pairs.push([e, t])
}
,
cx.toString = function(e) {
const t = e ? function(t) {
return e.call(this, t, ox)
}
: ox;
return this._pairs.map((function(e) {
return t(e[0]) + "=" + t(e[1])
}
), "").join("&")
}
;
const ux = lx;
function dx(e) {
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]")
}
function hx(e, t, n) {
if (!t)
return e;
const r = n && n.encode || dx
, i = n && n.serialize;
let s;
if (s = i ? i(t, n) : Qy.isURLSearchParams(t) ? t.toString() : new ux(t,n).toString(r),
s) {
const t = e.indexOf("#");
-1 !== t && (e = e.slice(0, t)),
e += (-1 === e.indexOf("?") ? "?" : "&") + s
}
return e
}
const px = class {
constructor() {
this.handlers = []
}
use(e, t, n) {
return this.handlers.push({
fulfilled: e,
rejected: t,
synchronous: !!n && n.synchronous,
runWhen: n ? n.runWhen : null
}),
this.handlers.length - 1
}
eject(e) {
this.handlers[e] && (this.handlers[e] = null)
}
clear() {
this.handlers && (this.handlers = [])
}
forEach(e) {
Qy.forEach(this.handlers, (function(t) {
null !== t && e(t)
}
))
}
}
, fx = {
silentJSONParsing: !0,
forcedJSONParsing: !0,
clarifyTimeoutError: !1
}
, mx = {
isBrowser: !0,
classes: {
URLSearchParams: "undefined" !== typeof URLSearchParams ? URLSearchParams : ux,
FormData: "undefined" !== typeof FormData ? FormData : null,
Blob: "undefined" !== typeof Blob ? Blob : null
},
protocols: ["http", "https", "file", "blob", "url", "data"]
}
, gx = "undefined" !== typeof window && "undefined" !== typeof document
, vx = (yx = "undefined" !== typeof navigator && navigator.product,
gx && ["ReactNative", "NativeScript", "NS"].indexOf(yx) < 0);
var yx;
const xx = "undefined" !== typeof WorkerGlobalScope && self instanceof WorkerGlobalScope && "function" === typeof self.importScripts
, bx = gx && window.location.href || "http://localhost"
, _x = {
...t,
...mx
};
const wx = function(e) {
function t(e, n, r, i) {
let s = e[i++];
if ("__proto__" === s)
return !0;
const a = Number.isFinite(+s)
, o = i >= e.length;
if (s = !s && Qy.isArray(r) ? r.length : s,
o)
return Qy.hasOwnProp(r, s) ? r[s] = [r[s], n] : r[s] = n,
!a;
r[s] && Qy.isObject(r[s]) || (r[s] = []);
return t(e, n, r[s], i) && Qy.isArray(r[s]) && (r[s] = function(e) {
const t = {}
, n = Object.keys(e);
let r;
const i = n.length;
let s;
for (r = 0; r < i; r++)
s = n[r],
t[s] = e[s];
return t
}(r[s])),
!a
}
if (Qy.isFormData(e) && Qy.isFunction(e.entries)) {
const n = {};
return Qy.forEachEntry(e, ( (e, r) => {
t(function(e) {
return Qy.matchAll(/\w+|\[(\w*)]/g, e).map((e => "[]" === e[0] ? "" : e[1] || e[0]))
}(e), r, n, 0)
}
)),
n
}
return null
};
const Sx = {
transitional: fx,
adapter: ["xhr", "http", "fetch"],
transformRequest: [function(e, t) {
const n = t.getContentType() || ""
, r = n.indexOf("application/json") > -1
, i = Qy.isObject(e);
i && Qy.isHTMLForm(e) && (e = new FormData(e));
if (Qy.isFormData(e))
return r ? JSON.stringify(wx(e)) : e;
if (Qy.isArrayBuffer(e) || Qy.isBuffer(e) || Qy.isStream(e) || Qy.isFile(e) || Qy.isBlob(e) || Qy.isReadableStream(e))
return e;
if (Qy.isArrayBufferView(e))
return e.buffer;
if (Qy.isURLSearchParams(e))
return t.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1),
e.toString();
let s;
if (i) {
if (n.indexOf("application/x-www-form-urlencoded") > -1)
return function(e, t) {
return ax(e, new _x.classes.URLSearchParams, Object.assign({
visitor: function(e, t, n, r) {
return _x.isNode && Qy.isBuffer(e) ? (this.append(t, e.toString("base64")),
!1) : r.defaultVisitor.apply(this, arguments)
}
}, t))
}(e, this.formSerializer).toString();
if ((s = Qy.isFileList(e)) || n.indexOf("multipart/form-data") > -1) {
const t = this.env && this.env.FormData;
return ax(s ? {
"files[]": e
} : e, t && new t, this.formSerializer)
}
}
return i || r ? (t.setContentType("application/json", !1),
function(e, t, n) {
if (Qy.isString(e))
try {
return (t || JSON.parse)(e),
Qy.trim(e)
} catch (CB) {
if ("SyntaxError" !== CB.name)
throw CB
}
return (n || JSON.stringify)(e)
}(e)) : e
}
],
transformResponse: [function(e) {
const t = this.transitional || Sx.transitional
, n = t && t.forcedJSONParsing
, r = "json" === this.responseType;
if (Qy.isResponse(e) || Qy.isReadableStream(e))
return e;
if (e && Qy.isString(e) && (n && !this.responseType || r)) {
const n = !(t && t.silentJSONParsing) && r;
try {
return JSON.parse(e)
} catch (CB) {
if (n) {
if ("SyntaxError" === CB.name)
throw tx.from(CB, tx.ERR_BAD_RESPONSE, this, null, this.response);
throw CB
}
}
}
return e
}
],
timeout: 0,
xsrfCookieName: "XSRF-TOKEN",
xsrfHeaderName: "X-XSRF-TOKEN",
maxContentLength: -1,
maxBodyLength: -1,
env: {
FormData: _x.classes.FormData,
Blob: _x.classes.Blob
},
validateStatus: function(e) {
return e >= 200 && e < 300
},
headers: {
common: {
Accept: "application/json, text/plain, */*",
"Content-Type": void 0
}
}
};
Qy.forEach(["delete", "get", "head", "post", "put", "patch"], (e => {
Sx.headers[e] = {}
}
));
const Ax = Sx
, Mx = Qy.toObjectSet(["age", "authorization", "content-length", "content-type", "etag", "expires", "from", "host", "if-modified-since", "if-unmodified-since", "last-modified", "location", "max-forwards", "proxy-authorization", "referer", "retry-after", "user-agent"])
, Cx = Symbol("internals");
function Ex(e) {
return e && String(e).trim().toLowerCase()
}
function Tx(e) {
return !1 === e || null == e ? e : Qy.isArray(e) ? e.map(Tx) : String(e)
}
function Rx(e, t, n, r, i) {
return Qy.isFunction(r) ? r.call(this, t, n) : (i && (t = n),
Qy.isString(t) ? Qy.isString(r) ? -1 !== t.indexOf(r) : Qy.isRegExp(r) ? r.test(t) : void 0 : void 0)
}
class Bx {
constructor(e) {
e && this.set(e)
}
set(e, t, n) {
const r = this;
function i(e, t, n) {
const i = Ex(t);
if (!i)
throw new Error("header name must be a non-empty string");
const s = Qy.findKey(r, i);
(!s || void 0 === r[s] || !0 === n || void 0 === n && !1 !== r[s]) && (r[s || t] = Tx(e))
}
const s = (e, t) => Qy.forEach(e, ( (e, n) => i(e, n, t)));
if (Qy.isPlainObject(e) || e instanceof this.constructor)
s(e, t);
else if (Qy.isString(e) && (e = e.trim()) && !/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))
s((e => {
const t = {};
let n, r, i;
return e && e.split("\n").forEach((function(e) {
i = e.indexOf(":"),
n = e.substring(0, i).trim().toLowerCase(),
r = e.substring(i + 1).trim(),
!n || t[n] && Mx[n] || ("set-cookie" === n ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r)
}
)),
t
}
)(e), t);
else if (Qy.isHeaders(e))
for (const [a,o] of e.entries())
i(o, a, n);
else
null != e && i(t, e, n);
return this
}
get(e, t) {
if (e = Ex(e)) {
const n = Qy.findKey(this, e);
if (n) {
const e = this[n];
if (!t)
return e;
if (!0 === t)
return function(e) {
const t = Object.create(null)
, n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
let r;
for (; r = n.exec(e); )
t[r[1]] = r[2];
return t
}(e);
if (Qy.isFunction(t))
return t.call(this, e, n);
if (Qy.isRegExp(t))
return t.exec(e);
throw new TypeError("parser must be boolean|regexp|function")
}
}
}
has(e, t) {
if (e = Ex(e)) {
const n = Qy.findKey(this, e);
return !(!n || void 0 === this[n] || t && !Rx(0, this[n], n, t))
}
return !1
}
delete(e, t) {
const n = this;
let r = !1;
function i(e) {
if (e = Ex(e)) {
const i = Qy.findKey(n, e);
!i || t && !Rx(0, n[i], i, t) || (delete n[i],
r = !0)
}
}
return Qy.isArray(e) ? e.forEach(i) : i(e),
r
}
clear(e) {
const t = Object.keys(this);
let n = t.length
, r = !1;
for (; n--; ) {
const i = t[n];
e && !Rx(0, this[i], i, e, !0) || (delete this[i],
r = !0)
}
return r
}
normalize(e) {
const t = this
, n = {};
return Qy.forEach(this, ( (r, i) => {
const s = Qy.findKey(n, i);
if (s)
return t[s] = Tx(r),
void delete t[i];
const a = e ? function(e) {
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, ( (e, t, n) => t.toUpperCase() + n))
}(i) : String(i).trim();
a !== i && delete t[i],
t[a] = Tx(r),
n[a] = !0
}
)),
this
}
concat() {
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
t[n] = arguments[n];
return this.constructor.concat(this, ...t)
}
toJSON(e) {
const t = Object.create(null);
return Qy.forEach(this, ( (n, r) => {
null != n && !1 !== n && (t[r] = e && Qy.isArray(n) ? n.join(", ") : n)
}
)),
t
}
[Symbol.iterator]() {
return Object.entries(this.toJSON())[Symbol.iterator]()
}
toString() {
return Object.entries(this.toJSON()).map((e => {
let[t,n] = e;
return t + ": " + n
}
)).join("\n")
}
get[Symbol.toStringTag]() {
return "AxiosHeaders"
}
static from(e) {
return e instanceof this ? e : new this(e)
}
static concat(e) {
const t = new this(e);
for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), i = 1; i < n; i++)
r[i - 1] = arguments[i];
return r.forEach((e => t.set(e))),
t
}
static accessor(e) {
const t = (this[Cx] = this[Cx] = {
accessors: {}
}).accessors
, n = this.prototype;
function r(e) {
const r = Ex(e);
t[r] || (!function(e, t) {
const n = Qy.toCamelCase(" " + t);
["get", "set", "has"].forEach((r => {
Object.defineProperty(e, r + n, {
value: function(e, n, i) {
return this[r].call(this, t, e, n, i)
},
configurable: !0
})
}
))
}(n, e),
t[r] = !0)
}
return Qy.isArray(e) ? e.forEach(r) : r(e),
this
}
}
Bx.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]),
Qy.reduceDescriptors(Bx.prototype, ( (e, t) => {
let {value: n} = e
, r = t[0].toUpperCase() + t.slice(1);
return {
get: () => n,
set(e) {
this[r] = e
}
}
}
)),
Qy.freezeMethods(Bx);
const Px = Bx;
function kx(e, t) {
const n = this || Ax
, r = t || n
, i = Px.from(r.headers);
let s = r.data;
return Qy.forEach(e, (function(e) {
s = e.call(n, s, i.normalize(), t ? t.status : void 0)
}
)),
i.normalize(),
s
}
function Lx(e) {
return !(!e || !e.__CANCEL__)
}
function Ix(e, t, n) {
tx.call(this, null == e ? "canceled" : e, tx.ERR_CANCELED, t, n),
this.name = "CanceledError"
}
Qy.inherits(Ix, tx, {
__CANCEL__: !0
});
const Nx = Ix;
function Dx(e, t, n) {
const r = n.config.validateStatus;
n.status && r && !r(n.status) ? t(new tx("Request failed with status code " + n.status,[tx.ERR_BAD_REQUEST, tx.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],n.config,n.request,n)) : e(n)
}
const jx = function(e, t) {
e = e || 10;
const n = new Array(e)
, r = new Array(e);
let i, s = 0, a = 0;
return t = void 0 !== t ? t : 1e3,
function(o) {
const l = Date.now()
, c = r[a];
i || (i = l),
n[s] = o,
r[s] = l;
let u = a
, d = 0;
for (; u !== s; )
d += n[u++],
u %= e;
if (s = (s + 1) % e,
s === a && (a = (a + 1) % e),
l - i < t)
return;
const h = c && l - c;
return h ? Math.round(1e3 * d / h) : void 0
}
};
const Fx = function(e, t) {
let n = 0;
const r = 1e3 / t;
let i = null;
return function() {
const t = !0 === this
, s = Date.now();
if (t || s - n > r)
return i && (clearTimeout(i),
i = null),
n = s,
e.apply(null, arguments);
i || (i = setTimeout(( () => (i = null,
n = Date.now(),
e.apply(null, arguments))), r - (s - n)))
}
}
, Ox = function(e, t) {
let n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 3
, r = 0;
const i = jx(50, 250);
return Fx((n => {
const s = n.loaded
, a = n.lengthComputable ? n.total : void 0
, o = s - r
, l = i(o);
r = s;
const c = {
loaded: s,
total: a,
progress: a ? s / a : void 0,
bytes: o,
rate: l || void 0,
estimated: l && a && s <= a ? (a - s) / l : void 0,
event: n,
lengthComputable: null != a
};
c[t ? "download" : "upload"] = !0,
e(c)
}
), n)
}
, Ux = _x.hasStandardBrowserEnv ? function() {
const e = /(msie|trident)/i.test(navigator.userAgent)
, t = document.createElement("a");
let n;
function r(n) {
let r = n;
return e && (t.setAttribute("href", r),
r = t.href),
t.setAttribute("href", r),
{
href: t.href,
protocol: t.protocol ? t.protocol.replace(/:$/, "") : "",
host: t.host,
search: t.search ? t.search.replace(/^\?/, "") : "",
hash: t.hash ? t.hash.replace(/^#/, "") : "",
hostname: t.hostname,
port: t.port,
pathname: "/" === t.pathname.charAt(0) ? t.pathname : "/" + t.pathname
}
}
return n = r(window.location.href),
function(e) {
const t = Qy.isString(e) ? r(e) : e;
return t.protocol === n.protocol && t.host === n.host
}
}() : function() {
return !0
}
, zx = _x.hasStandardBrowserEnv ? {
write(e, t, n, r, i, s) {
const a = [e + "=" + encodeURIComponent(t)];
Qy.isNumber(n) && a.push("expires=" + new Date(n).toGMTString()),
Qy.isString(r) && a.push("path=" + r),
Qy.isString(i) && a.push("domain=" + i),
!0 === s && a.push("secure"),
document.cookie = a.join("; ")
},
read(e) {
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
return t ? decodeURIComponent(t[3]) : null
},
remove(e) {
this.write(e, "", Date.now() - 864e5)
}
} : {
write() {},
read: () => null,
remove() {}
};
function Gx(e, t) {
return e && !/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t) ? function(e, t) {
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e
}(e, t) : t
}
const Hx = e => e instanceof Px ? {
...e
} : e;
function Vx(e, t) {
t = t || {};
const n = {};
function r(e, t, n) {
return Qy.isPlainObject(e) && Qy.isPlainObject(t) ? Qy.merge.call({
caseless: n
}, e, t) : Qy.isPlainObject(t) ? Qy.merge({}, t) : Qy.isArray(t) ? t.slice() : t
}
function i(e, t, n) {
return Qy.isUndefined(t) ? Qy.isUndefined(e) ? void 0 : r(void 0, e, n) : r(e, t, n)
}
function s(e, t) {
if (!Qy.isUndefined(t))
return r(void 0, t)
}
function a(e, t) {
return Qy.isUndefined(t) ? Qy.isUndefined(e) ? void 0 : r(void 0, e) : r(void 0, t)
}
function o(n, i, s) {
return s in t ? r(n, i) : s in e ? r(void 0, n) : void 0
}
const l = {
url: s,
method: s,
data: s,
baseURL: a,
transformRequest: a,
transformResponse: a,
paramsSerializer: a,
timeout: a,
timeoutMessage: a,
withCredentials: a,
withXSRFToken: a,
adapter: a,
responseType: a,
xsrfCookieName: a,
xsrfHeaderName: a,
onUploadProgress: a,
onDownloadProgress: a,
decompress: a,
maxContentLength: a,
maxBodyLength: a,
beforeRedirect: a,
transport: a,
httpAgent: a,
httpsAgent: a,
cancelToken: a,
socketPath: a,
responseEncoding: a,
validateStatus: o,
headers: (e, t) => i(Hx(e), Hx(t), !0)
};
return Qy.forEach(Object.keys(Object.assign({}, e, t)), (function(r) {
const s = l[r] || i
, a = s(e[r], t[r], r);
Qy.isUndefined(a) && s !== o || (n[r] = a)
}
)),
n
}
const Wx = e => {
const t = Vx({}, e);
let n, {data: r, withXSRFToken: i, xsrfHeaderName: s, xsrfCookieName: a, headers: o, auth: l} = t;
if (t.headers = o = Px.from(o),
t.url = hx(Gx(t.baseURL, t.url), e.params, e.paramsSerializer),
l && o.set("Authorization", "Basic " + btoa((l.username || "") + ":" + (l.password ? unescape(encodeURIComponent(l.password)) : ""))),
Qy.isFormData(r))
if (_x.hasStandardBrowserEnv || _x.hasStandardBrowserWebWorkerEnv)
o.setContentType(void 0);
else if (!1 !== (n = o.getContentType())) {
const [e,...t] = n ? n.split(";").map((e => e.trim())).filter(Boolean) : [];
o.setContentType([e || "multipart/form-data", ...t].join("; "))
}
if (_x.hasStandardBrowserEnv && (i && Qy.isFunction(i) && (i = i(t)),
i || !1 !== i && Ux(t.url))) {
const e = s && a && zx.read(a);
e && o.set(s, e)
}
return t
}
, Jx = "undefined" !== typeof XMLHttpRequest && function(e) {
return new Promise((function(t, n) {
const r = Wx(e);
let i = r.data;
const s = Px.from(r.headers).normalize();
let a, {responseType: o} = r;
function l() {
r.cancelToken && r.cancelToken.unsubscribe(a),
r.signal && r.signal.removeEventListener("abort", a)
}
let c = new XMLHttpRequest;
function u() {
if (!c)
return;
const r = Px.from("getAllResponseHeaders"in c && c.getAllResponseHeaders());
Dx((function(e) {
t(e),
l()
}
), (function(e) {
n(e),
l()
}
), {
data: o && "text" !== o && "json" !== o ? c.response : c.responseText,
status: c.status,
statusText: c.statusText,
headers: r,
config: e,
request: c
}),
c = null
}
c.open(r.method.toUpperCase(), r.url, !0),
c.timeout = r.timeout,
"onloadend"in c ? c.onloadend = u : c.onreadystatechange = function() {
c && 4 === c.readyState && (0 !== c.status || c.responseURL && 0 === c.responseURL.indexOf("file:")) && setTimeout(u)
}
,
c.onabort = function() {
c && (n(new tx("Request aborted",tx.ECONNABORTED,r,c)),
c = null)
}
,
c.onerror = function() {
n(new tx("Network Error",tx.ERR_NETWORK,r,c)),
c = null
}
,
c.ontimeout = function() {
let e = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded";
const t = r.transitional || fx;
r.timeoutErrorMessage && (e = r.timeoutErrorMessage),
n(new tx(e,t.clarifyTimeoutError ? tx.ETIMEDOUT : tx.ECONNABORTED,r,c)),
c = null
}
,
void 0 === i && s.setContentType(null),
"setRequestHeader"in c && Qy.forEach(s.toJSON(), (function(e, t) {
c.setRequestHeader(t, e)
}
)),
Qy.isUndefined(r.withCredentials) || (c.withCredentials = !!r.withCredentials),
o && "json" !== o && (c.responseType = r.responseType),
"function" === typeof r.onDownloadProgress && c.addEventListener("progress", Ox(r.onDownloadProgress, !0)),
"function" === typeof r.onUploadProgress && c.upload && c.upload.addEventListener("progress", Ox(r.onUploadProgress)),
(r.cancelToken || r.signal) && (a = t => {
c && (n(!t || t.type ? new Nx(null,e,c) : t),
c.abort(),
c = null)
}
,
r.cancelToken && r.cancelToken.subscribe(a),
r.signal && (r.signal.aborted ? a() : r.signal.addEventListener("abort", a)));
const d = function(e) {
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
return t && t[1] || ""
}(r.url);
d && -1 === _x.protocols.indexOf(d) ? n(new tx("Unsupported protocol " + d + ":",tx.ERR_BAD_REQUEST,e)) : c.send(i || null)
}
))
}
, Xx = (e, t) => {
let n, r = new AbortController;
const i = function(e) {
if (!n) {
n = !0,
a();
const t = e instanceof Error ? e : this.reason;
r.abort(t instanceof tx ? t : new Nx(t instanceof Error ? t.message : t))
}
};
let s = t && setTimeout(( () => {
i(new tx("timeout ".concat(t, " of ms exceeded"),tx.ETIMEDOUT))
}
), t);
const a = () => {
e && (s && clearTimeout(s),
s = null,
e.forEach((e => {
e && (e.removeEventListener ? e.removeEventListener("abort", i) : e.unsubscribe(i))
}
)),
e = null)
}
;
e.forEach((e => e && e.addEventListener && e.addEventListener("abort", i)));
const {signal: o} = r;
return o.unsubscribe = a,
[o, () => {
s && clearTimeout(s),
s = null
}
]
}
, Kx = function*(e, t) {
let n = e.byteLength;
if (!t || n < t)
return void (yield e);
let r, i = 0;
for (; i < n; )
r = i + t,
yield e.slice(i, r),
i = r
}
, qx = (e, t, n, r, i) => {
const s = async function*(e, t, n) {
for await(const r of e)
yield*Kx(ArrayBuffer.isView(r) ? r : await n(String(r)), t)
}(e, t, i);
let a = 0;
return new ReadableStream({
type: "bytes",
async pull(e) {
const {done: t, value: i} = await s.next();
if (t)
return e.close(),
void r();
let o = i.byteLength;
n && n(a += o),
e.enqueue(new Uint8Array(i))
},
cancel: e => (r(e),
s.return())
},{
highWaterMark: 2
})
}
, Yx = (e, t) => {
const n = null != e;
return r => setTimeout(( () => t({
lengthComputable: n,
total: e,
loaded: r
})))
}
, Qx = "function" === typeof fetch && "function" === typeof Request && "function" === typeof Response
, Zx = Qx && "function" === typeof ReadableStream
, $x = Qx && ("function" === typeof TextEncoder ? (eb = new TextEncoder,
e => eb.encode(e)) : async e => new Uint8Array(await new Response(e).arrayBuffer()));
var eb;
const tb = Zx && ( () => {
let e = !1;
const t = new Request(_x.origin,{
body: new ReadableStream,
method: "POST",
get duplex() {
return e = !0,
"half"
}
}).headers.has("Content-Type");
return e && !t
}
)()
, nb = Zx && !!( () => {
try {
return Qy.isReadableStream(new Response("").body)
} catch (e) {}
}
)()
, rb = {
stream: nb && (e => e.body)
};
var ib;
Qx && (ib = new Response,
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((e => {
!rb[e] && (rb[e] = Qy.isFunction(ib[e]) ? t => t[e]() : (t, n) => {
throw new tx("Response type '".concat(e, "' is not supported"),tx.ERR_NOT_SUPPORT,n)
}
)
}
)));
const sb = async (e, t) => {
const n = Qy.toFiniteNumber(e.getContentLength());
return null == n ? (async e => null == e ? 0 : Qy.isBlob(e) ? e.size : Qy.isSpecCompliantForm(e) ? (await new Request(e).arrayBuffer()).byteLength : Qy.isArrayBufferView(e) ? e.byteLength : (Qy.isURLSearchParams(e) && (e += ""),
Qy.isString(e) ? (await $x(e)).byteLength : void 0))(t) : n
}
, ab = Qx && (async e => {
let {url: t, method: n, data: r, signal: i, cancelToken: s, timeout: a, onDownloadProgress: o, onUploadProgress: l, responseType: c, headers: u, withCredentials: d="same-origin", fetchOptions: h} = Wx(e);
c = c ? (c + "").toLowerCase() : "text";
let p, f, [m,g] = i || s || a ? Xx([i, s], a) : [];
const v = () => {
!p && setTimeout(( () => {
m && m.unsubscribe()
}
)),
p = !0
}
;
let y;
try {
if (l && tb && "get" !== n && "head" !== n && 0 !== (y = await sb(u, r))) {
let e, n = new Request(t,{
method: "POST",
body: r,
duplex: "half"
});
Qy.isFormData(r) && (e = n.headers.get("content-type")) && u.setContentType(e),
n.body && (r = qx(n.body, 65536, Yx(y, Ox(l)), null, $x))
}
Qy.isString(d) || (d = d ? "cors" : "omit"),
f = new Request(t,{
...h,
signal: m,
method: n.toUpperCase(),
headers: u.normalize().toJSON(),
body: r,
duplex: "half",
withCredentials: d
});
let i = await fetch(f);
const s = nb && ("stream" === c || "response" === c);
if (nb && (o || s)) {
const e = {};
["status", "statusText", "headers"].forEach((t => {
e[t] = i[t]
}
));
const t = Qy.toFiniteNumber(i.headers.get("content-length"));
i = new Response(qx(i.body, 65536, o && Yx(t, Ox(o, !0)), s && v, $x),e)
}
c = c || "text";
let a = await rb[Qy.findKey(rb, c) || "text"](i, e);
return !s && v(),
g && g(),
await new Promise(( (t, n) => {
Dx(t, n, {
data: a,
headers: Px.from(i.headers),
status: i.status,
statusText: i.statusText,
config: e,
request: f
})
}
))
} catch (x) {
if (v(),
x && "TypeError" === x.name && /fetch/i.test(x.message))
throw Object.assign(new tx("Network Error",tx.ERR_NETWORK,e,f), {
cause: x.cause || x
});
throw tx.from(x, x && x.code, e, f)
}
}
)
, ob = {
http: null,
xhr: Jx,
fetch: ab
};
Qy.forEach(ob, ( (e, t) => {
if (e) {
try {
Object.defineProperty(e, "name", {
value: t
})
} catch (CB) {}
Object.defineProperty(e, "adapterName", {
value: t
})
}
}
));
const lb = e => "- ".concat(e)
, cb = e => Qy.isFunction(e) || null === e || !1 === e
, ub = e => {
e = Qy.isArray(e) ? e : [e];
const {length: t} = e;
let n, r;
const i = {};
for (let s = 0; s < t; s++) {
let t;
if (n = e[s],
r = n,
!cb(n) && (r = ob[(t = String(n)).toLowerCase()],
void 0 === r))
throw new tx("Unknown adapter '".concat(t, "'"));
if (r)
break;
i[t || "#" + s] = r
}
if (!r) {
const e = Object.entries(i).map((e => {
let[t,n] = e;
return "adapter ".concat(t, " ") + (!1 === n ? "is not supported by the environment" : "is not available in the build")
}
));
let n = t ? e.length > 1 ? "since :\n" + e.map(lb).join("\n") : " " + lb(e[0]) : "as no adapter specified";
throw new tx("There is no suitable adapter to dispatch the request " + n,"ERR_NOT_SUPPORT")
}
return r
}
;
function db(e) {
if (e.cancelToken && e.cancelToken.throwIfRequested(),
e.signal && e.signal.aborted)
throw new Nx(null,e)
}
function hb(e) {
db(e),
e.headers = Px.from(e.headers),
e.data = kx.call(e, e.transformRequest),
-1 !== ["post", "put", "patch"].indexOf(e.method) && e.headers.setContentType("application/x-www-form-urlencoded", !1);
return ub(e.adapter || Ax.adapter)(e).then((function(t) {
return db(e),
t.data = kx.call(e, e.transformResponse, t),
t.headers = Px.from(t.headers),
t
}
), (function(t) {
return Lx(t) || (db(e),
t && t.response && (t.response.data = kx.call(e, e.transformResponse, t.response),
t.response.headers = Px.from(t.response.headers))),
Promise.reject(t)
}
))
}
const pb = "1.7.2"
, fb = {};
["object", "boolean", "number", "function", "string", "symbol"].forEach(( (e, t) => {
fb[e] = function(n) {
return typeof n === e || "a" + (t < 1 ? "n " : " ") + e
}
}
));
const mb = {};
fb.transitional = function(e, t, n) {
function r(e, t) {
return "[Axios v1.7.2] Transitional option '" + e + "'" + t + (n ? ". " + n : "")
}
return (n, i, s) => {
if (!1 === e)
throw new tx(r(i, " has been removed" + (t ? " in " + t : "")),tx.ERR_DEPRECATED);
return t && !mb[i] && (mb[i] = !0,
console.warn(r(i, " has been deprecated since v" + t + " and will be removed in the near future"))),
!e || e(n, i, s)
}
}
;
const gb = {
assertOptions: function(e, t, n) {
if ("object" !== typeof e)
throw new tx("options must be an object",tx.ERR_BAD_OPTION_VALUE);
const r = Object.keys(e);
let i = r.length;
for (; i-- > 0; ) {
const s = r[i]
, a = t[s];
if (a) {
const t = e[s]
, n = void 0 === t || a(t, s, e);
if (!0 !== n)
throw new tx("option " + s + " must be " + n,tx.ERR_BAD_OPTION_VALUE)
} else if (!0 !== n)
throw new tx("Unknown option " + s,tx.ERR_BAD_OPTION)
}
},
validators: fb
}
, vb = gb.validators;
class yb {
constructor(e) {
this.defaults = e,
this.interceptors = {
request: new px,
response: new px
}
}
async request(e, t) {
try {
return await this._request(e, t)
} catch (n) {
if (n instanceof Error) {
let e;
Error.captureStackTrace ? Error.captureStackTrace(e = {}) : e = new Error;
const t = e.stack ? e.stack.replace(/^.+\n/, "") : "";
try {
n.stack ? t && !String(n.stack).endsWith(t.replace(/^.+\n.+\n/, "")) && (n.stack += "\n" + t) : n.stack = t
} catch (CB) {}
}
throw n
}
}
_request(e, t) {
"string" === typeof e ? (t = t || {}).url = e : t = e || {},
t = Vx(this.defaults, t);
const {transitional: n, paramsSerializer: r, headers: i} = t;
void 0 !== n && gb.assertOptions(n, {
silentJSONParsing: vb.transitional(vb.boolean),
forcedJSONParsing: vb.transitional(vb.boolean),
clarifyTimeoutError: vb.transitional(vb.boolean)
}, !1),
null != r && (Qy.isFunction(r) ? t.paramsSerializer = {
serialize: r
} : gb.assertOptions(r, {
encode: vb.function,
serialize: vb.function
}, !0)),
t.method = (t.method || this.defaults.method || "get").toLowerCase();
let s = i && Qy.merge(i.common, i[t.method]);
i && Qy.forEach(["delete", "get", "head", "post", "put", "patch", "common"], (e => {
delete i[e]
}
)),
t.headers = Px.concat(s, i);
const a = [];
let o = !0;
this.interceptors.request.forEach((function(e) {
"function" === typeof e.runWhen && !1 === e.runWhen(t) || (o = o && e.synchronous,
a.unshift(e.fulfilled, e.rejected))
}
));
const l = [];
let c;
this.interceptors.response.forEach((function(e) {
l.push(e.fulfilled, e.rejected)
}
));
let u, d = 0;
if (!o) {
const e = [hb.bind(this), void 0];
for (e.unshift.apply(e, a),
e.push.apply(e, l),
u = e.length,
c = Promise.resolve(t); d < u; )
c = c.then(e[d++], e[d++]);
return c
}
u = a.length;
let h = t;
for (d = 0; d < u; ) {
const e = a[d++]
, t = a[d++];
try {
h = e(h)
} catch (iy) {
t.call(this, iy);
break
}
}
try {
c = hb.call(this, h)
} catch (iy) {
return Promise.reject(iy)
}
for (d = 0,
u = l.length; d < u; )
c = c.then(l[d++], l[d++]);
return c
}
getUri(e) {
return hx(Gx((e = Vx(this.defaults, e)).baseURL, e.url), e.params, e.paramsSerializer)
}
}
Qy.forEach(["delete", "get", "head", "options"], (function(e) {
yb.prototype[e] = function(t, n) {
return this.request(Vx(n || {}, {
method: e,
url: t,
data: (n || {}).data
}))
}
}
)),
Qy.forEach(["post", "put", "patch"], (function(e) {
function t(t) {
return function(n, r, i) {
return this.request(Vx(i || {}, {
method: e,
headers: t ? {
"Content-Type": "multipart/form-data"
} : {},
url: n,
data: r
}))
}
}
yb.prototype[e] = t(),
yb.prototype[e + "Form"] = t(!0)
}
));
const xb = yb;
class bb {
constructor(e) {
if ("function" !== typeof e)
throw new TypeError("executor must be a function.");
let t;
this.promise = new Promise((function(e) {
t = e
}
));
const n = this;
this.promise.then((e => {
if (!n._listeners)
return;
let t = n._listeners.length;
for (; t-- > 0; )
n._listeners[t](e);
n._listeners = null
}
)),
this.promise.then = e => {
let t;
const r = new Promise((e => {
n.subscribe(e),
t = e
}
)).then(e);
return r.cancel = function() {
n.unsubscribe(t)
}
,
r
}
,
e((function(e, r, i) {
n.reason || (n.reason = new Nx(e,r,i),
t(n.reason))
}
))
}
throwIfRequested() {
if (this.reason)
throw this.reason
}
subscribe(e) {
this.reason ? e(this.reason) : this._listeners ? this._listeners.push(e) : this._listeners = [e]
}
unsubscribe(e) {
if (!this._listeners)
return;
const t = this._listeners.indexOf(e);
-1 !== t && this._listeners.splice(t, 1)
}
static source() {
let e;
return {
token: new bb((function(t) {
e = t
}
)),
cancel: e
}
}
}
const _b = bb;
const wb = {
Continue: 100,
SwitchingProtocols: 101,
Processing: 102,
EarlyHints: 103,
Ok: 200,
Created: 201,
Accepted: 202,
NonAuthoritativeInformation: 203,
NoContent: 204,
ResetContent: 205,
PartialContent: 206,
MultiStatus: 207,
AlreadyReported: 208,
ImUsed: 226,
MultipleChoices: 300,
MovedPermanently: 301,
Found: 302,
SeeOther: 303,
NotModified: 304,
UseProxy: 305,
Unused: 306,
TemporaryRedirect: 307,
PermanentRedirect: 308,
BadRequest: 400,
Unauthorized: 401,
PaymentRequired: 402,
Forbidden: 403,
NotFound: 404,
MethodNotAllowed: 405,
NotAcceptable: 406,
ProxyAuthenticationRequired: 407,
RequestTimeout: 408,
Conflict: 409,
Gone: 410,
LengthRequired: 411,
PreconditionFailed: 412,
PayloadTooLarge: 413,
UriTooLong: 414,
UnsupportedMediaType: 415,
RangeNotSatisfiable: 416,
ExpectationFailed: 417,
ImATeapot: 418,
MisdirectedRequest: 421,
UnprocessableEntity: 422,
Locked: 423,
FailedDependency: 424,
TooEarly: 425,
UpgradeRequired: 426,
PreconditionRequired: 428,
TooManyRequests: 429,
RequestHeaderFieldsTooLarge: 431,
UnavailableForLegalReasons: 451,
InternalServerError: 500,
NotImplemented: 501,
BadGateway: 502,
ServiceUnavailable: 503,
GatewayTimeout: 504,
HttpVersionNotSupported: 505,
VariantAlsoNegotiates: 506,
InsufficientStorage: 507,
LoopDetected: 508,
NotExtended: 510,
NetworkAuthenticationRequired: 511
};
Object.entries(wb).forEach((e => {
let[t,n] = e;
wb[n] = t
}
));
const Sb = wb;
const Ab = function e(t) {
const n = new xb(t)
, r = py(xb.prototype.request, n);
return Qy.extend(r, xb.prototype, n, {
allOwnKeys: !0
}),
Qy.extend(r, n, null, {
allOwnKeys: !0
}),
r.create = function(n) {
return e(Vx(t, n))
}
,
r
}(Ax);
Ab.Axios = xb,
Ab.CanceledError = Nx,
Ab.CancelToken = _b,
Ab.isCancel = Lx,
Ab.VERSION = pb,
Ab.toFormData = ax,
Ab.AxiosError = tx,
Ab.Cancel = Ab.CanceledError,
Ab.all = function(e) {
return Promise.all(e)
}
,
Ab.spread = function(e) {
return function(t) {
return e.apply(null, t)
}
}
,
Ab.isAxiosError = function(e) {
return Qy.isObject(e) && !0 === e.isAxiosError
}
,
Ab.mergeConfig = Vx,
Ab.AxiosHeaders = Px,
Ab.formToJSON = e => wx(Qy.isHTMLForm(e) ? new FormData(e) : e),
Ab.getAdapter = ub,
Ab.HttpStatusCode = Sb,
Ab.default = Ab;
const Mb = Ab;
function Cb() {
return Cb = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var r in n)
({}).hasOwnProperty.call(n, r) && (e[r] = n[r])
}
return e
}
,
Cb.apply(null, arguments)
}
const Eb = 0
, Tb = 1
, Rb = 2
, Bb = 3
, Pb = 4
, kb = 5
, Lb = 6
, Ib = 0
, Nb = 1
, Db = 2
, jb = 2
, Fb = 1.25
, Ob = 1
, Ub = 65535
, zb = Math.pow(2, -24)
, Gb = Symbol("SKIP_GENERATION");
function Hb(e) {
return function(e) {
return e.index ? e.index.count : e.attributes.position.count
}(e) / 3
}
function Vb(e, t) {
if (!e.index) {
const n = e.attributes.position.count
, r = function(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : ArrayBuffer;
return e > 65535 ? new Uint32Array(new t(4 * e)) : new Uint16Array(new t(2 * e))
}(n, t.useSharedArrayBuffer ? SharedArrayBuffer : ArrayBuffer);
e.setIndex(new Ta(r,1));
for (let e = 0; e < n; e++)
r[e] = e
}
}
function Wb(e) {
const t = Hb(e)
, n = e.drawRange
, r = n.start / 3
, i = (n.start + n.count) / 3
, s = Math.max(0, r)
, a = Math.min(t, i) - s;
return [{
offset: Math.floor(s),
count: Math.floor(a)
}]
}
function Jb(e) {
if (!e.groups || !e.groups.length)
return Wb(e);
const t = []
, n = new Set
, r = e.drawRange
, i = r.start / 3
, s = (r.start + r.count) / 3;
for (const o of e.groups) {
const e = o.start / 3
, t = (o.start + o.count) / 3;
n.add(Math.max(i, e)),
n.add(Math.min(s, t))
}
const a = Array.from(n.values()).sort(( (e, t) => e - t));
for (let o = 0; o < a.length - 1; o++) {
const e = a[o]
, n = a[o + 1];
t.push({
offset: Math.floor(e),
count: Math.floor(n - e)
})
}
return t
}
function Xb(e, t, n) {
return n.min.x = t[e],
n.min.y = t[e + 1],
n.min.z = t[e + 2],
n.max.x = t[e + 3],
n.max.y = t[e + 4],
n.max.z = t[e + 5],
n
}
function Kb(e) {
let t = -1
, n = -1 / 0;
for (let r = 0; r < 3; r++) {
const i = e[r + 3] - e[r];
i > n && (n = i,
t = r)
}
return t
}
function qb(e, t) {
t.set(e)
}
function Yb(e, t, n) {
let r, i;
for (let s = 0; s < 3; s++) {
const a = s + 3;
r = e[s],
i = t[s],
n[s] = r < i ? r : i,
r = e[a],
i = t[a],
n[a] = r > i ? r : i
}
}
function Qb(e, t, n) {
for (let r = 0; r < 3; r++) {
const i = t[e + 2 * r]
, s = t[e + 2 * r + 1]
, a = i - s
, o = i + s;
a < n[r] && (n[r] = a),
o > n[r + 3] && (n[r + 3] = o)
}
}
function Zb(e) {
const t = e[3] - e[0]
, n = e[4] - e[1]
, r = e[5] - e[2];
return 2 * (t * n + n * r + r * t)
}
function $b(e, t, n, r) {
let i = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : null
, s = 1 / 0
, a = 1 / 0
, o = 1 / 0
, l = -1 / 0
, c = -1 / 0
, u = -1 / 0
, d = 1 / 0
, h = 1 / 0
, p = 1 / 0
, f = -1 / 0
, m = -1 / 0
, g = -1 / 0;
const v = null !== i;
for (let y = 6 * t, x = 6 * (t + n); y < x; y += 6) {
const t = e[y + 0]
, n = e[y + 1]
, r = t - n
, i = t + n;
r < s && (s = r),
i > l && (l = i),
v && t < d && (d = t),
v && t > f && (f = t);
const x = e[y + 2]
, b = e[y + 3]
, _ = x - b
, w = x + b;
_ < a && (a = _),
w > c && (c = w),
v && x < h && (h = x),
v && x > m && (m = x);
const S = e[y + 4]
, A = e[y + 5]
, M = S - A
, C = S + A;
M < o && (o = M),
C > u && (u = C),
v && S < p && (p = S),
v && S > g && (g = S)
}
r[0] = s,
r[1] = a,
r[2] = o,
r[3] = l,
r[4] = c,
r[5] = u,
v && (i[0] = d,
i[1] = h,
i[2] = p,
i[3] = f,
i[4] = m,
i[5] = g)
}
const e_ = 32
, t_ = (e, t) => e.candidate - t.candidate
, n_ = new Array(e_).fill().map(( () => ({
count: 0,
bounds: new Float32Array(6),
rightCacheBounds: new Float32Array(6),
leftCacheBounds: new Float32Array(6),
candidate: 0
})))
, r_ = new Float32Array(6);
class i_ {
constructor() {}
}
function s_(e, t, n, r, i, s) {
let a = r
, o = r + i - 1;
const l = s.pos
, c = 2 * s.axis;
for (; ; ) {
for (; a <= o && n[6 * a + c] < l; )
a++;
for (; a <= o && n[6 * o + c] >= l; )
o--;
if (!(a < o))
return a;
for (let e = 0; e < 3; e++) {
let n = t[3 * a + e];
t[3 * a + e] = t[3 * o + e],
t[3 * o + e] = n
}
for (let e = 0; e < 6; e++) {
let t = n[6 * a + e];
n[6 * a + e] = n[6 * o + e],
n[6 * o + e] = t
}
a++,
o--
}
}
function a_(e, t, n, r, i, s) {
let a = r
, o = r + i - 1;
const l = s.pos
, c = 2 * s.axis;
for (; ; ) {
for (; a <= o && n[6 * a + c] < l; )
a++;
for (; a <= o && n[6 * o + c] >= l; )
o--;
if (!(a < o))
return a;
{
let t = e[a];
e[a] = e[o],
e[o] = t;
for (let e = 0; e < 6; e++) {
let t = n[6 * a + e];
n[6 * a + e] = n[6 * o + e],
n[6 * o + e] = t
}
a++,
o--
}
}
}
function o_(e, t) {
const n = e.geometry
, r = n.index ? n.index.array : null
, i = t.maxDepth
, s = t.verbose
, a = t.maxLeafTris
, o = t.strategy
, l = t.onProgress
, c = Hb(n)
, u = e._indirectBuffer;
let d = !1;
const h = new Float32Array(6)
, p = new Float32Array(6)
, f = function(e, t) {
var n;
(n = t)[0] = n[1] = n[2] = 1 / 0,
n[3] = n[4] = n[5] = -1 / 0;
const r = e.attributes.position
, i = e.index ? e.index.array : null
, s = Hb(e)
, a = new Float32Array(6 * s)
, o = r.normalized
, l = r.array
, c = r.offset || 0;
let u = 3;
r.isInterleavedBufferAttribute && (u = r.data.stride);
const d = ["getX", "getY", "getZ"];
for (let h = 0; h < s; h++) {
const e = 3 * h
, n = 6 * h;
let s = e + 0
, p = e + 1
, f = e + 2;
i && (s = i[s],
p = i[p],
f = i[f]),
o || (s = s * u + c,
p = p * u + c,
f = f * u + c);
for (let i = 0; i < 3; i++) {
let e, c, u;
o ? (e = r[d[i]](s),
c = r[d[i]](p),
u = r[d[i]](f)) : (e = l[s + i],
c = l[p + i],
u = l[f + i]);
let h = e;
c < h && (h = c),
u < h && (h = u);
let m = e;
c > m && (m = c),
u > m && (m = u);
const g = (m - h) / 2
, v = 2 * i;
a[n + v + 0] = h + g,
a[n + v + 1] = g + (Math.abs(h) + g) * zb,
h < t[i] && (t[i] = h),
m > t[i + 3] && (t[i + 3] = m)
}
}
return a
}(n, h)
, m = t.indirect ? a_ : s_
, g = []
, v = t.indirect ? Wb(n) : Jb(n);
if (1 === v.length) {
const e = v[0]
, t = new i_;
t.boundingData = h,
function(e, t, n, r) {
let i = 1 / 0
, s = 1 / 0
, a = 1 / 0
, o = -1 / 0
, l = -1 / 0
, c = -1 / 0;
for (let u = 6 * t, d = 6 * (t + n); u < d; u += 6) {
const t = e[u + 0];
t < i && (i = t),
t > o && (o = t);
const n = e[u + 2];
n < s && (s = n),
n > l && (l = n);
const r = e[u + 4];
r < a && (a = r),
r > c && (c = r)
}
r[0] = i,
r[1] = s,
r[2] = a,
r[3] = o,
r[4] = l,
r[5] = c
}(f, e.offset, e.count, p),
x(t, e.offset, e.count, p),
g.push(t)
} else
for (let b of v) {
const e = new i_;
e.boundingData = new Float32Array(6),
$b(f, b.offset, b.count, e.boundingData, p),
x(e, b.offset, b.count, p),
g.push(e)
}
return g;
function y(e) {
l && l(e / c)
}
function x(e, t, l) {
let c = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : null
, h = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : 0;
if (!d && h >= i && (d = !0,
s && (console.warn("MeshBVH: Max depth of ".concat(i, " reached when generating BVH. Consider increasing maxDepth.")),
console.warn(n))),
l <= a || h >= i)
return y(t + l),
e.offset = t,
e.count = l,
e;
const g = function(e, t, n, r, i, s) {
let a = -1
, o = 0;
if (s === Ib)
a = Kb(t),
-1 !== a && (o = (t[a] + t[a + 3]) / 2);
else if (s === Nb)
a = Kb(e),
-1 !== a && (o = function(e, t, n, r) {
let i = 0;
for (let s = t, a = t + n; s < a; s++)
i += e[6 * s + 2 * r];
return i / n
}(n, r, i, a));
else if (s === Db) {
const s = Zb(e);
let l = Fb * i;
const c = 6 * r
, u = 6 * (r + i);
for (let e = 0; e < 3; e++) {
const r = t[e]
, d = (t[e + 3] - r) / e_;
if (i < e_ / 4) {
const t = [...n_];
t.length = i;
let r = 0;
for (let i = c; i < u; i += 6,
r++) {
const s = t[r];
s.candidate = n[i + 2 * e],
s.count = 0;
const {bounds: a, leftCacheBounds: o, rightCacheBounds: l} = s;
for (let e = 0; e < 3; e++)
l[e] = 1 / 0,
l[e + 3] = -1 / 0,
o[e] = 1 / 0,
o[e + 3] = -1 / 0,
a[e] = 1 / 0,
a[e + 3] = -1 / 0;
Qb(i, n, a)
}
t.sort(t_);
let d = i;
for (let e = 0; e < d; e++) {
const n = t[e];
for (; e + 1 < d && t[e + 1].candidate === n.candidate; )
t.splice(e + 1, 1),
d--
}
for (let i = c; i < u; i += 6) {
const r = n[i + 2 * e];
for (let e = 0; e < d; e++) {
const s = t[e];
r >= s.candidate ? Qb(i, n, s.rightCacheBounds) : (Qb(i, n, s.leftCacheBounds),
s.count++)
}
}
for (let n = 0; n < d; n++) {
const r = t[n]
, c = r.count
, u = i - r.count
, d = r.leftCacheBounds
, h = r.rightCacheBounds;
let p = 0;
0 !== c && (p = Zb(d) / s);
let f = 0;
0 !== u && (f = Zb(h) / s);
const m = Ob + Fb * (p * c + f * u);
m < l && (a = e,
l = m,
o = r.candidate)
}
} else {
for (let e = 0; e < e_; e++) {
const t = n_[e];
t.count = 0,
t.candidate = r + d + e * d;
const n = t.bounds;
for (let e = 0; e < 3; e++)
n[e] = 1 / 0,
n[e + 3] = -1 / 0
}
for (let i = c; i < u; i += 6) {
let t = ~~((n[i + 2 * e] - r) / d);
t >= e_ && (t = e_ - 1);
const s = n_[t];
s.count++,
Qb(i, n, s.bounds)
}
const t = n_[e_ - 1];
qb(t.bounds, t.rightCacheBounds);
for (let e = e_ - 2; e >= 0; e--) {
const t = n_[e]
, n = n_[e + 1];
Yb(t.bounds, n.rightCacheBounds, t.rightCacheBounds)
}
let h = 0;
for (let n = 0; n < e_ - 1; n++) {
const t = n_[n]
, r = t.count
, c = t.bounds
, u = n_[n + 1].rightCacheBounds;
0 !== r && (0 === h ? qb(c, r_) : Yb(c, r_, r_)),
h += r;
let d = 0
, p = 0;
0 !== h && (d = Zb(r_) / s);
const f = i - h;
0 !== f && (p = Zb(u) / s);
const m = Ob + Fb * (d * h + p * f);
m < l && (a = e,
l = m,
o = t.candidate)
}
}
}
} else
console.warn("MeshBVH: Invalid build strategy value ".concat(s, " used."));
return {
axis: a,
pos: o
}
}(e.boundingData, c, f, t, l, o);
if (-1 === g.axis)
return y(t + l),
e.offset = t,
e.count = l,
e;
const v = m(u, r, f, t, l, g);
if (v === t || v === t + l)
y(t + l),
e.offset = t,
e.count = l;
else {
e.splitAxis = g.axis;
const n = new i_
, r = t
, i = v - t;
e.left = n,
n.boundingData = new Float32Array(6),
$b(f, r, i, n.boundingData, p),
x(n, r, i, p, h + 1);
const s = new i_
, a = v
, o = l - i;
e.right = s,
s.boundingData = new Float32Array(6),
$b(f, a, o, s.boundingData, p),
x(s, a, o, p, h + 1)
}
return e
}
}
function l_(e, t) {
const n = e.geometry;
t.indirect && (e._indirectBuffer = function(e, t) {
const n = (e.index ? e.index.count : e.attributes.position.count) / 3
, r = n > 65536
, i = r ? 4 : 2
, s = t ? new SharedArrayBuffer(n * i) : new ArrayBuffer(n * i)
, a = r ? new Uint32Array(s) : new Uint16Array(s);
for (let o = 0, l = a.length; o < l; o++)
a[o] = o;
return a
}(n, t.useSharedArrayBuffer),
function(e) {
if (0 === e.groups.length)
return !1;
const t = Hb(e)
, n = Jb(e).sort(( (e, t) => e.offset - t.offset))
, r = n[n.length - 1];
r.count = Math.min(t - r.offset, r.count);
let i = 0;
return n.forEach((e => {
let {count: t} = e;
return i += t
}
)),
t !== i
}(n) && !t.verbose && console.warn('MeshBVH: Provided geometry contains groups that do not fully span the vertex contents while using the "indirect" option. BVH may incorrectly report intersections on unrendered portions of the geometry.')),
e._indirectBuffer || Vb(n, t);
const r = o_(e, t);
let i, s, a;
const o = []
, l = t.useSharedArrayBuffer ? SharedArrayBuffer : ArrayBuffer;
for (let d = 0; d < r.length; d++) {
const e = r[d];
const t = new l(32 * c(e));
i = new Float32Array(t),
s = new Uint32Array(t),
a = new Uint16Array(t),
u(0, e),
o.push(t)
}
return void (e._roots = o);
function c(e) {
return e.count ? 1 : 1 + c(e.left) + c(e.right)
}
function u(e, t) {
const n = e / 4
, r = e / 2
, o = !!t.count
, l = t.boundingData;
for (let s = 0; s < 6; s++)
i[n + s] = l[s];
if (o) {
const i = t.offset
, o = t.count;
return s[n + 6] = i,
a[r + 14] = o,
a[r + 15] = Ub,
e + 32
}
{
const r = t.left
, i = t.right
, a = t.splitAxis;
let o;
if (o = u(e + 32, r),
o / 4 > Math.pow(2, 32))
throw new Error("MeshBVH: Cannot store child pointer greater than 32 bits.");
return s[n + 6] = o / 4,
o = u(o, i),
s[n + 7] = a,
o
}
}
}
class c_ {
constructor() {
this.min = 1 / 0,
this.max = -1 / 0
}
setFromPointsField(e, t) {
let n = 1 / 0
, r = -1 / 0;
for (let i = 0, s = e.length; i < s; i++) {
const s = e[i][t];
n = s < n ? s : n,
r = s > r ? s : r
}
this.min = n,
this.max = r
}
setFromPoints(e, t) {
let n = 1 / 0
, r = -1 / 0;
for (let i = 0, s = t.length; i < s; i++) {
const s = t[i]
, a = e.dot(s);
n = a < n ? a : n,
r = a > r ? a : r
}
this.min = n,
this.max = r
}
isSeparated(e) {
return this.min > e.max || e.min > this.max
}
}
c_.prototype.setFromBox = function() {
const e = new Qi;
return function(t, n) {
const r = n.min
, i = n.max;
let s = 1 / 0
, a = -1 / 0;
for (let o = 0; o <= 1; o++)
for (let n = 0; n <= 1; n++)
for (let l = 0; l <= 1; l++) {
e.x = r.x * o + i.x * (1 - o),
e.y = r.y * n + i.y * (1 - n),
e.z = r.z * l + i.z * (1 - l);
const c = t.dot(e);
s = Math.min(c, s),
a = Math.max(c, a)
}
this.min = s,
this.max = a
}
}();
!function() {
const e = new c_
}();
const u_ = function() {
const e = new Qi
, t = new Qi
, n = new Qi;
return function(r, i, s) {
const a = r.start
, o = e
, l = i.start
, c = t;
n.subVectors(a, l),
e.subVectors(r.end, r.start),
t.subVectors(i.end, i.start);
const u = n.dot(c)
, d = c.dot(o)
, h = c.dot(c)
, p = n.dot(o)
, f = o.dot(o) * h - d * d;
let m, g;
m = 0 !== f ? (u * d - p * h) / f : 0,
g = (u + m * d) / h,
s.x = m,
s.y = g
}
}()
, d_ = function() {
const e = new xi
, t = new Qi
, n = new Qi;
return function(r, i, s, a) {
u_(r, i, e);
let o = e.x
, l = e.y;
if (o >= 0 && o <= 1 && l >= 0 && l <= 1)
return r.at(o, s),
void i.at(l, a);
if (o >= 0 && o <= 1)
return l < 0 ? i.at(0, a) : i.at(1, a),
void r.closestPointToPoint(a, !0, s);
if (l >= 0 && l <= 1)
return o < 0 ? r.at(0, s) : r.at(1, s),
void i.closestPointToPoint(s, !0, a);
{
let e, c;
e = o < 0 ? r.start : r.end,
c = l < 0 ? i.start : i.end;
const u = t
, d = n;
return r.closestPointToPoint(c, !0, t),
i.closestPointToPoint(e, !0, n),
u.distanceToSquared(c) <= d.distanceToSquared(e) ? (s.copy(u),
void a.copy(c)) : (s.copy(e),
void a.copy(d))
}
}
}()
, h_ = function() {
const e = new Qi
, t = new Qi
, n = new Bo
, r = new Vm;
return function(i, s) {
const {radius: a, center: o} = i
, {a: l, b: c, c: u} = s;
r.start = l,
r.end = c;
if (r.closestPointToPoint(o, !0, e).distanceTo(o) <= a)
return !0;
r.start = l,
r.end = u;
if (r.closestPointToPoint(o, !0, e).distanceTo(o) <= a)
return !0;
r.start = c,
r.end = u;
if (r.closestPointToPoint(o, !0, e).distanceTo(o) <= a)
return !0;
const d = s.getPlane(n);
if (Math.abs(d.distanceToPoint(o)) <= a) {
const e = d.projectPoint(o, t);
if (s.containsPoint(e))
return !0
}
return !1
}
}();
function p_(e) {
return Math.abs(e) < 1e-15
}
class f_ extends da {
constructor() {
super(...arguments),
this.isExtendedTriangle = !0,
this.satAxes = new Array(4).fill().map(( () => new Qi)),
this.satBounds = new Array(4).fill().map(( () => new c_)),
this.points = [this.a, this.b, this.c],
this.sphere = new ys,
this.plane = new Bo,
this.needsUpdate = !0
}
intersectsSphere(e) {
return h_(e, this)
}
update() {
const e = this.a
, t = this.b
, n = this.c
, r = this.points
, i = this.satAxes
, s = this.satBounds
, a = i[0]
, o = s[0];
this.getNormal(a),
o.setFromPoints(a, r);
const l = i[1]
, c = s[1];
l.subVectors(e, t),
c.setFromPoints(l, r);
const u = i[2]
, d = s[2];
u.subVectors(t, n),
d.setFromPoints(u, r);
const h = i[3]
, p = s[3];
h.subVectors(n, e),
p.setFromPoints(h, r),
this.sphere.setFromPoints(this.points),
this.plane.setFromNormalAndCoplanarPoint(a, e),
this.needsUpdate = !1
}
}
f_.prototype.closestPointToSegment = function() {
const e = new Qi
, t = new Qi
, n = new Vm;
return function(r) {
let i = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : null
, s = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : null;
const {start: a, end: o} = r
, l = this.points;
let c, u = 1 / 0;
for (let d = 0; d < 3; d++) {
const a = (d + 1) % 3;
n.start.copy(l[d]),
n.end.copy(l[a]),
d_(n, r, e, t),
c = e.distanceToSquared(t),
c < u && (u = c,
i && i.copy(e),
s && s.copy(t))
}
return this.closestPointToPoint(a, e),
c = a.distanceToSquared(e),
c < u && (u = c,
i && i.copy(e),
s && s.copy(a)),
this.closestPointToPoint(o, e),
c = o.distanceToSquared(e),
c < u && (u = c,
i && i.copy(e),
s && s.copy(o)),
Math.sqrt(u)
}
}(),
f_.prototype.intersectsTriangle = function() {
const e = new f_
, t = new Array(3)
, n = new Array(3)
, r = new c_
, i = new c_
, s = new Qi
, a = new Qi
, o = new Qi
, l = new Qi
, c = new Qi
, u = new Vm
, d = new Vm
, h = new Vm
, p = new Qi;
function f(e, t, n) {
const r = e.points;
let i = 0
, s = -1;
for (let o = 0; o < 3; o++) {
const {start: e, end: l} = u;
e.copy(r[o]),
l.copy(r[(o + 1) % 3]),
u.delta(a);
const c = p_(t.distanceToPoint(e));
if (p_(t.normal.dot(a)) && c) {
n.copy(u),
i = 2;
break
}
const d = t.intersectLine(u, p);
if (!d && c && p.copy(e),
(d || c) && !p_(p.distanceTo(l))) {
if (i <= 1) {
(1 === i ? n.start : n.end).copy(p),
c && (s = i)
} else if (i >= 2) {
(1 === s ? n.start : n.end).copy(p),
i = 2;
break
}
if (i++,
2 === i && -1 === s)
break
}
}
return i
}
return function(a) {
let u = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : null
, p = arguments.length > 2 && void 0 !== arguments[2] && arguments[2];
this.needsUpdate && this.update(),
a.isExtendedTriangle ? a.needsUpdate && a.update() : (e.copy(a),
e.update(),
a = e);
const m = this.plane
, g = a.plane;
if (Math.abs(m.normal.dot(g.normal)) > 1 - 1e-10) {
const e = this.satBounds
, o = this.satAxes;
n[0] = a.a,
n[1] = a.b,
n[2] = a.c;
for (let t = 0; t < 4; t++) {
const i = e[t]
, s = o[t];
if (r.setFromPoints(s, n),
i.isSeparated(r))
return !1
}
const l = a.satBounds
, c = a.satAxes;
t[0] = this.a,
t[1] = this.b,
t[2] = this.c;
for (let n = 0; n < 4; n++) {
const e = l[n]
, i = c[n];
if (r.setFromPoints(i, t),
e.isSeparated(r))
return !1
}
for (let a = 0; a < 4; a++) {
const e = o[a];
for (let a = 0; a < 4; a++) {
const o = c[a];
if (s.crossVectors(e, o),
r.setFromPoints(s, t),
i.setFromPoints(s, n),
r.isSeparated(i))
return !1
}
}
return u && (p || console.warn("ExtendedTriangle.intersectsTriangle: Triangles are coplanar which does not support an output edge. Setting edge to 0, 0, 0."),
u.start.set(0, 0, 0),
u.end.set(0, 0, 0)),
!0
}
{
const e = f(this, g, d);
if (1 === e && a.containsPoint(d.end))
return u && (u.start.copy(d.end),
u.end.copy(d.end)),
!0;
if (2 !== e)
return !1;
const t = f(a, m, h);
if (1 === t && this.containsPoint(h.end))
return u && (u.start.copy(h.end),
u.end.copy(h.end)),
!0;
if (2 !== t)
return !1;
if (d.delta(o),
h.delta(l),
o.dot(l) < 0) {
let e = h.start;
h.start = h.end,
h.end = e
}
const n = d.start.dot(o)
, r = d.end.dot(o)
, i = h.start.dot(o)
, s = h.end.dot(o);
return (n === s || i === r || r < i !== n < s) && (u && (c.subVectors(d.start, h.start),
c.dot(o) > 0 ? u.start.copy(d.start) : u.start.copy(h.start),
c.subVectors(d.end, h.end),
c.dot(o) < 0 ? u.end.copy(d.end) : u.end.copy(h.end)),
!0)
}
}
}(),
f_.prototype.distanceToPoint = function() {
const e = new Qi;
return function(t) {
return this.closestPointToPoint(t, e),
t.distanceTo(e)
}
}(),
f_.prototype.distanceToTriangle = function() {
const e = new Qi
, t = new Qi
, n = ["a", "b", "c"]
, r = new Vm
, i = new Vm;
return function(s) {
let a = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : null
, o = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : null;
const l = a || o ? r : null;
if (this.intersectsTriangle(s, l))
return (a || o) && (a && l.getCenter(a),
o && l.getCenter(o)),
0;
let c = 1 / 0;
for (let t = 0; t < 3; t++) {
let r;
const i = n[t]
, l = s[i];
this.closestPointToPoint(l, e),
r = l.distanceToSquared(e),
r < c && (c = r,
a && a.copy(e),
o && o.copy(l));
const u = this[i];
s.closestPointToPoint(u, e),
r = u.distanceToSquared(e),
r < c && (c = r,
a && a.copy(u),
o && o.copy(e))
}
for (let u = 0; u < 3; u++) {
const l = n[u]
, d = n[(u + 1) % 3];
r.set(this[l], this[d]);
for (let u = 0; u < 3; u++) {
const l = n[u]
, d = n[(u + 1) % 3];
i.set(s[l], s[d]),
d_(r, i, e, t);
const h = e.distanceToSquared(t);
h < c && (c = h,
a && a.copy(e),
o && o.copy(t))
}
}
return Math.sqrt(c)
}
}();
class m_ {
constructor(e, t, n) {
this.isOrientedBox = !0,
this.min = new Qi,
this.max = new Qi,
this.matrix = new Es,
this.invMatrix = new Es,
this.points = new Array(8).fill().map(( () => new Qi)),
this.satAxes = new Array(3).fill().map(( () => new Qi)),
this.satBounds = new Array(3).fill().map(( () => new c_)),
this.alignedSatBounds = new Array(3).fill().map(( () => new c_)),
this.needsUpdate = !1,
e && this.min.copy(e),
t && this.max.copy(t),
n && this.matrix.copy(n)
}
set(e, t, n) {
this.min.copy(e),
this.max.copy(t),
this.matrix.copy(n),
this.needsUpdate = !0
}
copy(e) {
this.min.copy(e.min),
this.max.copy(e.max),
this.matrix.copy(e.matrix),
this.needsUpdate = !0
}
}
m_.prototype.update = function() {
const e = this.matrix
, t = this.min
, n = this.max
, r = this.points;
for (let l = 0; l <= 1; l++)
for (let i = 0; i <= 1; i++)
for (let s = 0; s <= 1; s++) {
const a = r[1 * l | 2 * i | 4 * s];
a.x = l ? n.x : t.x,
a.y = i ? n.y : t.y,
a.z = s ? n.z : t.z,
a.applyMatrix4(e)
}
const i = this.satBounds
, s = this.satAxes
, a = r[0];
for (let l = 0; l < 3; l++) {
const e = s[l]
, t = i[l]
, n = r[1 << l];
e.subVectors(a, n),
t.setFromPoints(e, r)
}
const o = this.alignedSatBounds;
o[0].setFromPointsField(r, "x"),
o[1].setFromPointsField(r, "y"),
o[2].setFromPointsField(r, "z"),
this.invMatrix.copy(this.matrix).invert(),
this.needsUpdate = !1
}
,
m_.prototype.intersectsBox = function() {
const e = new c_;
return function(t) {
this.needsUpdate && this.update();
const n = t.min
, r = t.max
, i = this.satBounds
, s = this.satAxes
, a = this.alignedSatBounds;
if (e.min = n.x,
e.max = r.x,
a[0].isSeparated(e))
return !1;
if (e.min = n.y,
e.max = r.y,
a[1].isSeparated(e))
return !1;
if (e.min = n.z,
e.max = r.z,
a[2].isSeparated(e))
return !1;
for (let o = 0; o < 3; o++) {
const n = s[o]
, r = i[o];
if (e.setFromBox(n, t),
r.isSeparated(e))
return !1
}
return !0
}
}(),
m_.prototype.intersectsTriangle = function() {
const e = new f_
, t = new Array(3)
, n = new c_
, r = new c_
, i = new Qi;
return function(s) {
this.needsUpdate && this.update(),
s.isExtendedTriangle ? s.needsUpdate && s.update() : (e.copy(s),
e.update(),
s = e);
const a = this.satBounds
, o = this.satAxes;
t[0] = s.a,
t[1] = s.b,
t[2] = s.c;
for (let e = 0; e < 3; e++) {
const r = a[e]
, i = o[e];
if (n.setFromPoints(i, t),
r.isSeparated(n))
return !1
}
const l = s.satBounds
, c = s.satAxes
, u = this.points;
for (let e = 0; e < 3; e++) {
const t = l[e]
, r = c[e];
if (n.setFromPoints(r, u),
t.isSeparated(n))
return !1
}
for (let e = 0; e < 3; e++) {
const s = o[e];
for (let e = 0; e < 4; e++) {
const a = c[e];
if (i.crossVectors(s, a),
n.setFromPoints(i, t),
r.setFromPoints(i, u),
n.isSeparated(r))
return !1
}
}
return !0
}
}(),
m_.prototype.closestPointToPoint = function(e, t) {
return this.needsUpdate && this.update(),
t.copy(e).applyMatrix4(this.invMatrix).clamp(this.min, this.max).applyMatrix4(this.matrix),
t
}
,
m_.prototype.distanceToPoint = function() {
const e = new Qi;
return function(t) {
return this.closestPointToPoint(t, e),
t.distanceTo(e)
}
}(),
m_.prototype.distanceToBox = function() {
const e = ["x", "y", "z"]
, t = new Array(12).fill().map(( () => new Vm))
, n = new Array(12).fill().map(( () => new Vm))
, r = new Qi
, i = new Qi;
return function(s) {
let a = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0
, o = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : null
, l = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : null;
if (this.needsUpdate && this.update(),
this.intersectsBox(s))
return (o || l) && (s.getCenter(i),
this.closestPointToPoint(i, r),
s.closestPointToPoint(r, i),
o && o.copy(r),
l && l.copy(i)),
0;
const c = a * a
, u = s.min
, d = s.max
, h = this.points;
let p = 1 / 0;
for (let e = 0; e < 8; e++) {
const t = h[e];
i.copy(t).clamp(u, d);
const n = t.distanceToSquared(i);
if (n < p && (p = n,
o && o.copy(t),
l && l.copy(i),
n < c))
return Math.sqrt(n)
}
let f = 0;
for (let r = 0; r < 3; r++)
for (let i = 0; i <= 1; i++)
for (let s = 0; s <= 1; s++) {
const a = (r + 1) % 3
, o = (r + 2) % 3
, l = 1 << r | i << a | s << o
, c = h[i << a | s << o]
, p = h[l];
t[f].set(c, p);
const m = e[r]
, g = e[a]
, v = e[o]
, y = n[f]
, x = y.start
, b = y.end;
x[m] = u[m],
x[g] = i ? u[g] : d[g],
x[v] = s ? u[v] : d[g],
b[m] = d[m],
b[g] = i ? u[g] : d[g],
b[v] = s ? u[v] : d[g],
f++
}
for (let e = 0; e <= 1; e++)
for (let t = 0; t <= 1; t++)
for (let n = 0; n <= 1; n++) {
i.x = e ? d.x : u.x,
i.y = t ? d.y : u.y,
i.z = n ? d.z : u.z,
this.closestPointToPoint(i, r);
const s = i.distanceToSquared(r);
if (s < p && (p = s,
o && o.copy(r),
l && l.copy(i),
s < c))
return Math.sqrt(s)
}
for (let e = 0; e < 12; e++) {
const s = t[e];
for (let e = 0; e < 12; e++) {
const t = n[e];
d_(s, t, r, i);
const a = r.distanceToSquared(i);
if (a < p && (p = a,
o && o.copy(r),
l && l.copy(i),
a < c))
return Math.sqrt(a)
}
}
return Math.sqrt(p)
}
}();
class g_ {
constructor(e) {
this._getNewPrimitive = e,
this._primitives = []
}
getPrimitive() {
const e = this._primitives;
return 0 === e.length ? this._getNewPrimitive() : e.pop()
}
releasePrimitive(e) {
this._primitives.push(e)
}
}
class v_ extends g_ {
constructor() {
super(( () => new f_))
}
}
const y_ = new v_;
function x_(e, t) {
return 65535 === t[e + 15]
}
function b_(e, t) {
return t[e + 6]
}
function __(e, t) {
return t[e + 14]
}
function w_(e) {
return e + 8
}
function S_(e, t) {
return t[e + 6]
}
function A_(e, t) {
return t[e + 7]
}
const M_ = new class {
constructor() {
this.float32Array = null,
this.uint16Array = null,
this.uint32Array = null;
const e = [];
let t = null;
this.setBuffer = n => {
t && e.push(t),
t = n,
this.float32Array = new Float32Array(n),
this.uint16Array = new Uint16Array(n),
this.uint32Array = new Uint32Array(n)
}
,
this.clearBuffer = () => {
t = null,
this.float32Array = null,
this.uint16Array = null,
this.uint32Array = null,
0 !== e.length && this.setBuffer(e.pop())
}
}
}
;
let C_, E_;
const T_ = []
, R_ = new g_(( () => new es));
function B_(e, t, n, r, i, s) {
C_ = R_.getPrimitive(),
E_ = R_.getPrimitive(),
T_.push(C_, E_),
M_.setBuffer(e._roots[t]);
const a = P_(0, e.geometry, n, r, i, s);
M_.clearBuffer(),
R_.releasePrimitive(C_),
R_.releasePrimitive(E_),
T_.pop(),
T_.pop();
const o = T_.length;
return o > 0 && (E_ = T_[o - 1],
C_ = T_[o - 2]),
a
}
function P_(e, t, n, r) {
let i = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : null
, s = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : 0
, a = arguments.length > 6 && void 0 !== arguments[6] ? arguments[6] : 0;
const {float32Array: o, uint16Array: l, uint32Array: c} = M_;
let u = 2 * e;
if (x_(u, l)) {
const d = b_(e, c)
, h = __(u, l);
return Xb(e, o, C_),
r(d, h, !1, a, s + e, C_)
}
{
const p = w_(e)
, f = S_(e, c);
let m, g, v, y, x = p, b = f;
if (i && (v = C_,
y = E_,
Xb(x, o, v),
Xb(b, o, y),
m = i(v),
g = i(y),
g < m)) {
x = f,
b = p;
const E = m;
m = g,
g = E,
v = y
}
v || (v = C_,
Xb(x, o, v));
const _ = n(v, x_(2 * x, l), m, a + 1, s + x);
let w;
if (_ === jb) {
const T = M(x);
w = r(T, C(x) - T, !0, a + 1, s + x, v)
} else
w = _ && P_(x, t, n, r, i, s, a + 1);
if (w)
return !0;
y = E_,
Xb(b, o, y);
const S = n(y, x_(2 * b, l), g, a + 1, s + b);
let A;
if (S === jb) {
const R = M(b);
A = r(R, C(b) - R, !0, a + 1, s + b, y)
} else
A = S && P_(b, t, n, r, i, s, a + 1);
return !!A;
function M(e) {
const {uint16Array: t, uint32Array: n} = M_;
let r = 2 * e;
for (; !x_(r, t); )
r = 2 * (e = w_(e));
return b_(e, n)
}
function C(e) {
const {uint16Array: t, uint32Array: n} = M_;
let r = 2 * e;
for (; !x_(r, t); )
r = 2 * (e = S_(e, n));
return b_(e, n) + __(r, t)
}
}
}
const k_ = new Qi
, L_ = new Qi;
const I_ = new Qi
, N_ = new Qi
, D_ = new Qi
, j_ = new xi
, F_ = new xi
, O_ = new xi
, U_ = new Qi
, z_ = new Qi
, G_ = new Qi
, H_ = new Qi;
function V_(e, t, n, r, i, s, a, o, l) {
I_.fromBufferAttribute(t, s),
N_.fromBufferAttribute(t, a),
D_.fromBufferAttribute(t, o);
const c = function(e, t, n, r, i, s) {
let a;
return a = s === Ie ? e.intersectTriangle(r, n, t, !0, i) : e.intersectTriangle(t, n, r, s !== Ne, i),
null === a ? null : {
distance: e.origin.distanceTo(i),
point: i.clone()
}
}(e, I_, N_, D_, H_, l);
if (c) {
r && (j_.fromBufferAttribute(r, s),
F_.fromBufferAttribute(r, a),
O_.fromBufferAttribute(r, o),
c.uv = da.getInterpolation(H_, I_, N_, D_, j_, F_, O_, new xi)),
i && (j_.fromBufferAttribute(i, s),
F_.fromBufferAttribute(i, a),
O_.fromBufferAttribute(i, o),
c.uv1 = da.getInterpolation(H_, I_, N_, D_, j_, F_, O_, new xi)),
n && (U_.fromBufferAttribute(n, s),
z_.fromBufferAttribute(n, a),
G_.fromBufferAttribute(n, o),
c.normal = da.getInterpolation(H_, I_, N_, D_, U_, z_, G_, new Qi),
c.normal.dot(e.direction) > 0 && c.normal.multiplyScalar(-1));
const t = {
a: s,
b: a,
c: o,
normal: new Qi,
materialIndex: 0
};
da.getNormal(I_, N_, D_, t.normal),
c.face = t,
c.faceIndex = s
}
return c
}
function W_(e, t, n, r, i) {
const s = 3 * r;
let a = s + 0
, o = s + 1
, l = s + 2;
const c = e.index;
e.index && (a = c.getX(a),
o = c.getX(o),
l = c.getX(l));
const {position: u, normal: d, uv: h, uv1: p} = e.attributes
, f = V_(n, u, d, h, p, a, o, l, t);
return f ? (f.faceIndex = r,
i && i.push(f),
f) : null
}
function J_(e, t, n, r) {
const i = e.a
, s = e.b
, a = e.c;
let o = t
, l = t + 1
, c = t + 2;
n && (o = n.getX(o),
l = n.getX(l),
c = n.getX(c)),
i.x = r.getX(o),
i.y = r.getY(o),
i.z = r.getZ(o),
s.x = r.getX(l),
s.y = r.getY(l),
s.z = r.getZ(l),
a.x = r.getX(c),
a.y = r.getY(c),
a.z = r.getZ(c)
}
function X_(e, t, n, r, i, s, a) {
const {geometry: o} = n
, {index: l} = o
, c = o.attributes.position;
for (let u = e, d = t + e; u < d; u++) {
let e;
if (e = u,
J_(a, 3 * e, l, c),
a.needsUpdate = !0,
r(a, e, i, s))
return !0
}
return !1
}
function K_(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : null;
t && Array.isArray(t) && (t = new Set(t));
const n = e.geometry
, r = n.index ? n.index.array : null
, i = n.attributes.position;
let s, a, o, l, c = 0;
const u = e._roots;
for (let h = 0, p = u.length; h < p; h++)
s = u[h],
a = new Uint32Array(s),
o = new Uint16Array(s),
l = new Float32Array(s),
d(0, c),
c += s.byteLength;
function d(e, n) {
let s = arguments.length > 2 && void 0 !== arguments[2] && arguments[2];
const c = 2 * e;
if (o[c + 15] === Ub) {
const t = a[e + 6];
let n = 1 / 0
, s = 1 / 0
, u = 1 / 0
, d = -1 / 0
, h = -1 / 0
, p = -1 / 0;
for (let e = 3 * t, a = 3 * (t + o[c + 14]); e < a; e++) {
let t = r[e];
const a = i.getX(t)
, o = i.getY(t)
, l = i.getZ(t);
a < n && (n = a),
a > d && (d = a),
o < s && (s = o),
o > h && (h = o),
l < u && (u = l),
l > p && (p = l)
}
return (l[e + 0] !== n || l[e + 1] !== s || l[e + 2] !== u || l[e + 3] !== d || l[e + 4] !== h || l[e + 5] !== p) && (l[e + 0] = n,
l[e + 1] = s,
l[e + 2] = u,
l[e + 3] = d,
l[e + 4] = h,
l[e + 5] = p,
!0)
}
{
const r = e + 8
, i = a[e + 6]
, o = r + n
, c = i + n;
let u = s
, h = !1
, p = !1;
t ? u || (h = t.has(o),
p = t.has(c),
u = !h && !p) : (h = !0,
p = !0);
const f = u || p;
let m = !1;
(u || h) && (m = d(r, n, u));
let g = !1;
f && (g = d(i, n, u));
const v = m || g;
if (v)
for (let t = 0; t < 3; t++) {
const n = r + t
, s = i + t
, a = l[n]
, o = l[n + 3]
, c = l[s]
, u = l[s + 3];
l[e + t] = a < c ? a : c,
l[e + t + 3] = o > u ? o : u
}
return v
}
}
}
const q_ = new es;
function Y_(e, t, n, r) {
return Xb(e, t, q_),
n.intersectBox(q_, r)
}
const Q_ = new Qi;
function Z_(e, t, n, r, i) {
M_.setBuffer(e._roots[t]),
$_(0, e, n, r, i),
M_.clearBuffer()
}
function $_(e, t, n, r, i) {
const {float32Array: s, uint16Array: a, uint32Array: o} = M_
, l = 2 * e;
if (x_(l, a)) {
!function(e, t, n, r, i, s) {
const {geometry: a, _indirectBuffer: o} = e;
for (let l = r, c = r + i; l < c; l++)
W_(a, t, n, l, s)
}(t, n, r, b_(e, o), __(l, a), i)
} else {
const a = w_(e);
Y_(a, s, r, Q_) && $_(a, t, n, r, i);
const l = S_(e, o);
Y_(l, s, r, Q_) && $_(l, t, n, r, i)
}
}
const ew = new Qi
, tw = ["x", "y", "z"];
function nw(e, t, n, r) {
M_.setBuffer(e._roots[t]);
const i = rw(0, e, n, r);
return M_.clearBuffer(),
i
}
function rw(e, t, n, r) {
const {float32Array: i, uint16Array: s, uint32Array: a} = M_;
let o = 2 * e;
if (x_(o, s)) {
return function(e, t, n, r, i) {
const {geometry: s, _indirectBuffer: a} = e;
let o = 1 / 0
, l = null;
for (let c = r, u = r + i; c < u; c++) {
let e;
e = W_(s, t, n, c),
e && e.distance < o && (l = e,
o = e.distance)
}
return l
}(t, n, r, b_(e, a), __(o, s))
}
{
const s = A_(e, a)
, o = tw[s]
, l = r.direction[o] >= 0;
let c, u;
l ? (c = w_(e),
u = S_(e, a)) : (c = S_(e, a),
u = w_(e));
const d = Y_(c, i, r, ew) ? rw(c, t, n, r) : null;
if (d) {
const e = d.point[o];
if (l ? e <= i[u + s] : e >= i[u + s + 3])
return d
}
const h = Y_(u, i, r, ew) ? rw(u, t, n, r) : null;
return d && h ? d.distance <= h.distance ? d : h : d || h || null
}
}
const iw = new es
, sw = new f_
, aw = new f_
, ow = new Es
, lw = new m_
, cw = new m_;
function uw(e, t, n, r) {
M_.setBuffer(e._roots[t]);
const i = dw(0, e, n, r);
return M_.clearBuffer(),
i
}
function dw(e, t, n, r) {
let i = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : null;
const {float32Array: s, uint16Array: a, uint32Array: o} = M_;
let l = 2 * e;
null === i && (n.boundingBox || n.computeBoundingBox(),
lw.set(n.boundingBox.min, n.boundingBox.max, r),
i = lw);
if (!x_(l, a)) {
const a = e + 8
, l = o[e + 6];
Xb(a, s, iw);
if (i.intersectsBox(iw) && dw(a, t, n, r, i))
return !0;
Xb(l, s, iw);
return !!(i.intersectsBox(iw) && dw(l, t, n, r, i))
}
{
const i = t.geometry
, c = i.index
, u = i.attributes.position
, d = n.index
, h = n.attributes.position
, p = b_(e, o)
, f = __(l, a);
if (ow.copy(r).invert(),
n.boundsTree) {
Xb(e, s, cw),
cw.matrix.copy(ow),
cw.needsUpdate = !0;
const t = n.boundsTree.shapecast({
intersectsBounds: e => cw.intersectsBox(e),
intersectsTriangle: e => {
e.a.applyMatrix4(r),
e.b.applyMatrix4(r),
e.c.applyMatrix4(r),
e.needsUpdate = !0;
for (let t = 3 * p, n = 3 * (f + p); t < n; t += 3)
if (J_(aw, t, c, u),
aw.needsUpdate = !0,
e.intersectsTriangle(aw))
return !0;
return !1
}
});
return t
}
for (let e = 3 * p, t = 3 * (f + p); e < t; e += 3) {
J_(sw, e, c, u),
sw.a.applyMatrix4(ow),
sw.b.applyMatrix4(ow),
sw.c.applyMatrix4(ow),
sw.needsUpdate = !0;
for (let e = 0, t = d.count; e < t; e += 3)
if (J_(aw, e, d, h),
aw.needsUpdate = !0,
sw.intersectsTriangle(aw))
return !0
}
}
}
const hw = new Es
, pw = new m_
, fw = new m_
, mw = new Qi
, gw = new Qi
, vw = new Qi
, yw = new Qi;
function xw(e, t, n) {
let r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {}
, i = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : {}
, s = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : 0
, a = arguments.length > 6 && void 0 !== arguments[6] ? arguments[6] : 1 / 0;
t.boundingBox || t.computeBoundingBox(),
pw.set(t.boundingBox.min, t.boundingBox.max, n),
pw.needsUpdate = !0;
const o = e.geometry
, l = o.attributes.position
, c = o.index
, u = t.attributes.position
, d = t.index
, h = y_.getPrimitive()
, p = y_.getPrimitive();
let f = mw
, m = gw
, g = null
, v = null;
i && (g = vw,
v = yw);
let y = 1 / 0
, x = null
, b = null;
return hw.copy(n).invert(),
fw.matrix.copy(hw),
e.shapecast({
boundsTraverseOrder: e => pw.distanceToBox(e),
intersectsBounds: (e, t, n) => n < y && n < a && (t && (fw.min.copy(e.min),
fw.max.copy(e.max),
fw.needsUpdate = !0),
!0),
intersectsRange: (e, r) => {
if (t.boundsTree) {
return t.boundsTree.shapecast({
boundsTraverseOrder: e => fw.distanceToBox(e),
intersectsBounds: (e, t, n) => n < y && n < a,
intersectsRange: (t, i) => {
for (let a = t, o = t + i; a < o; a++) {
J_(p, 3 * a, d, u),
p.a.applyMatrix4(n),
p.b.applyMatrix4(n),
p.c.applyMatrix4(n),
p.needsUpdate = !0;
for (let t = e, n = e + r; t < n; t++) {
J_(h, 3 * t, c, l),
h.needsUpdate = !0;
const e = h.distanceToTriangle(p, f, g);
if (e < y && (m.copy(f),
v && v.copy(g),
y = e,
x = t,
b = a),
e < s)
return !0
}
}
}
})
}
for (let i = 0, a = Hb(t); i < a; i++) {
J_(p, 3 * i, d, u),
p.a.applyMatrix4(n),
p.b.applyMatrix4(n),
p.c.applyMatrix4(n),
p.needsUpdate = !0;
for (let t = e, n = e + r; t < n; t++) {
J_(h, 3 * t, c, l),
h.needsUpdate = !0;
const e = h.distanceToTriangle(p, f, g);
if (e < y && (m.copy(f),
v && v.copy(g),
y = e,
x = t,
b = i),
e < s)
return !0
}
}
}
}),
y_.releasePrimitive(h),
y_.releasePrimitive(p),
y === 1 / 0 ? null : (r.point ? r.point.copy(m) : r.point = m.clone(),
r.distance = y,
r.faceIndex = x,
i && (i.point ? i.point.copy(v) : i.point = v.clone(),
i.point.applyMatrix4(hw),
m.applyMatrix4(hw),
i.distance = m.sub(i.point).length(),
i.faceIndex = b),
r)
}
function bw(e, t, n, r, i, s, a) {
const {geometry: o} = n
, {index: l} = o
, c = o.attributes.position;
for (let u = e, d = t + e; u < d; u++) {
let e;
if (e = n.resolveTriangleIndex(u),
J_(a, 3 * e, l, c),
a.needsUpdate = !0,
r(a, e, i, s))
return !0
}
return !1
}
function _w(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : null;
t && Array.isArray(t) && (t = new Set(t));
const n = e.geometry
, r = n.index ? n.index.array : null
, i = n.attributes.position;
let s, a, o, l, c = 0;
const u = e._roots;
for (let h = 0, p = u.length; h < p; h++)
s = u[h],
a = new Uint32Array(s),
o = new Uint16Array(s),
l = new Float32Array(s),
d(0, c),
c += s.byteLength;
function d(n, s) {
let c = arguments.length > 2 && void 0 !== arguments[2] && arguments[2];
const u = 2 * n;
if (o[u + 15] === Ub) {
const t = a[n + 6];
let s = 1 / 0
, c = 1 / 0
, d = 1 / 0
, h = -1 / 0
, p = -1 / 0
, f = -1 / 0;
for (let n = t, a = t + o[u + 14]; n < a; n++) {
const t = 3 * e.resolveTriangleIndex(n);
for (let e = 0; e < 3; e++) {
let n = t + e;
n = r ? r[n] : n;
const a = i.getX(n)
, o = i.getY(n)
, l = i.getZ(n);
a < s && (s = a),
a > h && (h = a),
o < c && (c = o),
o > p && (p = o),
l < d && (d = l),
l > f && (f = l)
}
}
return (l[n + 0] !== s || l[n + 1] !== c || l[n + 2] !== d || l[n + 3] !== h || l[n + 4] !== p || l[n + 5] !== f) && (l[n + 0] = s,
l[n + 1] = c,
l[n + 2] = d,
l[n + 3] = h,
l[n + 4] = p,
l[n + 5] = f,
!0)
}
{
const e = n + 8
, r = a[n + 6]
, i = e + s
, o = r + s;
let u = c
, h = !1
, p = !1;
t ? u || (h = t.has(i),
p = t.has(o),
u = !h && !p) : (h = !0,
p = !0);
const f = u || p;
let m = !1;
(u || h) && (m = d(e, s, u));
let g = !1;
f && (g = d(r, s, u));
const v = m || g;
if (v)
for (let t = 0; t < 3; t++) {
const i = e + t
, s = r + t
, a = l[i]
, o = l[i + 3]
, c = l[s]
, u = l[s + 3];
l[n + t] = a < c ? a : c,
l[n + t + 3] = o > u ? o : u
}
return v
}
}
}
const ww = new Qi;
function Sw(e, t, n, r, i) {
M_.setBuffer(e._roots[t]),
Aw(0, e, n, r, i),
M_.clearBuffer()
}
function Aw(e, t, n, r, i) {
const {float32Array: s, uint16Array: a, uint32Array: o} = M_
, l = 2 * e;
if (x_(l, a)) {
!function(e, t, n, r, i, s) {
const {geometry: a, _indirectBuffer: o} = e;
for (let l = r, c = r + i; l < c; l++)
W_(a, t, n, o ? o[l] : l, s)
}(t, n, r, b_(e, o), __(l, a), i)
} else {
const a = w_(e);
Y_(a, s, r, ww) && Aw(a, t, n, r, i);
const l = S_(e, o);
Y_(l, s, r, ww) && Aw(l, t, n, r, i)
}
}
const Mw = new Qi
, Cw = ["x", "y", "z"];
function Ew(e, t, n, r) {
M_.setBuffer(e._roots[t]);
const i = Tw(0, e, n, r);
return M_.clearBuffer(),
i
}
function Tw(e, t, n, r) {
const {float32Array: i, uint16Array: s, uint32Array: a} = M_;
let o = 2 * e;
if (x_(o, s)) {
return function(e, t, n, r, i) {
const {geometry: s, _indirectBuffer: a} = e;
let o = 1 / 0
, l = null;
for (let c = r, u = r + i; c < u; c++) {
let e;
e = W_(s, t, n, a ? a[c] : c),
e && e.distance < o && (l = e,
o = e.distance)
}
return l
}(t, n, r, b_(e, a), __(o, s))
}
{
const s = A_(e, a)
, o = Cw[s]
, l = r.direction[o] >= 0;
let c, u;
l ? (c = w_(e),
u = S_(e, a)) : (c = S_(e, a),
u = w_(e));
const d = Y_(c, i, r, Mw) ? Tw(c, t, n, r) : null;
if (d) {
const e = d.point[o];
if (l ? e <= i[u + s] : e >= i[u + s + 3])
return d
}
const h = Y_(u, i, r, Mw) ? Tw(u, t, n, r) : null;
return d && h ? d.distance <= h.distance ? d : h : d || h || null
}
}
const Rw = new es
, Bw = new f_
, Pw = new f_
, kw = new Es
, Lw = new m_
, Iw = new m_;
function Nw(e, t, n, r) {
M_.setBuffer(e._roots[t]);
const i = Dw(0, e, n, r);
return M_.clearBuffer(),
i
}
function Dw(e, t, n, r) {
let i = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : null;
const {float32Array: s, uint16Array: a, uint32Array: o} = M_;
let l = 2 * e;
null === i && (n.boundingBox || n.computeBoundingBox(),
Lw.set(n.boundingBox.min, n.boundingBox.max, r),
i = Lw);
if (!x_(l, a)) {
const a = e + 8
, l = o[e + 6];
Xb(a, s, Rw);
if (i.intersectsBox(Rw) && Dw(a, t, n, r, i))
return !0;
Xb(l, s, Rw);
return !!(i.intersectsBox(Rw) && Dw(l, t, n, r, i))
}
{
const i = t.geometry
, c = i.index
, u = i.attributes.position
, d = n.index
, h = n.attributes.position
, p = b_(e, o)
, f = __(l, a);
if (kw.copy(r).invert(),
n.boundsTree) {
Xb(e, s, Iw),
Iw.matrix.copy(kw),
Iw.needsUpdate = !0;
const i = n.boundsTree.shapecast({
intersectsBounds: e => Iw.intersectsBox(e),
intersectsTriangle: e => {
e.a.applyMatrix4(r),
e.b.applyMatrix4(r),
e.c.applyMatrix4(r),
e.needsUpdate = !0;
for (let n = p, r = f + p; n < r; n++)
if (J_(Pw, 3 * t.resolveTriangleIndex(n), c, u),
Pw.needsUpdate = !0,
e.intersectsTriangle(Pw))
return !0;
return !1
}
});
return i
}
for (let e = p, n = f + p; e < n; e++) {
const n = t.resolveTriangleIndex(e);
J_(Bw, 3 * n, c, u),
Bw.a.applyMatrix4(kw),
Bw.b.applyMatrix4(kw),
Bw.c.applyMatrix4(kw),
Bw.needsUpdate = !0;
for (let e = 0, t = d.count; e < t; e += 3)
if (J_(Pw, e, d, h),
Pw.needsUpdate = !0,
Bw.intersectsTriangle(Pw))
return !0
}
}
}
const jw = new Es
, Fw = new m_
, Ow = new m_
, Uw = new Qi
, zw = new Qi
, Gw = new Qi
, Hw = new Qi;
function Vw(e, t, n) {
let r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {}
, i = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : {}
, s = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : 0
, a = arguments.length > 6 && void 0 !== arguments[6] ? arguments[6] : 1 / 0;
t.boundingBox || t.computeBoundingBox(),
Fw.set(t.boundingBox.min, t.boundingBox.max, n),
Fw.needsUpdate = !0;
const o = e.geometry
, l = o.attributes.position
, c = o.index
, u = t.attributes.position
, d = t.index
, h = y_.getPrimitive()
, p = y_.getPrimitive();
let f = Uw
, m = zw
, g = null
, v = null;
i && (g = Gw,
v = Hw);
let y = 1 / 0
, x = null
, b = null;
return jw.copy(n).invert(),
Ow.matrix.copy(jw),
e.shapecast({
boundsTraverseOrder: e => Fw.distanceToBox(e),
intersectsBounds: (e, t, n) => n < y && n < a && (t && (Ow.min.copy(e.min),
Ow.max.copy(e.max),
Ow.needsUpdate = !0),
!0),
intersectsRange: (r, i) => {
if (t.boundsTree) {
const o = t.boundsTree;
return o.shapecast({
boundsTraverseOrder: e => Ow.distanceToBox(e),
intersectsBounds: (e, t, n) => n < y && n < a,
intersectsRange: (t, a) => {
for (let _ = t, w = t + a; _ < w; _++) {
const t = o.resolveTriangleIndex(_);
J_(p, 3 * t, d, u),
p.a.applyMatrix4(n),
p.b.applyMatrix4(n),
p.c.applyMatrix4(n),
p.needsUpdate = !0;
for (let n = r, a = r + i; n < a; n++) {
const t = e.resolveTriangleIndex(n);
J_(h, 3 * t, c, l),
h.needsUpdate = !0;
const r = h.distanceToTriangle(p, f, g);
if (r < y && (m.copy(f),
v && v.copy(g),
y = r,
x = n,
b = _),
r < s)
return !0
}
}
}
})
}
for (let a = 0, o = Hb(t); a < o; a++) {
J_(p, 3 * a, d, u),
p.a.applyMatrix4(n),
p.b.applyMatrix4(n),
p.c.applyMatrix4(n),
p.needsUpdate = !0;
for (let t = r, n = r + i; t < n; t++) {
const n = e.resolveTriangleIndex(t);
J_(h, 3 * n, c, l),
h.needsUpdate = !0;
const r = h.distanceToTriangle(p, f, g);
if (r < y && (m.copy(f),
v && v.copy(g),
y = r,
x = t,
b = a),
r < s)
return !0
}
}
}
}),
y_.releasePrimitive(h),
y_.releasePrimitive(p),
y === 1 / 0 ? null : (r.point ? r.point.copy(m) : r.point = m.clone(),
r.distance = y,
r.faceIndex = x,
i && (i.point ? i.point.copy(v) : i.point = v.clone(),
i.point.applyMatrix4(jw),
m.applyMatrix4(jw),
i.distance = m.sub(i.point).length(),
i.faceIndex = b),
r)
}
const Ww = new M_.constructor
, Jw = new M_.constructor
, Xw = new g_(( () => new es))
, Kw = new es
, qw = new es
, Yw = new es
, Qw = new es;
let Zw = !1;
function $w(e, t, n, r, i) {
let s, a, o = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : 0, l = arguments.length > 6 && void 0 !== arguments[6] ? arguments[6] : 0, c = arguments.length > 7 && void 0 !== arguments[7] ? arguments[7] : 0, u = arguments.length > 8 && void 0 !== arguments[8] ? arguments[8] : 0, d = arguments.length > 9 && void 0 !== arguments[9] ? arguments[9] : null, h = arguments.length > 10 && void 0 !== arguments[10] && arguments[10];
h ? (s = Jw,
a = Ww) : (s = Ww,
a = Jw);
const p = s.float32Array
, f = s.uint32Array
, m = s.uint16Array
, g = a.float32Array
, v = a.uint32Array
, y = a.uint16Array
, x = 2 * t
, b = x_(2 * e, m)
, _ = x_(x, y);
let w = !1;
if (_ && b)
w = h ? i(b_(t, v), __(2 * t, y), b_(e, f), __(2 * e, m), u, l + t, c, o + e) : i(b_(e, f), __(2 * e, m), b_(t, v), __(2 * t, y), c, o + e, u, l + t);
else if (_) {
const s = Xw.getPrimitive();
Xb(t, g, s),
s.applyMatrix4(n);
const a = w_(e)
, d = S_(e, f);
Xb(a, p, Kw),
Xb(d, p, qw);
const m = s.intersectsBox(Kw)
, v = s.intersectsBox(qw);
w = m && $w(t, a, r, n, i, l, o, u, c + 1, s, !h) || v && $w(t, d, r, n, i, l, o, u, c + 1, s, !h),
Xw.releasePrimitive(s)
} else {
const s = w_(t)
, a = S_(t, v);
Xb(s, g, Yw),
Xb(a, g, Qw);
const m = d.intersectsBox(Yw)
, y = d.intersectsBox(Qw);
if (m && y)
w = $w(e, s, n, r, i, o, l, c, u + 1, d, h) || $w(e, a, n, r, i, o, l, c, u + 1, d, h);
else if (m)
if (b)
w = $w(e, s, n, r, i, o, l, c, u + 1, d, h);
else {
const t = Xw.getPrimitive();
t.copy(Yw).applyMatrix4(n);
const a = w_(e)
, d = S_(e, f);
Xb(a, p, Kw),
Xb(d, p, qw);
const m = t.intersectsBox(Kw)
, g = t.intersectsBox(qw);
w = m && $w(s, a, r, n, i, l, o, u, c + 1, t, !h) || g && $w(s, d, r, n, i, l, o, u, c + 1, t, !h),
Xw.releasePrimitive(t)
}
else if (y)
if (b)
w = $w(e, a, n, r, i, o, l, c, u + 1, d, h);
else {
const t = Xw.getPrimitive();
t.copy(Qw).applyMatrix4(n);
const s = w_(e)
, d = S_(e, f);
Xb(s, p, Kw),
Xb(d, p, qw);
const m = t.intersectsBox(Kw)
, g = t.intersectsBox(qw);
w = m && $w(a, s, r, n, i, l, o, u, c + 1, t, !h) || g && $w(a, d, r, n, i, l, o, u, c + 1, t, !h),
Xw.releasePrimitive(t)
}
}
return w
}
const eS = new m_
, tS = new es;
class nS {
static serialize(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
t = {
cloneBuffers: !0,
...t
};
const n = e.geometry
, r = e._roots
, i = e._indirectBuffer
, s = n.getIndex();
let a;
return a = t.cloneBuffers ? {
roots: r.map((e => e.slice())),
index: s.array.slice(),
indirectBuffer: i ? i.slice() : null
} : {
roots: r,
index: s.array,
indirectBuffer: i
},
a
}
static deserialize(e, t) {
let n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {};
n = {
setIndex: !0,
indirect: Boolean(e.indirectBuffer),
...n
};
const {index: r, roots: i, indirectBuffer: s} = e
, a = new nS(t,{
...n,
[Gb]: !0
});
if (a._roots = i,
a._indirectBuffer = s || null,
n.setIndex) {
const n = t.getIndex();
if (null === n) {
const n = new Ta(e.index,1,!1);
t.setIndex(n)
} else
n.array !== r && (n.array.set(r),
n.needsUpdate = !0)
}
return a
}
get indirect() {
return !!this._indirectBuffer
}
constructor(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
if (!e.isBufferGeometry)
throw new Error("MeshBVH: Only BufferGeometries are supported.");
if (e.index && e.index.isInterleavedBufferAttribute)
throw new Error("MeshBVH: InterleavedBufferAttribute is not supported for the index attribute.");
if (t = Object.assign({
strategy: Ib,
maxDepth: 40,
maxLeafTris: 10,
verbose: !0,
useSharedArrayBuffer: !1,
setBoundingBox: !0,
onProgress: null,
indirect: !1,
[Gb]: !1
}, t),
t.useSharedArrayBuffer && "undefined" === typeof SharedArrayBuffer)
throw new Error("MeshBVH: SharedArrayBuffer is not available.");
this.geometry = e,
this._roots = null,
this._indirectBuffer = null,
t[Gb] || (l_(this, t),
!e.boundingBox && t.setBoundingBox && (e.boundingBox = this.getBoundingBox(new es)));
const {_indirectBuffer: n} = this;
this.resolveTriangleIndex = t.indirect ? e => n[e] : e => e
}
refit() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : null;
return (this.indirect ? _w : K_)(this, e)
}
traverse(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;
const n = this._roots[t]
, r = new Uint32Array(n)
, i = new Uint16Array(n);
!function t(s) {
let a = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;
const o = 2 * s
, l = i[o + 15] === Ub;
if (l) {
const t = r[s + 6]
, c = i[o + 14];
e(a, l, new Float32Array(n,4 * s,6), t, c)
} else {
const i = s + 8
, o = r[s + 6]
, c = r[s + 7];
e(a, l, new Float32Array(n,4 * s,6), c) || (t(i, a + 1),
t(o, a + 1))
}
}(0)
}
raycast(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : Le;
const n = this._roots
, r = this.geometry
, i = []
, s = t.isMaterial
, a = Array.isArray(t)
, o = r.groups
, l = s ? t.side : t
, c = this.indirect ? Sw : Z_;
for (let u = 0, d = n.length; u < d; u++) {
const n = a ? t[o[u].materialIndex].side : l
, r = i.length;
if (c(this, u, n, e, i),
a) {
const e = o[u].materialIndex;
for (let t = r, n = i.length; t < n; t++)
i[t].face.materialIndex = e
}
}
return i
}
raycastFirst(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : Le;
const n = this._roots
, r = this.geometry
, i = t.isMaterial
, s = Array.isArray(t);
let a = null;
const o = r.groups
, l = i ? t.side : t
, c = this.indirect ? Ew : nw;
for (let u = 0, d = n.length; u < d; u++) {
const n = c(this, u, s ? t[o[u].materialIndex].side : l, e);
null != n && (null == a || n.distance < a.distance) && (a = n,
s && (n.face.materialIndex = o[u].materialIndex))
}
return a
}
intersectsGeometry(e, t) {
let n = !1;
const r = this._roots
, i = this.indirect ? Nw : uw;
for (let s = 0, a = r.length; s < a && (n = i(this, s, e, t),
!n); s++)
;
return n
}
shapecast(e) {
const t = y_.getPrimitive()
, n = this.indirect ? bw : X_;
let {boundsTraverseOrder: r, intersectsBounds: i, intersectsRange: s, intersectsTriangle: a} = e;
if (s && a) {
const e = s;
s = (r, i, s, o, l) => !!e(r, i, s, o, l) || n(r, i, this, a, s, o, t)
} else
s || (s = a ? (e, r, i, s) => n(e, r, this, a, i, s, t) : (e, t, n) => n);
let o = !1
, l = 0;
const c = this._roots;
for (let u = 0, d = c.length; u < d; u++) {
const e = c[u];
if (o = B_(this, u, i, s, r, l),
o)
break;
l += e.byteLength
}
return y_.releasePrimitive(t),
o
}
bvhcast(e, t, n) {
let {intersectsRanges: r, intersectsTriangles: i} = n;
const s = y_.getPrimitive()
, a = this.geometry.index
, o = this.geometry.attributes.position
, l = this.indirect ? e => {
const t = this.resolveTriangleIndex(e);
J_(s, 3 * t, a, o)
}
: e => {
J_(s, 3 * e, a, o)
}
, c = y_.getPrimitive()
, u = e.geometry.index
, d = e.geometry.attributes.position
, h = e.indirect ? t => {
const n = e.resolveTriangleIndex(t);
J_(c, 3 * n, u, d)
}
: e => {
J_(c, 3 * e, u, d)
}
;
if (i) {
const e = (e, n, r, a, o, u, d, p) => {
for (let f = r, m = r + a; f < m; f++) {
h(f),
c.a.applyMatrix4(t),
c.b.applyMatrix4(t),
c.c.applyMatrix4(t),
c.needsUpdate = !0;
for (let t = e, r = e + n; t < r; t++)
if (l(t),
s.needsUpdate = !0,
i(s, c, t, f, o, u, d, p))
return !0
}
return !1
}
;
if (r) {
const t = r;
r = function(n, r, i, s, a, o, l, c) {
return !!t(n, r, i, s, a, o, l, c) || e(n, r, i, s, a, o, l, c)
}
} else
r = e
}
return function(e, t, n, r) {
if (Zw)
throw new Error("MeshBVH: Recursive calls to bvhcast not supported.");
Zw = !0;
const i = e._roots
, s = t._roots;
let a, o = 0, l = 0;
const c = (new Es).copy(n).invert();
for (let u = 0, d = i.length; u < d; u++) {
Ww.setBuffer(i[u]),
l = 0;
const e = Xw.getPrimitive();
Xb(0, Ww.float32Array, e),
e.applyMatrix4(c);
for (let t = 0, i = s.length; t < i && (Jw.setBuffer(s[u]),
a = $w(0, 0, n, c, r, o, l, 0, 0, e),
Jw.clearBuffer(),
l += s[t].length,
!a); t++)
;
if (Xw.releasePrimitive(e),
Ww.clearBuffer(),
o += i[u].length,
a)
break
}
return Zw = !1,
a
}(this, e, t, r)
}
intersectsBox(e, t) {
return eS.set(e.min, e.max, t),
eS.needsUpdate = !0,
this.shapecast({
intersectsBounds: e => eS.intersectsBox(e),
intersectsTriangle: e => eS.intersectsTriangle(e)
})
}
intersectsSphere(e) {
return this.shapecast({
intersectsBounds: t => e.intersectsBox(t),
intersectsTriangle: t => t.intersectsSphere(e)
})
}
closestPointToGeometry(e, t) {
let n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}
, r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {}
, i = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : 0
, s = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : 1 / 0;
return (this.indirect ? Vw : xw)(this, e, t, n, r, i, s)
}
closestPointToPoint(e) {
return function(e, t) {
let n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}
, r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : 0
, i = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : 1 / 0;
const s = r * r
, a = i * i;
let o = 1 / 0
, l = null;
if (e.shapecast({
boundsTraverseOrder: e => (k_.copy(t).clamp(e.min, e.max),
k_.distanceToSquared(t)),
intersectsBounds: (e, t, n) => n < o && n < a,
intersectsTriangle: (e, n) => {
e.closestPointToPoint(t, k_);
const r = t.distanceToSquared(k_);
return r < o && (L_.copy(k_),
o = r,
l = n),
r < s
}
}),
o === 1 / 0)
return null;
const c = Math.sqrt(o);
return n.point ? n.point.copy(L_) : n.point = L_.clone(),
n.distance = c,
n.faceIndex = l,
n
}(this, e, arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 0, arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : 1 / 0)
}
getBoundingBox(e) {
e.makeEmpty();
return this._roots.forEach((t => {
Xb(0, new Float32Array(t), tS),
e.union(tS)
}
)),
e
}
}
const rS = 1e-6
, iS = Math.pow(10, -Math.log10(rS))
, sS = 5e-7 * iS;
function aS(e) {
return ~~(e * iS + sS)
}
function oS(e) {
return "".concat(aS(e.x), ",").concat(aS(e.y), ",").concat(aS(e.z))
}
function lS(e) {
return "".concat(aS(e.x), ",").concat(aS(e.y), ",").concat(aS(e.z), ",").concat(aS(e.w))
}
function cS(e, t, n) {
n.direction.subVectors(t, e).normalize();
const r = e.dot(n.direction);
return n.origin.copy(e).addScaledVector(n.direction, -r),
n
}
function uS() {
return "undefined" !== typeof SharedArrayBuffer
}
function dS(e) {
if (e.buffer instanceof SharedArrayBuffer)
return e;
const t = e.constructor
, n = e.buffer
, r = new SharedArrayBuffer(n.byteLength)
, i = new Uint8Array(n);
return new Uint8Array(r).set(i, 0),
new t(r)
}
function hS(e, t) {
if (!e.index) {
const n = e.attributes.position.count
, r = function(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : ArrayBuffer;
return e > 65535 ? new Uint32Array(new t(4 * e)) : new Uint16Array(new t(2 * e))
}(n, t.useSharedArrayBuffer ? SharedArrayBuffer : ArrayBuffer);
e.setIndex(new Ta(r,1));
for (let e = 0; e < n; e++)
r[e] = e
}
}
function pS(e) {
return function(e) {
return e.index ? e.index.count : e.attributes.position.count
}(e) / 3
}
const fS = 1e-8
, mS = new Qi;
function gS(e) {
return e % 3
}
function vS(e, t) {
return e.start - t.start
}
function yS(e, t) {
return mS.subVectors(t, e.origin).dot(e.direction)
}
const xS = 1e-5
, bS = 1e-4;
class _S {
constructor() {
this._rays = []
}
addRay(e) {
this._rays.push(e)
}
findClosestRay(e) {
const t = this._rays
, n = e.clone();
n.direction.multiplyScalar(-1);
let r = 1 / 0
, i = null;
for (let o = 0, l = t.length; o < l; o++) {
const l = t[o];
if (s(l, e) && s(l, n))
continue;
const c = a(l, e)
, u = a(l, n)
, d = Math.min(c, u);
d < r && (r = d,
i = l)
}
return i;
function s(e, t) {
const n = e.origin.distanceTo(t.origin) > xS;
return e.direction.angleTo(t.direction) > bS || n
}
function a(e, t) {
const n = e.origin.distanceTo(t.origin)
, r = e.direction.angleTo(t.direction);
return n / xS + r / bS
}
}
}
const wS = new Qi
, SS = new Qi
, AS = new Cs;
function MS(e, t, n) {
const r = e.attributes
, i = e.index
, s = r.position
, a = new Map
, o = new Map
, l = Array.from(t)
, c = new _S;
for (let u = 0, d = l.length; u < d; u++) {
const e = l[u]
, t = ~~(e / 3)
, n = gS(e);
let r, a = 3 * t + n, d = 3 * t + (n + 1) % 3;
i && (a = i.getX(a),
d = i.getX(d)),
wS.fromBufferAttribute(s, a),
SS.fromBufferAttribute(s, d),
cS(wS, SS, AS);
let h = c.findClosestRay(AS);
null === h && (h = AS.clone(),
c.addRay(h)),
o.has(h) || o.set(h, {
forward: [],
reverse: [],
ray: h
}),
r = o.get(h);
let p = yS(h, wS)
, f = yS(h, SS);
p > f && ([p,f] = [f, p]),
AS.direction.dot(h.direction) < 0 ? r.reverse.push({
start: p,
end: f,
index: e
}) : r.forward.push({
start: p,
end: f,
index: e
})
}
return o.forEach(( (e, t) => {
let {forward: r, reverse: i} = e;
!function(e, t, n) {
let r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : fS;
e.sort(vS),
t.sort(vS);
for (let o = 0; o < e.length; o++) {
const r = e[o];
for (let i = 0; i < t.length; i++) {
const l = t[i];
if (l.start > r.end)
;
else {
if (r.end < l.start || l.end < r.start)
continue;
if (r.start <= l.start && r.end >= l.end)
s(l.end, r.end) || e.splice(o + 1, 0, {
start: l.end,
end: r.end,
index: r.index
}),
r.end = l.start,
l.start = 0,
l.end = 0;
else if (r.start >= l.start && r.end <= l.end)
s(r.end, l.end) || t.splice(i + 1, 0, {
start: r.end,
end: l.end,
index: l.index
}),
l.end = r.start,
r.start = 0,
r.end = 0;
else if (r.start <= l.start && r.end <= l.end) {
const e = r.end;
r.end = l.start,
l.start = e
} else {
if (!(r.start >= l.start && r.end >= l.end))
throw new Error;
{
const e = l.end;
l.end = r.start,
r.start = e
}
}
}
if (n.has(r.index) || n.set(r.index, []),
n.has(l.index) || n.set(l.index, []),
n.get(r.index).push(l.index),
n.get(l.index).push(r.index),
a(l) && (t.splice(i, 1),
i--),
a(r)) {
e.splice(o, 1),
o--;
break
}
}
}
function i(e) {
for (let t = 0; t < e.length; t++)
a(e[t]) && (e.splice(t, 1),
t--)
}
function s(e, t) {
return Math.abs(t - e) < r
}
function a(e) {
return Math.abs(e.end - e.start) < r
}
i(e),
i(t)
}(r, i, a, n),
0 === r.length && 0 === i.length && o.delete(t)
}
)),
{
disjointConnectivityMap: a,
fragmentMap: o
}
}
const CS = new xi
, ES = new Qi
, TS = new Hi
, RS = ["", "", ""];
class BS {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : null;
this.data = null,
this.disjointConnections = null,
this.unmatchedDisjointEdges = null,
this.unmatchedEdges = -1,
this.matchedEdges = -1,
this.useDrawRange = !0,
this.useAllAttributes = !1,
this.matchDisjointEdges = !1,
this.degenerateEpsilon = 1e-8,
e && this.updateFrom(e)
}
getSiblingTriangleIndex(e, t) {
const n = this.data[3 * e + t];
return -1 === n ? -1 : ~~(n / 3)
}
getSiblingEdgeIndex(e, t) {
const n = this.data[3 * e + t];
return -1 === n ? -1 : n % 3
}
getDisjointSiblingTriangleIndices(e, t) {
const n = 3 * e + t
, r = this.disjointConnections.get(n);
return r ? r.map((e => ~~(e / 3))) : []
}
getDisjointSiblingEdgeIndices(e, t) {
const n = 3 * e + t
, r = this.disjointConnections.get(n);
return r ? r.map((e => e % 3)) : []
}
isFullyConnected() {
return 0 === this.unmatchedEdges
}
updateFrom(e) {
const {useAllAttributes: t, useDrawRange: n, matchDisjointEdges: r, degenerateEpsilon: i} = this
, s = t ? function(e) {
let t = "";
for (let r = 0, i = l.length; r < i; r++) {
const i = o[l[r]];
let s;
switch (i.itemSize) {
case 1:
s = aS(i.getX(e));
break;
case 2:
n = CS.fromBufferAttribute(i, e),
s = "".concat(aS(n.x), ",").concat(aS(n.y));
break;
case 3:
s = oS(ES.fromBufferAttribute(i, e));
break;
case 4:
s = lS(TS.fromBufferAttribute(i, e))
}
"" !== t && (t += "|"),
t += s
}
var n;
return t
}
: function(e) {
return ES.fromBufferAttribute(u, e),
oS(ES)
}
, a = new Map
, {attributes: o} = e
, l = t ? Object.keys(o) : null
, c = e.index
, u = o.position;
let d = pS(e);
const h = d;
let p = 0;
n && (p = e.drawRange.start,
e.drawRange.count !== 1 / 0 && (d = ~~(e.drawRange.count / 3)));
let f = this.data;
(!f || f.length < 3 * h) && (f = new Int32Array(3 * h)),
f.fill(-1);
let m = 0
, g = new Set;
for (let v = p, y = 3 * d + p; v < y; v += 3) {
const e = v;
for (let t = 0; t < 3; t++) {
let n = e + t;
c && (n = c.getX(n)),
RS[t] = s(n)
}
for (let t = 0; t < 3; t++) {
const n = (t + 1) % 3
, r = RS[t]
, i = RS[n]
, s = "".concat(i, "_").concat(r);
if (a.has(s)) {
const n = e + t
, r = a.get(s);
f[n] = r,
f[r] = n,
a.delete(s),
m += 2,
g.delete(r)
} else {
const n = "".concat(r, "_").concat(i)
, s = e + t;
a.set(n, s),
g.add(s)
}
}
}
if (r) {
const {fragmentMap: t, disjointConnectivityMap: n} = MS(e, g, i);
g.clear(),
t.forEach((e => {
let {forward: t, reverse: n} = e;
t.forEach((e => {
let {index: t} = e;
return g.add(t)
}
)),
n.forEach((e => {
let {index: t} = e;
return g.add(t)
}
))
}
)),
this.unmatchedDisjointEdges = t,
this.disjointConnections = n,
m = 3 * d - g.size
}
this.matchedEdges = m,
this.unmatchedEdges = g.size,
this.data = f
}
}
class PS extends co {
constructor() {
super(...arguments),
this.isBrush = !0,
this._previousMatrix = new Es,
this._previousMatrix.elements.fill(0)
}
markUpdated() {
this._previousMatrix.copy(this.matrix)
}
isDirty() {
const {matrix: e, _previousMatrix: t} = this
, n = e.elements
, r = t.elements;
for (let i = 0; i < 16; i++)
if (n[i] !== r[i])
return !0;
return !1
}
prepareGeometry() {
const e = this.geometry
, t = e.attributes
, n = uS();
if (n)
for (const r in t) {
const e = t[r];
if (e.isInterleavedBufferAttribute)
throw new Error("Brush: InterleavedBufferAttributes are not supported.");
e.array = dS(e.array)
}
if (e.boundsTree || (hS(e, {
useSharedArrayBuffer: n
}),
e.boundsTree = new nS(e,{
maxLeafTris: 3,
indirect: !0,
useSharedArrayBuffer: n
})),
e.halfEdges || (e.halfEdges = new BS(e)),
!e.groupIndices) {
const t = pS(e)
, n = new Uint16Array(t)
, r = e.groups;
for (let e = 0, i = r.length; e < i; e++) {
const {start: t, count: i} = r[e];
for (let r = t / 3, s = (t + i) / 3; r < s; r++)
n[r] = e
}
e.groupIndices = n
}
}
disposeCacheData() {
const {geometry: e} = this;
e.halfEdges = null,
e.boundsTree = null,
e.groupIndices = null
}
}
const kS = 1e-14
, LS = new Qi
, IS = new Qi
, NS = new Qi;
function DS(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : kS;
LS.subVectors(e.b, e.a),
IS.subVectors(e.c, e.a),
NS.subVectors(e.b, e.c);
const n = LS.angleTo(IS)
, r = LS.angleTo(NS)
, i = Math.PI - n - r;
return Math.abs(n) < t || Math.abs(r) < t || Math.abs(i) < t || e.a.distanceToSquared(e.b) < t || e.a.distanceToSquared(e.c) < t || e.b.distanceToSquared(e.c) < t
}
const jS = 1e-10
, FS = 1e-10
, OS = new Vm
, US = new Vm
, zS = new Qi
, GS = new Qi
, HS = new Qi
, VS = new Bo
, WS = new f_;
class JS {
constructor() {
this._pool = [],
this._index = 0
}
getTriangle() {
return this._index >= this._pool.length && this._pool.push(new da),
this._pool[this._index++]
}
clear() {
this._index = 0
}
reset() {
this._pool.length = 0,
this._index = 0
}
}
class XS {
constructor() {
this.trianglePool = new JS,
this.triangles = [],
this.normal = new Qi,
this.coplanarTriangleUsed = !1
}
initialize(e) {
this.reset();
const {triangles: t, trianglePool: n, normal: r} = this;
if (Array.isArray(e))
for (let i = 0, s = e.length; i < s; i++) {
const s = e[i];
if (0 === i)
s.getNormal(r);
else if (Math.abs(1 - s.getNormal(zS).dot(r)) > jS)
throw new Error("Triangle Splitter: Cannot initialize with triangles that have different normals.");
const a = n.getTriangle();
a.copy(s),
t.push(a)
}
else {
e.getNormal(r);
const i = n.getTriangle();
i.copy(e),
t.push(i)
}
}
splitByTriangle(e) {
const {normal: t, triangles: n} = this;
if (e.getNormal(GS).normalize(),
Math.abs(1 - Math.abs(GS.dot(t))) < 1e-10) {
this.coplanarTriangleUsed = !0;
for (let e = 0, r = n.length; e < r; e++) {
n[e].coplanarCount = 0
}
const t = [e.a, e.b, e.c];
for (let n = 0; n < 3; n++) {
const r = (n + 1) % 3
, i = t[n]
, s = t[r];
zS.subVectors(s, i).normalize(),
HS.crossVectors(GS, zS),
VS.setFromNormalAndCoplanarPoint(HS, i),
this.splitByPlane(VS, e)
}
} else
e.getPlane(VS),
this.splitByPlane(VS, e)
}
splitByPlane(e, t) {
const {triangles: n, trianglePool: r} = this;
WS.copy(t),
WS.needsUpdate = !0;
for (let i = 0, s = n.length; i < s; i++) {
const t = n[i];
if (!WS.intersectsTriangle(t, OS, !0))
continue;
const {a: a, b: o, c: l} = t;
let c = 0
, u = -1
, d = !1
, h = []
, p = [];
const f = [a, o, l];
for (let n = 0; n < 3; n++) {
const t = (n + 1) % 3;
OS.start.copy(f[n]),
OS.end.copy(f[t]);
const r = e.distanceToPoint(OS.start)
, i = e.distanceToPoint(OS.end);
if (Math.abs(r) < FS && Math.abs(i) < FS) {
d = !0;
break
}
if (r > 0 ? h.push(n) : p.push(n),
Math.abs(r) < FS)
continue;
let s = !!e.intersectLine(OS, zS);
!s && Math.abs(i) < FS && (zS.copy(OS.end),
s = !0),
!s || zS.distanceTo(OS.start) < jS || (zS.distanceTo(OS.end) < jS && (u = n),
0 === c ? US.start.copy(zS) : US.end.copy(zS),
c++)
}
if (!d && 2 === c && US.distance() > FS)
if (-1 !== u) {
u = (u + 1) % 3;
let e = 0;
e === u && (e = (e + 1) % 3);
let a = e + 1;
a === u && (a = (a + 1) % 3);
const o = r.getTriangle();
o.a.copy(f[a]),
o.b.copy(US.end),
o.c.copy(US.start),
DS(o) || n.push(o),
t.a.copy(f[e]),
t.b.copy(US.start),
t.c.copy(US.end),
DS(t) && (n.splice(i, 1),
i--,
s--)
} else {
const e = h.length >= 2 ? p[0] : h[0];
if (0 === e) {
let e = US.start;
US.start = US.end,
US.end = e
}
const a = (e + 1) % 3
, o = (e + 2) % 3
, l = r.getTriangle()
, c = r.getTriangle();
f[a].distanceToSquared(US.start) < f[o].distanceToSquared(US.end) ? (l.a.copy(f[a]),
l.b.copy(US.start),
l.c.copy(US.end),
c.a.copy(f[a]),
c.b.copy(f[o]),
c.c.copy(US.start)) : (l.a.copy(f[o]),
l.b.copy(US.start),
l.c.copy(US.end),
c.a.copy(f[a]),
c.b.copy(f[o]),
c.c.copy(US.end)),
t.a.copy(f[e]),
t.b.copy(US.end),
t.c.copy(US.start),
DS(l) || n.push(l),
DS(c) || n.push(c),
DS(t) && (n.splice(i, 1),
i--,
s--)
}
else
3 === c && console.warn("TriangleClipper: Coplanar clip not handled")
}
}
reset() {
this.triangles.length = 0,
this.trianglePool.clear(),
this.coplanarTriangleUsed = !1
}
}
class KS {
constructor(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 500;
this.expansionFactor = 1.5,
this.type = e,
this.length = 0,
this.array = null,
this.setSize(t)
}
setType(e) {
if (0 !== this.length)
throw new Error("TypeBackedArray: Cannot change the type while there is used data in the buffer.");
const t = this.array.buffer;
this.array = new e(t),
this.type = e
}
setSize(e) {
if (this.array && e === this.array.length)
return;
const t = this.type
, n = new t(new (uS() ? SharedArrayBuffer : ArrayBuffer)(4 + (r = ~~(r = e * t.BYTES_PER_ELEMENT)) - r % 4));
var r;
this.array && n.set(this.array, 0),
this.array = n
}
expand() {
const {array: e, expansionFactor: t} = this;
this.setSize(e.length * t)
}
push() {
let {array: e, length: t} = this;
t + arguments.length > e.length && (this.expand(),
e = this.array);
for (let n = 0, r = arguments.length; n < r; n++)
e[t + n] = n < 0 || arguments.length <= n ? void 0 : arguments[n];
this.length += arguments.length
}
clear() {
this.length = 0
}
}
class qS {
constructor() {
this.groupAttributes = [{}],
this.groupCount = 0
}
getType(e) {
return this.groupAttributes[0][e].type
}
getItemSize(e) {
return this.groupAttributes[0][e].itemSize
}
getNormalized(e) {
return this.groupAttributes[0][e].normalized
}
getCount(e) {
if (this.groupCount <= e)
return 0;
const t = this.getGroupAttrArray("position", e);
return t.length / t.itemSize
}
getTotalLength(e) {
const {groupCount: t, groupAttributes: n} = this;
let r = 0;
for (let i = 0; i < t; i++) {
r += n[i][e].length
}
return r
}
getGroupAttrSet() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0;
const {groupAttributes: t} = this;
if (t[e])
return this.groupCount = Math.max(this.groupCount, e + 1),
t[e];
const n = t[0];
for (this.groupCount = Math.max(this.groupCount, e + 1); e >= t.length; ) {
const e = {};
t.push(e);
for (const t in n) {
const r = n[t]
, i = new KS(r.type);
i.itemSize = r.itemSize,
i.normalized = r.normalized,
e[t] = i
}
}
return t[e]
}
getGroupAttrArray(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;
const {groupAttributes: n} = this;
if (!n[0][e])
throw new Error('TypedAttributeData: Attribute with "'.concat(e, '" has not been initialized'));
return this.getGroupAttrSet(t)[e]
}
initializeArray(e, t, n, r) {
const {groupAttributes: i} = this
, s = i[0][e];
if (s) {
if (s.type !== t)
for (let a = 0, o = i.length; a < o; a++) {
const s = i[a][e];
s.setType(t),
s.itemSize = n,
s.normalized = r
}
} else
for (let a = 0, o = i.length; a < o; a++) {
const s = new KS(t);
s.itemSize = n,
s.normalized = r,
i[a][e] = s
}
}
clear() {
this.groupCount = 0;
const {groupAttributes: e} = this;
e.forEach((e => {
for (const t in e)
e[t].clear()
}
))
}
delete(e) {
this.groupAttributes.forEach((t => {
delete t[e]
}
))
}
reset() {
this.groupAttributes = [],
this.groupCount = 0
}
}
class YS {
constructor() {
this.intersectionSet = {},
this.ids = []
}
add(e, t) {
const {intersectionSet: n, ids: r} = this;
n[e] || (n[e] = [],
r.push(e)),
n[e].push(t)
}
}
const QS = new Cs
, ZS = new Es
, $S = new da
, eA = new Qi
, tA = new Hi
, nA = new Hi
, rA = new Hi
, iA = new Hi
, sA = new Hi
, aA = new Hi
, oA = new Vm
, lA = new Qi
, cA = 1e-8
, uA = 1e-15
, dA = -1
, hA = 1
, pA = -2
, fA = 2
, mA = 0
, gA = 1
, vA = 2
, yA = 1e-14;
let xA = null;
function bA(e) {
xA = e
}
function _A(e, t) {
e.getMidpoint(QS.origin),
e.getNormal(QS.direction);
const n = t.raycastFirst(QS, Ne);
return Boolean(n && QS.direction.dot(n.face.normal) > 0) ? dA : hA
}
function wA(e, t) {
function n() {
return Math.random() - .5
}
e.getNormal(lA),
QS.direction.copy(lA),
e.getMidpoint(QS.origin);
let r = 0
, i = 1 / 0;
for (let s = 0; s < 3; s++) {
QS.direction.x += n() * cA,
QS.direction.y += n() * cA,
QS.direction.z += n() * cA,
QS.direction.multiplyScalar(-1);
const e = t.raycastFirst(QS, Ne);
if (Boolean(e && QS.direction.dot(e.face.normal) > 0) && r++,
null !== e && (i = Math.min(i, e.distance)),
i <= uA)
return e.face.normal.dot(lA) > 0 ? fA : pA;
if (r / 3 > .5 || (s - r + 1) / 3 > .5)
break
}
return r / 3 > .5 ? dA : hA
}
function SA(e, t, n, r, i, s) {
let a = arguments.length > 6 && void 0 !== arguments[6] && arguments[6];
const o = n.attributes
, l = n.index
, c = 3 * e
, u = l.getX(c + 0)
, d = l.getX(c + 1)
, h = l.getX(c + 2);
for (const p in s) {
const e = o[p]
, n = s[p];
if (!(p in o))
throw new Error("CSG Operations: Attribute ".concat(p, " not available on geometry."));
const l = e.itemSize;
"position" === p ? ($S.a.fromBufferAttribute(e, u).applyMatrix4(r),
$S.b.fromBufferAttribute(e, d).applyMatrix4(r),
$S.c.fromBufferAttribute(e, h).applyMatrix4(r),
CA($S.a, $S.b, $S.c, t, 3, n, a)) : "normal" === p ? ($S.a.fromBufferAttribute(e, u).applyNormalMatrix(i),
$S.b.fromBufferAttribute(e, d).applyNormalMatrix(i),
$S.c.fromBufferAttribute(e, h).applyNormalMatrix(i),
a && ($S.a.multiplyScalar(-1),
$S.b.multiplyScalar(-1),
$S.c.multiplyScalar(-1)),
CA($S.a, $S.b, $S.c, t, 3, n, a, !0)) : (tA.fromBufferAttribute(e, u),
nA.fromBufferAttribute(e, d),
rA.fromBufferAttribute(e, h),
CA(tA, nA, rA, t, l, n, a))
}
}
function AA(e, t, n, r, i, s, a) {
let o = arguments.length > 7 && void 0 !== arguments[7] && arguments[7];
EA(e, r, i, s, a, o),
EA(o ? n : t, r, i, s, a, o),
EA(o ? t : n, r, i, s, a, o)
}
function MA(e, t) {
let n = arguments.length > 2 && void 0 !== arguments[2] && arguments[2];
switch (e) {
case Eb:
if (t === hA || t === fA && !n)
return gA;
break;
case Tb:
if (n) {
if (t === dA)
return mA
} else if (t === hA || t === pA)
return gA;
break;
case Rb:
if (n) {
if (t === hA || t === pA)
return gA
} else if (t === dA)
return mA;
break;
case Pb:
if (t === dA)
return mA;
if (t === hA)
return gA;
break;
case Bb:
if (t === dA || t === fA && !n)
return gA;
break;
case kb:
if (!n && (t === hA || t === pA))
return gA;
break;
case Lb:
if (!n && (t === dA || t === fA))
return gA;
break;
default:
throw new Error('Unrecognized CSG operation enum "'.concat(e, '".'))
}
return vA
}
function CA(e, t, n, r, i, s) {
let a = arguments.length > 6 && void 0 !== arguments[6] && arguments[6]
, o = arguments.length > 7 && void 0 !== arguments[7] && arguments[7];
const l = e => {
s.push(e.x),
i > 1 && s.push(e.y),
i > 2 && s.push(e.z),
i > 3 && s.push(e.w)
}
;
iA.set(0, 0, 0, 0).addScaledVector(e, r.a.x).addScaledVector(t, r.a.y).addScaledVector(n, r.a.z),
sA.set(0, 0, 0, 0).addScaledVector(e, r.b.x).addScaledVector(t, r.b.y).addScaledVector(n, r.b.z),
aA.set(0, 0, 0, 0).addScaledVector(e, r.c.x).addScaledVector(t, r.c.y).addScaledVector(n, r.c.z),
o && (iA.normalize(),
sA.normalize(),
aA.normalize()),
l(iA),
a ? (l(aA),
l(sA)) : (l(sA),
l(aA))
}
function EA(e, t, n, r, i) {
let s = arguments.length > 5 && void 0 !== arguments[5] && arguments[5];
for (const a in i) {
const o = t[a]
, l = i[a];
if (!(a in t))
throw new Error("CSG Operations: Attribute ".concat(a, " no available on geometry."));
const c = o.itemSize;
"position" === a ? (eA.fromBufferAttribute(o, e).applyMatrix4(n),
l.push(eA.x, eA.y, eA.z)) : "normal" === a ? (eA.fromBufferAttribute(o, e).applyNormalMatrix(r),
s && eA.multiplyScalar(-1),
l.push(eA.x, eA.y, eA.z)) : (l.push(o.getX(e)),
c > 1 && l.push(o.getY(e)),
c > 2 && l.push(o.getZ(e)),
c > 3 && l.push(o.getW(e)))
}
}
class TA {
constructor(e) {
this.triangle = (new da).copy(e),
this.intersects = {}
}
addTriangle(e, t) {
this.intersects[e] = (new da).copy(t)
}
getIntersectArray() {
const e = []
, {intersects: t} = this;
for (const n in t)
e.push(t[n]);
return e
}
}
class RA {
constructor() {
this.data = {}
}
addTriangleIntersection(e, t, n, r) {
const {data: i} = this;
i[e] || (i[e] = new TA(t)),
i[e].addTriangle(n, r)
}
getTrianglesAsArray() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : null;
const {data: t} = this
, n = [];
if (null !== e)
e in t && n.push(t[e].triangle);
else
for (const r in t)
n.push(t[r].triangle);
return n
}
getTriangleIndices() {
return Object.keys(this.data).map((e => parseInt(e)))
}
getIntersectionIndices(e) {
const {data: t} = this;
return t[e] ? Object.keys(t[e].intersects).map((e => parseInt(e))) : []
}
getIntersectionsAsArray() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : null
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : null;
const {data: n} = this
, r = new Set
, i = []
, s = e => {
if (n[e])
if (null !== t)
n[e].intersects[t] && i.push(n[e].intersects[t]);
else {
const t = n[e].intersects;
for (const e in t)
r.has(e) || (r.add(e),
i.push(t[e]))
}
}
;
if (null !== e)
s(e);
else
for (const a in n)
s(a);
return i
}
reset() {
this.data = {}
}
}
class BA {
constructor() {
this.enabled = !1,
this.triangleIntersectsA = new RA,
this.triangleIntersectsB = new RA,
this.intersectionEdges = []
}
addIntersectingTriangles(e, t, n, r) {
const {triangleIntersectsA: i, triangleIntersectsB: s} = this;
i.addTriangleIntersection(e, t, n, r),
s.addTriangleIntersection(n, r, e, t)
}
addEdge(e) {
this.intersectionEdges.push(e.clone())
}
reset() {
this.triangleIntersectsA.reset(),
this.triangleIntersectsB.reset(),
this.intersectionEdges = []
}
init() {
this.enabled && (this.reset(),
bA(this))
}
complete() {
this.enabled && bA(null)
}
}
const PA = new Es
, kA = new bi
, LA = new da
, IA = new da
, NA = new da
, DA = new da
, jA = []
, FA = [];
function OA(e) {
for (const t of e)
return t
}
function UA(e, t, n, r, i) {
let s = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : {};
const {useGroups: a=!0} = s
, {aIntersections: o, bIntersections: l} = function(e, t) {
const n = new YS
, r = new YS;
return ZS.copy(e.matrixWorld).invert().multiply(t.matrixWorld),
e.geometry.boundsTree.bvhcast(t.geometry.boundsTree, ZS, {
intersectsTriangles(i, s, a, o) {
if (!DS(i) && !DS(s)) {
let l = i.intersectsTriangle(s, oA, !0);
if (!l) {
const e = i.plane
, t = s.plane
, n = e.normal
, r = t.normal;
1 === n.dot(r) && Math.abs(e.constant - t.constant) < yA && (l = !0)
}
if (l) {
let l = e.geometry.boundsTree.resolveTriangleIndex(a)
, c = t.geometry.boundsTree.resolveTriangleIndex(o);
n.add(l, c),
r.add(c, l),
xA && (xA.addEdge(oA),
xA.addIntersectingTriangles(a, i, o, s))
}
}
return !1
}
}),
{
aIntersections: n,
bIntersections: r
}
}(e, t);
let c;
c = a ? 0 : -1,
zA(e, t, o, n, !1, r, i, c),
GA(e, t, o, n, !1, i, c);
return -1 !== n.findIndex((e => e !== Lb && e !== kb)) && (c = a ? e.geometry.groups.length || 1 : -1,
zA(t, e, l, n, !0, r, i, c),
GA(t, e, l, n, !0, i, c)),
jA.length = 0,
FA.length = 0,
{
groups: [],
materials: null
}
}
function zA(e, t, n, r, i, s, a) {
let o = arguments.length > 7 && void 0 !== arguments[7] ? arguments[7] : 0;
const l = e.matrixWorld.determinant() < 0;
PA.copy(t.matrixWorld).invert().multiply(e.matrixWorld),
kA.getNormalMatrix(e.matrixWorld).multiplyScalar(l ? -1 : 1);
const c = e.geometry.groupIndices
, u = e.geometry.index
, d = e.geometry.attributes.position
, h = t.geometry.boundsTree
, p = t.geometry.index
, f = t.geometry.attributes.position
, m = n.ids
, g = n.intersectionSet;
for (let v = 0, y = m.length; v < y; v++) {
const t = m[v]
, n = -1 === o ? 0 : c[t] + o
, y = 3 * t
, x = u.getX(y + 0)
, b = u.getX(y + 1)
, _ = u.getX(y + 2);
LA.a.fromBufferAttribute(d, x).applyMatrix4(PA),
LA.b.fromBufferAttribute(d, b).applyMatrix4(PA),
LA.c.fromBufferAttribute(d, _).applyMatrix4(PA),
s.reset(),
s.initialize(LA);
const w = g[t];
for (let e = 0, r = w.length; e < r; e++) {
const t = 3 * w[e]
, n = p.getX(t + 0)
, r = p.getX(t + 1)
, i = p.getX(t + 2);
IA.a.fromBufferAttribute(f, n),
IA.b.fromBufferAttribute(f, r),
IA.c.fromBufferAttribute(f, i),
s.splitByTriangle(IA)
}
const S = s.triangles;
for (let o = 0, c = S.length; o < c; o++) {
const c = S[o]
, u = s.coplanarTriangleUsed ? wA(c, h) : _A(c, h);
jA.length = 0,
FA.length = 0;
for (let e = 0, t = r.length; e < t; e++) {
const t = MA(r[e], u, i);
t !== vA && (FA.push(t),
jA.push(a[e].getGroupAttrSet(n)))
}
if (0 !== jA.length) {
LA.getBarycoord(c.a, DA.a),
LA.getBarycoord(c.b, DA.b),
LA.getBarycoord(c.c, DA.c);
for (let n = 0, r = jA.length; n < r; n++) {
const r = jA[n]
, i = FA[n] === mA;
SA(t, DA, e.geometry, e.matrixWorld, kA, r, l !== i)
}
}
}
}
return m.length
}
function GA(e, t, n, r, i, s) {
let a = arguments.length > 6 && void 0 !== arguments[6] ? arguments[6] : 0;
const o = e.matrixWorld.determinant() < 0;
PA.copy(t.matrixWorld).invert().multiply(e.matrixWorld),
kA.getNormalMatrix(e.matrixWorld).multiplyScalar(o ? -1 : 1);
const l = t.geometry.boundsTree
, c = e.geometry.groupIndices
, u = e.geometry.index
, d = e.geometry.attributes
, h = d.position
, p = []
, f = e.geometry.halfEdges
, m = new Set;
for (let g = 0, v = pS(e.geometry); g < v; g++)
g in n.intersectionSet || m.add(g);
for (; m.size > 0; ) {
const t = OA(m);
m.delete(t),
p.push(t);
const n = 3 * t
, g = u.getX(n + 0)
, v = u.getX(n + 1)
, y = u.getX(n + 2);
NA.a.fromBufferAttribute(h, g).applyMatrix4(PA),
NA.b.fromBufferAttribute(h, v).applyMatrix4(PA),
NA.c.fromBufferAttribute(h, y).applyMatrix4(PA);
const x = _A(NA, l);
FA.length = 0,
jA.length = 0;
for (let e = 0, a = r.length; e < a; e++) {
const t = MA(r[e], x, i);
t !== vA && (FA.push(t),
jA.push(s[e]))
}
for (; p.length > 0; ) {
const t = p.pop();
for (let e = 0; e < 3; e++) {
const n = f.getSiblingTriangleIndex(t, e);
-1 !== n && m.has(n) && (p.push(n),
m.delete(n))
}
if (0 !== jA.length) {
const n = 3 * t
, r = u.getX(n + 0)
, i = u.getX(n + 1)
, s = u.getX(n + 2)
, l = -1 === a ? 0 : c[t] + a;
if (NA.a.fromBufferAttribute(h, r),
NA.b.fromBufferAttribute(h, i),
NA.c.fromBufferAttribute(h, s),
!DS(NA))
for (let t = 0, a = jA.length; t < a; t++) {
const n = FA[t]
, a = jA[t].getGroupAttrSet(l)
, c = n === mA;
AA(r, i, s, d, e.matrixWorld, kA, a, c !== o)
}
}
}
}
}
function HA(e, t) {
let n = t;
return Array.isArray(t) || (n = [],
e.forEach((e => {
n[e.materialIndex] = t
}
))),
n
}
class VA {
constructor() {
this.triangleSplitter = new XS,
this.attributeData = [],
this.attributes = ["position", "uv", "normal"],
this.useGroups = !0,
this.consolidateGroups = !0,
this.debug = new BA
}
getGroupRanges(e) {
return this.useGroups && 0 !== e.groups.length ? e.groups.map((e => ({
...e
}))) : [{
start: 0,
count: 1 / 0,
materialIndex: 0
}]
}
evaluate(e, t, n) {
let r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : new PS
, i = !0;
if (Array.isArray(n) || (n = [n]),
Array.isArray(r) || (r = [r],
i = !1),
r.length !== n.length)
throw new Error("Evaluator: operations and target array passed as different sizes.");
e.prepareGeometry(),
t.prepareGeometry();
const {triangleSplitter: s, attributeData: a, attributes: o, useGroups: l, consolidateGroups: c, debug: u} = this;
for (; a.length < r.length; )
a.push(new qS);
r.forEach(( (t, n) => {
!function(e, t, n, r) {
n.clear();
const i = e.attributes;
for (let s = 0, a = r.length; s < a; s++) {
const e = r[s]
, t = i[e];
n.initializeArray(e, t.array.constructor, t.itemSize, t.normalized)
}
for (const s in n.attributes)
r.includes(s) || n.delete(s);
for (const s in t.attributes)
r.includes(s) || (t.deleteAttribute(s),
t.dispose())
}(e.geometry, t.geometry, a[n], o)
}
)),
u.init(),
UA(e, t, n, s, a, {
useGroups: l
}),
u.complete();
const d = this.getGroupRanges(e.geometry)
, h = HA(d, e.material)
, p = this.getGroupRanges(t.geometry)
, f = HA(p, t.material);
p.forEach((e => e.materialIndex += h.length));
let m = [...d, ...p].map(( (e, t) => ({
...e,
index: t
})));
if (l) {
const e = [...h, ...f];
c && (m = m.map((t => {
const n = e[t.materialIndex];
return t.materialIndex = e.indexOf(n),
t
}
)).sort(( (e, t) => e.materialIndex - t.materialIndex)));
const t = [];
for (let n = 0, r = e.length; n < r; n++) {
let r = !1;
for (let e = 0, i = m.length; e < i; e++) {
const i = m[e];
i.materialIndex === n && (r = !0,
i.materialIndex = t.length)
}
r && t.push(e[n])
}
r.forEach((e => {
e.material = t
}
))
} else
m = [{
start: 0,
count: 1 / 0,
index: 0,
materialIndex: 0
}],
r.forEach((e => {
e.material = h[0]
}
));
return r.forEach(( (e, t) => {
const n = e.geometry;
!function(e, t, n) {
let r = !1
, i = -1;
const s = e.attributes
, a = t.groupAttributes[0];
for (const l in a) {
const a = t.getTotalLength(l)
, o = t.getType(l)
, c = t.getItemSize(l)
, u = t.getNormalized(l);
let d = s[l];
(!d || d.array.length < a) && (d = new Ta(new o(a),c,u),
e.setAttribute(l, d),
r = !0);
let h = 0;
for (let e = 0, r = Math.min(n.length, t.groupCount); e < r; e++) {
const r = n[e].index
, {array: i, type: s, length: a} = t.groupAttributes[r][l]
, o = new s(i.buffer,0,a);
d.array.set(o, h),
h += o.length
}
d.needsUpdate = !0,
i = a / d.itemSize
}
if (e.index) {
const t = e.index.array;
if (t.length < i)
e.index = null,
r = !0;
else
for (let e = 0, n = t.length; e < n; e++)
t[e] = e
}
let o = 0;
e.clearGroups();
for (let l = 0, c = Math.min(n.length, t.groupCount); l < c; l++) {
const {index: r, materialIndex: i} = n[l]
, s = t.getCount(r);
0 !== s && (e.addGroup(o, s, i),
o += s)
}
e.setDrawRange(0, i),
e.boundsTree = null,
r && e.dispose()
}(n, a[t], m),
c && function(e) {
for (let t = 0; t < e.length - 1; t++) {
const n = e[t]
, r = e[t + 1];
if (n.materialIndex === r.materialIndex) {
const i = n.start
, s = r.start + r.count;
r.start = i,
r.count = s - i,
e.splice(t, 1),
t--
}
}
}(n.groups)
}
)),
i ? r : r[0]
}
evaluateHierarchy(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : new PS;
e.updateMatrixWorld(!0);
const n = (e, t) => {
const r = e.children;
for (let i = 0, s = r.length; i < s; i++) {
const e = r[i];
e.isOperationGroup ? n(e, t) : t(e)
}
}
, r = e => {
const t = e.children;
let i = !1;
for (let n = 0, a = t.length; n < a; n++) {
const e = t[n];
i = r(e) || i
}
const s = e.isDirty();
if (s && e.markUpdated(),
i && !e.isOperationGroup) {
let t;
return n(e, (n => {
t = t ? this.evaluate(t, n, n.operation) : this.evaluate(e, n, n.operation)
}
)),
e._cachedGeometry = t.geometry,
e._cachedMaterials = t.material,
!0
}
return i || s
}
;
return r(e),
t.geometry = e._cachedGeometry,
t.material = e._cachedMaterials,
t
}
reset() {
this.triangleSplitter.reset()
}
}
const WA = {
subtraction: Tb,
reverseSubtraction: Rb,
addition: Eb,
difference: Pb,
intersection: Bb
};
function JA(e) {
let t = null;
return e instanceof PS ? (e.updateMatrixWorld(),
t = e) : e.traverse((e => {
e.updateMatrixWorld(),
!t && e instanceof PS && (t = e)
}
)),
t
}
const XA = i.createContext(null)
, KA = i.forwardRef(( (e, t) => {
let {children: n, computeVertexNormals: r=!1, useGroups: s=!1, showOperations: a=!1} = e;
const o = i.useRef(null)
, l = i.useRef(null)
, c = i.useMemo(( () => Object.assign(new VA, {
useGroups: s
})), [s])
, u = i.useCallback(( () => {
try {
const s = l.current.children.slice();
if (s.length > 0) {
(i = o.current).dispose(),
i.attributes = {},
i.groups = [],
i.boundsTree = i.index = i.boundingBox = i.boundingSphere = null,
i.drawRange = {
start: 0,
count: 1 / 0
},
l.current.matrixWorld.identity();
let a = JA(s.shift());
if (a) {
for (var e, t, n; s.length; ) {
const e = JA(s.shift());
e && (a = c.evaluate(a, e, WA[e.operator] || Eb))
}
o.current.boundsTree = a.geometry.boundsTree,
o.current.index = a.geometry.index,
o.current.attributes = a.geometry.attributes,
o.current.groups = a.geometry.groups,
o.current.drawRange = a.geometry.drawRange,
c.useGroups && null != (e = o.current) && null != (t = e.__r3f) && null != (n = t.parent) && n.material && (o.current.__r3f.parent.material = a.material),
r && o.current.computeVertexNormals()
}
}
} catch (CB) {
console.log(CB)
}
var i
}
), [r, c])
, d = i.useMemo(( () => ({
computeVertexNormals: r,
showOperations: a,
useGroups: s,
update: u
})), [r, a, s]);
return i.useLayoutEffect(( () => {
u()
}
)),
i.useImperativeHandle(t, ( () => ({
geometry: o.current,
operations: l.current,
...d
})), [d]),
i.createElement(i.Fragment, null, i.createElement("group", {
matrixAutoUpdate: !1,
ref: l
}, i.createElement(XA.Provider, {
value: d
}, n)), i.createElement("bufferGeometry", {
ref: o
}))
}
))
, qA = i.forwardRef(( (e, t) => {
let {showOperation: n=!1, operator: r="addition", ...s} = e;
Dg({
Brush: PS
});
const {showOperations: a} = i.useContext(XA);
return i.createElement("brush", Cb({
operator: r,
raycast: () => null,
visible: n || a,
ref: t
}, s))
}
))
, YA = i.forwardRef(( (e, t) => i.createElement(qA, Cb({
ref: t,
operator: "subtraction"
}, e))));
const QA = e => e === Object(e) && !Array.isArray(e) && "function" !== typeof e;
function ZA(e, t) {
const n = function() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : e => e
, t = arguments.length > 1 ? arguments[1] : void 0;
return Cv()(e, t)
}((e => e.gl))
, r = Rv(_f, QA(e) ? Object.values(e) : e);
(0,
i.useLayoutEffect)(( () => {
null == t || t(r)
}
), [t]),
(0,
i.useEffect)(( () => {
if ("initTexture"in n) {
let e = [];
Array.isArray(r) ? e = r : r instanceof Gi ? e = [r] : QA(r) && (e = Object.values(r)),
e.forEach((e => {
e instanceof Gi && n.initTexture(e)
}
))
}
}
), [n, r]);
const s = (0,
i.useMemo)(( () => {
if (QA(e)) {
const t = {};
let n = 0;
for (const i in e)
t[i] = r[n++];
return t
}
return r
}
), [e, r]);
return s
}
ZA.preload = e => Rv.preload(_f, e),
ZA.clear = e => Rv.clear(_f, e);
n(536);
const $A = (0,
i.createContext)("");
function eM(e) {
if (void 0 === e)
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return e
}
function tM(e, t) {
e.prototype = Object.create(t.prototype),
e.prototype.constructor = e,
e.__proto__ = t
}
var nM, rM, iM, sM, aM, oM, lM, cM, uM, dM, hM, pM = {
autoSleep: 120,
force3D: "auto",
nullTargetWarn: 1,
units: {
lineHeight: ""
}
}, fM = {
duration: .5,
overwrite: !1,
delay: 0
}, mM = 1e8, gM = 1e-8, vM = 2 * Math.PI, yM = vM / 4, xM = 0, bM = Math.sqrt, _M = Math.cos, wM = Math.sin, SM = function(e) {
return "string" === typeof e
}, AM = function(e) {
return "function" === typeof e
}, MM = function(e) {
return "number" === typeof e
}, CM = function(e) {
return "undefined" === typeof e
}, EM = function(e) {
return "object" === typeof e
}, TM = function(e) {
return !1 !== e
}, RM = function() {
return "undefined" !== typeof window
}, BM = function(e) {
return AM(e) || SM(e)
}, PM = "function" === typeof ArrayBuffer && ArrayBuffer.isView || function() {}
, kM = Array.isArray, LM = /(?:-?\.?\d|\.)+/gi, IM = /[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g, NM = /[-+=.]*\d+[.e-]*\d*[a-z%]*/g, DM = /[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi, jM = /[+-]=-?[.\d]+/, FM = /[^,'"\[\]\s]+/gi, OM = /^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i, UM = {}, zM = {}, GM = function(e) {
return (zM = vC(e, UM)) && gT
}, HM = function(e, t) {
return console.warn("Invalid property", e, "set to", t, "Missing plugin? gsap.registerPlugin()")
}, VM = function(e, t) {
return !t && console.warn(e)
}, WM = function(e, t) {
return e && (UM[e] = t) && zM && (zM[e] = t) || UM
}, JM = function() {
return 0
}, XM = {
suppressEvents: !0,
isStart: !0,
kill: !1
}, KM = {
suppressEvents: !0,
kill: !1
}, qM = {
suppressEvents: !0
}, YM = {}, QM = [], ZM = {}, $M = {}, eC = {}, tC = 30, nC = [], rC = "", iC = function(e) {
var t, n, r = e[0];
if (EM(r) || AM(r) || (e = [e]),
!(t = (r._gsap || {}).harness)) {
for (n = nC.length; n-- && !nC[n].targetTest(r); )
;
t = nC[n]
}
for (n = e.length; n--; )
e[n] && (e[n]._gsap || (e[n]._gsap = new BE(e[n],t))) || e.splice(n, 1);
return e
}, sC = function(e) {
return e._gsap || iC(KC(e))[0]._gsap
}, aC = function(e, t, n) {
return (n = e[t]) && AM(n) ? e[t]() : CM(n) && e.getAttribute && e.getAttribute(t) || n
}, oC = function(e, t) {
return (e = e.split(",")).forEach(t) || e
}, lC = function(e) {
return Math.round(1e5 * e) / 1e5 || 0
}, cC = function(e) {
return Math.round(1e7 * e) / 1e7 || 0
}, uC = function(e, t) {
var n = t.charAt(0)
, r = parseFloat(t.substr(2));
return e = parseFloat(e),
"+" === n ? e + r : "-" === n ? e - r : "*" === n ? e * r : e / r
}, dC = function(e, t) {
for (var n = t.length, r = 0; e.indexOf(t[r]) < 0 && ++r < n; )
;
return r < n
}, hC = function() {
var e, t, n = QM.length, r = QM.slice(0);
for (ZM = {},
QM.length = 0,
e = 0; e < n; e++)
(t = r[e]) && t._lazy && (t.render(t._lazy[0], t._lazy[1], !0)._lazy = 0)
}, pC = function(e, t, n, r) {
QM.length && !rM && hC(),
e.render(t, n, r || rM && t < 0 && (e._initted || e._startAt)),
QM.length && !rM && hC()
}, fC = function(e) {
var t = parseFloat(e);
return (t || 0 === t) && (e + "").match(FM).length < 2 ? t : SM(e) ? e.trim() : e
}, mC = function(e) {
return e
}, gC = function(e, t) {
for (var n in t)
n in e || (e[n] = t[n]);
return e
}, vC = function(e, t) {
for (var n in t)
e[n] = t[n];
return e
}, yC = function e(t, n) {
for (var r in n)
"__proto__" !== r && "constructor" !== r && "prototype" !== r && (t[r] = EM(n[r]) ? e(t[r] || (t[r] = {}), n[r]) : n[r]);
return t
}, xC = function(e, t) {
var n, r = {};
for (n in e)
n in t || (r[n] = e[n]);
return r
}, bC = function(e) {
var t, n = e.parent || sM, r = e.keyframes ? (t = kM(e.keyframes),
function(e, n) {
for (var r in n)
r in e || "duration" === r && t || "ease" === r || (e[r] = n[r])
}
) : gC;
if (TM(e.inherit))
for (; n; )
r(e, n.vars.defaults),
n = n.parent || n._dp;
return e
}, _C = function(e, t, n, r, i) {
void 0 === n && (n = "_first"),
void 0 === r && (r = "_last");
var s, a = e[r];
if (i)
for (s = t[i]; a && a[i] > s; )
a = a._prev;
return a ? (t._next = a._next,
a._next = t) : (t._next = e[n],
e[n] = t),
t._next ? t._next._prev = t : e[r] = t,
t._prev = a,
t.parent = t._dp = e,
t
}, wC = function(e, t, n, r) {
void 0 === n && (n = "_first"),
void 0 === r && (r = "_last");
var i = t._prev
, s = t._next;
i ? i._next = s : e[n] === t && (e[n] = s),
s ? s._prev = i : e[r] === t && (e[r] = i),
t._next = t._prev = t.parent = null
}, SC = function(e, t) {
e.parent && (!t || e.parent.autoRemoveChildren) && e.parent.remove && e.parent.remove(e),
e._act = 0
}, AC = function(e, t) {
if (e && (!t || t._end > e._dur || t._start < 0))
for (var n = e; n; )
n._dirty = 1,
n = n.parent;
return e
}, MC = function(e, t, n, r) {
return e._startAt && (rM ? e._startAt.revert(KM) : e.vars.immediateRender && !e.vars.autoRevert || e._startAt.render(t, !0, r))
}, CC = function e(t) {
return !t || t._ts && e(t.parent)
}, EC = function(e) {
return e._repeat ? TC(e._tTime, e = e.duration() + e._rDelay) * e : 0
}, TC = function(e, t) {
var n = Math.floor(e /= t);
return e && n === e ? n - 1 : n
}, RC = function(e, t) {
return (e - t._start) * t._ts + (t._ts >= 0 ? 0 : t._dirty ? t.totalDuration() : t._tDur)
}, BC = function(e) {
return e._end = cC(e._start + (e._tDur / Math.abs(e._ts || e._rts || gM) || 0))
}, PC = function(e, t) {
var n = e._dp;
return n && n.smoothChildTiming && e._ts && (e._start = cC(n._time - (e._ts > 0 ? t / e._ts : ((e._dirty ? e.totalDuration() : e._tDur) - t) / -e._ts)),
BC(e),
n._dirty || AC(n, e)),
e
}, kC = function(e, t) {
var n;
if ((t._time || !t._dur && t._initted || t._start < e._time && (t._dur || !t.add)) && (n = RC(e.rawTime(), t),
(!t._dur || VC(0, t.totalDuration(), n) - t._tTime > gM) && t.render(n, !0)),
AC(e, t)._dp && e._initted && e._time >= e._dur && e._ts) {
if (e._dur < e.duration())
for (n = e; n._dp; )
n.rawTime() >= 0 && n.totalTime(n._tTime),
n = n._dp;
e._zTime = -1e-8
}
}, LC = function(e, t, n, r) {
return t.parent && SC(t),
t._start = cC((MM(n) ? n : n || e !== sM ? zC(e, n, t) : e._time) + t._delay),
t._end = cC(t._start + (t.totalDuration() / Math.abs(t.timeScale()) || 0)),
_C(e, t, "_first", "_last", e._sort ? "_start" : 0),
jC(t) || (e._recent = t),
r || kC(e, t),
e._ts < 0 && PC(e, e._tTime),
e
}, IC = function(e, t) {
return (UM.ScrollTrigger || HM("scrollTrigger", t)) && UM.ScrollTrigger.create(t, e)
}, NC = function(e, t, n, r, i) {
return FE(e, t, i),
e._initted ? !n && e._pt && !rM && (e._dur && !1 !== e.vars.lazy || !e._dur && e.vars.lazy) && uM !== vE.frame ? (QM.push(e),
e._lazy = [i, r],
1) : void 0 : 1
}, DC = function e(t) {
var n = t.parent;
return n && n._ts && n._initted && !n._lock && (n.rawTime() < 0 || e(n))
}, jC = function(e) {
var t = e.data;
return "isFromStart" === t || "isStart" === t
}, FC = function(e, t, n, r) {
var i = e._repeat
, s = cC(t) || 0
, a = e._tTime / e._tDur;
return a && !r && (e._time *= s / e._dur),
e._dur = s,
e._tDur = i ? i < 0 ? 1e10 : cC(s * (i + 1) + e._rDelay * i) : s,
a > 0 && !r && PC(e, e._tTime = e._tDur * a),
e.parent && BC(e),
n || AC(e.parent, e),
e
}, OC = function(e) {
return e instanceof kE ? AC(e) : FC(e, e._dur)
}, UC = {
_start: 0,
endTime: JM,
totalDuration: JM
}, zC = function e(t, n, r) {
var i, s, a, o = t.labels, l = t._recent || UC, c = t.duration() >= mM ? l.endTime(!1) : t._dur;
return SM(n) && (isNaN(n) || n in o) ? (s = n.charAt(0),
a = "%" === n.substr(-1),
i = n.indexOf("="),
"<" === s || ">" === s ? (i >= 0 && (n = n.replace(/=/, "")),
("<" === s ? l._start : l.endTime(l._repeat >= 0)) + (parseFloat(n.substr(1)) || 0) * (a ? (i < 0 ? l : r).totalDuration() / 100 : 1)) : i < 0 ? (n in o || (o[n] = c),
o[n]) : (s = parseFloat(n.charAt(i - 1) + n.substr(i + 1)),
a && r && (s = s / 100 * (kM(r) ? r[0] : r).totalDuration()),
i > 1 ? e(t, n.substr(0, i - 1), r) + s : c + s)) : null == n ? c : +n
}, GC = function(e, t, n) {
var r, i, s = MM(t[1]), a = (s ? 2 : 1) + (e < 2 ? 0 : 1), o = t[a];
if (s && (o.duration = t[1]),
o.parent = n,
e) {
for (r = o,
i = n; i && !("immediateRender"in r); )
r = i.vars.defaults || {},
i = TM(i.vars.inherit) && i.parent;
o.immediateRender = TM(r.immediateRender),
e < 2 ? o.runBackwards = 1 : o.startAt = t[a - 1]
}
return new HE(t[0],o,t[a + 1])
}, HC = function(e, t) {
return e || 0 === e ? t(e) : t
}, VC = function(e, t, n) {
return n < e ? e : n > t ? t : n
}, WC = function(e, t) {
return SM(e) && (t = OM.exec(e)) ? t[1] : ""
}, JC = [].slice, XC = function(e, t) {
return e && EM(e) && "length"in e && (!t && !e.length || e.length - 1 in e && EM(e[0])) && !e.nodeType && e !== aM
}, KC = function(e, t, n) {
return iM && !t && iM.selector ? iM.selector(e) : !SM(e) || n || !oM && yE() ? kM(e) ? function(e, t, n) {
return void 0 === n && (n = []),
e.forEach((function(e) {
var r;
return SM(e) && !t || XC(e, 1) ? (r = n).push.apply(r, KC(e)) : n.push(e)
}
)) || n
}(e, n) : XC(e) ? JC.call(e, 0) : e ? [e] : [] : JC.call((t || lM).querySelectorAll(e), 0)
}, qC = function(e) {
return e = KC(e)[0] || VM("Invalid scope") || {},
function(t) {
var n = e.current || e.nativeElement || e;
return KC(t, n.querySelectorAll ? n : n === e ? VM("Invalid scope") || lM.createElement("div") : e)
}
}, YC = function(e) {
return e.sort((function() {
return .5 - Math.random()
}
))
}, QC = function(e) {
if (AM(e))
return e;
var t = EM(e) ? e : {
each: e
}
, n = ME(t.ease)
, r = t.from || 0
, i = parseFloat(t.base) || 0
, s = {}
, a = r > 0 && r < 1
, o = isNaN(r) || a
, l = t.axis
, c = r
, u = r;
return SM(r) ? c = u = {
center: .5,
edges: .5,
end: 1
}[r] || 0 : !a && o && (c = r[0],
u = r[1]),
function(e, a, d) {
var h, p, f, m, g, v, y, x, b, _ = (d || t).length, w = s[_];
if (!w) {
if (!(b = "auto" === t.grid ? 0 : (t.grid || [1, mM])[1])) {
for (y = -mM; y < (y = d[b++].getBoundingClientRect().left) && b < _; )
;
b < _ && b--
}
for (w = s[_] = [],
h = o ? Math.min(b, _) * c - .5 : r % b,
p = b === mM ? 0 : o ? _ * u / b - .5 : r / b | 0,
y = 0,
x = mM,
v = 0; v < _; v++)
f = v % b - h,
m = p - (v / b | 0),
w[v] = g = l ? Math.abs("y" === l ? m : f) : bM(f * f + m * m),
g > y && (y = g),
g < x && (x = g);
"random" === r && YC(w),
w.max = y - x,
w.min = x,
w.v = _ = (parseFloat(t.amount) || parseFloat(t.each) * (b > _ ? _ - 1 : l ? "y" === l ? _ / b : b : Math.max(b, _ / b)) || 0) * ("edges" === r ? -1 : 1),
w.b = _ < 0 ? i - _ : i,
w.u = WC(t.amount || t.each) || 0,
n = n && _ < 0 ? SE(n) : n
}
return _ = (w[e] - w.min) / w.max || 0,
cC(w.b + (n ? n(_) : _) * w.v) + w.u
}
}, ZC = function(e) {
var t = Math.pow(10, ((e + "").split(".")[1] || "").length);
return function(n) {
var r = cC(Math.round(parseFloat(n) / e) * e * t);
return (r - r % 1) / t + (MM(n) ? 0 : WC(n))
}
}, $C = function(e, t) {
var n, r, i = kM(e);
return !i && EM(e) && (n = i = e.radius || mM,
e.values ? (e = KC(e.values),
(r = !MM(e[0])) && (n *= n)) : e = ZC(e.increment)),
HC(t, i ? AM(e) ? function(t) {
return r = e(t),
Math.abs(r - t) <= n ? r : t
}
: function(t) {
for (var i, s, a = parseFloat(r ? t.x : t), o = parseFloat(r ? t.y : 0), l = mM, c = 0, u = e.length; u--; )
(i = r ? (i = e[u].x - a) * i + (s = e[u].y - o) * s : Math.abs(e[u] - a)) < l && (l = i,
c = u);
return c = !n || l <= n ? e[c] : t,
r || c === t || MM(t) ? c : c + WC(t)
}
: ZC(e))
}, eE = function(e, t, n, r) {
return HC(kM(e) ? !t : !0 === n ? !!(n = 0) : !r, (function() {
return kM(e) ? e[~~(Math.random() * e.length)] : (n = n || 1e-5) && (r = n < 1 ? Math.pow(10, (n + "").length - 2) : 1) && Math.floor(Math.round((e - n / 2 + Math.random() * (t - e + .99 * n)) / n) * n * r) / r
}
))
}, tE = function(e, t, n) {
return HC(n, (function(n) {
return e[~~t(n)]
}
))
}, nE = function(e) {
for (var t, n, r, i, s = 0, a = ""; ~(t = e.indexOf("random(", s)); )
r = e.indexOf(")", t),
i = "[" === e.charAt(t + 7),
n = e.substr(t + 7, r - t - 7).match(i ? FM : LM),
a += e.substr(s, t - s) + eE(i ? n : +n[0], i ? 0 : +n[1], +n[2] || 1e-5),
s = r + 1;
return a + e.substr(s, e.length - s)
}, rE = function(e, t, n, r, i) {
var s = t - e
, a = r - n;
return HC(i, (function(t) {
return n + ((t - e) / s * a || 0)
}
))
}, iE = function(e, t, n) {
var r, i, s, a = e.labels, o = mM;
for (r in a)
(i = a[r] - t) < 0 === !!n && i && o > (i = Math.abs(i)) && (s = r,
o = i);
return s
}, sE = function(e, t, n) {
var r, i, s, a = e.vars, o = a[t], l = iM, c = e._ctx;
if (o)
return r = a[t + "Params"],
i = a.callbackScope || e,
n && QM.length && hC(),
c && (iM = c),
s = r ? o.apply(i, r) : o.call(i),
iM = l,
s
}, aE = function(e) {
return SC(e),
e.scrollTrigger && e.scrollTrigger.kill(!!rM),
e.progress() < 1 && sE(e, "onInterrupt"),
e
}, oE = [], lE = function(e) {
if (e)
if (e = !e.name && e.default || e,
RM() || e.headless) {
var t = e.name
, n = AM(e)
, r = t && !n && e.init ? function() {
this._props = []
}
: e
, i = {
init: JM,
render: ZE,
add: DE,
kill: eT,
modifier: $E,
rawVars: 0
}
, s = {
targetTest: 0,
get: 0,
getSetter: KE,
aliases: {},
register: 0
};
if (yE(),
e !== r) {
if ($M[t])
return;
gC(r, gC(xC(e, i), s)),
vC(r.prototype, vC(i, xC(e, s))),
$M[r.prop = t] = r,
e.targetTest && (nC.push(r),
YM[t] = 1),
t = ("css" === t ? "CSS" : t.charAt(0).toUpperCase() + t.substr(1)) + "Plugin"
}
WM(t, r),
e.register && e.register(gT, r, rT)
} else
oE.push(e)
}, cE = 255, uE = {
aqua: [0, cE, cE],
lime: [0, cE, 0],
silver: [192, 192, 192],
black: [0, 0, 0],
maroon: [128, 0, 0],
teal: [0, 128, 128],
blue: [0, 0, cE],
navy: [0, 0, 128],
white: [cE, cE, cE],
olive: [128, 128, 0],
yellow: [cE, cE, 0],
orange: [cE, 165, 0],
gray: [128, 128, 128],
purple: [128, 0, 128],
green: [0, 128, 0],
red: [cE, 0, 0],
pink: [cE, 192, 203],
cyan: [0, cE, cE],
transparent: [cE, cE, cE, 0]
}, dE = function(e, t, n) {
return (6 * (e += e < 0 ? 1 : e > 1 ? -1 : 0) < 1 ? t + (n - t) * e * 6 : e < .5 ? n : 3 * e < 2 ? t + (n - t) * (2 / 3 - e) * 6 : t) * cE + .5 | 0
}, hE = function(e, t, n) {
var r, i, s, a, o, l, c, u, d, h, p = e ? MM(e) ? [e >> 16, e >> 8 & cE, e & cE] : 0 : uE.black;
if (!p) {
if ("," === e.substr(-1) && (e = e.substr(0, e.length - 1)),
uE[e])
p = uE[e];
else if ("#" === e.charAt(0)) {
if (e.length < 6 && (r = e.charAt(1),
i = e.charAt(2),
s = e.charAt(3),
e = "#" + r + r + i + i + s + s + (5 === e.length ? e.charAt(4) + e.charAt(4) : "")),
9 === e.length)
return [(p = parseInt(e.substr(1, 6), 16)) >> 16, p >> 8 & cE, p & cE, parseInt(e.substr(7), 16) / 255];
p = [(e = parseInt(e.substr(1), 16)) >> 16, e >> 8 & cE, e & cE]
} else if ("hsl" === e.substr(0, 3))
if (p = h = e.match(LM),
t) {
if (~e.indexOf("="))
return p = e.match(IM),
n && p.length < 4 && (p[3] = 1),
p
} else
a = +p[0] % 360 / 360,
o = +p[1] / 100,
r = 2 * (l = +p[2] / 100) - (i = l <= .5 ? l * (o + 1) : l + o - l * o),
p.length > 3 && (p[3] *= 1),
p[0] = dE(a + 1 / 3, r, i),
p[1] = dE(a, r, i),
p[2] = dE(a - 1 / 3, r, i);
else
p = e.match(LM) || uE.transparent;
p = p.map(Number)
}
return t && !h && (r = p[0] / cE,
i = p[1] / cE,
s = p[2] / cE,
l = ((c = Math.max(r, i, s)) + (u = Math.min(r, i, s))) / 2,
c === u ? a = o = 0 : (d = c - u,
o = l > .5 ? d / (2 - c - u) : d / (c + u),
a = c === r ? (i - s) / d + (i < s ? 6 : 0) : c === i ? (s - r) / d + 2 : (r - i) / d + 4,
a *= 60),
p[0] = ~~(a + .5),
p[1] = ~~(100 * o + .5),
p[2] = ~~(100 * l + .5)),
n && p.length < 4 && (p[3] = 1),
p
}, pE = function(e) {
var t = []
, n = []
, r = -1;
return e.split(mE).forEach((function(e) {
var i = e.match(NM) || [];
t.push.apply(t, i),
n.push(r += i.length + 1)
}
)),
t.c = n,
t
}, fE = function(e, t, n) {
var r, i, s, a, o = "", l = (e + o).match(mE), c = t ? "hsla(" : "rgba(", u = 0;
if (!l)
return e;
if (l = l.map((function(e) {
return (e = hE(e, t, 1)) && c + (t ? e[0] + "," + e[1] + "%," + e[2] + "%," + e[3] : e.join(",")) + ")"
}
)),
n && (s = pE(e),
(r = n.c).join(o) !== s.c.join(o)))
for (a = (i = e.replace(mE, "1").split(NM)).length - 1; u < a; u++)
o += i[u] + (~r.indexOf(u) ? l.shift() || c + "0,0,0,0)" : (s.length ? s : l.length ? l : n).shift());
if (!i)
for (a = (i = e.split(mE)).length - 1; u < a; u++)
o += i[u] + l[u];
return o + i[a]
}, mE = function() {
var e, t = "(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b";
for (e in uE)
t += "|" + e + "\\b";
return new RegExp(t + ")","gi")
}(), gE = /hsl[a]?\(/, vE = function() {
var e, t, n, r, i, s, a = Date.now, o = 500, l = 33, c = a(), u = c, d = 1e3 / 240, h = d, p = [], f = function n(f) {
var m, g, v, y, x = a() - u, b = !0 === f;
if ((x > o || x < 0) && (c += x - l),
((m = (v = (u += x) - c) - h) > 0 || b) && (y = ++r.frame,
i = v - 1e3 * r.time,
r.time = v /= 1e3,
h += m + (m >= d ? 4 : d - m),
g = 1),
b || (e = t(n)),
g)
for (s = 0; s < p.length; s++)
p[s](v, i, y, f)
};
return r = {
time: 0,
frame: 0,
tick: function() {
f(!0)
},
deltaRatio: function(e) {
return i / (1e3 / (e || 60))
},
wake: function() {
cM && (!oM && RM() && (aM = oM = window,
lM = aM.document || {},
UM.gsap = gT,
(aM.gsapVersions || (aM.gsapVersions = [])).push(gT.version),
GM(zM || aM.GreenSockGlobals || !aM.gsap && aM || {}),
oE.forEach(lE)),
n = "undefined" !== typeof requestAnimationFrame && requestAnimationFrame,
e && r.sleep(),
t = n || function(e) {
return setTimeout(e, h - 1e3 * r.time + 1 | 0)
}
,
hM = 1,
f(2))
},
sleep: function() {
(n ? cancelAnimationFrame : clearTimeout)(e),
hM = 0,
t = JM
},
lagSmoothing: function(e, t) {
o = e || 1 / 0,
l = Math.min(t || 33, o)
},
fps: function(e) {
d = 1e3 / (e || 240),
h = 1e3 * r.time + d
},
add: function(e, t, n) {
var i = t ? function(t, n, s, a) {
e(t, n, s, a),
r.remove(i)
}
: e;
return r.remove(e),
p[n ? "unshift" : "push"](i),
yE(),
i
},
remove: function(e, t) {
~(t = p.indexOf(e)) && p.splice(t, 1) && s >= t && s--
},
_listeners: p
},
r
}(), yE = function() {
return !hM && vE.wake()
}, xE = {}, bE = /^[\d.\-M][\d.\-,\s]/, _E = /["']/g, wE = function(e) {
for (var t, n, r, i = {}, s = e.substr(1, e.length - 3).split(":"), a = s[0], o = 1, l = s.length; o < l; o++)
n = s[o],
t = o !== l - 1 ? n.lastIndexOf(",") : n.length,
r = n.substr(0, t),
i[a] = isNaN(r) ? r.replace(_E, "").trim() : +r,
a = n.substr(t + 1).trim();
return i
}, SE = function(e) {
return function(t) {
return 1 - e(1 - t)
}
}, AE = function e(t, n) {
for (var r, i = t._first; i; )
i instanceof kE ? e(i, n) : !i.vars.yoyoEase || i._yoyo && i._repeat || i._yoyo === n || (i.timeline ? e(i.timeline, n) : (r = i._ease,
i._ease = i._yEase,
i._yEase = r,
i._yoyo = n)),
i = i._next
}, ME = function(e, t) {
return e && (AM(e) ? e : xE[e] || function(e) {
var t = (e + "").split("(")
, n = xE[t[0]];
return n && t.length > 1 && n.config ? n.config.apply(null, ~e.indexOf("{") ? [wE(t[1])] : function(e) {
var t = e.indexOf("(") + 1
, n = e.indexOf(")")
, r = e.indexOf("(", t);
return e.substring(t, ~r && r < n ? e.indexOf(")", n + 1) : n)
}(e).split(",").map(fC)) : xE._CE && bE.test(e) ? xE._CE("", e) : n
}(e)) || t
}, CE = function(e, t, n, r) {
void 0 === n && (n = function(e) {
return 1 - t(1 - e)
}
),
void 0 === r && (r = function(e) {
return e < .5 ? t(2 * e) / 2 : 1 - t(2 * (1 - e)) / 2
}
);
var i, s = {
easeIn: t,
easeOut: n,
easeInOut: r
};
return oC(e, (function(e) {
for (var t in xE[e] = UM[e] = s,
xE[i = e.toLowerCase()] = n,
s)
xE[i + ("easeIn" === t ? ".in" : "easeOut" === t ? ".out" : ".inOut")] = xE[e + "." + t] = s[t]
}
)),
s
}, EE = function(e) {
return function(t) {
return t < .5 ? (1 - e(1 - 2 * t)) / 2 : .5 + e(2 * (t - .5)) / 2
}
}, TE = function e(t, n, r) {
var i = n >= 1 ? n : 1
, s = (r || (t ? .3 : .45)) / (n < 1 ? n : 1)
, a = s / vM * (Math.asin(1 / i) || 0)
, o = function(e) {
return 1 === e ? 1 : i * Math.pow(2, -10 * e) * wM((e - a) * s) + 1
}
, l = "out" === t ? o : "in" === t ? function(e) {
return 1 - o(1 - e)
}
: EE(o);
return s = vM / s,
l.config = function(n, r) {
return e(t, n, r)
}
,
l
}, RE = function e(t, n) {
void 0 === n && (n = 1.70158);
var r = function(e) {
return e ? --e * e * ((n + 1) * e + n) + 1 : 0
}
, i = "out" === t ? r : "in" === t ? function(e) {
return 1 - r(1 - e)
}
: EE(r);
return i.config = function(n) {
return e(t, n)
}
,
i
};
oC("Linear,Quad,Cubic,Quart,Quint,Strong", (function(e, t) {
var n = t < 5 ? t + 1 : t;
CE(e + ",Power" + (n - 1), t ? function(e) {
return Math.pow(e, n)
}
: function(e) {
return e
}
, (function(e) {
return 1 - Math.pow(1 - e, n)
}
), (function(e) {
return e < .5 ? Math.pow(2 * e, n) / 2 : 1 - Math.pow(2 * (1 - e), n) / 2
}
))
}
)),
xE.Linear.easeNone = xE.none = xE.Linear.easeIn,
CE("Elastic", TE("in"), TE("out"), TE()),
function(e, t) {
var n = 1 / t
, r = 2 * n
, i = 2.5 * n
, s = function(s) {
return s < n ? e * s * s : s < r ? e * Math.pow(s - 1.5 / t, 2) + .75 : s < i ? e * (s -= 2.25 / t) * s + .9375 : e * Math.pow(s - 2.625 / t, 2) + .984375
};
CE("Bounce", (function(e) {
return 1 - s(1 - e)
}
), s)
}(7.5625, 2.75),
CE("Expo", (function(e) {
return e ? Math.pow(2, 10 * (e - 1)) : 0
}
)),
CE("Circ", (function(e) {
return -(bM(1 - e * e) - 1)
}
)),
CE("Sine", (function(e) {
return 1 === e ? 1 : 1 - _M(e * yM)
}
)),
CE("Back", RE("in"), RE("out"), RE()),
xE.SteppedEase = xE.steps = UM.SteppedEase = {
config: function(e, t) {
void 0 === e && (e = 1);
var n = 1 / e
, r = e + (t ? 0 : 1)
, i = t ? 1 : 0;
return function(e) {
return ((r * VC(0, .99999999, e) | 0) + i) * n
}
}
},
fM.ease = xE["quad.out"],
oC("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt", (function(e) {
return rC += e + "," + e + "Params,"
}
));
var BE = function(e, t) {
this.id = xM++,
e._gsap = this,
this.target = e,
this.harness = t,
this.get = t ? t.get : aC,
this.set = t ? t.getSetter : KE
}
, PE = function() {
function e(e) {
this.vars = e,
this._delay = +e.delay || 0,
(this._repeat = e.repeat === 1 / 0 ? -2 : e.repeat || 0) && (this._rDelay = e.repeatDelay || 0,
this._yoyo = !!e.yoyo || !!e.yoyoEase),
this._ts = 1,
FC(this, +e.duration, 1, 1),
this.data = e.data,
iM && (this._ctx = iM,
iM.data.push(this)),
hM || vE.wake()
}
var t = e.prototype;
return t.delay = function(e) {
return e || 0 === e ? (this.parent && this.parent.smoothChildTiming && this.startTime(this._start + e - this._delay),
this._delay = e,
this) : this._delay
}
,
t.duration = function(e) {
return arguments.length ? this.totalDuration(this._repeat > 0 ? e + (e + this._rDelay) * this._repeat : e) : this.totalDuration() && this._dur
}
,
t.totalDuration = function(e) {
return arguments.length ? (this._dirty = 0,
FC(this, this._repeat < 0 ? e : (e - this._repeat * this._rDelay) / (this._repeat + 1))) : this._tDur
}
,
t.totalTime = function(e, t) {
if (yE(),
!arguments.length)
return this._tTime;
var n = this._dp;
if (n && n.smoothChildTiming && this._ts) {
for (PC(this, e),
!n._dp || n.parent || kC(n, this); n && n.parent; )
n.parent._time !== n._start + (n._ts >= 0 ? n._tTime / n._ts : (n.totalDuration() - n._tTime) / -n._ts) && n.totalTime(n._tTime, !0),
n = n.parent;
!this.parent && this._dp.autoRemoveChildren && (this._ts > 0 && e < this._tDur || this._ts < 0 && e > 0 || !this._tDur && !e) && LC(this._dp, this, this._start - this._delay)
}
return (this._tTime !== e || !this._dur && !t || this._initted && Math.abs(this._zTime) === gM || !e && !this._initted && (this.add || this._ptLookup)) && (this._ts || (this._pTime = e),
pC(this, e, t)),
this
}
,
t.time = function(e, t) {
return arguments.length ? this.totalTime(Math.min(this.totalDuration(), e + EC(this)) % (this._dur + this._rDelay) || (e ? this._dur : 0), t) : this._time
}
,
t.totalProgress = function(e, t) {
return arguments.length ? this.totalTime(this.totalDuration() * e, t) : this.totalDuration() ? Math.min(1, this._tTime / this._tDur) : this.rawTime() > 0 ? 1 : 0
}
,
t.progress = function(e, t) {
return arguments.length ? this.totalTime(this.duration() * (!this._yoyo || 1 & this.iteration() ? e : 1 - e) + EC(this), t) : this.duration() ? Math.min(1, this._time / this._dur) : this.rawTime() > 0 ? 1 : 0
}
,
t.iteration = function(e, t) {
var n = this.duration() + this._rDelay;
return arguments.length ? this.totalTime(this._time + (e - 1) * n, t) : this._repeat ? TC(this._tTime, n) + 1 : 1
}
,
t.timeScale = function(e, t) {
if (!arguments.length)
return -1e-8 === this._rts ? 0 : this._rts;
if (this._rts === e)
return this;
var n = this.parent && this._ts ? RC(this.parent._time, this) : this._tTime;
return this._rts = +e || 0,
this._ts = this._ps || -1e-8 === e ? 0 : this._rts,
this.totalTime(VC(-Math.abs(this._delay), this._tDur, n), !1 !== t),
BC(this),
function(e) {
for (var t = e.parent; t && t.parent; )
t._dirty = 1,
t.totalDuration(),
t = t.parent;
return e
}(this)
}
,
t.paused = function(e) {
return arguments.length ? (this._ps !== e && (this._ps = e,
e ? (this._pTime = this._tTime || Math.max(-this._delay, this.rawTime()),
this._ts = this._act = 0) : (yE(),
this._ts = this._rts,
this.totalTime(this.parent && !this.parent.smoothChildTiming ? this.rawTime() : this._tTime || this._pTime, 1 === this.progress() && Math.abs(this._zTime) !== gM && (this._tTime -= gM)))),
this) : this._ps
}
,
t.startTime = function(e) {
if (arguments.length) {
this._start = e;
var t = this.parent || this._dp;
return t && (t._sort || !this.parent) && LC(t, this, e - this._delay),
this
}
return this._start
}
,
t.endTime = function(e) {
return this._start + (TM(e) ? this.totalDuration() : this.duration()) / Math.abs(this._ts || 1)
}
,
t.rawTime = function(e) {
var t = this.parent || this._dp;
return t ? e && (!this._ts || this._repeat && this._time && this.totalProgress() < 1) ? this._tTime % (this._dur + this._rDelay) : this._ts ? RC(t.rawTime(e), this) : this._tTime : this._tTime
}
,
t.revert = function(e) {
void 0 === e && (e = qM);
var t = rM;
return rM = e,
(this._initted || this._startAt) && (this.timeline && this.timeline.revert(e),
this.totalTime(-.01, e.suppressEvents)),
"nested" !== this.data && !1 !== e.kill && this.kill(),
rM = t,
this
}
,
t.globalTime = function(e) {
for (var t = this, n = arguments.length ? e : t.rawTime(); t; )
n = t._start + n / (Math.abs(t._ts) || 1),
t = t._dp;
return !this.parent && this._sat ? this._sat.globalTime(e) : n
}
,
t.repeat = function(e) {
return arguments.length ? (this._repeat = e === 1 / 0 ? -2 : e,
OC(this)) : -2 === this._repeat ? 1 / 0 : this._repeat
}
,
t.repeatDelay = function(e) {
if (arguments.length) {
var t = this._time;
return this._rDelay = e,
OC(this),
t ? this.time(t) : this
}
return this._rDelay
}
,
t.yoyo = function(e) {
return arguments.length ? (this._yoyo = e,
this) : this._yoyo
}
,
t.seek = function(e, t) {
return this.totalTime(zC(this, e), TM(t))
}
,
t.restart = function(e, t) {
return this.play().totalTime(e ? -this._delay : 0, TM(t))
}
,
t.play = function(e, t) {
return null != e && this.seek(e, t),
this.reversed(!1).paused(!1)
}
,
t.reverse = function(e, t) {
return null != e && this.seek(e || this.totalDuration(), t),
this.reversed(!0).paused(!1)
}
,
t.pause = function(e, t) {
return null != e && this.seek(e, t),
this.paused(!0)
}
,
t.resume = function() {
return this.paused(!1)
}
,
t.reversed = function(e) {
return arguments.length ? (!!e !== this.reversed() && this.timeScale(-this._rts || (e ? -1e-8 : 0)),
this) : this._rts < 0
}
,
t.invalidate = function() {
return this._initted = this._act = 0,
this._zTime = -1e-8,
this
}
,
t.isActive = function() {
var e, t = this.parent || this._dp, n = this._start;
return !(t && !(this._ts && this._initted && t.isActive() && (e = t.rawTime(!0)) >= n && e < this.endTime(!0) - gM))
}
,
t.eventCallback = function(e, t, n) {
var r = this.vars;
return arguments.length > 1 ? (t ? (r[e] = t,
n && (r[e + "Params"] = n),
"onUpdate" === e && (this._onUpdate = t)) : delete r[e],
this) : r[e]
}
,
t.then = function(e) {
var t = this;
return new Promise((function(n) {
var r = AM(e) ? e : mC
, i = function() {
var e = t.then;
t.then = null,
AM(r) && (r = r(t)) && (r.then || r === t) && (t.then = e),
n(r),
t.then = e
};
t._initted && 1 === t.totalProgress() && t._ts >= 0 || !t._tTime && t._ts < 0 ? i() : t._prom = i
}
))
}
,
t.kill = function() {
aE(this)
}
,
e
}();
gC(PE.prototype, {
_time: 0,
_start: 0,
_end: 0,
_tTime: 0,
_tDur: 0,
_dirty: 0,
_repeat: 0,
_yoyo: !1,
parent: null,
_initted: !1,
_rDelay: 0,
_ts: 1,
_dp: 0,
ratio: 0,
_zTime: -1e-8,
_prom: 0,
_ps: !1,
_rts: 1
});
var kE = function(e) {
function t(t, n) {
var r;
return void 0 === t && (t = {}),
(r = e.call(this, t) || this).labels = {},
r.smoothChildTiming = !!t.smoothChildTiming,
r.autoRemoveChildren = !!t.autoRemoveChildren,
r._sort = TM(t.sortChildren),
sM && LC(t.parent || sM, eM(r), n),
t.reversed && r.reverse(),
t.paused && r.paused(!0),
t.scrollTrigger && IC(eM(r), t.scrollTrigger),
r
}
tM(t, e);
var n = t.prototype;
return n.to = function(e, t, n) {
return GC(0, arguments, this),
this
}
,
n.from = function(e, t, n) {
return GC(1, arguments, this),
this
}
,
n.fromTo = function(e, t, n, r) {
return GC(2, arguments, this),
this
}
,
n.set = function(e, t, n) {
return t.duration = 0,
t.parent = this,
bC(t).repeatDelay || (t.repeat = 0),
t.immediateRender = !!t.immediateRender,
new HE(e,t,zC(this, n),1),
this
}
,
n.call = function(e, t, n) {
return LC(this, HE.delayedCall(0, e, t), n)
}
,
n.staggerTo = function(e, t, n, r, i, s, a) {
return n.duration = t,
n.stagger = n.stagger || r,
n.onComplete = s,
n.onCompleteParams = a,
n.parent = this,
new HE(e,n,zC(this, i)),
this
}
,
n.staggerFrom = function(e, t, n, r, i, s, a) {
return n.runBackwards = 1,
bC(n).immediateRender = TM(n.immediateRender),
this.staggerTo(e, t, n, r, i, s, a)
}
,
n.staggerFromTo = function(e, t, n, r, i, s, a, o) {
return r.startAt = n,
bC(r).immediateRender = TM(r.immediateRender),
this.staggerTo(e, t, r, i, s, a, o)
}
,
n.render = function(e, t, n) {
var r, i, s, a, o, l, c, u, d, h, p, f, m = this._time, g = this._dirty ? this.totalDuration() : this._tDur, v = this._dur, y = e <= 0 ? 0 : cC(e), x = this._zTime < 0 !== e < 0 && (this._initted || !v);
if (this !== sM && y > g && e >= 0 && (y = g),
y !== this._tTime || n || x) {
if (m !== this._time && v && (y += this._time - m,
e += this._time - m),
r = y,
d = this._start,
l = !(u = this._ts),
x && (v || (m = this._zTime),
(e || !t) && (this._zTime = e)),
this._repeat) {
if (p = this._yoyo,
o = v + this._rDelay,
this._repeat < -1 && e < 0)
return this.totalTime(100 * o + e, t, n);
if (r = cC(y % o),
y === g ? (a = this._repeat,
r = v) : ((a = ~~(y / o)) && a === y / o && (r = v,
a--),
r > v && (r = v)),
h = TC(this._tTime, o),
!m && this._tTime && h !== a && this._tTime - h * o - this._dur <= 0 && (h = a),
p && 1 & a && (r = v - r,
f = 1),
a !== h && !this._lock) {
var b = p && 1 & h
, _ = b === (p && 1 & a);
if (a < h && (b = !b),
m = b ? 0 : y % v ? v : y,
this._lock = 1,
this.render(m || (f ? 0 : cC(a * o)), t, !v)._lock = 0,
this._tTime = y,
!t && this.parent && sE(this, "onRepeat"),
this.vars.repeatRefresh && !f && (this.invalidate()._lock = 1),
m && m !== this._time || l !== !this._ts || this.vars.onRepeat && !this.parent && !this._act)
return this;
if (v = this._dur,
g = this._tDur,
_ && (this._lock = 2,
m = b ? v : -1e-4,
this.render(m, !0),
this.vars.repeatRefresh && !f && this.invalidate()),
this._lock = 0,
!this._ts && !l)
return this;
AE(this, f)
}
}
if (this._hasPause && !this._forcing && this._lock < 2 && (c = function(e, t, n) {
var r;
if (n > t)
for (r = e._first; r && r._start <= n; ) {
if ("isPause" === r.data && r._start > t)
return r;
r = r._next
}
else
for (r = e._last; r && r._start >= n; ) {
if ("isPause" === r.data && r._start < t)
return r;
r = r._prev
}
}(this, cC(m), cC(r)),
c && (y -= r - (r = c._start))),
this._tTime = y,
this._time = r,
this._act = !u,
this._initted || (this._onUpdate = this.vars.onUpdate,
this._initted = 1,
this._zTime = e,
m = 0),
!m && r && !t && !a && (sE(this, "onStart"),
this._tTime !== y))
return this;
if (r >= m && e >= 0)
for (i = this._first; i; ) {
if (s = i._next,
(i._act || r >= i._start) && i._ts && c !== i) {
if (i.parent !== this)
return this.render(e, t, n);
if (i.render(i._ts > 0 ? (r - i._start) * i._ts : (i._dirty ? i.totalDuration() : i._tDur) + (r - i._start) * i._ts, t, n),
r !== this._time || !this._ts && !l) {
c = 0,
s && (y += this._zTime = -1e-8);
break
}
}
i = s
}
else {
i = this._last;
for (var w = e < 0 ? e : r; i; ) {
if (s = i._prev,
(i._act || w <= i._end) && i._ts && c !== i) {
if (i.parent !== this)
return this.render(e, t, n);
if (i.render(i._ts > 0 ? (w - i._start) * i._ts : (i._dirty ? i.totalDuration() : i._tDur) + (w - i._start) * i._ts, t, n || rM && (i._initted || i._startAt)),
r !== this._time || !this._ts && !l) {
c = 0,
s && (y += this._zTime = w ? -1e-8 : gM);
break
}
}
i = s
}
}
if (c && !t && (this.pause(),
c.render(r >= m ? 0 : -1e-8)._zTime = r >= m ? 1 : -1,
this._ts))
return this._start = d,
BC(this),
this.render(e, t, n);
this._onUpdate && !t && sE(this, "onUpdate", !0),
(y === g && this._tTime >= this.totalDuration() || !y && m) && (d !== this._start && Math.abs(u) === Math.abs(this._ts) || this._lock || ((e || !v) && (y === g && this._ts > 0 || !y && this._ts < 0) && SC(this, 1),
t || e < 0 && !m || !y && !m && g || (sE(this, y === g && e >= 0 ? "onComplete" : "onReverseComplete", !0),
this._prom && !(y < g && this.timeScale() > 0) && this._prom())))
}
return this
}
,
n.add = function(e, t) {
var n = this;
if (MM(t) || (t = zC(this, t, e)),
!(e instanceof PE)) {
if (kM(e))
return e.forEach((function(e) {
return n.add(e, t)
}
)),
this;
if (SM(e))
return this.addLabel(e, t);
if (!AM(e))
return this;
e = HE.delayedCall(0, e)
}
return this !== e ? LC(this, e, t) : this
}
,
n.getChildren = function(e, t, n, r) {
void 0 === e && (e = !0),
void 0 === t && (t = !0),
void 0 === n && (n = !0),
void 0 === r && (r = -mM);
for (var i = [], s = this._first; s; )
s._start >= r && (s instanceof HE ? t && i.push(s) : (n && i.push(s),
e && i.push.apply(i, s.getChildren(!0, t, n)))),
s = s._next;
return i
}
,
n.getById = function(e) {
for (var t = this.getChildren(1, 1, 1), n = t.length; n--; )
if (t[n].vars.id === e)
return t[n]
}
,
n.remove = function(e) {
return SM(e) ? this.removeLabel(e) : AM(e) ? this.killTweensOf(e) : (wC(this, e),
e === this._recent && (this._recent = this._last),
AC(this))
}
,
n.totalTime = function(t, n) {
return arguments.length ? (this._forcing = 1,
!this._dp && this._ts && (this._start = cC(vE.time - (this._ts > 0 ? t / this._ts : (this.totalDuration() - t) / -this._ts))),
e.prototype.totalTime.call(this, t, n),
this._forcing = 0,
this) : this._tTime
}
,
n.addLabel = function(e, t) {
return this.labels[e] = zC(this, t),
this
}
,
n.removeLabel = function(e) {
return delete this.labels[e],
this
}
,
n.addPause = function(e, t, n) {
var r = HE.delayedCall(0, t || JM, n);
return r.data = "isPause",
this._hasPause = 1,
LC(this, r, zC(this, e))
}
,
n.removePause = function(e) {
var t = this._first;
for (e = zC(this, e); t; )
t._start === e && "isPause" === t.data && SC(t),
t = t._next
}
,
n.killTweensOf = function(e, t, n) {
for (var r = this.getTweensOf(e, n), i = r.length; i--; )
LE !== r[i] && r[i].kill(e, t);
return this
}
,
n.getTweensOf = function(e, t) {
for (var n, r = [], i = KC(e), s = this._first, a = MM(t); s; )
s instanceof HE ? dC(s._targets, i) && (a ? (!LE || s._initted && s._ts) && s.globalTime(0) <= t && s.globalTime(s.totalDuration()) > t : !t || s.isActive()) && r.push(s) : (n = s.getTweensOf(i, t)).length && r.push.apply(r, n),
s = s._next;
return r
}
,
n.tweenTo = function(e, t) {
t = t || {};
var n, r = this, i = zC(r, e), s = t, a = s.startAt, o = s.onStart, l = s.onStartParams, c = s.immediateRender, u = HE.to(r, gC({
ease: t.ease || "none",
lazy: !1,
immediateRender: !1,
time: i,
overwrite: "auto",
duration: t.duration || Math.abs((i - (a && "time"in a ? a.time : r._time)) / r.timeScale()) || gM,
onStart: function() {
if (r.pause(),
!n) {
var e = t.duration || Math.abs((i - (a && "time"in a ? a.time : r._time)) / r.timeScale());
u._dur !== e && FC(u, e, 0, 1).render(u._time, !0, !0),
n = 1
}
o && o.apply(u, l || [])
}
}, t));
return c ? u.render(0) : u
}
,
n.tweenFromTo = function(e, t, n) {
return this.tweenTo(t, gC({
startAt: {
time: zC(this, e)
}
}, n))
}
,
n.recent = function() {
return this._recent
}
,
n.nextLabel = function(e) {
return void 0 === e && (e = this._time),
iE(this, zC(this, e))
}
,
n.previousLabel = function(e) {
return void 0 === e && (e = this._time),
iE(this, zC(this, e), 1)
}
,
n.currentLabel = function(e) {
return arguments.length ? this.seek(e, !0) : this.previousLabel(this._time + gM)
}
,
n.shiftChildren = function(e, t, n) {
void 0 === n && (n = 0);
for (var r, i = this._first, s = this.labels; i; )
i._start >= n && (i._start += e,
i._end += e),
i = i._next;
if (t)
for (r in s)
s[r] >= n && (s[r] += e);
return AC(this)
}
,
n.invalidate = function(t) {
var n = this._first;
for (this._lock = 0; n; )
n.invalidate(t),
n = n._next;
return e.prototype.invalidate.call(this, t)
}
,
n.clear = function(e) {
void 0 === e && (e = !0);
for (var t, n = this._first; n; )
t = n._next,
this.remove(n),
n = t;
return this._dp && (this._time = this._tTime = this._pTime = 0),
e && (this.labels = {}),
AC(this)
}
,
n.totalDuration = function(e) {
var t, n, r, i = 0, s = this, a = s._last, o = mM;
if (arguments.length)
return s.timeScale((s._repeat < 0 ? s.duration() : s.totalDuration()) / (s.reversed() ? -e : e));
if (s._dirty) {
for (r = s.parent; a; )
t = a._prev,
a._dirty && a.totalDuration(),
(n = a._start) > o && s._sort && a._ts && !s._lock ? (s._lock = 1,
LC(s, a, n - a._delay, 1)._lock = 0) : o = n,
n < 0 && a._ts && (i -= n,
(!r && !s._dp || r && r.smoothChildTiming) && (s._start += n / s._ts,
s._time -= n,
s._tTime -= n),
s.shiftChildren(-n, !1, -Infinity),
o = 0),
a._end > i && a._ts && (i = a._end),
a = t;
FC(s, s === sM && s._time > i ? s._time : i, 1, 1),
s._dirty = 0
}
return s._tDur
}
,
t.updateRoot = function(e) {
if (sM._ts && (pC(sM, RC(e, sM)),
uM = vE.frame),
vE.frame >= tC) {
tC += pM.autoSleep || 120;
var t = sM._first;
if ((!t || !t._ts) && pM.autoSleep && vE._listeners.length < 2) {
for (; t && !t._ts; )
t = t._next;
t || vE.sleep()
}
}
}
,
t
}(PE);
gC(kE.prototype, {
_lock: 0,
_hasPause: 0,
_forcing: 0
});
var LE, IE, NE = function(e, t, n, r, i, s, a) {
var o, l, c, u, d, h, p, f, m = new rT(this._pt,e,t,0,1,QE,null,i), g = 0, v = 0;
for (m.b = n,
m.e = r,
n += "",
(p = ~(r += "").indexOf("random(")) && (r = nE(r)),
s && (s(f = [n, r], e, t),
n = f[0],
r = f[1]),
l = n.match(DM) || []; o = DM.exec(r); )
u = o[0],
d = r.substring(g, o.index),
c ? c = (c + 1) % 5 : "rgba(" === d.substr(-5) && (c = 1),
u !== l[v++] && (h = parseFloat(l[v - 1]) || 0,
m._pt = {
_next: m._pt,
p: d || 1 === v ? d : ",",
s: h,
c: "=" === u.charAt(1) ? uC(h, u) - h : parseFloat(u) - h,
m: c && c < 4 ? Math.round : 0
},
g = DM.lastIndex);
return m.c = g < r.length ? r.substring(g, r.length) : "",
m.fp = a,
(jM.test(r) || p) && (m.e = 0),
this._pt = m,
m
}, DE = function(e, t, n, r, i, s, a, o, l, c) {
AM(r) && (r = r(i || 0, e, s));
var u, d = e[t], h = "get" !== n ? n : AM(d) ? l ? e[t.indexOf("set") || !AM(e["get" + t.substr(3)]) ? t : "get" + t.substr(3)](l) : e[t]() : d, p = AM(d) ? l ? JE : WE : VE;
if (SM(r) && (~r.indexOf("random(") && (r = nE(r)),
"=" === r.charAt(1) && ((u = uC(h, r) + (WC(h) || 0)) || 0 === u) && (r = u)),
!c || h !== r || IE)
return isNaN(h * r) || "" === r ? (!d && !(t in e) && HM(t, r),
NE.call(this, e, t, h, r, p, o || pM.stringFilter, l)) : (u = new rT(this._pt,e,t,+h || 0,r - (h || 0),"boolean" === typeof d ? YE : qE,0,p),
l && (u.fp = l),
a && u.modifier(a, this, e),
this._pt = u)
}, jE = function(e, t, n, r, i, s) {
var a, o, l, c;
if ($M[e] && !1 !== (a = new $M[e]).init(i, a.rawVars ? t[e] : function(e, t, n, r, i) {
if (AM(e) && (e = UE(e, i, t, n, r)),
!EM(e) || e.style && e.nodeType || kM(e) || PM(e))
return SM(e) ? UE(e, i, t, n, r) : e;
var s, a = {};
for (s in e)
a[s] = UE(e[s], i, t, n, r);
return a
}(t[e], r, i, s, n), n, r, s) && (n._pt = o = new rT(n._pt,i,e,0,1,a.render,a,0,a.priority),
n !== dM))
for (l = n._ptLookup[n._targets.indexOf(i)],
c = a._props.length; c--; )
l[a._props[c]] = o;
return a
}, FE = function e(t, n, r) {
var i, s, a, o, l, c, u, d, h, p, f, m, g, v = t.vars, y = v.ease, x = v.startAt, b = v.immediateRender, _ = v.lazy, w = v.onUpdate, S = v.runBackwards, A = v.yoyoEase, M = v.keyframes, C = v.autoRevert, E = t._dur, T = t._startAt, R = t._targets, B = t.parent, P = B && "nested" === B.data ? B.vars.targets : R, k = "auto" === t._overwrite && !nM, L = t.timeline;
if (L && (!M || !y) && (y = "none"),
t._ease = ME(y, fM.ease),
t._yEase = A ? SE(ME(!0 === A ? y : A, fM.ease)) : 0,
A && t._yoyo && !t._repeat && (A = t._yEase,
t._yEase = t._ease,
t._ease = A),
t._from = !L && !!v.runBackwards,
!L || M && !v.stagger) {
if (m = (d = R[0] ? sC(R[0]).harness : 0) && v[d.prop],
i = xC(v, YM),
T && (T._zTime < 0 && T.progress(1),
n < 0 && S && b && !C ? T.render(-1, !0) : T.revert(S && E ? KM : XM),
T._lazy = 0),
x) {
if (SC(t._startAt = HE.set(R, gC({
data: "isStart",
overwrite: !1,
parent: B,
immediateRender: !0,
lazy: !T && TM(_),
startAt: null,
delay: 0,
onUpdate: w && function() {
return sE(t, "onUpdate")
}
,
stagger: 0
}, x))),
t._startAt._dp = 0,
t._startAt._sat = t,
n < 0 && (rM || !b && !C) && t._startAt.revert(KM),
b && E && n <= 0 && r <= 0)
return void (n && (t._zTime = n))
} else if (S && E && !T)
if (n && (b = !1),
a = gC({
overwrite: !1,
data: "isFromStart",
lazy: b && !T && TM(_),
immediateRender: b,
stagger: 0,
parent: B
}, i),
m && (a[d.prop] = m),
SC(t._startAt = HE.set(R, a)),
t._startAt._dp = 0,
t._startAt._sat = t,
n < 0 && (rM ? t._startAt.revert(KM) : t._startAt.render(-1, !0)),
t._zTime = n,
b) {
if (!n)
return
} else
e(t._startAt, gM, gM);
for (t._pt = t._ptCache = 0,
_ = E && TM(_) || _ && !E,
s = 0; s < R.length; s++) {
if (u = (l = R[s])._gsap || iC(R)[s]._gsap,
t._ptLookup[s] = p = {},
ZM[u.id] && QM.length && hC(),
f = P === R ? s : P.indexOf(l),
d && !1 !== (h = new d).init(l, m || i, t, f, P) && (t._pt = o = new rT(t._pt,l,h.name,0,1,h.render,h,0,h.priority),
h._props.forEach((function(e) {
p[e] = o
}
)),
h.priority && (c = 1)),
!d || m)
for (a in i)
$M[a] && (h = jE(a, i, t, f, l, P)) ? h.priority && (c = 1) : p[a] = o = DE.call(t, l, a, "get", i[a], f, P, 0, v.stringFilter);
t._op && t._op[s] && t.kill(l, t._op[s]),
k && t._pt && (LE = t,
sM.killTweensOf(l, p, t.globalTime(n)),
g = !t.parent,
LE = 0),
t._pt && _ && (ZM[u.id] = 1)
}
c && nT(t),
t._onInit && t._onInit(t)
}
t._onUpdate = w,
t._initted = (!t._op || t._pt) && !g,
M && n <= 0 && L.render(mM, !0, !0)
}, OE = function(e, t, n, r) {
var i, s, a = t.ease || r || "power1.inOut";
if (kM(t))
s = n[e] || (n[e] = []),
t.forEach((function(e, n) {
return s.push({
t: n / (t.length - 1) * 100,
v: e,
e: a
})
}
));
else
for (i in t)
s = n[i] || (n[i] = []),
"ease" === i || s.push({
t: parseFloat(e),
v: t[i],
e: a
})
}, UE = function(e, t, n, r, i) {
return AM(e) ? e.call(t, n, r, i) : SM(e) && ~e.indexOf("random(") ? nE(e) : e
}, zE = rC + "repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert", GE = {};
oC(zE + ",id,stagger,delay,duration,paused,scrollTrigger", (function(e) {
return GE[e] = 1
}
));
var HE = function(e) {
function t(t, n, r, i) {
var s;
"number" === typeof n && (r.duration = n,
n = r,
r = null);
var a, o, l, c, u, d, h, p, f = (s = e.call(this, i ? n : bC(n)) || this).vars, m = f.duration, g = f.delay, v = f.immediateRender, y = f.stagger, x = f.overwrite, b = f.keyframes, _ = f.defaults, w = f.scrollTrigger, S = f.yoyoEase, A = n.parent || sM, M = (kM(t) || PM(t) ? MM(t[0]) : "length"in n) ? [t] : KC(t);
if (s._targets = M.length ? iC(M) : VM("GSAP target " + t + " not found. https://gsap.com", !pM.nullTargetWarn) || [],
s._ptLookup = [],
s._overwrite = x,
b || y || BM(m) || BM(g)) {
if (n = s.vars,
(a = s.timeline = new kE({
data: "nested",
defaults: _ || {},
targets: A && "nested" === A.data ? A.vars.targets : M
})).kill(),
a.parent = a._dp = eM(s),
a._start = 0,
y || BM(m) || BM(g)) {
if (c = M.length,
h = y && QC(y),
EM(y))
for (u in y)
~zE.indexOf(u) && (p || (p = {}),
p[u] = y[u]);
for (o = 0; o < c; o++)
(l = xC(n, GE)).stagger = 0,
S && (l.yoyoEase = S),
p && vC(l, p),
d = M[o],
l.duration = +UE(m, eM(s), o, d, M),
l.delay = (+UE(g, eM(s), o, d, M) || 0) - s._delay,
!y && 1 === c && l.delay && (s._delay = g = l.delay,
s._start += g,
l.delay = 0),
a.to(d, l, h ? h(o, d, M) : 0),
a._ease = xE.none;
a.duration() ? m = g = 0 : s.timeline = 0
} else if (b) {
bC(gC(a.vars.defaults, {
ease: "none"
})),
a._ease = ME(b.ease || n.ease || "none");
var C, E, T, R = 0;
if (kM(b))
b.forEach((function(e) {
return a.to(M, e, ">")
}
)),
a.duration();
else {
for (u in l = {},
b)
"ease" === u || "easeEach" === u || OE(u, b[u], l, b.easeEach);
for (u in l)
for (C = l[u].sort((function(e, t) {
return e.t - t.t
}
)),
R = 0,
o = 0; o < C.length; o++)
(T = {
ease: (E = C[o]).e,
duration: (E.t - (o ? C[o - 1].t : 0)) / 100 * m
})[u] = E.v,
a.to(M, T, R),
R += T.duration;
a.duration() < m && a.to({}, {
duration: m - a.duration()
})
}
}
m || s.duration(m = a.duration())
} else
s.timeline = 0;
return !0 !== x || nM || (LE = eM(s),
sM.killTweensOf(M),
LE = 0),
LC(A, eM(s), r),
n.reversed && s.reverse(),
n.paused && s.paused(!0),
(v || !m && !b && s._start === cC(A._time) && TM(v) && CC(eM(s)) && "nested" !== A.data) && (s._tTime = -1e-8,
s.render(Math.max(0, -g) || 0)),
w && IC(eM(s), w),
s
}
tM(t, e);
var n = t.prototype;
return n.render = function(e, t, n) {
var r, i, s, a, o, l, c, u, d, h = this._time, p = this._tDur, f = this._dur, m = e < 0, g = e > p - gM && !m ? p : e < gM ? 0 : e;
if (f) {
if (g !== this._tTime || !e || n || !this._initted && this._tTime || this._startAt && this._zTime < 0 !== m) {
if (r = g,
u = this.timeline,
this._repeat) {
if (a = f + this._rDelay,
this._repeat < -1 && m)
return this.totalTime(100 * a + e, t, n);
if (r = cC(g % a),
g === p ? (s = this._repeat,
r = f) : ((s = ~~(g / a)) && s === cC(g / a) && (r = f,
s--),
r > f && (r = f)),
(l = this._yoyo && 1 & s) && (d = this._yEase,
r = f - r),
o = TC(this._tTime, a),
r === h && !n && this._initted && s === o)
return this._tTime = g,
this;
s !== o && (u && this._yEase && AE(u, l),
this.vars.repeatRefresh && !l && !this._lock && this._time !== a && this._initted && (this._lock = n = 1,
this.render(cC(a * s), !0).invalidate()._lock = 0))
}
if (!this._initted) {
if (NC(this, m ? e : r, n, t, g))
return this._tTime = 0,
this;
if (h !== this._time && (!n || !this.vars.repeatRefresh || s === o))
return this;
if (f !== this._dur)
return this.render(e, t, n)
}
if (this._tTime = g,
this._time = r,
!this._act && this._ts && (this._act = 1,
this._lazy = 0),
this.ratio = c = (d || this._ease)(r / f),
this._from && (this.ratio = c = 1 - c),
r && !h && !t && !s && (sE(this, "onStart"),
this._tTime !== g))
return this;
for (i = this._pt; i; )
i.r(c, i.d),
i = i._next;
u && u.render(e < 0 ? e : u._dur * u._ease(r / this._dur), t, n) || this._startAt && (this._zTime = e),
this._onUpdate && !t && (m && MC(this, e, 0, n),
sE(this, "onUpdate")),
this._repeat && s !== o && this.vars.onRepeat && !t && this.parent && sE(this, "onRepeat"),
g !== this._tDur && g || this._tTime !== g || (m && !this._onUpdate && MC(this, e, 0, !0),
(e || !f) && (g === this._tDur && this._ts > 0 || !g && this._ts < 0) && SC(this, 1),
t || m && !h || !(g || h || l) || (sE(this, g === p ? "onComplete" : "onReverseComplete", !0),
this._prom && !(g < p && this.timeScale() > 0) && this._prom()))
}
} else
!function(e, t, n, r) {
var i, s, a, o = e.ratio, l = t < 0 || !t && (!e._start && DC(e) && (e._initted || !jC(e)) || (e._ts < 0 || e._dp._ts < 0) && !jC(e)) ? 0 : 1, c = e._rDelay, u = 0;
if (c && e._repeat && (u = VC(0, e._tDur, t),
s = TC(u, c),
e._yoyo && 1 & s && (l = 1 - l),
s !== TC(e._tTime, c) && (o = 1 - l,
e.vars.repeatRefresh && e._initted && e.invalidate())),
l !== o || rM || r || e._zTime === gM || !t && e._zTime) {
if (!e._initted && NC(e, t, r, n, u))
return;
for (a = e._zTime,
e._zTime = t || (n ? gM : 0),
n || (n = t && !a),
e.ratio = l,
e._from && (l = 1 - l),
e._time = 0,
e._tTime = u,
i = e._pt; i; )
i.r(l, i.d),
i = i._next;
t < 0 && MC(e, t, 0, !0),
e._onUpdate && !n && sE(e, "onUpdate"),
u && e._repeat && !n && e.parent && sE(e, "onRepeat"),
(t >= e._tDur || t < 0) && e.ratio === l && (l && SC(e, 1),
n || rM || (sE(e, l ? "onComplete" : "onReverseComplete", !0),
e._prom && e._prom()))
} else
e._zTime || (e._zTime = t)
}(this, e, t, n);
return this
}
,
n.targets = function() {
return this._targets
}
,
n.invalidate = function(t) {
return (!t || !this.vars.runBackwards) && (this._startAt = 0),
this._pt = this._op = this._onUpdate = this._lazy = this.ratio = 0,
this._ptLookup = [],
this.timeline && this.timeline.invalidate(t),
e.prototype.invalidate.call(this, t)
}
,
n.resetTo = function(e, t, n, r, i) {
hM || vE.wake(),
this._ts || this.play();
var s = Math.min(this._dur, (this._dp._time - this._start) * this._ts);
return this._initted || FE(this, s),
function(e, t, n, r, i, s, a, o) {
var l, c, u, d, h = (e._pt && e._ptCache || (e._ptCache = {}))[t];
if (!h)
for (h = e._ptCache[t] = [],
u = e._ptLookup,
d = e._targets.length; d--; ) {
if ((l = u[d][t]) && l.d && l.d._pt)
for (l = l.d._pt; l && l.p !== t && l.fp !== t; )
l = l._next;
if (!l)
return IE = 1,
e.vars[t] = "+=0",
FE(e, a),
IE = 0,
o ? VM(t + " not eligible for reset") : 1;
h.push(l)
}
for (d = h.length; d--; )
(l = (c = h[d])._pt || c).s = !r && 0 !== r || i ? l.s + (r || 0) + s * l.c : r,
l.c = n - l.s,
c.e && (c.e = lC(n) + WC(c.e)),
c.b && (c.b = l.s + WC(c.b))
}(this, e, t, n, r, this._ease(s / this._dur), s, i) ? this.resetTo(e, t, n, r, 1) : (PC(this, 0),
this.parent || _C(this._dp, this, "_first", "_last", this._dp._sort ? "_start" : 0),
this.render(0))
}
,
n.kill = function(e, t) {
if (void 0 === t && (t = "all"),
!e && (!t || "all" === t))
return this._lazy = this._pt = 0,
this.parent ? aE(this) : this;
if (this.timeline) {
var n = this.timeline.totalDuration();
return this.timeline.killTweensOf(e, t, LE && !0 !== LE.vars.overwrite)._first || aE(this),
this.parent && n !== this.timeline.totalDuration() && FC(this, this._dur * this.timeline._tDur / n, 0, 1),
this
}
var r, i, s, a, o, l, c, u = this._targets, d = e ? KC(e) : u, h = this._ptLookup, p = this._pt;
if ((!t || "all" === t) && function(e, t) {
for (var n = e.length, r = n === t.length; r && n-- && e[n] === t[n]; )
;
return n < 0
}(u, d))
return "all" === t && (this._pt = 0),
aE(this);
for (r = this._op = this._op || [],
"all" !== t && (SM(t) && (o = {},
oC(t, (function(e) {
return o[e] = 1
}
)),
t = o),
t = function(e, t) {
var n, r, i, s, a = e[0] ? sC(e[0]).harness : 0, o = a && a.aliases;
if (!o)
return t;
for (r in n = vC({}, t),
o)
if (r in n)
for (i = (s = o[r].split(",")).length; i--; )
n[s[i]] = n[r];
return n
}(u, t)),
c = u.length; c--; )
if (~d.indexOf(u[c]))
for (o in i = h[c],
"all" === t ? (r[c] = t,
a = i,
s = {}) : (s = r[c] = r[c] || {},
a = t),
a)
(l = i && i[o]) && ("kill"in l.d && !0 !== l.d.kill(o) || wC(this, l, "_pt"),
delete i[o]),
"all" !== s && (s[o] = 1);
return this._initted && !this._pt && p && aE(this),
this
}
,
t.to = function(e, n) {
return new t(e,n,arguments[2])
}
,
t.from = function(e, t) {
return GC(1, arguments)
}
,
t.delayedCall = function(e, n, r, i) {
return new t(n,0,{
immediateRender: !1,
lazy: !1,
overwrite: !1,
delay: e,
onComplete: n,
onReverseComplete: n,
onCompleteParams: r,
onReverseCompleteParams: r,
callbackScope: i
})
}
,
t.fromTo = function(e, t, n) {
return GC(2, arguments)
}
,
t.set = function(e, n) {
return n.duration = 0,
n.repeatDelay || (n.repeat = 0),
new t(e,n)
}
,
t.killTweensOf = function(e, t, n) {
return sM.killTweensOf(e, t, n)
}
,
t
}(PE);
gC(HE.prototype, {
_targets: [],
_lazy: 0,
_startAt: 0,
_op: 0,
_onInit: 0
}),
oC("staggerTo,staggerFrom,staggerFromTo", (function(e) {
HE[e] = function() {
var t = new kE
, n = JC.call(arguments, 0);
return n.splice("staggerFromTo" === e ? 5 : 4, 0, 0),
t[e].apply(t, n)
}
}
));
var VE = function(e, t, n) {
return e[t] = n
}
, WE = function(e, t, n) {
return e[t](n)
}
, JE = function(e, t, n, r) {
return e[t](r.fp, n)
}
, XE = function(e, t, n) {
return e.setAttribute(t, n)
}
, KE = function(e, t) {
return AM(e[t]) ? WE : CM(e[t]) && e.setAttribute ? XE : VE
}
, qE = function(e, t) {
return t.set(t.t, t.p, Math.round(1e6 * (t.s + t.c * e)) / 1e6, t)
}
, YE = function(e, t) {
return t.set(t.t, t.p, !!(t.s + t.c * e), t)
}
, QE = function(e, t) {
var n = t._pt
, r = "";
if (!e && t.b)
r = t.b;
else if (1 === e && t.e)
r = t.e;
else {
for (; n; )
r = n.p + (n.m ? n.m(n.s + n.c * e) : Math.round(1e4 * (n.s + n.c * e)) / 1e4) + r,
n = n._next;
r += t.c
}
t.set(t.t, t.p, r, t)
}
, ZE = function(e, t) {
for (var n = t._pt; n; )
n.r(e, n.d),
n = n._next
}
, $E = function(e, t, n, r) {
for (var i, s = this._pt; s; )
i = s._next,
s.p === r && s.modifier(e, t, n),
s = i
}
, eT = function(e) {
for (var t, n, r = this._pt; r; )
n = r._next,
r.p === e && !r.op || r.op === e ? wC(this, r, "_pt") : r.dep || (t = 1),
r = n;
return !t
}
, tT = function(e, t, n, r) {
r.mSet(e, t, r.m.call(r.tween, n, r.mt), r)
}
, nT = function(e) {
for (var t, n, r, i, s = e._pt; s; ) {
for (t = s._next,
n = r; n && n.pr > s.pr; )
n = n._next;
(s._prev = n ? n._prev : i) ? s._prev._next = s : r = s,
(s._next = n) ? n._prev = s : i = s,
s = t
}
e._pt = r
}
, rT = function() {
function e(e, t, n, r, i, s, a, o, l) {
this.t = t,
this.s = r,
this.c = i,
this.p = n,
this.r = s || qE,
this.d = a || this,
this.set = o || VE,
this.pr = l || 0,
this._next = e,
e && (e._prev = this)
}
return e.prototype.modifier = function(e, t, n) {
this.mSet = this.mSet || this.set,
this.set = tT,
this.m = e,
this.mt = n,
this.tween = t
}
,
e
}();
oC(rC + "parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger", (function(e) {
return YM[e] = 1
}
)),
UM.TweenMax = UM.TweenLite = HE,
UM.TimelineLite = UM.TimelineMax = kE,
sM = new kE({
sortChildren: !1,
defaults: fM,
autoRemoveChildren: !0,
id: "root",
smoothChildTiming: !0
}),
pM.stringFilter = function(e) {
var t, n = e.join(" ");
if (mE.lastIndex = 0,
mE.test(n))
return t = gE.test(n),
e[1] = fE(e[1], t),
e[0] = fE(e[0], t, pE(e[1])),
!0
}
;
var iT = []
, sT = {}
, aT = []
, oT = 0
, lT = 0
, cT = function(e) {
return (sT[e] || aT).map((function(e) {
return e()
}
))
}
, uT = function() {
var e = Date.now()
, t = [];
e - oT > 2 && (cT("matchMediaInit"),
iT.forEach((function(e) {
var n, r, i, s, a = e.queries, o = e.conditions;
for (r in a)
(n = aM.matchMedia(a[r]).matches) && (i = 1),
n !== o[r] && (o[r] = n,
s = 1);
s && (e.revert(),
i && t.push(e))
}
)),
cT("matchMediaRevert"),
t.forEach((function(e) {
return e.onMatch(e, (function(t) {
return e.add(null, t)
}
))
}
)),
oT = e,
cT("matchMedia"))
}
, dT = function() {
function e(e, t) {
this.selector = t && qC(t),
this.data = [],
this._r = [],
this.isReverted = !1,
this.id = lT++,
e && this.add(e)
}
var t = e.prototype;
return t.add = function(e, t, n) {
AM(e) && (n = t,
t = e,
e = AM);
var r = this
, i = function() {
var e, i = iM, s = r.selector;
return i && i !== r && i.data.push(r),
n && (r.selector = qC(n)),
iM = r,
e = t.apply(r, arguments),
AM(e) && r._r.push(e),
iM = i,
r.selector = s,
r.isReverted = !1,
e
};
return r.last = i,
e === AM ? i(r, (function(e) {
return r.add(null, e)
}
)) : e ? r[e] = i : i
}
,
t.ignore = function(e) {
var t = iM;
iM = null,
e(this),
iM = t
}
,
t.getTweens = function() {
var t = [];
return this.data.forEach((function(n) {
return n instanceof e ? t.push.apply(t, n.getTweens()) : n instanceof HE && !(n.parent && "nested" === n.parent.data) && t.push(n)
}
)),
t
}
,
t.clear = function() {
this._r.length = this.data.length = 0
}
,
t.kill = function(e, t) {
var n = this;
if (e ? function() {
for (var t, r = n.getTweens(), i = n.data.length; i--; )
"isFlip" === (t = n.data[i]).data && (t.revert(),
t.getChildren(!0, !0, !1).forEach((function(e) {
return r.splice(r.indexOf(e), 1)
}
)));
for (r.map((function(e) {
return {
g: e._dur || e._delay || e._sat && !e._sat.vars.immediateRender ? e.globalTime(0) : -1 / 0,
t: e
}
}
)).sort((function(e, t) {
return t.g - e.g || -1 / 0
}
)).forEach((function(t) {
return t.t.revert(e)
}
)),
i = n.data.length; i--; )
(t = n.data[i])instanceof kE ? "nested" !== t.data && (t.scrollTrigger && t.scrollTrigger.revert(),
t.kill()) : !(t instanceof HE) && t.revert && t.revert(e);
n._r.forEach((function(t) {
return t(e, n)
}
)),
n.isReverted = !0
}() : this.data.forEach((function(e) {
return e.kill && e.kill()
}
)),
this.clear(),
t)
for (var r = iT.length; r--; )
iT[r].id === this.id && iT.splice(r, 1)
}
,
t.revert = function(e) {
this.kill(e || {})
}
,
e
}()
, hT = function() {
function e(e) {
this.contexts = [],
this.scope = e,
iM && iM.data.push(this)
}
var t = e.prototype;
return t.add = function(e, t, n) {
EM(e) || (e = {
matches: e
});
var r, i, s, a = new dT(0,n || this.scope), o = a.conditions = {};
for (i in iM && !a.selector && (a.selector = iM.selector),
this.contexts.push(a),
t = a.add("onMatch", t),
a.queries = e,
e)
"all" === i ? s = 1 : (r = aM.matchMedia(e[i])) && (iT.indexOf(a) < 0 && iT.push(a),
(o[i] = r.matches) && (s = 1),
r.addListener ? r.addListener(uT) : r.addEventListener("change", uT));
return s && t(a, (function(e) {
return a.add(null, e)
}
)),
this
}
,
t.revert = function(e) {
this.kill(e || {})
}
,
t.kill = function(e) {
this.contexts.forEach((function(t) {
return t.kill(e, !0)
}
))
}
,
e
}()
, pT = {
registerPlugin: function() {
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
t[n] = arguments[n];
t.forEach((function(e) {
return lE(e)
}
))
},
timeline: function(e) {
return new kE(e)
},
getTweensOf: function(e, t) {
return sM.getTweensOf(e, t)
},
getProperty: function(e, t, n, r) {
SM(e) && (e = KC(e)[0]);
var i = sC(e || {}).get
, s = n ? mC : fC;
return "native" === n && (n = ""),
e ? t ? s(($M[t] && $M[t].get || i)(e, t, n, r)) : function(t, n, r) {
return s(($M[t] && $M[t].get || i)(e, t, n, r))
}
: e
},
quickSetter: function(e, t, n) {
if ((e = KC(e)).length > 1) {
var r = e.map((function(e) {
return gT.quickSetter(e, t, n)
}
))
, i = r.length;
return function(e) {
for (var t = i; t--; )
r[t](e)
}
}
e = e[0] || {};
var s = $M[t]
, a = sC(e)
, o = a.harness && (a.harness.aliases || {})[t] || t
, l = s ? function(t) {
var r = new s;
dM._pt = 0,
r.init(e, n ? t + n : t, dM, 0, [e]),
r.render(1, r),
dM._pt && ZE(1, dM)
}
: a.set(e, o);
return s ? l : function(t) {
return l(e, o, n ? t + n : t, a, 1)
}
},
quickTo: function(e, t, n) {
var r, i = gT.to(e, vC(((r = {})[t] = "+=0.1",
r.paused = !0,
r), n || {})), s = function(e, n, r) {
return i.resetTo(t, e, n, r)
};
return s.tween = i,
s
},
isTweening: function(e) {
return sM.getTweensOf(e, !0).length > 0
},
defaults: function(e) {
return e && e.ease && (e.ease = ME(e.ease, fM.ease)),
yC(fM, e || {})
},
config: function(e) {
return yC(pM, e || {})
},
registerEffect: function(e) {
var t = e.name
, n = e.effect
, r = e.plugins
, i = e.defaults
, s = e.extendTimeline;
(r || "").split(",").forEach((function(e) {
return e && !$M[e] && !UM[e] && VM(t + " effect requires " + e + " plugin.")
}
)),
eC[t] = function(e, t, r) {
return n(KC(e), gC(t || {}, i), r)
}
,
s && (kE.prototype[t] = function(e, n, r) {
return this.add(eC[t](e, EM(n) ? n : (r = n) && {}, this), r)
}
)
},
registerEase: function(e, t) {
xE[e] = ME(t)
},
parseEase: function(e, t) {
return arguments.length ? ME(e, t) : xE
},
getById: function(e) {
return sM.getById(e)
},
exportRoot: function(e, t) {
void 0 === e && (e = {});
var n, r, i = new kE(e);
for (i.smoothChildTiming = TM(e.smoothChildTiming),
sM.remove(i),
i._dp = 0,
i._time = i._tTime = sM._time,
n = sM._first; n; )
r = n._next,
!t && !n._dur && n instanceof HE && n.vars.onComplete === n._targets[0] || LC(i, n, n._start - n._delay),
n = r;
return LC(sM, i, 0),
i
},
context: function(e, t) {
return e ? new dT(e,t) : iM
},
matchMedia: function(e) {
return new hT(e)
},
matchMediaRefresh: function() {
return iT.forEach((function(e) {
var t, n, r = e.conditions;
for (n in r)
r[n] && (r[n] = !1,
t = 1);
t && e.revert()
}
)) || uT()
},
addEventListener: function(e, t) {
var n = sT[e] || (sT[e] = []);
~n.indexOf(t) || n.push(t)
},
removeEventListener: function(e, t) {
var n = sT[e]
, r = n && n.indexOf(t);
r >= 0 && n.splice(r, 1)
},
utils: {
wrap: function e(t, n, r) {
var i = n - t;
return kM(t) ? tE(t, e(0, t.length), n) : HC(r, (function(e) {
return (i + (e - t) % i) % i + t
}
))
},
wrapYoyo: function e(t, n, r) {
var i = n - t
, s = 2 * i;
return kM(t) ? tE(t, e(0, t.length - 1), n) : HC(r, (function(e) {
return t + ((e = (s + (e - t) % s) % s || 0) > i ? s - e : e)
}
))
},
distribute: QC,
random: eE,
snap: $C,
normalize: function(e, t, n) {
return rE(e, t, 0, 1, n)
},
getUnit: WC,
clamp: function(e, t, n) {
return HC(n, (function(n) {
return VC(e, t, n)
}
))
},
splitColor: hE,
toArray: KC,
selector: qC,
mapRange: rE,
pipe: function() {
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
t[n] = arguments[n];
return function(e) {
return t.reduce((function(e, t) {
return t(e)
}
), e)
}
},
unitize: function(e, t) {
return function(n) {
return e(parseFloat(n)) + (t || WC(n))
}
},
interpolate: function e(t, n, r, i) {
var s = isNaN(t + n) ? 0 : function(e) {
return (1 - e) * t + e * n
}
;
if (!s) {
var a, o, l, c, u, d = SM(t), h = {};
if (!0 === r && (i = 1) && (r = null),
d)
t = {
p: t
},
n = {
p: n
};
else if (kM(t) && !kM(n)) {
for (l = [],
c = t.length,
u = c - 2,
o = 1; o < c; o++)
l.push(e(t[o - 1], t[o]));
c--,
s = function(e) {
e *= c;
var t = Math.min(u, ~~e);
return l[t](e - t)
}
,
r = n
} else
i || (t = vC(kM(t) ? [] : {}, t));
if (!l) {
for (a in n)
DE.call(h, t, a, "get", n[a]);
s = function(e) {
return ZE(e, h) || (d ? t.p : t)
}
}
}
return HC(r, s)
},
shuffle: YC
},
install: GM,
effects: eC,
ticker: vE,
updateRoot: kE.updateRoot,
plugins: $M,
globalTimeline: sM,
core: {
PropTween: rT,
globals: WM,
Tween: HE,
Timeline: kE,
Animation: PE,
getCache: sC,
_removeLinkedListItem: wC,
reverting: function() {
return rM
},
context: function(e) {
return e && iM && (iM.data.push(e),
e._ctx = iM),
iM
},
suppressOverwrites: function(e) {
return nM = e
}
}
};
oC("to,from,fromTo,delayedCall,set,killTweensOf", (function(e) {
return pT[e] = HE[e]
}
)),
vE.add(kE.updateRoot),
dM = pT.to({}, {
duration: 0
});
var fT = function(e, t) {
for (var n = e._pt; n && n.p !== t && n.op !== t && n.fp !== t; )
n = n._next;
return n
}
, mT = function(e, t) {
return {
name: e,
rawVars: 1,
init: function(e, n, r) {
r._onInit = function(e) {
var r, i;
if (SM(n) && (r = {},
oC(n, (function(e) {
return r[e] = 1
}
)),
n = r),
t) {
for (i in r = {},
n)
r[i] = t(n[i]);
n = r
}
!function(e, t) {
var n, r, i, s = e._targets;
for (n in t)
for (r = s.length; r--; )
(i = e._ptLookup[r][n]) && (i = i.d) && (i._pt && (i = fT(i, n)),
i && i.modifier && i.modifier(t[n], e, s[r], n))
}(e, n)
}
}
}
}
, gT = pT.registerPlugin({
name: "attr",
init: function(e, t, n, r, i) {
var s, a, o;
for (s in this.tween = n,
t)
o = e.getAttribute(s) || "",
(a = this.add(e, "setAttribute", (o || 0) + "", t[s], r, i, 0, 0, s)).op = s,
a.b = o,
this._props.push(s)
},
render: function(e, t) {
for (var n = t._pt; n; )
rM ? n.set(n.t, n.p, n.b, n) : n.r(e, n.d),
n = n._next
}
}, {
name: "endArray",
init: function(e, t) {
for (var n = t.length; n--; )
this.add(e, n, e[n] || 0, t[n], 0, 0, 0, 0, 0, 1)
}
}, mT("roundProps", ZC), mT("modifiers"), mT("snap", $C)) || pT;
HE.version = kE.version = gT.version = "3.12.5",
cM = 1,
RM() && yE();
xE.Power0,
xE.Power1,
xE.Power2,
xE.Power3,
xE.Power4,
xE.Linear,
xE.Quad,
xE.Cubic,
xE.Quart,
xE.Quint,
xE.Strong,
xE.Elastic,
xE.Back,
xE.SteppedEase,
xE.Bounce,
xE.Sine,
xE.Expo,
xE.Circ;
class vT extends ch {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 1
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 64
, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 1;
super(),
this.radius = e,
this.segments = t,
this.fragment = n
}
getPoint(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : new Qi;
const n = e * Math.PI * this.fragment
, r = Math.cos(n) * this.radius * .5
, i = Math.sin(n) * this.radius * .5;
return t.set(r, i, 0)
}
}
function yT(e) {
let {isSide: t, isRotated: n, stalenWidth: r} = e;
const {door: s, width: a, height: o, frameSize: l, glassType: c, frameType: u, stalenPart: d, doorConfig: h, sidePannelConfig: p, sidePannel: f, setWidth: m, sidePannelSize: g, open: v} = (0,
i.useContext)($A)
, y = ZA(u)
, x = .054 * o
, b = .09;
let _, w, S, A, M, C, E, T, R = [], B = [], P = [], k = [];
const L = "eigen maat" == p && t ? g : a
, I = r || ("eigen maat" == p && t ? .06 * g : .06 * a)
, N = .053 * o
, D = .02;
"3panel" == s || "herenhuis" == s ? (_ = I + l,
w = .5 * l,
S = .5 * l,
A = .053 * o,
E = 4,
T = 1e4) : "herman" == s || "4panel" == s || "elody" == s || "3pannel" == s || "drentse" == s || "boerderij" == s || "fabric" == s || "larino" == s || "larino1" == s || "toog" == s || "low-deep" == s || "grandma" == s || "staldeuren" == s || "contempera" == s || "80s" == s || "2panel" == s || "dt3" == s || "dt2" == s || "parallel" == s || "notaris" == s || "toogPlus" == s || "rond" == s || "rondPlus" == s || "porto" == s || "rivera" == s || "dt11" == s || "boender" == s || "dt13" == s || "kasteel" == s || "kathedraal" == s || "gladiator" == s || "the-judge" == s || "prison" == s || "curved" == s || "lindsey" == s || "baku" == s || "supreme" == s || "ultimate" == s || "fisherman" == s || "primier" == s || "elite" == s ? (_ = I + l,
w = .5 * l,
S = .5 * l,
A = .053 * o + l,
"dt3" == s ? E = 3 : "dt2" == s ? E = 1e4 : "parallel" == s ? (_ = .033 * L / d + l,
w = .5 * l,
S = .5 * l,
A = .043 * o,
M = .5 * l,
C = .005 * o,
E = 2.5,
T = -4) : "notaris" == s ? (_ = .043 * L / d + l,
w = .5 * l,
S = .5 * l,
A = N - (I - _) + l,
M = .5 * l,
C = (I - _) / 2,
E = 2.5,
T = -4) : E = 3.5,
T = "boerderij" == s || "4panel" == s || "2panel" == s ? 1e4 : "dt3" == s ? -8.5 : -4) : "lucas" == s || "karel" == s || "annelot" == s ? (_ = I + l,
w = .5 * l,
S = .5 * l,
A = .053 * o,
E = 12,
T = -4) : "govert" == s || "rembrandt" == s || "low-deep" == s || "dt2" == s ? (_ = I + l,
w = .5 * l,
S = .5 * l,
A = .053 * o,
T = -4) : (E = 0,
T = 0,
_ = 0,
w = 0,
S = 0,
A = 0);
const j = (I - _) / 2
, F = new Hh;
F.moveTo(0, j),
F.absarc(0, 0, j, 0, Math.PI, !1);
const O = {
steps: 2,
depth: .095,
bevelEnabled: !1
}
, U = .01 * o
, z = new vT(U,5,.7)
, G = 1.6 * I
, H = new vT(G,5,.5)
, V = new vT(G,5).getPoint(1).x
, W = new vT(1.65 * I,5)
, J = W.getPoint(1).x
, X = new vT(.012 * o,5,.5)
, K = X.getPoint(1).y
, q = I * (2 / 3) * 2
, Y = new vT(q,5,.5)
, Q = new vT(q,5).getPoint(1).x
, Z = I * (2.5 / 3) * 2
, $ = new vT(Z,5,.5)
, ee = new vT(Z,5).getPoint(1).x
, te = I * (1 / 3) * 2
, ne = new vT(te,5,.5)
, re = new vT(te,5)
, ie = re.getPoint(1).x
, se = .5 * I * 2
, ae = (new vT(se,5,.5),
new vT(se,5))
, oe = ae.getPoint(1).x
, le = .5 * I * 2
, ce = new vT(le,5,.5)
, ue = new vT(le,5)
, de = ue.getPoint(1).x
, he = .55 * I * 2
, pe = new vT(he,5,.5)
, fe = new vT(he,5).getPoint(1).x
, me = .5 * I * 2
, ge = new vT(me,5,.5)
, ve = new vT(me,5).getPoint(1).x
, ye = I * (1 / 4) * 2
, xe = new vT(ye,5,.5)
, be = new vT(ye,5).getPoint(1).x
, _e = Math.asin(2 * I / N) * (180 / Math.PI)
, we = Math.asin((.8 + l) / (2.4 + l)) * (180 / Math.PI)
, Se = Math.asin(.4 / (2.4 + l)) * (180 / Math.PI)
, Ae = (360 - 4 * we - 4 * Se) / 4
, Me = 1.01 * N / 2 * 2
, Ce = new vT(Me,5,_e / 180)
, Ee = new vT(Me,5).getPoint(1).x
, Te = 2 * (1.6 + l)
, Re = (new vT(Te,5,.5),
new vT(Te,5))
, Be = (Re.getPoint(1).x,
2 * (2.4 + 1.5 * l))
, Pe = new vT(Be,5,Ae / 180);
new vT(Be,5).getPoint(1).x;
let ke = .0075 * o;
if ("porto" == s) {
const e = _;
R[0] = Math.abs(e / T),
P[1] = e - R[0] - K / 2 - 4 * l,
P[2] = (e - R[0]) / 2 + .8 * R[0] / 2,
R[1] = R[0] / 2 + K / 2,
R[2] = -(e - P[2] + K) / 2,
R[3] = -e / 2 + P[2],
R[5] = R[0] - K,
R[6] = R[3] - K,
k[3] = (N - R[0]) / 2 - K,
k[4] = A - R[0] - K,
B[1] = N / 2 - R[0],
B[3] = -(N - k[3]) / 2,
B[4] = -R[0] / 2 - K / 2,
B[5] = B[1] - K,
B[6] = -R[0] / 2 - K,
P[2] = P[2] - K
} else if ("rivera" == s)
R[0] = R[2] = Math.abs(_ / T),
R[1] = R[3] = -Math.abs(_ / T),
ke = _ - 2 * R[0],
k[0] = k[1] = N * (t ? .55 : .4) - ke / 2,
k[2] = k[3] = N * (t ? .4 : .55) - ke / 2,
B[0] = B[1] = -(N - k[0]) / 2,
B[2] = B[3] = (N - k[2]) / 2,
B[5] = -N / 2 + k[0],
B[6] = N / 2 - k[2];
else if ("dt13" == s)
R[0] = Math.abs(_ / T),
R[1] = -Math.abs(_ / T),
ke = _ - 2 * R[0],
k[0] = k[1] = N - 2 * R[0] - ke / 2,
P[4] = P[5] = R[0],
R[4] = _ / 2 - P[4] / 2,
R[5] = -R[4],
B[0] = B[1] = 0,
B[2] = k[0] / 2,
B[3] = -k[0] / 2,
B[4] = B[5] = 0;
else if ("dt11" == s || "boender" == s)
R[0] = (_ - 2 * _ / 3) / 2 + l / 2,
P[0] = _ / 3,
R[1] = -_ / 2 + P[0] / 2,
"boender" == s && (B[1] = N / 2 / 1.6);
else if ("fabric" == s)
P[0] = _,
B[0] = -N / 4,
B[1] = -N / 6.5,
k[3] = N / 2 - B[1],
k[4] = N / 2 + B[0],
B[3] = N / 4 + B[1] / 2,
B[4] = -N / 2 - B[0] / 2;
else if ("larino" == s)
P[0] = _ / 2;
else if ("toog" == s)
R[0] = R[2] = Math.abs(_ / 3),
R[1] = R[3] = -Math.abs(_ / 3),
ke = 2 * R[0],
k[0] = k[1] = .92 * N - ke / 2,
k[2] = k[3] = N * (t ? .4 : .55) - ke / 2,
B[0] = B[1] = -(N - k[0]) / 2,
B[2] = -N / 2 + k[0];
else if ("larino1" == s)
R[0] = I / 3.5,
P[1] = -I / 4.5,
k[1] = 1.5 * P[1],
B[1] = k[1] / 2,
R[1] = _ / 2 + P[1] / 2;
else if ("grandma" == s)
B[0] = N / 2 * .85,
B[1] = -N / 2 * .85 + l,
R[2] = _ / 2 - N / 2 * .15,
R[3] = -(_ / 2 - N / 2 * .15);
else if ("80s" == s)
B[0] = N / 2 * .65,
B[1] = -N / 2 * .65 + l,
R[2] = _ / 2 - N / 2 * .15,
R[3] = -(_ / 2 - N / 2 * .15);
else if ("staldeuren" == s)
B[0] = N / 4,
B[1] = 0,
B[2] = -N / 4,
B[3] = -N / 4 - N / 8,
k[3] = N / 4;
else if ("contempera" == s)
ke = _ / 9,
R[0] = R[2] = R[5] = R[7] = _ / 2 - _ / 3,
R[1] = R[3] = R[4] = R[6] = -(_ / 2 - _ / 3),
R[8] = R[1] - ke / 2,
R[9] = R[1] + ke / 2,
R[10] = R[0] - ke / 2,
R[11] = R[0] + ke / 2,
k[0] = k[1] = k[2] = k[3] = N / 6,
k[8] = k[9] = k[10] = k[11] = N - 2 * k[0] - ke + l,
B[0] = B[1] = N / 2 - k[0] / 2,
B[2] = B[3] = -(N / 2 - k[0] / 2),
B[4] = B[5] = N / 2 - k[0] - ke / 2,
B[6] = B[7] = -(N / 2 - k[0] - ke / 2),
B[8] = B[9] = B[10] = B[11] = 0,
B[12] = N / 2 - k[0] - ke / 6 + .07,
B[13] = -(N / 2 - k[0] - ke / 6) - .07;
else if ("annelot" == s) {
const e = I / T;
B[1] = -(N / 2 - 105 * .053),
B[2] = B[1] + e
} else if ("kasteel" == s)
k[2] = N - 2.3 + Q + Q / 6,
k[3] = N - 1.15 + Q,
B[0] = N / 2 + Q - 1.2,
B[1] = -N / 2 - Q + 1.2,
B[2] = N / 2 - k[2] / 2 + Q - 1.15,
B[3] = -N / 2 + k[3] / 2 - Q + 1.14,
B[4] = -N / 2 + 1.2,
R[1] = -I / 2,
R[2] = I / 2 + Q + l,
R[3] = -I / 2 - Q,
R[4] = 0;
else if ("kathedraal" == s) {
k[1] = N + Q - 1.2;
const e = 1.2 - Q - N / 3 > 0 ? (1.2 - Q - N / 3) / 4.5 : 0;
P[2] = I / 3 + e + l,
P[3] = I / 3 + l,
B[0] = N / 2 + Q - 1.2,
B[1] = N / 2 - k[1] / 2 + Q - 1.2,
B[2] = B[4] = N / 2 - N / 3,
B[3] = B[5] = -N / 2 + N / 3,
R[1] = I / 2 + Q + l,
R[2] = -I / 2 + P[2] / 2 - l / 2,
R[3] = -I / 2 + P[3] / 2 - l / 2,
R[4] = R[5] = 0
} else if ("gladiator" == s) {
k[1] = N + Q - 1.2;
const e = 1.2 - Q - N / 3 > 0 ? (1.2 - Q - N / 3) / 4.5 : 0;
P[2] = I / 3 + e,
P[3] = I / 3,
B[0] = N / 2 + Q - 1.2,
B[1] = N / 2 - k[1] / 2 + Q - 1.2,
B[2] = N / 2 - N / 3,
B[3] = -N / 2 + N / 3,
B[4] = -N / 2 + k[1] / 2,
R[1] = I / 2 + Q + l / 3,
R[2] = -I / 2 + P[2] / 2,
R[3] = -I / 2 + P[3] / 2,
R[4] = -I / 2 - Q - l / 3,
R[5] = I / 2 - P[2] / 2,
R[6] = I / 2 - P[3] / 2
} else if ("the-judge" == s)
R[0] = I / 2 - 1.2,
R[1] = I / 2 - .6 + l / 2,
B[0] = 0,
B[1] = 0,
P[1] = 1.2,
k[1] = 2.4;
else if ("prison" == s) {
k[1] = N + Q - 1.2;
const e = 1.2 - ee - N / 3 > 0 ? (1.2 - ee - N / 3) / 4.5 : 0;
P[2] = I / 3 + e,
P[3] = I / 3,
B[0] = N / 2 + ee - 1.2,
B[1] = N / 2 - k[1] / 2 + ee - 1.2,
B[2] = B[4] = N / 2 - N / 3,
B[3] = B[5] = -N / 2 + N / 3,
R[1] = I / 2 + ee + l,
R[2] = I / 2 - 1,
R[3] = -I / 2 + P[3] / 2,
R[4] = R[5] = 0
} else if ("curved" == s)
P[2] = P[4] = I / 2 + ie + l,
k[3] = N + 2 * ie - 3.4 + l,
R[0] = ie,
R[1] = -ie,
R[2] = -I / 2 + P[2] / 2 - l,
R[3] = 0,
R[4] = I / 2 - P[4] / 2 + l,
R[5] = -ie,
R[6] = ie,
R[7] = I / 2 - P[2] / 2 + l / 2,
R[8] = -I / 2 + P[2] / 2 - l / 2,
B[0] = B[5] = N / 2 + ie - 1.7,
B[1] = B[6] = -N / 2 - ie + 1.7,
B[2] = N / 2 - 1.7,
B[3] = 0,
B[4] = -N / 2 + 1.7;
else if ("lindsey" == s)
k[2] = k[3] = N + 2 * ie - 3 * l / 2,
R[0] = 0,
R[1] = 0,
R[2] = ie,
R[3] = -ie,
R[4] = R[5] = -I / 2 - l / 2,
R[6] = R[7] = I / 2 + l / 2,
R[8] = -I / 2 - ie - l / 2,
R[9] = I / 2 + ie + l / 2,
B[0] = N / 2 + ie,
B[1] = 2 * l - (N / 2 + ie),
B[2] = l,
B[3] = B[8] = B[9] = l,
B[4] = B[6] = N / 2 + ie,
B[5] = B[7] = -N / 2 - ie + 2 * l;
else if ("baku" == s)
k[3] = N + oe,
R[0] = R[1] = R[2] = R[3] = 0,
B[0] = B[1] = N / 2 + oe,
B[2] = B[1] - 1.2,
B[3] = -N / 2 + k[3] / 2;
else if ("supreme" == s)
k[3] = N + oe,
R[0] = R[3] = -I / 2,
R[1] = R[4] = I / 2,
R[2] = 0,
B[0] = B[1] = N / 2 + oe,
B[2] = -N / 2 + k[3] / 2,
B[3] = B[3] = -N / 2 - de;
else if ("ultimate" == s)
k[1] = 2 * N / 3 + 4 * l,
k[10] = 2 * N / 3 + ve,
k[11] = N / 3 + be,
P[2] = I / 6,
P[3] = I / 3,
P[6] = P[7] = I / 6 + 4 * l,
P[12] = I / 4,
B[0] = -N / 2 + k[1],
B[1] = -N / 2 + k[1] / 2,
B[2] = B[4] = B[6] = N / 2 - N / 3,
B[3] = B[5] = -N / 2 + N / 3,
B[8] = N / 2 - N / 3 + ve,
B[9] = -N / 2 + N / 3 + be,
B[10] = -N / 2 + k[10] / 2,
B[11] = -N / 2 + k[11] / 2,
B[12] = -N / 2 + k[1] - fe,
R[0] = -I / 2 + I / 4 - fe,
R[1] = -I / 2 + I / 4,
R[2] = I / 2 - 1 - fe,
R[3] = -I / 2 + P[3] / 2,
R[4] = R[5] = 0,
R[6] = R[7] = -I / 2 + P[6] / 2,
R[8] = R[9] = -I / 2 + P[6],
R[10] = -I / 2 + P[6] - ve,
R[11] = -I / 2 + P[6] - be,
R[12] = I / 2 - P[12] / 2;
else if ("fisherman" == s)
R[0] = R[1] = 0,
R[2] = -I / 2,
R[3] = -I / 2,
B[0] = 0,
B[1] = -I / Math.tan(_e),
B[2] = Ee,
B[3] = N / 2 - I / Math.tan(_e);
else if ("primier" == s) {
k[1] = N + Q - 1.2;
P[2] = I + l,
P[3] = I + l,
B[0] = N / 2 + Q - 1.2,
B[1] = N / 2 - k[1] / 2 + Q - 1.2,
B[2] = B[4] = N / 2 - N / 3,
B[3] = B[5] = -N / 2 + N / 3,
R[1] = I / 2 + Q + l,
R[2] = -I / 2 + P[2] / 2 - l / 2,
R[3] = -I / 2 + P[3] / 2 - l / 2,
R[4] = R[5] = 0
} else
"elite" == s && (P[0] = I - 1.6,
P[3] = P[5] = P[0] - 1.6 + l / 2,
k[1] = N / 2 - 1.2,
k[4] = k[5] = k[1] - 2 + l,
k[8] = k[1] - 2,
R[0] = 0,
R[1] = -I / 2 + .8,
R[2] = I / 2 + l / 2,
R[3] = R[5] = -I / 2 + .8 + P[3] / 2 - l / 2,
R[4] = P[0] / 2,
R[10] = I / 2 - .8 + .8 + l,
R[11] = I / 2 + l,
B[0] = N / 2 - .8,
B[1] = N / 2 - k[1] / 2 - .8 + l / 2,
B[2] = -l / 2,
B[3] = .4,
B[4] = 2 + k[4] / 2 + .4 - l / 2,
B[5] = -.4,
B[6] = -N / 2 + k[1] / 2 + .8 + l / 2,
B[7] = -N / 2 + .8 + l,
B[8] = -N / 2 + k[8] / 2 + .8 + l / 2,
B[10] = 0,
B[11] = 0);
const Le = new vT(ke,5,1)
, Ie = new vT(ke / 3,5,1);
return (0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsxs)("mesh", {
position: [-I / 2 - l, 0, 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [1.5 * l, x, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y,
castShadow: !0,
receiveShadow: !0
})]
}), (0,
Ig.jsxs)("mesh", {
position: [I / 2 + l, 0, 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [1.5 * l, x, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y,
castShadow: !0,
receiveShadow: !0
})]
}), (0,
Ig.jsxs)("mesh", {
position: [0, N / 2 + l / 2, 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [I + 3 * l, 1.5 * l, b],
castShadow: !0,
receiveShadow: !0
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [0, -N / 2 - l, 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [I + 3 * l, 6 * l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [0, 0, n ? -(.055 - .05) : .055 - .05],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [I + 2 * l, N + 2 * l, D]
}), (0,
Ig.jsx)("meshPhysicalMaterial", {
color: c,
transparent: !0,
opacity: 1118481 == c ? .3 : 16447472 == c || 395529 == c ? .6 : 9992541 == c ? .7 : 16777215 == c ? .95 : .8,
roughness: .11,
metalness: .5,
clearcoat: 1
})]
}), (0,
Ig.jsxs)("group", {
children: [("rembrandt" == s || "karel" == s || "herenhuis" == s || "elody" == s || "boerderij" == s || "dt2" == s) && (0,
Ig.jsxs)("mesh", {
position: [-I / T, 0, 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, A, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y,
castShadow: !0,
receiveShadow: !0
})]
}), "3pannel" == s && (0,
Ig.jsxs)("mesh", {
position: [-I / T, 0, 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, 2 * N / E, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y,
castShadow: !0,
receiveShadow: !0
})]
}), "drentse" == s && (0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsxs)("mesh", {
position: [0, N / (E + 2), 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [_, l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y,
castShadow: !0,
receiveShadow: !0
})]
}), (0,
Ig.jsxs)("mesh", {
position: [-I / T, 0, 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, 2 * N / E, b],
castShadow: !0,
receiveShadow: !0
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
})]
}), "3panel" == s && (0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsxs)("mesh", {
position: [0, N / 2 - N / 3, 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [_, l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [0, -(N / 2 - N / 3), 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [_, l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
})]
}), ("herman" == s || "lucas" == s || "karel" == s || "herenhuis" == s || "elody" == s || "3pannel" == s || "drentse" == s || "4panel" == s || "boerderij" == s || "dt3" == s || "dt2" == s || "parallel" == s || "notaris" == s || "dt11" == s) && (0,
Ig.jsxs)(Ig.Fragment, {
children: ["parallel" == s || "notaris" == s ? !t && (0,
Ig.jsxs)("mesh", {
position: [0, "parallel" == s ? N / E + l / 5 : N / 2 - (I - _) / 2, 0],
children: [(0,
Ig.jsx)("boxGeometry", {
args: [_, l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y,
castShadow: !0,
receiveShadow: !0
})]
}) : (0,
Ig.jsxs)("mesh", {
position: [0, N / E, 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [_, l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), "dt2" != s && ("parallel" == s || "notaris" == s ? !t && (0,
Ig.jsxs)("mesh", {
position: [0, "parallel" == s ? -N / E - l / 5 : -(N / 2 - (I - _) / 2), 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [_, l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}) : (0,
Ig.jsxs)("mesh", {
position: [0, -N / E, 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [_, l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}))]
}), ("4panel" == s || "boerderij" == s || "govert" == s || "rembrandt" == s || "2panel" == s) && (0,
Ig.jsx)(Ig.Fragment, {
children: (0,
Ig.jsxs)("mesh", {
position: [0, N / T, 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [_, l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
})
}), "dt3" == s && (0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsxs)("mesh", {
position: [0, N / T, 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [_, l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [0, -N / T, 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [_, l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
})]
}), "annelot" == s && (0,
Ig.jsxs)(Ig.Fragment, {
children: [!t && (0,
Ig.jsxs)("mesh", {
position: [-I / T, 0, 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, A, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [0, B[1], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [_, l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [0, t ? B[1] + .06 * a / T : B[2], 0],
children: [(0,
Ig.jsx)("boxGeometry", {
args: [_, l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
})]
}), "low-deep" == s && (0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsxs)("mesh", {
position: [I / T, 0, 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, A, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [0, N / (T + 1), 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [_, l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
})]
}), "staldeuren" == s && (0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsxs)("mesh", {
position: [0, B[0], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [_, l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [0, B[1], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [_, l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [0, B[2], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [_, l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [0, B[3], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [_, k[3], b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [0, 0, 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, N, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
})]
}), ("parallel" == s || "notaris" == s) && (0,
Ig.jsxs)(Ig.Fragment, {
children: ["notaris" != s && !t && (0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsxs)("mesh", {
position: [_ / 2, 0, 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, A, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [I / 2 - I / 8 + 3 * l / 2, 0, 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [I / 4, l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [-I / 2 + I / 8 - 3 * l / 2, 0, 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [I / 4, l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
})]
}), !t && (0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsxs)("mesh", {
position: [-_ / 2, 0, 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, A, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [0, N / 2 - C / 2, 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, C, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [0, -N / 2 + C / 2, 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, C, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
})]
}), "notaris" != s || t ? t && (0,
Ig.jsxs)("mesh", {
position: [t ? 0 : J / 2, 0, 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [I + l, l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}) : (0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsxs)("mesh", {
position: [I / 2 + l, 0, n ? -.1 : .1],
rotation: [0, 0, Math.PI / 2],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("extrudeGeometry", {
args: [F, O]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [-(_ / 2 + (I / 2 - _ / 2) / 2), 0, 0],
children: [(0,
Ig.jsx)("boxGeometry", {
args: [I / 2 - _ / 2 + l, l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [_ / 2 - l, 0, 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [U / 2, l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [_ / 2 - w / 2 - l / 4, N / 2 - A / 2.5 / 2 - (I - _) / 2 - l / 4, 0],
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, A / 2.45, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [_ / 2 - w / 2 - l / 4, -(N / 2 - A / 2.5 / 2 - (I - _) / 2 - l / 4), 0],
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, A / 2.45, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [_ / 2 + .21 * U, 0, 0],
rotation: [0, 0, Math.PI / 1.55],
children: [(0,
Ig.jsx)("tubeGeometry", {
args: [z, 28, .55 * l, , !1]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
})]
})]
}), "toogPlus" == s && !t && (0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsxs)("mesh", {
position: [V + I / 2 + l, .21 * -A, 0],
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, .58 * A, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [I / 2 + l, -A / N * -.8, 0],
rotation: [0, 0, -4.7],
children: [(0,
Ig.jsx)("tubeGeometry", {
args: [H, 28, .56 * l, 8, !1]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
})]
}), "larino2" == s && (0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsxs)("mesh", {
position: [R[0], 0, 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, A, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[1], B[1], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [P[1], k[1], b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
})]
}), "fabric" == s && (0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsxs)("mesh", {
position: [0, B[0], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [_, l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [0, B[1], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [_, l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [0, B[3], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, k[3], b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [0, B[4], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, k[4], b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
})]
}), "larino" == s && (0,
Ig.jsxs)(Ig.Fragment, {
children: [!t && (0,
Ig.jsxs)("mesh", {
position: [0, 0, 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, N, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [t ? 0 : -P[0] / 2, 0, 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [t ? _ : P[0], l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
})]
}), "toog" == s && (0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsxs)("mesh", {
position: [-R[0], B[0] - l / 2, 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, k[0], b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [-R[1], B[1] - l / 2, 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, k[1], b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [0, B[2] - l / 2, 0],
rotation: [0, 0, 2 * Math.PI],
children: [(0,
Ig.jsx)("tubeGeometry", {
args: [Le, 28, .57 * l, 8, !1]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
})]
}), "contempera" == s && !t && (0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsxs)("mesh", {
position: [R[0], B[0], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, k[0], b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[1], B[1], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, k[1], b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[2], B[2], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, k[2], b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[3], B[3], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, k[3], b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [-R[1], B[1] - l / 2, 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, k[1], b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[4], B[4], 0],
rotation: [0, 0, 2 * Math.PI],
children: [(0,
Ig.jsx)("tubeGeometry", {
args: [Le, 28, .57 * l, 8, !1]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[4], B[12], 0],
rotation: [0, 0, 2 * Math.PI],
children: [(0,
Ig.jsx)("tubeGeometry", {
args: [Ie, 28, .57 * l, 8, !1]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[5], B[5], 0],
rotation: [0, 0, 2 * Math.PI],
children: [(0,
Ig.jsx)("tubeGeometry", {
args: [Le, 28, .57 * l, 8, !1]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[5], B[12], 0],
rotation: [0, 0, 2 * Math.PI],
children: [(0,
Ig.jsx)("tubeGeometry", {
args: [Ie, 28, .57 * l, 8, !1]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[6], B[6], 0],
rotation: [0, 0, Math.PI],
children: [(0,
Ig.jsx)("tubeGeometry", {
args: [Le, 28, .57 * l, 8, !1]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[6], B[13], 0],
rotation: [0, 0, Math.PI],
children: [(0,
Ig.jsx)("tubeGeometry", {
args: [Ie, 28, .57 * l, 8, !1]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[7], B[7], 0],
rotation: [0, 0, Math.PI],
children: [(0,
Ig.jsx)("tubeGeometry", {
args: [Le, 28, .57 * l, 8, !1]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[7], B[13], 0],
rotation: [0, 0, Math.PI],
children: [(0,
Ig.jsx)("tubeGeometry", {
args: [Ie, 28, .57 * l, 8, !1]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[8], B[8], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, k[8], b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[9], B[9], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, k[9], b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[10], B[10], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, k[10], b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[11], B[11], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, k[11], b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
})]
}), "grandma" == s && (0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsxs)("mesh", {
position: [0, B[0], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [_, l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [0, B[1], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [_, l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[2], 0, 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, N, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[3], 0, 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, N, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
})]
}), "80s" == s && (0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsxs)("mesh", {
position: [0, B[0], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [_, l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [0, B[1], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [_, l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[2], 0, 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, N, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[3], 0, 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, N, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
})]
}), ("rondPlus" == s || "rond" == s) && (0,
Ig.jsxs)(Ig.Fragment, {
children: ["rondPlus" == s && (0,
Ig.jsxs)("mesh", {
position: [t ? 0 : J / 2, 0, 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [t ? _ : _ + J + .5 * l, l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), !t && (0,
Ig.jsxs)("mesh", {
position: [-I / T * 2.1, 0, 0],
rotation: [0, 0, Math.PI / 2],
children: [(0,
Ig.jsx)("tubeGeometry", {
args: [W, 28, .56 * l, 8, !1]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
})]
}), "porto" == s && (0,
Ig.jsxs)(Ig.Fragment, {
children: [!t && (0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsxs)("mesh", {
position: [1.2 * -R[0], 0, 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, A, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[0], B[4], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, k[4], b],
castShadow: !0,
receiveShadow: !0
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[3], B[3], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, k[3], b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[5], B[5], 0],
rotation: [0, 2 * Math.PI, 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("tubeGeometry", {
args: [X, 28, .57 * l, 8, !1]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[6], B[6], 0],
rotation: [0, 2 * Math.PI, 0],
children: [(0,
Ig.jsx)("tubeGeometry", {
args: [X, 28, .58 * l, 8, !1]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
})]
}), (0,
Ig.jsxs)("mesh", {
position: [t ? 0 : -R[1], t ? N / 2 - Math.abs((.06 * a + l) / T) : B[1], 0],
children: [(0,
Ig.jsx)("boxGeometry", {
args: [t ? _ : P[1] - l, l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [t ? 0 : R[2], t ? -Math.abs((.06 * a + l) / T) / 2 : -R[0] / 2, 0],
children: [(0,
Ig.jsx)("boxGeometry", {
args: [t ? _ : P[2], l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
})]
}), "rivera" == s && (0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsxs)("mesh", {
position: [-R[0], B[0] - l / 2, 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, k[0], b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [-R[1], B[1] - l / 2, 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, k[1], b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [-R[2], B[2], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, k[2], l]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [-R[3], B[3], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, k[3], b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [0, B[5] - l / 2, 0],
rotation: [0, 0, 2 * Math.PI],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("tubeGeometry", {
args: [Le, 28, .57 * l, 8, !1]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [0, B[6], 0],
rotation: [0, 0, Math.PI],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("tubeGeometry", {
args: [Le, 28, .57 * l, 8, !1]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
})]
}), "dt13" == s && (0,
Ig.jsxs)(Ig.Fragment, {
children: [!t && (0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsxs)("mesh", {
position: [-R[0], B[0], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, k[0], b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [-R[1], B[1], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, k[1], b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [0, B[2], 0],
rotation: [0, 0, 2 * Math.PI],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("tubeGeometry", {
args: [Le, 28, .57 * l, 8, !1]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [0, B[3], 0],
rotation: [0, 0, Math.PI],
children: [(0,
Ig.jsx)("tubeGeometry", {
args: [Le, 28, .57 * l, 8, !1]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
})]
}), (0,
Ig.jsxs)("mesh", {
position: [t ? 0 : -R[4], B[4], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [t ? _ : P[4], l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [t ? 0 : -R[5], B[5], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [t ? _ : P[5], l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
})]
}), ("dt11" == s || "boender" == s) && (0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsxs)("mesh", {
position: [R[0], "dt11" == s ? .11 * A : 0, 0],
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, "dt11" == s ? A / 1.25 - l : A, l]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [-R[0], "dt11" == s ? -.11 * A : 0, 0],
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, "dt11" == s ? A / 1.25 - l : A, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
})]
}), "boender" == s && (0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsxs)("mesh", {
position: [R[1], B[1], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [P[0], l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[1], 0, 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [P[0], l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [0, B[1] / 2, 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [P[0], l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [0, -B[1] / 2, 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [P[0], l, l]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [0, -4 * B[1] / 3, 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [P[0], l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [-R[1], B[1], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [P[0], l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [-R[1], -B[1], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [P[0], l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
})]
}), "kasteel" == s && (t ? (0,
Ig.jsxs)("mesh", {
position: [R[4], B[4], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [I, l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}) : (0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsxs)("mesh", {
position: [I / 2 + l, B[0], 0],
rotation: [0, 0, -4.7],
children: [(0,
Ig.jsx)("tubeGeometry", {
args: [Y, 28, .56 * l, 8, !1]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[1], B[1], 0],
rotation: [0, 0, 4.7],
children: [(0,
Ig.jsx)("tubeGeometry", {
args: [Y, 28, .56 * l, 8, !1]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[2], B[2], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, k[2], b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[3], B[3], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, k[3], b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
})]
})), "kathedraal" == s && (t ? (0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsxs)("mesh", {
position: [R[4], B[4], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [I, l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[5], B[5], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [I, l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
})]
}) : (0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsxs)("mesh", {
position: [I / 2 + l, B[0], 0],
rotation: [0, 0, -4.7],
children: [(0,
Ig.jsx)("tubeGeometry", {
args: [Y, 28, .56 * l, 8, !1]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[1], B[1], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, k[1], b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[2], B[2], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [P[2], l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[3], B[3], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [P[3], l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
})]
})), "gladiator" == s && (t ? (0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsxs)("mesh", {
position: [-I / E * 1.78, B[0], 0],
rotation: [0, 0, 0],
children: [(0,
Ig.jsx)("tubeGeometry", {
args: [Y, 28, .56 * l, 8, !1]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[4], B[4], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, k[1], b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[5], B[2], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [P[2], l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[6], B[3], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [P[3], l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
})]
}) : (0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsxs)("mesh", {
position: [I / E * 1.78, B[0], 0],
rotation: [0, 0, -4.7],
children: [(0,
Ig.jsx)("tubeGeometry", {
args: [Y, 28, .56 * l, 8, !1]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[1], B[1], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, k[1], b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[2], B[2], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [P[2], l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[3], B[3], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [P[3], l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
})]
})), "the-judge" == s && !t && (0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsxs)("mesh", {
position: [R[0], B[0], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, N, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[1], B[1], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [P[1], k[1], b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
})]
}), "prison" == s && (t ? (0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsxs)("mesh", {
position: [R[4], B[4], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [I, l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[5], B[5], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [I, l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
})]
}) : (0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsxs)("mesh", {
position: [I / 2 + l, B[0], 0],
rotation: [0, 0, -4.7],
children: [(0,
Ig.jsx)("tubeGeometry", {
args: [$, 28, .56 * l, 8, !1]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[1], B[1], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, k[1], b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[2], 0, 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, N, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
})]
})), "curved" == s && (t ? (0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsxs)("mesh", {
position: [R[5], B[5], 0],
rotation: [0, 0, -4.7],
children: [(0,
Ig.jsx)("tubeGeometry", {
args: [ne, 28, .56 * l, 8, !1]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[6], B[6], 0],
rotation: [0, 0, 4.7],
children: [(0,
Ig.jsx)("tubeGeometry", {
args: [ne, 28, .56 * l, 8, !1]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[7], B[2], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [P[2], l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[3], B[3], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, k[3], b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[8], B[4], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [P[4], l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
})]
}) : (0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsxs)("mesh", {
position: [R[0], B[0], 0],
rotation: [0, 0, 0],
children: [(0,
Ig.jsx)("tubeGeometry", {
args: [ne, 28, .56 * l, 8, !1]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[1], B[1], 0],
rotation: [0, Math.PI, 4.7],
children: [(0,
Ig.jsx)("tubeGeometry", {
args: [ne, 28, .56 * l, 8, !1]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[2], B[2], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [P[2], l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[3], B[3], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, k[3], b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[4], B[4], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [P[4], l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
})]
})), "lindsey" == s && (0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsxs)("mesh", {
position: [R[0], B[0], 0],
rotation: [0, 0, 0],
children: [(0,
Ig.jsx)("tubeGeometry", {
args: [re, 28, .56 * l, 8, !1]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[1], B[1], 0],
rotation: [Math.PI, 0, 0],
children: [(0,
Ig.jsx)("tubeGeometry", {
args: [re, 28, .56 * l, 8, !1]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[2], B[2], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, k[2], b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[3], B[3], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, k[3], b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[4], B[4], 0],
rotation: [0, 0, 0],
children: [(0,
Ig.jsx)("tubeGeometry", {
args: [ne, 28, .56 * l, 8, !1]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[5], B[5], 0],
rotation: [Math.PI, 0, 0],
children: [(0,
Ig.jsx)("tubeGeometry", {
args: [ne, 28, .56 * l, 8, !1]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[6], B[6], 0],
rotation: [0, Math.PI, 0],
children: [(0,
Ig.jsx)("tubeGeometry", {
args: [ne, 28, .56 * l, 8, !1]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[7], B[7], 0],
rotation: [Math.PI, Math.PI, 0],
children: [(0,
Ig.jsx)("tubeGeometry", {
args: [ne, 28, .56 * l, 8, !1]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[8], B[8], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, k[3], b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[9], B[9], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, k[3], b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
})]
}), "baku" == s && (0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsxs)("mesh", {
position: [R[0], B[0], 0],
rotation: [0, 0, 0],
children: [(0,
Ig.jsx)("tubeGeometry", {
args: [ae, 28, .56 * l, 8, !1]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[1], B[1], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [I + l, l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[2], B[2], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [I + l, l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[3], B[3], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, k[3], b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
})]
}), "supreme" == s && (0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsxs)("mesh", {
position: [R[0], B[0], 0],
rotation: [0, 0, 0],
children: [(0,
Ig.jsx)("tubeGeometry", {
args: [ce, 28, .56 * l, 8, !1]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[1], B[0], 0],
rotation: [0, 0, Math.PI / 2],
children: [(0,
Ig.jsx)("tubeGeometry", {
args: [ce, 28, .56 * l, 8, !1]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[2], B[2], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, k[3], b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[3], B[3], 0],
rotation: [0, 0, -Math.PI / 2],
children: [(0,
Ig.jsx)("tubeGeometry", {
args: [ue, 28, .56 * l, 8, !1]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[4], B[3], 0],
rotation: [0, 0, Math.PI / 2],
children: [(0,
Ig.jsx)("tubeGeometry", {
args: [ue, 28, .56 * l, 8, !1]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
})]
}), "ultimate" == s && (t ? (0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsxs)("mesh", {
position: [R[4], B[4], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [I, l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[5], B[5], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [I, l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
})]
}) : (0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsxs)("mesh", {
position: [R[0], B[0], 0],
rotation: [0, 0, -4.7],
children: [(0,
Ig.jsx)("tubeGeometry", {
args: [pe, 28, .56 * l, 8, !1]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[1], B[1], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, k[1], b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[6], B[4], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [P[6], l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[7], B[5], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [P[7], l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[8], B[8], 0],
rotation: [0, 0, 0],
children: [(0,
Ig.jsx)("tubeGeometry", {
args: [ge, 28, .56 * l, 8, !1]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[9], B[9], 0],
rotation: [0, 0, 0],
children: [(0,
Ig.jsx)("tubeGeometry", {
args: [xe, 28, .56 * l, 8, !1]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[10], B[10], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, k[10], b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[11], B[11], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, k[11], b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[12], B[12], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [P[12], l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
})]
})), "fisherman" == s && (t ? (0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsxs)("mesh", {
position: [R[0], B[0], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [I, l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[1], B[1], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [I, l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
})]
}) : (0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsxs)("mesh", {
position: [R[2], B[2], 0],
rotation: [0, 0, Math.PI * (90 - _e) / 180],
children: [(0,
Ig.jsx)("tubeGeometry", {
args: [Ce, 28, .56 * l, 8, !1]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[3], B[3], 0],
rotation: [0, 0, -Math.PI / 2],
children: [(0,
Ig.jsx)("tubeGeometry", {
args: [Ce, 28, .56 * l, 8, !1]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
})]
})), "primier" == s && (t ? (0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsxs)("mesh", {
position: [R[4], B[4], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [I, l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[5], B[5], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [I, l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
})]
}) : (0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsxs)("mesh", {
position: [I / 2 + l, B[0], 0],
rotation: [0, 0, -4.7],
children: [(0,
Ig.jsx)("tubeGeometry", {
args: [Y, 28, .56 * l, 8, !1]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[1], B[1], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, k[1], b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[2], B[2], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [P[2], l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[3], B[3], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [P[3], l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
})]
})), "elite" == s && (t ? (0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsxs)("mesh", {
position: [R[0], B[0], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [P[0], l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[1], B[1], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, k[1], b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [0, B[3], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [P[0] + l, l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[4], B[1], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, k[1], b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [0, B[5], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [P[0], l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[1], B[6], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, k[1], b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[0], B[7], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [P[0], l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[4], B[6], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, k[1], b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
})]
}) : (0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsxs)("mesh", {
position: [R[0], B[0], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [P[0], l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[1], B[1], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, k[1], b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[2], B[2], 0],
rotation: [0, 0, Math.PI * (Se + 90 + we / 2) / 180],
children: [(0,
Ig.jsx)("tubeGeometry", {
args: [Pe, 28, .56 * l, 8, !1]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[3], B[3], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [P[3], l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[4], B[4], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, k[4], b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[5], B[5], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [P[5], l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[1], B[6], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, k[1], b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[0], B[7], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [P[0], l, b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[4], B[8], 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [l, k[8], b]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[10], B[10], 0],
rotation: [0, 0, Math.PI * (180 + Se) / 180],
children: [(0,
Ig.jsx)("tubeGeometry", {
args: [Pe, 28, .56 * l, 8, !1]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
}), (0,
Ig.jsxs)("mesh", {
position: [R[11], B[11], 0],
rotation: [0, 0, Math.PI / 2],
children: [(0,
Ig.jsx)("tubeGeometry", {
args: [Re, 28, .56 * l, 8, !1]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: y
})]
})]
}))]
})]
})
}
function xT() {
const {width: e, height: t, stalenPart: n, stalenType: r, frameSize: s} = (0,
i.useContext)($A)
, a = .06 * e / n
, o = .053 * t;
return (0,
Ig.jsx)(Ig.Fragment, {
children: "tussen" == r ? (0,
Ig.jsxs)(Ig.Fragment, {
children: [n >= 1 && (0,
Ig.jsx)("group", {
position: [(.06 * e + 4 * s + 3.5 * (n - 1) * s) / 2 - (a + (4 * s + 4 * (n - 1) * s) / n) / 2 - 3 * s / 2, .5 * (-12 + o), -13.5],
children: (0,
Ig.jsx)("group", {
position: [0, 0, 0],
children: (0,
Ig.jsx)(yT, {
sizePannel: 0,
stalenWidth: a
})
})
}), n >= 2 && (0,
Ig.jsx)("group", {
position: [(.06 * e + 4 * s + 3.5 * (n - 1) * s) / 2 - 3 * (a + (4 * s + 4 * (n - 1) * s) / n) / 2 - s, .5 * (-12 + o), -13.5],
rotation: [0, Math.PI, 0],
children: (0,
Ig.jsx)("group", {
position: [0, 0, 0],
rotation: [0, Math.PI, 0],
children: (0,
Ig.jsx)(yT, {
sizePannel: 0,
stalenWidth: a
})
})
}), n >= 3 && (0,
Ig.jsx)("group", {
position: [(.06 * e + 4 * s + 3.5 * (n - 1) * s) / 2 - 5 * (a + (4 * s + 4 * (n - 1) * s) / n) / 2, .5 * (-12 + o), -13.5],
children: (0,
Ig.jsx)("group", {
position: [0, 0, 0],
children: (0,
Ig.jsx)(yT, {
sizePannel: 0,
stalenWidth: a
})
})
}), n >= 4 && (0,
Ig.jsx)("group", {
position: [(.06 * e + 4 * s + 3.5 * (n - 1) * s) / 2 - 7 * (a + (4 * s + 4 * (n - 1) * s) / n) / 2 + s / 2, .5 * (-12 + o), -13.5],
children: (0,
Ig.jsx)("group", {
position: [0, 0, 0],
children: (0,
Ig.jsx)(yT, {
sizePannel: 0,
stalenWidth: a
})
})
})]
}) : (0,
Ig.jsxs)(Ig.Fragment, {
children: [n >= 1 && (0,
Ig.jsx)("group", {
position: [2 * (.06 * e + 4 * s) - (a + 4 * s), .5 * (-12 + o), -13.5],
rotation: [0, Math.PI, 0],
children: (0,
Ig.jsx)("group", {
position: [-a / 2, 0, 0],
rotation: [0, Math.PI, 0],
children: (0,
Ig.jsx)(yT, {
sizePannel: 0,
stalenWidth: a
})
})
}), n >= 2 && (0,
Ig.jsx)("group", {
position: [2 * (.06 * e + 4 * s) - 2 * (a + 4 * s) + s / 2, .5 * (-12 + o), -13.5],
rotation: [0, Math.PI, 0],
children: (0,
Ig.jsx)("group", {
position: [-a / 2, 0, 0],
rotation: [0, Math.PI, 0],
children: (0,
Ig.jsx)(yT, {
sizePannel: 0,
stalenWidth: a
})
})
}), n >= 3 && (0,
Ig.jsx)("group", {
position: [2 * (.06 * e + 4 * s) - 3 * (a + 4 * s) + s, .5 * (-12 + o), -13.5],
rotation: [0, Math.PI, 0],
children: (0,
Ig.jsx)("group", {
position: [-a / 2, 0, 0],
rotation: [0, Math.PI, 0],
children: (0,
Ig.jsx)(yT, {
sizePannel: 0,
stalenWidth: a
})
})
}), n >= 4 && (0,
Ig.jsx)("group", {
position: [2 * (.06 * e + 4 * s) - 4 * (a + 4 * s) + 3 * s / 2, .5 * (-12 + o), -13.5],
rotation: [0, Math.PI, 0],
children: (0,
Ig.jsx)("group", {
position: [-a / 2, 0, 0],
rotation: [0, Math.PI, 0],
children: (0,
Ig.jsx)(yT, {
sizePannel: 0,
stalenWidth: a
})
})
})]
})
})
}
const bT = new WeakMap;
class _T extends hf {
constructor(e) {
super(e),
this.decoderPath = "",
this.decoderConfig = {},
this.decoderBinary = null,
this.decoderPending = null,
this.workerLimit = 4,
this.workerPool = [],
this.workerNextTaskID = 1,
this.workerSourceURL = "",
this.defaultAttributeIDs = {
position: "POSITION",
normal: "NORMAL",
color: "COLOR",
uv: "TEX_COORD"
},
this.defaultAttributeTypes = {
position: "Float32Array",
normal: "Float32Array",
color: "Float32Array",
uv: "Float32Array"
}
}
setDecoderPath(e) {
return this.decoderPath = e,
this
}
setDecoderConfig(e) {
return this.decoderConfig = e,
this
}
setWorkerLimit(e) {
return this.workerLimit = e,
this
}
load(e, t, n, r) {
const i = new mf(this.manager);
i.setPath(this.path),
i.setResponseType("arraybuffer"),
i.setRequestHeader(this.requestHeader),
i.setWithCredentials(this.withCredentials),
i.load(e, (e => {
const n = {
attributeIDs: this.defaultAttributeIDs,
attributeTypes: this.defaultAttributeTypes,
useUniqueIDs: !1
};
this.decodeGeometry(e, n).then(t).catch(r)
}
), n, r)
}
decodeDracoFile(e, t, n, r) {
const i = {
attributeIDs: n || this.defaultAttributeIDs,
attributeTypes: r || this.defaultAttributeTypes,
useUniqueIDs: !!n
};
this.decodeGeometry(e, i).then(t)
}
decodeGeometry(e, t) {
for (const o in t.attributeTypes) {
const e = t.attributeTypes[o];
void 0 !== e.BYTES_PER_ELEMENT && (t.attributeTypes[o] = e.name)
}
const n = JSON.stringify(t);
if (bT.has(e)) {
const t = bT.get(e);
if (t.key === n)
return t.promise;
if (0 === e.byteLength)
throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")
}
let r;
const i = this.workerNextTaskID++
, s = e.byteLength
, a = this._getWorker(i, s).then((n => (r = n,
new Promise(( (n, s) => {
r._callbacks[i] = {
resolve: n,
reject: s
},
r.postMessage({
type: "decode",
id: i,
taskConfig: t,
buffer: e
}, [e])
}
))))).then((e => this._createGeometry(e.geometry)));
return a.catch(( () => !0)).then(( () => {
r && i && this._releaseTask(r, i)
}
)),
bT.set(e, {
key: n,
promise: a
}),
a
}
_createGeometry(e) {
const t = new Wa;
e.index && t.setIndex(new Ta(e.index.array,1));
for (let n = 0; n < e.attributes.length; n++) {
const r = e.attributes[n]
, i = r.name
, s = r.array
, a = r.itemSize;
t.setAttribute(i, new Ta(s,a))
}
return t
}
_loadLibrary(e, t) {
const n = new mf(this.manager);
return n.setPath(this.decoderPath),
n.setResponseType(t),
n.setWithCredentials(this.withCredentials),
new Promise(( (t, r) => {
n.load(e, t, void 0, r)
}
))
}
preload() {
return this._initDecoder(),
this
}
_initDecoder() {
if (this.decoderPending)
return this.decoderPending;
const e = "object" !== typeof WebAssembly || "js" === this.decoderConfig.type
, t = [];
return e ? t.push(this._loadLibrary("draco_decoder.js", "text")) : (t.push(this._loadLibrary("draco_wasm_wrapper.js", "text")),
t.push(this._loadLibrary("draco_decoder.wasm", "arraybuffer"))),
this.decoderPending = Promise.all(t).then((t => {
const n = t[0];
e || (this.decoderConfig.wasmBinary = t[1]);
const r = wT.toString()
, i = ["/* draco decoder */", n, "", "/* worker */", r.substring(r.indexOf("{") + 1, r.lastIndexOf("}"))].join("\n");
this.workerSourceURL = URL.createObjectURL(new Blob([i]))
}
)),
this.decoderPending
}
_getWorker(e, t) {
return this._initDecoder().then(( () => {
if (this.workerPool.length < this.workerLimit) {
const e = new Worker(this.workerSourceURL);
e._callbacks = {},
e._taskCosts = {},
e._taskLoad = 0,
e.postMessage({
type: "init",
decoderConfig: this.decoderConfig
}),
e.onmessage = function(t) {
const n = t.data;
switch (n.type) {
case "decode":
e._callbacks[n.id].resolve(n);
break;
case "error":
e._callbacks[n.id].reject(n);
break;
default:
console.error('THREE.DRACOLoader: Unexpected message, "' + n.type + '"')
}
}
,
this.workerPool.push(e)
} else
this.workerPool.sort((function(e, t) {
return e._taskLoad > t._taskLoad ? -1 : 1
}
));
const n = this.workerPool[this.workerPool.length - 1];
return n._taskCosts[e] = t,
n._taskLoad += t,
n
}
))
}
_releaseTask(e, t) {
e._taskLoad -= e._taskCosts[t],
delete e._callbacks[t],
delete e._taskCosts[t]
}
debug() {
console.log("Task load: ", this.workerPool.map((e => e._taskLoad)))
}
dispose() {
for (let e = 0; e < this.workerPool.length; ++e)
this.workerPool[e].terminate();
return this.workerPool.length = 0,
this
}
}
function wT() {
let e, t;
function n(e, t, n, r, i, s) {
const a = s.num_components()
, o = n.num_points() * a
, l = o * i.BYTES_PER_ELEMENT
, c = function(e, t) {
switch (t) {
case Float32Array:
return e.DT_FLOAT32;
case Int8Array:
return e.DT_INT8;
case Int16Array:
return e.DT_INT16;
case Int32Array:
return e.DT_INT32;
case Uint8Array:
return e.DT_UINT8;
case Uint16Array:
return e.DT_UINT16;
case Uint32Array:
return e.DT_UINT32
}
}(e, i)
, u = e._malloc(l);
t.GetAttributeDataArrayForAllPoints(n, s, c, l, u);
const d = new i(e.HEAPF32.buffer,u,o).slice();
return e._free(u),
{
name: r,
array: d,
itemSize: a
}
}
onmessage = function(r) {
const i = r.data;
switch (i.type) {
case "init":
e = i.decoderConfig,
t = new Promise((function(t) {
e.onModuleLoaded = function(e) {
t({
draco: e
})
}
,
DracoDecoderModule(e)
}
));
break;
case "decode":
const r = i.buffer
, s = i.taskConfig;
t.then((e => {
const t = e.draco
, a = new t.Decoder
, o = new t.DecoderBuffer;
o.Init(new Int8Array(r), r.byteLength);
try {
const e = function(e, t, r, i) {
const s = i.attributeIDs
, a = i.attributeTypes;
let o, l;
const c = t.GetEncodedGeometryType(r);
if (c === e.TRIANGULAR_MESH)
o = new e.Mesh,
l = t.DecodeBufferToMesh(r, o);
else {
if (c !== e.POINT_CLOUD)
throw new Error("THREE.DRACOLoader: Unexpected geometry type.");
o = new e.PointCloud,
l = t.DecodeBufferToPointCloud(r, o)
}
if (!l.ok() || 0 === o.ptr)
throw new Error("THREE.DRACOLoader: Decoding failed: " + l.error_msg());
const u = {
index: null,
attributes: []
};
for (const d in s) {
const r = self[a[d]];
let l, c;
if (i.useUniqueIDs)
c = s[d],
l = t.GetAttributeByUniqueId(o, c);
else {
if (c = t.GetAttributeId(o, e[s[d]]),
-1 === c)
continue;
l = t.GetAttribute(o, c)
}
u.attributes.push(n(e, t, o, d, r, l))
}
c === e.TRIANGULAR_MESH && (u.index = function(e, t, n) {
const r = n.num_faces()
, i = 3 * r
, s = 4 * i
, a = e._malloc(s);
t.GetTrianglesUInt32Array(n, s, a);
const o = new Uint32Array(e.HEAPF32.buffer,a,i).slice();
return e._free(a),
{
array: o,
itemSize: 1
}
}(e, t, o));
return e.destroy(o),
u
}(t, a, o, s)
, r = e.attributes.map((e => e.array.buffer));
e.index && r.push(e.index.array.buffer),
self.postMessage({
type: "decode",
id: i.id,
geometry: e
}, r)
} catch (iy) {
console.error(iy),
self.postMessage({
type: "error",
id: i.id,
error: iy.message
})
} finally {
t.destroy(o),
t.destroy(a)
}
}
))
}
}
}
let ST;
const AT = () => {
if (ST)
return ST;
const e = new Uint8Array([0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 3, 2, 0, 0, 5, 3, 1, 0, 1, 12, 1, 0, 10, 22, 2, 12, 0, 65, 0, 65, 0, 65, 0, 252, 10, 0, 0, 11, 7, 0, 65, 0, 253, 15, 26, 11])
, t = new Uint8Array([32, 0, 65, 253, 3, 1, 2, 34, 4, 106, 6, 5, 11, 8, 7, 20, 13, 33, 12, 16, 128, 9, 116, 64, 19, 113, 127, 15, 10, 21, 22, 14, 255, 66, 24, 54, 136, 107, 18, 23, 192, 26, 114, 118, 132, 17, 77, 101, 130, 144, 27, 87, 131, 44, 45, 74, 156, 154, 70, 167]);
if ("object" !== typeof WebAssembly)
return {
supported: !1
};
let n, r = "B9h9z9tFBBBF8fL9gBB9gLaaaaaFa9gEaaaB9gFaFa9gEaaaFaEMcBFFFGGGEIIILF9wFFFLEFBFKNFaFCx/IFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBF8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBGy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBEn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBIi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBKI9z9iqlBOc+x8ycGBM/qQFTa8jUUUUBCU/EBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAGTkUUUBRNCUoBAG9uC/wgBZHKCUGAKCUG9JyRVAECFJRICBRcGXEXAcAF9PQFAVAFAclAcAVJAF9JyRMGXGXAG9FQBAMCbJHKC9wZRSAKCIrCEJCGrRQANCUGJRfCBRbAIRTEXGXAOATlAQ9PQBCBRISEMATAQJRIGXAS9FQBCBRtCBREEXGXAOAIlCi9PQBCBRISLMANCU/CBJAEJRKGXGXGXGXGXATAECKrJ2BBAtCKZrCEZfIBFGEBMAKhB83EBAKCNJhB83EBSEMAKAI2BIAI2BBHmCKrHYAYCE6HYy86BBAKCFJAICIJAYJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCGJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCEJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCIJAYAmJHY2BBAI2BFHmCKrHPAPCE6HPy86BBAKCLJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCKJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCOJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCNJAYAmJHY2BBAI2BGHmCKrHPAPCE6HPy86BBAKCVJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCcJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCMJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCSJAYAmJHm2BBAI2BEHICKrHYAYCE6HYy86BBAKCQJAmAYJHm2BBAICIrCEZHYAYCE6HYy86BBAKCfJAmAYJHm2BBAICGrCEZHYAYCE6HYy86BBAKCbJAmAYJHK2BBAICEZHIAICE6HIy86BBAKAIJRISGMAKAI2BNAI2BBHmCIrHYAYCb6HYy86BBAKCFJAICNJAYJHY2BBAmCbZHmAmCb6Hmy86BBAKCGJAYAmJHm2BBAI2BFHYCIrHPAPCb6HPy86BBAKCEJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCIJAmAYJHm2BBAI2BGHYCIrHPAPCb6HPy86BBAKCLJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCKJAmAYJHm2BBAI2BEHYCIrHPAPCb6HPy86BBAKCOJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCNJAmAYJHm2BBAI2BIHYCIrHPAPCb6HPy86BBAKCVJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCcJAmAYJHm2BBAI2BLHYCIrHPAPCb6HPy86BBAKCMJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCSJAmAYJHm2BBAI2BKHYCIrHPAPCb6HPy86BBAKCQJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCfJAmAYJHm2BBAI2BOHICIrHYAYCb6HYy86BBAKCbJAmAYJHK2BBAICbZHIAICb6HIy86BBAKAIJRISFMAKAI8pBB83BBAKCNJAICNJ8pBB83BBAICTJRIMAtCGJRtAECTJHEAS9JQBMMGXAIQBCBRISEMGXAM9FQBANAbJ2BBRtCBRKAfREEXAEANCU/CBJAKJ2BBHTCFrCBATCFZl9zAtJHt86BBAEAGJREAKCFJHKAM9HQBMMAfCFJRfAIRTAbCFJHbAG9HQBMMABAcAG9sJANCUGJAMAG9sTkUUUBpANANCUGJAMCaJAG9sJAGTkUUUBpMAMCBAIyAcJRcAIQBMC9+RKSFMCBC99AOAIlAGCAAGCA9Ly6yRKMALCU/EBJ8kUUUUBAKM+OmFTa8jUUUUBCoFlHL8kUUUUBC9+RKGXAFCE9uHOCtJAI9LQBCaRKAE2BBHNC/wFZC/gF9HQBANCbZHVCF9LQBALCoBJCgFCUFT+JUUUBpALC84Jha83EBALC8wJha83EBALC8oJha83EBALCAJha83EBALCiJha83EBALCTJha83EBALha83ENALha83EBAEAIJC9wJRcAECFJHNAOJRMGXAF9FQBCQCbAVCF6yRSABRECBRVCBRQCBRfCBRICBRKEXGXAMAcuQBC9+RKSEMGXGXAN2BBHOC/vF9LQBALCoBJAOCIrCa9zAKJCbZCEWJHb8oGIRTAb8oGBRtGXAOCbZHbAS9PQBALAOCa9zAIJCbZCGWJ8oGBAVAbyROAb9FRbGXGXAGCG9HQBABAt87FBABCIJAO87FBABCGJAT87FBSFMAEAtjGBAECNJAOjGBAECIJATjGBMAVAbJRVALCoBJAKCEWJHmAOjGBAmATjGIALAICGWJAOjGBALCoBJAKCFJCbZHKCEWJHTAtjGBATAOjGIAIAbJRIAKCFJRKSGMGXGXAbCb6QBAQAbJAbC989zJCFJRQSFMAM1BBHbCgFZROGXGXAbCa9MQBAMCFJRMSFMAM1BFHbCgBZCOWAOCgBZqROGXAbCa9MQBAMCGJRMSFMAM1BGHbCgBZCfWAOqROGXAbCa9MQBAMCEJRMSFMAM1BEHbCgBZCdWAOqROGXAbCa9MQBAMCIJRMSFMAM2BIC8cWAOqROAMCLJRMMAOCFrCBAOCFZl9zAQJRQMGXGXAGCG9HQBABAt87FBABCIJAQ87FBABCGJAT87FBSFMAEAtjGBAECNJAQjGBAECIJATjGBMALCoBJAKCEWJHOAQjGBAOATjGIALAICGWJAQjGBALCoBJAKCFJCbZHKCEWJHOAtjGBAOAQjGIAICFJRIAKCFJRKSFMGXAOCDF9LQBALAIAcAOCbZJ2BBHbCIrHTlCbZCGWJ8oGBAVCFJHtATyROALAIAblCbZCGWJ8oGBAtAT9FHmJHtAbCbZHTyRbAT9FRTGXGXAGCG9HQBABAV87FBABCIJAb87FBABCGJAO87FBSFMAEAVjGBAECNJAbjGBAECIJAOjGBMALAICGWJAVjGBALCoBJAKCEWJHYAOjGBAYAVjGIALAICFJHICbZCGWJAOjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAIAmJCbZHICGWJAbjGBALCoBJAKCGJCbZHKCEWJHOAVjGBAOAbjGIAKCFJRKAIATJRIAtATJRVSFMAVCBAM2BBHYyHTAOC/+F6HPJROAYCbZRtGXGXAYCIrHmQBAOCFJRbSFMAORbALAIAmlCbZCGWJ8oGBROMGXGXAtQBAbCFJRVSFMAbRVALAIAYlCbZCGWJ8oGBRbMGXGXAP9FQBAMCFJRYSFMAM1BFHYCgFZRTGXGXAYCa9MQBAMCGJRYSFMAM1BGHYCgBZCOWATCgBZqRTGXAYCa9MQBAMCEJRYSFMAM1BEHYCgBZCfWATqRTGXAYCa9MQBAMCIJRYSFMAM1BIHYCgBZCdWATqRTGXAYCa9MQBAMCLJRYSFMAMCKJRYAM2BLC8cWATqRTMATCFrCBATCFZl9zAQJHQRTMGXGXAmCb6QBAYRPSFMAY1BBHMCgFZROGXGXAMCa9MQBAYCFJRPSFMAY1BFHMCgBZCOWAOCgBZqROGXAMCa9MQBAYCGJRPSFMAY1BGHMCgBZCfWAOqROGXAMCa9MQBAYCEJRPSFMAY1BEHMCgBZCdWAOqROGXAMCa9MQBAYCIJRPSFMAYCLJRPAY2BIC8cWAOqROMAOCFrCBAOCFZl9zAQJHQROMGXGXAtCb6QBAPRMSFMAP1BBHMCgFZRbGXGXAMCa9MQBAPCFJRMSFMAP1BFHMCgBZCOWAbCgBZqRbGXAMCa9MQBAPCGJRMSFMAP1BGHMCgBZCfWAbqRbGXAMCa9MQBAPCEJRMSFMAP1BEHMCgBZCdWAbqRbGXAMCa9MQBAPCIJRMSFMAPCLJRMAP2BIC8cWAbqRbMAbCFrCBAbCFZl9zAQJHQRbMGXGXAGCG9HQBABAT87FBABCIJAb87FBABCGJAO87FBSFMAEATjGBAECNJAbjGBAECIJAOjGBMALCoBJAKCEWJHYAOjGBAYATjGIALAICGWJATjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAICFJHICbZCGWJAOjGBALCoBJAKCGJCbZCEWJHOATjGBAOAbjGIALAIAm9FAmCb6qJHICbZCGWJAbjGBAIAt9FAtCb6qJRIAKCEJRKMANCFJRNABCKJRBAECSJREAKCbZRKAICbZRIAfCEJHfAF9JQBMMCBC99AMAc6yRKMALCoFJ8kUUUUBAKM/tIFGa8jUUUUBCTlRLC9+RKGXAFCLJAI9LQBCaRKAE2BBC/+FZC/QF9HQBALhB83ENAECFJRKAEAIJC98JREGXAF9FQBGXAGCG6QBEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMALCNJAICFZCGWqHGAICGrCBAICFrCFZl9zAG8oGBJHIjGBABAIjGBABCIJRBAFCaJHFQBSGMMEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMABAICGrCBAICFrCFZl9zALCNJAICFZCGWqHI8oGBJHG87FBAIAGjGBABCGJRBAFCaJHFQBMMCBC99AKAE6yRKMAKM+lLKFaF99GaG99FaG99GXGXAGCI9HQBAF9FQFEXGXGX9DBBB8/9DBBB+/ABCGJHG1BB+yAB1BBHE+yHI+L+TABCFJHL1BBHK+yHO+L+THN9DBBBB9gHVyAN9DBB/+hANAN+U9DBBBBANAVyHcAc+MHMAECa3yAI+SHIAI+UAcAMAKCa3yAO+SHcAc+U+S+S+R+VHO+U+SHN+L9DBBB9P9d9FQBAN+oRESFMCUUUU94REMAGAE86BBGXGX9DBBB8/9DBBB+/Ac9DBBBB9gyAcAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMALAG86BBGXGX9DBBB8/9DBBB+/AI9DBBBB9gyAIAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMABAG86BBABCIJRBAFCaJHFQBSGMMAF9FQBEXGXGX9DBBB8/9DBBB+/ABCIJHG8uFB+yAB8uFBHE+yHI+L+TABCGJHL8uFBHK+yHO+L+THN9DBBBB9gHVyAN9DB/+g6ANAN+U9DBBBBANAVyHcAc+MHMAECa3yAI+SHIAI+UAcAMAKCa3yAO+SHcAc+U+S+S+R+VHO+U+SHN+L9DBBB9P9d9FQBAN+oRESFMCUUUU94REMAGAE87FBGXGX9DBBB8/9DBBB+/Ac9DBBBB9gyAcAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMALAG87FBGXGX9DBBB8/9DBBB+/AI9DBBBB9gyAIAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMABAG87FBABCNJRBAFCaJHFQBMMM/SEIEaE99EaF99GXAF9FQBCBREABRIEXGXGX9D/zI818/AICKJ8uFBHLCEq+y+VHKAI8uFB+y+UHO9DB/+g6+U9DBBB8/9DBBB+/AO9DBBBB9gy+SHN+L9DBBB9P9d9FQBAN+oRVSFMCUUUU94RVMAICIJ8uFBRcAICGJ8uFBRMABALCFJCEZAEqCFWJAV87FBGXGXAKAM+y+UHN9DB/+g6+U9DBBB8/9DBBB+/AN9DBBBB9gy+SHS+L9DBBB9P9d9FQBAS+oRMSFMCUUUU94RMMABALCGJCEZAEqCFWJAM87FBGXGXAKAc+y+UHK9DB/+g6+U9DBBB8/9DBBB+/AK9DBBBB9gy+SHS+L9DBBB9P9d9FQBAS+oRcSFMCUUUU94RcMABALCaJCEZAEqCFWJAc87FBGXGX9DBBU8/AOAO+U+TANAN+U+TAKAK+U+THO9DBBBBAO9DBBBB9gy+R9DB/+g6+U9DBBB8/+SHO+L9DBBB9P9d9FQBAO+oRcSFMCUUUU94RcMABALCEZAEqCFWJAc87FBAICNJRIAECIJREAFCaJHFQBMMM9JBGXAGCGrAF9sHF9FQBEXABAB8oGBHGCNWCN91+yAGCi91CnWCUUU/8EJ+++U84GBABCIJRBAFCaJHFQBMMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEM/lFFFaGXGXAFABqCEZ9FQBABRESFMGXGXAGCT9PQBABRESFMABREEXAEAF8oGBjGBAECIJAFCIJ8oGBjGBAECNJAFCNJ8oGBjGBAECSJAFCSJ8oGBjGBAECTJREAFCTJRFAGC9wJHGCb9LQBMMAGCI9JQBEXAEAF8oGBjGBAFCIJRFAECIJREAGC98JHGCE9LQBMMGXAG9FQBEXAEAF2BB86BBAECFJREAFCFJRFAGCaJHGQBMMABMoFFGaGXGXABCEZ9FQBABRESFMAFCgFZC+BwsN9sRIGXGXAGCT9PQBABRESFMABREEXAEAIjGBAECSJAIjGBAECNJAIjGBAECIJAIjGBAECTJREAGC9wJHGCb9LQBMMAGCI9JQBEXAEAIjGBAECIJREAGC98JHGCE9LQBMMGXAG9FQBEXAEAF86BBAECFJREAGCaJHGQBMMABMMMFBCUNMIT9kBB";
WebAssembly.validate(e) && (r = "B9h9z9tFBBBFiI9gBB9gLaaaaaFa9gEaaaB9gFaFaEMcBBFBFFGGGEILF9wFFFLEFBFKNFaFCx/aFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBG8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBIy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBKi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBOn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBNI9z9iqlBVc+N9IcIBTEM9+FLa8jUUUUBCTlRBCBRFEXCBRGCBREEXABCNJAGJAECUaAFAGrCFZHIy86BBAEAIJREAGCFJHGCN9HQBMAFCx+YUUBJAE86BBAFCEWCxkUUBJAB8pEN83EBAFCFJHFCUG9HQBMMk8lLbaE97F9+FaL978jUUUUBCU/KBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAG/8cBBCUoBAG9uC/wgBZHKCUGAKCUG9JyRNAECFJRKCBRVGXEXAVAF9PQFANAFAVlAVANJAF9JyRcGXGXAG9FQBAcCbJHIC9wZHMCE9sRSAMCFWRQAICIrCEJCGrRfCBRbEXAKRTCBRtGXEXGXAOATlAf9PQBCBRKSLMALCU/CBJAtAM9sJRmATAfJRKCBREGXAMCoB9JQBAOAKlC/gB9JQBCBRIEXAmAIJREGXGXGXGXGXATAICKrJ2BBHYCEZfIBFGEBMAECBDtDMIBSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMIBAKCTJRKMGXGXGXGXGXAYCGrCEZfIBFGEBMAECBDtDMITSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMITAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMITAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMITAKCTJRKMGXGXGXGXGXAYCIrCEZfIBFGEBMAECBDtDMIASEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIAAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIAAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMIAAKCTJRKMGXGXGXGXGXAYCKrfIBFGEBMAECBDtDMI8wSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHYCEWCxkUUBJDBEBAYCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHYCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMI8wAKCIJAeDeBJAYCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHYCEWCxkUUBJDBEBAYCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHYCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMI8wAKCNJAeDeBJAYCx+YUUBJ2BBJRKSFMAEAKDBBBDMI8wAKCTJRKMAICoBJREAICUFJAM9LQFAERIAOAKlC/fB9LQBMMGXAEAM9PQBAECErRIEXGXAOAKlCi9PQBCBRKSOMAmAEJRYGXGXGXGXGXATAECKrJ2BBAICKZrCEZfIBFGEBMAYCBDtDMIBSEMAYAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAYAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAYAKDBBBDMIBAKCTJRKMAICGJRIAECTJHEAM9JQBMMGXAK9FQBAKRTAtCFJHtCI6QGSFMMCBRKSEMGXAM9FQBALCUGJAbJREALAbJDBGBReCBRYEXAEALCU/CBJAYJHIDBIBHdCFD9tAdCFDbHPD9OD9hD9RHdAIAMJDBIBH8ZCFD9tA8ZAPD9OD9hD9RH8ZDQBTFtGmEYIPLdKeOnHpAIAQJDBIBHyCFD9tAyAPD9OD9hD9RHyAIASJDBIBH8cCFD9tA8cAPD9OD9hD9RH8cDQBTFtGmEYIPLdKeOnH8dDQBFTtGEmYILPdKOenHPAPDQBFGEBFGEBFGEBFGEAeD9uHeDyBjGBAEAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeApA8dDQNVi8ZcMpySQ8c8dfb8e8fHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeAdA8ZDQNiV8ZcpMyS8cQ8df8eb8fHdAyA8cDQNiV8ZcpMyS8cQ8df8eb8fH8ZDQBFTtGEmYILPdKOenHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeAdA8ZDQNVi8ZcMpySQ8c8dfb8e8fHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJREAYCTJHYAM9JQBMMAbCIJHbAG9JQBMMABAVAG9sJALCUGJAcAG9s/8cBBALALCUGJAcCaJAG9sJAG/8cBBMAcCBAKyAVJRVAKQBMC9+RKSFMCBC99AOAKlAGCAAGCA9Ly6yRKMALCU/KBJ8kUUUUBAKMNBT+BUUUBM+KmFTa8jUUUUBCoFlHL8kUUUUBC9+RKGXAFCE9uHOCtJAI9LQBCaRKAE2BBHNC/wFZC/gF9HQBANCbZHVCF9LQBALCoBJCgFCUF/8MBALC84Jha83EBALC8wJha83EBALC8oJha83EBALCAJha83EBALCiJha83EBALCTJha83EBALha83ENALha83EBAEAIJC9wJRcAECFJHNAOJRMGXAF9FQBCQCbAVCF6yRSABRECBRVCBRQCBRfCBRICBRKEXGXAMAcuQBC9+RKSEMGXGXAN2BBHOC/vF9LQBALCoBJAOCIrCa9zAKJCbZCEWJHb8oGIRTAb8oGBRtGXAOCbZHbAS9PQBALAOCa9zAIJCbZCGWJ8oGBAVAbyROAb9FRbGXGXAGCG9HQBABAt87FBABCIJAO87FBABCGJAT87FBSFMAEAtjGBAECNJAOjGBAECIJATjGBMAVAbJRVALCoBJAKCEWJHmAOjGBAmATjGIALAICGWJAOjGBALCoBJAKCFJCbZHKCEWJHTAtjGBATAOjGIAIAbJRIAKCFJRKSGMGXGXAbCb6QBAQAbJAbC989zJCFJRQSFMAM1BBHbCgFZROGXGXAbCa9MQBAMCFJRMSFMAM1BFHbCgBZCOWAOCgBZqROGXAbCa9MQBAMCGJRMSFMAM1BGHbCgBZCfWAOqROGXAbCa9MQBAMCEJRMSFMAM1BEHbCgBZCdWAOqROGXAbCa9MQBAMCIJRMSFMAM2BIC8cWAOqROAMCLJRMMAOCFrCBAOCFZl9zAQJRQMGXGXAGCG9HQBABAt87FBABCIJAQ87FBABCGJAT87FBSFMAEAtjGBAECNJAQjGBAECIJATjGBMALCoBJAKCEWJHOAQjGBAOATjGIALAICGWJAQjGBALCoBJAKCFJCbZHKCEWJHOAtjGBAOAQjGIAICFJRIAKCFJRKSFMGXAOCDF9LQBALAIAcAOCbZJ2BBHbCIrHTlCbZCGWJ8oGBAVCFJHtATyROALAIAblCbZCGWJ8oGBAtAT9FHmJHtAbCbZHTyRbAT9FRTGXGXAGCG9HQBABAV87FBABCIJAb87FBABCGJAO87FBSFMAEAVjGBAECNJAbjGBAECIJAOjGBMALAICGWJAVjGBALCoBJAKCEWJHYAOjGBAYAVjGIALAICFJHICbZCGWJAOjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAIAmJCbZHICGWJAbjGBALCoBJAKCGJCbZHKCEWJHOAVjGBAOAbjGIAKCFJRKAIATJRIAtATJRVSFMAVCBAM2BBHYyHTAOC/+F6HPJROAYCbZRtGXGXAYCIrHmQBAOCFJRbSFMAORbALAIAmlCbZCGWJ8oGBROMGXGXAtQBAbCFJRVSFMAbRVALAIAYlCbZCGWJ8oGBRbMGXGXAP9FQBAMCFJRYSFMAM1BFHYCgFZRTGXGXAYCa9MQBAMCGJRYSFMAM1BGHYCgBZCOWATCgBZqRTGXAYCa9MQBAMCEJRYSFMAM1BEHYCgBZCfWATqRTGXAYCa9MQBAMCIJRYSFMAM1BIHYCgBZCdWATqRTGXAYCa9MQBAMCLJRYSFMAMCKJRYAM2BLC8cWATqRTMATCFrCBATCFZl9zAQJHQRTMGXGXAmCb6QBAYRPSFMAY1BBHMCgFZROGXGXAMCa9MQBAYCFJRPSFMAY1BFHMCgBZCOWAOCgBZqROGXAMCa9MQBAYCGJRPSFMAY1BGHMCgBZCfWAOqROGXAMCa9MQBAYCEJRPSFMAY1BEHMCgBZCdWAOqROGXAMCa9MQBAYCIJRPSFMAYCLJRPAY2BIC8cWAOqROMAOCFrCBAOCFZl9zAQJHQROMGXGXAtCb6QBAPRMSFMAP1BBHMCgFZRbGXGXAMCa9MQBAPCFJRMSFMAP1BFHMCgBZCOWAbCgBZqRbGXAMCa9MQBAPCGJRMSFMAP1BGHMCgBZCfWAbqRbGXAMCa9MQBAPCEJRMSFMAP1BEHMCgBZCdWAbqRbGXAMCa9MQBAPCIJRMSFMAPCLJRMAP2BIC8cWAbqRbMAbCFrCBAbCFZl9zAQJHQRbMGXGXAGCG9HQBABAT87FBABCIJAb87FBABCGJAO87FBSFMAEATjGBAECNJAbjGBAECIJAOjGBMALCoBJAKCEWJHYAOjGBAYATjGIALAICGWJATjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAICFJHICbZCGWJAOjGBALCoBJAKCGJCbZCEWJHOATjGBAOAbjGIALAIAm9FAmCb6qJHICbZCGWJAbjGBAIAt9FAtCb6qJRIAKCEJRKMANCFJRNABCKJRBAECSJREAKCbZRKAICbZRIAfCEJHfAF9JQBMMCBC99AMAc6yRKMALCoFJ8kUUUUBAKM/tIFGa8jUUUUBCTlRLC9+RKGXAFCLJAI9LQBCaRKAE2BBC/+FZC/QF9HQBALhB83ENAECFJRKAEAIJC98JREGXAF9FQBGXAGCG6QBEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMALCNJAICFZCGWqHGAICGrCBAICFrCFZl9zAG8oGBJHIjGBABAIjGBABCIJRBAFCaJHFQBSGMMEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMABAICGrCBAICFrCFZl9zALCNJAICFZCGWqHI8oGBJHG87FBAIAGjGBABCGJRBAFCaJHFQBMMCBC99AKAE6yRKMAKM/dLEK97FaF97GXGXAGCI9HQBAF9FQFCBRGEXABABDBBBHECiD+rFCiD+sFD/6FHIAECND+rFCiD+sFD/6FAID/gFAECTD+rFCiD+sFD/6FHLD/gFD/kFD/lFHKCBDtD+2FHOAICUUUU94DtHND9OD9RD/kFHI9DBB/+hDYAIAID/mFAKAKD/mFALAOALAND9OD9RD/kFHIAID/mFD/kFD/kFD/jFD/nFHLD/mF9DBBX9LDYHOD/kFCgFDtD9OAECUUU94DtD9OD9QAIALD/mFAOD/kFCND+rFCU/+EDtD9OD9QAKALD/mFAOD/kFCTD+rFCUU/8ODtD9OD9QDMBBABCTJRBAGCIJHGAF9JQBSGMMAF9FQBCBRGEXABCTJHVAVDBBBHECBDtHOCUU98D8cFCUU98D8cEHND9OABDBBBHKAEDQILKOSQfbPden8c8d8e8fCggFDtD9OD/6FAKAEDQBFGENVcMTtmYi8ZpyHECTD+sFD/6FHID/gFAECTD+rFCTD+sFD/6FHLD/gFD/kFD/lFHE9DB/+g6DYALAEAOD+2FHOALCUUUU94DtHcD9OD9RD/kFHLALD/mFAEAED/mFAIAOAIAcD9OD9RD/kFHEAED/mFD/kFD/kFD/jFD/nFHID/mF9DBBX9LDYHOD/kFCTD+rFALAID/mFAOD/kFCggEDtD9OD9QHLAEAID/mFAOD/kFCaDbCBDnGCBDnECBDnKCBDnOCBDncCBDnMCBDnfCBDnbD9OHEDQNVi8ZcMpySQ8c8dfb8e8fD9QDMBBABAKAND9OALAEDQBFTtGEmYILPdKOenD9QDMBBABCAJRBAGCIJHGAF9JQBMMM/hEIGaF97FaL978jUUUUBCTlREGXAF9FQBCBRIEXAEABDBBBHLABCTJHKDBBBHODQILKOSQfbPden8c8d8e8fHNCTD+sFHVCID+rFDMIBAB9DBBU8/DY9D/zI818/DYAVCEDtD9QD/6FD/nFHVALAODQBFGENVcMTtmYi8ZpyHLCTD+rFCTD+sFD/6FD/mFHOAOD/mFAVALCTD+sFD/6FD/mFHcAcD/mFAVANCTD+rFCTD+sFD/6FD/mFHNAND/mFD/kFD/kFD/lFCBDtD+4FD/jF9DB/+g6DYHVD/mF9DBBX9LDYHLD/kFCggEDtHMD9OAcAVD/mFALD/kFCTD+rFD9QHcANAVD/mFALD/kFCTD+rFAOAVD/mFALD/kFAMD9OD9QHVDQBFTtGEmYILPdKOenHLD8dBAEDBIBDyB+t+J83EBABCNJALD8dFAEDBIBDyF+t+J83EBAKAcAVDQNVi8ZcMpySQ8c8dfb8e8fHVD8dBAEDBIBDyG+t+J83EBABCiJAVD8dFAEDBIBDyE+t+J83EBABCAJRBAICIJHIAF9JQBMMM9jFF97GXAGCGrAF9sHG9FQBCBRFEXABABDBBBHECND+rFCND+sFD/6FAECiD+sFCnD+rFCUUU/8EDtD+uFD/mFDMBBABCTJRBAFCIJHFAG9JQBMMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEMMMFBCUNMIT9tBB");
const i = WebAssembly.instantiate(function(e) {
const n = new Uint8Array(e.length);
for (let t = 0; t < e.length; ++t) {
const r = e.charCodeAt(t);
n[t] = r > 96 ? r - 71 : r > 64 ? r - 65 : r > 47 ? r + 4 : r > 46 ? 63 : 62
}
let r = 0;
for (let i = 0; i < e.length; ++i)
n[r++] = n[i] < 60 ? t[n[i]] : 64 * (n[i] - 60) + n[++i];
return n.buffer.slice(0, r)
}(r), {}).then((e => {
n = e.instance,
n.exports.__wasm_call_ctors()
}
));
function s(e, t, r, i, s, a) {
const o = n.exports.sbrk
, l = r + 3 & -4
, c = o(l * i)
, u = o(s.length)
, d = new Uint8Array(n.exports.memory.buffer);
d.set(s, u);
const h = e(c, r, i, u, s.length);
if (0 === h && a && a(c, l, i),
t.set(d.subarray(c, c + r * i)),
o(c - o(0)),
0 !== h)
throw new Error("Malformed buffer data: ".concat(h))
}
const a = {
0: "",
1: "meshopt_decodeFilterOct",
2: "meshopt_decodeFilterQuat",
3: "meshopt_decodeFilterExp",
NONE: "",
OCTAHEDRAL: "meshopt_decodeFilterOct",
QUATERNION: "meshopt_decodeFilterQuat",
EXPONENTIAL: "meshopt_decodeFilterExp"
}
, o = {
0: "meshopt_decodeVertexBuffer",
1: "meshopt_decodeIndexBuffer",
2: "meshopt_decodeIndexSequence",
ATTRIBUTES: "meshopt_decodeVertexBuffer",
TRIANGLES: "meshopt_decodeIndexBuffer",
INDICES: "meshopt_decodeIndexSequence"
};
return ST = {
ready: i,
supported: !0,
decodeVertexBuffer(e, t, r, i, o) {
s(n.exports.meshopt_decodeVertexBuffer, e, t, r, i, n.exports[a[o]])
},
decodeIndexBuffer(e, t, r, i) {
s(n.exports.meshopt_decodeIndexBuffer, e, t, r, i)
},
decodeIndexSequence(e, t, r, i) {
s(n.exports.meshopt_decodeIndexSequence, e, t, r, i)
},
decodeGltfBuffer(e, t, r, i, l, c) {
s(n.exports[o[l]], e, t, r, i, n.exports[a[c]])
}
},
ST
}
;
function MT(e, t) {
if (t === lr)
return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),
e;
if (t === ur || t === cr) {
let n = e.getIndex();
if (null === n) {
const t = []
, r = e.getAttribute("position");
if (void 0 === r)
return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),
e;
for (let e = 0; e < r.count; e++)
t.push(e);
e.setIndex(t),
n = e.getIndex()
}
const r = n.count - 2
, i = [];
if (n)
if (t === ur)
for (let e = 1; e <= r; e++)
i.push(n.getX(0)),
i.push(n.getX(e)),
i.push(n.getX(e + 1));
else
for (let e = 0; e < r; e++)
e % 2 === 0 ? (i.push(n.getX(e)),
i.push(n.getX(e + 1)),
i.push(n.getX(e + 2))) : (i.push(n.getX(e + 2)),
i.push(n.getX(e + 1)),
i.push(n.getX(e)));
i.length / 3 !== r && console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");
const s = e.clone();
return s.setIndex(i),
s.clearGroups(),
s
}
return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:", t),
e
}
const CT = parseInt(we.replace(/\D+/g, ""));
function ET(e) {
if ("undefined" !== typeof TextDecoder)
return (new TextDecoder).decode(e);
let t = "";
for (let n = 0, r = e.length; n < r; n++)
t += String.fromCharCode(e[n]);
try {
return decodeURIComponent(escape(t))
} catch (CB) {
return t
}
}
const TT = "srgb"
, RT = "srgb-linear";
class BT extends hf {
constructor(e) {
super(e),
this.dracoLoader = null,
this.ktx2Loader = null,
this.meshoptDecoder = null,
this.pluginCallbacks = [],
this.register((function(e) {
return new DT(e)
}
)),
this.register((function(e) {
return new jT(e)
}
)),
this.register((function(e) {
return new JT(e)
}
)),
this.register((function(e) {
return new XT(e)
}
)),
this.register((function(e) {
return new KT(e)
}
)),
this.register((function(e) {
return new OT(e)
}
)),
this.register((function(e) {
return new UT(e)
}
)),
this.register((function(e) {
return new zT(e)
}
)),
this.register((function(e) {
return new GT(e)
}
)),
this.register((function(e) {
return new NT(e)
}
)),
this.register((function(e) {
return new HT(e)
}
)),
this.register((function(e) {
return new FT(e)
}
)),
this.register((function(e) {
return new WT(e)
}
)),
this.register((function(e) {
return new VT(e)
}
)),
this.register((function(e) {
return new LT(e)
}
)),
this.register((function(e) {
return new qT(e)
}
)),
this.register((function(e) {
return new YT(e)
}
))
}
load(e, t, n, r) {
const i = this;
let s;
if ("" !== this.resourcePath)
s = this.resourcePath;
else if ("" !== this.path) {
const t = Gf.extractUrlBase(e);
s = Gf.resolveURL(t, this.path)
} else
s = Gf.extractUrlBase(e);
this.manager.itemStart(e);
const a = function(t) {
r ? r(t) : console.error(t),
i.manager.itemError(e),
i.manager.itemEnd(e)
}
, o = new mf(this.manager);
o.setPath(this.path),
o.setResponseType("arraybuffer"),
o.setRequestHeader(this.requestHeader),
o.setWithCredentials(this.withCredentials),
o.load(e, (function(n) {
try {
i.parse(n, s, (function(n) {
t(n),
i.manager.itemEnd(e)
}
), a)
} catch (CB) {
a(CB)
}
}
), n, a)
}
setDRACOLoader(e) {
return this.dracoLoader = e,
this
}
setDDSLoader() {
throw new Error('THREE.GLTFLoader: "MSFT_texture_dds" no longer supported. Please update to "KHR_texture_basisu".')
}
setKTX2Loader(e) {
return this.ktx2Loader = e,
this
}
setMeshoptDecoder(e) {
return this.meshoptDecoder = e,
this
}
register(e) {
return -1 === this.pluginCallbacks.indexOf(e) && this.pluginCallbacks.push(e),
this
}
unregister(e) {
return -1 !== this.pluginCallbacks.indexOf(e) && this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e), 1),
this
}
parse(e, t, n, r) {
let i;
const s = {}
, a = {};
if ("string" === typeof e)
i = JSON.parse(e);
else if (e instanceof ArrayBuffer) {
if (ET(new Uint8Array(e.slice(0, 4))) === QT) {
try {
s[kT.KHR_BINARY_GLTF] = new eR(e)
} catch (iy) {
return void (r && r(iy))
}
i = JSON.parse(s[kT.KHR_BINARY_GLTF].content)
} else
i = JSON.parse(ET(new Uint8Array(e)))
} else
i = e;
if (void 0 === i.asset || i.asset.version[0] < 2)
return void (r && r(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported.")));
const o = new CR(i,{
path: t || this.resourcePath || "",
crossOrigin: this.crossOrigin,
requestHeader: this.requestHeader,
manager: this.manager,
ktx2Loader: this.ktx2Loader,
meshoptDecoder: this.meshoptDecoder
});
o.fileLoader.setRequestHeader(this.requestHeader);
for (let l = 0; l < this.pluginCallbacks.length; l++) {
const e = this.pluginCallbacks[l](o);
e.name || console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),
a[e.name] = e,
s[e.name] = !0
}
if (i.extensionsUsed)
for (let l = 0; l < i.extensionsUsed.length; ++l) {
const e = i.extensionsUsed[l]
, t = i.extensionsRequired || [];
switch (e) {
case kT.KHR_MATERIALS_UNLIT:
s[e] = new IT;
break;
case kT.KHR_DRACO_MESH_COMPRESSION:
s[e] = new tR(i,this.dracoLoader);
break;
case kT.KHR_TEXTURE_TRANSFORM:
s[e] = new nR;
break;
case kT.KHR_MESH_QUANTIZATION:
s[e] = new rR;
break;
default:
t.indexOf(e) >= 0 && void 0 === a[e] && console.warn('THREE.GLTFLoader: Unknown extension "' + e + '".')
}
}
o.setExtensions(s),
o.setPlugins(a),
o.parse(n, r)
}
parseAsync(e, t) {
const n = this;
return new Promise((function(r, i) {
n.parse(e, t, r, i)
}
))
}
}
function PT() {
let e = {};
return {
get: function(t) {
return e[t]
},
add: function(t, n) {
e[t] = n
},
remove: function(t) {
delete e[t]
},
removeAll: function() {
e = {}
}
}
}
const kT = {
KHR_BINARY_GLTF: "KHR_binary_glTF",
KHR_DRACO_MESH_COMPRESSION: "KHR_draco_mesh_compression",
KHR_LIGHTS_PUNCTUAL: "KHR_lights_punctual",
KHR_MATERIALS_CLEARCOAT: "KHR_materials_clearcoat",
KHR_MATERIALS_DISPERSION: "KHR_materials_dispersion",
KHR_MATERIALS_IOR: "KHR_materials_ior",
KHR_MATERIALS_SHEEN: "KHR_materials_sheen",
KHR_MATERIALS_SPECULAR: "KHR_materials_specular",
KHR_MATERIALS_TRANSMISSION: "KHR_materials_transmission",
KHR_MATERIALS_IRIDESCENCE: "KHR_materials_iridescence",
KHR_MATERIALS_ANISOTROPY: "KHR_materials_anisotropy",
KHR_MATERIALS_UNLIT: "KHR_materials_unlit",
KHR_MATERIALS_VOLUME: "KHR_materials_volume",
KHR_TEXTURE_BASISU: "KHR_texture_basisu",
KHR_TEXTURE_TRANSFORM: "KHR_texture_transform",
KHR_MESH_QUANTIZATION: "KHR_mesh_quantization",
KHR_MATERIALS_EMISSIVE_STRENGTH: "KHR_materials_emissive_strength",
EXT_MATERIALS_BUMP: "EXT_materials_bump",
EXT_TEXTURE_WEBP: "EXT_texture_webp",
EXT_TEXTURE_AVIF: "EXT_texture_avif",
EXT_MESHOPT_COMPRESSION: "EXT_meshopt_compression",
EXT_MESH_GPU_INSTANCING: "EXT_mesh_gpu_instancing"
};
class LT {
constructor(e) {
this.parser = e,
this.name = kT.KHR_LIGHTS_PUNCTUAL,
this.cache = {
refs: {},
uses: {}
}
}
_markDefs() {
const e = this.parser
, t = this.parser.json.nodes || [];
for (let n = 0, r = t.length; n < r; n++) {
const r = t[n];
r.extensions && r.extensions[this.name] && void 0 !== r.extensions[this.name].light && e._addNodeRef(this.cache, r.extensions[this.name].light)
}
}
_loadLight(e) {
const t = this.parser
, n = "light:" + e;
let r = t.cache.get(n);
if (r)
return r;
const i = t.json
, s = ((i.extensions && i.extensions[this.name] || {}).lights || [])[e];
let a;
const o = new ga(16777215);
void 0 !== s.color && o.setRGB(s.color[0], s.color[1], s.color[2], RT);
const l = void 0 !== s.range ? s.range : 0;
switch (s.type) {
case "directional":
a = new Df(o),
a.target.position.set(0, 0, -1),
a.add(a.target);
break;
case "point":
a = new If(o),
a.distance = l;
break;
case "spot":
a = new Rf(o),
a.distance = l,
s.spot = s.spot || {},
s.spot.innerConeAngle = void 0 !== s.spot.innerConeAngle ? s.spot.innerConeAngle : 0,
s.spot.outerConeAngle = void 0 !== s.spot.outerConeAngle ? s.spot.outerConeAngle : Math.PI / 4,
a.angle = s.spot.outerConeAngle,
a.penumbra = 1 - s.spot.innerConeAngle / s.spot.outerConeAngle,
a.target.position.set(0, 0, -1),
a.add(a.target);
break;
default:
throw new Error("THREE.GLTFLoader: Unexpected light type: " + s.type)
}
return a.position.set(0, 0, 0),
a.decay = 2,
bR(a, s),
void 0 !== s.intensity && (a.intensity = s.intensity),
a.name = t.createUniqueName(s.name || "light_" + e),
r = Promise.resolve(a),
t.cache.add(n, r),
r
}
getDependency(e, t) {
if ("light" === e)
return this._loadLight(t)
}
createNodeAttachment(e) {
const t = this
, n = this.parser
, r = n.json.nodes[e]
, i = (r.extensions && r.extensions[this.name] || {}).light;
return void 0 === i ? null : this._loadLight(i).then((function(e) {
return n._getNodeRef(t.cache, i, e)
}
))
}
}
class IT {
constructor() {
this.name = kT.KHR_MATERIALS_UNLIT
}
getMaterialType() {
return ba
}
extendParams(e, t, n) {
const r = [];
e.color = new ga(1,1,1),
e.opacity = 1;
const i = t.pbrMetallicRoughness;
if (i) {
if (Array.isArray(i.baseColorFactor)) {
const t = i.baseColorFactor;
e.color.setRGB(t[0], t[1], t[2], RT),
e.opacity = t[3]
}
void 0 !== i.baseColorTexture && r.push(n.assignTexture(e, "map", i.baseColorTexture, TT))
}
return Promise.all(r)
}
}
class NT {
constructor(e) {
this.parser = e,
this.name = kT.KHR_MATERIALS_EMISSIVE_STRENGTH
}
extendMaterialParams(e, t) {
const n = this.parser.json.materials[e];
if (!n.extensions || !n.extensions[this.name])
return Promise.resolve();
const r = n.extensions[this.name].emissiveStrength;
return void 0 !== r && (t.emissiveIntensity = r),
Promise.resolve()
}
}
class DT {
constructor(e) {
this.parser = e,
this.name = kT.KHR_MATERIALS_CLEARCOAT
}
getMaterialType(e) {
const t = this.parser.json.materials[e];
return t.extensions && t.extensions[this.name] ? Np : null
}
extendMaterialParams(e, t) {
const n = this.parser
, r = n.json.materials[e];
if (!r.extensions || !r.extensions[this.name])
return Promise.resolve();
const i = []
, s = r.extensions[this.name];
if (void 0 !== s.clearcoatFactor && (t.clearcoat = s.clearcoatFactor),
void 0 !== s.clearcoatTexture && i.push(n.assignTexture(t, "clearcoatMap", s.clearcoatTexture)),
void 0 !== s.clearcoatRoughnessFactor && (t.clearcoatRoughness = s.clearcoatRoughnessFactor),
void 0 !== s.clearcoatRoughnessTexture && i.push(n.assignTexture(t, "clearcoatRoughnessMap", s.clearcoatRoughnessTexture)),
void 0 !== s.clearcoatNormalTexture && (i.push(n.assignTexture(t, "clearcoatNormalMap", s.clearcoatNormalTexture)),
void 0 !== s.clearcoatNormalTexture.scale)) {
const e = s.clearcoatNormalTexture.scale;
t.clearcoatNormalScale = new xi(e,e)
}
return Promise.all(i)
}
}
class jT {
constructor(e) {
this.parser = e,
this.name = kT.KHR_MATERIALS_DISPERSION
}
getMaterialType(e) {
const t = this.parser.json.materials[e];
return t.extensions && t.extensions[this.name] ? Np : null
}
extendMaterialParams(e, t) {
const n = this.parser.json.materials[e];
if (!n.extensions || !n.extensions[this.name])
return Promise.resolve();
const r = n.extensions[this.name];
return t.dispersion = void 0 !== r.dispersion ? r.dispersion : 0,
Promise.resolve()
}
}
class FT {
constructor(e) {
this.parser = e,
this.name = kT.KHR_MATERIALS_IRIDESCENCE
}
getMaterialType(e) {
const t = this.parser.json.materials[e];
return t.extensions && t.extensions[this.name] ? Np : null
}
extendMaterialParams(e, t) {
const n = this.parser
, r = n.json.materials[e];
if (!r.extensions || !r.extensions[this.name])
return Promise.resolve();
const i = []
, s = r.extensions[this.name];
return void 0 !== s.iridescenceFactor && (t.iridescence = s.iridescenceFactor),
void 0 !== s.iridescenceTexture && i.push(n.assignTexture(t, "iridescenceMap", s.iridescenceTexture)),
void 0 !== s.iridescenceIor && (t.iridescenceIOR = s.iridescenceIor),
void 0 === t.iridescenceThicknessRange && (t.iridescenceThicknessRange = [100, 400]),
void 0 !== s.iridescenceThicknessMinimum && (t.iridescenceThicknessRange[0] = s.iridescenceThicknessMinimum),
void 0 !== s.iridescenceThicknessMaximum && (t.iridescenceThicknessRange[1] = s.iridescenceThicknessMaximum),
void 0 !== s.iridescenceThicknessTexture && i.push(n.assignTexture(t, "iridescenceThicknessMap", s.iridescenceThicknessTexture)),
Promise.all(i)
}
}
class OT {
constructor(e) {
this.parser = e,
this.name = kT.KHR_MATERIALS_SHEEN
}
getMaterialType(e) {
const t = this.parser.json.materials[e];
return t.extensions && t.extensions[this.name] ? Np : null
}
extendMaterialParams(e, t) {
const n = this.parser
, r = n.json.materials[e];
if (!r.extensions || !r.extensions[this.name])
return Promise.resolve();
const i = [];
t.sheenColor = new ga(0,0,0),
t.sheenRoughness = 0,
t.sheen = 1;
const s = r.extensions[this.name];
if (void 0 !== s.sheenColorFactor) {
const e = s.sheenColorFactor;
t.sheenColor.setRGB(e[0], e[1], e[2], RT)
}
return void 0 !== s.sheenRoughnessFactor && (t.sheenRoughness = s.sheenRoughnessFactor),
void 0 !== s.sheenColorTexture && i.push(n.assignTexture(t, "sheenColorMap", s.sheenColorTexture, TT)),
void 0 !== s.sheenRoughnessTexture && i.push(n.assignTexture(t, "sheenRoughnessMap", s.sheenRoughnessTexture)),
Promise.all(i)
}
}
class UT {
constructor(e) {
this.parser = e,
this.name = kT.KHR_MATERIALS_TRANSMISSION
}
getMaterialType(e) {
const t = this.parser.json.materials[e];
return t.extensions && t.extensions[this.name] ? Np : null
}
extendMaterialParams(e, t) {
const n = this.parser
, r = n.json.materials[e];
if (!r.extensions || !r.extensions[this.name])
return Promise.resolve();
const i = []
, s = r.extensions[this.name];
return void 0 !== s.transmissionFactor && (t.transmission = s.transmissionFactor),
void 0 !== s.transmissionTexture && i.push(n.assignTexture(t, "transmissionMap", s.transmissionTexture)),
Promise.all(i)
}
}
class zT {
constructor(e) {
this.parser = e,
this.name = kT.KHR_MATERIALS_VOLUME
}
getMaterialType(e) {
const t = this.parser.json.materials[e];
return t.extensions && t.extensions[this.name] ? Np : null
}
extendMaterialParams(e, t) {
const n = this.parser
, r = n.json.materials[e];
if (!r.extensions || !r.extensions[this.name])
return Promise.resolve();
const i = []
, s = r.extensions[this.name];
t.thickness = void 0 !== s.thicknessFactor ? s.thicknessFactor : 0,
void 0 !== s.thicknessTexture && i.push(n.assignTexture(t, "thicknessMap", s.thicknessTexture)),
t.attenuationDistance = s.attenuationDistance || 1 / 0;
const a = s.attenuationColor || [1, 1, 1];
return t.attenuationColor = (new ga).setRGB(a[0], a[1], a[2], RT),
Promise.all(i)
}
}
class GT {
constructor(e) {
this.parser = e,
this.name = kT.KHR_MATERIALS_IOR
}
getMaterialType(e) {
const t = this.parser.json.materials[e];
return t.extensions && t.extensions[this.name] ? Np : null
}
extendMaterialParams(e, t) {
const n = this.parser.json.materials[e];
if (!n.extensions || !n.extensions[this.name])
return Promise.resolve();
const r = n.extensions[this.name];
return t.ior = void 0 !== r.ior ? r.ior : 1.5,
Promise.resolve()
}
}
class HT {
constructor(e) {
this.parser = e,
this.name = kT.KHR_MATERIALS_SPECULAR
}
getMaterialType(e) {
const t = this.parser.json.materials[e];
return t.extensions && t.extensions[this.name] ? Np : null
}
extendMaterialParams(e, t) {
const n = this.parser
, r = n.json.materials[e];
if (!r.extensions || !r.extensions[this.name])
return Promise.resolve();
const i = []
, s = r.extensions[this.name];
t.specularIntensity = void 0 !== s.specularFactor ? s.specularFactor : 1,
void 0 !== s.specularTexture && i.push(n.assignTexture(t, "specularIntensityMap", s.specularTexture));
const a = s.specularColorFactor || [1, 1, 1];
return t.specularColor = (new ga).setRGB(a[0], a[1], a[2], RT),
void 0 !== s.specularColorTexture && i.push(n.assignTexture(t, "specularColorMap", s.specularColorTexture, TT)),
Promise.all(i)
}
}
class VT {
constructor(e) {
this.parser = e,
this.name = kT.EXT_MATERIALS_BUMP
}
getMaterialType(e) {
const t = this.parser.json.materials[e];
return t.extensions && t.extensions[this.name] ? Np : null
}
extendMaterialParams(e, t) {
const n = this.parser
, r = n.json.materials[e];
if (!r.extensions || !r.extensions[this.name])
return Promise.resolve();
const i = []
, s = r.extensions[this.name];
return t.bumpScale = void 0 !== s.bumpFactor ? s.bumpFactor : 1,
void 0 !== s.bumpTexture && i.push(n.assignTexture(t, "bumpMap", s.bumpTexture)),
Promise.all(i)
}
}
class WT {
constructor(e) {
this.parser = e,
this.name = kT.KHR_MATERIALS_ANISOTROPY
}
getMaterialType(e) {
const t = this.parser.json.materials[e];
return t.extensions && t.extensions[this.name] ? Np : null
}
extendMaterialParams(e, t) {
const n = this.parser
, r = n.json.materials[e];
if (!r.extensions || !r.extensions[this.name])
return Promise.resolve();
const i = []
, s = r.extensions[this.name];
return void 0 !== s.anisotropyStrength && (t.anisotropy = s.anisotropyStrength),
void 0 !== s.anisotropyRotation && (t.anisotropyRotation = s.anisotropyRotation),
void 0 !== s.anisotropyTexture && i.push(n.assignTexture(t, "anisotropyMap", s.anisotropyTexture)),
Promise.all(i)
}
}
class JT {
constructor(e) {
this.parser = e,
this.name = kT.KHR_TEXTURE_BASISU
}
loadTexture(e) {
const t = this.parser
, n = t.json
, r = n.textures[e];
if (!r.extensions || !r.extensions[this.name])
return null;
const i = r.extensions[this.name]
, s = t.options.ktx2Loader;
if (!s) {
if (n.extensionsRequired && n.extensionsRequired.indexOf(this.name) >= 0)
throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");
return null
}
return t.loadTextureImage(e, i.source, s)
}
}
class XT {
constructor(e) {
this.parser = e,
this.name = kT.EXT_TEXTURE_WEBP,
this.isSupported = null
}
loadTexture(e) {
const t = this.name
, n = this.parser
, r = n.json
, i = r.textures[e];
if (!i.extensions || !i.extensions[t])
return null;
const s = i.extensions[t]
, a = r.images[s.source];
let o = n.textureLoader;
if (a.uri) {
const e = n.options.manager.getHandler(a.uri);
null !== e && (o = e)
}
return this.detectSupport().then((function(i) {
if (i)
return n.loadTextureImage(e, s.source, o);
if (r.extensionsRequired && r.extensionsRequired.indexOf(t) >= 0)
throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");
return n.loadTexture(e)
}
))
}
detectSupport() {
return this.isSupported || (this.isSupported = new Promise((function(e) {
const t = new Image;
t.src = "data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",
t.onload = t.onerror = function() {
e(1 === t.height)
}
}
))),
this.isSupported
}
}
class KT {
constructor(e) {
this.parser = e,
this.name = kT.EXT_TEXTURE_AVIF,
this.isSupported = null
}
loadTexture(e) {
const t = this.name
, n = this.parser
, r = n.json
, i = r.textures[e];
if (!i.extensions || !i.extensions[t])
return null;
const s = i.extensions[t]
, a = r.images[s.source];
let o = n.textureLoader;
if (a.uri) {
const e = n.options.manager.getHandler(a.uri);
null !== e && (o = e)
}
return this.detectSupport().then((function(i) {
if (i)
return n.loadTextureImage(e, s.source, o);
if (r.extensionsRequired && r.extensionsRequired.indexOf(t) >= 0)
throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");
return n.loadTexture(e)
}
))
}
detectSupport() {
return this.isSupported || (this.isSupported = new Promise((function(e) {
const t = new Image;
t.src = "data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",
t.onload = t.onerror = function() {
e(1 === t.height)
}
}
))),
this.isSupported
}
}
class qT {
constructor(e) {
this.name = kT.EXT_MESHOPT_COMPRESSION,
this.parser = e
}
loadBufferView(e) {
const t = this.parser.json
, n = t.bufferViews[e];
if (n.extensions && n.extensions[this.name]) {
const e = n.extensions[this.name]
, r = this.parser.getDependency("buffer", e.buffer)
, i = this.parser.options.meshoptDecoder;
if (!i || !i.supported) {
if (t.extensionsRequired && t.extensionsRequired.indexOf(this.name) >= 0)
throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");
return null
}
return r.then((function(t) {
const n = e.byteOffset || 0
, r = e.byteLength || 0
, s = e.count
, a = e.byteStride
, o = new Uint8Array(t,n,r);
return i.decodeGltfBufferAsync ? i.decodeGltfBufferAsync(s, a, o, e.mode, e.filter).then((function(e) {
return e.buffer
}
)) : i.ready.then((function() {
const t = new ArrayBuffer(s * a);
return i.decodeGltfBuffer(new Uint8Array(t), s, a, o, e.mode, e.filter),
t
}
))
}
))
}
return null
}
}
class YT {
constructor(e) {
this.name = kT.EXT_MESH_GPU_INSTANCING,
this.parser = e
}
createNodeMesh(e) {
const t = this.parser.json
, n = t.nodes[e];
if (!n.extensions || !n.extensions[this.name] || void 0 === n.mesh)
return null;
const r = t.meshes[n.mesh];
for (const o of r.primitives)
if (o.mode !== oR.TRIANGLES && o.mode !== oR.TRIANGLE_STRIP && o.mode !== oR.TRIANGLE_FAN && void 0 !== o.mode)
return null;
const i = n.extensions[this.name].attributes
, s = []
, a = {};
for (const o in i)
s.push(this.parser.getDependency("accessor", i[o]).then((e => (a[o] = e,
a[o]))));
return s.length < 1 ? null : (s.push(this.parser.createNodeMesh(e)),
Promise.all(s).then((e => {
const t = e.pop()
, n = t.isGroup ? t.children : [t]
, r = e[0].count
, i = [];
for (const s of n) {
const e = new Es
, t = new Qi
, n = new Yi
, o = new Qi(1,1,1)
, l = new md(s.geometry,s.material,r);
for (let i = 0; i < r; i++)
a.TRANSLATION && t.fromBufferAttribute(a.TRANSLATION, i),
a.ROTATION && n.fromBufferAttribute(a.ROTATION, i),
a.SCALE && o.fromBufferAttribute(a.SCALE, i),
l.setMatrixAt(i, e.compose(t, n, o));
for (const r in a)
if ("_COLOR_0" === r) {
const e = a[r];
l.instanceColor = new od(e.array,e.itemSize,e.normalized)
} else
"TRANSLATION" !== r && "ROTATION" !== r && "SCALE" !== r && s.geometry.setAttribute(r, a[r]);
ea.prototype.copy.call(l, s),
this.parser.assignFinalMaterial(l),
i.push(l)
}
return t.isGroup ? (t.clear(),
t.add(...i),
t) : i[0]
}
)))
}
}
const QT = "glTF"
, ZT = 1313821514
, $T = 5130562;
class eR {
constructor(e) {
this.name = kT.KHR_BINARY_GLTF,
this.content = null,
this.body = null;
const t = new DataView(e,0,12);
if (this.header = {
magic: ET(new Uint8Array(e.slice(0, 4))),
version: t.getUint32(4, !0),
length: t.getUint32(8, !0)
},
this.header.magic !== QT)
throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");
if (this.header.version < 2)
throw new Error("THREE.GLTFLoader: Legacy binary file detected.");
const n = this.header.length - 12
, r = new DataView(e,12);
let i = 0;
for (; i < n; ) {
const t = r.getUint32(i, !0);
i += 4;
const n = r.getUint32(i, !0);
if (i += 4,
n === ZT) {
const n = new Uint8Array(e,12 + i,t);
this.content = ET(n)
} else if (n === $T) {
const n = 12 + i;
this.body = e.slice(n, n + t)
}
i += t
}
if (null === this.content)
throw new Error("THREE.GLTFLoader: JSON content not found.")
}
}
class tR {
constructor(e, t) {
if (!t)
throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");
this.name = kT.KHR_DRACO_MESH_COMPRESSION,
this.json = e,
this.dracoLoader = t,
this.dracoLoader.preload()
}
decodePrimitive(e, t) {
const n = this.json
, r = this.dracoLoader
, i = e.extensions[this.name].bufferView
, s = e.extensions[this.name].attributes
, a = {}
, o = {}
, l = {};
for (const c in s) {
const e = hR[c] || c.toLowerCase();
a[e] = s[c]
}
for (const c in e.attributes) {
const t = hR[c] || c.toLowerCase();
if (void 0 !== s[c]) {
const r = n.accessors[e.attributes[c]]
, i = lR[r.componentType];
l[t] = i.name,
o[t] = !0 === r.normalized
}
}
return t.getDependency("bufferView", i).then((function(e) {
return new Promise((function(t, n) {
r.decodeDracoFile(e, (function(e) {
for (const t in e.attributes) {
const n = e.attributes[t]
, r = o[t];
void 0 !== r && (n.normalized = r)
}
t(e)
}
), a, l, RT, n)
}
))
}
))
}
}
class nR {
constructor() {
this.name = kT.KHR_TEXTURE_TRANSFORM
}
extendTexture(e, t) {
return void 0 !== t.texCoord && t.texCoord !== e.channel || void 0 !== t.offset || void 0 !== t.rotation || void 0 !== t.scale ? (e = e.clone(),
void 0 !== t.texCoord && (e.channel = t.texCoord),
void 0 !== t.offset && e.offset.fromArray(t.offset),
void 0 !== t.rotation && (e.rotation = t.rotation),
void 0 !== t.scale && e.repeat.fromArray(t.scale),
e.needsUpdate = !0,
e) : e
}
}
class rR {
constructor() {
this.name = kT.KHR_MESH_QUANTIZATION
}
}
class iR extends Kp {
constructor(e, t, n, r) {
super(e, t, n, r)
}
copySampleValue_(e) {
const t = this.resultBuffer
, n = this.sampleValues
, r = this.valueSize
, i = e * r * 3 + r;
for (let s = 0; s !== r; s++)
t[s] = n[i + s];
return t
}
interpolate_(e, t, n, r) {
const i = this.resultBuffer
, s = this.sampleValues
, a = this.valueSize
, o = 2 * a
, l = 3 * a
, c = r - t
, u = (n - t) / c
, d = u * u
, h = d * u
, p = e * l
, f = p - l
, m = -2 * h + 3 * d
, g = h - d
, v = 1 - m
, y = g - d + u;
for (let x = 0; x !== a; x++) {
const e = s[f + x + a]
, t = s[f + x + o] * c
, n = s[p + x + a]
, r = s[p + x] * c;
i[x] = v * e + y * t + m * n + g * r
}
return i
}
}
const sR = new Yi;
class aR extends iR {
interpolate_(e, t, n, r) {
const i = super.interpolate_(e, t, n, r);
return sR.fromArray(i).normalize().toArray(i),
i
}
}
const oR = {
FLOAT: 5126,
FLOAT_MAT3: 35675,
FLOAT_MAT4: 35676,
FLOAT_VEC2: 35664,
FLOAT_VEC3: 35665,
FLOAT_VEC4: 35666,
LINEAR: 9729,
REPEAT: 10497,
SAMPLER_2D: 35678,
POINTS: 0,
LINES: 1,
LINE_LOOP: 2,
LINE_STRIP: 3,
TRIANGLES: 4,
TRIANGLE_STRIP: 5,
TRIANGLE_FAN: 6,
UNSIGNED_BYTE: 5121,
UNSIGNED_SHORT: 5123
}
, lR = {
5120: Int8Array,
5121: Uint8Array,
5122: Int16Array,
5123: Uint16Array,
5125: Uint32Array,
5126: Float32Array
}
, cR = {
9728: Ft,
9729: Ht,
9984: Ot,
9985: Vt,
9986: zt,
9987: Jt
}
, uR = {
33071: Dt,
33648: jt,
10497: Nt
}
, dR = {
SCALAR: 1,
VEC2: 2,
VEC3: 3,
VEC4: 4,
MAT2: 4,
MAT3: 9,
MAT4: 16
}
, hR = {
POSITION: "position",
NORMAL: "normal",
TANGENT: "tangent",
...CT >= 152 ? {
TEXCOORD_0: "uv",
TEXCOORD_1: "uv1",
TEXCOORD_2: "uv2",
TEXCOORD_3: "uv3"
} : {
TEXCOORD_0: "uv",
TEXCOORD_1: "uv2"
},
COLOR_0: "color",
WEIGHTS_0: "skinWeight",
JOINTS_0: "skinIndex"
}
, pR = {
scale: "scale",
translation: "position",
rotation: "quaternion",
weights: "morphTargetInfluences"
}
, fR = {
CUBICSPLINE: void 0,
LINEAR: tr,
STEP: er
}
, mR = "OPAQUE"
, gR = "MASK"
, vR = "BLEND";
function yR(e) {
return void 0 === e.DefaultMaterial && (e.DefaultMaterial = new Ip({
color: 16777215,
emissive: 0,
metalness: 1,
roughness: 1,
transparent: !1,
depthTest: !0,
side: Le
})),
e.DefaultMaterial
}
function xR(e, t, n) {
for (const r in n.extensions)
void 0 === e[r] && (t.userData.gltfExtensions = t.userData.gltfExtensions || {},
t.userData.gltfExtensions[r] = n.extensions[r])
}
function bR(e, t) {
void 0 !== t.extras && ("object" === typeof t.extras ? Object.assign(e.userData, t.extras) : console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, " + t.extras))
}
function _R(e, t) {
if (e.updateMorphTargets(),
void 0 !== t.weights)
for (let n = 0, r = t.weights.length; n < r; n++)
e.morphTargetInfluences[n] = t.weights[n];
if (t.extras && Array.isArray(t.extras.targetNames)) {
const n = t.extras.targetNames;
if (e.morphTargetInfluences.length === n.length) {
e.morphTargetDictionary = {};
for (let t = 0, r = n.length; t < r; t++)
e.morphTargetDictionary[n[t]] = t
} else
console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")
}
}
function wR(e) {
let t;
const n = e.extensions && e.extensions[kT.KHR_DRACO_MESH_COMPRESSION];
if (t = n ? "draco:" + n.bufferView + ":" + n.indices + ":" + SR(n.attributes) : e.indices + ":" + SR(e.attributes) + ":" + e.mode,
void 0 !== e.targets)
for (let r = 0, i = e.targets.length; r < i; r++)
t += ":" + SR(e.targets[r]);
return t
}
function SR(e) {
let t = "";
const n = Object.keys(e).sort();
for (let r = 0, i = n.length; r < i; r++)
t += n[r] + ":" + e[n[r]] + ";";
return t
}
function AR(e) {
switch (e) {
case Int8Array:
return 1 / 127;
case Uint8Array:
return 1 / 255;
case Int16Array:
return 1 / 32767;
case Uint16Array:
return 1 / 65535;
default:
throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")
}
}
const MR = new Es;
class CR {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}
, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
this.json = e,
this.extensions = {},
this.plugins = {},
this.options = t,
this.cache = new PT,
this.associations = new Map,
this.primitiveCache = {},
this.nodeCache = {},
this.meshCache = {
refs: {},
uses: {}
},
this.cameraCache = {
refs: {},
uses: {}
},
this.lightCache = {
refs: {},
uses: {}
},
this.sourceCache = {},
this.textureCache = {},
this.nodeNamesUsed = {};
let n = !1
, r = !1
, i = -1;
"undefined" !== typeof navigator && "undefined" !== typeof navigator.userAgent && (n = !0 === /^((?!chrome|android).)*safari/i.test(navigator.userAgent),
r = navigator.userAgent.indexOf("Firefox") > -1,
i = r ? navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1] : -1),
"undefined" === typeof createImageBitmap || n || r && i < 98 ? this.textureLoader = new _f(this.options.manager) : this.textureLoader = new qf(this.options.manager),
this.textureLoader.setCrossOrigin(this.options.crossOrigin),
this.textureLoader.setRequestHeader(this.options.requestHeader),
this.fileLoader = new mf(this.options.manager),
this.fileLoader.setResponseType("arraybuffer"),
"use-credentials" === this.options.crossOrigin && this.fileLoader.setWithCredentials(!0)
}
setExtensions(e) {
this.extensions = e
}
setPlugins(e) {
this.plugins = e
}
parse(e, t) {
const n = this
, r = this.json
, i = this.extensions;
this.cache.removeAll(),
this.nodeCache = {},
this._invokeAll((function(e) {
return e._markDefs && e._markDefs()
}
)),
Promise.all(this._invokeAll((function(e) {
return e.beforeRoot && e.beforeRoot()
}
))).then((function() {
return Promise.all([n.getDependencies("scene"), n.getDependencies("animation"), n.getDependencies("camera")])
}
)).then((function(t) {
const s = {
scene: t[0][r.scene || 0],
scenes: t[0],
animations: t[1],
cameras: t[2],
asset: r.asset,
parser: n,
userData: {}
};
return xR(i, s, r),
bR(s, r),
Promise.all(n._invokeAll((function(e) {
return e.afterRoot && e.afterRoot(s)
}
))).then((function() {
for (const e of s.scenes)
e.updateMatrixWorld();
e(s)
}
))
}
)).catch(t)
}
_markDefs() {
const e = this.json.nodes || []
, t = this.json.skins || []
, n = this.json.meshes || [];
for (let r = 0, i = t.length; r < i; r++) {
const n = t[r].joints;
for (let t = 0, r = n.length; t < r; t++)
e[n[t]].isBone = !0
}
for (let r = 0, i = e.length; r < i; r++) {
const t = e[r];
void 0 !== t.mesh && (this._addNodeRef(this.meshCache, t.mesh),
void 0 !== t.skin && (n[t.mesh].isSkinnedMesh = !0)),
void 0 !== t.camera && this._addNodeRef(this.cameraCache, t.camera)
}
}
_addNodeRef(e, t) {
void 0 !== t && (void 0 === e.refs[t] && (e.refs[t] = e.uses[t] = 0),
e.refs[t]++)
}
_getNodeRef(e, t, n) {
if (e.refs[t] <= 1)
return n;
const r = n.clone()
, i = (e, t) => {
const n = this.associations.get(e);
null != n && this.associations.set(t, n);
for (const [r,s] of e.children.entries())
i(s, t.children[r])
}
;
return i(n, r),
r.name += "_instance_" + e.uses[t]++,
r
}
_invokeOne(e) {
const t = Object.values(this.plugins);
t.push(this);
for (let n = 0; n < t.length; n++) {
const r = e(t[n]);
if (r)
return r
}
return null
}
_invokeAll(e) {
const t = Object.values(this.plugins);
t.unshift(this);
const n = [];
for (let r = 0; r < t.length; r++) {
const i = e(t[r]);
i && n.push(i)
}
return n
}
getDependency(e, t) {
const n = e + ":" + t;
let r = this.cache.get(n);
if (!r) {
switch (e) {
case "scene":
r = this.loadScene(t);
break;
case "node":
r = this._invokeOne((function(e) {
return e.loadNode && e.loadNode(t)
}
));
break;
case "mesh":
r = this._invokeOne((function(e) {
return e.loadMesh && e.loadMesh(t)
}
));
break;
case "accessor":
r = this.loadAccessor(t);
break;
case "bufferView":
r = this._invokeOne((function(e) {
return e.loadBufferView && e.loadBufferView(t)
}
));
break;
case "buffer":
r = this.loadBuffer(t);
break;
case "material":
r = this._invokeOne((function(e) {
return e.loadMaterial && e.loadMaterial(t)
}
));
break;
case "texture":
r = this._invokeOne((function(e) {
return e.loadTexture && e.loadTexture(t)
}
));
break;
case "skin":
r = this.loadSkin(t);
break;
case "animation":
r = this._invokeOne((function(e) {
return e.loadAnimation && e.loadAnimation(t)
}
));
break;
case "camera":
r = this.loadCamera(t);
break;
default:
if (r = this._invokeOne((function(n) {
return n != this && n.getDependency && n.getDependency(e, t)
}
)),
!r)
throw new Error("Unknown type: " + e)
}
this.cache.add(n, r)
}
return r
}
getDependencies(e) {
let t = this.cache.get(e);
if (!t) {
const n = this
, r = this.json[e + ("mesh" === e ? "es" : "s")] || [];
t = Promise.all(r.map((function(t, r) {
return n.getDependency(e, r)
}
))),
this.cache.add(e, t)
}
return t
}
loadBuffer(e) {
const t = this.json.buffers[e]
, n = this.fileLoader;
if (t.type && "arraybuffer" !== t.type)
throw new Error("THREE.GLTFLoader: " + t.type + " buffer type is not supported.");
if (void 0 === t.uri && 0 === e)
return Promise.resolve(this.extensions[kT.KHR_BINARY_GLTF].body);
const r = this.options;
return new Promise((function(e, i) {
n.load(Gf.resolveURL(t.uri, r.path), e, void 0, (function() {
i(new Error('THREE.GLTFLoader: Failed to load buffer "' + t.uri + '".'))
}
))
}
))
}
loadBufferView(e) {
const t = this.json.bufferViews[e];
return this.getDependency("buffer", t.buffer).then((function(e) {
const n = t.byteLength || 0
, r = t.byteOffset || 0;
return e.slice(r, r + n)
}
))
}
loadAccessor(e) {
const t = this
, n = this.json
, r = this.json.accessors[e];
if (void 0 === r.bufferView && void 0 === r.sparse) {
const e = dR[r.type]
, t = lR[r.componentType]
, n = !0 === r.normalized
, i = new t(r.count * e);
return Promise.resolve(new Ta(i,e,n))
}
const i = [];
return void 0 !== r.bufferView ? i.push(this.getDependency("bufferView", r.bufferView)) : i.push(null),
void 0 !== r.sparse && (i.push(this.getDependency("bufferView", r.sparse.indices.bufferView)),
i.push(this.getDependency("bufferView", r.sparse.values.bufferView))),
Promise.all(i).then((function(e) {
const i = e[0]
, s = dR[r.type]
, a = lR[r.componentType]
, o = a.BYTES_PER_ELEMENT
, l = o * s
, c = r.byteOffset || 0
, u = void 0 !== r.bufferView ? n.bufferViews[r.bufferView].byteStride : void 0
, d = !0 === r.normalized;
let h, p;
if (u && u !== l) {
const e = Math.floor(c / u)
, n = "InterleavedBuffer:" + r.bufferView + ":" + r.componentType + ":" + e + ":" + r.count;
let l = t.cache.get(n);
l || (h = new a(i,e * u,r.count * u / o),
l = new Au(h,u / o),
t.cache.add(n, l)),
p = new Cu(l,s,c % u / o,d)
} else
h = null === i ? new a(r.count * s) : new a(i,c,r.count * s),
p = new Ta(h,s,d);
if (void 0 !== r.sparse) {
const t = dR.SCALAR
, n = lR[r.sparse.indices.componentType]
, o = r.sparse.indices.byteOffset || 0
, l = r.sparse.values.byteOffset || 0
, c = new n(e[1],o,r.sparse.count * t)
, u = new a(e[2],l,r.sparse.count * s);
null !== i && (p = new Ta(p.array.slice(),p.itemSize,p.normalized));
for (let e = 0, r = c.length; e < r; e++) {
const t = c[e];
if (p.setX(t, u[e * s]),
s >= 2 && p.setY(t, u[e * s + 1]),
s >= 3 && p.setZ(t, u[e * s + 2]),
s >= 4 && p.setW(t, u[e * s + 3]),
s >= 5)
throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")
}
}
return p
}
))
}
loadTexture(e) {
const t = this.json
, n = this.options
, r = t.textures[e].source
, i = t.images[r];
let s = this.textureLoader;
if (i.uri) {
const e = n.manager.getHandler(i.uri);
null !== e && (s = e)
}
return this.loadTextureImage(e, r, s)
}
loadTextureImage(e, t, n) {
const r = this
, i = this.json
, s = i.textures[e]
, a = i.images[t]
, o = (a.uri || a.bufferView) + ":" + s.sampler;
if (this.textureCache[o])
return this.textureCache[o];
const l = this.loadImageSource(t, n).then((function(t) {
t.flipY = !1,
t.name = s.name || a.name || "",
"" === t.name && "string" === typeof a.uri && !1 === a.uri.startsWith("data:image/") && (t.name = a.uri);
const n = (i.samplers || {})[s.sampler] || {};
return t.magFilter = cR[n.magFilter] || Ht,
t.minFilter = cR[n.minFilter] || Jt,
t.wrapS = uR[n.wrapS] || Nt,
t.wrapT = uR[n.wrapT] || Nt,
r.associations.set(t, {
textures: e
}),
t
}
)).catch((function() {
return null
}
));
return this.textureCache[o] = l,
l
}
loadImageSource(e, t) {
const n = this
, r = this.json
, i = this.options;
if (void 0 !== this.sourceCache[e])
return this.sourceCache[e].then((e => e.clone()));
const s = r.images[e]
, a = self.URL || self.webkitURL;
let o = s.uri || ""
, l = !1;
if (void 0 !== s.bufferView)
o = n.getDependency("bufferView", s.bufferView).then((function(e) {
l = !0;
const t = new Blob([e],{
type: s.mimeType
});
return o = a.createObjectURL(t),
o
}
));
else if (void 0 === s.uri)
throw new Error("THREE.GLTFLoader: Image " + e + " is missing URI and bufferView");
const c = Promise.resolve(o).then((function(e) {
return new Promise((function(n, r) {
let s = n;
!0 === t.isImageBitmapLoader && (s = function(e) {
const t = new Gi(e);
t.needsUpdate = !0,
n(t)
}
),
t.load(Gf.resolveURL(e, i.path), s, void 0, r)
}
))
}
)).then((function(e) {
var t;
return !0 === l && a.revokeObjectURL(o),
bR(e, s),
e.userData.mimeType = s.mimeType || ((t = s.uri).search(/\.jpe?g($|\?)/i) > 0 || 0 === t.search(/^data\:image\/jpeg/) ? "image/jpeg" : t.search(/\.webp($|\?)/i) > 0 || 0 === t.search(/^data\:image\/webp/) ? "image/webp" : "image/png"),
e
}
)).catch((function(e) {
throw console.error("THREE.GLTFLoader: Couldn't load texture", o),
e
}
));
return this.sourceCache[e] = c,
c
}
assignTexture(e, t, n, r) {
const i = this;
return this.getDependency("texture", n.index).then((function(s) {
if (!s)
return null;
if (void 0 !== n.texCoord && n.texCoord > 0 && ((s = s.clone()).channel = n.texCoord),
i.extensions[kT.KHR_TEXTURE_TRANSFORM]) {
const e = void 0 !== n.extensions ? n.extensions[kT.KHR_TEXTURE_TRANSFORM] : void 0;
if (e) {
const t = i.associations.get(s);
s = i.extensions[kT.KHR_TEXTURE_TRANSFORM].extendTexture(s, e),
i.associations.set(s, t)
}
}
return void 0 !== r && ("number" === typeof r && (r = 3001 === r ? TT : RT),
"colorSpace"in s ? s.colorSpace = r : s.encoding = r === TT ? 3001 : 3e3),
e[t] = s,
s
}
))
}
assignFinalMaterial(e) {
const t = e.geometry;
let n = e.material;
const r = void 0 === t.attributes.tangent
, i = void 0 !== t.attributes.color
, s = void 0 === t.attributes.normal;
if (e.isPoints) {
const e = "PointsMaterial:" + n.uuid;
let t = this.cache.get(e);
t || (t = new Yd,
xa.prototype.copy.call(t, n),
t.color.copy(n.color),
t.map = n.map,
t.sizeAttenuation = !1,
this.cache.add(e, t)),
n = t
} else if (e.isLine) {
const e = "LineBasicMaterial:" + n.uuid;
let t = this.cache.get(e);
t || (t = new Dd,
xa.prototype.copy.call(t, n),
t.color.copy(n.color),
t.map = n.map,
this.cache.add(e, t)),
n = t
}
if (r || i || s) {
let e = "ClonedMaterial:" + n.uuid + ":";
r && (e += "derivative-tangents:"),
i && (e += "vertex-colors:"),
s && (e += "flat-shading:");
let t = this.cache.get(e);
t || (t = n.clone(),
i && (t.vertexColors = !0),
s && (t.flatShading = !0),
r && (t.normalScale && (t.normalScale.y *= -1),
t.clearcoatNormalScale && (t.clearcoatNormalScale.y *= -1)),
this.cache.add(e, t),
this.associations.set(t, this.associations.get(n))),
n = t
}
e.material = n
}
getMaterialType() {
return Ip
}
loadMaterial(e) {
const t = this
, n = this.json
, r = this.extensions
, i = n.materials[e];
let s;
const a = {}
, o = [];
if ((i.extensions || {})[kT.KHR_MATERIALS_UNLIT]) {
const e = r[kT.KHR_MATERIALS_UNLIT];
s = e.getMaterialType(),
o.push(e.extendParams(a, i, t))
} else {
const n = i.pbrMetallicRoughness || {};
if (a.color = new ga(1,1,1),
a.opacity = 1,
Array.isArray(n.baseColorFactor)) {
const e = n.baseColorFactor;
a.color.setRGB(e[0], e[1], e[2], RT),
a.opacity = e[3]
}
void 0 !== n.baseColorTexture && o.push(t.assignTexture(a, "map", n.baseColorTexture, TT)),
a.metalness = void 0 !== n.metallicFactor ? n.metallicFactor : 1,
a.roughness = void 0 !== n.roughnessFactor ? n.roughnessFactor : 1,
void 0 !== n.metallicRoughnessTexture && (o.push(t.assignTexture(a, "metalnessMap", n.metallicRoughnessTexture)),
o.push(t.assignTexture(a, "roughnessMap", n.metallicRoughnessTexture))),
s = this._invokeOne((function(t) {
return t.getMaterialType && t.getMaterialType(e)
}
)),
o.push(Promise.all(this._invokeAll((function(t) {
return t.extendMaterialParams && t.extendMaterialParams(e, a)
}
))))
}
!0 === i.doubleSided && (a.side = Ne);
const l = i.alphaMode || mR;
if (l === vR ? (a.transparent = !0,
a.depthWrite = !1) : (a.transparent = !1,
l === gR && (a.alphaTest = void 0 !== i.alphaCutoff ? i.alphaCutoff : .5)),
void 0 !== i.normalTexture && s !== ba && (o.push(t.assignTexture(a, "normalMap", i.normalTexture)),
a.normalScale = new xi(1,1),
void 0 !== i.normalTexture.scale)) {
const e = i.normalTexture.scale;
a.normalScale.set(e, e)
}
if (void 0 !== i.occlusionTexture && s !== ba && (o.push(t.assignTexture(a, "aoMap", i.occlusionTexture)),
void 0 !== i.occlusionTexture.strength && (a.aoMapIntensity = i.occlusionTexture.strength)),
void 0 !== i.emissiveFactor && s !== ba) {
const e = i.emissiveFactor;
a.emissive = (new ga).setRGB(e[0], e[1], e[2], RT)
}
return void 0 !== i.emissiveTexture && s !== ba && o.push(t.assignTexture(a, "emissiveMap", i.emissiveTexture, TT)),
Promise.all(o).then((function() {
const n = new s(a);
return i.name && (n.name = i.name),
bR(n, i),
t.associations.set(n, {
materials: e
}),
i.extensions && xR(r, n, i),
n
}
))
}
createUniqueName(e) {
const t = Am.sanitizeNodeName(e || "");
return t in this.nodeNamesUsed ? t + "_" + ++this.nodeNamesUsed[t] : (this.nodeNamesUsed[t] = 0,
t)
}
loadGeometries(e) {
const t = this
, n = this.extensions
, r = this.primitiveCache;
function i(e) {
return n[kT.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(e, t).then((function(n) {
return ER(n, e, t)
}
))
}
const s = [];
for (let a = 0, o = e.length; a < o; a++) {
const n = e[a]
, o = wR(n)
, l = r[o];
if (l)
s.push(l.promise);
else {
let e;
e = n.extensions && n.extensions[kT.KHR_DRACO_MESH_COMPRESSION] ? i(n) : ER(new Wa, n, t),
r[o] = {
primitive: n,
promise: e
},
s.push(e)
}
}
return Promise.all(s)
}
loadMesh(e) {
const t = this
, n = this.json
, r = this.extensions
, i = n.meshes[e]
, s = i.primitives
, a = [];
for (let o = 0, l = s.length; o < l; o++) {
const e = void 0 === s[o].material ? yR(this.cache) : this.getDependency("material", s[o].material);
a.push(e)
}
return a.push(t.loadGeometries(s)),
Promise.all(a).then((function(n) {
const a = n.slice(0, n.length - 1)
, o = n[n.length - 1]
, l = [];
for (let u = 0, d = o.length; u < d; u++) {
const n = o[u]
, c = s[u];
let d;
const h = a[u];
if (c.mode === oR.TRIANGLES || c.mode === oR.TRIANGLE_STRIP || c.mode === oR.TRIANGLE_FAN || void 0 === c.mode)
d = !0 === i.isSkinnedMesh ? new td(n,h) : new co(n,h),
!0 === d.isSkinnedMesh && d.normalizeSkinWeights(),
c.mode === oR.TRIANGLE_STRIP ? d.geometry = MT(d.geometry, cr) : c.mode === oR.TRIANGLE_FAN && (d.geometry = MT(d.geometry, ur));
else if (c.mode === oR.LINES)
d = new Kd(n,h);
else if (c.mode === oR.LINE_STRIP)
d = new Vd(n,h);
else if (c.mode === oR.LINE_LOOP)
d = new qd(n,h);
else {
if (c.mode !== oR.POINTS)
throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " + c.mode);
d = new th(n,h)
}
Object.keys(d.geometry.morphAttributes).length > 0 && _R(d, i),
d.name = t.createUniqueName(i.name || "mesh_" + e),
bR(d, i),
c.extensions && xR(r, d, c),
t.assignFinalMaterial(d),
l.push(d)
}
for (let r = 0, i = l.length; r < i; r++)
t.associations.set(l[r], {
meshes: e,
primitives: r
});
if (1 === l.length)
return i.extensions && xR(r, l[0], i),
l[0];
const c = new du;
i.extensions && xR(r, c, i),
t.associations.set(c, {
meshes: e
});
for (let e = 0, t = l.length; e < t; e++)
c.add(l[e]);
return c
}
))
}
loadCamera(e) {
let t;
const n = this.json.cameras[e]
, r = n[n.type];
if (r)
return "perspective" === n.type ? t = new wo(yi.radToDeg(r.yfov),r.aspectRatio || 1,r.znear || 1,r.zfar || 2e6) : "orthographic" === n.type && (t = new qo(-r.xmag,r.xmag,r.ymag,-r.ymag,r.znear,r.zfar)),
n.name && (t.name = this.createUniqueName(n.name)),
bR(t, n),
Promise.resolve(t);
console.warn("THREE.GLTFLoader: Missing camera parameters.")
}
loadSkin(e) {
const t = this.json.skins[e]
, n = [];
for (let r = 0, i = t.joints.length; r < i; r++)
n.push(this._loadNodeShallow(t.joints[r]));
return void 0 !== t.inverseBindMatrices ? n.push(this.getDependency("accessor", t.inverseBindMatrices)) : n.push(null),
Promise.all(n).then((function(e) {
const n = e.pop()
, r = e
, i = []
, s = [];
for (let a = 0, o = r.length; a < o; a++) {
const e = r[a];
if (e) {
i.push(e);
const t = new Es;
null !== n && t.fromArray(n.array, 16 * a),
s.push(t)
} else
console.warn('THREE.GLTFLoader: Joint "%s" could not be found.', t.joints[a])
}
return new ad(i,s)
}
))
}
loadAnimation(e) {
const t = this.json
, n = this
, r = t.animations[e]
, i = r.name ? r.name : "animation_" + e
, s = []
, a = []
, o = []
, l = []
, c = [];
for (let u = 0, d = r.channels.length; u < d; u++) {
const e = r.channels[u]
, t = r.samplers[e.sampler]
, n = e.target
, i = n.node
, d = void 0 !== r.parameters ? r.parameters[t.input] : t.input
, h = void 0 !== r.parameters ? r.parameters[t.output] : t.output;
void 0 !== n.node && (s.push(this.getDependency("node", i)),
a.push(this.getDependency("accessor", d)),
o.push(this.getDependency("accessor", h)),
l.push(t),
c.push(n))
}
return Promise.all([Promise.all(s), Promise.all(a), Promise.all(o), Promise.all(l), Promise.all(c)]).then((function(e) {
const t = e[0]
, r = e[1]
, s = e[2]
, a = e[3]
, o = e[4]
, l = [];
for (let i = 0, c = t.length; i < c; i++) {
const e = t[i]
, c = r[i]
, u = s[i]
, d = a[i]
, h = o[i];
if (void 0 === e)
continue;
e.updateMatrix && e.updateMatrix();
const p = n._createAnimationTracks(e, c, u, d, h);
if (p)
for (let t = 0; t < p.length; t++)
l.push(p[t])
}
return new of(i,void 0,l)
}
))
}
createNodeMesh(e) {
const t = this.json
, n = this
, r = t.nodes[e];
return void 0 === r.mesh ? null : n.getDependency("mesh", r.mesh).then((function(e) {
const t = n._getNodeRef(n.meshCache, r.mesh, e);
return void 0 !== r.weights && t.traverse((function(e) {
if (e.isMesh)
for (let t = 0, n = r.weights.length; t < n; t++)
e.morphTargetInfluences[t] = r.weights[t]
}
)),
t
}
))
}
loadNode(e) {
const t = this
, n = this.json.nodes[e]
, r = t._loadNodeShallow(e)
, i = []
, s = n.children || [];
for (let o = 0, l = s.length; o < l; o++)
i.push(t.getDependency("node", s[o]));
const a = void 0 === n.skin ? Promise.resolve(null) : t.getDependency("skin", n.skin);
return Promise.all([r, Promise.all(i), a]).then((function(e) {
const t = e[0]
, n = e[1]
, r = e[2];
null !== r && t.traverse((function(e) {
e.isSkinnedMesh && e.bind(r, MR)
}
));
for (let i = 0, s = n.length; i < s; i++)
t.add(n[i]);
return t
}
))
}
_loadNodeShallow(e) {
const t = this.json
, n = this.extensions
, r = this;
if (void 0 !== this.nodeCache[e])
return this.nodeCache[e];
const i = t.nodes[e]
, s = i.name ? r.createUniqueName(i.name) : ""
, a = []
, o = r._invokeOne((function(t) {
return t.createNodeMesh && t.createNodeMesh(e)
}
));
return o && a.push(o),
void 0 !== i.camera && a.push(r.getDependency("camera", i.camera).then((function(e) {
return r._getNodeRef(r.cameraCache, i.camera, e)
}
))),
r._invokeAll((function(t) {
return t.createNodeAttachment && t.createNodeAttachment(e)
}
)).forEach((function(e) {
a.push(e)
}
)),
this.nodeCache[e] = Promise.all(a).then((function(t) {
let a;
if (a = !0 === i.isBone ? new nd : t.length > 1 ? new du : 1 === t.length ? t[0] : new ea,
a !== t[0])
for (let e = 0, n = t.length; e < n; e++)
a.add(t[e]);
if (i.name && (a.userData.name = i.name,
a.name = s),
bR(a, i),
i.extensions && xR(n, a, i),
void 0 !== i.matrix) {
const e = new Es;
e.fromArray(i.matrix),
a.applyMatrix4(e)
} else
void 0 !== i.translation && a.position.fromArray(i.translation),
void 0 !== i.rotation && a.quaternion.fromArray(i.rotation),
void 0 !== i.scale && a.scale.fromArray(i.scale);
return r.associations.has(a) || r.associations.set(a, {}),
r.associations.get(a).nodes = e,
a
}
)),
this.nodeCache[e]
}
loadScene(e) {
const t = this.extensions
, n = this.json.scenes[e]
, r = this
, i = new du;
n.name && (i.name = r.createUniqueName(n.name)),
bR(i, n),
n.extensions && xR(t, i, n);
const s = n.nodes || []
, a = [];
for (let o = 0, l = s.length; o < l; o++)
a.push(r.getDependency("node", s[o]));
return Promise.all(a).then((function(e) {
for (let t = 0, n = e.length; t < n; t++)
i.add(e[t]);
return r.associations = (e => {
const t = new Map;
for (const [n,i] of r.associations)
(n instanceof xa || n instanceof Gi) && t.set(n, i);
return e.traverse((e => {
const n = r.associations.get(e);
null != n && t.set(e, n)
}
)),
t
}
)(i),
i
}
))
}
_createAnimationTracks(e, t, n, r, i) {
const s = []
, a = e.name ? e.name : e.uuid
, o = [];
let l;
switch (pR[i.path] === pR.weights ? e.traverse((function(e) {
e.morphTargetInfluences && o.push(e.name ? e.name : e.uuid)
}
)) : o.push(a),
pR[i.path]) {
case pR.weights:
l = tf;
break;
case pR.rotation:
l = rf;
break;
case pR.position:
case pR.scale:
l = af;
break;
default:
if (1 === n.itemSize)
l = tf;
else
l = af
}
const c = void 0 !== r.interpolation ? fR[r.interpolation] : tr
, u = this._getArrayFromAccessor(n);
for (let d = 0, h = o.length; d < h; d++) {
const e = new l(o[d] + "." + pR[i.path],t.array,u,c);
"CUBICSPLINE" === r.interpolation && this._createCubicSplineTrackInterpolant(e),
s.push(e)
}
return s
}
_getArrayFromAccessor(e) {
let t = e.array;
if (e.normalized) {
const e = AR(t.constructor)
, n = new Float32Array(t.length);
for (let r = 0, i = t.length; r < i; r++)
n[r] = t[r] * e;
t = n
}
return t
}
_createCubicSplineTrackInterpolant(e) {
e.createInterpolant = function(e) {
return new (this instanceof rf ? aR : iR)(this.times,this.values,this.getValueSize() / 3,e)
}
,
e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline = !0
}
}
function ER(e, t, n) {
const r = t.attributes
, i = [];
function s(t, r) {
return n.getDependency("accessor", t).then((function(t) {
e.setAttribute(r, t)
}
))
}
for (const a in r) {
const t = hR[a] || a.toLowerCase();
t in e.attributes || i.push(s(r[a], t))
}
if (void 0 !== t.indices && !e.index) {
const r = n.getDependency("accessor", t.indices).then((function(t) {
e.setIndex(t)
}
));
i.push(r)
}
return bR(e, t),
function(e, t, n) {
const r = t.attributes
, i = new es;
if (void 0 === r.POSITION)
return;
{
const e = n.json.accessors[r.POSITION]
, t = e.min
, s = e.max;
if (void 0 === t || void 0 === s)
return void console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");
if (i.set(new Qi(t[0],t[1],t[2]), new Qi(s[0],s[1],s[2])),
e.normalized) {
const t = AR(lR[e.componentType]);
i.min.multiplyScalar(t),
i.max.multiplyScalar(t)
}
}
const s = t.targets;
if (void 0 !== s) {
const e = new Qi
, t = new Qi;
for (let r = 0, i = s.length; r < i; r++) {
const i = s[r];
if (void 0 !== i.POSITION) {
const r = n.json.accessors[i.POSITION]
, s = r.min
, a = r.max;
if (void 0 !== s && void 0 !== a) {
if (t.setX(Math.max(Math.abs(s[0]), Math.abs(a[0]))),
t.setY(Math.max(Math.abs(s[1]), Math.abs(a[1]))),
t.setZ(Math.max(Math.abs(s[2]), Math.abs(a[2]))),
r.normalized) {
const e = AR(lR[r.componentType]);
t.multiplyScalar(e)
}
e.max(t)
} else
console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")
}
}
i.expandByVector(e)
}
e.boundingBox = i;
const a = new ys;
i.getCenter(a.center),
a.radius = i.min.distanceTo(i.max) / 2,
e.boundingSphere = a
}(e, t, n),
Promise.all(i).then((function() {
return void 0 !== t.targets ? function(e, t, n) {
let r = !1
, i = !1
, s = !1;
for (let c = 0, u = t.length; c < u; c++) {
const e = t[c];
if (void 0 !== e.POSITION && (r = !0),
void 0 !== e.NORMAL && (i = !0),
void 0 !== e.COLOR_0 && (s = !0),
r && i && s)
break
}
if (!r && !i && !s)
return Promise.resolve(e);
const a = []
, o = []
, l = [];
for (let c = 0, u = t.length; c < u; c++) {
const u = t[c];
if (r) {
const t = void 0 !== u.POSITION ? n.getDependency("accessor", u.POSITION) : e.attributes.position;
a.push(t)
}
if (i) {
const t = void 0 !== u.NORMAL ? n.getDependency("accessor", u.NORMAL) : e.attributes.normal;
o.push(t)
}
if (s) {
const t = void 0 !== u.COLOR_0 ? n.getDependency("accessor", u.COLOR_0) : e.attributes.color;
l.push(t)
}
}
return Promise.all([Promise.all(a), Promise.all(o), Promise.all(l)]).then((function(t) {
const n = t[0]
, a = t[1]
, o = t[2];
return r && (e.morphAttributes.position = n),
i && (e.morphAttributes.normal = a),
s && (e.morphAttributes.color = o),
e.morphTargetsRelative = !0,
e
}
))
}(e, t.targets, n) : e
}
))
}
let TR = null
, RR = "https://www.gstatic.com/draco/versioned/decoders/1.5.5/";
function BR(e, t, n) {
return r => {
n && n(r),
e && (TR || (TR = new _T),
TR.setDecoderPath("string" === typeof e ? e : RR),
r.setDRACOLoader(TR)),
t && r.setMeshoptDecoder("function" === typeof AT ? AT() : AT)
}
}
function PR(e) {
return Rv(BT, e, BR(!(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1], !(arguments.length > 2 && void 0 !== arguments[2]) || arguments[2], arguments.length > 3 ? arguments[3] : void 0))
}
function kR(e, t) {
let n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {};
const r = new Qi
, i = new Yi
, s = new Qi
, a = new Es
, o = new Es
, l = new Es;
n.preserveMatrix = void 0 === n.preserveMatrix || n.preserveMatrix,
n.preservePosition = void 0 === n.preservePosition || n.preservePosition,
n.preserveHipPosition = void 0 !== n.preserveHipPosition && n.preserveHipPosition,
n.useTargetMatrix = void 0 !== n.useTargetMatrix && n.useTargetMatrix,
n.hip = void 0 !== n.hip ? n.hip : "hip",
n.names = n.names || {};
const c = t.isObject3D ? t.skeleton.bones : IR(t)
, u = e.isObject3D ? e.skeleton.bones : IR(e);
let d, h, p, f, m;
if (e.isObject3D ? e.skeleton.pose() : (n.useTargetMatrix = !0,
n.preserveMatrix = !1),
n.preservePosition) {
m = [];
for (let e = 0; e < u.length; e++)
m.push(u[e].position.clone())
}
if (n.preserveMatrix) {
e.updateMatrixWorld(),
e.matrixWorld.identity();
for (let t = 0; t < e.children.length; ++t)
e.children[t].updateMatrixWorld(!0)
}
if (n.offsets) {
d = [];
for (let e = 0; e < u.length; ++e)
h = u[e],
p = n.names[h.name] || h.name,
n.offsets[p] && (h.matrix.multiply(n.offsets[p]),
h.matrix.decompose(h.position, h.quaternion, h.scale),
h.updateMatrixWorld()),
d.push(h.matrixWorld.clone())
}
for (let g = 0; g < u.length; ++g) {
if (h = u[g],
p = n.names[h.name] || h.name,
f = LR(p, c),
l.copy(h.matrixWorld),
f) {
if (f.updateMatrixWorld(),
n.useTargetMatrix ? o.copy(f.matrixWorld) : (o.copy(e.matrixWorld).invert(),
o.multiply(f.matrixWorld)),
s.setFromMatrixScale(o),
o.scale(s.set(1 / s.x, 1 / s.y, 1 / s.z)),
l.makeRotationFromQuaternion(i.setFromRotationMatrix(o)),
e.isObject3D) {
const t = u.indexOf(h)
, n = d ? d[t] : a.copy(e.skeleton.boneInverses[t]).invert();
l.multiply(n)
}
l.copyPosition(o)
}
h.parent && h.parent.isBone ? (h.matrix.copy(h.parent.matrixWorld).invert(),
h.matrix.multiply(l)) : h.matrix.copy(l),
n.preserveHipPosition && p === n.hip && h.matrix.setPosition(r.set(0, h.position.y, 0)),
h.matrix.decompose(h.position, h.quaternion, h.scale),
h.updateMatrixWorld()
}
if (n.preservePosition)
for (let g = 0; g < u.length; ++g)
h = u[g],
p = n.names[h.name] || h.name,
p !== n.hip && h.position.copy(m[g]);
n.preserveMatrix && e.updateMatrixWorld(!0)
}
function LR(e, t) {
for (let n = 0, r = IR(t); n < r.length; n++)
if (e === r[n].name)
return r[n]
}
function IR(e) {
return Array.isArray(e) ? e : e.bones
}
function NR(e, t, n) {
n(e, t);
for (let r = 0; r < e.children.length; r++)
NR(e.children[r], t.children[r], n)
}
PR.preload = function(e) {
let t = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1]
, n = !(arguments.length > 2 && void 0 !== arguments[2]) || arguments[2]
, r = arguments.length > 3 ? arguments[3] : void 0;
return Rv.preload(BT, e, BR(t, n, r))
}
,
PR.clear = e => Rv.clear(BT, e),
PR.setDecoderPath = e => {
RR = e
}
;
const DR = {
retarget: kR,
retargetClip: function(e, t, n) {
let r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {};
r.useFirstFramePosition = void 0 !== r.useFirstFramePosition && r.useFirstFramePosition,
r.fps = void 0 !== r.fps ? r.fps : 30,
r.names = r.names || [],
t.isObject3D || (t = function(e) {
const t = new Ym(e.bones[0]);
return t.skeleton = e,
t
}(t));
const i = Math.round(n.duration * (r.fps / 1e3) * 1e3)
, s = 1 / r.fps
, a = []
, o = new Tm(t)
, l = IR(e.skeleton)
, c = [];
let u, d, h, p, f;
o.clipAction(n).play(),
o.update(0),
t.updateMatrixWorld();
for (let m = 0; m < i; ++m) {
const n = m * s;
kR(e, t, r);
for (let e = 0; e < l.length; ++e)
f = r.names[l[e].name] || l[e].name,
h = LR(f, t.skeleton),
h && (d = l[e],
p = c[e] = c[e] || {
bone: d
},
r.hip === f && (p.pos || (p.pos = {
times: new Float32Array(i),
values: new Float32Array(3 * i)
}),
r.useFirstFramePosition && (0 === m && (u = d.position.clone()),
d.position.sub(u)),
p.pos.times[m] = n,
d.position.toArray(p.pos.values, 3 * m)),
p.quat || (p.quat = {
times: new Float32Array(i),
values: new Float32Array(4 * i)
}),
p.quat.times[m] = n,
d.quaternion.toArray(p.quat.values, 4 * m));
o.update(s),
t.updateMatrixWorld()
}
for (let m = 0; m < c.length; ++m)
p = c[m],
p && (p.pos && a.push(new af(".bones[" + p.bone.name + "].position",p.pos.times,p.pos.values)),
a.push(new rf(".bones[" + p.bone.name + "].quaternion",p.quat.times,p.quat.values)));
return o.uncacheAction(n),
new of(n.name,-1,a)
},
clone: function(e) {
const t = new Map
, n = new Map
, r = e.clone();
return NR(e, r, (function(e, r) {
t.set(r, e),
n.set(e, r)
}
)),
r.traverse((function(e) {
if (!e.isSkinnedMesh)
return;
const r = e
, i = t.get(e)
, s = i.skeleton.bones;
r.skeleton = i.skeleton.clone(),
r.bindMatrix.copy(i.bindMatrix),
r.skeleton.bones = s.map((function(e) {
return n.get(e)
}
)),
r.bind(r.skeleton, r.bindMatrix)
}
)),
r
}
};
const jR = i.forwardRef(( (e, t) => {
let {isChild: n=!1, object: r, children: s, deep: a, castShadow: o, receiveShadow: l, inject: c, keys: u, ...d} = e;
const h = {
keys: u,
deep: a,
inject: c,
castShadow: o,
receiveShadow: l
};
if (r = i.useMemo(( () => {
if (!1 === n && !Array.isArray(r)) {
let e = !1;
if (r.traverse((t => {
t.isSkinnedMesh && (e = !0)
}
)),
e)
return DR.clone(r)
}
return r
}
), [r, n]),
Array.isArray(r))
return i.createElement("group", Cb({}, d, {
ref: t
}), r.map((e => i.createElement(jR, Cb({
key: e.uuid,
object: e
}, h)))), s);
const {children: p, ...f} = function(e, t) {
let {keys: n=["near", "far", "color", "distance", "decay", "penumbra", "angle", "intensity", "skeleton", "visible", "castShadow", "receiveShadow", "morphTargetDictionary", "morphTargetInfluences", "name", "geometry", "material", "position", "rotation", "scale", "up", "userData", "bindMode", "bindMatrix", "bindMatrixInverse", "skeleton"], deep: r, inject: s, castShadow: a, receiveShadow: o} = t
, l = {};
for (const i of n)
l[i] = e[i];
return r && (l.geometry && "materialsOnly" !== r && (l.geometry = l.geometry.clone()),
l.material && "geometriesOnly" !== r && (l.material = l.material.clone())),
s && (l = "function" === typeof s ? {
...l,
children: s(e)
} : i.isValidElement(s) ? {
...l,
children: s
} : {
...l,
...s
}),
e instanceof co && (a && (l.castShadow = !0),
o && (l.receiveShadow = !0)),
l
}(r, h)
, m = r.type[0].toLowerCase() + r.type.slice(1);
return i.createElement(m, Cb({}, f, d, {
ref: t
}), r.children.map((e => "Bone" === e.type ? i.createElement("primitive", Cb({
key: e.uuid,
object: e
}, h)) : i.createElement(jR, Cb({
key: e.uuid,
object: e
}, h, {
isChild: !0
})))), s, p)
}
));
function FR() {
const {width: e, height: t, handle: n, frameType: r} = (0,
i.useContext)($A)
, s = PR("./models/Handle ".concat(n, ".glb"))
, a = ZA(r);
return s.scene.traverse((e => {
e.isMesh && (e.material = new ba({
map: a,
side: Ne
}))
}
)),
(0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsx)(jR, {
object: s.scene,
position: [.03 * e + .1 - (5 === n || 6 === n ? .6 : 0), -.053 * t / 1e4, .045],
scale: 7 === n ? 4.88 : 4 === n ? 6 : 5,
rotation: [0, -Math.PI / 2, 0]
}), (0,
Ig.jsx)(jR, {
object: s.scene,
position: [.03 * e + .1 - (5 === n || 6 === n ? .6 : 0), -.053 * t / 1e4, -.045],
scale: 7 === n ? 4.88 : 4 === n ? 6 : 5,
rotation: [0, [5, 6, 7, 8].includes(n) ? Math.PI / 2 : -Math.PI / 2, [5, 6, 7, 8].includes(n) ? 0 : Math.PI]
})]
})
}
function OR(e, t) {
const n = e + "Geometry";
return i.forwardRef(( (e, r) => {
let {args: s, children: a, ...o} = e;
const l = i.useRef(null);
return i.useImperativeHandle(r, ( () => l.current)),
i.useLayoutEffect(( () => {
null == t || t(l.current)
}
)),
i.createElement("mesh", Cb({
ref: l
}, o), i.createElement(n, {
attach: "geometry",
args: s
}), a)
}
))
}
const UR = OR("box");
new Ap(2e-4,16,8),
new Ip({
emissive: 16777215,
emissiveIntensity: 1,
color: 0
});
function zR() {
const {type: e, width: t, height: n, frameType: r, frameSize: s, doorConfig: a, sidePannel: o, sidePannelSize: l, setStalenPart: c, stalenType: u, setWidth: d, stalenPart: h, sidePannelConfig: p, open: f, setOpen: m, holeWidth: g, setHoleWidth: v, inprogress: y, setInprogress: x} = (0,
i.useContext)($A)
, [b,_] = (0,
i.useState)()
, [w,S] = ((0,
i.useRef)(null),
(0,
i.useState)(0))
, [A,M] = (0,
i.useState)(0)
, [C,E] = (0,
i.useState)({
fixedPosition: 0,
viewPosition: 0,
handlePostion: 0
})
, [T,R] = (0,
i.useState)({
fixedPosition: 0,
viewPosition: 0,
handlePostion: 0,
sizePannel: 0
})
, [B,P] = (0,
i.useState)({
fixedPosition: 0,
viewPosition: 0,
handlePostion: 0,
sizePannel: 0
})
, [k,L] = (0,
i.useState)({
position: 0,
width: 0
})
, I = (0,
i.useRef)({})
, N = (0,
i.useRef)({})
, D = (0,
i.useRef)({})
, [j,F] = (0,
i.useState)(!1)
, O = (0,
i.useRef)(!0)
, U = (ZA(r),
ZA(r))
, z = ZA(r)
, G = (ZA(r),
(0,
i.useRef)())
, H = (0,
i.useRef)();
(0,
i.useEffect)(( () => {
const e = new If(16777187,70);
e.position.set(-5, 7, 15),
e.castShadow = !0,
e.shadow.mapSize.width = 4096,
e.shadow.mapSize.height = 4096,
e.shadow.camera.left = -10,
e.shadow.camera.right = 20,
e.shadow.camera.top = 10,
e.shadow.camera.bottom = -10,
e.shadow.camera.near = 1,
e.shadow.camera.far = 20,
e.shadow.bias = -.001,
G.current = e;
const t = new jf(16777215,30);
t.intensity = 1.3,
H.current = t
}
), []),
(0,
i.useEffect)(( () => {
L({
position: "enkele" != a || "links" != o && "rechts" != o ? "enkele" == a && "beide" == o ? 0 : "dubbele" != a || "links" != o && "rechts" != o && "beide" != o ? w : 0 : "links" == o ? (te - ne) / 2 : -(te - ne) / 2,
width: "vast-stalen" != e || "divider" != u && "tussen" != u ? ("enkele" == a && ("links" == o || "rechts" == o) || "enkele" != a && "geen" == o ? "enkele" != a && "geen" == o ? 2 * te + 8 * s : te + ne + 8 * s : "enkele" == a && "beide" == o || "dubbele" == a && ("rechts" == o || "links" == o) ? "enkele" == a ? te + 2 * ne + 12 * s : 2 * te + ne + 12 * s : "dubbele" == a && "beide" == o ? 2 * te + 2 * ne + 16 * s : te + 4 * s) + ("Scharnier" == e ? 2 * $ : 0) : "divider" == u ? 4 * (te + 4 * s) : .06 * t + 4 * s + 3.5 * (h - 1) * s
});
const n = .06 * ("enkele" == a && "links" == o ? l : t) + 3 * s
, r = .06 * ("enkele" != a || "rechts" != o && "beide" != o ? "dubbele" == a && "rechts" == o ? l : t : l) + 3 * s
, i = .06 * ("dubbele" != a || "links" != o && "beide" != o ? "enkele" == a && "beide" == o ? l : t : l) + 3 * s;
let c = -n / 2 - 1.25 * s
, d = n / 2
, p = n / 2
, f = -r / 2 - 1.25 * s
, m = r / 2
, g = -i / 2 - 1.25 * s;
"enkele" == a ? "links" == o || "rechts" == o ? (c = -n - 1.25 * s,
f = r - 1.25 * s,
m = r / 2) : "beide" == o && (f = te / 2 + r + .55 * s,
g = -(te / 2 + r + 3 * s)) : "geen" == o ? (c = -n - 1.25 * s,
f = r - 1.25 * s) : "rechts" == o ? (c = te - ne / 2 + .5 * s,
f = te + ne / 2 + 4 * s,
d = -n / 2,
p = -n / 2,
g = -te - ne / 2 - 6 * s) : "beide" == o ? (c = -n - 1.25 * s,
f = r - 1 * s,
g = -te - .06 * l - 7.5 * s) : "links" == o && (c = ne / 2 - te - 2.5 * s,
f = te + ne / 2 + 4 * s,
g = -te - ne / 2 - 6 * s);
const v = {
fixedPosition: c,
viewPosition: d,
handlePostion: p
}
, y = {
fixedPosition: f,
viewPosition: r / 2,
handlePostion: m
}
, x = {
fixedPosition: g,
viewPosition: i / 2,
handlePostion: i / 2
};
E(v),
R(y),
P(x),
N.current = v,
I.current = y,
D.current = x
}
), [a, b, o, w, l, u, e, t, h]);
const [V,W,J] = Rv(_f, ["textures/floor texture.jpeg", "textures/bump_map.png", "textures/roughness_map.png"])
, [X,K,q] = Rv(_f, ["textures/wall-1.jpg", "textures/wall-1.jpg", "textures/wall-1.jpg"])
, [Y,Q,Z] = Rv(_f, ["textures/wall-2.jpg", "textures/wall-2.jpg", "textures/wall-2.jpg"]);
[V, W, J].forEach((e => {
e.wrapS = Nt,
e.wrapT = Nt,
e.anisotropy = 4,
e.repeat.set(2, 4),
e.bumpScale = 1e-5
}
)),
[X, K, q].forEach((e => {
e.wrapS = Nt,
e.wrapT = Nt,
e.anisotropy = 4,
e.repeat.set(25.2, 25.2),
e.bumpScale = .01
}
)),
[Y, Q, Z].forEach((e => {
e.wrapS = Nt,
e.wrapT = Nt,
e.anisotropy = 4,
e.repeat.set(25.2, 25.2),
e.bumpScale = .01
}
));
const $ = .19
, ee = .053 * n
, te = (0,
i.useMemo)(( () => .06 * t), [t])
, ne = (0,
i.useMemo)(( () => .06 * l), [l])
, re = (0,
i.useMemo)(( () => .053 * n), [n])
, ie = (0,
i.useMemo)(( () => {
const e = new Ip({
roughness: .8,
color: 16777215,
metalness: .2,
map: V,
bumpMap: W,
roughnessMap: J,
castShadow: !0
});
return e.bumpScale = 1,
e
}
), [V, W, J])
, se = (0,
i.useMemo)(( () => {
const e = new Ip({
roughness: .8,
color: 7829367,
metalness: .2,
map: X,
bumpMap: K,
roughnessMap: q,
castShadow: !0
});
return e.bumpScale = 1,
e
}
), [X, K, q])
, ae = ((0,
i.useMemo)(( () => {
const e = new Ip({
roughness: .8,
color: 7829367,
metalness: .2,
map: Y,
bumpMap: Q,
roughnessMap: Z,
castShadow: !0
});
return e.bumpScale = 1,
e
}
), [Y, Q, Z]),
(0,
i.useMemo)(( () => .06 * t * ("beide" === o && "enkele" === a ? 3 : "geen" !== o && "dubbele" === a ? 4 : 2)), [t, o, a]))
, oe = (0,
i.useRef)()
, le = (0,
i.useRef)()
, ce = (0,
i.useRef)()
, ue = (0,
i.useRef)()
, de = () => {
m((e => !e)),
he()
}
, he = function() {
let t = arguments.length > 0 && void 0 !== arguments[0] && arguments[0];
"enkele" === a ? "Schuifdeur" === e ? "links" === o ? gT.to(ce.current.position, {
x: t || f ? I.current.fixedPosition : "dubbele" === a || "links" === o || "rechts" === o ? .01 * -te : 1.3 * te,
duration: 1.5,
ease: "power3.out",
onUpdate: Pv
}) : gT.to(le.current.position, {
x: t || f ? N.current.fixedPosition : "rechts" === o ? .05 * -te : 1.3 * -te,
duration: 1.5,
ease: "power3.out",
onUpdate: Pv
}) : ("links" !== o && gT.to(le.current.rotation, {
y: t || f ? 0 : -Math.PI / 2,
duration: 1.5,
ease: "power3.out",
onUpdate: Pv
}),
"dubbele" !== a && "links" !== o || gT.to(ce.current.rotation, {
y: t || f ? -Math.PI : -Math.PI / 2,
duration: 1.5,
ease: "power3.out",
onUpdate: Pv
})) : "Schuifdeur" === e ? "links" === o ? (gT.to(ce.current.position, {
x: t || f ? I.current.fixedPosition : 2.2 * te,
duration: 1.5,
ease: "power3.out",
onUpdate: Pv
}),
gT.to(le.current.position, {
x: t || f ? N.current.fixedPosition : 1.5 * -te,
duration: 1.5,
ease: "power3.out",
onUpdate: Pv
})) : "rechts" === o ? (gT.to(le.current.position, {
x: t || f ? N.current.fixedPosition : 1.4 * te,
duration: 1.5,
ease: "power3.out",
onUpdate: Pv
}),
gT.to(B.fixedPosition, {
x: t || f ? -te / 2 * 3.15 : 2.2 * -te,
duration: 1.5,
ease: "power3.out",
onUpdate: Pv
})) : (gT.to(ce.current.position, {
x: t || f ? I.current.fixedPosition : "dubbele" === a || "links" === o || "rechts" === o ? 1.8 * te : 1.3 * te,
duration: 1.5,
ease: "power3.out",
onUpdate: Pv
}),
gT.to(le.current.position, {
x: t || f ? N.current.fixedPosition : "dubbele" === a || "links" === o || "rechts" === o ? 1.8 * -te : 1.3 * -te,
duration: 1.5,
ease: "power3.out",
onUpdate: Pv
})) : "rechts" === o ? (gT.to(le.current.rotation, {
y: t || f ? 0 : Math.PI / 2,
duration: 1.5,
ease: "power3.out",
onUpdate: Pv
}),
gT.to(ue.current.rotation, {
y: t || f ? 0 : -Math.PI / 2,
duration: 1.5,
ease: "power3.out",
onUpdate: Pv
})) : (gT.to(ce.current.rotation, {
y: t || f ? -Math.PI : -Math.PI / 2,
duration: 1.5,
ease: "power3.out",
onUpdate: Pv
}),
gT.to(le.current.rotation, {
y: t || f ? 0 : -Math.PI / 2,
duration: 1.5,
ease: "power3.out",
onUpdate: Pv
})),
"Schuifdeur" === e && t ? setTimeout(( () => {
x(!1)
}
), 1500) : x(!t && !f)
};
return (0,
i.useEffect)(( () => {
if (O.current)
return void (O.current = !1);
let t;
return "vast-stalen" != e && (m(!1),
he(),
t = setTimeout(( () => {
m(!1),
he(!0)
}
), 1500)),
() => clearTimeout(t)
}
), [e, a, o]),
(0,
Ig.jsx)(Ig.Fragment, {
children: (0,
Ig.jsxs)("group", {
scale: .4,
position: [0, -.3, .9],
children: [(0,
Ig.jsx)("group", {
position: [k.position, 5.5, -13.5],
children: (0,
Ig.jsxs)("mesh", {
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsxs)(KA, {
ref: oe,
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)(qA, {
geometry: new ho(40,30,1)
}), (0,
Ig.jsx)(YA, {
position: [-.15, .5 * (-23.3 + re), 0],
visible: !1,
castShadow: !0,
receiveShadow: !0,
children: (0,
Ig.jsx)("boxGeometry", {
args: [k.width, re + ("Scharnier" == e ? .7 : .4), 1],
castShadow: !0,
receiveShadow: !0
})
})]
}), (0,
Ig.jsx)("meshStandardMaterial", {
map: se.map,
bumpMap: se.bumpMap,
roughnessMap: se.roughnessMap
})]
})
}), (0,
Ig.jsxs)("group", {
position: [0, 5.5, -13.5],
children: [(0,
Ig.jsxs)("mesh", {
position: [0, -11.8, 10],
rotation: [0, -Math.PI / 2, 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [30, .1, 40]
}), (0,
Ig.jsx)("meshStandardMaterial", {
map: ie.map,
bumpMap: ie.bumpMap,
roughnessMap: ie.roughnessMap
})]
}), (0,
Ig.jsx)(UR, {
position: [0, 0, -10],
args: [50, 50, .1],
castShadow: !0,
receiveShadow: !0,
children: (0,
Ig.jsx)("meshStandardMaterial", {
attach: "material",
color: "#ffffff"
})
}), (0,
Ig.jsx)(UR, {
position: [-123, -3, 0],
args: [3, 30, .1],
castShadow: !0,
receiveShadow: !0,
children: (0,
Ig.jsx)("meshStandardMaterial", {
attach: "material",
color: "#ff0000"
})
}), G.current && (0,
Ig.jsx)("primitive", {
object: G.current
}), H.current && (0,
Ig.jsx)("primitive", {
object: H.current
})]
}), "Scharnier" == e && (0,
Ig.jsx)(Ig.Fragment, {
children: (0,
Ig.jsxs)("group", {
position: [0, .5 * (-11.8 + re), -13.4],
children: [(0,
Ig.jsxs)("mesh", {
position: [-s, re / 2 + $ / 2 - .08, 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: ["enkele" == a ? "geen" == o ? .06 * g + 2 * $ : "links" == o || "rechts" == o ? .06 * g + 4 * s + 3 * $ : .06 * g + 4 * s + 4 * $ : "geen" == o ? .06 * g + 2 * $ + 4 * s : "links" == o || "rechts" == o ? .06 * g + 6 * s + 2 * $ : .06 * g + 4 * s + 5 * $, $, .38]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: U
})]
}), (0,
Ig.jsxs)("mesh", {
position: ["enkele" == a ? "geen" == o ? .06 * g / 2 + $ / 2 : "links" == o || "rechts" == o ? .06 * g / 2 + $ + s : .06 * g / 2 + 2 * $ : "geen" == o ? .06 * g / 2 + $ + s : "links" == o || "rechts" == o ? .06 * g / 2 + 2 * $ + s : .06 * g / 2 + 2 * $ + 2 * s, -$, 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [$, ee + 2 * $ + 2 * s, .38]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: z
})]
}), (0,
Ig.jsxs)("mesh", {
position: ["enkele" == a ? "geen" == o ? -(.06 * g / 2 + 2 * $) : "links" == o || "rechts" == o ? -(.06 * g / 2 + 2 * $ + 2 * s) : -(.06 * g / 2 + 3 * $ + 2 * s) : "geen" == o ? -(.06 * g / 2 + $ + 3 * s) : "links" == o || "rechts" == o ? -(.06 * g / 2 + 3 * $ + 2 * s) : -(.06 * g / 2 + 3 * $ + 3 * s), -$, 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [$ + .08, ee + 2 * $ + 2 * s, .38]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: z
})]
})]
})
}), "Schuifdeur" == e && (0,
Ig.jsxs)(Ig.Fragment, {
children: ["enkele" == a && "geen" != o && (0,
Ig.jsx)("group", {
position: [-.3, .5 * (-12 + re), "Schuifdeur" == e ? "links" == o ? -12.7 : "rechts" == o ? -12.9 : -12.8 : "links" == o ? -13.4 : "rechts" == o ? -13.6 : -13.5],
children: (0,
Ig.jsxs)("mesh", {
position: [.2, re / 2 + $ / 2, 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [ae + .7, .4, .6]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: z,
castShadow: !0,
receiveShadow: !0
})]
})
}), "enkele" == a && "geen" == o && (0,
Ig.jsx)("group", {
position: [(-te / 2 - .15) * ("enkele" == a && "links" == o || "rechts" == o || "enkele" != a && "geen" == o ? 2 : "enkele" == a || "links" != o && "rechts" != o ? 1 : 3), .5 * (-12 + re), "Schuifdeur" == e ? "links" == o ? -12.7 : "rechts" == o ? -12.9 : -12.8 : "links" == o ? -13.4 : "rechts" == o ? -13.6 : -13.5],
children: (0,
Ig.jsxs)("mesh", {
position: [.2, re / 2 + $ / 2, 0],
castShadow: !0,
receiveShadow: !0,
children: [(0,
Ig.jsx)("boxGeometry", {
args: [ae, .4, .6]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: z,
castShadow: !0,
receiveShadow: !0
})]
})
}), "dubbele" == a && (0,
Ig.jsx)(Ig.Fragment, {
children: "geen" == o || "beide" == o ? (0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsx)("group", {
position: [(te / 2 - .25) * ("enkele" == a && "links" == o || "rechts" == o || "enkele" != a && "geen" == o ? 2 : "enkele" == a || "links" != o && "rechts" != o ? 1 : 3), .5 * (-12 + re), "Schuifdeur" == e ? "links" == o ? -12.7 : "rechts" == o ? -12.9 : -12.8 : "links" == o ? -13.4 : "rechts" == o ? -13.6 : -13.5],
children: (0,
Ig.jsxs)("mesh", {
position: [.2, re / 2 + $ / 2, 0],
children: [(0,
Ig.jsx)("boxGeometry", {
args: [ae, .4, .6]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: z,
castShadow: !0,
receiveShadow: !0
})]
})
}), (0,
Ig.jsx)("group", {
position: [-te / 2 * ("enkele" == a && "links" == o || "rechts" == o || "enkele" != a && "geen" == o ? 2 : "enkele" == a || "links" != o && "rechts" != o ? 1 : 3), .5 * (-12 + re), "Schuifdeur" == e ? "links" == o ? -12.7 : "rechts" == o ? -12.9 : -12.8 : "links" == o ? -13.4 : "rechts" == o ? -13.6 : -13.5],
children: (0,
Ig.jsxs)("mesh", {
position: [.2, re / 2 + $ / 2, 0],
children: [(0,
Ig.jsx)("boxGeometry", {
args: [ae, .4, .6]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: z,
castShadow: !0,
receiveShadow: !0
})]
})
})]
}) : (0,
Ig.jsx)(Ig.Fragment, {
children: (0,
Ig.jsx)("group", {
position: ["rechts" != o ? te / 2 - .85 : -te / 2, .5 * (-12 + re), "Schuifdeur" == e ? "links" == o ? -12.7 : "rechts" == o ? -12.9 : -12.8 : "links" == o ? -13.4 : "rechts" == o ? -13.6 : -13.5],
children: (0,
Ig.jsxs)("mesh", {
position: [.2, re / 2 + $ / 2, 0],
children: [(0,
Ig.jsx)("boxGeometry", {
args: [ae, .4, .6]
}), (0,
Ig.jsx)("meshBasicMaterial", {
map: z,
castShadow: !0,
receiveShadow: !0
})]
})
})
})
})]
}), "vast-stalen" != e ? (0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsxs)("group", {
position: [C.fixedPosition, .5 * (-12.2 + re), "enkele" == a ? "Schuifdeur" == e ? "links" == o ? -12.7 : "rechts" == o ? -12.9 : "beide" == o ? -12.65 : -12.8 : "links" == o || "rechts" == o ? -13.6 : -13.5 : "Schuifdeur" == e ? "links" == o || "rechts" == o || "beide" == o ? -12.7 : -12.8 : "links" == o || "rechts" == o ? -13.6 : -13.5],
ref: le,
onClick: e => {
e.stopPropagation(),
de()
}
,
children: [(0,
Ig.jsx)("group", {
position: [C.viewPosition, 0, 0],
rotation: [0, "dubbele" == a && "rechts" == o ? -Math.PI : 0, 0],
children: (0,
Ig.jsx)(yT, {
isSide: "enkele" == a && "links" == o,
isRotated: "dubbele" == a && "rechts" == o
})
}), "enkele" == a && "links" == o ? (0,
Ig.jsx)(Ig.Fragment, {}) : (0,
Ig.jsx)("group", {
position: [C.handlePostion, 0, 0],
rotation: [0, 0, "dubbele" == a && "rechts" == o ? Math.PI : 0],
children: (0,
Ig.jsx)(FR, {})
})]
}), ("dubbele" == a || "links" == o || "rechts" == o || "beide" == o) && (0,
Ig.jsxs)("group", {
position: [T.fixedPosition, .5 * (-12.2 + re), "enkele" == a ? "Schuifdeur" == e ? "links" == o ? -12.9 : "rechts" == o ? -12.7 : -12.8 : "links" == o || "rechts" == o ? -13.6 : -13.5 : "Schuifdeur" == e ? "links" == o || "beide" == o ? -12.7 : "rechts" == o ? -12.9 : -12.8 : "links" == o || "rechts" == o ? -13.6 : -13.5],
rotation: [0, -Math.PI, 0],
ref: ce,
onClick: e => {
e.stopPropagation(),
de()
}
,
children: [(0,
Ig.jsx)("group", {
position: [T.viewPosition, 0, 0],
children: (0,
Ig.jsx)(yT, {
isSide: "enkele" == a && ("rechts" == o || "beide" == o) || "dubbele" == a && "rechts" == o,
isRotated: !0
})
}), ("enkele" == a && "links" == o || "dubbele" == a && "rechts" != o) && (0,
Ig.jsx)("group", {
position: [T.handlePostion, 0, 0],
children: (0,
Ig.jsx)(FR, {})
})]
}), ("beide" == o || "dubbele" == a && ("links" == o || "rechts" == o)) && (0,
Ig.jsxs)("group", {
position: [B.fixedPosition, .5 * (-12.2 + re), "Schuifdeur" == e ? "links" == o ? -12.9 : "rechts" == o ? -12.7 : -12.8 : "links" == o || "rechts" == o ? -13.6 : -13.5],
ref: ue,
onClick: e => {
e.stopPropagation(),
de()
}
,
children: [(0,
Ig.jsx)("group", {
position: [B.viewPosition, 0, 0],
children: (0,
Ig.jsx)(yT, {
isSide: "dubbele" == a && ("links" == o || "beide" == o) || "enkele" == a && "beide" == o
})
}), "dubbele" == a && "rechts" == o && (0,
Ig.jsx)("group", {
position: [B.handlePostion, 0, 0],
children: (0,
Ig.jsx)(FR, {})
})]
}), "beide" == o && "dubbele" == a && (0,
Ig.jsx)("group", {
position: [te + .03 * l + 4 * s, .5 * (-12 + re), "Schuifdeur" == e ? "links" == o ? -12.9 : "rechts" == o ? -12.7 : -12.8 : "links" == o ? -13.4 : "rechts" == o ? -13.6 : -13.5],
rotation: [0, -Math.PI, 0],
onClick: e => {
e.stopPropagation(),
de()
}
,
children: (0,
Ig.jsx)("group", {
position: [0, -$ / 2, 0],
children: (0,
Ig.jsx)(yT, {
isSide: "dubbele" == a && "beide" == o,
isRotated: !0
})
})
})]
}) : (0,
Ig.jsx)(Ig.Fragment, {
children: (0,
Ig.jsx)(xT, {})
})]
})
})
}
function GR() {
return (0,
Ig.jsx)(Ig.Fragment, {
children: (0,
Ig.jsx)("div", {
style: {
width: "100%",
height: "100%",
display: "flex",
justifyContent: "center",
alignItems: "center",
backgroundSize: "cover"
},
children: (0,
Ig.jsx)("div", {
className: "loader"
})
})
})
}
const HR = e => {
let {message: t, children: n} = e;
return (0,
Ig.jsxs)("div", {
className: "relative group",
children: [n, "" !== t && (0,
Ig.jsx)("div", {
className: "absolute top-[30px] left-1/2 w-[140px] transform -translate-x-1/2 mb-2 hidden group-hover:block z-10",
children: (0,
Ig.jsxs)("div", {
className: "relative bg-gray-800 text-white text-xs rounded py-1 px-4",
children: [t, (0,
Ig.jsx)("div", {
className: "absolute top-[-5px] left-1/2 transform -translate-x-1/2 w-3 h-3 bg-gray-800 rotate-45"
})]
})
})]
})
}
, VR = e => {
let {title: t, containerStyles: n} = e;
const {bubbles: r} = (0,
i.useContext)($A)
, s = null !== r && void 0 !== r && r.find((e => {
let {name: n} = e;
return n === t
}
)) ? r.find((e => {
let {name: n} = e;
return n === t
}
)).text : "";
return (0,
Ig.jsxs)("span", {
style: {
display: "flex",
alignItems: "center",
gap: "10px",
...n
},
children: [t, (0,
Ig.jsx)(HR, {
message: s,
children: (0,
Ig.jsx)("span", {
style: {
borderRadius: "100%",
backgroundColor: "#bdc79d",
display: "flex",
justifyContent: "center",
alignItems: "center",
color: "white"
},
children: (0,
Ig.jsx)("svg", {
xmlns: "http://www.w3.org/2000/svg",
width: "18",
height: "18",
fill: "currentColor",
className: "bi bi-info",
viewBox: "0 0 16 16",
children: (0,
Ig.jsx)("path", {
d: "m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0"
})
})
})
})]
})
}
;
function WR() {
const {type: e, settype: t, setStep: n, width: r, setWidth: s, doorConfig: a, setDoorConfig: o, sidePannel: l, setSidePannel: c, sidePannelConfig: u, setSidePannelConfig: d, sidePannelSize: h, setSidePannelSize: p, stalenPart: f, setStalenPart: m, stalenType: g, setStalenType: v, open: y, inprogress: x, setInprogress: b, height: _, setHeight: w, holeWidth: S, setHoleWidth: A} = (0,
i.useContext)($A)
, [M,C] = (0,
i.useState)(!1);
(0,
i.useEffect)(( () => {
const e = () => {
C(window.innerWidth <= 800)
}
;
return e(),
window.addEventListener("resize", e),
() => {
window.removeEventListener("resize", e)
}
}
), []),
(0,
i.useEffect)(( () => {
p(r),
s(90),
p(90),
A(R())
}
), [a, u, l]);
const E = e => {
if (e.target.value > 285)
return;
const t = e.target.value;
isNaN(t) || w(t)
}
, T = () => "dubbele" != a && ("links" === l || "rechts" === l) || "dubbele" == a && "geen" == l ? 240 : "dubbele" != a && "beide" === l ? 360 : "dubbele" != a || "links" != l && "rechts" != l ? "dubbele" == a && "beide" == l ? 400 : 120 : 360
, R = () => "dubbele" != a && ("links" === l || "rechts" === l) || "dubbele" == a && "geen" == l ? 180 : "dubbele" != a && "beide" === l ? 270 : "dubbele" != a || "links" != l && "rechts" != l ? "dubbele" == a && "beide" == l ? 360 : 90 : 270
, B = e => {
e.target.value > T() || (A(e.target.value),
p(P(e.target.value, r)),
"geen" == l && s("dubbele" === a ? e.target.value / 2 : e.target.value))
}
, P = (e, t) => "dubbele" == a || "links" !== l && "rechts" !== l ? "dubbele" == a && "geen" == l ? 0 : "dubbele" != a && "beide" === l ? (e - Number(t)) / 2 : "dubbele" != a || "links" != l && "rechts" != l ? "dubbele" == a && "beide" == l ? (e - 2 * Number(t)) / 2 : 0 : e - 2 * Number(t) : e - Number(t);
return (0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsx)("div", {
style: {
margin: "5%",
paddingTop: "0.5rem",
display: "flex",
justifyContent: "space-between",
alignItems: "center",
fontWeight: "bolder",
fontSize: "normal"
},
children: (0,
Ig.jsx)("span", {
children: "Afmeting"
})
}), (0,
Ig.jsxs)("div", {
className: "slider-container",
style: {
margin: "5%"
},
children: [(0,
Ig.jsx)("div", {
className: "",
children: (0,
Ig.jsx)("p", {
style: {
marginBottom: "-5px"
},
children: "Hoogte"
})
}), (0,
Ig.jsxs)("div", {
className: "slider-container",
style: {
display: "flex",
alignItems: "center"
},
children: [(0,
Ig.jsx)("div", {
style: {
flex: 1
},
children: (0,
Ig.jsx)("input", {
type: "range",
min: "180",
max: "285",
value: _,
onChange: E,
className: "slider",
id: "range1",
style: {
width: "100%",
height: "8px",
borderRadius: "5px",
appearance: "none",
background: "#F2F2F3",
outline: "none",
marginTop: "10px"
}
})
}), (0,
Ig.jsxs)("div", {
style: {
marginLeft: "10px",
paddingLeft: "10px",
paddingRight: "10px",
paddingTop: "5px",
paddingBottom: "5px",
backgroundColor: "#F2F2F3",
position: "relative",
width: "5rem",
fontSize: "small",
border: "1px solid",
borderRadius: "4px"
},
children: [(0,
Ig.jsx)("input", {
type: "text",
style: {
width: "100%",
border: "none",
outline: "none",
background: "transparent"
},
value: _,
onChange: E,
onInput: e => e.target.value = e.target.value.replace(/[^0-9]/g, "")
}), (0,
Ig.jsx)("span", {
style: {
position: "absolute",
right: "10px",
top: "50%",
transform: "translateY(-50%)"
},
children: "cm"
})]
})]
})]
}), (0,
Ig.jsxs)("div", {
className: "slider-container",
style: {
margin: "5%",
borderBottom: "1px solid #d1d1d1",
paddingBottom: "15px"
},
children: [(0,
Ig.jsx)("div", {
className: "",
children: (0,
Ig.jsx)("p", {
style: {
marginBottom: "-5px"
},
children: "Breedte"
})
}), (0,
Ig.jsxs)("div", {
className: "slider-container",
style: {
display: "flex",
alignItems: "center"
},
children: [(0,
Ig.jsx)("div", {
style: {
flex: 1
},
children: (0,
Ig.jsx)("input", {
type: "range",
min: "dubbele" != a && ("links" === l || "rechts" === l) || "dubbele" == a && "geen" == l ? 120 : "dubbele" != a && "beide" === l ? 180 : "dubbele" != a || "links" != l && "rechts" != l ? "dubbele" == a && "beide" == l ? 240 : 60 : 180,
max: T(),
value: S,
onChange: B,
style: {
width: "100%",
height: "8px",
borderRadius: "5px",
appearance: "none",
background: "#F2F2F3",
outline: "none",
marginTop: "10px"
}
})
}), (0,
Ig.jsxs)("div", {
style: {
marginLeft: "10px",
paddingLeft: "10px",
paddingRight: "10px",
paddingTop: "5px",
paddingBottom: "5px",
backgroundColor: "#F2F2F3",
position: "relative",
width: "5rem",
fontSize: "small",
border: "1px solid",
borderRadius: "4px"
},
children: [(0,
Ig.jsx)("input", {
type: "text",
style: {
width: "100%",
border: "none",
outline: "none",
background: "transparent"
},
value: S,
onChange: B,
onInput: e => e.target.value = e.target.value.replace(/[^0-9]/g, "")
}), (0,
Ig.jsx)("span", {
style: {
position: "absolute",
right: "10px",
top: "50%",
transform: "translateY(-50%)"
},
children: "cm"
})]
})]
})]
}), (0,
Ig.jsx)("div", {
style: {
width: "100%"
},
children: (0,
Ig.jsx)("div", {
style: {
margin: "5%",
paddingTop: "0.5rem",
display: "flex",
justifyContent: "space-between",
alignItems: "center",
fontWeight: "bolder",
fontSize: "normal"
},
children: (0,
Ig.jsx)(VR, {
title: "Deur type"
})
})
}), (0,
Ig.jsx)("div", {
className: "door-content-2",
style: {
display: "flex",
justifyContent: "center"
},
children: (0,
Ig.jsxs)("div", {
className: "door-content-2-1 door-content-custom-1",
style: {
display: "grid",
gridTemplateColumns: "repeat(2, 1fr)",
gridColumnGap: "10px",
fontSize: "11px",
margin: "0 5%",
width: "100%"
},
children: [(0,
Ig.jsxs)("div", {
className: "custom-card-1",
style: {
position: "relative",
margin: "5px",
borderRadius: "5px"
},
onClick: () => {
x || t("Taatsdeur")
}
,
children: [(0,
Ig.jsxs)("div", {
className: "main-img-div",
style: {
border: "Taatsdeur" === e ? "2px solid black" : "none",
borderRadius: "10px",
boxShadow: "-5px -2px 10px -2px rgba(0,0,0,0.6)",
padding: "10px",
backgroundColor: "white",
aspectRatio: "1/1",
display: "flex",
justifyContent: "center",
alignItems: "center"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "5px",
right: "5px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: "Taatsdeur" === e,
readOnly: !0,
onChange: () => {
x || t("Taatsdeur")
}
})
}), (0,
Ig.jsx)("center", {
children: (0,
Ig.jsx)("img", {
src: "./images/doortypes/door_type_1_staging.jpg",
style: {
maxWidth: "80%",
maxHeight: "100%",
width: "80%",
borderRadius: "10px",
overflow: "hidden"
}
})
})]
}), (0,
Ig.jsxs)("div", {
style: {
margin: "10px 0 0 0",
backgroundColor: "Taatsdeur" === e ? "black" : "#bdc79d",
color: "white",
position: "relative",
paddingTop: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center",
fontWeight: "normal",
textTransform: "uppercase"
},
children: "Taatsdeur"
})]
}), (0,
Ig.jsx)("div", {})]
}), (0,
Ig.jsxs)("div", {
className: "custom-card-1",
style: {
position: "relative",
margin: "5px",
borderRadius: "5px"
},
onClick: () => {
x || t("Schuifdeur")
}
,
children: [(0,
Ig.jsxs)("div", {
className: "main-img-div",
style: {
border: "Schuifdeur" === e ? "2px solid black" : "none",
borderRadius: "10px",
boxShadow: "-5px -2px 10px -2px rgba(0,0,0,0.6)",
padding: "10px",
backgroundColor: "white",
aspectRatio: "1/1",
display: "flex",
justifyContent: "center",
alignItems: "center"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "5px",
right: "5px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: "Schuifdeur" === e,
readOnly: !0,
onChange: () => {
x || t("Schuifdeur")
}
})
}), (0,
Ig.jsx)("center", {
children: (0,
Ig.jsx)("img", {
src: "./images/doortypes/door_type_2_staging.jpg",
style: {
maxWidth: "80%",
maxHeight: "100%",
width: "80%",
borderRadius: "10px",
overflow: "hidden"
}
})
})]
}), (0,
Ig.jsxs)("div", {
style: {
margin: "10px 0 0 0",
backgroundColor: "Schuifdeur" === e ? "black" : "#bdc79d",
color: "white",
position: "relative",
paddingTop: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center",
fontWeight: "normal",
textTransform: "uppercase"
},
children: "SCHUIFDEUR"
})]
}), (0,
Ig.jsx)("div", {})]
}), (0,
Ig.jsxs)("div", {
className: "custom-card-1",
style: {
position: "relative",
margin: "5px",
borderRadius: "5px"
},
onClick: () => {
x || t("Scharnier")
}
,
children: [(0,
Ig.jsxs)("div", {
className: "main-img-div",
style: {
border: "Scharnier" === e ? "2px solid black" : "none",
borderRadius: "10px",
boxShadow: "-5px -2px 10px -2px rgba(0,0,0,0.6)",
padding: "10px",
backgroundColor: "white",
aspectRatio: "1/1",
display: "flex",
justifyContent: "center",
alignItems: "center"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "5px",
right: "5px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: "Scharnier" === e,
readOnly: !0,
onChange: () => {
x || t("Scharnier")
}
})
}), (0,
Ig.jsx)("center", {
children: (0,
Ig.jsx)("img", {
src: "./images/doortypes/door_type_3_staging.jpg",
style: {
maxWidth: "80%",
maxHeight: "100%",
width: "80%",
borderRadius: "10px",
overflow: "hidden"
}
})
})]
}), (0,
Ig.jsxs)("div", {
style: {
margin: "10px 0 0 0",
backgroundColor: "Scharnier" === e ? "black" : "#bdc79d",
color: "white",
position: "relative",
paddingTop: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center",
fontWeight: "normal",
textTransform: "uppercase"
},
children: "KOZIJN DEUR"
})]
}), (0,
Ig.jsx)("div", {})]
}), (0,
Ig.jsxs)("div", {
className: "custom-card-1",
style: {
position: "relative",
margin: "5px",
borderRadius: "5px"
},
onClick: () => {
t("vast-stalen"),
o("enkele"),
c("geen"),
b(!1)
}
,
children: [(0,
Ig.jsxs)("div", {
className: "main-img-div",
style: {
border: "vast-stalen" === e ? "2px solid black" : "none",
borderRadius: "10px",
boxShadow: "-5px -2px 10px -2px rgba(0,0,0,0.6)",
padding: "10px",
backgroundColor: "white",
aspectRatio: "1/1",
display: "flex",
justifyContent: "center",
alignItems: "center"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "5px",
right: "5px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: "vast-stalen" === e,
readOnly: !0,
onChange: () => {
t("vast-stalen"),
o("enkele"),
c("geen"),
b(!1)
}
})
}), (0,
Ig.jsx)("center", {
children: (0,
Ig.jsx)("img", {
src: "./images/doortypes/door_type_4.jpg",
style: {
maxWidth: "80%",
maxHeight: "100%",
width: "80%",
borderRadius: "10px",
overflow: "hidden"
}
})
})]
}), (0,
Ig.jsxs)("div", {
style: {
margin: "10px 0 0 0",
backgroundColor: "vast-stalen" === e ? "black" : "#bdc79d",
color: "white",
position: "relative",
paddingTop: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center",
fontWeight: "normal",
textTransform: "uppercase"
},
children: "Vast stalen"
})]
}), (0,
Ig.jsx)("div", {})]
})]
})
}), (0,
Ig.jsx)("button", {
className: "volgende btn",
onClick: () => {
n("samenstling")
}
,
children: "Volgende"
})]
})
}
var JR = {
color: void 0,
size: void 0,
className: void 0,
style: void 0,
attr: void 0
}
, XR = i.createContext && i.createContext(JR)
, KR = ["attr", "size", "title"];
function qR(e, t) {
if (null == e)
return {};
var n, r, i = function(e, t) {
if (null == e)
return {};
var n = {};
for (var r in e)
if (Object.prototype.hasOwnProperty.call(e, r)) {
if (t.indexOf(r) >= 0)
continue;
n[r] = e[r]
}
return n
}(e, t);
if (Object.getOwnPropertySymbols) {
var s = Object.getOwnPropertySymbols(e);
for (r = 0; r < s.length; r++)
n = s[r],
t.indexOf(n) >= 0 || Object.prototype.propertyIsEnumerable.call(e, n) && (i[n] = e[n])
}
return i
}
function YR() {
return YR = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var r in n)
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r])
}
return e
}
,
YR.apply(this, arguments)
}
function QR(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var r = Object.getOwnPropertySymbols(e);
t && (r = r.filter((function(t) {
return Object.getOwnPropertyDescriptor(e, t).enumerable
}
))),
n.push.apply(n, r)
}
return n
}
function ZR(e) {
for (var t = 1; t < arguments.length; t++) {
var n = null != arguments[t] ? arguments[t] : {};
t % 2 ? QR(Object(n), !0).forEach((function(t) {
$R(e, t, n[t])
}
)) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : QR(Object(n)).forEach((function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t))
}
))
}
return e
}
function $R(e, t, n) {
return t = function(e) {
var t = function(e, t) {
if ("object" != typeof e || !e)
return e;
var n = e[Symbol.toPrimitive];
if (void 0 !== n) {
var r = n.call(e, t || "default");
if ("object" != typeof r)
return r;
throw new TypeError("@@toPrimitive must return a primitive value.")
}
return ("string" === t ? String : Number)(e)
}(e, "string");
return "symbol" == typeof t ? t : t + ""
}(t),
t in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n,
e
}
function eB(e) {
return e && e.map(( (e, t) => i.createElement(e.tag, ZR({
key: t
}, e.attr), eB(e.child))))
}
function tB(e) {
return t => i.createElement(nB, YR({
attr: ZR({}, e.attr)
}, t), eB(e.child))
}
function nB(e) {
var t = t => {
var n, {attr: r, size: s, title: a} = e, o = qR(e, KR), l = s || t.size || "1em";
return t.className && (n = t.className),
e.className && (n = (n ? n + " " : "") + e.className),
i.createElement("svg", YR({
stroke: "currentColor",
fill: "currentColor",
strokeWidth: "0"
}, t.attr, r, o, {
className: n,
style: ZR(ZR({
color: e.color || t.color
}, t.style), e.style),
height: l,
width: l,
xmlns: "http://www.w3.org/2000/svg"
}), a && i.createElement("title", null, a), e.children)
}
;
return void 0 !== XR ? i.createElement(XR.Consumer, null, (e => t(e))) : t(JR)
}
function rB(e) {
return tB({
tag: "svg",
attr: {
viewBox: "0 0 512 512"
},
child: [{
tag: "path",
attr: {
d: "M405 136.798L375.202 107 256 226.202 136.798 107 107 136.798 226.202 256 107 375.202 136.798 405 256 285.798 375.202 405 405 375.202 285.798 256z"
},
child: []
}]
})(e)
}
function iB(e) {
return tB({
tag: "svg",
attr: {
viewBox: "0 0 24 24",
fill: "currentColor"
},
child: [{
tag: "path",
attr: {
d: "M18.031 16.6168L22.3137 20.8995L20.8995 22.3137L16.6168 18.031C15.0769 19.263 13.124 20 11 20C6.032 20 2 15.968 2 11C2 6.032 6.032 2 11 2C15.968 2 20 6.032 20 11C20 13.124 19.263 15.0769 18.031 16.6168ZM16.0247 15.8748C17.2475 14.6146 18 12.8956 18 11C18 7.1325 14.8675 4 11 4C7.1325 4 4 7.1325 4 11C4 14.8675 7.1325 18 11 18C12.8956 18 14.6146 17.2475 15.8748 16.0247L16.0247 15.8748Z"
},
child: []
}]
})(e)
}
const sB = JSON.parse('{"1000":{"code":"1000","scope":"classic","img":"RAL 1000.png","color":{"hex":"#CDBA88","websafe":"#cccc99","rgb":{"r":205,"g":186,"b":136},"hsl":{"h":43,"s":41,"l":67},"hsb":{"h":43,"s":34,"b":80},"cmyk":{"c":"5","m":"10","y":"40","k":"10"}},"names":{"de":"Gr\xfcnbeige","en":"Green beige","fr":"Beige vert","es":"Beige verdoso","it":"Beige verdastro","nl":"Groenbeige"}},"1001":{"code":"1001","scope":"classic","img":"RAL 1001.png","color":{"hex":"#D0B084","websafe":"#cc9999","rgb":{"r":208,"g":176,"b":132},"hsl":{"h":35,"s":45,"l":67},"hsb":{"h":35,"s":37,"b":82},"cmyk":{"c":"5","m":"20","y":"40","k":"10"}},"names":{"de":"Beige","en":"Beige","fr":"Beige","es":"Beige","it":"Beige","nl":"Beige"}},"1002":{"code":"1002","scope":"classic","img":"RAL 1002.png","color":{"hex":"#D2AA6D","websafe":"#cc9966","rgb":{"r":210,"g":170,"b":109},"hsl":{"h":36,"s":53,"l":63},"hsb":{"h":36,"s":48,"b":82},"cmyk":{"c":"5","m":"20","y":"50","k":"10"}},"names":{"de":"Sandgelb","en":"Sand yellow","fr":"Jaune sable","es":"Amarillo arena","it":"Giallo sabbia","nl":"Zandgeel"}},"1003":{"code":"1003","scope":"classic","img":"RAL 1003.png","color":{"hex":"#F9A800","websafe":"#ff9900","rgb":{"r":249,"g":168,"b":0},"hsl":{"h":40,"s":100,"l":49},"hsb":{"h":40,"s":100,"b":98},"cmyk":{"c":"0","m":"35","y":"100","k":"0"}},"names":{"de":"Signalgelb","en":"Signal yellow","fr":"Jaune de s\xe9curit\xe9","es":"Amarillo se\xf1ales","it":"Giallo segnale","nl":"Signaalgeel"}},"1004":{"code":"1004","scope":"classic","img":"RAL 1004.png","color":{"hex":"#E49E00","websafe":"#cc9900","rgb":{"r":228,"g":158,"b":0},"hsl":{"h":42,"s":100,"l":45},"hsb":{"h":42,"s":100,"b":89},"cmyk":{"c":"10","m":"35","y":"100","k":"0"}},"names":{"de":"Goldgelb","en":"Golden yellow","fr":"Jaune or","es":"Amarillo oro","it":"Giallo oro","nl":"Goudgeel"}},"1005":{"code":"1005","scope":"classic","img":"RAL 1005.png","color":{"hex":"#CB8E00","websafe":"#cc9900","rgb":{"r":203,"g":142,"b":0},"hsl":{"h":42,"s":100,"l":40},"hsb":{"h":42,"s":100,"b":80},"cmyk":{"c":"0","m":"30","y":"100","k":"0"}},"names":{"de":"Honiggelb","en":"Honey yellow","fr":"Jaune miel","es":"Amarillo miel","it":"Giallo miele","nl":"Honinggeel"}},"1006":{"code":"1006","scope":"classic","img":"RAL 1006.png","color":{"hex":"#E29000","websafe":"#cc9900","rgb":{"r":226,"g":144,"b":0},"hsl":{"h":38,"s":100,"l":44},"hsb":{"h":38,"s":100,"b":89},"cmyk":{"c":"0","m":"40","y":"100","k":"0"}},"names":{"de":"Maisgelb","en":"Maize yellow","fr":"Jaune ma\xefs","es":"Amarillo maiz","it":"Giallo polenta","nl":"Maisgeel"}},"1007":{"code":"1007","scope":"classic","img":"RAL 1007.png","color":{"hex":"#E88C00","websafe":"#ff9900","rgb":{"r":232,"g":140,"b":0},"hsl":{"h":36,"s":100,"l":45},"hsb":{"h":36,"s":100,"b":91},"cmyk":{"c":"0","m":"50","y":"100","k":"0"}},"names":{"de":"Narzissengelb","en":"Daffodil yellow","fr":"Jaune narcisse","es":"Amarillo narciso","it":"Giallo narciso","nl":"Narcissengeel"}},"1011":{"code":"1011","scope":"classic","img":"RAL 1011.png","color":{"hex":"#AF804F","websafe":"#999966","rgb":{"r":175,"g":128,"b":79},"hsl":{"h":31,"s":38,"l":50},"hsb":{"h":31,"s":55,"b":69},"cmyk":{"c":"20","m":"40","y":"60","k":"0"}},"names":{"de":"Braunbeige","en":"Brown beige","fr":"Beige brun","es":"Beige pardo","it":"Beige marrone","nl":"Bruinbeige"}},"1012":{"code":"1012","scope":"classic","img":"RAL 1012.png","color":{"hex":"#DDAF27","websafe":"#cc9933","rgb":{"r":221,"g":175,"b":39},"hsl":{"h":45,"s":73,"l":51},"hsb":{"h":45,"s":82,"b":87},"cmyk":{"c":"5","m":"20","y":"100","k":"0"}},"names":{"de":"Zitronengelb","en":"Lemon yellow","fr":"Jaune citron","es":"Amarillo lim\xf3n","it":"Giallo limone","nl":"Citroengeel"}},"1013":{"code":"1013","scope":"classic","img":"RAL 1013.png","color":{"hex":"#E3D9C6","websafe":"#cccccc","rgb":{"r":227,"g":217,"b":198},"hsl":{"h":39,"s":34,"l":83},"hsb":{"h":39,"s":13,"b":89},"cmyk":{"c":"5","m":"10","y":"20","k":"0"}},"names":{"de":"Perlwei\xdf","en":"Oyster white","fr":"Blanc perl\xe9","es":"Blanco perla","it":"Bianco perla","nl":"Parelwit"}},"1014":{"code":"1014","scope":"classic","img":"RAL 1014.png","color":{"hex":"#DDC49A","websafe":"#cccc99","rgb":{"r":221,"g":196,"b":154},"hsl":{"h":38,"s":50,"l":74},"hsb":{"h":38,"s":30,"b":87},"cmyk":{"c":"5","m":"20","y":"50","k":"0"}},"names":{"de":"Elfenbein","en":"Ivory","fr":"Ivoire","es":"Marfil","it":"Avorio","nl":"Ivoorkleurig"}},"1015":{"code":"1015","scope":"classic","img":"RAL 1015.png","color":{"hex":"#E6D2B5","websafe":"#ffcccc","rgb":{"r":230,"g":210,"b":181},"hsl":{"h":36,"s":49,"l":81},"hsb":{"h":36,"s":21,"b":90},"cmyk":{"c":"5","m":"10","y":"30","k":"0"}},"names":{"de":"Hellelfenbein","en":"Light ivory","fr":"Ivoire clair","es":"Marfil claro","it":"Avorio chiaro","nl":"Licht ivoorkleurig"}},"1016":{"code":"1016","scope":"classic","img":"RAL 1016.png","color":{"hex":"#F1DD38","websafe":"#ffcc33","rgb":{"r":241,"g":221,"b":56},"hsl":{"h":54,"s":87,"l":58},"hsb":{"h":54,"s":77,"b":95},"cmyk":{"c":"5","m":"0","y":"90","k":"0"}},"names":{"de":"Schwefelgelb","en":"Sulfur yellow","fr":"Jaune soufre","es":"Amarillo azufre","it":"Giallo zolfo","nl":"Zwavelgeel"}},"1017":{"code":"1017","scope":"classic","img":"RAL 1017.png","color":{"hex":"#F6A950","websafe":"#ff9966","rgb":{"r":246,"g":169,"b":80},"hsl":{"h":32,"s":90,"l":64},"hsb":{"h":32,"s":67,"b":96},"cmyk":{"c":"0","m":"40","y":"100","k":"0"}},"names":{"de":"Safrangelb","en":"Saffron yellow","fr":"Jaune safran","es":"Amarillo azafr\xe1n","it":"Giallo zafferano","nl":"Saffraangeel"}},"1018":{"code":"1018","scope":"classic","img":"RAL 1018.png","color":{"hex":"#FACA30","websafe":"#ffcc33","rgb":{"r":250,"g":202,"b":48},"hsl":{"h":46,"s":95,"l":58},"hsb":{"h":46,"s":81,"b":98},"cmyk":{"c":"0","m":"15","y":"100","k":"0"}},"names":{"de":"Zinkgelb","en":"Zinc yellow","fr":"Jaune zinc","es":"Amarillo de zinc","it":"Giallo zinco","nl":"Zinkgeel"}},"1019":{"code":"1019","scope":"classic","img":"RAL 1019.png","color":{"hex":"#A48F7A","websafe":"#999966","rgb":{"r":164,"g":143,"b":122},"hsl":{"h":30,"s":19,"l":56},"hsb":{"h":30,"s":26,"b":64},"cmyk":{"c":"0","m":"15","y":"40","k":"45"}},"names":{"de":"Graubeige","en":"Grey beige","fr":"Beige gris","es":"Beige agrisado","it":"Beige grigiastro","nl":"Grijsbeige"}},"1020":{"code":"1020","scope":"classic","img":"RAL 1020.png","color":{"hex":"#A08F65","websafe":"#999966","rgb":{"r":160,"g":143,"b":101},"hsl":{"h":43,"s":24,"l":51},"hsb":{"h":43,"s":37,"b":63},"cmyk":{"c":"30","m":"25","y":"60","k":"20"}},"names":{"de":"Olivgelb","en":"Olive yellow","fr":"Jaune olive","es":"Amarillo oliva","it":"Giallo olivastro","nl":"Olijfgeel"}},"1021":{"code":"1021","scope":"classic","img":"RAL 1021.png","color":{"hex":"#F6B600","websafe":"#ffcc00","rgb":{"r":246,"g":182,"b":0},"hsl":{"h":44,"s":100,"l":48},"hsb":{"h":44,"s":100,"b":96},"cmyk":{"c":"0","m":"5","y":"100","k":"0"}},"names":{"de":"Rapsgelb","en":"Colza yellow","fr":"Jaune colza","es":"Amarillo colza","it":"Giallo navone","nl":"Koolzaadgeel"}},"1023":{"code":"1023","scope":"classic","img":"RAL 1023.png","color":{"hex":"#F7B500","websafe":"#ffcc00","rgb":{"r":247,"g":181,"b":0},"hsl":{"h":44,"s":100,"l":48},"hsb":{"h":44,"s":100,"b":97},"cmyk":{"c":"0","m":"25","y":"100","k":"0"}},"names":{"de":"Verkehrsgelb","en":"Traffic yellow","fr":"Jaune signalisation","es":"Amarillo tr\xe1fico","it":"Giallo traffico","nl":"Verkeersgeel"}},"1024":{"code":"1024","scope":"classic","img":"RAL 1024.png","color":{"hex":"#BA8F4C","websafe":"#cc9933","rgb":{"r":186,"g":143,"b":76},"hsl":{"h":37,"s":44,"l":51},"hsb":{"h":37,"s":59,"b":73},"cmyk":{"c":"5","m":"30","y":"80","k":"30"}},"names":{"de":"Ockergelb","en":"Ochre yellow","fr":"Jaune ocre","es":"Amarillo ocre","it":"Giallo ocra","nl":"Okergeel"}},"1026":{"code":"1026","scope":"classic","img":"RAL 1026.png","color":{"hex":"#FFFF00","websafe":"#ffff00","rgb":{"r":255,"g":255,"b":0},"hsl":{"h":60,"s":100,"l":50},"hsb":{"h":60,"s":100,"b":100},"cmyk":{"c":"5","m":"0","y":"100","k":"0"}},"names":{"de":"Leuchtgelb","en":"Luminous yellow","fr":"Jaune brillant","es":"Amarillo brillante","it":"Giallo brillante","nl":"Briljantgeel"}},"1027":{"code":"1027","scope":"classic","img":"RAL 1027.png","color":{"hex":"#A77F0E","websafe":"#996600","rgb":{"r":167,"g":127,"b":14},"hsl":{"h":44,"s":85,"l":35},"hsb":{"h":44,"s":92,"b":65},"cmyk":{"c":"5","m":"10","y":"100","k":"40"}},"names":{"de":"Currygelb","en":"Curry","fr":"Jaune curry","es":"Amarillo curry","it":"Giallo curry","nl":"Kerriegeel"}},"1028":{"code":"1028","scope":"classic","img":"RAL 1028.png","color":{"hex":"#FF9B00","websafe":"#ff9900","rgb":{"r":255,"g":155,"b":0},"hsl":{"h":36,"s":100,"l":50},"hsb":{"h":36,"s":100,"b":100},"cmyk":{"c":"0","m":"40","y":"100","k":"0"}},"names":{"de":"Melonengelb","en":"Melon yellow","fr":"Jaune melon","es":"Amarillo mel\xf3n","it":"Giallo melone","nl":"Meloengeel"}},"1032":{"code":"1032","scope":"classic","img":"RAL 1032.png","color":{"hex":"#E2A300","websafe":"#cc9900","rgb":{"r":226,"g":163,"b":0},"hsl":{"h":43,"s":100,"l":44},"hsb":{"h":43,"s":100,"b":89},"cmyk":{"c":"15","m":"40","y":"100","k":"0"}},"names":{"de":"Ginstergelb","en":"Broom yellow","fr":"Jaune gen\xeat","es":"Amarillo retama","it":"Giallo scopa","nl":"Bremgeel"}},"1033":{"code":"1033","scope":"classic","img":"RAL 1033.png","color":{"hex":"#F99A1C","websafe":"#ff9933","rgb":{"r":249,"g":154,"b":28},"hsl":{"h":34,"s":95,"l":54},"hsb":{"h":34,"s":89,"b":98},"cmyk":{"c":"0","m":"50","y":"100","k":"0"}},"names":{"de":"Dahliengelb","en":"Dahlia yellow","fr":"Jaune dahlia","es":"Amarillo dalia","it":"Giallo dahlien","nl":"Dahliageel"}},"1034":{"code":"1034","scope":"classic","img":"RAL 1034.png","color":{"hex":"#EB9C52","websafe":"#ff9966","rgb":{"r":235,"g":156,"b":82},"hsl":{"h":29,"s":79,"l":62},"hsb":{"h":29,"s":65,"b":92},"cmyk":{"c":"0","m":"45","y":"70","k":"0"}},"names":{"de":"Pastellgelb","en":"Pastel yellow","fr":"Jaune pastel","es":"Amarillo pastel","it":"Giallo pastello","nl":"Pastelgeel"}},"1035":{"code":"1035","scope":"classic","img":"RAL 1035.png","color":{"hex":"#908370","websafe":"#999966","rgb":{"r":144,"g":131,"b":112},"hsl":{"h":36,"s":13,"l":50},"hsb":{"h":36,"s":22,"b":56},"cmyk":{"c":"10","m":"25","y":"40","k":"40"}},"names":{"de":"Perlbeige","en":"Pearl beige","fr":"Beige nacr\xe9","es":"Beige perlado","it":"Beige perlato","nl":"Parelmoer grijs"}},"1036":{"code":"1036","scope":"classic","img":"RAL 1036.png","color":{"hex":"#80643F","websafe":"#996633","rgb":{"r":128,"g":100,"b":63},"hsl":{"h":34,"s":34,"l":37},"hsb":{"h":34,"s":51,"b":50},"cmyk":{"c":"30","m":"30","y":"50","k":"70"}},"names":{"de":"Perlgold","en":"Pearl gold","fr":"Or nacr\xe9","es":"Oro perlado","it":"Oro perlato","nl":"Parelmoer goud"}},"1037":{"code":"1037","scope":"classic","img":"RAL 1037.png","color":{"hex":"#F09200","websafe":"#ff9900","rgb":{"r":240,"g":146,"b":0},"hsl":{"h":37,"s":100,"l":47},"hsb":{"h":37,"s":100,"b":94},"cmyk":{"c":"0","m":"45","y":"100","k":"0"}},"names":{"de":"Sonnengelb","en":"Sun yellow","fr":"Jaune soleil","es":"Amarillo sol","it":"Giallo sole","nl":"Zonnegeel"}},"2000":{"code":"2000","scope":"classic","img":"RAL 2000.png","color":{"hex":"#DA6E00","websafe":"#cc6600","rgb":{"r":218,"g":110,"b":0},"hsl":{"h":30,"s":100,"l":43},"hsb":{"h":30,"s":100,"b":85},"cmyk":{"c":"0","m":"65","y":"100","k":"0"}},"names":{"de":"Gelborange","en":"Yellow orange","fr":"Orang\xe9 jaune","es":"Amarillo naranja","it":"Arancio giallastro","nl":"Geeloranje"}},"2001":{"code":"2001","scope":"classic","img":"RAL 2001.png","color":{"hex":"#BA481B","websafe":"#cc3333","rgb":{"r":186,"g":72,"b":27},"hsl":{"h":17,"s":75,"l":42},"hsb":{"h":17,"s":85,"b":73},"cmyk":{"c":"10","m":"85","y":"100","k":"10"}},"names":{"de":"Rotorange","en":"Red orange","fr":"Orang\xe9 rouge","es":"Rojo anaranjado","it":"Arancio rossastro","nl":"Roodoranje"}},"2002":{"code":"2002","scope":"classic","img":"RAL 2002.png","color":{"hex":"#BF3922","websafe":"#cc3333","rgb":{"r":191,"g":57,"b":34},"hsl":{"h":9,"s":70,"l":44},"hsb":{"h":9,"s":82,"b":75},"cmyk":{"c":"0","m":"90","y":"100","k":"10"}},"names":{"de":"Blutorange","en":"Vermilion","fr":"Orang\xe9 sang","es":"Naranja sanguineo","it":"Arancio sanguigno","nl":"Vermiljoen"}},"2003":{"code":"2003","scope":"classic","img":"RAL 2003.png","color":{"hex":"#F67828","websafe":"#ff6633","rgb":{"r":246,"g":120,"b":40},"hsl":{"h":23,"s":92,"l":56},"hsb":{"h":23,"s":84,"b":96},"cmyk":{"c":"0","m":"70","y":"90","k":"0"}},"names":{"de":"Pastellorange","en":"Pastel orange","fr":"Orang\xe9 pastel","es":"Naranja p\xe1lido","it":"Arancio pastello","nl":"Pasteloranje"}},"2004":{"code":"2004","scope":"classic","img":"RAL 2004.png","color":{"hex":"#E25303","websafe":"#cc6600","rgb":{"r":226,"g":83,"b":3},"hsl":{"h":22,"s":97,"l":45},"hsb":{"h":22,"s":99,"b":89},"cmyk":{"c":"0","m":"75","y":"100","k":"0"}},"names":{"de":"Reinorange","en":"Pure orange","fr":"Orang\xe9 pur","es":"Naranja puro","it":"Arancio puro","nl":"Zuiver oranje"}},"2005":{"code":"2005","scope":"classic","img":"RAL 2005.png","color":{"hex":"#FF4D06","websafe":"#ff6600","rgb":{"r":255,"g":77,"b":6},"hsl":{"h":17,"s":100,"l":51},"hsb":{"h":17,"s":98,"b":100},"cmyk":{"c":"0","m":"70","y":"100","k":"0"}},"names":{"de":"Leuchtorange","en":"Luminous orange","fr":"Orang\xe9 brillant","es":"Naranja brillante","it":"Arancio brillante","nl":"Briljantoranje"}},"2007":{"code":"2007","scope":"classic","img":"RAL 2007.png","color":{"hex":"#FFB200","websafe":"#ff9900","rgb":{"r":255,"g":178,"b":0},"hsl":{"h":42,"s":100,"l":50},"hsb":{"h":42,"s":100,"b":100},"cmyk":{"c":"0","m":"45","y":"100","k":"0"}},"names":{"de":"Leuchthell orange","en":"Luminous bright orange","fr":"Orang\xe9 clair brillant","es":"Naranja claro brillante","it":"Arancio chiaro brillante","nl":"Briljant lichtoranje"}},"2008":{"code":"2008","scope":"classic","img":"RAL 2008.png","color":{"hex":"#ED6B21","websafe":"#ff6633","rgb":{"r":237,"g":107,"b":33},"hsl":{"h":22,"s":85,"l":53},"hsb":{"h":22,"s":86,"b":93},"cmyk":{"c":"0","m":"65","y":"100","k":"0"}},"names":{"de":"Hellrotorange","en":"Bright red orange","fr":"Orang\xe9 rouge clair","es":"Rojo claro anaranjado","it":"Rosso arancio chiaro","nl":"Licht roodoranje"}},"2009":{"code":"2009","scope":"classic","img":"RAL 2009.png","color":{"hex":"#DE5307","websafe":"#cc6600","rgb":{"r":222,"g":83,"b":7},"hsl":{"h":21,"s":94,"l":45},"hsb":{"h":21,"s":97,"b":87},"cmyk":{"c":"0","m":"80","y":"100","k":"0"}},"names":{"de":"Verkehrsorange","en":"Traffic orange","fr":"Orang\xe9 signalisation","es":"Naranja tr\xe1fico","it":"Arancio traffico","nl":"Verkeersoranje"}},"2010":{"code":"2010","scope":"classic","img":"RAL 2010.png","color":{"hex":"#D05D28","websafe":"#cc6633","rgb":{"r":208,"g":93,"b":40},"hsl":{"h":19,"s":68,"l":49},"hsb":{"h":19,"s":81,"b":82},"cmyk":{"c":"0","m":"80","y":"100","k":"10"}},"names":{"de":"Signalorange","en":"Signal orange","fr":"Orang\xe9 de s\xe9curit\xe9","es":"Naranja se\xf1ales","it":"Arancio segnale","nl":"Signaaloranje"}},"2011":{"code":"2011","scope":"classic","img":"RAL 2011.png","color":{"hex":"#E26E0E","websafe":"#cc6600","rgb":{"r":226,"g":110,"b":14},"hsl":{"h":27,"s":88,"l":47},"hsb":{"h":27,"s":94,"b":89},"cmyk":{"c":"0","m":"65","y":"100","k":"0"}},"names":{"de":"Tieforange","en":"Deep orange","fr":"Orang\xe9 fonc\xe9","es":"Naranja intenso","it":"Arancio profondo","nl":"Dieporanje"}},"2012":{"code":"2012","scope":"classic","img":"RAL 2012.png","color":{"hex":"#D5654D","websafe":"#cc6666","rgb":{"r":213,"g":101,"b":77},"hsl":{"h":11,"s":62,"l":57},"hsb":{"h":11,"s":64,"b":84},"cmyk":{"c":"10","m":"80","y":"70","k":"0"}},"names":{"de":"Lachsorange","en":"Salmon orange","fr":"Orang\xe9 saumon","es":"Naranja salm\xf3n","it":"Arancio salmone","nl":"Zalmoranje"}},"2013":{"code":"2013","scope":"classic","img":"RAL 2013.png","color":{"hex":"#923E25","websafe":"#993333","rgb":{"r":146,"g":62,"b":37},"hsl":{"h":14,"s":60,"l":36},"hsb":{"h":14,"s":75,"b":57},"cmyk":{"c":"20","m":"90","y":"100","k":"30"}},"names":{"de":"Perlorange","en":"Pearl orange","fr":"Orang\xe9 nacr\xe9","es":"Naranja perlado","it":"Arancio perlato","nl":"Parelmoer oranje"}},"3000":{"code":"3000","scope":"classic","img":"RAL 3000.png","color":{"hex":"#A72920","websafe":"#993333","rgb":{"r":167,"g":41,"b":32},"hsl":{"h":4,"s":68,"l":39},"hsb":{"h":4,"s":81,"b":65},"cmyk":{"c":"10","m":"100","y":"100","k":"20"}},"names":{"de":"Feuerrot","en":"Flame red","fr":"Rouge feu","es":"Rojo vivo","it":"Rosso fuoco","nl":"Vuurrood"}},"3001":{"code":"3001","scope":"classic","img":"RAL 3001.png","color":{"hex":"#9B2423","websafe":"#993333","rgb":{"r":155,"g":36,"b":35},"hsl":{"h":0,"s":63,"l":37},"hsb":{"h":0,"s":77,"b":61},"cmyk":{"c":"20","m":"100","y":"100","k":"10"}},"names":{"de":"Signalrot","en":"Signal red","fr":"Rouge de s\xe9curit\xe9","es":"Rojo se\xf1ales","it":"Rosso segnale","nl":"Signaalrood"}},"3002":{"code":"3002","scope":"classic","img":"RAL 3002.png","color":{"hex":"#9B2321","websafe":"#993333","rgb":{"r":155,"g":35,"b":33},"hsl":{"h":1,"s":65,"l":37},"hsb":{"h":1,"s":79,"b":61},"cmyk":{"c":"10","m":"100","y":"100","k":"25"}},"names":{"de":"Karminrot","en":"Carmine red","fr":"Rouge carmin","es":"Rojo carmin","it":"Rosso carminio","nl":"Karmijnrood"}},"3003":{"code":"3003","scope":"classic","img":"RAL 3003.png","color":{"hex":"#861A22","websafe":"#993333","rgb":{"r":134,"g":26,"b":34},"hsl":{"h":356,"s":68,"l":31},"hsb":{"h":356,"s":81,"b":53},"cmyk":{"c":"30","m":"100","y":"80","k":"20"}},"names":{"de":"Rubinrot","en":"Ruby red","fr":"Rouge rubis","es":"Rojo rub\xed","it":"Rosso rubino","nl":"Robijnrood"}},"3004":{"code":"3004","scope":"classic","img":"RAL 3004.png","color":{"hex":"#6B1C23","websafe":"#663333","rgb":{"r":107,"g":28,"b":35},"hsl":{"h":355,"s":59,"l":26},"hsb":{"h":355,"s":74,"b":42},"cmyk":{"c":"30","m":"100","y":"70","k":"40"}},"names":{"de":"Purpurrot","en":"Purple red","fr":"Rouge pourpre","es":"Rojo p\xfarpura","it":"Rosso porpora","nl":"Purperrood"}},"3005":{"code":"3005","scope":"classic","img":"RAL 3005.png","color":{"hex":"#59191F","websafe":"#660033","rgb":{"r":89,"g":25,"b":31},"hsl":{"h":354,"s":56,"l":22},"hsb":{"h":354,"s":72,"b":35},"cmyk":{"c":"40","m":"100","y":"60","k":"40"}},"names":{"de":"Weinrot","en":"Wine red","fr":"Rouge vin","es":"Rojo vino","it":"Rosso vino","nl":"Wijnrood"}},"3007":{"code":"3007","scope":"classic","img":"RAL 3007.png","color":{"hex":"#3E2022","websafe":"#333333","rgb":{"r":62,"g":32,"b":34},"hsl":{"h":356,"s":32,"l":18},"hsb":{"h":356,"s":48,"b":24},"cmyk":{"c":"50","m":"100","y":"40","k":"50"}},"names":{"de":"Schwarzrot","en":"Black red","fr":"Rouge noir","es":"Rojo negruzco","it":"Rosso nerastro","nl":"Zwartrood"}},"3009":{"code":"3009","scope":"classic","img":"RAL 3009.png","color":{"hex":"#6D342D","websafe":"#663333","rgb":{"r":109,"g":52,"b":45},"hsl":{"h":7,"s":42,"l":30},"hsb":{"h":7,"s":59,"b":43},"cmyk":{"c":"40","m":"100","y":"100","k":"30"}},"names":{"de":"Oxidrot","en":"Oxide red","fr":"Rouge oxyde","es":"Rojo \xf3xido","it":"Rosso ossido","nl":"Oxyderood"}},"3011":{"code":"3011","scope":"classic","img":"RAL 3011.png","color":{"hex":"#792423","websafe":"#663333","rgb":{"r":121,"g":36,"b":35},"hsl":{"h":1,"s":55,"l":31},"hsb":{"h":1,"s":71,"b":47},"cmyk":{"c":"20","m":"100","y":"80","k":"40"}},"names":{"de":"Braunrot","en":"Brown red","fr":"Rouge brun","es":"Rojo pardo","it":"Rosso marrone","nl":"Bruinrood"}},"3012":{"code":"3012","scope":"classic","img":"RAL 3012.png","color":{"hex":"#C6846D","websafe":"#cc9966","rgb":{"r":198,"g":132,"b":109},"hsl":{"h":16,"s":44,"l":60},"hsb":{"h":16,"s":45,"b":78},"cmyk":{"c":"0","m":"50","y":"50","k":"20"}},"names":{"de":"Beigerot","en":"Beige red","fr":"Rouge beige","es":"Rojo beige","it":"Rosso beige","nl":"Beigerood"}},"3013":{"code":"3013","scope":"classic","img":"RAL 3013.png","color":{"hex":"#972E25","websafe":"#993333","rgb":{"r":151,"g":46,"b":37},"hsl":{"h":5,"s":61,"l":37},"hsb":{"h":5,"s":75,"b":59},"cmyk":{"c":"0","m":"100","y":"90","k":"30"}},"names":{"de":"Tomatenrot","en":"Tomato red","fr":"Rouge tomate","es":"Rojo tomate","it":"Rosso pomodoro","nl":"Tomaatrood"}},"3014":{"code":"3014","scope":"classic","img":"RAL 3014.png","color":{"hex":"#CB7375","websafe":"#cc6666","rgb":{"r":203,"g":115,"b":117},"hsl":{"h":359,"s":46,"l":62},"hsb":{"h":359,"s":43,"b":80},"cmyk":{"c":"0","m":"65","y":"40","k":"10"}},"names":{"de":"Altrosa","en":"Antique pink","fr":"Vieux rose","es":"Rojo viejo","it":"Rosa antico","nl":"Oudroze"}},"3015":{"code":"3015","scope":"classic","img":"RAL 3015.png","color":{"hex":"#D8A0A6","websafe":"#cc9999","rgb":{"r":216,"g":160,"b":166},"hsl":{"h":354,"s":42,"l":74},"hsb":{"h":354,"s":26,"b":85},"cmyk":{"c":"5","m":"40","y":"20","k":"0"}},"names":{"de":"Hellrosa","en":"Light pink","fr":"Rose clair","es":"Rosa claro","it":"Rosa chiaro","nl":"Lichtroze"}},"3016":{"code":"3016","scope":"classic","img":"RAL 3016.png","color":{"hex":"#A63D2F","websafe":"#993333","rgb":{"r":166,"g":61,"b":47},"hsl":{"h":7,"s":56,"l":42},"hsb":{"h":7,"s":72,"b":65},"cmyk":{"c":"0","m":"90","y":"90","k":"30"}},"names":{"de":"Korallenrot","en":"Coral red","fr":"Rouge corail","es":"Rojo coral","it":"Rosso corallo","nl":"Koraalrood"}},"3017":{"code":"3017","scope":"classic","img":"RAL 3017.png","color":{"hex":"#CB555D","websafe":"#cc6666","rgb":{"r":203,"g":85,"b":93},"hsl":{"h":356,"s":53,"l":56},"hsb":{"h":356,"s":58,"b":80},"cmyk":{"c":"0","m":"80","y":"50","k":"10"}},"names":{"de":"Ros\xe9","en":"Rose","fr":"Ros\xe9","es":"Rosa","it":"Rosato","nl":"Bleekrood"}},"3018":{"code":"3018","scope":"classic","img":"RAL 3018.png","color":{"hex":"#C73F4A","websafe":"#cc3333","rgb":{"r":199,"g":63,"b":74},"hsl":{"h":355,"s":55,"l":51},"hsb":{"h":355,"s":68,"b":78},"cmyk":{"c":"5","m":"100","y":"60","k":"0"}},"names":{"de":"Erdbeerrot","en":"Strawberry red","fr":"Rouge fraise","es":"Rojo fresa","it":"Rosso fragola","nl":"Aardbeirood"}},"3020":{"code":"3020","scope":"classic","img":"RAL 3020.png","color":{"hex":"#BB1E10","websafe":"#cc3300","rgb":{"r":187,"g":30,"b":16},"hsl":{"h":5,"s":84,"l":40},"hsb":{"h":5,"s":91,"b":73},"cmyk":{"c":"0","m":"100","y":"100","k":"10"}},"names":{"de":"Verkehrsrot","en":"Traffic red","fr":"Rouge signalisation","es":"Rojo tr\xe1fico","it":"Rosso traffico","nl":"Verkeersrood"}},"3022":{"code":"3022","scope":"classic","img":"RAL 3022.png","color":{"hex":"#CF6955","websafe":"#cc6666","rgb":{"r":207,"g":105,"b":85},"hsl":{"h":10,"s":56,"l":57},"hsb":{"h":10,"s":59,"b":81},"cmyk":{"c":"0","m":"70","y":"60","k":"5"}},"names":{"de":"Lachsrot","en":"Salmon pink","fr":"Rouge saumon","es":"Rojo salm\xf3n","it":"Rosso salmone","nl":"Zalmrood"}},"3024":{"code":"3024","scope":"classic","img":"RAL 3024.png","color":{"hex":"#FF2D21","websafe":"#ff3333","rgb":{"r":255,"g":45,"b":33},"hsl":{"h":3,"s":100,"l":56},"hsb":{"h":3,"s":87,"b":100},"cmyk":{"c":"0","m":"90","y":"100","k":"0"}},"names":{"de":"Leuchtrot","en":"Luminous red","fr":"Rouge brillant","es":"Rojo brillante","it":"Rosso brillante","nl":"Briljantrood"}},"3026":{"code":"3026","scope":"classic","img":"RAL 3026.png","color":{"hex":"#FF2A1B","websafe":"#ff3333","rgb":{"r":255,"g":42,"b":27},"hsl":{"h":4,"s":100,"l":55},"hsb":{"h":4,"s":89,"b":100},"cmyk":{"c":"0","m":"80","y":"100","k":"0"}},"names":{"de":"Leuchthellrot","en":"Luminous bright red","fr":"Rouge clair brillant","es":"Rojo claro brillante","it":"Rosso chiaro brillante","nl":"Briljant lichtrood"}},"3027":{"code":"3027","scope":"classic","img":"RAL 3027.png","color":{"hex":"#AB273C","websafe":"#993333","rgb":{"r":171,"g":39,"b":60},"hsl":{"h":350,"s":63,"l":41},"hsb":{"h":350,"s":77,"b":67},"cmyk":{"c":"0","m":"100","y":"50","k":"20"}},"names":{"de":"Himbeerrot","en":"Raspberry red","fr":"Rouge framboise","es":"Rojo frambuesa","it":"Rosso lampone","nl":"Framboosrood"}},"3028":{"code":"3028","scope":"classic","img":"RAL 3028.png","color":{"hex":"#CC2C24","websafe":"#cc3333","rgb":{"r":204,"g":44,"b":36},"hsl":{"h":3,"s":70,"l":47},"hsb":{"h":3,"s":82,"b":80},"cmyk":{"c":"0","m":"100","y":"90","k":"0"}},"names":{"de":"Reinrot","en":"Pure red","fr":"Rouge pu","es":"Rojo puro ","it":"Rosso puro","nl":"Zuiver rood "}},"3031":{"code":"3031","scope":"classic","img":"RAL 3031.png","color":{"hex":"#A63437","websafe":"#993333","rgb":{"r":166,"g":52,"b":55},"hsl":{"h":358,"s":52,"l":43},"hsb":{"h":358,"s":69,"b":65},"cmyk":{"c":"20","m":"100","y":"70","k":"10"}},"names":{"de":"Orientrot","en":"Orient red","fr":"Rouge oriental","es":"Rojo oriente","it":"Rosso oriente","nl":"Ori\xebntrood"}},"3032":{"code":"3032","scope":"classic","img":"RAL 3032.png","color":{"hex":"#701D23","websafe":"#663333","rgb":{"r":112,"g":29,"b":35},"hsl":{"h":356,"s":59,"l":28},"hsb":{"h":356,"s":74,"b":44},"cmyk":{"c":"10","m":"100","y":"60","k":"40"}},"names":{"de":"Perlrubinrot","en":"Pearl ruby red","fr":"Rouge rubis nacr\xe9","es":"Rojo rub\xed perlado","it":"Rosso rubino perlato","nl":"Parelmoer donkerrood"}},"3033":{"code":"3033","scope":"classic","img":"RAL 3033.png","color":{"hex":"#A53A2D","websafe":"#993333","rgb":{"r":165,"g":58,"b":45},"hsl":{"h":7,"s":57,"l":41},"hsb":{"h":7,"s":73,"b":65},"cmyk":{"c":"10","m":"90","y":"90","k":"20"}},"names":{"de":"Perlrosa","en":"Pearl pink","fr":"Rose nacr\xe9","es":"Rosa perlado","it":"Rosa perlato","nl":"Parelmoer lichtrood"}},"4001":{"code":"4001","scope":"classic","img":"RAL 4001.png","color":{"hex":"#816183","websafe":"#996699","rgb":{"r":129,"g":97,"b":131},"hsl":{"h":296,"s":15,"l":45},"hsb":{"h":296,"s":26,"b":51},"cmyk":{"c":"30","m":"60","y":"10","k":"20"}},"names":{"de":"Rotlila","en":"Red lilac","fr":"Lilas rouge","es":"Rojo lila","it":"Lilla rossastro","nl":"Roodlila"}},"4002":{"code":"4002","scope":"classic","img":"RAL 4002.png","color":{"hex":"#8D3C4B","websafe":"#993333","rgb":{"r":141,"g":60,"b":75},"hsl":{"h":349,"s":40,"l":39},"hsb":{"h":349,"s":57,"b":55},"cmyk":{"c":"25","m":"90","y":"50","k":"30"}},"names":{"de":"Rotviolett","en":"Red violet","fr":"Violet rouge","es":"Rojo violeta","it":"Viola rossastro","nl":"Roodpaars"}},"4003":{"code":"4003","scope":"classic","img":"RAL 4003.png","color":{"hex":"#C4618C","websafe":"#cc6699","rgb":{"r":196,"g":97,"b":140},"hsl":{"h":334,"s":46,"l":57},"hsb":{"h":334,"s":51,"b":77},"cmyk":{"c":"10","m":"80","y":"5","k":"5"}},"names":{"de":"Erikaviolett","en":"Heather violet","fr":"Violet bruy\xe8re","es":"Violeta \xe9rica","it":"Viola erica","nl":"Heidepaars"}},"4004":{"code":"4004","scope":"classic","img":"RAL 4004.png","color":{"hex":"#651E38","websafe":"#663333","rgb":{"r":101,"g":30,"b":56},"hsl":{"h":338,"s":54,"l":26},"hsb":{"h":338,"s":70,"b":40},"cmyk":{"c":"30","m":"100","y":"30","k":"60"}},"names":{"de":"Bordeauxviolett","en":"Claret violet","fr":"Violet bordeaux","es":"Burdeos","it":"Viola bordeaux","nl":"Bordeuaxpaars"}},"4005":{"code":"4005","scope":"classic","img":"RAL 4005.png","color":{"hex":"#76689A","websafe":"#666699","rgb":{"r":118,"g":104,"b":154},"hsl":{"h":257,"s":20,"l":51},"hsb":{"h":257,"s":32,"b":60},"cmyk":{"c":"50","m":"60","y":"0","k":"0"}},"names":{"de":"Blaulila","en":"Blue lilac","fr":"Lilas bleu","es":"Lila azulado","it":"Lilla bluastro","nl":"Blauwlila"}},"4006":{"code":"4006","scope":"classic","img":"RAL 4006.png","color":{"hex":"#903373","websafe":"#993366","rgb":{"r":144,"g":51,"b":115},"hsl":{"h":319,"s":48,"l":38},"hsb":{"h":319,"s":65,"b":56},"cmyk":{"c":"40","m":"100","y":"0","k":"15"}},"names":{"de":"Verkehrspurpur","en":"Traffic purple","fr":"Pourpre signalisation","es":"P\xfarpur\xe1 tr\xe1fico","it":"Porpora traffico","nl":"Verkeerspurper"}},"4007":{"code":"4007","scope":"classic","img":"RAL 4007.png","color":{"hex":"#47243C","websafe":"#333333","rgb":{"r":71,"g":36,"b":60},"hsl":{"h":319,"s":33,"l":21},"hsb":{"h":319,"s":49,"b":28},"cmyk":{"c":"70","m":"100","y":"10","k":"70"}},"names":{"de":"Purpurviolett","en":"Purple violet","fr":"Violet pourpre","es":"Violeta p\xfarpura","it":"Porpora violetto","nl":"Purperviolet"}},"4008":{"code":"4008","scope":"classic","img":"RAL 4008.png","color":{"hex":"#844C82","websafe":"#993399","rgb":{"r":132,"g":76,"b":130},"hsl":{"h":302,"s":27,"l":41},"hsb":{"h":302,"s":42,"b":52},"cmyk":{"c":"50","m":"90","y":"0","k":"5"}},"names":{"de":"Signalviolett","en":"Signal violet","fr":"Violet de s\xe9curit\xe9","es":"Violeta se\xf1ales","it":"Violetto segnale","nl":"Signaalviolet"}},"4009":{"code":"4009","scope":"classic","img":"RAL 4009.png","color":{"hex":"#9D8692","websafe":"#999999","rgb":{"r":157,"g":134,"b":146},"hsl":{"h":329,"s":11,"l":57},"hsb":{"h":329,"s":15,"b":62},"cmyk":{"c":"35","m":"50","y":"30","k":"10"}},"names":{"de":"Pastellviolett","en":"Pastel violet","fr":"Violet pastel","es":"Violeta pastel","it":"Violetto pastello","nl":"Pastelviolet"}},"4010":{"code":"4010","scope":"classic","img":"RAL 4010.png","color":{"hex":"#BC4077","websafe":"#cc3366","rgb":{"r":188,"g":64,"b":119},"hsl":{"h":333,"s":49,"l":49},"hsb":{"h":333,"s":66,"b":74},"cmyk":{"c":"15","m":"100","y":"15","k":"10"}},"names":{"de":"Telemagenta","en":"Telemagenta","fr":"Telemagenta","es":"Magenta tele","it":"Tele Magenta","nl":"Telemagenta"}},"4011":{"code":"4011","scope":"classic","img":"RAL 4011.png","color":{"hex":"#6E6387","websafe":"#666699","rgb":{"r":110,"g":99,"b":135},"hsl":{"h":258,"s":15,"l":46},"hsb":{"h":258,"s":27,"b":53},"cmyk":{"c":"50","m":"60","y":"0","k":"20"}},"names":{"de":"Perlviolett","en":"Pearl violet","fr":"Violet nacr\xe9","es":"Violeta perlado","it":"Violetto perlato","nl":"Parelmoer donkerviolet"}},"4012":{"code":"4012","scope":"classic","img":"RAL 4012.png","color":{"hex":"#6B6B7F","websafe":"#666666","rgb":{"r":107,"g":107,"b":127},"hsl":{"h":240,"s":9,"l":46},"hsb":{"h":240,"s":16,"b":50},"cmyk":{"c":"40","m":"35","y":"0","k":"40"}},"names":{"de":"Perlbrombeer","en":"Pearl blackberry","fr":"M\xfbre nacr\xe9","es":"Morado perlado","it":"Mora perlato","nl":"Parelmoer lichtviolet"}},"5000":{"code":"5000","scope":"classic","img":"RAL 5000.png","color":{"hex":"#314F6F","websafe":"#336666","rgb":{"r":49,"g":79,"b":111},"hsl":{"h":211,"s":39,"l":31},"hsb":{"h":211,"s":56,"b":44},"cmyk":{"c":"100","m":"80","y":"40","k":"5"}},"names":{"de":"Violettblau","en":"Violet blue","fr":"Bleu violet","es":"Azul violeta","it":"Blu violaceo","nl":"Paarsblauw"}},"5001":{"code":"5001","scope":"classic","img":"RAL 5001.png","color":{"hex":"#0F4C64","websafe":"#003366","rgb":{"r":15,"g":76,"b":100},"hsl":{"h":197,"s":74,"l":23},"hsb":{"h":197,"s":85,"b":39},"cmyk":{"c":"100","m":"60","y":"30","k":"40"}},"names":{"de":"Gr\xfcnblau","en":"Green blue","fr":"Bleu vert","es":"Azul verdoso","it":"Blu verdastro","nl":"Groenblauw"}},"5002":{"code":"5002","scope":"classic","img":"RAL 5002.png","color":{"hex":"#00387B","websafe":"#003366","rgb":{"r":0,"g":56,"b":123},"hsl":{"h":213,"s":100,"l":24},"hsb":{"h":213,"s":100,"b":48},"cmyk":{"c":"100","m":"90","y":"0","k":"10"}},"names":{"de":"Ultramarinblau","en":"Ultramarine blue","fr":"Bleu outremer","es":"Azul ultramar","it":"Blu oltremare","nl":"Ultramarijn blauw"}},"5003":{"code":"5003","scope":"classic","img":"RAL 5003.png","color":{"hex":"#1F3855","websafe":"#333366","rgb":{"r":31,"g":56,"b":85},"hsl":{"h":212,"s":47,"l":23},"hsb":{"h":212,"s":64,"b":33},"cmyk":{"c":"70","m":"30","y":"10","k":"80"}},"names":{"de":"Saphirblau","en":"Sapphire blue","fr":"Bleu saphir","es":"Azul zafiro","it":"Blu zaffiro","nl":"Saffierblauw"}},"5004":{"code":"5004","scope":"classic","img":"RAL 5004.png","color":{"hex":"#191E28","websafe":"#003333","rgb":{"r":25,"g":30,"b":40},"hsl":{"h":220,"s":23,"l":13},"hsb":{"h":220,"s":38,"b":16},"cmyk":{"c":"70","m":"30","y":"10","k":"80"}},"names":{"de":"Schwarzblau","en":"Black blue","fr":"Bleu noir","es":"Azul negruzco","it":"Blu nerastro","nl":"Zwartblauw"}},"5005":{"code":"5005","scope":"classic","img":"RAL 5005.png","color":{"hex":"#005387","websafe":"#006699","rgb":{"r":0,"g":83,"b":135},"hsl":{"h":203,"s":100,"l":26},"hsb":{"h":203,"s":100,"b":53},"cmyk":{"c":"95","m":"60","y":"0","k":"20"}},"names":{"de":"Signalblau","en":"Signal blue","fr":"Bleu de s\xe9curit\xe9","es":"Azul se\xf1ales","it":"Blu segnale","nl":"Signaalblauw"}},"5007":{"code":"5007","scope":"classic","img":"RAL 5007.png","color":{"hex":"#376B8C","websafe":"#336699","rgb":{"r":55,"g":107,"b":140},"hsl":{"h":203,"s":44,"l":38},"hsb":{"h":203,"s":61,"b":55},"cmyk":{"c":"80","m":"50","y":"20","k":"20"}},"names":{"de":"Brillantblau","en":"Brilliant blue","fr":"Bleu brillant","es":"Azul brillante","it":"Blu brillante","nl":"Briljantblauw"}},"5008":{"code":"5008","scope":"classic","img":"RAL 5008.png","color":{"hex":"#2B3A44","websafe":"#333333","rgb":{"r":43,"g":58,"b":68},"hsl":{"h":204,"s":23,"l":22},"hsb":{"h":204,"s":37,"b":27},"cmyk":{"c":"100","m":"90","y":"60","k":"30"}},"names":{"de":"Graublau","en":"Grey blue","fr":"Bleu gris","es":"Azul gris\xe1ceo","it":"Blu grigiastro","nl":"Grijsblauw"}},"5009":{"code":"5009","scope":"classic","img":"RAL 5009.png","color":{"hex":"#225F78","websafe":"#336666","rgb":{"r":34,"g":95,"b":120},"hsl":{"h":197,"s":56,"l":30},"hsb":{"h":197,"s":72,"b":47},"cmyk":{"c":"90","m":"40","y":"0","k":"30"}},"names":{"de":"Azurblau","en":"Azure blue","fr":"Bleu azur","es":"Azul azur","it":"Blu azzurro","nl":"Azuurblauw"}},"5010":{"code":"5010","scope":"classic","img":"RAL 5010.png","color":{"hex":"#004F7C","websafe":"#006666","rgb":{"r":0,"g":79,"b":124},"hsl":{"h":202,"s":100,"l":24},"hsb":{"h":202,"s":100,"b":49},"cmyk":{"c":"100","m":"70","y":"5","k":"15"}},"names":{"de":"Enzianblau","en":"Gentian blue","fr":"Bleu gentiane","es":"Azul genciana","it":"Blu genziana","nl":"Gentiaanblauw"}},"5011":{"code":"5011","scope":"classic","img":"RAL 5011.png","color":{"hex":"#1A2B3C","websafe":"#333333","rgb":{"r":26,"g":43,"b":60},"hsl":{"h":210,"s":40,"l":17},"hsb":{"h":210,"s":57,"b":24},"cmyk":{"c":"100","m":"100","y":"60","k":"30"}},"names":{"de":"Stahlblau","en":"Steel blue","fr":"Bleu acier","es":"Azul acero","it":"Blu acciaio","nl":"Staalblauw"}},"5012":{"code":"5012","scope":"classic","img":"RAL 5012.png","color":{"hex":"#0089B6","websafe":"#0099cc","rgb":{"r":0,"g":137,"b":182},"hsl":{"h":195,"s":100,"l":36},"hsb":{"h":195,"s":100,"b":71},"cmyk":{"c":"75","m":"30","y":"0","k":"10"}},"names":{"de":"Lichtblau","en":"Light blue","fr":"Bleu clair","es":"Azul luminoso","it":"Blu luce","nl":"Lichtblauw"}},"5013":{"code":"5013","scope":"classic","img":"RAL 5013.png","color":{"hex":"#193153","websafe":"#003366","rgb":{"r":25,"g":49,"b":83},"hsl":{"h":215,"s":54,"l":21},"hsb":{"h":215,"s":70,"b":33},"cmyk":{"c":"100","m":"80","y":"10","k":"50"}},"names":{"de":"Kobaltblau","en":"Cobalt blue","fr":"Bleu cobalt","es":"Azul cobalto","it":"Blu cobalto","nl":"Kobaltblauw"}},"5014":{"code":"5014","scope":"classic","img":"RAL 5014.png","color":{"hex":"#637D96","websafe":"#666699","rgb":{"r":99,"g":125,"b":150},"hsl":{"h":209,"s":20,"l":49},"hsb":{"h":209,"s":34,"b":59},"cmyk":{"c":"50","m":"30","y":"10","k":"30"}},"names":{"de":"Taubenblau","en":"Pigeon blue","fr":"Bleu pigeon","es":"Azul colombino","it":"Blu colomba","nl":"Duifblauw"}},"5015":{"code":"5015","scope":"classic","img":"RAL 5015.png","color":{"hex":"#007CB0","websafe":"#006699","rgb":{"r":0,"g":124,"b":176},"hsl":{"h":198,"s":100,"l":35},"hsb":{"h":198,"s":100,"b":69},"cmyk":{"c":"90","m":"40","y":"0","k":"0"}},"names":{"de":"Himmelblau","en":"Sky blue","fr":"Bleu ciel","es":"Azul celeste","it":"Blu cielo","nl":"Hemelsblauw"}},"5017":{"code":"5017","scope":"classic","img":"RAL 5017.png","color":{"hex":"#005B8C","websafe":"#006699","rgb":{"r":0,"g":91,"b":140},"hsl":{"h":201,"s":100,"l":27},"hsb":{"h":201,"s":100,"b":55},"cmyk":{"c":"100","m":"60","y":"0","k":"10"}},"names":{"de":"Verkehrsblau","en":"Traffic blue","fr":"Bleu signalisation","es":"Azul tr\xe1fico","it":"Blu traffico","nl":"Verkeersblauw"}},"5018":{"code":"5018","scope":"classic","img":"RAL 5018.png","color":{"hex":"#058B8C","websafe":"#009999","rgb":{"r":5,"g":139,"b":140},"hsl":{"h":180,"s":93,"l":28},"hsb":{"h":180,"s":96,"b":55},"cmyk":{"c":"80","m":"10","y":"35","k":"20"}},"names":{"de":"T\xfcrkisblau","en":"Turquoise blue","fr":"Bleu turquoise","es":"Azul turquesa","it":"Blu turchese","nl":"Turkooisblauw"}},"5019":{"code":"5019","scope":"classic","img":"RAL 5019.png","color":{"hex":"#005E83","websafe":"#006699","rgb":{"r":0,"g":94,"b":131},"hsl":{"h":197,"s":100,"l":26},"hsb":{"h":197,"s":100,"b":51},"cmyk":{"c":"100","m":"50","y":"15","k":"25"}},"names":{"de":"Capriblau","en":"Capri blue","fr":"Bleu capri","es":"Azul capri","it":"Blu Capri","nl":"Capriblauw"}},"5020":{"code":"5020","scope":"classic","img":"RAL 5020.png","color":{"hex":"#00414B","websafe":"#003333","rgb":{"r":0,"g":65,"b":75},"hsl":{"h":188,"s":100,"l":15},"hsb":{"h":188,"s":100,"b":29},"cmyk":{"c":"100","m":"10","y":"20","k":"80"}},"names":{"de":"Ozeanblau","en":"Ocean blue","fr":"Bleu oc\xe9an","es":"Azul oceano","it":"Blu oceano","nl":"Oceaanblauw"}},"5021":{"code":"5021","scope":"classic","img":"RAL 5021.png","color":{"hex":"#007577","websafe":"#006666","rgb":{"r":0,"g":117,"b":119},"hsl":{"h":181,"s":100,"l":23},"hsb":{"h":181,"s":100,"b":47},"cmyk":{"c":"100","m":"0","y":"40","k":"35"}},"names":{"de":"Wasserblau","en":"Water blue","fr":"Bleu d\u2019eau","es":"Azul agua","it":"Blu acqua","nl":"Waterblauw"}},"5022":{"code":"5022","scope":"classic","img":"RAL 5022.png","color":{"hex":"#222D5A","websafe":"#333366","rgb":{"r":34,"g":45,"b":90},"hsl":{"h":228,"s":45,"l":24},"hsb":{"h":228,"s":62,"b":35},"cmyk":{"c":"100","m":"90","y":"0","k":"50"}},"names":{"de":"Nachtblau","en":"Night blue","fr":"Bleu nocturne","es":"Azul noche","it":"Blu notte","nl":"Nachtblauw"}},"5023":{"code":"5023","scope":"classic","img":"RAL 5023.png","color":{"hex":"#42698C","websafe":"#336699","rgb":{"r":66,"g":105,"b":140},"hsl":{"h":208,"s":36,"l":40},"hsb":{"h":208,"s":53,"b":55},"cmyk":{"c":"70","m":"40","y":"10","k":"30"}},"names":{"de":"Fernblau","en":"Distant blue","fr":"Bleu distant","es":"Azul lejan\xeda","it":"Blu distante","nl":"Verblauw"}},"5024":{"code":"5024","scope":"classic","img":"RAL 5024.png","color":{"hex":"#6093AC","websafe":"#669999","rgb":{"r":96,"g":147,"b":172},"hsl":{"h":200,"s":31,"l":53},"hsb":{"h":200,"s":44,"b":67},"cmyk":{"c":"60","m":"20","y":"5","k":"20"}},"names":{"de":"Pastellblau","en":"Pastel blue","fr":"Bleu pastel","es":"Azul pastel","it":"Blu pastello","nl":"Pastelblauw"}},"5025":{"code":"5025","scope":"classic","img":"RAL 5025.png","color":{"hex":"#21697C","websafe":"#336666","rgb":{"r":33,"g":105,"b":124},"hsl":{"h":193,"s":58,"l":31},"hsb":{"h":193,"s":73,"b":49},"cmyk":{"c":"80","m":"25","y":"5","k":"60"}},"names":{"de":"Perlenzian","en":"Pearl gentian blue","fr":"Gentiane nacr\xe9","es":"Gencian perlado","it":"Blu genziana perlato","nl":"Parelmoer blauw"}},"5026":{"code":"5026","scope":"classic","img":"RAL 5026.png","color":{"hex":"#0F3052","websafe":"#003366","rgb":{"r":15,"g":48,"b":82},"hsl":{"h":210,"s":69,"l":19},"hsb":{"h":210,"s":82,"b":32},"cmyk":{"c":"100","m":"60","y":"0","k":"45"}},"names":{"de":"Perlnachtblau","en":"Pearl night blue","fr":"Bleu nuit nacr\xe9","es":"Azul noche perlado","it":"Blu notte perlato","nl":"Parelmoer nachtblauw"}},"6000":{"code":"6000","scope":"classic","img":"RAL 6000.png","color":{"hex":"#3C7460","websafe":"#336666","rgb":{"r":60,"g":116,"b":96},"hsl":{"h":159,"s":32,"l":35},"hsb":{"h":159,"s":48,"b":45},"cmyk":{"c":"80","m":"25","y":"60","k":"15"}},"names":{"de":"Patinagr\xfcn","en":"Patina green","fr":"Vert patine","es":"Verde patina","it":"Verde patina","nl":"Patinagroen"}},"6001":{"code":"6001","scope":"classic","img":"RAL 6001.png","color":{"hex":"#366735","websafe":"#336633","rgb":{"r":54,"g":103,"b":53},"hsl":{"h":119,"s":32,"l":31},"hsb":{"h":119,"s":49,"b":40},"cmyk":{"c":"80","m":"30","y":"100","k":"10"}},"names":{"de":"Smaragdgr\xfcn","en":"Emerald green","fr":"Vert \xe9meraude","es":"Verde esmeralda","it":"Verde smeraldo","nl":"Smaragdgroen"}},"6002":{"code":"6002","scope":"classic","img":"RAL 6002.png","color":{"hex":"#325928","websafe":"#336633","rgb":{"r":50,"g":89,"b":40},"hsl":{"h":108,"s":38,"l":25},"hsb":{"h":108,"s":55,"b":35},"cmyk":{"c":"85","m":"30","y":"100","k":"30"}},"names":{"de":"Laubgr\xfcn","en":"Leaf green","fr":"Vert feuillage","es":"Verde hoja","it":"Verde foglia","nl":"Loofgroen"}},"6003":{"code":"6003","scope":"classic","img":"RAL 6003.png","color":{"hex":"#50533C","websafe":"#666633","rgb":{"r":80,"g":83,"b":60},"hsl":{"h":68,"s":16,"l":28},"hsb":{"h":68,"s":28,"b":33},"cmyk":{"c":"45","m":"15","y":"60","k":"70"}},"names":{"de":"Olivgr\xfcn","en":"Olive green","fr":"Vert olive","es":"Verde oliva","it":"Verde oliva","nl":"Olijfgroen"}},"6004":{"code":"6004","scope":"classic","img":"RAL 6004.png","color":{"hex":"#024442","websafe":"#003333","rgb":{"r":2,"g":68,"b":66},"hsl":{"h":178,"s":94,"l":14},"hsb":{"h":178,"s":97,"b":27},"cmyk":{"c":"90","m":"10","y":"45","k":"70"}},"names":{"de":"Blaugr\xfcn","en":"Blue green","fr":"Vert bleu","es":"Verde azulado","it":"Verde bluastro","nl":"Blauwgroen"}},"6005":{"code":"6005","scope":"classic","img":"RAL 6005.png","color":{"hex":"#114232","websafe":"#003333","rgb":{"r":17,"g":66,"b":50},"hsl":{"h":160,"s":59,"l":16},"hsb":{"h":160,"s":74,"b":26},"cmyk":{"c":"80","m":"5","y":"60","k":"70"}},"names":{"de":"Moosgr\xfcn","en":"Moss green","fr":"Vert mousse","es":"Verde musgo","it":"Verde muschio","nl":"Mosgroen"}},"6006":{"code":"6006","scope":"classic","img":"RAL 6006.png","color":{"hex":"#3C392E","websafe":"#333333","rgb":{"r":60,"g":57,"b":46},"hsl":{"h":47,"s":13,"l":21},"hsb":{"h":47,"s":23,"b":24},"cmyk":{"c":"20","m":"0","y":"30","k":"90"}},"names":{"de":"Grauoliv","en":"Grey olive","fr":"Olive gris","es":"Oliva gris\xe1ceo","it":"Oliva grigiastro","nl":"Grijs olijfgroen"}},"6007":{"code":"6007","scope":"classic","img":"RAL 6007.png","color":{"hex":"#2C3222","websafe":"#333333","rgb":{"r":44,"g":50,"b":34},"hsl":{"h":83,"s":19,"l":16},"hsb":{"h":83,"s":32,"b":20},"cmyk":{"c":"80","m":"45","y":"70","k":"80"}},"names":{"de":"Flaschengr\xfcn","en":"Bottle green","fr":"Vert bouteille","es":"Verde botella","it":"Verde bottiglia","nl":"Flessengroen"}},"6008":{"code":"6008","scope":"classic","img":"RAL 6008.png","color":{"hex":"#37342A","websafe":"#333333","rgb":{"r":55,"g":52,"b":42},"hsl":{"h":46,"s":13,"l":19},"hsb":{"h":46,"s":24,"b":22},"cmyk":{"c":"60","m":"50","y":"60","k":"80"}},"names":{"de":"Braungr\xfcn","en":"Brown green","fr":"Vert brun","es":"Verde parduzco","it":"Verde brunastro","nl":"Bruingroen"}},"6009":{"code":"6009","scope":"classic","img":"RAL 6009.png","color":{"hex":"#27352A","websafe":"#333333","rgb":{"r":39,"g":53,"b":42},"hsl":{"h":133,"s":15,"l":18},"hsb":{"h":133,"s":26,"b":21},"cmyk":{"c":"100","m":"30","y":"80","k":"80"}},"names":{"de":"Tannengr\xfcn","en":"Fir green","fr":"Vert sapin","es":"Verde abeto","it":"Verde abete","nl":"Dennengroen"}},"6010":{"code":"6010","scope":"classic","img":"RAL 6010.png","color":{"hex":"#4D6F39","websafe":"#666633","rgb":{"r":77,"g":111,"b":57},"hsl":{"h":98,"s":32,"l":33},"hsb":{"h":98,"s":49,"b":44},"cmyk":{"c":"80","m":"20","y":"100","k":"25"}},"names":{"de":"Grasgr\xfcn","en":"Grass green","fr":"Vert herbe","es":"Verde hierba","it":"Verde erba","nl":"Grasgroen"}},"6011":{"code":"6011","scope":"classic","img":"RAL 6011.png","color":{"hex":"#6C7C59","websafe":"#666666","rgb":{"r":108,"g":124,"b":89},"hsl":{"h":87,"s":16,"l":42},"hsb":{"h":87,"s":28,"b":49},"cmyk":{"c":"50","m":"10","y":"60","k":"45"}},"names":{"de":"Resedagr\xfcn","en":"Reseda green","fr":"Vert r\xe9s\xe9da","es":"Verde reseda","it":"Verde reseda","nl":"Resedagroen"}},"6012":{"code":"6012","scope":"classic","img":"RAL 6012.png","color":{"hex":"#303D3A","websafe":"#333333","rgb":{"r":48,"g":61,"b":58},"hsl":{"h":166,"s":12,"l":21},"hsb":{"h":166,"s":21,"b":24},"cmyk":{"c":"80","m":"45","y":"50","k":"70"}},"names":{"de":"Schwarzgr\xfcn","en":"Black green","fr":"Vert noir","es":"Verde negruzco","it":"Verde nerastro","nl":"Zwartgroen"}},"6013":{"code":"6013","scope":"classic","img":"RAL 6013.png","color":{"hex":"#7D765A","websafe":"#666666","rgb":{"r":125,"g":118,"b":90},"hsl":{"h":48,"s":16,"l":42},"hsb":{"h":48,"s":28,"b":49},"cmyk":{"c":"45","m":"25","y":"60","k":"50"}},"names":{"de":"Schilfgr\xfcn","en":"Reed green","fr":"Vert jonc","es":"Verde ca\xf1a","it":"Verde canna","nl":"Rietgroen"}},"6014":{"code":"6014","scope":"classic","img":"RAL 6014.png","color":{"hex":"#474135","websafe":"#333333","rgb":{"r":71,"g":65,"b":53},"hsl":{"h":40,"s":15,"l":24},"hsb":{"h":40,"s":25,"b":28},"cmyk":{"c":"20","m":"20","y":"50","k":"90"}},"names":{"de":"Gelboliv","en":"Yellow olive","fr":"Olive jaune","es":"Amarillo oliva","it":"Oliva giallastro","nl":"Geel olijfgroen"}},"6015":{"code":"6015","scope":"classic","img":"RAL 6015.png","color":{"hex":"#3D3D36","websafe":"#333333","rgb":{"r":61,"g":61,"b":54},"hsl":{"h":60,"s":6,"l":23},"hsb":{"h":60,"s":11,"b":24},"cmyk":{"c":"25","m":"5","y":"30","k":"90"}},"names":{"de":"Schwarzoliv","en":"Black olive","fr":"Olive noir","es":"Oliva negruzco","it":"Oliva nerastro","nl":"Zwart olijfgroen"}},"6016":{"code":"6016","scope":"classic","img":"RAL 6016.png","color":{"hex":"#00694C","websafe":"#006633","rgb":{"r":0,"g":105,"b":76},"hsl":{"h":163,"s":100,"l":21},"hsb":{"h":163,"s":100,"b":41},"cmyk":{"c":"100","m":"20","y":"80","k":"25"}},"names":{"de":"T\xfcrkisgr\xfcn","en":"Turquoise green","fr":"Vert turquoise","es":"Verde turquesa","it":"Verde turchese","nl":"Turkooisgroen"}},"6017":{"code":"6017","scope":"classic","img":"RAL 6017.png","color":{"hex":"#587F40","websafe":"#666633","rgb":{"r":88,"g":127,"b":64},"hsl":{"h":97,"s":33,"l":37},"hsb":{"h":97,"s":50,"b":50},"cmyk":{"c":"70","m":"5","y":"90","k":"20"}},"names":{"de":"Maigr\xfcn","en":"May green","fr":"Vert mai","es":"Verde mayo","it":"Verde maggio","nl":"Meigroen"}},"6018":{"code":"6018","scope":"classic","img":"RAL 6018.png","color":{"hex":"#61993B","websafe":"#669933","rgb":{"r":97,"g":153,"b":59},"hsl":{"h":96,"s":44,"l":42},"hsb":{"h":96,"s":61,"b":60},"cmyk":{"c":"70","m":"0","y":"90","k":"0"}},"names":{"de":"Gelbgr\xfcn","en":"Yellow green","fr":"Vert jaune","es":"Verde amarillento","it":"Verde giallastro","nl":"Geelgroen"}},"6019":{"code":"6019","scope":"classic","img":"RAL 6019.png","color":{"hex":"#B9CEAC","websafe":"#cccc99","rgb":{"r":185,"g":206,"b":172},"hsl":{"h":97,"s":26,"l":74},"hsb":{"h":97,"s":17,"b":81},"cmyk":{"c":"35","m":"0","y":"40","k":"0"}},"names":{"de":"Wei\xdfgr\xfcn","en":"Pastel green","fr":"Vert blanc","es":"Verde blanquecino","it":"Verde biancastro","nl":"Witgroen"}},"6020":{"code":"6020","scope":"classic","img":"RAL 6020.png","color":{"hex":"#37422F","websafe":"#333333","rgb":{"r":55,"g":66,"b":47},"hsl":{"h":95,"s":17,"l":22},"hsb":{"h":95,"s":29,"b":26},"cmyk":{"c":"80","m":"50","y":"90","k":"50"}},"names":{"de":"Chromoxidgr\xfcn","en":"Chrome green","fr":"Vert oxyde chromique","es":"Verde cromo","it":"Verde cromo","nl":"Chroomoxyde groen"}},"6021":{"code":"6021","scope":"classic","img":"RAL 6021.png","color":{"hex":"#8A9977","websafe":"#999966","rgb":{"r":138,"g":153,"b":119},"hsl":{"h":86,"s":14,"l":53},"hsb":{"h":86,"s":22,"b":60},"cmyk":{"c":"45","m":"5","y":"50","k":"25"}},"names":{"de":"Blassgr\xfcn","en":"Pale green","fr":"Vert p\xe2le","es":"Verde p\xe1lido","it":"Verde pallido","nl":"Bleekgroen"}},"6022":{"code":"6022","scope":"classic","img":"RAL 6022.png","color":{"hex":"#3A3327","websafe":"#333333","rgb":{"r":58,"g":51,"b":39},"hsl":{"h":38,"s":20,"l":19},"hsb":{"h":38,"s":33,"b":23},"cmyk":{"c":"70","m":"70","y":"100","k":"70"}},"names":{"de":"Braunoliv","en":"Olive drab","fr":"Olive brun","es":"Oliva parduzco","it":"Oliva brunastro","nl":"Bruin olijfgroen"}},"6024":{"code":"6024","scope":"classic","img":"RAL 6024.png","color":{"hex":"#008351","websafe":"#009966","rgb":{"r":0,"g":131,"b":81},"hsl":{"h":157,"s":100,"l":26},"hsb":{"h":157,"s":100,"b":51},"cmyk":{"c":"90","m":"10","y":"80","k":"10"}},"names":{"de":"Verkehrsgr\xfcn","en":"Traffic green","fr":"Vert signalisation","es":"Verde tr\xe1fico","it":"Verde traffico","nl":"Verkeersgroen"}},"6025":{"code":"6025","scope":"classic","img":"RAL 6025.png","color":{"hex":"#5E6E3B","websafe":"#666633","rgb":{"r":94,"g":110,"b":59},"hsl":{"h":79,"s":30,"l":33},"hsb":{"h":79,"s":46,"b":43},"cmyk":{"c":"70","m":"25","y":"100","k":"20"}},"names":{"de":"Farngr\xfcn","en":"Fern green","fr":"Vert foug\xe8re","es":"Verde helecho","it":"Verde felce","nl":"Varengroen"}},"6026":{"code":"6026","scope":"classic","img":"RAL 6026.png","color":{"hex":"#005F4E","websafe":"#006666","rgb":{"r":0,"g":95,"b":78},"hsl":{"h":169,"s":100,"l":19},"hsb":{"h":169,"s":100,"b":37},"cmyk":{"c":"100","m":"10","y":"60","k":"50"}},"names":{"de":"Opalgr\xfcn","en":"Opal green","fr":"Vert opale","es":"Verde opalo","it":"Verde opale","nl":"Opaalgroen"}},"6027":{"code":"6027","scope":"classic","img":"RAL 6027.png","color":{"hex":"#7EBAB5","websafe":"#66cccc","rgb":{"r":126,"g":186,"b":181},"hsl":{"h":175,"s":30,"l":61},"hsb":{"h":175,"s":32,"b":73},"cmyk":{"c":"50","m":"0","y":"25","k":"5"}},"names":{"de":"Lichtgr\xfcn","en":"Light green","fr":"Vert clair","es":"Verde luminoso","it":"Verde chiaro","nl":"Lichtgroen"}},"6028":{"code":"6028","scope":"classic","img":"RAL 6028.png","color":{"hex":"#315442","websafe":"#336633","rgb":{"r":49,"g":84,"b":66},"hsl":{"h":149,"s":26,"l":26},"hsb":{"h":149,"s":42,"b":33},"cmyk":{"c":"80","m":"35","y":"70","k":"50"}},"names":{"de":"Kieferngr\xfcn","en":"Pine green","fr":"Vert pin","es":"Verde pino","it":"Verde pino","nl":"Pijnboomgroen"}},"6029":{"code":"6029","scope":"classic","img":"RAL 6029.png","color":{"hex":"#006F3D","websafe":"#006633","rgb":{"r":0,"g":111,"b":61},"hsl":{"h":153,"s":100,"l":22},"hsb":{"h":153,"s":100,"b":44},"cmyk":{"c":"100","m":"5","y":"90","k":"30"}},"names":{"de":"Minzgr\xfcn","en":"Mint green","fr":"Vert menthe","es":"Verde menta","it":"Verde menta","nl":"Mintgroen"}},"6032":{"code":"6032","scope":"classic","img":"RAL 6032.png","color":{"hex":"#237F52","websafe":"#336666","rgb":{"r":35,"g":127,"b":82},"hsl":{"h":151,"s":57,"l":32},"hsb":{"h":151,"s":72,"b":50},"cmyk":{"c":"90","m":"10","y":"80","k":"10"}},"names":{"de":"Signalgr\xfcn","en":"Signal green","fr":"Vert de s\xe9curit\xe9","es":"Verde se\xf1ales","it":"Verde segnale","nl":"Signaalgroen"}},"6033":{"code":"6033","scope":"classic","img":"RAL 6033.png","color":{"hex":"#46877F","websafe":"#339966","rgb":{"r":70,"g":135,"b":127},"hsl":{"h":173,"s":32,"l":40},"hsb":{"h":173,"s":48,"b":53},"cmyk":{"c":"70","m":"15","y":"50","k":"20"}},"names":{"de":"Mintt\xfcrkis","en":"Mint turquoise","fr":"Turquoise menthe","es":"Turquesa menta","it":"Turchese menta","nl":"Mintturquoise"}},"6034":{"code":"6034","scope":"classic","img":"RAL 6034.png","color":{"hex":"#7AACAC","websafe":"#669999","rgb":{"r":122,"g":172,"b":172},"hsl":{"h":180,"s":23,"l":58},"hsb":{"h":180,"s":29,"b":67},"cmyk":{"c":"45","m":"0","y":"20","k":"20"}},"names":{"de":"Pastellt\xfcrkis","en":"Pastel turquoise","fr":"Turquoise pastel","es":"Turquesa pastel","it":"Turchese pastello","nl":"Pastelturquoise"}},"6035":{"code":"6035","scope":"classic","img":"RAL 6035.png","color":{"hex":"#194D25","websafe":"#006633","rgb":{"r":25,"g":77,"b":37},"hsl":{"h":134,"s":51,"l":20},"hsb":{"h":134,"s":68,"b":30},"cmyk":{"c":"90","m":"15","y":"100","k":"60"}},"names":{"de":"Perlgr\xfcn","en":"Pearl green","fr":"Vert nacr\xe9","es":"Verde perlado","it":"Verde perlato","nl":"Parelmoer donkergroen"}},"6036":{"code":"6036","scope":"classic","img":"RAL 6036.png","color":{"hex":"#04574B","websafe":"#006633","rgb":{"r":4,"g":87,"b":75},"hsl":{"h":171,"s":91,"l":18},"hsb":{"h":171,"s":95,"b":34},"cmyk":{"c":"85","m":"10","y":"60","k":"40"}},"names":{"de":"Perlopalgr\xfcn","en":"Pearl opal green","fr":"Vert opal nacr\xe9","es":"Verde \xf3palo perlado","it":"Verde opalo perlato","nl":"Parelmoer lichtgroen"}},"6037":{"code":"6037","scope":"classic","img":"RAL 6037.png","color":{"hex":"#008B29","websafe":"#009933","rgb":{"r":0,"g":139,"b":41},"hsl":{"h":138,"s":100,"l":27},"hsb":{"h":138,"s":100,"b":55},"cmyk":{"c":"85","m":"0","y":"100","k":"0"}},"names":{"de":"Reingr\xfcn","en":"Pure green","fr":"Vert pur","es":"Verde puro ","it":"Verde puro","nl":"Zuiver groen "}},"6038":{"code":"6038","scope":"classic","img":"RAL 6038.png","color":{"hex":"#00B51A","websafe":"#00cc33","rgb":{"r":0,"g":181,"b":26},"hsl":{"h":129,"s":100,"l":35},"hsb":{"h":129,"s":100,"b":71},"cmyk":{"c":"70","m":"0","y":"90","k":"0"}},"names":{"de":"Leuchtgr\xfcn","en":"Luminous green","fr":"Vert brillant","es":"Verde brillante ","it":"Verde brillante","nl":"Briljantgroen "}},"7000":{"code":"7000","scope":"classic","img":"RAL 7000.png","color":{"hex":"#7A888E","websafe":"#669999","rgb":{"r":122,"g":136,"b":142},"hsl":{"h":198,"s":8,"l":52},"hsb":{"h":198,"s":14,"b":56},"cmyk":{"c":"35","m":"5","y":"10","k":"40"}},"names":{"de":"Fehgrau","en":"Squirrel grey","fr":"Gris petit-gris","es":"Gris ardilla","it":"Grigio vaio","nl":"Pelsgrijs"}},"7001":{"code":"7001","scope":"classic","img":"RAL 7001.png","color":{"hex":"#8C969D","websafe":"#999999","rgb":{"r":140,"g":150,"b":157},"hsl":{"h":205,"s":8,"l":58},"hsb":{"h":205,"s":11,"b":62},"cmyk":{"c":"25","m":"10","y":"5","k":"45"}},"names":{"de":"Silbergrau","en":"Silver grey","fr":"Gris argent","es":"Gris plata","it":"Grigio argento","nl":"Zilvergrijs"}},"7002":{"code":"7002","scope":"classic","img":"RAL 7002.png","color":{"hex":"#817863","websafe":"#996666","rgb":{"r":129,"g":120,"b":99},"hsl":{"h":42,"s":13,"l":45},"hsb":{"h":42,"s":23,"b":51},"cmyk":{"c":"0","m":"5","y":"40","k":"60"}},"names":{"de":"Olivgrau","en":"Olive grey","fr":"Gris olive","es":"Gris oliva","it":"Grigio olivastro","nl":"Olijfgrijs"}},"7003":{"code":"7003","scope":"classic","img":"RAL 7003.png","color":{"hex":"#7A7669","websafe":"#666666","rgb":{"r":122,"g":118,"b":105},"hsl":{"h":46,"s":7,"l":45},"hsb":{"h":46,"s":14,"b":48},"cmyk":{"c":"45","m":"35","y":"45","k":"45"}},"names":{"de":"Moosgrau","en":"Moss grey","fr":"Gris mousse","es":"Gris musgo","it":"Grigio muschio","nl":"Mosgrijs"}},"7004":{"code":"7004","scope":"classic","img":"RAL 7004.png","color":{"hex":"#9B9B9B","websafe":"#999999","rgb":{"r":155,"g":155,"b":155},"hsl":{"h":0,"s":0,"l":61},"hsb":{"h":0,"s":0,"b":61},"cmyk":{"c":"15","m":"10","y":"5","k":"45"}},"names":{"de":"Signalgrau","en":"Signal grey","fr":"Gris de s\xe9curit\xe9","es":"Gris se\xf1ales","it":"Grigio segnale","nl":"Signaalgrijs"}},"7005":{"code":"7005","scope":"classic","img":"RAL 7005.png","color":{"hex":"#6C6E6B","websafe":"#666666","rgb":{"r":108,"g":110,"b":107},"hsl":{"h":100,"s":1,"l":43},"hsb":{"h":100,"s":3,"b":43},"cmyk":{"c":"35","m":"20","y":"30","k":"40"}},"names":{"de":"Mausgrau","en":"Mouse grey","fr":"Gris souris","es":"Gris rat\xf3n","it":"Grigio topo","nl":"Muisgrijs"}},"7006":{"code":"7006","scope":"classic","img":"RAL 7006.png","color":{"hex":"#766A5E","websafe":"#666666","rgb":{"r":118,"g":106,"b":94},"hsl":{"h":30,"s":11,"l":42},"hsb":{"h":30,"s":20,"b":46},"cmyk":{"c":"40","m":"40","y":"50","k":"40"}},"names":{"de":"Beigegrau","en":"Beige grey","fr":"Gris beige","es":"Gris beige","it":"Grigio beige","nl":"Beigegrijs"}},"7008":{"code":"7008","scope":"classic","img":"RAL 7008.png","color":{"hex":"#745E3D","websafe":"#666633","rgb":{"r":116,"g":94,"b":61},"hsl":{"h":36,"s":31,"l":35},"hsb":{"h":36,"s":47,"b":45},"cmyk":{"c":"40","m":"50","y":"90","k":"40"}},"names":{"de":"Khakigrau","en":"Khaki grey","fr":"Gris kaki","es":"Gris caqui","it":"Grigio kaki","nl":"Kakigrijs"}},"7009":{"code":"7009","scope":"classic","img":"RAL 7009.png","color":{"hex":"#5D6058","websafe":"#666666","rgb":{"r":93,"g":96,"b":88},"hsl":{"h":83,"s":4,"l":36},"hsb":{"h":83,"s":8,"b":38},"cmyk":{"c":"50","m":"35","y":"50","k":"50"}},"names":{"de":"Gr\xfcngrau","en":"Green grey","fr":"Gris vert","es":"Gris verdoso","it":"Grigio verdastro","nl":"Groengrijs"}},"7010":{"code":"7010","scope":"classic","img":"RAL 7010.png","color":{"hex":"#585C56","websafe":"#666666","rgb":{"r":88,"g":92,"b":86},"hsl":{"h":100,"s":3,"l":35},"hsb":{"h":100,"s":7,"b":36},"cmyk":{"c":"50","m":"30","y":"45","k":"60"}},"names":{"de":"Zeltgrau","en":"Tarpaulin grey","fr":"Gris tente","es":"Gris lona","it":"Grigio tenda","nl":"Zeildoekgrijs"}},"7011":{"code":"7011","scope":"classic","img":"RAL 7011.png","color":{"hex":"#52595D","websafe":"#666666","rgb":{"r":82,"g":89,"b":93},"hsl":{"h":202,"s":6,"l":34},"hsb":{"h":202,"s":12,"b":36},"cmyk":{"c":"40","m":"15","y":"15","k":"70"}},"names":{"de":"Eisengrau","en":"Iron grey","fr":"Gris fer","es":"Gris hierro","it":"Grigio ferro","nl":"IJzergrijs"}},"7012":{"code":"7012","scope":"classic","img":"RAL 7012.png","color":{"hex":"#575D5E","websafe":"#666666","rgb":{"r":87,"g":93,"b":94},"hsl":{"h":189,"s":4,"l":35},"hsb":{"h":189,"s":7,"b":37},"cmyk":{"c":"30","m":"10","y":"10","k":"70"}},"names":{"de":"Basaltgrau","en":"Basalt grey","fr":"Gris basalte","es":"Gris basalto","it":"Grigio basalto","nl":"Bazaltgrijs"}},"7013":{"code":"7013","scope":"classic","img":"RAL 7013.png","color":{"hex":"#575044","websafe":"#666633","rgb":{"r":87,"g":80,"b":68},"hsl":{"h":38,"s":12,"l":30},"hsb":{"h":38,"s":22,"b":34},"cmyk":{"c":"30","m":"35","y":"50","k":"70"}},"names":{"de":"Braungrau","en":"Brown grey","fr":"Gris brun","es":"Gris parduzco","it":"Grigio brunastro","nl":"Bruingrijs"}},"7015":{"code":"7015","scope":"classic","img":"RAL 7015.png","color":{"hex":"#4F5358","websafe":"#666666","rgb":{"r":79,"g":83,"b":88},"hsl":{"h":213,"s":5,"l":33},"hsb":{"h":213,"s":10,"b":35},"cmyk":{"c":"45","m":"30","y":"15","k":"70"}},"names":{"de":"Schiefergrau","en":"Slate grey","fr":"Gris ardoise","es":"Gris pizarra","it":"Grigio ardesia","nl":"Leigrijs"}},"7016":{"code":"7016","scope":"classic","img":"RAL 7016.png","color":{"hex":"#383E42","websafe":"#333333","rgb":{"r":56,"g":62,"b":66},"hsl":{"h":204,"s":8,"l":24},"hsb":{"h":204,"s":15,"b":26},"cmyk":{"c":"60","m":"30","y":"20","k":"80"}},"names":{"de":"Anthrazitgrau","en":"Anthracite grey","fr":"Gris anthracite","es":"Gris antracita","it":"Grigio antracite","nl":"Antracietgrijs"}},"7021":{"code":"7021","scope":"classic","img":"RAL 7021.png","color":{"hex":"#2F3234","websafe":"#333333","rgb":{"r":47,"g":50,"b":52},"hsl":{"h":204,"s":5,"l":19},"hsb":{"h":204,"s":10,"b":20},"cmyk":{"c":"60","m":"35","y":"30","k":"90"}},"names":{"de":"Schwarzgrau","en":"Black grey","fr":"Gris noir","es":"Gris negruzco","it":"Grigio nerastro","nl":"Zwartgrijs"}},"7022":{"code":"7022","scope":"classic","img":"RAL 7022.png","color":{"hex":"#4C4A44","websafe":"#333333","rgb":{"r":76,"g":74,"b":68},"hsl":{"h":45,"s":6,"l":28},"hsb":{"h":45,"s":11,"b":30},"cmyk":{"c":"40","m":"30","y":"40","k":"80"}},"names":{"de":"Umbragrau","en":"Umbra grey","fr":"Gris terre d\u2019ombre","es":"Gris sombra","it":"Grigio ombra","nl":"Ombergrijs"}},"7023":{"code":"7023","scope":"classic","img":"RAL 7023.png","color":{"hex":"#808076","websafe":"#999966","rgb":{"r":128,"g":128,"b":118},"hsl":{"h":60,"s":4,"l":48},"hsb":{"h":60,"s":8,"b":50},"cmyk":{"c":"5","m":"0","y":"20","k":"50"}},"names":{"de":"Betongrau","en":"Concrete grey","fr":"Gris b\xe9ton","es":"Gris hormig\xf3n","it":"Grigio calcestruzzo","nl":"Betongrijs"}},"7024":{"code":"7024","scope":"classic","img":"RAL 7024.png","color":{"hex":"#45494E","websafe":"#333366","rgb":{"r":69,"g":73,"b":78},"hsl":{"h":213,"s":6,"l":29},"hsb":{"h":213,"s":12,"b":31},"cmyk":{"c":"30","m":"20","y":"0","k":"80"}},"names":{"de":"Graphitgrau","en":"Graphite grey","fr":"Gris graphite","es":"Gris grafita","it":"Grigio grafite","nl":"Grafietgrijs"}},"7026":{"code":"7026","scope":"classic","img":"RAL 7026.png","color":{"hex":"#374345","websafe":"#333333","rgb":{"r":55,"g":67,"b":69},"hsl":{"h":189,"s":11,"l":24},"hsb":{"h":189,"s":20,"b":27},"cmyk":{"c":"50","m":"15","y":"15","k":"80"}},"names":{"de":"Granitgrau","en":"Granite grey","fr":"Gris granit","es":"Gris granito","it":"Grigio granito","nl":"Granietgrijs"}},"7030":{"code":"7030","scope":"classic","img":"RAL 7030.png","color":{"hex":"#928E85","websafe":"#999999","rgb":{"r":146,"g":142,"b":133},"hsl":{"h":42,"s":6,"l":55},"hsb":{"h":42,"s":9,"b":57},"cmyk":{"c":"5","m":"5","y":"15","k":"50"}},"names":{"de":"Steingrau","en":"Stone grey","fr":"Gris pierre","es":"Gris piedra","it":"Grigio pietra","nl":"Steengrijs"}},"7031":{"code":"7031","scope":"classic","img":"RAL 7031.png","color":{"hex":"#5B686D","websafe":"#666666","rgb":{"r":91,"g":104,"b":109},"hsl":{"h":197,"s":9,"l":39},"hsb":{"h":197,"s":17,"b":43},"cmyk":{"c":"50","m":"20","y":"15","k":"60"}},"names":{"de":"Blaugrau","en":"Blue grey","fr":"Gris bleu","es":"Gris azulado","it":"Grigio bluastro","nl":"Blauwgrijs"}},"7032":{"code":"7032","scope":"classic","img":"RAL 7032.png","color":{"hex":"#B5B0A1","websafe":"#cc9999","rgb":{"r":181,"g":176,"b":161},"hsl":{"h":45,"s":12,"l":67},"hsb":{"h":45,"s":11,"b":71},"cmyk":{"c":"15","m":"10","y":"25","k":"20"}},"names":{"de":"Kieselgrau","en":"Pebble grey","fr":"Gris silex","es":"Gris guijarro","it":"Grigio ghiaia","nl":"Kiezelgrijs"}},"7033":{"code":"7033","scope":"classic","img":"RAL 7033.png","color":{"hex":"#7F8274","websafe":"#669966","rgb":{"r":127,"g":130,"b":116},"hsl":{"h":73,"s":6,"l":48},"hsb":{"h":73,"s":11,"b":51},"cmyk":{"c":"25","m":"10","y":"30","k":"40"}},"names":{"de":"Zementgrau","en":"Cement grey","fr":"Gris ciment","es":"Gris cemento","it":"Grigio cemento","nl":"Cementgrijs"}},"7034":{"code":"7034","scope":"classic","img":"RAL 7034.png","color":{"hex":"#92886F","websafe":"#999966","rgb":{"r":146,"g":136,"b":111},"hsl":{"h":43,"s":14,"l":50},"hsb":{"h":43,"s":24,"b":57},"cmyk":{"c":"15","m":"20","y":"40","k":"40"}},"names":{"de":"Gelbgrau","en":"Yellow grey","fr":"Gris jaune","es":"Gris amarillento","it":"Grigio giallastro","nl":"Geelgrijs"}},"7035":{"code":"7035","scope":"classic","img":"RAL 7035.png","color":{"hex":"#C5C7C4","websafe":"#cccccc","rgb":{"r":197,"g":199,"b":196},"hsl":{"h":100,"s":3,"l":77},"hsb":{"h":100,"s":2,"b":78},"cmyk":{"c":"20","m":"10","y":"15","k":"5"}},"names":{"de":"Lichtgrau","en":"Light grey","fr":"Gris clair","es":"Gris luminoso","it":"Grigio luce","nl":"Lichtgrijs"}},"7036":{"code":"7036","scope":"classic","img":"RAL 7036.png","color":{"hex":"#979392","websafe":"#999999","rgb":{"r":151,"g":147,"b":146},"hsl":{"h":12,"s":2,"l":58},"hsb":{"h":12,"s":3,"b":59},"cmyk":{"c":"35","m":"30","y":"30","k":"10"}},"names":{"de":"Platingrau","en":"Platinum grey","fr":"Gris platine","es":"Gris platino","it":"Grigio platino","nl":"Platinagrijs"}},"7037":{"code":"7037","scope":"classic","img":"RAL 7037.png","color":{"hex":"#7A7B7A","websafe":"#666666","rgb":{"r":122,"g":123,"b":122},"hsl":{"h":120,"s":0,"l":48},"hsb":{"h":120,"s":1,"b":48},"cmyk":{"c":"30","m":"20","y":"20","k":"40"}},"names":{"de":"Staubgrau","en":"Dusty grey","fr":"Gris poussi\xe8re","es":"Gris polvo","it":"Grigio polvere","nl":"Stofgrijs"}},"7038":{"code":"7038","scope":"classic","img":"RAL 7038.png","color":{"hex":"#B0B0A9","websafe":"#999999","rgb":{"r":176,"g":176,"b":169},"hsl":{"h":60,"s":4,"l":68},"hsb":{"h":60,"s":4,"b":69},"cmyk":{"c":"5","m":"0","y":"10","k":"30"}},"names":{"de":"Achatgrau","en":"Agate grey","fr":"Gris agate","es":"Gris \xe1gata","it":"Grigio agata","nl":"Agaatgrijs"}},"7039":{"code":"7039","scope":"classic","img":"RAL 7039.png","color":{"hex":"#6B665E","websafe":"#666666","rgb":{"r":107,"g":102,"b":94},"hsl":{"h":37,"s":6,"l":39},"hsb":{"h":37,"s":12,"b":42},"cmyk":{"c":"25","m":"20","y":"30","k":"60"}},"names":{"de":"Quarzgrau","en":"Quartz grey","fr":"Gris quartz","es":"Gris cuarzo","it":"Grigio quarzo","nl":"Kwartsgrijs"}},"7040":{"code":"7040","scope":"classic","img":"RAL 7040.png","color":{"hex":"#989EA1","websafe":"#999999","rgb":{"r":152,"g":158,"b":161},"hsl":{"h":200,"s":5,"l":61},"hsb":{"h":200,"s":6,"b":63},"cmyk":{"c":"20","m":"10","y":"5","k":"35"}},"names":{"de":"Fenstergrau","en":"Window grey","fr":"Gris fen\xeatre","es":"Gris ventana","it":"Grigio finestra","nl":"Venstergrijs"}},"7042":{"code":"7042","scope":"classic","img":"RAL 7042.png","color":{"hex":"#8E9291","websafe":"#999999","rgb":{"r":142,"g":146,"b":145},"hsl":{"h":165,"s":2,"l":56},"hsb":{"h":165,"s":3,"b":57},"cmyk":{"c":"30","m":"20","y":"30","k":"30"}},"names":{"de":"Verkehrsgrau A","en":"Traffic grey A","fr":"Gris signalisation A","es":"Gris tr\xe1fico A","it":"Grigio traffico A","nl":"Verkeersgrijs A"}},"7043":{"code":"7043","scope":"classic","img":"RAL 7043.png","color":{"hex":"#4F5250","websafe":"#666666","rgb":{"r":79,"g":82,"b":80},"hsl":{"h":140,"s":2,"l":32},"hsb":{"h":140,"s":4,"b":32},"cmyk":{"c":"20","m":"5","y":"0","k":"80"}},"names":{"de":"Verkehrsgrau B","en":"Traffic grey B","fr":"Gris signalisation B","es":"Gris tr\xe1fico B","it":"Grigio traffico B","nl":"Verkeersgrijs B"}},"7044":{"code":"7044","scope":"classic","img":"RAL 7044.png","color":{"hex":"#B7B3A8","websafe":"#cccc99","rgb":{"r":183,"g":179,"b":168},"hsl":{"h":44,"s":9,"l":69},"hsb":{"h":44,"s":8,"b":72},"cmyk":{"c":"20","m":"15","y":"25","k":"15"}},"names":{"de":"Seidengrau","en":"Silk grey","fr":"Gris soie","es":"Gris seda","it":"Grigio seta","nl":"Zijdegrijs"}},"7045":{"code":"7045","scope":"classic","img":"RAL 7045.png","color":{"hex":"#8D9295","websafe":"#999999","rgb":{"r":141,"g":146,"b":149},"hsl":{"h":203,"s":4,"l":57},"hsb":{"h":203,"s":5,"b":58},"cmyk":{"c":"5","m":"0","y":"0","k":"45"}},"names":{"de":"Telegrau 1","en":"Telegrey 1","fr":"Telegris 1","es":"Gris tele 1","it":"Grigio tele 1","nl":"Telegrijs 1"}},"7046":{"code":"7046","scope":"classic","img":"RAL 7046.png","color":{"hex":"#7F868A","websafe":"#669999","rgb":{"r":127,"g":134,"b":138},"hsl":{"h":202,"s":4,"l":52},"hsb":{"h":202,"s":8,"b":54},"cmyk":{"c":"30","m":"20","y":"20","k":"40"}},"names":{"de":"Telegrau 2","en":"Telegrey 2","fr":"Telegris 2","es":"Gris tele 2","it":"Grigio tele 2","nl":"Telegrijs 2"}},"7047":{"code":"7047","scope":"classic","img":"RAL 7047.png","color":{"hex":"#C8C8C7","websafe":"#cccccc","rgb":{"r":200,"g":200,"b":199},"hsl":{"h":60,"s":1,"l":78},"hsb":{"h":60,"s":0,"b":78},"cmyk":{"c":"5","m":"5","y":"5","k":"20"}},"names":{"de":"Telegrau 4","en":"Telegrey 4","fr":"Telegris 4","es":"Gris tele 4","it":"Grigio tele 4","nl":"Telegrijs 4"}},"7048":{"code":"7048","scope":"classic","img":"RAL 7048.png","color":{"hex":"#817B73","websafe":"#996666","rgb":{"r":129,"g":123,"b":115},"hsl":{"h":34,"s":6,"l":48},"hsb":{"h":34,"s":11,"b":51},"cmyk":{"c":"15","m":"15","y":"25","k":"60"}},"names":{"de":"Perlmausgrau","en":"Pearl mouse grey","fr":"Gris souris nacr\xe9","es":"Gris musgo perlado","it":"Grigio topo perlato","nl":"Parelmoer muisgrijs"}},"8000":{"code":"8000","scope":"classic","img":"RAL 8000.png","color":{"hex":"#89693E","websafe":"#996633","rgb":{"r":137,"g":105,"b":62},"hsl":{"h":34,"s":38,"l":39},"hsb":{"h":34,"s":55,"b":54},"cmyk":{"c":"50","m":"60","y":"90","k":"0"}},"names":{"de":"Gr\xfcnbraun","en":"Green brown","fr":"Brun vert","es":"Pardo verdoso","it":"Marrone verdastro","nl":"Groenbruin"}},"8001":{"code":"8001","scope":"classic","img":"RAL 8001.png","color":{"hex":"#9D622B","websafe":"#996633","rgb":{"r":157,"g":98,"b":43},"hsl":{"h":29,"s":57,"l":39},"hsb":{"h":29,"s":73,"b":62},"cmyk":{"c":"30","m":"60","y":"90","k":"10"}},"names":{"de":"Ockerbraun","en":"Ochre brown","fr":"Brun terre de Sienne","es":"Pardo ocre","it":"Marrone ocra","nl":"Okerbruin"}},"8002":{"code":"8002","scope":"classic","img":"RAL 8002.png","color":{"hex":"#794D3E","websafe":"#666633","rgb":{"r":121,"g":77,"b":62},"hsl":{"h":15,"s":32,"l":36},"hsb":{"h":15,"s":49,"b":47},"cmyk":{"c":"30","m":"70","y":"70","k":"50"}},"names":{"de":"Signalbraun","en":"Signal brown","fr":"Brun de s\xe9curit\xe9","es":"Marr\xf3n se\xf1ales","it":"Marrone segnale","nl":"Signaalbruin"}},"8003":{"code":"8003","scope":"classic","img":"RAL 8003.png","color":{"hex":"#7E4B26","websafe":"#663333","rgb":{"r":126,"g":75,"b":38},"hsl":{"h":25,"s":54,"l":32},"hsb":{"h":25,"s":70,"b":49},"cmyk":{"c":"0","m":"60","y":"80","k":"60"}},"names":{"de":"Lehmbraun","en":"Clay brown","fr":"Brun argile","es":"Pardo arcilla","it":"Marrone fango","nl":"Leembruin"}},"8004":{"code":"8004","scope":"classic","img":"RAL 8004.png","color":{"hex":"#8D4931","websafe":"#993333","rgb":{"r":141,"g":73,"b":49},"hsl":{"h":16,"s":48,"l":37},"hsb":{"h":16,"s":65,"b":55},"cmyk":{"c":"45","m":"80","y":"100","k":"10"}},"names":{"de":"Kupferbraun","en":"Copper brown","fr":"Brun cuivr\xe9","es":"Pardo cobre","it":"Marrone rame","nl":"Koperbruin"}},"8007":{"code":"8007","scope":"classic","img":"RAL 8007.png","color":{"hex":"#70452A","websafe":"#663333","rgb":{"r":112,"g":69,"b":42},"hsl":{"h":23,"s":45,"l":30},"hsb":{"h":23,"s":63,"b":44},"cmyk":{"c":"40","m":"70","y":"100","k":"50"}},"names":{"de":"Rehbraun","en":"Fawn brown","fr":"Brun fauve","es":"Pardo corzo","it":"Marrone capriolo","nl":"Reebruin"}},"8008":{"code":"8008","scope":"classic","img":"RAL 8008.png","color":{"hex":"#724A25","websafe":"#663333","rgb":{"r":114,"g":74,"b":37},"hsl":{"h":29,"s":51,"l":30},"hsb":{"h":29,"s":68,"b":45},"cmyk":{"c":"15","m":"50","y":"90","k":"60"}},"names":{"de":"Olivbraun","en":"Olive brown","fr":"Brun olive","es":"Pardo oliva","it":"Marrone oliva","nl":"Olijfbruin"}},"8011":{"code":"8011","scope":"classic","img":"RAL 8011.png","color":{"hex":"#5A3826","websafe":"#663333","rgb":{"r":90,"g":56,"b":38},"hsl":{"h":21,"s":41,"l":25},"hsb":{"h":21,"s":58,"b":35},"cmyk":{"c":"30","m":"70","y":"90","k":"70"}},"names":{"de":"Nussbraun","en":"Nut brown","fr":"Brun noisette","es":"Pardo nuez","it":"Marrone noce","nl":"Notenbruin"}},"8012":{"code":"8012","scope":"classic","img":"RAL 8012.png","color":{"hex":"#66332B","websafe":"#663333","rgb":{"r":102,"g":51,"b":43},"hsl":{"h":8,"s":41,"l":28},"hsb":{"h":8,"s":58,"b":40},"cmyk":{"c":"40","m":"90","y":"100","k":"50"}},"names":{"de":"Rotbraun","en":"Red brown","fr":"Brun rouge","es":"Pardo rojo","it":"Marrone rossiccio","nl":"Roodbruin"}},"8014":{"code":"8014","scope":"classic","img":"RAL 8014.png","color":{"hex":"#4A3526","websafe":"#333333","rgb":{"r":74,"g":53,"b":38},"hsl":{"h":25,"s":32,"l":22},"hsb":{"h":25,"s":49,"b":29},"cmyk":{"c":"30","m":"60","y":"70","k":"80"}},"names":{"de":"Sepiabraun","en":"Sepia brown","fr":"Brun s\xe9pia","es":"Sepia","it":"Marrone seppia","nl":"Sepiabruin"}},"8015":{"code":"8015","scope":"classic","img":"RAL 8015.png","color":{"hex":"#5E2F26","websafe":"#663333","rgb":{"r":94,"g":47,"b":38},"hsl":{"h":10,"s":42,"l":26},"hsb":{"h":10,"s":60,"b":37},"cmyk":{"c":"50","m":"100","y":"100","k":"50"}},"names":{"de":"Kastanienbraun","en":"Chestnut brown","fr":"Marron","es":"Casta\xf1o","it":"Marrone castagna","nl":"Kastanjebruin"}},"8016":{"code":"8016","scope":"classic","img":"RAL 8016.png","color":{"hex":"#4C2B20","websafe":"#333333","rgb":{"r":76,"g":43,"b":32},"hsl":{"h":15,"s":41,"l":21},"hsb":{"h":15,"s":58,"b":30},"cmyk":{"c":"40","m":"80","y":"70","k":"70"}},"names":{"de":"Mahagonibraun","en":"Mahogany brown","fr":"Brun acajou","es":"Caoba","it":"Marrone mogano","nl":"Mahoniebruin"}},"8017":{"code":"8017","scope":"classic","img":"RAL 8017.png","color":{"hex":"#442F29","websafe":"#333333","rgb":{"r":68,"g":47,"b":41},"hsl":{"h":13,"s":25,"l":21},"hsb":{"h":13,"s":40,"b":27},"cmyk":{"c":"30","m":"70","y":"60","k":"80"}},"names":{"de":"Schokoladenbraun","en":"Chocolate brown","fr":"Brun chocolat","es":"Chocolate","it":"Marrone cioccolata","nl":"Chocoladebruin"}},"8019":{"code":"8019","scope":"classic","img":"RAL 8019.png","color":{"hex":"#3D3635","websafe":"#333333","rgb":{"r":61,"g":54,"b":53},"hsl":{"h":7,"s":7,"l":22},"hsb":{"h":7,"s":13,"b":24},"cmyk":{"c":"50","m":"50","y":"40","k":"80"}},"names":{"de":"Graubraun","en":"Grey brown","fr":"Brun gris","es":"Pardo gris\xe1ceo","it":"Marrone grigiastro","nl":"Grijsbruin"}},"8022":{"code":"8022","scope":"classic","img":"RAL 8022.png","color":{"hex":"#1A1718","websafe":"#330000","rgb":{"r":26,"g":23,"b":24},"hsl":{"h":340,"s":6,"l":10},"hsb":{"h":340,"s":12,"b":10},"cmyk":{"c":"100","m":"50","y":"30","k":"100"}},"names":{"de":"Schwarzbraun","en":"Black brown","fr":"Brun noir","es":"Pardo negruzco","it":"Marrone nerastro","nl":"Zwartbruin"}},"8023":{"code":"8023","scope":"classic","img":"RAL 8023.png","color":{"hex":"#A45729","websafe":"#996633","rgb":{"r":164,"g":87,"b":41},"hsl":{"h":22,"s":60,"l":40},"hsb":{"h":22,"s":75,"b":64},"cmyk":{"c":"25","m":"75","y":"100","k":"10"}},"names":{"de":"Orangebraun","en":"Orange brown","fr":"Brun orang\xe9","es":"Pardo anaranjado","it":"Marrone arancio","nl":"Oranjebruin"}},"8024":{"code":"8024","scope":"classic","img":"RAL 8024.png","color":{"hex":"#795038","websafe":"#666633","rgb":{"r":121,"g":80,"b":56},"hsl":{"h":22,"s":37,"l":35},"hsb":{"h":22,"s":54,"b":47},"cmyk":{"c":"25","m":"60","y":"70","k":"50"}},"names":{"de":"Beigebraun","en":"Beige brown","fr":"Brun beige","es":"Pardo beige","it":"Marrone beige","nl":"Beigebruin"}},"8025":{"code":"8025","scope":"classic","img":"RAL 8025.png","color":{"hex":"#755847","websafe":"#666633","rgb":{"r":117,"g":88,"b":71},"hsl":{"h":22,"s":24,"l":37},"hsb":{"h":22,"s":39,"b":46},"cmyk":{"c":"40","m":"60","y":"60","k":"45"}},"names":{"de":"Blassbraun","en":"Pale brown","fr":"Brun p\xe2le","es":"Pardo p\xe1lido","it":"Marrone pallido","nl":"Bleekbruin"}},"8028":{"code":"8028","scope":"classic","img":"RAL 8028.png","color":{"hex":"#513A2A","websafe":"#663333","rgb":{"r":81,"g":58,"b":42},"hsl":{"h":25,"s":32,"l":24},"hsb":{"h":25,"s":48,"b":32},"cmyk":{"c":"60","m":"70","y":"90","k":"60"}},"names":{"de":"Terrabraun","en":"Terra brown","fr":"Brun terre","es":"Marr\xf3n tierra","it":"Marrone terra","nl":"Terrabruin"}},"8029":{"code":"8029","scope":"classic","img":"RAL 8029.png","color":{"hex":"#7F4031","websafe":"#663333","rgb":{"r":127,"g":64,"b":49},"hsl":{"h":12,"s":44,"l":35},"hsb":{"h":12,"s":61,"b":50},"cmyk":{"c":"30","m":"80","y":"80","k":"45"}},"names":{"de":"Perlkupfer","en":"Pearl copper","fr":"Cuivre nacr\xe9","es":"Cobre perlado","it":"Rame perlato","nl":"Parelmoer koper"}},"9001":{"code":"9001","scope":"classic","img":"RAL 9001.png","color":{"hex":"#E9E0D2","websafe":"#ffcccc","rgb":{"r":233,"g":224,"b":210},"hsl":{"h":37,"s":34,"l":87},"hsb":{"h":37,"s":10,"b":91},"cmyk":{"c":"5","m":"5","y":"15","k":"0"}},"names":{"de":"Cremewei\xdf","en":"Cream","fr":"Blanc cr\xe8me","es":"Blanco crema","it":"Bianco crema","nl":"Cr\xe8mewit"}},"9002":{"code":"9002","scope":"classic","img":"RAL 9002.png","color":{"hex":"#D7D5CB","websafe":"#cccccc","rgb":{"r":215,"g":213,"b":203},"hsl":{"h":50,"s":13,"l":82},"hsb":{"h":50,"s":6,"b":84},"cmyk":{"c":"0","m":"0","y":"10","k":"10"}},"names":{"de":"Grauwei\xdf","en":"Grey white","fr":"Blanc gris","es":"Blanco gris\xe1ceo","it":"Bianco grigiastro","nl":"Grijswit"}},"9003":{"code":"9003","scope":"classic","img":"RAL 9003.png","color":{"hex":"#ECECE7","websafe":"#ffffff","rgb":{"r":236,"g":236,"b":231},"hsl":{"h":60,"s":12,"l":92},"hsb":{"h":60,"s":2,"b":93},"cmyk":{"c":"0","m":"0","y":"0","k":"0"}},"names":{"de":"Signalwei\xdf","en":"Signal white","fr":"Blanc de s\xe9curit\xe9","es":"Blanco se\xf1ales","it":"Bianco segnale","nl":"Signaalwit"}},"9004":{"code":"9004","scope":"classic","img":"RAL 9004.png","color":{"hex":"#2B2B2C","websafe":"#333333","rgb":{"r":43,"g":43,"b":44},"hsl":{"h":240,"s":1,"l":17},"hsb":{"h":240,"s":2,"b":17},"cmyk":{"c":"35","m":"50","y":"40","k":"90"}},"names":{"de":"Signalschwarz","en":"Signal black","fr":"Noir de s\xe9curit\xe9","es":"Negro se\xf1ales","it":"Nero segnale","nl":"Signaalzwart"}},"9005":{"code":"9005","scope":"classic","img":"RAL 9005.png","color":{"hex":"#0E0E10","websafe":"#000000","rgb":{"r":14,"g":14,"b":16},"hsl":{"h":240,"s":7,"l":6},"hsb":{"h":240,"s":13,"b":6},"cmyk":{"c":"100","m":"40","y":"50","k":"90"}},"names":{"de":"Tiefschwarz","en":"Jet black","fr":"Noir fonc\xe9","es":"Negro intenso","it":"Nero intenso","nl":"Gitzwart"}},"9006":{"code":"9006","scope":"classic","img":"RAL 9006.png","color":{"hex":"#A1A1A0","websafe":"#999999","rgb":{"r":161,"g":161,"b":160},"hsl":{"h":60,"s":1,"l":63},"hsb":{"h":60,"s":1,"b":63},"cmyk":{"c":"35","m":"30","y":"30","k":"10"}},"names":{"de":"Wei\xdfaluminium","en":"White aluminium","fr":"Aluminium blanc","es":"Aluminio blanco","it":"Alluminio brillante","nl":"Blank aluminiumkleurig"}},"9007":{"code":"9007","scope":"classic","img":"RAL 9007.png","color":{"hex":"#878581","websafe":"#999999","rgb":{"r":135,"g":133,"b":129},"hsl":{"h":40,"s":2,"l":52},"hsb":{"h":40,"s":4,"b":53},"cmyk":{"c":"35","m":"30","y":"30","k":"15"}},"names":{"de":"Graualuminium","en":"Grey aluminium","fr":"Aluminium gris","es":"Aluminio gris","it":"Alluminio grigiastro","nl":"Grijs aluminiumkleurig"}},"9010":{"code":"9010","scope":"classic","img":"RAL 9010.png","color":{"hex":"#F1ECE1","websafe":"#ffffcc","rgb":{"r":241,"g":236,"b":225},"hsl":{"h":41,"s":36,"l":91},"hsb":{"h":41,"s":7,"b":95},"cmyk":{"c":"0","m":"0","y":"5","k":"0"}},"names":{"de":"Reinwei\xdf","en":"Pure white","fr":"Blanc pur","es":"Blanco puro","it":"Bianco puro","nl":"Zuiver wit"}},"9011":{"code":"9011","scope":"classic","img":"RAL 9011.png","color":{"hex":"#27292B","websafe":"#333333","rgb":{"r":39,"g":41,"b":43},"hsl":{"h":210,"s":5,"l":16},"hsb":{"h":210,"s":9,"b":17},"cmyk":{"c":"60","m":"45","y":"30","k":"90"}},"names":{"de":"Graphitschwarz","en":"Graphite black","fr":"Noir graphite","es":"Negro grafito","it":"Nero grafite","nl":"Grafietzwart"}},"9016":{"code":"9016","scope":"classic","img":"RAL 9016.png","color":{"hex":"#F1F0EA","websafe":"#ffffff","rgb":{"r":241,"g":240,"b":234},"hsl":{"h":51,"s":20,"l":93},"hsb":{"h":51,"s":3,"b":95},"cmyk":{"c":"0","m":"0","y":"5","k":"0"}},"names":{"de":"Verkehrswei\xdf","en":"Traffic white","fr":"Blanc signalisation","es":"Blanco tr\xe1fico","it":"Bianco traffico","nl":"Verkeerswit"}},"9017":{"code":"9017","scope":"classic","img":"RAL 9017.png","color":{"hex":"#2A292A","websafe":"#333333","rgb":{"r":42,"g":41,"b":42},"hsl":{"h":300,"s":1,"l":16},"hsb":{"h":300,"s":2,"b":16},"cmyk":{"c":"50","m":"30","y":"50","k":"100"}},"names":{"de":"Verkehrsschwarz","en":"Traffic black","fr":"Noir signalisation","es":"Negro tr\xe1fico","it":"Nero traffico","nl":"Verkeerszwart"}},"9018":{"code":"9018","scope":"classic","img":"RAL 9018.png","color":{"hex":"#C8CBC4","websafe":"#cccccc","rgb":{"r":200,"g":203,"b":196},"hsl":{"h":86,"s":6,"l":78},"hsb":{"h":86,"s":3,"b":80},"cmyk":{"c":"10","m":"5","y":"15","k":"10"}},"names":{"de":"Papyruswei\xdf","en":"Papyrus white","fr":"Blanc papyrus","es":"Blanco papiro","it":"Bianco papiro","nl":"Papyruswit"}},"9022":{"code":"9022","scope":"classic","img":"RAL 9022.png","color":{"hex":"#858583","websafe":"#999999","rgb":{"r":133,"g":133,"b":131},"hsl":{"h":60,"s":1,"l":52},"hsb":{"h":60,"s":2,"b":52},"cmyk":{"c":"35","m":"30","y":"30","k":"20"}},"names":{"de":"Perlhellgrau","en":"Pearl light grey","fr":"Gris clair nacr\xe9","es":"Gris claro perlado","it":"Grigio chiaro perlato","nl":"Parelmoer lichtgrijs"}},"9023":{"code":"9023","scope":"classic","img":"RAL 9023.png","color":{"hex":"#797B7A","websafe":"#666666","rgb":{"r":121,"g":123,"b":122},"hsl":{"h":150,"s":1,"l":48},"hsb":{"h":150,"s":2,"b":48},"cmyk":{"c":"15","m":"10","y":"10","k":"50"}},"names":{"de":"Perldunkelgrau","en":"Pearl dark grey","fr":"Gris fon\xe7\xe9 nacr\xe9","es":"Gris oscuro perlado","it":"Grigio scuro perlato","nl":"Parelmoer donkergrijs"}}}');
function aB() {
const {colorPickerOpened: e, setColorPickerOpened: t, setFrameType: n, setCustomFrameType: r} = (0,
i.useContext)($A)
, [s,a] = (0,
i.useState)("")
, o = sB;
let l = [];
for (const [i,c] of Object.entries(o))
l.push(c);
return s && (l = l.filter((e => e.code.startsWith(s.toLowerCase().trim())))),
(0,
Ig.jsxs)("div", {
className: "absolute bg-neutral-200 bottom-0 left-[108px] flex flex-col " + (e ? "" : "hidden"),
style: {
width: "180px"
},
children: [(0,
Ig.jsxs)("div", {
className: "bg-gray-200 p-2 text-xs flex flex-row items-center",
children: [(0,
Ig.jsx)("div", {
children: "Color selector"
}), (0,
Ig.jsx)("div", {
className: "ml-auto",
children: (0,
Ig.jsx)(rB, {
className: "cursor-pointer",
onClick: () => t(!1),
size: "16px"
})
})]
}), (0,
Ig.jsxs)("div", {
className: "p-1 flex flex-col gap-2",
children: [(0,
Ig.jsxs)("div", {
className: "relative",
children: [(0,
Ig.jsx)("span", {
className: "absolute inset-y-0 left-0 flex items-center pl-2",
children: (0,
Ig.jsx)(iB, {
className: "text-gray-300"
})
}), (0,
Ig.jsx)("input", {
value: s,
onChange: e => a(e.target.value),
type: "text",
placeholder: "RAL code",
className: "pl-8 pr-2 py-1 border border-gray-300 rounded bg-white text-xs w-full"
})]
}), (0,
Ig.jsx)("div", {
className: "",
style: {
overflowY: "scroll",
maxHeight: "350px"
},
children: (0,
Ig.jsx)("div", {
className: "flex flex-row flex-wrap gap-1",
children: l.map((e => (0,
Ig.jsx)("div", {
onClick: () => {
n("./images/custom_colors/".concat(e.img)),
r({
name: e.names.en,
color: e.color.hex
}),
t(!1)
}
,
className: "flex h-5 w-9 text-xs items-center justify-center text-white cursor-pointer",
style: {
background: e.color.hex
},
children: e.code
}, e.code)))
})
})]
})]
})
}
const oB = [{
id: "",
title: "RAL 9005 fijn structuur",
imgUrl: "./images/doortypes/RAL 9005 fijn structuur.png"
}, {
id: "",
title: "RAL 9004 fijn structuur",
imgUrl: "./images/doortypes/RAL 9004 fijn structuur.png"
}, {
id: "",
title: "RAL 7021 structuur",
imgUrl: "./images/doortypes/RAL 7021 structuur.png"
}, {
id: "",
title: "RAL 7016 structuur",
imgUrl: "./images/doortypes/RAL 7016 structuur.png"
}, {
id: "",
title: "RAL 9010 structuur",
imgUrl: "./images/doortypes/RAL 9010 structuur.png"
}, {
id: "",
title: "RAL 9016 structuur",
imgUrl: "./images/doortypes/RAL 9016 structuur.png"
}, {
id: "",
title: "Anodic brown",
imgUrl: "./images/doortypes/Anodic brown.png"
}, {
id: "",
title: "Sterling",
imgUrl: "./images/doortypes/Sterling.png"
}, {
id: "",
title: "Nobble bronze",
imgUrl: "./images/doortypes/Nobble bronze.png"
}, {
id: "",
title: "Halo 1036",
imgUrl: "./images/doortypes/Halo 1036.png"
}, {
id: "",
title: "Halo 1037",
imgUrl: "./images/doortypes/Halo 1037.png"
}, {
id: "",
title: "Anodic bronze",
imgUrl: "./images/doortypes/Anodic_bronze.png"
}];
function lB() {
const {settype: e, type: t, setStep: n, door: r, setdoor: s, frameSize: a, setFrameSize: o, glassType: l, setGlassType: c, frameType: u, setFrameType: d, handle: h, setHandle: p, attachDesign: f, setAttachDesign: m, setColorPickerOpened: g, customFrameType: v, setCustomFrameType: y, setCompositionImage: x} = (0,
i.useContext)($A);
return (0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsx)("div", {
style: {
width: "100%",
position: "relative"
},
children: (0,
Ig.jsx)("div", {
style: {
marginLeft: "5%",
paddingTop: "0.5rem",
display: "flex",
justifyContent: "space-between",
alignItems: "center",
fontWeight: "bolder",
fontSize: "normal"
},
children: (0,
Ig.jsx)(VR, {
title: "Design"
})
})
}), (0,
Ig.jsx)("div", {
style: {
display: "flex",
justifyContent: "center",
borderBottom: "1px solid #d1d1d1"
},
children: (0,
Ig.jsxs)("div", {
className: "door-content-2-1",
style: {
display: "grid",
gridTemplateColumns: "repeat(3, 1fr)",
gridTemplateRows: "repeat(6, 1fr)",
gridColumnGap: "10px",
gridRowGap: "10px",
margin: "5%",
maxWidth: "90%"
},
children: [(0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
onClick: () => {
s("george"),
x("https://config.livingsteel.nl/images/doortypes/1%20panel.png")
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: "george" === r ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px",
overflow: "hidden",
boxShadow: "george" === r ? "none" : "rgba(0, 0, 0, 0.6) -5px -2px 10px -2px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: "george" == r,
readOnly: !0,
onChange: () => s("george")
})
}), (0,
Ig.jsx)("img", {
src: "./images/doortypes/1 panel.png",
style: {
maxWidth: "100%",
maxHeight: "100%"
}
})]
}), (0,
Ig.jsxs)("div", {
style: {
margin: "10px 0 0 0",
backgroundColor: "george" === r ? "black" : "#bdc79d",
color: "white",
position: "relative",
paddingTop: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center"
},
children: "1 paneel"
})]
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
onClick: () => {
s("2panel"),
x("https://config.livingsteel.nl/images/doortypes/2%20panel.png")
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: "2panel" === r ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px",
overflow: "hidden",
boxShadow: "2panel" === r ? "none" : "rgba(0, 0, 0, 0.6) -5px -2px 10px -2px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: "2panel" == r,
readOnly: !0,
onChange: () => {
s("2panel"),
x("https://config.livingsteel.nl/images/doortypes/2%20panel.png")
}
})
}), (0,
Ig.jsx)("img", {
src: "./images/doortypes/2 panel.png",
style: {
maxWidth: "100%",
maxHeight: "100%",
width: "100%"
}
})]
}), (0,
Ig.jsxs)("div", {
style: {
margin: "10px 0 0 0",
backgroundColor: "2panel" === r ? "black" : "#bdc79d",
color: "white",
position: "relative",
paddingTop: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center"
},
children: "2 panelen"
})]
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
onClick: () => {
s("3panel"),
x("https://config.livingsteel.nl/images/doortypes/3%20panel.png")
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: "3panel" === r ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px",
overflow: "hidden",
boxShadow: "3panel" === r ? "none" : "rgba(0, 0, 0, 0.6) -5px -2px 10px -2px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: "/3panel" == r,
readOnly: !0,
onChange: () => {
s("3panel"),
x("https://config.livingsteel.nl/images/doortypes/3%20panel.png")
}
})
}), (0,
Ig.jsx)("img", {
src: "./images/doortypes/3 panel.png",
style: {
maxWidth: "100%",
maxHeight: "100%"
}
})]
}), (0,
Ig.jsxs)("div", {
style: {
margin: "10px 0 0 0",
backgroundColor: "3panel" === r ? "black" : "#bdc79d",
color: "white",
position: "relative",
paddingTop: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center"
},
children: "3 panelen"
})]
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
onClick: () => {
s("4panel"),
x("https://config.livingsteel.nl/images/doortypes/4%20panel.png")
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: "4panel" === r ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px",
overflow: "hidden",
boxShadow: "4panel" === r ? "none" : "rgba(0, 0, 0, 0.6) -5px -2px 10px -2px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: "4panel" == r,
readOnly: !0,
onChange: () => {
s("4panel"),
x("https://config.livingsteel.nl/images/doortypes/4%20panel.png")
}
})
}), (0,
Ig.jsx)("img", {
src: "./images/doortypes/4 panel.png",
style: {
maxWidth: "100%",
maxHeight: "100%"
}
})]
}), (0,
Ig.jsxs)("div", {
style: {
margin: "10px 0 0 0",
backgroundColor: "4panel" === r ? "black" : "#bdc79d",
color: "white",
position: "relative",
paddingTop: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center"
},
children: "4 panelen"
})]
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
onClick: () => {
s("3pannel"),
x("https://config.livingsteel.nl/images/doortypes/3-pannel.png")
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: "3pannel" === r ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px",
overflow: "hidden",
boxShadow: "3pannel" === r ? "none" : "rgba(0, 0, 0, 0.6) -5px -2px 10px -2px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: "3pannel" == r,
readOnly: !0,
onChange: () => {
s("3pannel"),
x("https://config.livingsteel.nl/images/doortypes/3-pannel.png")
}
})
}), (0,
Ig.jsx)("img", {
src: "./images/doortypes/3-pannel.png",
style: {
maxWidth: "100%",
maxHeight: "100%"
}
})]
}), (0,
Ig.jsxs)("div", {
style: {
margin: "10px 0 0 0",
backgroundColor: "dt6" === r ? "black" : "#bdc79d",
color: "white",
position: "relative",
paddingTop: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center"
},
children: "3 panelen ongelijk plus"
})]
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
onClick: () => {
s("annelot"),
x("https://config.livingsteel.nl/images/doortypes/annelot.png")
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: "annelot" === r ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px",
overflow: "hidden",
boxShadow: "annelot" === r ? "none" : "rgba(0, 0, 0, 0.6) -5px -2px 10px -2px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: "annelot" == r,
readOnly: !0,
onChange: () => {
s("annelot"),
x("https://config.livingsteel.nl/images/doortypes/annelot.png")
}
})
}), (0,
Ig.jsx)("img", {
src: "./images/doortypes/annelot.png",
style: {
maxWidth: "100%",
maxHeight: "100%"
}
})]
}), (0,
Ig.jsxs)("div", {
style: {
margin: "10px 0 0 0",
backgroundColor: "annelot" === r ? "black" : "#bdc79d",
color: "white",
position: "relative",
paddingTop: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center"
},
children: "Annelot"
})]
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
onClick: () => {
s("notaris"),
x("https://config.livingsteel.nl/images/doortypes/dt6.png")
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: "notaris" === r ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px",
overflow: "hidden",
boxShadow: "notaris" === r ? "none" : "rgba(0, 0, 0, 0.6) -5px -2px 10px -2px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: "notaris" == r,
readOnly: !0,
onChange: () => {
s("notaris"),
x("https://config.livingsteel.nl/images/doortypes/dt6.png")
}
})
}), (0,
Ig.jsx)("img", {
src: "./images/doortypes/dt6.png",
style: {
maxWidth: "100%",
maxHeight: "100%"
}
})]
}), (0,
Ig.jsxs)("div", {
style: {
margin: "10px 0 0 0",
backgroundColor: "notaris" === r ? "black" : "#bdc79d",
color: "white",
position: "relative",
paddingTop: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center"
},
children: "Notaris"
})]
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
onClick: () => {
s("boerderij"),
x("https://config.livingsteel.nl/images/doortypes/boerderij.png")
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: "boerderij" === r ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px",
overflow: "hidden",
boxShadow: "boerderij" === r ? "none" : "rgba(0, 0, 0, 0.6) -5px -2px 10px -2px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: "boerderij" == r,
readOnly: !0,
onChange: () => {
s("boerderij"),
x("https://config.livingsteel.nl/images/doortypes/boerderij.png")
}
})
}), (0,
Ig.jsx)("img", {
src: "./images/doortypes/boerderij.png",
style: {
maxWidth: "100%",
maxHeight: "100%"
}
})]
}), (0,
Ig.jsxs)("div", {
style: {
margin: "10px 0 0 0",
backgroundColor: "boerderij" === r ? "black" : "#bdc79d",
color: "white",
position: "relative",
paddingTop: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center"
},
children: "Boerderij"
})]
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
onClick: () => {
s("herenhuis"),
x("https://config.livingsteel.nl/images/doortypes/herenhuis.png")
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: "herenhuis" === r ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px",
overflow: "hidden",
boxShadow: "herenhuis" === r ? "none" : "rgba(0, 0, 0, 0.6) -5px -2px 10px -2px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: "herenhuis" == r,
readOnly: !0,
onChange: () => {
s("herenhuis"),
x("https://config.livingsteel.nl/images/doortypes/herenhuis.png")
}
})
}), (0,
Ig.jsx)("img", {
src: "./images/doortypes/herenhuis.png",
style: {
maxWidth: "100%",
maxHeight: "100%"
}
})]
}), (0,
Ig.jsxs)("div", {
style: {
margin: "10px 0 0 0",
backgroundColor: "herenhuis" === r ? "black" : "#bdc79d",
color: "white",
position: "relative",
paddingTop: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center"
},
children: "Herenhuis"
})]
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
onClick: () => {
s("rond"),
x("https://config.livingsteel.nl/images/doortypes/round.png")
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: "rond" === r ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px",
overflow: "hidden",
boxShadow: "rond" === r ? "none" : "rgba(0, 0, 0, 0.6) -5px -2px 10px -2px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: "rond" == r,
readOnly: !0,
onChange: () => {
s("rond"),
x("https://config.livingsteel.nl/images/doortypes/round.png")
}
})
}), (0,
Ig.jsx)("img", {
src: "./images/doortypes/round.png",
style: {
maxWidth: "100%",
maxHeight: "100%"
}
})]
}), (0,
Ig.jsxs)("div", {
style: {
margin: "10px 0 0 0",
backgroundColor: "rond" === r ? "black" : "#bdc79d",
color: "white",
position: "relative",
paddingTop: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center"
},
children: "Rond"
})]
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
onClick: () => {
s("rondPlus"),
x("https://config.livingsteel.nl/images/doortypes/dt8.png")
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: "rondPlus" === r ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px",
overflow: "hidden",
boxShadow: "rondPlus" === r ? "none" : "rgba(0, 0, 0, 0.6) -5px -2px 10px -2px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: "rondPlus" == r,
readOnly: !0,
onChange: () => {
s("rondPlus"),
x("https://config.livingsteel.nl/images/doortypes/dt8.png")
}
})
}), (0,
Ig.jsx)("img", {
src: "./images/doortypes/dt8.png",
style: {
maxWidth: "100%",
maxHeight: "100%"
}
})]
}), (0,
Ig.jsxs)("div", {
style: {
margin: "10px 0 0 0",
backgroundColor: "rondPlus" === r ? "black" : "#bdc79d",
color: "white",
position: "relative",
paddingTop: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center"
},
children: "Rond Plus"
})]
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
onClick: () => {
s("low-deep"),
x("https://config.livingsteel.nl/images/doortypes/low-deep.png")
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: "low-deep" === r ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px",
overflow: "hidden",
boxShadow: "low-deep" === r ? "none" : "rgba(0, 0, 0, 0.6) -5px -2px 10px -2px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: "low-deep" == r,
readOnly: !0,
onChange: () => {
s("low-deep"),
x("https://config.livingsteel.nl/images/doortypes/low-deep.png")
}
})
}), (0,
Ig.jsx)("img", {
src: "./images/doortypes/low-deep.png",
style: {
maxWidth: "100%",
maxHeight: "100%"
}
})]
}), (0,
Ig.jsxs)("div", {
style: {
margin: "10px 0 0 0",
backgroundColor: "low-deep" === r ? "black" : "#bdc79d",
color: "white",
position: "relative",
paddingTop: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center"
},
children: "Low Deep"
})]
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
onClick: () => {
s("rivera"),
x("https://config.livingsteel.nl/images/doortypes/dt10.png")
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: "rivera" === r ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px",
overflow: "hidden",
boxShadow: "rivera" === r ? "none" : "rgba(0, 0, 0, 0.6) -5px -2px 10px -2px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: "rivera" == r,
readOnly: !0,
onChange: () => {
s("rivera"),
x("https://config.livingsteel.nl/images/doortypes/dt10.png")
}
})
}), (0,
Ig.jsx)("img", {
src: "./images/doortypes/dt10.png",
style: {
maxWidth: "100%",
maxHeight: "100%"
}
})]
}), (0,
Ig.jsxs)("div", {
style: {
margin: "10px 0 0 0",
backgroundColor: "rivera" === r ? "black" : "#bdc79d",
color: "white",
position: "relative",
paddingTop: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center"
},
children: "Rivera"
})]
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
onClick: () => {
s("porto"),
x("https://config.livingsteel.nl/images/doortypes/dt9.png")
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: "porto" === r ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px",
overflow: "hidden",
boxShadow: "porto" === r ? "none" : "rgba(0, 0, 0, 0.6) -5px -2px 10px -2px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: "porto" == r,
readOnly: !0,
onChange: () => {
s("porto"),
x("https://config.livingsteel.nl/images/doortypes/dt9.png")
}
})
}), (0,
Ig.jsx)("img", {
src: "./images/doortypes/dt9.png",
style: {
maxWidth: "100%",
maxHeight: "100%"
}
})]
}), (0,
Ig.jsxs)("div", {
style: {
margin: "10px 0 0 0",
backgroundColor: "porto" === r ? "black" : "#bdc79d",
color: "white",
position: "relative",
paddingTop: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center"
},
children: "Porto"
})]
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
onClick: () => {
s("toog"),
x("https://config.livingsteel.nl/images/doortypes/toog.png")
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: "toog" === r ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px",
overflow: "hidden",
boxShadow: "toog" === r ? "none" : "rgba(0, 0, 0, 0.6) -5px -2px 10px -2px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: "toog" == r,
readOnly: !0,
onChange: () => {
s("toog"),
x("https://config.livingsteel.nl/images/doortypes/toog.png")
}
})
}), (0,
Ig.jsx)("img", {
src: "./images/doortypes/toog.png",
style: {
maxWidth: "100%",
maxHeight: "100%"
}
})]
}), (0,
Ig.jsxs)("div", {
style: {
margin: "10px 0 0 0",
backgroundColor: "toog" === r ? "black" : "#bdc79d",
color: "white",
position: "relative",
paddingTop: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center"
},
children: "Toog"
})]
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
onClick: () => {
s("toogPlus"),
x("https://config.livingsteel.nl/images/doortypes/dt9-right.png")
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: "toogPlus" === r ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px",
overflow: "hidden",
boxShadow: "toogPlus" === r ? "none" : "rgba(0, 0, 0, 0.6) -5px -2px 10px -2px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: "toogPlus" == r,
readOnly: !0,
onChange: () => {
s("toogPlus"),
x("https://config.livingsteel.nl/images/doortypes/dt9-right.png")
}
})
}), (0,
Ig.jsx)("img", {
src: "./images/doortypes/dt9-right.png",
style: {
maxWidth: "100%",
maxHeight: "100%"
}
})]
}), (0,
Ig.jsxs)("div", {
style: {
margin: "10px 0 0 0",
backgroundColor: "toogPlus" === r ? "black" : "#bdc79d",
color: "white",
position: "relative",
paddingTop: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center"
},
children: "Toog plus"
})]
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
onClick: () => {
s("boender"),
x("https://config.livingsteel.nl/images/doortypes/dt12.png")
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: "boender" === r ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px",
overflow: "hidden",
boxShadow: "boender" === r ? "none" : "rgba(0, 0, 0, 0.6) -5px -2px 10px -2px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: "boender" == r,
readOnly: !0,
onChange: () => {
s("boender"),
x("https://config.livingsteel.nl/images/doortypes/dt12.png")
}
})
}), (0,
Ig.jsx)("img", {
src: "./images/doortypes/dt12.png",
style: {
maxWidth: "100%",
maxHeight: "100%"
}
})]
}), (0,
Ig.jsxs)("div", {
style: {
margin: "10px 0 0 0",
backgroundColor: "boender" === r ? "black" : "#bdc79d",
color: "white",
position: "relative",
paddingTop: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center"
},
children: "Boender"
})]
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
onClick: () => {
s("contempera"),
x("https://config.livingsteel.nl/images/doortypes/contempera.png")
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: "contempera" === r ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px",
overflow: "hidden",
boxShadow: "contempera" === r ? "none" : "rgba(0, 0, 0, 0.6) -5px -2px 10px -2px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: "contempera" == r,
readOnly: !0,
onChange: () => {
s("contempera"),
x("https://config.livingsteel.nl/images/doortypes/contempera.png")
}
})
}), (0,
Ig.jsx)("img", {
src: "./images/doortypes/contempera.png",
style: {
maxWidth: "100%",
maxHeight: "100%"
}
})]
}), (0,
Ig.jsxs)("div", {
style: {
margin: "10px 0 0 0",
backgroundColor: "contempera" === r ? "black" : "#bdc79d",
color: "white",
position: "relative",
paddingTop: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center"
},
children: "Contempera"
})]
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
onClick: () => {
s("fabric"),
x("https://config.livingsteel.nl/images/doortypes/fabric.png")
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: "fabric" === r ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px",
overflow: "hidden",
boxShadow: "fabric" === r ? "none" : "rgba(0, 0, 0, 0.6) -5px -2px 10px -2px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: "fabric" == r,
readOnly: !0,
onChange: () => {
s("fabric"),
x("https://config.livingsteel.nl/images/doortypes/fabric.png")
}
})
}), (0,
Ig.jsx)("img", {
src: "./images/doortypes/fabric.png",
style: {
maxWidth: "100%",
maxHeight: "100%"
}
})]
}), (0,
Ig.jsxs)("div", {
style: {
margin: "10px 0 0 0",
backgroundColor: "fabric" === r ? "black" : "#bdc79d",
color: "white",
position: "relative",
paddingTop: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center"
},
children: "Fabric"
})]
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
onClick: () => {
s("dt13"),
x("https://config.livingsteel.nl/images/doortypes/dt13.png")
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: "dt13" === r ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px",
overflow: "hidden",
boxShadow: "dt13" === r ? "none" : "rgba(0, 0, 0, 0.6) -5px -2px 10px -2px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: "dt13" == r,
readOnly: !0,
onChange: () => {
s("dt13"),
x("https://config.livingsteel.nl/images/doortypes/dt13.png")
}
})
}), (0,
Ig.jsx)("img", {
src: "./images/doortypes/dt13.png",
style: {
maxWidth: "100%",
maxHeight: "100%"
}
})]
}), (0,
Ig.jsxs)("div", {
style: {
margin: "10px 0 0 0",
backgroundColor: "dt13" === r ? "black" : "#bdc79d",
color: "white",
position: "relative",
paddingTop: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center"
},
children: "Hoogh"
})]
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
onClick: () => {
s("larino"),
x("https://config.livingsteel.nl/images/doortypes/estonia.png")
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: "larino" === r ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px",
overflow: "hidden",
boxShadow: "larino" === r ? "none" : "rgba(0, 0, 0, 0.6) -5px -2px 10px -2px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: "larino" == r,
readOnly: !0,
onChange: () => {
s("larino"),
x("https://config.livingsteel.nl/images/doortypes/estonia.png")
}
})
}), (0,
Ig.jsx)("img", {
src: "./images/doortypes/estonia.png",
style: {
maxWidth: "100%",
maxHeight: "100%"
}
})]
}), (0,
Ig.jsxs)("div", {
style: {
margin: "10px 0 0 0",
backgroundColor: "estonia" === r ? "black" : "#bdc79d",
color: "white",
position: "relative",
paddingTop: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center"
},
children: "Larino"
})]
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
onClick: () => {
s("dt11"),
x("https://config.livingsteel.nl/images/doortypes/dt11.png")
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: "dt11" === r ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px",
overflow: "hidden",
boxShadow: "dt11" === r ? "none" : "rgba(0, 0, 0, 0.6) -5px -2px 10px -2px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: "dt11" == r,
readOnly: !0,
onChange: () => {
s("dt11"),
x("https://config.livingsteel.nl/images/doortypes/dt11.png")
}
})
}), (0,
Ig.jsx)("img", {
src: "./images/doortypes/dt11.png",
style: {
maxWidth: "100%",
maxHeight: "100%"
}
})]
}), (0,
Ig.jsxs)("div", {
style: {
margin: "10px 0 0 0",
backgroundColor: "dt11" === r ? "black" : "#bdc79d",
color: "white",
position: "relative",
paddingTop: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center"
},
children: "Mexico"
})]
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
onClick: () => {
s("parallel"),
x("https://config.livingsteel.nl/images/doortypes/dt5.png")
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: "parallel" === r ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px",
overflow: "hidden",
boxShadow: "parallel" === r ? "none" : "rgba(0, 0, 0, 0.6) -5px -2px 10px -2px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: "parallel" == r,
readOnly: !0,
onChange: () => {
s("parallel"),
x("https://config.livingsteel.nl/images/doortypes/dt5.png")
}
})
}), (0,
Ig.jsx)("img", {
src: "./images/doortypes/dt5.png",
style: {
maxWidth: "100%",
maxHeight: "100%"
}
})]
}), (0,
Ig.jsxs)("div", {
style: {
margin: "10px 0 0 0",
backgroundColor: "parallel" === r ? "black" : "#bdc79d",
color: "white",
position: "relative",
paddingTop: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center"
},
children: "Parallel"
})]
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
onClick: () => {
s("grandma"),
x("https://config.livingsteel.nl/images/doortypes/grandma.png")
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: "grandma" === r ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px",
overflow: "hidden",
boxShadow: "grandma" === r ? "none" : "rgba(0, 0, 0, 0.6) -5px -2px 10px -2px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: "grandma" == r,
readOnly: !0,
onChange: () => {
s("grandma"),
x("https://config.livingsteel.nl/images/doortypes/grandma.png")
}
})
}), (0,
Ig.jsx)("img", {
src: "./images/doortypes/grandma.png",
style: {
maxWidth: "100%",
maxHeight: "100%"
}
})]
}), (0,
Ig.jsxs)("div", {
style: {
margin: "10px 0 0 0",
backgroundColor: "grandma" === r ? "black" : "#bdc79d",
color: "white",
position: "relative",
paddingTop: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center"
},
children: "Grandma"
})]
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
onClick: () => {
s("kasteel"),
x("https://config.livingsteel.nl/images/doortypes/kasteel.png")
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: "kasteel" === r ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px",
overflow: "hidden",
boxShadow: "kasteel" === r ? "none" : "rgba(0, 0, 0, 0.6) -5px -2px 10px -2px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: "kasteel" == r,
readOnly: !0,
onChange: () => {
s("kasteel"),
x("https://config.livingsteel.nl/images/doortypes/kasteel.png")
}
})
}), (0,
Ig.jsx)("img", {
src: "./images/doortypes/kasteel.png",
style: {
maxWidth: "100%",
maxHeight: "100%"
}
})]
}), (0,
Ig.jsxs)("div", {
style: {
margin: "10px 0 0 0",
backgroundColor: "kasteel" === r ? "black" : "#bdc79d",
color: "white",
position: "relative",
paddingTop: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center"
},
children: "Kasteel"
})]
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
onClick: () => {
s("kathedraal"),
x("https://config.livingsteel.nl/images/doortypes/kathedraal.png")
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: "kathedraal" === r ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px",
overflow: "hidden",
boxShadow: "kathedraal" === r ? "none" : "rgba(0, 0, 0, 0.6) -5px -2px 10px -2px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: "kathedraal" == r,
readOnly: !0,
onChange: () => {
s("kathedraal"),
x("https://config.livingsteel.nl/images/doortypes/kathedraal.png")
}
})
}), (0,
Ig.jsx)("img", {
src: "./images/doortypes/kathedraal.png",
style: {
maxWidth: "100%",
maxHeight: "100%"
}
})]
}), (0,
Ig.jsxs)("div", {
style: {
margin: "10px 0 0 0",
backgroundColor: "kathedraal" === r ? "black" : "#bdc79d",
color: "white",
position: "relative",
paddingTop: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center"
},
children: "Kathedraal"
})]
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
onClick: () => {
s("the-judge"),
x("https://config.livingsteel.nl/images/doortypes/the-judge.png")
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: "the-judge" === r ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px",
overflow: "hidden",
boxShadow: "the-judge" === r ? "none" : "rgba(0, 0, 0, 0.6) -5px -2px 10px -2px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: "the-judge" == r,
readOnly: !0,
onChange: () => {
s("the-judge"),
x("https://config.livingsteel.nl/images/doortypes/the-judge.png")
}
})
}), (0,
Ig.jsx)("img", {
src: "./images/doortypes/the-judge.png",
style: {
maxWidth: "100%",
maxHeight: "100%"
}
})]
}), (0,
Ig.jsxs)("div", {
style: {
margin: "10px 0 0 0",
backgroundColor: "the-judge" === r ? "black" : "#bdc79d",
color: "white",
position: "relative",
paddingTop: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center"
},
children: "The Judge"
})]
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
onClick: () => {
s("prison"),
x("https://config.livingsteel.nl/images/doortypes/prison.png")
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: "prison" === r ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px",
overflow: "hidden",
boxShadow: "prison" === r ? "none" : "rgba(0, 0, 0, 0.6) -5px -2px 10px -2px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: "prison" == r,
readOnly: !0,
onChange: () => {
s("prison"),
x("https://config.livingsteel.nl/images/doortypes/prison.png")
}
})
}), (0,
Ig.jsx)("img", {
src: "./images/doortypes/prison.png",
style: {
maxWidth: "100%",
maxHeight: "100%"
}
})]
}), (0,
Ig.jsxs)("div", {
style: {
margin: "10px 0 0 0",
backgroundColor: "prison" === r ? "black" : "#bdc79d",
color: "white",
position: "relative",
paddingTop: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center"
},
children: "Prison"
})]
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
onClick: () => {
s("curved"),
x("https://config.livingsteel.nl/images/doortypes/curved.png")
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: "curved" === r ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px",
overflow: "hidden",
boxShadow: "curved" === r ? "none" : "rgba(0, 0, 0, 0.6) -5px -2px 10px -2px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: "curved" == r,
readOnly: !0,
onChange: () => {
s("curved"),
x("https://config.livingsteel.nl/images/doortypes/curved.png")
}
})
}), (0,
Ig.jsx)("img", {
src: "./images/doortypes/curved.png",
style: {
maxWidth: "100%",
maxHeight: "100%"
}
})]
}), (0,
Ig.jsxs)("div", {
style: {
margin: "10px 0 0 0",
backgroundColor: "curved" === r ? "black" : "#bdc79d",
color: "white",
position: "relative",
paddingTop: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center"
},
children: "Curved"
})]
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
onClick: () => {
s("lindsey"),
x("https://config.livingsteel.nl/images/doortypes/lindsey.png")
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: "lindsey" === r ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px",
overflow: "hidden",
boxShadow: "lindsey" === r ? "none" : "rgba(0, 0, 0, 0.6) -5px -2px 10px -2px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: "lindsey" == r,
readOnly: !0,
onChange: () => {
s("lindsey"),
x("https://config.livingsteel.nl/images/doortypes/lindsey.png")
}
})
}), (0,
Ig.jsx)("img", {
src: "./images/doortypes/lindsey.png",
style: {
maxWidth: "100%",
maxHeight: "100%"
}
})]
}), (0,
Ig.jsxs)("div", {
style: {
margin: "10px 0 0 0",
backgroundColor: "lindsey" === r ? "black" : "#bdc79d",
color: "white",
position: "relative",
paddingTop: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center"
},
children: "Lindsey"
})]
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
onClick: () => {
s("baku"),
x("https://config.livingsteel.nl/images/doortypes/baku.png")
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: "baku" === r ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px",
overflow: "hidden",
boxShadow: "baku" === r ? "none" : "rgba(0, 0, 0, 0.6) -5px -2px 10px -2px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: "baku" == r,
readOnly: !0,
onChange: () => {
s("baku"),
x("https://config.livingsteel.nl/images/doortypes/baku.png")
}
})
}), (0,
Ig.jsx)("img", {
src: "./images/doortypes/baku.png",
style: {
maxWidth: "100%",
maxHeight: "100%"
}
})]
}), (0,
Ig.jsxs)("div", {
style: {
margin: "10px 0 0 0",
backgroundColor: "baku" === r ? "black" : "#bdc79d",
color: "white",
position: "relative",
paddingTop: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center"
},
children: "Baku"
})]
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
onClick: () => {
s("supreme"),
x("https://config.livingsteel.nl/images/doortypes/supreme.png")
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: "supreme" === r ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px",
overflow: "hidden",
boxShadow: "supreme" === r ? "none" : "rgba(0, 0, 0, 0.6) -5px -2px 10px -2px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: "supreme" == r,
readOnly: !0,
onChange: () => {
s("supreme"),
x("https://config.livingsteel.nl/images/doortypes/supreme.png")
}
})
}), (0,
Ig.jsx)("img", {
src: "./images/doortypes/supreme.png",
style: {
maxWidth: "100%",
maxHeight: "100%"
}
})]
}), (0,
Ig.jsxs)("div", {
style: {
margin: "10px 0 0 0",
backgroundColor: "supreme" === r ? "black" : "#bdc79d",
color: "white",
position: "relative",
paddingTop: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center"
},
children: "Supreme"
})]
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
onClick: () => {
s("ultimate"),
x("https://config.livingsteel.nl/images/doortypes/ultimate.png")
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: "ultimate" === r ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px",
overflow: "hidden",
boxShadow: "ultimate" === r ? "none" : "rgba(0, 0, 0, 0.6) -5px -2px 10px -2px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: "ultimate" == r,
readOnly: !0,
onChange: () => {
s("ultimate"),
x("https://config.livingsteel.nl/images/doortypes/ultimate.png")
}
})
}), (0,
Ig.jsx)("img", {
src: "./images/doortypes/ultimate.png",
style: {
maxWidth: "100%",
maxHeight: "100%"
}
})]
}), (0,
Ig.jsxs)("div", {
style: {
margin: "10px 0 0 0",
backgroundColor: "ultimate" === r ? "black" : "#bdc79d",
color: "white",
position: "relative",
paddingTop: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center"
},
children: "Ultimate"
})]
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
onClick: () => {
s("fisherman"),
x("https://config.livingsteel.nl/images/doortypes/fisherman.png")
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: "fisherman" === r ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px",
overflow: "hidden",
boxShadow: "fisherman" === r ? "none" : "rgba(0, 0, 0, 0.6) -5px -2px 10px -2px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: "fisherman" == r,
readOnly: !0,
onChange: () => {
s("fisherman"),
x("https://config.livingsteel.nl/images/doortypes/fisherman.png")
}
})
}), (0,
Ig.jsx)("img", {
src: "./images/doortypes/fisherman.png",
style: {
maxWidth: "100%",
maxHeight: "100%"
}
})]
}), (0,
Ig.jsxs)("div", {
style: {
margin: "10px 0 0 0",
backgroundColor: "fisherman" === r ? "black" : "#bdc79d",
color: "white",
position: "relative",
paddingTop: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center"
},
children: "Fisherman"
})]
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
onClick: () => {
s("primier"),
x("https://config.livingsteel.nl/images/doortypes/primier.png")
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: "primier" === r ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px",
overflow: "hidden",
boxShadow: "primier" === r ? "none" : "rgba(0, 0, 0, 0.6) -5px -2px 10px -2px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: "primier" == r,
readOnly: !0,
onChange: () => {
s("primier"),
x("https://config.livingsteel.nl/images/doortypes/primier.png")
}
})
}), (0,
Ig.jsx)("img", {
src: "./images/doortypes/primier.png",
style: {
maxWidth: "100%",
maxHeight: "100%"
}
})]
}), (0,
Ig.jsxs)("div", {
style: {
margin: "10px 0 0 0",
backgroundColor: "primier" === r ? "black" : "#bdc79d",
color: "white",
position: "relative",
paddingTop: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center"
},
children: "Primier"
})]
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
onClick: () => {
s("elite"),
x("https://config.livingsteel.nl/images/doortypes/elite.png")
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: "elite" === r ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px",
overflow: "hidden",
boxShadow: "elite" === r ? "none" : "rgba(0, 0, 0, 0.6) -5px -2px 10px -2px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: "elite" == r,
readOnly: !0,
onChange: () => {
s("elite"),
x("https://config.livingsteel.nl/images/doortypes/elite.png")
}
})
}), (0,
Ig.jsx)("img", {
src: "./images/doortypes/elite.png",
style: {
maxWidth: "100%",
maxHeight: "100%"
}
})]
}), (0,
Ig.jsxs)("div", {
style: {
margin: "10px 0 0 0",
backgroundColor: "elite" === r ? "black" : "#bdc79d",
color: "white",
position: "relative",
paddingTop: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center"
},
children: "Elite"
})]
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
children: [(0,
Ig.jsxs)("div", {
style: {
border: "custom" === r ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px",
overflow: "hidden",
aspectRatio: 1,
display: "flex",
justifyContent: "center",
alignItems: "center",
boxShadow: "custom" === r ? "none" : "rgba(0, 0, 0, 0.6) -5px -2px 10px -2px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: "custom" == r,
readOnly: !0
})
}), f ? (0,
Ig.jsx)("span", {
style: {
display: "block",
textAlign: "center",
fontSize: "12px",
fontWeight: 700,
fontFamily: "system-ui",
wordBreak: "break-all"
},
children: f.name
}) : (0,
Ig.jsx)("span", {
style: {
display: "block",
textAlign: "center",
fontSize: "54px",
fontWeight: 700,
fontFamily: "system-ui"
},
children: "?"
}), (0,
Ig.jsx)("input", {
type: "file",
name: "file",
id: "file",
onChange: e => {
const {files: t} = e.target;
console.log(t[0]),
m(t[0])
}
,
style: {
opacity: 0,
position: "absolute",
top: 0,
width: "100%",
height: "100%",
cursor: "pointer"
}
})]
}), (0,
Ig.jsxs)("div", {
style: {
margin: "10px 0 0 0",
backgroundColor: "custom" === r ? "black" : "#bdc79d",
color: "white",
position: "relative",
paddingTop: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center"
},
children: "Eigen design"
})]
})]
})]
})
}), (0,
Ig.jsx)("div", {
style: {
width: "100%"
},
children: (0,
Ig.jsx)("div", {
style: {
margin: "5%",
paddingTop: "0.5rem",
display: "flex",
justifyContent: "space-between",
alignItems: "center",
fontWeight: "bolder",
fontSize: "normal"
},
children: (0,
Ig.jsx)(VR, {
title: "Handgreep"
})
})
}), (0,
Ig.jsx)("div", {
style: {
display: "flex",
justifyContent: "center",
borderBottom: "1px solid #d1d1d1",
paddingBottom: "15px"
},
children: (0,
Ig.jsxs)("div", {
className: "door-content-2-1",
style: {
display: "grid",
gridTemplateColumns: "repeat(4, 1fr)",
gridTemplateRows: "repeat(2, 1fr)",
gridColumnGap: "10px",
gridRowGap: "10px",
margin: "5%",
marginTop: "0",
maxWidth: "90%"
},
children: [(0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
onClick: () => {
p(1)
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: 1 === h ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: 1 == h,
readOnly: !0,
onChange: () => p(1)
})
}), (0,
Ig.jsx)("img", {
src: "./images/doortypes/hoeklijn.png",
style: {
maxWidth: "100%",
maxHeight: "100%"
}
})]
}), (0,
Ig.jsxs)("div", {
className: "handle-title-box",
style: {
backgroundColor: 1 === h ? "black" : "#bdc79d"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#ffffff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center"
},
children: "Hoeklijn"
})]
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
onClick: () => {
p(2)
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: 2 === h ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: 2 == h,
readOnly: !0,
onChange: () => p(2)
})
}), (0,
Ig.jsx)("img", {
src: "./images/doortypes/hoeklijn_L.png",
style: {
maxWidth: "100%",
maxHeight: "100%"
}
})]
}), (0,
Ig.jsxs)("div", {
className: "handle-title-box",
style: {
backgroundColor: 2 === h ? "black" : "#bdc79d"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#ffffff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center"
},
children: "Beugel"
})]
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
onClick: () => {
p(3)
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: 3 === h ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: 3 == h,
readOnly: !0,
onChange: () => p(3)
})
}), (0,
Ig.jsx)("img", {
src: "./images/doortypes/koker_s.png",
style: {
maxWidth: "100%",
maxHeight: "100%"
}
})]
}), (0,
Ig.jsxs)("div", {
className: "handle-title-box",
style: {
backgroundColor: 3 === h ? "black" : "#bdc79d"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#ffffff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center"
},
children: "Circle M"
})]
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
onClick: () => {
p(4)
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: 4 === h ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: 4 == h,
readOnly: !0,
onChange: () => p(4)
})
}), (0,
Ig.jsx)("img", {
src: "./images/doortypes/koker_l.png",
style: {
maxWidth: "100%",
maxHeight: "100%"
}
})]
}), (0,
Ig.jsxs)("div", {
className: "handle-title-box",
style: {
backgroundColor: 4 === h ? "black" : "#bdc79d"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#ffffff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center"
},
children: "Circle L"
})]
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
onClick: () => {
p(5)
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: 5 === h ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: 5 == h,
readOnly: !0,
onChange: () => p(5)
})
}), (0,
Ig.jsx)("img", {
src: "./images/doortypes/hondla.png",
style: {
maxWidth: "100%",
maxHeight: "100%"
}
})]
}), (0,
Ig.jsxs)("div", {
className: "handle-title-box",
style: {
backgroundColor: 5 === h ? "black" : "#bdc79d"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#ffffff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center"
},
children: "Koker M"
})]
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
onClick: () => {
p(6)
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: 6 === h ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: 6 == h,
readOnly: !0,
onChange: () => p(6)
})
}), (0,
Ig.jsx)("img", {
src: "./images/doortypes/hondla_L.png",
style: {
maxWidth: "100%",
maxHeight: "100%"
}
})]
}), (0,
Ig.jsxs)("div", {
className: "handle-title-box",
style: {
backgroundColor: 6 === h ? "black" : "#bdc79d"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#ffffff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center"
},
children: "Koker L"
})]
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
onClick: () => {
p(7)
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: 7 === h ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: 7 == h,
readOnly: !0,
onChange: () => p(7)
})
}), (0,
Ig.jsx)("img", {
src: "./images/doortypes/SleeveM.png",
style: {
maxWidth: "100%",
maxHeight: "100%"
}
})]
}), (0,
Ig.jsxs)("div", {
className: "handle-title-box",
style: {
backgroundColor: 7 === h ? "black" : "#bdc79d"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#ffffff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center"
},
children: "Greeploos"
})]
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
onClick: () => {
p(8)
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: 8 === h ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: 8 == h,
readOnly: !0,
onChange: () => p(8)
})
}), (0,
Ig.jsx)("img", {
src: "./images/doortypes/SleeveL.png",
style: {
maxWidth: "100%",
maxHeight: "100%"
}
})]
}), (0,
Ig.jsxs)("div", {
className: "handle-title-box",
style: {
backgroundColor: 8 === h ? "black" : "#bdc79d"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#ffffff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center",
lineHeight: 1.1,
paddingTop: "5px"
},
children: "Handgreep met leer"
})]
})]
})]
})
}), (0,
Ig.jsx)("div", {
style: {
width: "100%"
},
children: (0,
Ig.jsx)("div", {
style: {
marginLeft: "5%",
marginTop: "5%",
display: "flex",
justifyContent: "space-between",
fontWeight: "bolder",
fontSize: "normal"
},
children: (0,
Ig.jsx)(VR, {
title: "Glas soort"
})
})
}), (0,
Ig.jsx)("div", {
style: {
display: "flex",
justifyContent: "center",
borderBottom: "1px solid #d1d1d1",
paddingBottom: "15px"
},
children: (0,
Ig.jsxs)("div", {
className: "door-content-2-1",
style: {
display: "grid",
gridTemplateColumns: "repeat(3, 1fr)",
gridTemplateRows: "1fr",
gridColumnGap: "10px",
gridRowGap: "10px",
margin: "5%",
maxWidth: "90%"
},
children: [(0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
onClick: () => {
c(1118481)
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: 1118481 === l ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px",
height: "105px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: 1118481 == l,
readOnly: !0,
onChange: () => c(1118481)
})
}), (0,
Ig.jsx)("img", {
src: "./images/doortypes/glas_soort_1.jpg",
style: {
maxWidth: "100%",
maxHeight: "100%",
objectFit: "cover"
}
})]
}), (0,
Ig.jsxs)("div", {
style: {
margin: "10px 0 0 0",
backgroundColor: 1118481 === l ? "black" : "#bdc79d",
color: "white",
position: "relative",
paddingTop: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center"
},
children: "Helderglas"
})]
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
onClick: () => {
c(395529)
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: 395529 === l ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px",
height: "105px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: 395529 == l,
readOnly: !0,
onChange: () => c(395529)
})
}), (0,
Ig.jsx)("img", {
src: "./images/doortypes/glas_soort_2.jpg",
style: {
maxWidth: "100%",
maxHeight: "100%",
objectFit: "cover"
}
})]
}), (0,
Ig.jsxs)("div", {
style: {
margin: "10px 0 0 0",
backgroundColor: 395529 === l ? "black" : "#bdc79d",
color: "white",
position: "relative",
paddingTop: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center"
},
children: "Rookglas"
})]
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
onClick: () => {
c(9992541)
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: 9992541 === l ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px",
height: "105px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: 9992541 == l,
readOnly: !0,
onChange: () => c(9992541)
})
}), (0,
Ig.jsx)("img", {
src: "./images/doortypes/glas_soort_3.jpg",
style: {
maxWidth: "100%",
maxHeight: "100%",
objectFit: "cover"
}
})]
}), (0,
Ig.jsxs)("div", {
style: {
margin: "10px 0 0 0",
backgroundColor: 9992541 === l ? "black" : "#bdc79d",
color: "white",
position: "relative",
paddingTop: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center"
},
children: "bronze"
})]
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
onClick: () => {
c(16777215)
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: 16777215 === l ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px",
height: "105px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: 16777215 == l,
readOnly: !0,
onChange: () => c(16777215)
})
}), (0,
Ig.jsx)("img", {
src: "./images/doortypes/glas_soort_4.png",
style: {
maxWidth: "100%",
maxHeight: "100%",
objectFit: "cover"
}
})]
}), (0,
Ig.jsxs)("div", {
style: {
margin: "10px 0 0 0",
backgroundColor: 16777215 === l ? "black" : "#bdc79d",
color: "white",
position: "relative",
paddingTop: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center"
},
children: "Melkglas"
})]
})]
})]
})
}), (0,
Ig.jsx)("div", {
style: {
width: "100%"
},
children: (0,
Ig.jsx)("div", {
style: {
marginLeft: "5%",
marginTop: "5%",
display: "flex",
justifyContent: "space-between",
alignItems: "center",
fontWeight: "bolder",
fontSize: "normal"
},
children: (0,
Ig.jsx)(VR, {
title: "Kleur"
})
})
}), (0,
Ig.jsx)("div", {
style: {
display: "flex",
justifyContent: "center"
},
children: (0,
Ig.jsxs)("div", {
className: "door-content-2-1",
style: {
display: "grid",
gridTemplateColumns: "repeat(3, 1fr)",
gridTemplateRows: "repeat(3, minmax(0, 1fr))",
gridColumnGap: "10px",
gridRowGap: "10px",
margin: "5%",
maxWidth: "90%",
position: "relative"
},
children: [oB.map(( (e, t) => (0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
onClick: () => {
d(e.imgUrl),
y({
name: "",
color: ""
})
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: u === e.imgUrl ? "2px solid black" : "2px solid transparent",
borderRadius: "5px",
height: "120px",
overflow: "hidden"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: u == e.imgUrl,
readOnly: !0,
onChange: () => {
d(e.imgUrl),
y({
name: "",
color: ""
})
}
})
}), (0,
Ig.jsx)("img", {
src: e.imgUrl,
style: {
maxWidth: "100%",
maxHeight: "100%",
width: "100%",
height: "100%",
objectFit: "cover"
}
})]
}), (0,
Ig.jsxs)("div", {
style: {
margin: "7px 0 0 0",
backgroundColor: u === e.imgUrl ? "black" : "#bdc79d",
color: "white",
position: "relative",
padding: "5px 5px 0",
height: "42px",
display: "flex",
justifyContent: "center",
alignItems: "center"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center",
lineHeight: 1.2
},
children: e.title
})]
})]
}, "stal_".concat(t)))), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
fontSize: "small"
},
onClick: () => {
g(!0)
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: "2px solid transparent",
borderRadius: "5px",
height: "120px",
overflow: "hidden",
position: "relative"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: !1,
readOnly: !0
})
}), (0,
Ig.jsx)("span", {
style: {
position: "absolute",
left: 0,
top: "50%",
width: "100%",
textAlign: "center",
transform: "translateY(-50%)"
},
children: "Kies RAL kleur"
}), "" !== v.name && (0,
Ig.jsx)("img", {
src: u,
style: {
maxWidth: "100%",
maxHeight: "100%",
width: "100%",
height: "100%",
objectFit: "cover"
}
})]
}), (0,
Ig.jsxs)("div", {
style: {
margin: "7px 0 0 0",
backgroundColor: "#bdc79d",
color: "white",
position: "relative",
padding: "5px 5px 0",
height: "42px",
display: "flex",
justifyContent: "center",
alignItems: "center"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center",
lineHeight: 1.2
},
children: "Custom"
})]
})]
}), (0,
Ig.jsx)(aB, {})]
})
}), (0,
Ig.jsx)("button", {
className: "volgende btn",
onClick: () => {
n("extra")
}
,
children: "Volgende"
})]
})
}
function cB(e) {
let {techInformation: t} = e;
return (0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsx)("div", {
style: {
width: "100%"
},
children: (0,
Ig.jsx)("div", {
style: {
margin: "2% 5% 2% 5%",
paddingTop: "0.5rem",
display: "flex",
justifyContent: "space-between",
fontWeight: "bolder",
fontSize: "normal"
},
children: (0,
Ig.jsx)("span", {
children: "Technische informatie"
})
})
}), (0,
Ig.jsx)("div", {
style: {
width: "100%"
},
children: (0,
Ig.jsx)("div", {
style: {
margin: "2% 5% 2% 5%",
paddingTop: "0.5rem",
fontWeight: "bolder",
fontSize: "normal",
borderBottom: "1px solid GrayText"
},
children: (0,
Ig.jsxs)("div", {
style: {
display: "flex",
justifyContent: "space-between"
},
children: [(0,
Ig.jsx)("div", {
children: (0,
Ig.jsx)("span", {
style: {
fontSize: "14px",
color: "GrayText",
fontWeight: "bold"
},
children: "Deur type"
})
}), (0,
Ig.jsx)("span", {
children: t.type
})]
})
})
}), (0,
Ig.jsx)("div", {
style: {
width: "100%",
marginTop: "15px"
},
children: (0,
Ig.jsx)("div", {
style: {
margin: "2% 5% 2% 5%",
paddingTop: "0.5rem",
fontWeight: "bolder",
fontSize: "normal",
borderBottom: "1px solid GrayText"
},
children: (0,
Ig.jsxs)("div", {
style: {
display: "flex",
justifyContent: "space-between"
},
children: [(0,
Ig.jsx)("span", {
style: {
fontSize: "14px",
color: "GrayText",
fontWeight: "bold"
},
children: "Samenstelling deur"
}), (0,
Ig.jsx)("span", {
children: t.doorConfig
})]
})
})
}), (0,
Ig.jsx)("div", {
style: {
width: "100%",
marginTop: "15px"
},
children: (0,
Ig.jsx)("div", {
style: {
margin: "2% 5% 2% 5%",
paddingTop: "0.5rem",
fontWeight: "bolder",
fontSize: "normal",
borderBottom: "1px solid GrayText"
},
children: (0,
Ig.jsxs)("div", {
style: {
display: "flex",
justifyContent: "space-between"
},
children: [(0,
Ig.jsx)("span", {
style: {
fontSize: "14px",
color: "GrayText",
fontWeight: "bold"
},
children: "Samenstelling zijpaneel"
}), (0,
Ig.jsx)("span", {
children: t.sidePannel
})]
})
})
}), (0,
Ig.jsx)("div", {
style: {
width: "100%",
marginTop: "15px"
},
children: (0,
Ig.jsx)("div", {
style: {
margin: "2% 5% 2% 5%",
paddingTop: "0.5rem",
fontWeight: "bolder",
fontSize: "normal",
borderBottom: "1px solid GrayText"
},
children: (0,
Ig.jsxs)("div", {
style: {
display: "flex",
justifyContent: "space-between"
},
children: [(0,
Ig.jsx)("span", {
style: {
fontSize: "14px",
color: "GrayText",
fontWeight: "bold"
},
children: "Paneel verdeling"
}), (0,
Ig.jsx)("span", {
children: t.sidePannelConfig
})]
})
})
}), "eigen maat" === t.sidePannelConfig && (0,
Ig.jsx)("div", {
style: {
width: "100%",
marginTop: "15px"
},
children: (0,
Ig.jsx)("div", {
style: {
margin: "2% 5% 2% 5%",
paddingTop: "0.5rem",
fontWeight: "bolder",
fontSize: "normal",
borderBottom: "1px solid GrayText"
},
children: (0,
Ig.jsxs)("div", {
style: {
display: "flex",
justifyContent: "space-between"
},
children: [(0,
Ig.jsx)("span", {
style: {
fontSize: "14px",
color: "GrayText",
fontWeight: "bold"
},
children: "Breedte deur"
}), (0,
Ig.jsx)("span", {
children: t.sidePannelSize
})]
})
})
}), (0,
Ig.jsx)("div", {
style: {
width: "100%",
marginTop: "15px"
},
children: (0,
Ig.jsx)("div", {
style: {
margin: "2% 5% 2% 5%",
paddingTop: "0.5rem",
fontWeight: "bolder",
fontSize: "normal",
borderBottom: "1px solid GrayText"
},
children: (0,
Ig.jsxs)("div", {
style: {
display: "flex",
justifyContent: "space-between"
},
children: [(0,
Ig.jsx)("span", {
style: {
fontSize: "14px",
color: "GrayText",
fontWeight: "bold"
},
children: "Breedte deur"
}), (0,
Ig.jsx)("span", {
children: t.width
})]
})
})
}), (0,
Ig.jsx)("div", {
style: {
width: "100%",
marginTop: "15px"
},
children: (0,
Ig.jsx)("div", {
style: {
margin: "2% 5% 2% 5%",
paddingTop: "0.5rem",
fontWeight: "bolder",
fontSize: "normal",
borderBottom: "1px solid GrayText"
},
children: (0,
Ig.jsxs)("div", {
style: {
display: "flex",
justifyContent: "space-between"
},
children: [(0,
Ig.jsx)("span", {
style: {
fontSize: "14px",
color: "GrayText",
fontWeight: "bold"
},
children: "Hoogte sparing"
}), (0,
Ig.jsx)("span", {
children: t.height
})]
})
})
}), (0,
Ig.jsx)("div", {
style: {
width: "100%",
marginTop: "15px"
},
children: (0,
Ig.jsx)("div", {
style: {
margin: "2% 5% 2% 5%",
paddingTop: "0.5rem",
fontWeight: "bolder",
fontSize: "normal",
borderBottom: "1px solid GrayText"
},
children: (0,
Ig.jsxs)("div", {
style: {
display: "flex",
justifyContent: "space-between"
},
children: [(0,
Ig.jsx)("span", {
style: {
fontSize: "14px",
color: "GrayText",
fontWeight: "bold"
},
children: "Breedte sparing"
}), (0,
Ig.jsx)("span", {
children: t.holeWidth
})]
})
})
}), (0,
Ig.jsx)("div", {
style: {
width: "100%",
marginTop: "15px"
},
children: (0,
Ig.jsx)("div", {
style: {
margin: "2% 5% 2% 5%",
paddingTop: "0.5rem",
fontWeight: "bolder",
fontSize: "normal",
borderBottom: "1px solid GrayText"
},
children: (0,
Ig.jsxs)("div", {
style: {
display: "flex",
justifyContent: "space-between"
},
children: [(0,
Ig.jsx)("span", {
style: {
fontSize: "14px",
color: "GrayText",
fontWeight: "bold"
},
children: "Design"
}), (0,
Ig.jsx)("span", {
children: t.door
})]
})
})
}), (0,
Ig.jsx)("div", {
style: {
width: "100%",
marginTop: "15px"
},
children: (0,
Ig.jsx)("div", {
style: {
margin: "2% 5% 2% 5%",
paddingTop: "0.5rem",
fontWeight: "bolder",
fontSize: "normal",
borderBottom: "1px solid GrayText"
},
children: (0,
Ig.jsxs)("div", {
style: {
display: "flex",
justifyContent: "space-between"
},
children: [(0,
Ig.jsx)("span", {
style: {
fontSize: "14px",
color: "GrayText",
fontWeight: "bold"
},
children: "Handgreep"
}), (0,
Ig.jsx)("span", {
children: t.handle
})]
})
})
}), (0,
Ig.jsx)("div", {
style: {
width: "100%",
marginTop: "15px"
},
children: (0,
Ig.jsx)("div", {
style: {
margin: "2% 5% 2% 5%",
paddingTop: "0.5rem",
fontWeight: "bolder",
fontSize: "normal",
borderBottom: "1px solid GrayText"
},
children: (0,
Ig.jsxs)("div", {
style: {
display: "flex",
justifyContent: "space-between"
},
children: [(0,
Ig.jsx)("span", {
style: {
fontSize: "14px",
color: "GrayText",
fontWeight: "bold"
},
children: "Glas soort"
}), (0,
Ig.jsx)("span", {
children: t.colorGlass
})]
})
})
}), (0,
Ig.jsx)("div", {
style: {
width: "100%",
marginTop: "15px"
},
children: (0,
Ig.jsx)("div", {
style: {
margin: "2% 5% 2% 5%",
paddingTop: "0.5rem",
fontWeight: "bolder",
fontSize: "normal",
borderBottom: "1px solid GrayText"
},
children: (0,
Ig.jsxs)("div", {
style: {
display: "flex",
justifyContent: "space-between"
},
children: [(0,
Ig.jsx)("span", {
style: {
fontSize: "14px",
color: "GrayText",
fontWeight: "bold"
},
children: "Kleur"
}), (0,
Ig.jsx)("span", {
children: t.steelColor
})]
})
})
}), (0,
Ig.jsx)("div", {
style: {
width: "100%",
marginTop: "15px"
},
children: (0,
Ig.jsx)("div", {
style: {
margin: "2% 5% 2% 5%",
paddingTop: "0.5rem",
fontWeight: "bolder",
fontSize: "normal",
borderBottom: "1px solid GrayText"
},
children: (0,
Ig.jsxs)("div", {
style: {
display: "flex",
justifyContent: "space-between"
},
children: [(0,
Ig.jsx)("span", {
style: {
fontSize: "14px",
color: "GrayText",
fontWeight: "bold"
},
children: "Extra opties"
}), (0,
Ig.jsx)("div", {
style: {
display: "flex",
flexDirection: "column",
width: "80%"
},
children: t.extraOptions.map(( (e, t) => (0,
Ig.jsxs)("span", {
style: {
fontSize: "14px"
},
children: ["- ", e]
}, "extra-".concat(t))))
})]
})
})
})]
})
}
const uB = e => {
let {techInformation: t, attachDesign: n, glContext: r, sceneContext: s, cameraContext: a} = e;
const o = te()
, [l,c] = (0,
i.useState)({
aanhef: "Dhr",
voornaam: "",
tussenvoegsel: "",
achternaam: "",
straatnaam: "",
huisnummer: "",
postcode: "",
woonplaats: "",
land: "Nederland",
emailadres: "",
telefoonnummer: "",
comment: "",
file: null
});
(0,
i.useEffect)(( () => {
c({
...l,
file: n
})
}
), [n]);
const [u,d] = (0,
i.useState)(!1)
, [h,p] = (0,
i.useState)(!1)
, [f,m] = (0,
i.useState)({})
, g = e => {
const {name: t, value: n, files: r} = e.target;
c("file" === t ? {
...l,
[t]: r[0]
} : {
...l,
[t]: n
})
}
, v = async function() {
let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0];
const n = ( () => {
const e = {};
return Object.keys(l).forEach((t => {
["comment", "tussenvoegsel", "file"].includes(t) || l[t] || (e[t] = "Dit veld is verplicht")
}
)),
e
}
)();
if (0 === Object.keys(n).length) {
d(!0),
p(e);
try {
r.render(s, a);
const n = (e => {
const t = atob(e.split(",")[1])
, n = e.split(",")[0].split(":")[1].split(";")[0]
, r = new ArrayBuffer(t.length)
, i = new Uint8Array(r);
for (let s = 0; s < t.length; s++)
i[s] = t.charCodeAt(s);
return new Blob([r],{
type: n
})
}
)(r.domElement.toDataURL("image/png"))
, i = new FormData;
Object.keys(l).forEach((e => {
i.append(e, l[e])
}
)),
i.append("constructImage", n, "constructImage.png"),
i.append("techInformation", JSON.stringify(t)),
i.append("platform", "clooz");
await Mb.post("https://api-lumbronch.agreatidea.studio/api/request-a-quote", i, {
headers: {
"Content-Type": "multipart/form-data"
}
});
o("/request-confirmation"),
e && c({
aanhef: "Dhr",
voornaam: "",
tussenvoegsel: "",
achternaam: "",
straatnaam: "",
huisnummer: "",
postcode: "",
woonplaats: "",
land: "Nederland",
emailadres: "",
telefoonnummer: "",
comment: "",
file: null
})
} catch (iy) {
console.error(iy)
} finally {
d(!1)
}
} else
m(n)
}
, y = {
width: "100%",
padding: "10px",
marginBottom: "10px",
borderRadius: "4px",
backgroundColor: "#fff",
color: "#333",
border: "none",
boxSizing: "border-box"
}
, x = {
color: "red",
fontSize: "12px",
margin: 0
}
, b = {
backgroundColor: "#48BB78",
color: "#FFF",
fontSize: "16px",
padding: "10px 20px",
borderRadius: "100px",
border: "none",
cursor: "pointer"
};
return (0,
Ig.jsxs)("form", {
onSubmit: v,
children: [(0,
Ig.jsx)(cB, {
techInformation: t
}), (0,
Ig.jsxs)("div", {
style: {
maxWidth: "400px",
margin: "0 auto",
backgroundColor: "#2D3748",
padding: "20px",
borderRadius: "8px"
},
children: [(0,
Ig.jsx)("h2", {
style: {
color: "#FFF",
marginBottom: "20px",
fontSize: "16px"
},
children: "Vul uw gegevens in"
}), (0,
Ig.jsxs)("div", {
style: {
marginBottom: "10px"
},
children: [(0,
Ig.jsxs)("select", {
name: "aanhef",
value: l.aanhef,
onChange: g,
style: {
...y,
border: f.aanhef ? "1px solid red" : "none"
},
required: !0,
children: [(0,
Ig.jsx)("option", {
value: "Dhr",
children: "Dhr."
}), (0,
Ig.jsx)("option", {
value: "Mevr",
children: "Mevr."
})]
}), f.aanhef && (0,
Ig.jsx)("p", {
style: x,
children: f.aanhef
})]
}), ["voornaam", "tussenvoegsel", "achternaam", "straatnaam", "huisnummer", "postcode", "woonplaats", "emailadres", "telefoonnummer"].map((e => (0,
Ig.jsxs)("div", {
style: {
marginBottom: "10px",
display: "flex",
flexDirection: "column"
},
children: [(0,
Ig.jsx)("input", {
type: "text",
name: e,
value: l[e],
onChange: g,
placeholder: e.charAt(0).toUpperCase() + e.slice(1),
style: {
...y,
border: f[e] ? "1px solid red" : "none"
},
required: !0
}), f[e] && (0,
Ig.jsx)("p", {
style: x,
children: f[e]
})]
}, e))), (0,
Ig.jsxs)("div", {
style: {
marginBottom: "10px"
},
children: [(0,
Ig.jsxs)("select", {
name: "land",
value: l.land,
onChange: g,
style: {
...y,
border: f.land ? "1px solid red" : "none"
},
required: !0,
children: [(0,
Ig.jsx)("option", {
value: "Nederland",
children: "Nederland"
}), (0,
Ig.jsx)("option", {
value: "Spanje",
children: "Spanje"
}), (0,
Ig.jsx)("option", {
value: "Duitsland",
children: "Duitsland"
}), (0,
Ig.jsx)("option", {
value: "Belgi\xeb",
children: "Belgi\xeb"
})]
}), f.land && (0,
Ig.jsx)("p", {
style: x,
children: f.land
})]
}), (0,
Ig.jsxs)("div", {
style: {
marginBottom: "10px",
display: "flex"
},
children: [(0,
Ig.jsx)("textarea", {
rows: 3,
name: "comment",
value: l.comment,
onChange: g,
placeholder: "Opmerkingen",
style: {
...y,
border: f.comment ? "1px solid red" : "none"
}
}), f.comment && (0,
Ig.jsx)("p", {
style: x,
children: f.comment
})]
}, "comment"), (0,
Ig.jsx)("div", {
style: {
color: "red",
marginBottom: "20px"
},
children: "* Vul alle velden correct in."
}), (0,
Ig.jsxs)("div", {
style: {
marginBottom: "10px",
display: "flex",
justifyContent: "space-between",
alignItems: "center"
},
children: [(0,
Ig.jsx)("label", {
htmlFor: "file",
style: {
color: "#fff",
fontSize: "14px",
fontWeight: "bold",
display: "block"
},
children: "Afbeelding bijvoegen:"
}), (0,
Ig.jsxs)("label", {
htmlFor: "file",
style: {
display: "flex",
alignItems: "center",
gap: "10px",
cursor: "pointer",
backgroundColor: "#48BB78",
padding: "8px 15px",
borderRadius: "50px",
color: "#FFF",
fontSize: "14px",
textAlign: "center",
backgroundColor: l.file ? "#48BB78" : "red"
},
children: [(0,
Ig.jsx)("img", {
src: "/images/upload.png",
width: 20
}), "Kies bestand"]
}), (0,
Ig.jsx)("input", {
type: "file",
name: "file",
id: "file",
onChange: g,
style: {
display: "none",
border: f.file ? "1px solid red" : "none"
}
}), f.file && (0,
Ig.jsx)("p", {
style: x,
children: f.file
})]
}), (0,
Ig.jsx)("div", {
style: {
display: "flex",
justifyContent: "end",
alignItems: "center"
},
children: (0,
Ig.jsx)("button", {
type: "button",
onClick: () => v(!1),
style: {
...b,
marginTop: "10px",
minHeight: "44px",
minWidth: "187px"
},
disabled: u,
className: "relative ".concat(u ? "opacity-50 cursor-not-allowed" : ""),
children: u && !h ? (0,
Ig.jsx)("div", {
className: "absolute inset-0 flex justify-center items-center",
children: (0,
Ig.jsxs)("svg", {
className: "animate-spin h-5 w-5 text-white",
xmlns: "http://www.w3.org/2000/svg",
fill: "none",
viewBox: "0 0 24 24",
children: [(0,
Ig.jsx)("circle", {
className: "opacity-25",
cx: "12",
cy: "12",
r: "10",
stroke: "currentColor",
strokeWidth: "4"
}), (0,
Ig.jsx)("path", {
className: "opacity-75",
fill: "currentColor",
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"
})]
})
}) : "Offerte aanvragen"
})
}), (0,
Ig.jsx)("button", {
type: "button",
onClick: () => v(!0),
style: {
...b,
marginTop: "20px",
width: "100%",
minHeight: "44px"
},
disabled: u,
className: "relative ".concat(u ? "opacity-50 cursor-not-allowed" : ""),
children: u && h ? (0,
Ig.jsx)("div", {
className: "absolute inset-0 flex justify-center items-center",
children: (0,
Ig.jsxs)("svg", {
className: "animate-spin h-5 w-5 text-white",
xmlns: "http://www.w3.org/2000/svg",
fill: "none",
viewBox: "0 0 24 24",
children: [(0,
Ig.jsx)("circle", {
className: "opacity-25",
cx: "12",
cy: "12",
r: "10",
stroke: "currentColor",
strokeWidth: "4"
}), (0,
Ig.jsx)("path", {
className: "opacity-75",
fill: "currentColor",
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"
})]
})
}) : "Versturen en nog een offerte aanvragen"
})]
})]
})
}
, dB = {
Taatsdeur: "TAATSDEUR",
Schuifdeur: "SCHUIFDEUR",
Scharnier: "KOZIJN DEUR",
"vast-stalen": "VAST STALEN"
}
, hB = {
enkele: "ENKELE DEUR",
dubbele: "DUBBELE DEUR"
}
, pB = {
links: "LINKS",
rechts: "RECHTS",
beide: "BEIDE",
geen: "GEEN"
}
, fB = {
"gelijk vardelen": "GELIJKE DELEN",
"eigen maat": "EIGEN MAAT"
}
, mB = {
george: "1 paneel",
"2panel": "2 panelen",
"3panel": "3 panelen",
"4panel": "4 panelen",
"3pannel": "3 panelen ongelijk plus",
annelot: "Annelot",
notaris: "Notaris",
boerderij: "Boerderij",
herenhuis: "Herenhuis",
rond: "Rond",
rondPlus: "Rond Plus",
"low-deep": "Low Deep",
rivera: "Rivera",
porto: "Porto",
toog: "Toog",
toogPlus: "Toog plus",
boender: "Boender",
contempera: "Contempera",
fabric: "Fabric",
dt13: "Hoogh",
larino: "Larino",
dt11: "Mexico",
parallel: "Parallel",
grandma: "Grandma",
kasteel: "Kasteel",
kathedraal: "Kathedraal",
"the-judge": "The Judge",
prison: "Prison",
curved: "Curved",
lindsey: "Lindsey",
baku: "Baku",
supreme: "Supreme",
ultimate: "Ultimate",
fisherman: "Fisherman",
primier: "Primier",
elite: "Elite"
}
, gB = ["Hoeklijn", "Beugel", "Circle M", "Circle L", "Koker M", "Koker L", "Greeploos", "Handgreep met leer"]
, vB = {
1118481: "Helderglas",
395529: "Rookglas",
13467442: "Bronsglas",
16777215: "Melkglas"
}
, yB = {
"./images/doortypes/RAL 9005 fijn structuur.png": "RAL 9005 fijn structuur",
"./images/doortypes/RAL 9004 fijn structuur.png": "RAL 9004 fijn structuur",
"./images/doortypes/RAL 7021 structuur.png": "RAL 7021 structuur",
"./images/doortypes/RAL 7016 structuur.png": "RAL 7016 structuur",
"./images/doortypes/RAL 9010 structuur.png": "RAL 9010 structuur",
"./images/doortypes/RAL 9016 structuur.png": "RAL 9016 structuur",
"./images/doortypes/Anodic brown.png": "Anodic brown",
"./images/doortypes/Sterling.png": "Sterling",
"./images/doortypes/Nobble bronze.png": "Nobble bronze",
"./images/doortypes/Halo 1036.png": "Halo 1036",
"./images/doortypes/Halo 1037.png": "Halo 1037",
"./images/doortypes/Anodic_bronze.png": "Anodic bronze"
};
function xB() {
const {step: e, setStep: t, width: n, setWidth: r, height: s, door: a, doorConfig: o, sidePannel: l, type: c, sidePannelConfig: u, sidePannelSize: d, frameSize: h, glassType: p, handle: f, frameType: m, customFrameType: g, extraOptions: v, holeWidth: y, attachDesign: x, compositionImage: b, glContext: _, sceneContext: w, cameraContext: S} = (0,
i.useContext)($A)
, [A,M] = (0,
i.useState)({
type: "",
doorConfig: "",
sidePannel: "",
sidePannelConfig: "",
sidePannelSize: "",
height: "",
doorConfig: "",
width: "",
door: "",
frameSize: "",
handle: "",
colorGlass: "",
steelColor: "",
extraOptions: [],
compositionImage: b
});
return (0,
i.useEffect)(( () => {
M({
type: dB[c],
doorConfig: hB[o],
sidePannel: pB[l],
sidePannelConfig: fB[u],
sidePannelSize: d,
height: s,
width: n,
holeWidth: y,
door: mB[a],
frameSize: .25 === h ? "40mm" : .2 === h ? "30mm" : "20mm",
handle: gB[f - 1],
colorGlass: vB[p],
steelColor: "" === g.name ? yB[m] : g.name,
extraOptions: v,
compositionImage: b
})
}
), [c, o, l, u, d, s, o, n, y, a, h, f, p, yB, v, g, b]),
(0,
Ig.jsx)(Ig.Fragment, {
children: (0,
Ig.jsx)(uB, {
techInformation: A,
attachDesign: x,
glContext: _,
sceneContext: w,
cameraContext: S
})
})
}
function bB() {
const {settype: e, type: t, setStep: n, extraOptions: r, setExtraOptions: s} = (0,
i.useContext)($A)
, [a,o] = (0,
i.useState)([])
, [l,c] = (0,
i.useState)([])
, u = e => s((t => t.includes(e) ? [...t.filter((t => t != e))] : [...t, e]));
return (0,
Ig.jsx)(Ig.Fragment, {
children: (0,
Ig.jsxs)("div", {
style: {
backgroundColor: "#fff"
},
children: [(0,
Ig.jsx)("div", {
style: {
width: "100%"
},
children: (0,
Ig.jsx)("div", {
style: {
margin: "5%",
paddingTop: "0.5rem",
display: "flex",
justifyContent: "space-between",
alignItems: "center",
fontWeight: "bolder",
fontSize: "normal",
paddingLeft: "10px"
},
children: (0,
Ig.jsx)(VR, {
title: "Kies hier wat van toepassing is"
})
})
}), (0,
Ig.jsx)("div", {
style: {
margin: "5%",
fontSize: "small"
},
children: ["Meetservice", "Montage service", "Taatsbeslag in kleur", "Vloerverwarming montageset", "Adviesgesprek"].map(( (e, t) => (0,
Ig.jsxs)("div", {
style: {
display: "flex",
cursor: "pointer"
},
children: [(0,
Ig.jsx)("input", {
type: "checkbox",
checked: r.includes(e),
onChange: () => u(e),
style: {
marginRight: "10px",
width: "15px",
height: "15px"
}
}), (0,
Ig.jsx)("span", {
onClick: () => u(e),
children: e
})]
}, "".concat(e, "_").concat(t))))
}), (0,
Ig.jsx)("div", {
style: {
width: "100%"
},
children: (0,
Ig.jsx)("div", {
style: {
margin: "5%",
paddingTop: "0.5rem",
display: "flex",
justifyContent: "space-between",
alignItems: "center",
fontWeight: "bolder",
fontSize: "normal",
paddingLeft: "5px"
},
children: (0,
Ig.jsx)(VR, {
title: "Afhalen of verzenden"
})
})
}), (0,
Ig.jsx)("div", {
style: {
margin: "5%",
fontSize: "small",
borderBottom: "1px solid #d1d1d1",
paddingBottom: "25px"
},
children: ["Afleveren NL per koeriersdienst (excl. Waddeneilanden)", "Afleveren buiten NL", "Afhalen fabriek"].map(( (e, t) => (0,
Ig.jsxs)("div", {
style: {
display: "flex"
},
children: [(0,
Ig.jsx)("input", {
type: "checkbox",
checked: r.includes(e),
onChange: () => u(e),
style: {
marginRight: "10px",
width: "15px",
height: "15px"
}
}), (0,
Ig.jsx)("span", {
onClick: () => u(e),
children: e
})]
}, "".concat(e, "_").concat(t))))
}), (0,
Ig.jsx)("button", {
className: "volgende btn",
onClick: () => {
n("information")
}
,
children: "Volgende"
})]
})
})
}
function _B() {
const {type: e, settype: t, setStep: n, width: r, setWidth: s, doorConfig: a, setDoorConfig: o, sidePannel: l, setSidePannel: c, sidePannelConfig: u, setSidePannelConfig: d, sidePannelSize: h, setSidePannelSize: p, stalenPart: f, setStalenPart: m, stalenType: g, setStalenType: v, open: y, inprogress: x, holeWidth: b, setHoleWidth: _} = (0,
i.useContext)($A)
, w = (e, t) => "dubbele" == a || "links" !== l && "rechts" !== l ? "dubbele" == a && "geen" == l ? 0 : "dubbele" != a && "beide" === l ? (e - Number(t)) / 2 : "dubbele" != a || "links" != l && "rechts" != l ? "dubbele" == a && "beide" == l ? (e - 2 * Number(t)) / 2 : 0 : e - 2 * Number(t) : e - Number(t);
return (0,
Ig.jsx)(Ig.Fragment, {
children: (0,
Ig.jsxs)("div", {
style: {
width: "100%",
height: "100%"
},
children: ["vast-stalen" != e ? (0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsx)("div", {
style: {
width: "100%"
},
children: (0,
Ig.jsx)("div", {
style: {
margin: "0 5%",
display: "flex",
justifyContent: "space-between",
alignItems: "center",
fontWeight: "bolder",
fontSize: "normal"
},
children: (0,
Ig.jsx)("span", {
children: "Samenstelling deur"
})
})
}), (0,
Ig.jsxs)("div", {
style: {
display: "grid",
gridTemplateColumns: "repeat(2, 1fr)",
gridColumnGap: "10px",
fontSize: "11px",
margin: "5%",
borderBottom: "1px solid #d1d1d1",
paddingBottom: "15px"
},
children: [(0,
Ig.jsxs)("div", {
style: {
position: "relative",
margin: "5px"
},
onClick: () => {
x || o("enkele")
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: "enkele" === a ? "2px solid black" : "none",
borderRadius: "5px",
overflow: "hidden",
backgroundColor: "white",
padding: "10px",
boxShadow: "enkele" === a ? "none" : "rgba(0, 0, 0, 0.6) -5px -2px 10px -2px",
aspectRatio: "1/1",
display: "flex",
justifyContent: "center",
alignItems: "center"
},
children: [(0,
Ig.jsx)("center", {
children: (0,
Ig.jsx)("img", {
src: "./images/doortypes/door_type_3_staging.jpg",
style: {
maxHeight: "100%",
width: "80%",
objectFit: "contain"
}
})
}), (0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: "enkele" === a,
readOnly: !0
})
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
paddingTop: "5px",
margin: "10px 0 0 0",
backgroundColor: "enkele" === a ? "black" : "#bdc79d",
color: "white",
border: "1px solid ".concat("enkele" === a ? "black" : "white")
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff",
borderBottom: "1px solid ".concat("enkele" === a ? "black" : "white")
}
}), (0,
Ig.jsx)("span", {
style: {
width: "100%",
display: "inline-block",
flex: 1,
textAlign: "center",
textTransform: "uppercase",
padding: "2px 0"
},
children: "Enkele deur"
})]
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
margin: "5px"
},
onClick: () => {
x || o("dubbele")
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: "dubbele" === a ? "2px solid black" : "none",
borderRadius: "10px",
boxShadow: "-5px -2px 10px -2px rgba(0,0,0,0.6)",
padding: "10px",
backgroundColor: "white",
aspectRatio: "1/1",
display: "flex",
justifyContent: "center",
alignItems: "center"
},
children: [(0,
Ig.jsx)("center", {
children: (0,
Ig.jsx)("img", {
src: "./images/doortypes/double-door-type_staging.jpg",
style: {
maxWidth: "80%",
maxHeight: "100%"
}
})
}), (0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: "dubbele" === a,
readOnly: !0
})
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
margin: "10px 0 0 0",
paddingTop: "5px",
backgroundColor: "dubbele" === a ? "black" : "#bdc79d",
color: "white",
border: "1px solid ".concat("dubbele" === a ? "black" : "white")
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff",
borderBottom: "1px solid ".concat("dubbele" === a ? "black" : "white")
}
}), (0,
Ig.jsx)("span", {
style: {
width: "100%",
display: "inline-block",
flex: 1,
textTransform: "uppercase",
textAlign: "center",
padding: "2px 0"
},
children: "Dubbele deur"
})]
})]
})]
}), (0,
Ig.jsx)("div", {
style: {
width: "100%"
},
children: (0,
Ig.jsx)("div", {
style: {
margin: "5%",
paddingTop: "0.5rem",
display: "flex",
justifyContent: "space-between",
alignItems: "center",
fontWeight: "bolder",
fontSize: "normal"
},
children: (0,
Ig.jsx)(VR, {
title: "Samenstelling zijpaneel"
})
})
}), (0,
Ig.jsx)("div", {
className: "door-content-2",
style: {
borderBottom: "25px"
},
children: (0,
Ig.jsxs)("div", {
className: "door-content-2-1",
style: {
display: "grid",
gridTemplateColumns: "repeat(2, 1fr)",
gridColumnGap: "10px",
fontSize: "11px",
padding: "5%",
borderBottom: "2px solid #d1d1d1"
},
children: [(0,
Ig.jsxs)("div", {
style: {
position: "relative",
margin: "5px"
},
onClick: () => {
x || c("links")
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: "links" === l ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px",
overflow: "hidden",
boxShadow: "links" === l ? "none" : "rgba(0, 0, 0, 0.6) -5px -2px 10px -2px",
aspectRatio: "1/1",
display: "flex",
justifyContent: "center",
alignItems: "center"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: "links" === l,
readOnly: !0
})
}), (0,
Ig.jsx)("center", {
children: (0,
Ig.jsx)("img", {
src: "./images/doortypes/samenstelling_link.png",
style: {
maxWidth: "80%",
maxHeight: "100%",
objectFit: "contain"
}
})
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
margin: "10px 0 0 0",
backgroundColor: "links" === l ? "black" : "#bdc79d",
color: "white",
paddingTop: "5px"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center",
fontWeight: "normal",
textTransform: "uppercase"
},
children: "links"
})]
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
margin: "5px",
borderRadius: "5px"
},
onClick: () => {
x || c("rechts")
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: "rechts" === l ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px",
overflow: "hidden",
boxShadow: "rechts" === l ? "none" : "rgba(0, 0, 0, 0.6) -5px -2px 10px -2px",
aspectRatio: "1/1",
display: "flex",
justifyContent: "center",
alignItems: "center"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: "rechts" === l,
readOnly: !0
})
}), (0,
Ig.jsx)("center", {
children: (0,
Ig.jsx)("img", {
src: "./images/doortypes/samenstelling_rechts.png",
style: {
maxWidth: "80%",
maxHeight: "100%"
}
})
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
paddingTop: "5px",
margin: "10px 0 0 0",
backgroundColor: "rechts" === l ? "black" : "#bdc79d",
color: "white"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center",
fontWeight: "normal",
textTransform: "uppercase"
},
children: "rechts"
})]
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
margin: "5px"
},
onClick: () => {
x || c("beide")
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: "beide" === l ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px",
overflow: "hidden",
boxShadow: "beide" === l ? "none" : "rgba(0, 0, 0, 0.6) -5px -2px 10px -2px",
aspectRatio: "1/1",
display: "flex",
justifyContent: "center",
alignItems: "center"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: "beide" === l,
readOnly: !0
})
}), (0,
Ig.jsx)("center", {
children: (0,
Ig.jsx)("img", {
src: "./images/doortypes/samenstelling_beide.png",
style: {
maxWidth: "80%",
maxHeight: "100%"
}
})
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
paddingTop: "5px",
margin: "10px 0 0 0",
backgroundColor: "beide" === l ? "black" : "#bdc79d",
color: "white"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center",
fontWeight: "normal",
textTransform: "uppercase"
},
children: "beide"
})]
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
margin: "5px",
borderRadius: "5px"
},
onClick: () => {
x || (c("geen"),
p(r))
}
,
children: [(0,
Ig.jsxs)("div", {
style: {
border: "geen" === l ? "2px solid black" : "2px solid #d7d7d7",
borderRadius: "5px",
overflow: "hidden",
boxShadow: "geen" === l ? "none" : "rgba(0, 0, 0, 0.6) -5px -2px 10px -2px",
aspectRatio: "1/1",
display: "flex",
justifyContent: "center",
alignItems: "center"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "2px",
right: "2px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: "geen" === l,
readOnly: !0
})
}), (0,
Ig.jsx)("center", {
children: (0,
Ig.jsx)("img", {
src: "./images/doortypes/samenstelling_geen.png",
style: {
maxWidth: "80%",
maxHeight: "100%"
}
})
})]
}), (0,
Ig.jsxs)("div", {
style: {
position: "relative",
paddingTop: "5px",
margin: "10px 0 0 0",
backgroundColor: "geen" === l ? "black" : "#bdc79d",
color: "white"
},
children: [(0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "-5px",
left: "0",
width: "100%",
height: "8px",
borderRadius: "50px",
backgroundColor: "#fff"
}
}), (0,
Ig.jsx)("span", {
className: "itm-txt",
style: {
display: "block",
wordWrap: "break-word",
textAlign: "center",
fontWeight: "normal",
textTransform: "uppercase"
},
children: "geen"
})]
})]
})]
})
})]
}) : (0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsx)("div", {
style: {
width: "100%"
},
children: (0,
Ig.jsx)("div", {
style: {
margin: "5%",
paddingTop: "0.5rem",
display: "flex",
justifyContent: "space-between",
fontWeight: "bolder",
fontSize: "normal"
},
children: (0,
Ig.jsx)("span", {
children: "Situatie van het vaste paneel"
})
})
}), (0,
Ig.jsxs)("div", {
style: {
fontSize: "small",
display: "flex",
flexDirection: "column",
margin: "5%"
},
children: [(0,
Ig.jsxs)("div", {
style: {
display: "flex",
alignItems: "center"
},
children: [(0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: "divider" == g,
readOnly: !0,
onChange: () => {
v("divider")
}
}), (0,
Ig.jsx)("span", {
style: {
marginLeft: "0.5rem"
},
children: "Roomdivider"
})]
}), (0,
Ig.jsxs)("div", {
style: {
display: "flex",
alignItems: "center"
},
children: [(0,
Ig.jsx)("input", {
type: "radio",
className: "sm",
checked: "tussen" == g,
readOnly: !0,
onChange: () => {
v("tussen")
}
}), (0,
Ig.jsx)("span", {
style: {
marginLeft: "0.5rem"
},
children: "Tussen 2 wanden"
})]
})]
}), (0,
Ig.jsx)("div", {
style: {
width: "100%"
},
children: (0,
Ig.jsx)("div", {
style: {
margin: "5%",
paddingTop: "0.5rem",
display: "flex",
justifyContent: "space-between",
fontWeight: "bolder",
fontSize: "normal"
},
children: (0,
Ig.jsx)("span", {
children: "Aantal panelen"
})
})
}), (0,
Ig.jsxs)("div", {
className: "slider-container",
style: {
display: "flex",
alignItems: "center",
padding: "5%"
},
children: [(0,
Ig.jsx)("div", {
style: {
flex: 1
},
children: (0,
Ig.jsx)("input", {
type: "range",
min: "1",
max: "4",
value: f,
onChange: e => {
m(e.target.value)
}
,
style: {
width: "100%",
height: "8px",
borderRadius: "5px",
appearance: "none",
background: "#F2F2F3",
outline: "none",
marginTop: "10px"
}
})
}), (0,
Ig.jsxs)("div", {
style: {
marginLeft: "10px",
paddingLeft: "10px",
paddingRight: "10px",
paddingTop: "5px",
paddingBottom: "5px",
backgroundColor: "#F2F2F3",
position: "relative",
width: "6rem",
fontSize: "small",
borderRadius: "4px"
},
children: [(0,
Ig.jsx)("span", {
style: {
marginRight: "10px"
},
children: f
}), (0,
Ig.jsx)("span", {
children: "panelen"
})]
})]
})]
}), "vast-stalen" !== e && (0,
Ig.jsxs)(Ig.Fragment, {
children: [(0,
Ig.jsx)("div", {
style: {
width: "100%"
},
children: (0,
Ig.jsx)("div", {
style: {
margin: "5%",
paddingTop: "0.5rem",
display: "flex",
justifyContent: "space-between",
fontWeight: "bolder",
fontSize: "normal"
},
children: (0,
Ig.jsx)(VR, {
title: "Breedte deur"
})
})
}), (0,
Ig.jsxs)("div", {
style: {
display: "flex",
alignItems: "center"
},
children: [(0,
Ig.jsx)("div", {
style: {
flex: 1
},
children: (0,
Ig.jsx)("input", {
type: "range",
min: 60,
max: 120,
value: r,
onChange: e => {
"dubbele" === a || "geen" != l ? (p(w(b, e.target.value)),
s(e.target.value)) : (s(e.target.value),
p(e.target.value)),
"geen" == l && _("dubbele" === a ? 2 * e.target.value : e.target.value)
}
,
style: {
width: "100%",
height: "8px",
borderRadius: "5px",
appearance: "none",
background: "#F2F2F3",
outline: "none",
marginTop: "10px"
}
})
}), (0,
Ig.jsxs)("div", {
style: {
marginLeft: "10px",
paddingLeft: "10px",
paddingRight: "10px",
paddingTop: "5px",
paddingBottom: "5px",
backgroundColor: "#F2F2F3",
position: "relative",
width: "5rem",
fontSize: "small",
border: "1px solid",
borderRadius: "4px"
},
children: [(0,
Ig.jsx)("span", {
style: {
marginRight: "10px"
},
children: r
}), (0,
Ig.jsx)("span", {
style: {
position: "absolute",
right: "10px",
top: "50%",
transform: "translateY(-50%)"
},
children: "cm"
})]
})]
})]
}), (0,
Ig.jsx)("button", {
className: "volgende btn",
onClick: () => {
n("design")
}
,
children: "Volgende"
})]
})
})
}
function wB() {
const [e,t] = (0,
i.useState)({
Data: []
})
, [n,r] = (0,
i.useState)("door")
, [s,a] = (0,
i.useState)("Taatsdeur")
, [o,l] = (0,
i.useState)("3panel")
, [c,u] = (0,
i.useState)(.125)
, [d,h] = (0,
i.useState)(1118481)
, [p,f] = (0,
i.useState)("./images/doortypes/RAL 9005 fijn structuur.png")
, [m,g] = (0,
i.useState)(90)
, [v,y] = (0,
i.useState)(250)
, [x,b] = (0,
i.useState)(90)
, [_,w] = (0,
i.useState)("enkele")
, [S,A] = (0,
i.useState)("geen")
, [M,C] = (0,
i.useState)("eigen maat")
, [E,T] = (0,
i.useState)(m)
, [R,B] = (0,
i.useState)("tussen")
, [P,k] = (0,
i.useState)(1)
, [L,I] = (0,
i.useState)(1)
, [N,D] = (0,
i.useState)(105)
, [j,F] = (0,
i.useState)("Enkele")
, [O,U] = (0,
i.useState)("./images/doortypes/enkele deur.png")
, [z,G] = (0,
i.useState)(["Meetservice", "Montage service"])
, [H,V] = (0,
i.useState)(1)
, [W,J] = (0,
i.useState)(!1)
, [X,K] = (0,
i.useState)(!1)
, [q,Y] = (0,
i.useState)(!1)
, [Q,Z] = (0,
i.useState)(!1)
, [$,ee] = (0,
i.useState)(!1)
, [te,ne] = (0,
i.useState)(!1)
, [re,ie] = (0,
i.useState)(!1)
, [se,ae] = (0,
i.useState)(!1)
, [oe,le] = (0,
i.useState)(!1)
, [ce,ue] = (0,
i.useState)(!1)
, [de,he] = (0,
i.useState)(!1)
, [pe,fe] = (0,
i.useState)(!1)
, [me,ge] = (0,
i.useState)(!1)
, [ve,ye] = (0,
i.useState)(!1)
, [xe,be] = (0,
i.useState)(!1)
, [_e,we] = (0,
i.useState)(!1)
, [Se,Ae] = (0,
i.useState)(!1)
, [Me,Ce] = (0,
i.useState)(!1)
, [Ee,Te] = (0,
i.useState)(0)
, [Re,Be] = (0,
i.useState)("calc(100vh - 320px)")
, [Pe,ke] = (0,
i.useState)(!1)
, [Le,Ie] = (0,
i.useState)(!1)
, [Ne,De] = (0,
i.useState)()
, [je,Fe] = (0,
i.useState)(null)
, [Oe,Ue] = (0,
i.useState)(!1)
, [ze,Ge] = (0,
i.useState)({
name: "",
color: ""
})
, [He,Ve] = (0,
i.useState)("https://config.livingsteel.nl/images/doortypes/3%20panel.png")
, [We,Je] = (0,
i.useState)(null)
, [Xe,Ke] = (0,
i.useState)(null)
, [qe,Ye] = (0,
i.useState)(null);
(0,
i.useEffect)(( () => {
const e = navigator.userAgent || navigator.vendor || window.opera
, t = /android/i.test(e)
, n = (/iPad|iPhone|iPod/.test(e) && window.MSStream,
() => {
let e;
if (window.innerWidth > 800) {
e = window.innerHeight - 100
} else {
Be("calc(100vh - 25vh - ".concat(t ? "270px" : "310px", ")"));
e = .65 * window.innerHeight + 210
}
Te(e)
}
);
return Qe(),
n(),
window.addEventListener("resize", n),
() => {
window.removeEventListener("resize", n)
}
}
), []);
const Qe = async () => {
try {
const e = await Mb.get("https://api.config-fencing.com/api/get-bubbles");
De(e.data.bubbles)
} catch (iy) {
console.error("Error fetching bubbles:", iy)
}
}
;
(0,
i.useRef)();
return (0,
Ig.jsx)(Ig.Fragment, {
children: (0,
Ig.jsx)($A.Provider, {
value: {
json: e,
setJson: t,
setStep: r,
sidePannel: S,
setSidePannel: A,
type: s,
settype: a,
door: o,
setdoor: l,
width: m,
setWidth: g,
height: v,
setHeight: y,
holeWidth: x,
setHoleWidth: b,
doorConfig: _,
setDoorConfig: w,
prwType: j,
setPrwType: F,
prwImage: O,
setPrwImage: U,
count: H,
setCount: V,
frameSize: c,
setFrameSize: u,
glassType: d,
setGlassType: h,
frameType: p,
setFrameType: f,
sidePannelConfig: M,
setSidePannelConfig: C,
sidePannelSize: E,
setSidePannelSize: T,
stalenType: R,
setStalenType: B,
stalenPart: P,
setStalenPart: k,
handle: L,
setHandle: I,
maxWidth: N,
setMaxWidth: D,
coverSheetSteel: W,
setCoverSheetSteel: J,
coverLearn: X,
setCoverLearn: K,
coverWoodliness: q,
setCoverWoodliness: Y,
coverMirrors: Q,
setCoverMirrors: Z,
coverCylinderLockKey: $,
setCoverCylinderLockKey: ee,
coverDontKnow: te,
setCoverDontKnow: ne,
handleSheetSteel: re,
setHandleSheetSteel: ie,
handleLearn: se,
setHandleLearn: ae,
handleWoodliness: oe,
setHandleWoodliness: le,
handleMirrors: ce,
setHandleMirrors: ue,
handleCylinderLockKey: de,
setHandleCylinderLockKey: he,
standardBlack: pe,
setStandardBlack: fe,
alternativeRALColour: me,
setAlternativeRALColour: ge,
metallicCoating: ve,
setMetallicCoating: ye,
bright: xe,
setBright: be,
canaleOrCrepi: _e,
setCanaleOrCrepi: we,
fireResistant: Se,
setFireResistant: Ae,
outdoorPlacement: Me,
setOutdoorPlacement: Ce,
setExtraOptions: G,
extraOptions: z,
open: Pe,
setOpen: ke,
inprogress: Le,
setInprogress: Ie,
bubbles: Ne,
setBubbles: De,
attachDesign: je,
setAttachDesign: Fe,
colorPickerOpened: Oe,
setColorPickerOpened: Ue,
customFrameType: ze,
setCustomFrameType: Ge,
compositionImage: He,
setCompositionImage: Ve,
glContext: We,
sceneContext: Xe,
cameraContext: qe
},
children: (0,
Ig.jsx)("div", {
style: {
width: "100vw",
height: "100svh",
overflow: "hidden"
},
children: (0,
Ig.jsx)("div", {
className: "body-can-2",
style: {},
children: (0,
Ig.jsxs)("div", {
className: "body-can-2-1",
style: {},
children: [(0,
Ig.jsx)("div", {
className: "body-can-2-1-1",
style: {},
children: (0,
Ig.jsx)(i.Suspense, {
fallback: (0,
Ig.jsx)(GR, {}),
children: (0,
Ig.jsx)(hy, {
frameloop: "demand",
gl: {
antialias: !0,
alpha: !0,
toneMapping: gr
},
camera: {
fov: 53
},
onCreated: e => {
let {gl: t, scene: n, camera: r} = e;
Je(t),
Ke(n),
Ye(r)
}
,
children: (0,
Ig.jsx)(zR, {})
})
})
}), (0,
Ig.jsxs)("div", {
className: "body-can-2-1-2",
style: {
overflowY: "hidden"
},
children: [(0,
Ig.jsx)("div", {
className: "quot",
style: {
backgroundColor: "#bdc79d",
display: "flex",
alignItems: "center",
padding: "10px"
}
}), (0,
Ig.jsxs)("div", {
className: "step-content ".concat("door" === n ? "expand" : "collapsed"),
style: {
maxHeight: "".concat(Ee, "px")
},
children: [(0,
Ig.jsxs)("div", {
style: {
position: "relative",
cursor: "pointer",
marginTop: "auto"
},
onClick: () => {
r("door")
}
,
children: [(0,
Ig.jsx)("button", {
className: "body-btn ".concat("door" === n ? "expand" : "collapsed"),
style: {},
children: "1"
}), (0,
Ig.jsx)("span", {
className: "body-txt ".concat("door" === n ? "expand" : "collapsed"),
style: {
opacity: "door" === n ? 1 : .4
},
onClick: () => {
r("door")
}
,
children: "DEURMAAT & TYPE"
}), (0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "5px",
right: "20px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
checked: "door" === n,
readOnly: !0,
onChange: () => r("door"),
className: "radio ".concat("door" === n ? "expand" : "collapsed")
})
})]
}), (0,
Ig.jsx)("div", {
style: {
overflowY: "auto",
padding: "door" == n ? "10px" : 0,
height: "door" == n ? Re : 0,
opacity: "door" == n ? 1 : 0,
transition: "height 0.3s ease-in-out, opacity 0.5s ease-in-out"
},
children: (0,
Ig.jsx)(WR, {})
})]
}), (0,
Ig.jsxs)("div", {
className: "step-content ".concat("samenstling" === n ? "expand" : "collapsed"),
style: {
maxHeight: "".concat(Ee, "px")
},
children: [(0,
Ig.jsxs)("div", {
style: {
position: "relative",
cursor: "pointer"
},
onClick: () => {
r("samenstling")
}
,
children: [(0,
Ig.jsx)("button", {
className: "body-btn ".concat("samenstling" === n ? "expand" : "collapsed"),
children: "2"
}), (0,
Ig.jsx)("span", {
className: "body-txt ".concat("samenstling" === n ? "expand" : "collapsed"),
style: {
opacity: "samenstling" === n ? 1 : .4
},
onClick: () => {
r("samenstling")
}
,
children: "Samenstelling"
}), (0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "5px",
right: "20px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
checked: "samenstling" === n,
readOnly: !0,
onChange: () => r("samenstling"),
className: "radio ".concat("samenstling" === n ? "expand" : "collapsed")
})
})]
}), (0,
Ig.jsx)("div", {
style: {
overflowY: "auto",
padding: "samenstling" == n ? "10px" : 0,
height: "samenstling" == n ? Re : 0,
opacity: "samenstling" == n ? 1 : 0,
transition: "height 0.3s ease-in-out, opacity 0.5s ease-in-out"
},
children: (0,
Ig.jsx)(_B, {})
})]
}), (0,
Ig.jsxs)("div", {
className: "step-content ".concat("design" === n ? "expand" : "collapsed"),
style: {
maxHeight: "".concat(Ee, "px")
},
children: [(0,
Ig.jsxs)("div", {
style: {
position: "relative",
cursor: "pointer"
},
onClick: () => {
r("design")
}
,
children: [(0,
Ig.jsx)("button", {
className: "body-btn ".concat("design" === n ? "expand" : "collapsed"),
style: {},
children: "3"
}), (0,
Ig.jsx)("span", {
className: "body-txt ".concat("design" === n ? "expand" : "collapsed"),
style: {
opacity: "design" === n ? 1 : .4
},
onClick: () => {
r("design")
}
,
children: "Design, Kleur & GLAS"
}), (0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "5px",
right: "20px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
checked: "design" === n,
readOnly: !0,
onChange: () => r("design"),
className: "radio ".concat("design" === n ? "expand" : "collapsed")
})
})]
}), (0,
Ig.jsx)("div", {
style: {
backgroundColor: "#fff",
overflowY: "auto",
padding: "design" == n ? "10px" : 0,
height: "design" == n ? Re : 0,
opacity: "design" == n ? 1 : 0,
transition: "height 0.3s ease-in-out, opacity 0.5s ease-in-out"
},
children: (0,
Ig.jsx)(lB, {})
})]
}), (0,
Ig.jsxs)("div", {
className: "step-content ".concat("extra" === n ? "expand" : "collapsed"),
style: {
maxHeight: "".concat(Ee, "px")
},
children: [(0,
Ig.jsxs)("div", {
style: {
position: "relative",
cursor: "pointer"
},
onClick: () => {
r("extra")
}
,
children: [(0,
Ig.jsx)("button", {
className: "body-btn ".concat("extra" === n ? "expand" : "collapsed"),
children: "4"
}), (0,
Ig.jsx)("span", {
className: "body-txt ".concat("extra" === n ? "expand" : "collapsed"),
style: {
opacity: "extra" === n ? 1 : .4
},
onClick: () => {
r("extra")
}
,
children: "Extra Opties"
}), (0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "5px",
right: "20px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
checked: "extra" === n,
readOnly: !0,
onChange: () => r("extra"),
className: "radio ".concat("extra" === n ? "expand" : "collapsed")
})
})]
}), (0,
Ig.jsx)("div", {
style: {
overflowY: "auto",
padding: "extra" == n ? "10px" : 0,
height: "extra" == n ? Re : 0,
opacity: "extra" == n ? 1 : 0,
transition: "height 0.3s ease-in-out, opacity 0.5s ease-in-out"
},
children: (0,
Ig.jsx)(bB, {})
})]
}), (0,
Ig.jsxs)("div", {
className: "pd step-content ".concat("information" === n ? "expand" : "collapsed"),
style: {
maxHeight: "".concat(Ee, "px")
},
children: [(0,
Ig.jsxs)("div", {
style: {
position: "relative",
cursor: "pointer"
},
onClick: () => {
r("information")
}
,
children: [(0,
Ig.jsx)("button", {
className: "body-btn ".concat("information" === n ? "expand" : "collapsed"),
style: {},
children: "5"
}), (0,
Ig.jsx)("span", {
className: "body-txt ".concat("information" === n ? "expand" : "collapsed"),
style: {
opacity: "information" === n ? 1 : .4
},
onClick: () => {
r("information")
}
,
children: "Order informatie"
}), (0,
Ig.jsx)("div", {
style: {
position: "absolute",
top: "5px",
right: "20px"
},
children: (0,
Ig.jsx)("input", {
type: "radio",
checked: "information" === n,
readOnly: !0,
onChange: () => r("information"),
className: "radio ".concat("information" === n ? "expand" : "collapsed")
})
})]
}), (0,
Ig.jsx)("div", {
style: {
backgroundColor: "#fff",
overflowY: "auto",
padding: "information" == n ? "10px" : 0,
height: "information" == n ? Re : 0,
opacity: "information" == n ? 1 : 0,
transition: "height 0.3s ease-in-out, opacity 0.5s ease-in-out"
},
children: (0,
Ig.jsx)(xB, {})
})]
})]
})]
})
})
})
})
})
}
function SB() {
return (0,
i.useEffect)(( () => {
const e = setTimeout(( () => {
var e, t;
const n = null === (e = window) || void 0 === e || null === (t = e.gaGlobal) || void 0 === t ? void 0 : t.vid;
console.log("gaClientId", n);
const r = n ? "https://cloozdoors.nl?gaClientId=".concat(n) : "https://cloozdoors.nl";
window.location.href = r
}
), 2e4);
return () => clearTimeout(e)
}
), []),
(0,
Ig.jsxs)("div", {
className: "min-h-screen bg-white",
children: [(0,
Ig.jsx)("div", {
className: "w-full h-20 bg-[#bdc79d]"
}), (0,
Ig.jsxs)("div", {
className: "mt-10 p-8",
children: [(0,
Ig.jsxs)("div", {
className: "max-w-5xl mx-auto bg-[#ececec] shadow-lg",
children: [(0,
Ig.jsx)("div", {
className: "p-6 pt-0 rounded-t-lg text-center",
children: (0,
Ig.jsx)("div", {
className: "w-1/6",
children: (0,
Ig.jsx)("img", {
src: "/images/Logo_CLOOZ.jpg",
className: "w-full"
})
})
}), (0,
Ig.jsxs)("div", {
className: "p-6 text-left px-[15%]",
children: [(0,
Ig.jsx)("h2", {
className: "text-4xl font-bold mb-0",
children: "BEDANKT VOOR UW AANVRAAG!"
}), (0,
Ig.jsx)("p", {
className: "text-gray-700 mb-8",
children: "Binnen 48 uur neemt onze verkoop binnendienst contact met u op om deze online aanvraag volledig te optimaliseren en u van de juiste offerte te voorzien."
})]
})]
}), (0,
Ig.jsx)("div", {
className: "max-w-5xl mx-auto mt-4 shadow-lg",
children: (0,
Ig.jsx)("div", {
children: (0,
Ig.jsxs)("div", {
className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",
children: [(0,
Ig.jsxs)("div", {
className: "bg-[#bdc79d] border",
children: [(0,
Ig.jsxs)("div", {
className: "px-4 pt-6 pb-4",
children: [(0,
Ig.jsx)("h3", {
className: "font-semibold text-white text-xl",
children: "Waarom kies"
}), (0,
Ig.jsx)("h3", {
className: "font-semibold text-white text-xl",
children: "Je Clooz doors"
})]
}), (0,
Ig.jsx)("div", {
className: "p-2 bg-[#000]",
children: (0,
Ig.jsx)("img", {
src: "/images/request confirm/Why choose.jpg"
})
}), (0,
Ig.jsx)("div", {
className: "px-4 pt-3 pb-4",
children: (0,
Ig.jsxs)("ul", {
className: "text-left text-white text-base list-disc list-inside",
children: [(0,
Ig.jsx)("li", {
children: "Eigen fabriek"
}), (0,
Ig.jsx)("li", {
children: "Uniek eigen profiel"
}), (0,
Ig.jsx)("li", {
children: "Snelste levering"
}), (0,
Ig.jsx)("li", {
children: "Perfecte afwerking"
}), (0,
Ig.jsx)("li", {
children: "Kindveilig product"
})]
})
})]
}), (0,
Ig.jsxs)("div", {
className: "bg-[#bdc79d] border",
children: [(0,
Ig.jsxs)("div", {
className: "px-4 pt-6 pb-4",
children: [(0,
Ig.jsx)("h3", {
className: "font-semibold text-white text-xl",
children: "Waarom het"
}), (0,
Ig.jsx)("h3", {
className: "font-semibold text-white text-xl",
children: "Clooz doors profiel?"
})]
}), (0,
Ig.jsx)("div", {
className: "p-2 bg-[#000]",
children: (0,
Ig.jsx)("img", {
src: "/images/request confirm/Why it.jpg"
})
}), (0,
Ig.jsx)("div", {
className: "px-4 pt-3 pb-4",
children: (0,
Ig.jsxs)("ul", {
className: "text-left text-white text-base list-disc list-inside",
children: [(0,
Ig.jsx)("li", {
children: "Tweezijdig hetzelfde aanzicht"
}), (0,
Ig.jsx)("li", {
children: "Elke design mogelijk"
}), (0,
Ig.jsx)("li", {
children: "Ongedeelde glasplaat"
}), (0,
Ig.jsx)("li", {
children: "Rankste profiel"
})]
})
})]
}), (0,
Ig.jsxs)("div", {
className: "bg-[#bdc79d] border",
children: [(0,
Ig.jsxs)("div", {
className: "px-4 pt-6 pb-4",
children: [(0,
Ig.jsx)("h3", {
className: "font-semibold text-white text-xl",
children: "Bezoek onze"
}), (0,
Ig.jsx)("h3", {
className: "font-semibold text-white text-xl",
children: "SHOWROOM"
})]
}), (0,
Ig.jsx)("div", {
className: "p-2 bg-[#000]",
children: (0,
Ig.jsx)("img", {
src: "/images/request confirm/Visit our.jpg"
})
}), (0,
Ig.jsx)("div", {
className: "px-4 pt-3 pb-4",
children: (0,
Ig.jsxs)("ul", {
className: "text-left text-white text-base list-disc list-inside",
children: [(0,
Ig.jsx)("li", {
children: "Met persoonlijk advies"
}), (0,
Ig.jsx)("li", {
children: "Alle deuren"
}), (0,
Ig.jsx)("li", {
children: "Ontwerp samen"
}), (0,
Ig.jsx)("li", {
children: "Ook op zaterdag"
}), (0,
Ig.jsx)("li", {
children: "Centraal in NL"
})]
})
})]
}), (0,
Ig.jsxs)("div", {
className: "bg-[#bdc79d] border",
children: [(0,
Ig.jsxs)("div", {
className: "px-4 pt-6 pb-4",
children: [(0,
Ig.jsx)("h3", {
className: "font-semibold text-white text-xl",
children: "Gebruik onze"
}), (0,
Ig.jsx)("h3", {
className: "font-semibold text-white text-xl",
children: "inmeetservice"
})]
}), (0,
Ig.jsx)("div", {
className: "p-2 bg-[#000]",
children: (0,
Ig.jsx)("img", {
src: "/images/request confirm/Use our.jpg"
})
}), (0,
Ig.jsx)("div", {
className: "px-4 pt-3 pb-4",
children: (0,
Ig.jsxs)("ul", {
className: "text-left text-white text-base list-disc list-inside",
children: [(0,
Ig.jsx)("li", {
children: "Door heel NL"
}), (0,
Ig.jsx)("li", {
children: "Voorkom fouten"
}), (0,
Ig.jsx)("li", {
children: "Voorkom kosten"
}), (0,
Ig.jsx)("li", {
children: "Met het beste advies"
}), (0,
Ig.jsx)("li", {
children: "Voor het gemak"
})]
})
})]
})]
})
})
})]
})]
})
}
const AB = () => {
const [e,t] = (0,
i.useState)([])
, [n,r] = (0,
i.useState)("")
, [s,a] = (0,
i.useState)("")
, [o,l] = (0,
i.useState)(!1)
, [c,u] = (0,
i.useState)(null);
(0,
i.useEffect)(( () => {
d()
}
), []);
const d = async () => {
try {
const e = await Mb.get("https://api.config-fencing.com/api/get-bubbles");
t(e.data.bubbles)
} catch (iy) {
console.error("Error fetching bubbles:", iy)
}
}
;
return (0,
Ig.jsxs)("div", {
className: "container mx-auto p-6 max-w-md",
children: [(0,
Ig.jsx)("h1", {
className: "text-3xl font-bold mb-6 text-center",
children: "Bubble Manager"
}), o && (0,
Ig.jsxs)("div", {
className: "mb-6",
children: [(0,
Ig.jsx)("input", {
type: "text",
value: n,
onChange: e => r(e.target.value),
className: "border rounded p-2 w-full mb-4 focus:outline-none focus:ring-2 focus:ring-blue-400",
placeholder: "Enter bubble name"
}), (0,
Ig.jsx)("input", {
type: "text",
value: s,
onChange: e => a(e.target.value),
className: "border rounded p-2 w-full mb-4 focus:outline-none focus:ring-2 focus:ring-blue-400",
placeholder: "Enter bubble text"
}), (0,
Ig.jsx)("button", {
onClick: async () => {
await Mb.post("https://api.config-fencing.com/api/update-bubble/".concat(e[c].id), {
name: n,
text: s
});
const i = e.map(( (e, t) => t === c ? {
id: e.id,
name: n,
text: s
} : e));
t(i),
r(""),
a(""),
l(!1),
u(null)
}
,
className: "bg-yellow-500 text-white rounded p-2 w-full hover:bg-yellow-600",
children: "Update Bubble"
})]
}), (0,
Ig.jsx)("ul", {
className: "list-none p-0",
children: e.map(( (t, n) => (0,
Ig.jsxs)("li", {
className: "flex justify-between items-center mb-2 bg-gray-100 p-2 rounded shadow",
children: [(0,
Ig.jsxs)("div", {
className: "flex-1",
children: [(0,
Ig.jsx)("h2", {
className: "font-bold",
children: t.name
}), (0,
Ig.jsx)("p", {
children: t.text
})]
}), (0,
Ig.jsx)("div", {
children: (0,
Ig.jsx)("button", {
onClick: () => (t => {
r(e[t].name),
a(e[t].text),
l(!0),
u(t)
}
)(n),
className: "bg-yellow-500 text-white rounded p-1 mr-2 hover:bg-yellow-600",
children: "Edit"
})
})]
}, n)))
})]
})
}
;
function MB() {
return (0,
Ig.jsx)(xe, {
children: (0,
Ig.jsxs)(ge, {
children: [(0,
Ig.jsx)(fe, {
path: "/",
element: (0,
Ig.jsx)(wB, {})
}), (0,
Ig.jsx)(fe, {
path: "/request-confirmation",
element: (0,
Ig.jsx)(SB, {})
}), (0,
Ig.jsx)(fe, {
path: "/manage-bubble",
element: (0,
Ig.jsx)(AB, {})
})]
})
})
}
n(391).createRoot(document.querySelector("#root")).render((0,
Ig.jsx)(Ig.Fragment, {
children: (0,
Ig.jsx)(MB, {})
}))
}
)()
}
)();
//# sourceMappingURL=main.45858049.js.map